~ubuntu-branches/ubuntu/utopic/evolution-data-server/utopic-proposed

« back to all changes in this revision

Viewing changes to docs/reference/eds/html/eds-EBackendFactory.html

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-06-13 12:02:14 UTC
  • mfrom: (1.1.116) (1.2.35 sid)
  • Revision ID: package-import@ubuntu.com-20140613120214-1zx93d8jxwt093aw
Tags: 3.12.2-1ubuntu1
* Merge with Debian, remaining changes:
  - debian/control: build depend on hardening-wrapper
  - Add build-depends and pass configure flag to enable Ubuntu Online
    Accounts support.
  - Filter out -Bsymbolic-functions from LDFLAGS (for future people
    wondering about this change, see e.g. BGO #594473 and duplicates).
  - Enable Ubuntu Online Accounts and split it and GOA into a separate
    package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>EBackendFactory</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
7
<link rel="home" href="index.html" title="Evolution-Data-Server Reference Manual">
 
8
<link rel="up" href="ch06.html" title="Abstract Classes for Backends">
 
9
<link rel="prev" href="eds-EBackend.html" title="EBackend">
 
10
<link rel="next" href="eds-EDataFactory.html" title="EDataFactory">
 
11
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="eds-EBackend.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">Evolution-Data-Server Reference Manual</th>
 
21
<td><a accesskey="n" href="eds-EDataFactory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#eds-EBackendFactory.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#eds-EBackendFactory.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry">
 
30
<a name="eds-EBackendFactory"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="eds-EBackendFactory.top_of_page"></a>EBackendFactory</span></h2>
 
34
<p>EBackendFactory — An abstract base class for backend factories</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv">
 
39
<a name="eds-EBackendFactory.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">
 
41
#include &lt;libebackend/libebackend.h&gt;
 
42
 
 
43
struct              <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory">EBackendFactory</a>;
 
44
struct              <a class="link" href="eds-EBackendFactory.html#EBackendFactoryClass" title="struct EBackendFactoryClass">EBackendFactoryClass</a>;
 
45
const <span class="returnvalue">gchar</span> *       <a class="link" href="eds-EBackendFactory.html#e-backend-factory-get-hash-key" title="e_backend_factory_get_hash_key ()">e_backend_factory_get_hash_key</a>      (<em class="parameter"><code><a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> *factory</code></em>);
 
46
<a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="returnvalue">EBackend</span></a> *          <a class="link" href="eds-EBackendFactory.html#e-backend-factory-new-backend" title="e_backend_factory_new_backend ()">e_backend_factory_new_backend</a>       (<em class="parameter"><code><a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> *factory</code></em>,
 
47
                                                         <em class="parameter"><code><a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a> *source</code></em>);
 
48
</pre>
 
49
</div>
 
50
<div class="refsect1">
 
51
<a name="eds-EBackendFactory.description"></a><h2>Description</h2>
 
52
<p>
 
53
An <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a>'s job is to create an <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> instance for a
 
54
given <a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a>.  <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> and <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> should be subclassed
 
55
together, so that each type of <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> creates a unique type
 
56
of <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a>.
 
57
</p>
 
58
<p>
 
59
Each <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> subclass must define a hash key to uniquely
 
60
identify itself among other <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> subclasses.  <a class="link" href="eds-EDataFactory.html#EDataFactory" title="struct EDataFactory"><span class="type">EDataFactory</span></a>
 
61
then services incoming connection requests by deriving a hash key from
 
62
the requested <a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a>, using the dervied hash key to find an appropriate
 
63
<a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a>, and creating an <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> instance from that factory
 
64
to pair with the requested <a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a>.
 
65
</p>
 
66
</div>
 
67
<div class="refsect1">
 
68
<a name="eds-EBackendFactory.details"></a><h2>Details</h2>
 
69
<div class="refsect2">
 
70
<a name="EBackendFactory"></a><h3>struct EBackendFactory</h3>
 
71
<pre class="programlisting">struct EBackendFactory {
 
72
};
 
73
</pre>
 
74
<p>
 
75
Contains only private data that should be read and manipulated using the
 
76
functions below.
 
77
</p>
 
78
<p class="since">Since 3.4</p>
 
79
</div>
 
80
<hr>
 
81
<div class="refsect2">
 
82
<a name="EBackendFactoryClass"></a><h3>struct EBackendFactoryClass</h3>
 
83
<pre class="programlisting">struct EBackendFactoryClass {
 
84
        /* Methods */
 
85
        const gchar * (*get_hash_key)           (EBackendFactory *factory);
 
86
        EBackend * (*new_backend)               (EBackendFactory *factory,
 
87
                                                 ESource *source);
 
88
};
 
89
</pre>
 
90
<p>
 
91
Base class structure for the <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> class
 
92
</p>
 
93
<div class="variablelist"><table border="0">
 
94
<col align="left" valign="top">
 
95
<tbody>
 
96
<tr>
 
97
<td><p><span class="term"><em class="structfield"><code><a name="EBackendFactoryClass.get-hash-key"></a>get_hash_key</code></em> ()</span></p></td>
 
98
<td>Get the hash key for this factory</td>
 
99
</tr>
 
100
<tr>
 
101
<td><p><span class="term"><em class="structfield"><code><a name="EBackendFactoryClass.new-backend"></a>new_backend</code></em> ()</span></p></td>
 
102
<td>Create a new <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> of the appropriate type for the passed <a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a>
 
103
</td>
 
104
</tr>
 
105
</tbody>
 
106
</table></div>
 
107
<p class="since">Since 3.4</p>
 
108
</div>
 
109
<hr>
 
110
<div class="refsect2">
 
111
<a name="e-backend-factory-get-hash-key"></a><h3>e_backend_factory_get_hash_key ()</h3>
 
112
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       e_backend_factory_get_hash_key      (<em class="parameter"><code><a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> *factory</code></em>);</pre>
 
113
<p>
 
114
Returns a hash key which uniquely identifies <em class="parameter"><code>factory</code></em>.
 
115
</p>
 
116
<p>
 
117
Since only one instance of each <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> subclass is ever created,
 
118
the hash key need only be unique among subclasses, not among instances of
 
119
each subclass.
 
120
</p>
 
121
<div class="variablelist"><table border="0">
 
122
<col align="left" valign="top">
 
123
<tbody>
 
124
<tr>
 
125
<td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
 
126
<td>an <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a>
 
127
</td>
 
128
</tr>
 
129
<tr>
 
130
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
131
<td>a hash key which uniquely identifies <em class="parameter"><code>factory</code></em>
 
132
</td>
 
133
</tr>
 
134
</tbody>
 
135
</table></div>
 
136
<p class="since">Since 3.4</p>
 
137
</div>
 
138
<hr>
 
139
<div class="refsect2">
 
140
<a name="e-backend-factory-new-backend"></a><h3>e_backend_factory_new_backend ()</h3>
 
141
<pre class="programlisting"><a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="returnvalue">EBackend</span></a> *          e_backend_factory_new_backend       (<em class="parameter"><code><a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a> *factory</code></em>,
 
142
                                                         <em class="parameter"><code><a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a> *source</code></em>);</pre>
 
143
<p>
 
144
Returns a new <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> instance for <em class="parameter"><code>source</code></em>.
 
145
</p>
 
146
<div class="variablelist"><table border="0">
 
147
<col align="left" valign="top">
 
148
<tbody>
 
149
<tr>
 
150
<td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
 
151
<td>an <a class="link" href="eds-EBackendFactory.html#EBackendFactory" title="struct EBackendFactory"><span class="type">EBackendFactory</span></a>
 
152
</td>
 
153
</tr>
 
154
<tr>
 
155
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
 
156
<td>an <a class="link" href="eds-ESource.html#ESource" title="struct ESource"><span class="type">ESource</span></a>
 
157
</td>
 
158
</tr>
 
159
<tr>
 
160
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
161
<td>a new <a class="link" href="eds-EBackend.html#EBackend" title="struct EBackend"><span class="type">EBackend</span></a> instance for <em class="parameter"><code>source</code></em>
 
162
</td>
 
163
</tr>
 
164
</tbody>
 
165
</table></div>
 
166
<p class="since">Since 3.4</p>
 
167
</div>
 
168
</div>
 
169
</div>
 
170
<div class="footer">
 
171
<hr>
 
172
          Generated by GTK-Doc V1.19</div>
 
173
</body>
 
174
</html>
 
 
b'\\ No newline at end of file'