1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GData Overview</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GData Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GData Overview">
<link rel="prev" href="pt01.html" title="Part I. GData Overview">
<link rel="next" href="ch01.html" title="Object Hierarchy">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="pt01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GData Reference Manual</th>
<td><a accesskey="n" href="ch01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" title="GData Overview">
<a name="gdata-overview"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdata-overview.top_of_page"></a>GData Overview</span></h2>
<p>GData Overview — overview of libgdata's architecture</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Introduction">
<a name="id607655"></a><h2>Introduction</h2>
<p>libgdata is a library to allow access to web services using the GData protocol from the desktop. The <a class="ulink" href="http://code.google.com/apis/gdata/overview.html" target="_top">GData protocol</a> is a simple protocol for reading and writing
data on the web, designed by Google.</p>
<div class="refsect2" title="Protocol">
<a name="id607674"></a><h3>Protocol</h3>
<p>The GData protocol is designed by Google to allow interaction with their web services. It is based on the Atom Publishing
protocol, with namespaced XML additions. Communication between the client and server is broadly achieved through HTTP
requests with query parameters, and Atom feeds being returned with result entries. Each <em class="firstterm">service</em>
has its own namespaced additions to the GData protocol; for example, the Google Calendar service's API has
specialisations for addresses and time periods.
</p>
<div class="figure">
<a name="id607687"></a><p class="title"><b>Figure 1. </b></p>
<div class="figure-contents">
<div class="mediaobject" align="center"><img src="data-flow.png" align="middle"></div>
<span>An overview of the data flow when making a request of a GData service.</span>
</div>
</div>
<p><br class="figure-break">
</p>
<p>Results are always returned in the form of result <em class="firstterm">feeds</em>, containing multiple
<em class="firstterm">entries</em>. How the entries are interpreted depends on what was queried of the service, but when
using libgdata, this is all taken care of transparently.</p>
</div>
<hr>
<div class="refsect2" title="Structure">
<a name="id620938"></a><h3>Structure</h3>
<p>The basic design of libgdata mirrors the protocol's structure quite closely:
</p>
<div class="figure">
<a name="id635095"></a><p class="title"><b>Figure 2. </b></p>
<div class="figure-contents">
<div class="mediaobject" align="center"><img src="structure.png" align="middle"></div>
<span>An overview of the libgdata class structure.</span>
</div>
</div>
<p><br class="figure-break">
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type"><a class="link" href="GDataService.html" title="GDataService">GDataService</a></span></span></p></td>
<td>
<p>Subclassed for each different web service implemented, this class represents a single client's
connection to the relevant web service, holding their authentication state, and making the necessary
requests to read and write data to and from the service. All top-level actions, such as creating a new
object on the server, are carried out through a service.</p>
<p>There should be one <span class="type"><a class="link" href="GDataService.html" title="GDataService">GDataService</a></span> subclass for each
of the services listed <a class="ulink" href="http://code.google.com/apis/gdata/" target="_top">in the GData
documentation</a>.</p>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type"><a class="link" href="GDataQuery.html" title="GDataQuery">GDataQuery</a></span></span></p></td>
<td>
<p>For queries to have multiple individual parameters, a
<span class="type"><a class="link" href="GDataQuery.html" title="GDataQuery">GDataQuery</a></span> can be used to specify the parameters.</p>
<p>Query objects are optional, and can only be used with queries (not with entry insertions, updates
or deletions). The query object builds the query URI used by the
<span class="type"><a class="link" href="GDataService.html" title="GDataService">GDataService</a></span> when sending the query to the server.</p>
<p>Services can subclass <span class="type"><a class="link" href="GDataQuery.html" title="GDataQuery">GDataQuery</a></span> if the service
supports non-standard query parameters.</p>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type"><a class="link" href="GDataFeed.html" title="GDataFeed">GDataFeed</a></span></span></p></td>
<td>
<p>Effectively a list of <span class="type"><a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a></span>s, the
<span class="type"><a class="link" href="GDataFeed.html" title="GDataFeed">GDataFeed</a></span> class is a direct counterpart of the root
<span class="type"><feed></span> element in the Atom feeds which form the GData protocol. It contains the
elements in a query response, as well as general information about the response, such as links to
related feeds and the categories under which the query response falls.</p>
<p><span class="type"><a class="link" href="GDataFeed.html" title="GDataFeed">GDataFeed</a></span> is usually not subclassed by services,
as there are rarely service-specific elements in a feed itself.</p>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type"><a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a></span></span></p></td>
<td><p>A <span class="type"><a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a></span> is a direct counterpart of the
<span class="type"><entry></span> element in the Atom feeds which form the GData protocol. It represents a
single object of unspecified semantics; an entry could be anything from a calendar event to a video
comment or access control rule. Semantics are given to entries by subclassing
<span class="type"><a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a></span> for the various types of entries returned
by queries to a service. Such subclasses implement useful, relevant and query-specific properties
on the entry (such as the duration of a video, or the recurrence rules of a calendar event).</p></td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|