37
31
<h2><span class="refentrytitle"><a name="GoaProvider.top_of_page"></a>GoaProvider</span></h2>
38
32
<p>GoaProvider — Abstract base class for providers</p>
40
<td valign="top" align="right"></td>
34
<td class="gallery_image" valign="top" align="right"></td>
41
35
</tr></table></div>
42
<div class="refsynopsisdiv">
43
<a name="GoaProvider.synopsis"></a><h2>Synopsis</h2>
44
<pre class="synopsis"> <a class="link" href="GoaProvider.html#GoaProvider-struct" title="GoaProvider">GoaProvider</a>;
45
struct <a class="link" href="GoaProvider.html#GoaProviderClass" title="struct GoaProviderClass">GoaProviderClass</a>;
46
enum <a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup">GoaProviderGroup</a>;
47
enum <a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures">GoaProviderFeatures</a>;
48
const <span class="returnvalue">gchar</span> * <a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()">goa_provider_get_provider_type</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);
49
<span class="returnvalue">gchar</span> * <a class="link" href="GoaProvider.html#goa-provider-get-provider-name" title="goa_provider_get_provider_name ()">goa_provider_get_provider_name</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
50
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);
51
<span class="returnvalue">GIcon</span> * <a class="link" href="GoaProvider.html#goa-provider-get-provider-icon" title="goa_provider_get_provider_icon ()">goa_provider_get_provider_icon</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
52
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);
53
<a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="returnvalue">GoaProviderGroup</span></a> <a class="link" href="GoaProvider.html#goa-provider-get-provider-group" title="goa_provider_get_provider_group ()">goa_provider_get_provider_group</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);
54
<a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="returnvalue">GoaProviderFeatures</span></a> <a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()">goa_provider_get_provider_features</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);
55
<span class="returnvalue">gboolean</span> <a class="link" href="GoaProvider.html#goa-provider-build-object" title="goa_provider_build_object ()">goa_provider_build_object</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
56
<em class="parameter"><code><a class="link" href="GoaObject.html#GoaObjectSkeleton"><span class="type">GoaObjectSkeleton</span></a> *object</code></em>,
57
<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
58
<em class="parameter"><code>const <span class="type">gchar</span> *group</code></em>,
59
<em class="parameter"><code><span class="type">GDBusConnection</span> *connection</code></em>,
60
<em class="parameter"><code><span class="type">gboolean</span> just_added</code></em>,
61
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
62
<a class="link" href="GoaObject.html" title="GoaObject"><span class="returnvalue">GoaObject</span></a> * <a class="link" href="GoaProvider.html#goa-provider-add-account" title="goa_provider_add_account ()">goa_provider_add_account</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
63
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
64
<em class="parameter"><code><span class="type">GtkDialog</span> *dialog</code></em>,
65
<em class="parameter"><code><span class="type">GtkBox</span> *vbox</code></em>,
66
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
67
<span class="returnvalue">void</span> <a class="link" href="GoaProvider.html#goa-provider-set-preseed-data" title="goa_provider_set_preseed_data ()">goa_provider_set_preseed_data</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
68
<em class="parameter"><code><span class="type">GVariant</span> *preseed_data</code></em>);
69
<span class="returnvalue">GVariant</span> * <a class="link" href="GoaProvider.html#goa-provider-get-preseed-data" title="goa_provider_get_preseed_data ()">goa_provider_get_preseed_data</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);
70
<span class="returnvalue">gboolean</span> <a class="link" href="GoaProvider.html#goa-provider-refresh-account" title="goa_provider_refresh_account ()">goa_provider_refresh_account</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
71
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
72
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
73
<em class="parameter"><code><span class="type">GtkWindow</span> *parent</code></em>,
74
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
75
<span class="returnvalue">void</span> <a class="link" href="GoaProvider.html#goa-provider-show-account" title="goa_provider_show_account ()">goa_provider_show_account</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
76
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
77
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
78
<em class="parameter"><code><span class="type">GtkBox</span> *vbox</code></em>,
79
<em class="parameter"><code><span class="type">GtkGrid</span> *grid</code></em>,
80
<em class="parameter"><code><span class="type">GtkGrid</span> *dummy</code></em>);
81
<span class="returnvalue">void</span> <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()">goa_provider_ensure_credentials</a> (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
82
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
83
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
84
<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
85
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
86
<span class="returnvalue">gboolean</span> <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-finish" title="goa_provider_ensure_credentials_finish ()">goa_provider_ensure_credentials_finish</a>
87
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
88
<em class="parameter"><code><span class="type">gint</span> *out_expires_in</code></em>,
89
<em class="parameter"><code><span class="type">GAsyncResult</span> *res</code></em>,
90
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
91
<span class="returnvalue">gboolean</span> <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-sync" title="goa_provider_ensure_credentials_sync ()">goa_provider_ensure_credentials_sync</a>
92
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
93
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
94
<em class="parameter"><code><span class="type">gint</span> *out_expires_in</code></em>,
95
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
96
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
97
<span class="returnvalue">guint</span> <a class="link" href="GoaProvider.html#goa-provider-get-credentials-generation" title="goa_provider_get_credentials_generation ()">goa_provider_get_credentials_generation</a>
98
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);
99
#define <a class="link" href="GoaProvider.html#GOA-PROVIDER-EXTENSION-POINT-NAME:CAPS" title="GOA_PROVIDER_EXTENSION_POINT_NAME">GOA_PROVIDER_EXTENSION_POINT_NAME</a>
100
<span class="returnvalue">void</span> <a class="link" href="GoaProvider.html#goa-provider-get-all" title="goa_provider_get_all ()">goa_provider_get_all</a> (<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
101
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
102
<a class="link" href="GoaProvider.html" title="GoaProvider"><span class="returnvalue">GoaProvider</span></a> * <a class="link" href="GoaProvider.html#goa-provider-get-for-provider-type" title="goa_provider_get_for_provider_type ()">goa_provider_get_for_provider_type</a> (<em class="parameter"><code>const <span class="type">gchar</span> *provider_type</code></em>);
36
<div class="refsect1">
37
<a name="GoaProvider.functions"></a><h2>Functions</h2>
38
<div class="informaltable"><table width="100%" border="0">
40
<col width="150px" class="functions_return">
41
<col class="functions_name">
45
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
47
<td class="function_name">
48
<a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()">goa_provider_get_provider_type</a> <span class="c_punctuation">()</span>
52
<td class="function_type">
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
55
<td class="function_name">
56
<a class="link" href="GoaProvider.html#goa-provider-get-provider-name" title="goa_provider_get_provider_name ()">goa_provider_get_provider_name</a> <span class="c_punctuation">()</span>
60
<td class="function_type">
61
<a href="http://library.gnome.org/devel/gio/unstable/GIcon.html"><span class="returnvalue">GIcon</span></a> *
63
<td class="function_name">
64
<a class="link" href="GoaProvider.html#goa-provider-get-provider-icon" title="goa_provider_get_provider_icon ()">goa_provider_get_provider_icon</a> <span class="c_punctuation">()</span>
68
<td class="function_type">
69
<a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="returnvalue">GoaProviderGroup</span></a>
71
<td class="function_name">
72
<a class="link" href="GoaProvider.html#goa-provider-get-provider-group" title="goa_provider_get_provider_group ()">goa_provider_get_provider_group</a> <span class="c_punctuation">()</span>
76
<td class="function_type">
77
<a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="returnvalue">GoaProviderFeatures</span></a>
79
<td class="function_name">
80
<a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()">goa_provider_get_provider_features</a> <span class="c_punctuation">()</span>
84
<td class="function_type">
85
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
87
<td class="function_name">
88
<a class="link" href="GoaProvider.html#goa-provider-build-object" title="goa_provider_build_object ()">goa_provider_build_object</a> <span class="c_punctuation">()</span>
92
<td class="function_type">
93
<a class="link" href="GoaObject.html" title="GoaObject"><span class="returnvalue">GoaObject</span></a> *
95
<td class="function_name">
96
<a class="link" href="GoaProvider.html#goa-provider-add-account" title="goa_provider_add_account ()">goa_provider_add_account</a> <span class="c_punctuation">()</span>
100
<td class="function_type">
101
<span class="returnvalue">void</span>
103
<td class="function_name">
104
<a class="link" href="GoaProvider.html#goa-provider-set-preseed-data" title="goa_provider_set_preseed_data ()">goa_provider_set_preseed_data</a> <span class="c_punctuation">()</span>
108
<td class="function_type">
109
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
111
<td class="function_name">
112
<a class="link" href="GoaProvider.html#goa-provider-get-preseed-data" title="goa_provider_get_preseed_data ()">goa_provider_get_preseed_data</a> <span class="c_punctuation">()</span>
116
<td class="function_type">
117
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
119
<td class="function_name">
120
<a class="link" href="GoaProvider.html#goa-provider-refresh-account" title="goa_provider_refresh_account ()">goa_provider_refresh_account</a> <span class="c_punctuation">()</span>
124
<td class="function_type">
125
<span class="returnvalue">void</span>
127
<td class="function_name">
128
<a class="link" href="GoaProvider.html#goa-provider-show-account" title="goa_provider_show_account ()">goa_provider_show_account</a> <span class="c_punctuation">()</span>
132
<td class="function_type">
133
<span class="returnvalue">void</span>
135
<td class="function_name">
136
<a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()">goa_provider_ensure_credentials</a> <span class="c_punctuation">()</span>
140
<td class="function_type">
141
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
143
<td class="function_name">
144
<a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-finish" title="goa_provider_ensure_credentials_finish ()">goa_provider_ensure_credentials_finish</a> <span class="c_punctuation">()</span>
148
<td class="function_type">
149
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
151
<td class="function_name">
152
<a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-sync" title="goa_provider_ensure_credentials_sync ()">goa_provider_ensure_credentials_sync</a> <span class="c_punctuation">()</span>
156
<td class="function_type">
157
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
159
<td class="function_name">
160
<a class="link" href="GoaProvider.html#goa-provider-get-credentials-generation" title="goa_provider_get_credentials_generation ()">goa_provider_get_credentials_generation</a> <span class="c_punctuation">()</span>
164
<td class="function_type">
165
<span class="returnvalue">void</span>
167
<td class="function_name">
168
<a class="link" href="GoaProvider.html#goa-provider-get-all" title="goa_provider_get_all ()">goa_provider_get_all</a> <span class="c_punctuation">()</span>
172
<td class="function_type">
173
<a class="link" href="GoaProvider.html" title="GoaProvider"><span class="returnvalue">GoaProvider</span></a> *
175
<td class="function_name">
176
<a class="link" href="GoaProvider.html#goa-provider-get-for-provider-type" title="goa_provider_get_for_provider_type ()">goa_provider_get_for_provider_type</a> <span class="c_punctuation">()</span>
182
<div class="refsect1">
183
<a name="GoaProvider.properties"></a><h2>Properties</h2>
184
<div class="informaltable"><table border="0">
186
<col width="150px" class="properties_type">
187
<col width="300px" class="properties_name">
188
<col width="200px" class="properties_flags">
191
<td class="property_type">
192
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *</td>
193
<td class="property_name"><a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title="The “preseed-data” property">preseed-data</a></td>
194
<td class="property_flags">Read / Write</td>
198
<div class="refsect1">
199
<a name="GoaProvider.other"></a><h2>Types and Values</h2>
200
<div class="informaltable"><table width="100%" border="0">
202
<col width="150px" class="name">
203
<col class="description">
207
<td class="datatype_keyword"> </td>
208
<td class="function_name"><a class="link" href="GoaProvider.html#GoaProvider-struct" title="GoaProvider">GoaProvider</a></td>
211
<td class="datatype_keyword"> </td>
212
<td class="function_name"><a class="link" href="GoaProvider.html#GoaProviderClass" title="GoaProviderClass">GoaProviderClass</a></td>
215
<td class="datatype_keyword">enum</td>
216
<td class="function_name"><a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup">GoaProviderGroup</a></td>
219
<td class="datatype_keyword">enum</td>
220
<td class="function_name"><a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures">GoaProviderFeatures</a></td>
223
<td class="define_keyword">#define</td>
224
<td class="function_name"><a class="link" href="GoaProvider.html#GOA-PROVIDER-EXTENSION-POINT-NAME:CAPS" title="GOA_PROVIDER_EXTENSION_POINT_NAME">GOA_PROVIDER_EXTENSION_POINT_NAME</a></td>
105
229
<div class="refsect1">
106
230
<a name="GoaProvider.object-hierarchy"></a><h2>Object Hierarchy</h2>
107
<pre class="synopsis">
110
+----<a class="link" href="GoaOAuthProvider.html" title="GoaOAuthProvider">GoaOAuthProvider</a>
111
+----<a class="link" href="GoaOAuth2Provider.html" title="GoaOAuth2Provider">GoaOAuth2Provider</a>
114
<div class="refsect1">
115
<a name="GoaProvider.properties"></a><h2>Properties</h2>
116
<pre class="synopsis">
117
"<a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title='The "preseed-data" property'>preseed-data</a>" <span class="type">GVariant</span>* : Read / Write
231
<pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
232
<span class="lineart">╰──</span> GoaProvider
233
<span class="lineart">├──</span> <a class="link" href="GoaOAuthProvider.html" title="GoaOAuthProvider">GoaOAuthProvider</a>
234
<span class="lineart">╰──</span> <a class="link" href="GoaOAuth2Provider.html" title="GoaOAuth2Provider">GoaOAuth2Provider</a>
120
237
<div class="refsect1">
121
238
<a name="GoaProvider.description"></a><h2>Description</h2>
123
<a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> is the base type for all providers.
126
<div class="refsect1">
127
<a name="GoaProvider.details"></a><h2>Details</h2>
239
<p><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> is the base type for all providers.</p>
241
<div class="refsect1">
242
<a name="GoaProvider.functions_details"></a><h2>Functions</h2>
243
<div class="refsect2">
244
<a name="goa-provider-get-provider-type"></a><h3>goa_provider_get_provider_type ()</h3>
245
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
246
goa_provider_get_provider_type (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
247
<p>Gets the type of <em class="parameter"><code>provider</code></em>
249
<p>This is a pure virtual method - a subclass must provide an
251
<div class="refsect3">
252
<a name="id-1.5.2.3.8.2.6"></a><h4>Parameters</h4>
253
<div class="informaltable"><table width="100%" border="0">
255
<col width="150px" class="parameters_name">
256
<col class="parameters_description">
257
<col width="200px" class="parameters_annotations">
260
<td class="parameter_name"><p>provider</p></td>
261
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
262
<td class="parameter_annotations"> </td>
266
<div class="refsect3">
267
<a name="id-1.5.2.3.8.2.7"></a><h4>Returns</h4>
268
<p> A string owned by <em class="parameter"><code>provider</code></em>
270
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
274
<div class="refsect2">
275
<a name="goa-provider-get-provider-name"></a><h3>goa_provider_get_provider_name ()</h3>
276
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
277
goa_provider_get_provider_name (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
278
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);</pre>
279
<p>Gets a name for <em class="parameter"><code>provider</code></em>
280
and <em class="parameter"><code>object</code></em>
281
that is suitable for display
282
in an user interface. The returned value may depend on <em class="parameter"><code>object</code></em>
284
it's not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) - for example, hosted accounts might return a
286
<p>This is a pure virtual method - a subclass must provide an
288
<div class="refsect3">
289
<a name="id-1.5.2.3.8.3.6"></a><h4>Parameters</h4>
290
<div class="informaltable"><table width="100%" border="0">
292
<col width="150px" class="parameters_name">
293
<col class="parameters_description">
294
<col width="200px" class="parameters_annotations">
298
<td class="parameter_name"><p>provider</p></td>
299
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
300
<td class="parameter_annotations"> </td>
303
<td class="parameter_name"><p>object</p></td>
304
<td class="parameter_description"><p> A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for an account. </p></td>
305
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
310
<div class="refsect3">
311
<a name="id-1.5.2.3.8.3.7"></a><h4>Returns</h4>
312
<p> A string that should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
313
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
317
<div class="refsect2">
318
<a name="goa-provider-get-provider-icon"></a><h3>goa_provider_get_provider_icon ()</h3>
319
<pre class="programlisting"><a href="http://library.gnome.org/devel/gio/unstable/GIcon.html"><span class="returnvalue">GIcon</span></a> *
320
goa_provider_get_provider_icon (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
321
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);</pre>
322
<p>Gets an icon for <em class="parameter"><code>provider</code></em>
323
and <em class="parameter"><code>object</code></em>
324
that is suitable for display
325
in an user interface. The returned value may depend on <em class="parameter"><code>object</code></em>
327
for example, hosted accounts might return a different icon.</p>
328
<p>This is a virtual method with a default implementation that returns
329
a <a href="http://library.gnome.org/devel/gio/unstable/GThemedIcon.html"><span class="type">GThemedIcon</span></a> with fallbacks constructed from the name
330
<code class="literal">goa-account-TYPE</code> where <code class="literal">TYPE</code>
331
is the return value of <a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()"><code class="function">goa_provider_get_provider_type()</code></a>.</p>
332
<div class="refsect3">
333
<a name="id-1.5.2.3.8.4.6"></a><h4>Parameters</h4>
334
<div class="informaltable"><table width="100%" border="0">
336
<col width="150px" class="parameters_name">
337
<col class="parameters_description">
338
<col width="200px" class="parameters_annotations">
342
<td class="parameter_name"><p>provider</p></td>
343
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
344
<td class="parameter_annotations"> </td>
347
<td class="parameter_name"><p>object</p></td>
348
<td class="parameter_description"><p>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for an account.</p></td>
349
<td class="parameter_annotations"> </td>
354
<div class="refsect3">
355
<a name="id-1.5.2.3.8.4.7"></a><h4>Returns</h4>
356
<p> An icon that should be freed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
357
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
361
<div class="refsect2">
362
<a name="goa-provider-get-provider-group"></a><h3>goa_provider_get_provider_group ()</h3>
363
<pre class="programlisting"><a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="returnvalue">GoaProviderGroup</span></a>
364
goa_provider_get_provider_group (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
365
<div class="warning">
366
<p><code class="literal">goa_provider_get_provider_group</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
367
<p>Use <a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()"><code class="function">goa_provider_get_provider_features()</code></a> instead.</p>
369
<p>Gets the group to which <em class="parameter"><code>provider</code></em>
370
belongs that is suitable for
371
organizing the providers while displaying them in an user
373
<p>This is a pure virtual method - a subclass must provide an
375
<div class="refsect3">
376
<a name="id-1.5.2.3.8.5.8"></a><h4>Parameters</h4>
377
<div class="informaltable"><table width="100%" border="0">
379
<col width="150px" class="parameters_name">
380
<col class="parameters_description">
381
<col width="200px" class="parameters_annotations">
384
<td class="parameter_name"><p>provider</p></td>
385
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
386
<td class="parameter_annotations"> </td>
390
<div class="refsect3">
391
<a name="id-1.5.2.3.8.5.9"></a><h4>Returns</h4>
392
<p> A <a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="type">GoaProviderGroup</span></a>.</p>
395
<p class="since">Since 3.8</p>
398
<div class="refsect2">
399
<a name="goa-provider-get-provider-features"></a><h3>goa_provider_get_provider_features ()</h3>
400
<pre class="programlisting"><a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="returnvalue">GoaProviderFeatures</span></a>
401
goa_provider_get_provider_features (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
402
<p>Get the features bitmask (eg. <a class="link" href="GoaProvider.html#GOA-PROVIDER-FEATURE-CHAT:CAPS"><code class="literal">GOA_PROVIDER_FEATURE_CHAT</code></a>|<a class="link" href="GoaProvider.html#GOA-PROVIDER-FEATURE-CONTACTS:CAPS"><code class="literal">GOA_PROVIDER_FEATURE_CONTACTS</code></a>)
403
supported by the provider.</p>
404
<div class="refsect3">
405
<a name="id-1.5.2.3.8.6.5"></a><h4>Parameters</h4>
406
<div class="informaltable"><table width="100%" border="0">
408
<col width="150px" class="parameters_name">
409
<col class="parameters_description">
410
<col width="200px" class="parameters_annotations">
413
<td class="parameter_name"><p>provider</p></td>
414
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
415
<td class="parameter_annotations"> </td>
419
<div class="refsect3">
420
<a name="id-1.5.2.3.8.6.6"></a><h4>Returns</h4>
421
<p> The <a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="type">GoaProviderFeatures</span></a> bitmask with the provided features.</p>
424
<p class="since">Since 3.10</p>
427
<div class="refsect2">
428
<a name="goa-provider-build-object"></a><h3>goa_provider_build_object ()</h3>
429
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
430
goa_provider_build_object (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
431
<em class="parameter"><code><a class="link" href="GoaObject.html#GoaObjectSkeleton"><span class="type">GoaObjectSkeleton</span></a> *object</code></em>,
432
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
433
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group</code></em>,
434
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusConnection.html"><span class="type">GDBusConnection</span></a> *connection</code></em>,
435
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> just_added</code></em>,
436
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
437
<p>This method is called when construction account <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a>
438
from configuration data - it basically provides a way to add
439
provider-specific information.</p>
440
<p>The passed in <em class="parameter"><code>object</code></em>
441
will have a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface
442
set. Implementations should validate and use data from <em class="parameter"><code>key_file</code></em>
444
add more interfaces to <em class="parameter"><code>object</code></em>
446
<p>Note that this may be called on already exported objects - for
447
example on configuration files reload.</p>
448
<p>This is a pure virtual method - a subclass must provide an
450
<div class="refsect3">
451
<a name="id-1.5.2.3.8.7.8"></a><h4>Parameters</h4>
452
<div class="informaltable"><table width="100%" border="0">
454
<col width="150px" class="parameters_name">
455
<col class="parameters_description">
456
<col width="200px" class="parameters_annotations">
460
<td class="parameter_name"><p>provider</p></td>
461
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
462
<td class="parameter_annotations"> </td>
465
<td class="parameter_name"><p>object</p></td>
466
<td class="parameter_description"><p>The <a class="link" href="GoaObject.html#GoaObjectSkeleton"><span class="type">GoaObjectSkeleton</span></a> that is being built.</p></td>
467
<td class="parameter_annotations"> </td>
470
<td class="parameter_name"><p>key_file</p></td>
471
<td class="parameter_description"><p>The <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> with configuation data.</p></td>
472
<td class="parameter_annotations"> </td>
475
<td class="parameter_name"><p>group</p></td>
476
<td class="parameter_description"><p>The group in <em class="parameter"><code>key_file</code></em>
477
to get data from.</p></td>
478
<td class="parameter_annotations"> </td>
481
<td class="parameter_name"><p>connection</p></td>
482
<td class="parameter_description"><p>The <a href="http://library.gnome.org/devel/gio/unstable/GDBusConnection.html"><span class="type">GDBusConnection</span></a> used by the daemon to connect to the message bus.</p></td>
483
<td class="parameter_annotations"> </td>
486
<td class="parameter_name"><p>just_added</p></td>
487
<td class="parameter_description"><p>Whether the account was newly created or being updated.</p></td>
488
<td class="parameter_annotations"> </td>
491
<td class="parameter_name"><p>error</p></td>
492
<td class="parameter_description"><p>Return location for error or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
493
<td class="parameter_annotations"> </td>
498
<div class="refsect3">
499
<a name="id-1.5.2.3.8.7.9"></a><h4>Returns</h4>
500
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if data was valid, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
506
<div class="refsect2">
507
<a name="goa-provider-add-account"></a><h3>goa_provider_add_account ()</h3>
508
<pre class="programlisting"><a class="link" href="GoaObject.html" title="GoaObject"><span class="returnvalue">GoaObject</span></a> *
509
goa_provider_add_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
510
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
511
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkDialog.html"><span class="type">GtkDialog</span></a> *dialog</code></em>,
512
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkBox.html"><span class="type">GtkBox</span></a> *vbox</code></em>,
513
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
514
<p>This method brings up the user interface necessary to create a new
515
account on <em class="parameter"><code>client</code></em>
516
of the type for <em class="parameter"><code>provider</code></em>
518
user to get all information needed and creates the account.</p>
519
<p>The passed in <em class="parameter"><code>dialog</code></em>
520
widget is guaranteed to be visible with <em class="parameter"><code>vbox</code></em>
522
being empty and the only visible widget in <em class="parameter"><code>dialog</code></em>
524
area. The dialog has exactly one action widget, a cancel button
525
with response id GTK_RESPONSE_CANCEL. Implementations are free to
526
add additional action widgets, as needed.</p>
527
<p>If an account was successfully created, a <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for the
528
created account is returned. If <em class="parameter"><code>dialog</code></em>
529
is dismissed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is
530
returned and <em class="parameter"><code>error</code></em>
531
is set to <a class="link" href="goa-GoaError.html#GOA-ERROR-DIALOG-DISMISSED:CAPS"><code class="literal">GOA_ERROR_DIALOG_DISMISSED</code></a>. If an
532
account couldn't be created then <em class="parameter"><code>error</code></em>
533
is set. In some cases,
534
for example, when the credentials could not be stored in the
535
keyring, a <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> can be returned even if <em class="parameter"><code>error</code></em>
537
<p>The caller will always show an error dialog if <em class="parameter"><code>error</code></em>
539
the error is <a class="link" href="goa-GoaError.html#GOA-ERROR-DIALOG-DISMISSED:CAPS"><code class="literal">GOA_ERROR_DIALOG_DISMISSED</code></a>.</p>
540
<p>Implementations should run the default main loop while
541
interacting with the user and may do so using e.g. <a href="http://developer.gnome.org/gtk2/GtkDialog.html#gtk-dialog-run"><code class="function">gtk_dialog_run()</code></a>
542
on <em class="parameter"><code>dialog</code></em>
544
<p>This is a pure virtual method - a subclass must provide an
546
<div class="refsect3">
547
<a name="id-1.5.2.3.8.8.10"></a><h4>Parameters</h4>
548
<div class="informaltable"><table width="100%" border="0">
550
<col width="150px" class="parameters_name">
551
<col class="parameters_description">
552
<col width="200px" class="parameters_annotations">
556
<td class="parameter_name"><p>provider</p></td>
557
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
558
<td class="parameter_annotations"> </td>
561
<td class="parameter_name"><p>client</p></td>
562
<td class="parameter_description"><p>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</p></td>
563
<td class="parameter_annotations"> </td>
566
<td class="parameter_name"><p>dialog</p></td>
567
<td class="parameter_description"><p>A <a href="http://developer.gnome.org/gtk2/GtkDialog.html"><span class="type">GtkDialog</span></a>.</p></td>
568
<td class="parameter_annotations"> </td>
571
<td class="parameter_name"><p>vbox</p></td>
572
<td class="parameter_description"><p>A vertically oriented <a href="http://developer.gnome.org/gtk2/GtkBox.html"><span class="type">GtkBox</span></a> to put content in.</p></td>
573
<td class="parameter_annotations"> </td>
576
<td class="parameter_name"><p>error</p></td>
577
<td class="parameter_description"><p>Return location for error or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
578
<td class="parameter_annotations"> </td>
583
<div class="refsect3">
584
<a name="id-1.5.2.3.8.8.11"></a><h4>Returns</h4>
585
<p> The <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for the created account (must be relased
586
with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>) or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
592
<div class="refsect2">
593
<a name="goa-provider-set-preseed-data"></a><h3>goa_provider_set_preseed_data ()</h3>
594
<pre class="programlisting"><span class="returnvalue">void</span>
595
goa_provider_set_preseed_data (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
596
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *preseed_data</code></em>);</pre>
597
<p>Sets the <a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title="The “preseed-data” property"><span class="type">“preseed-data”</span></a> property to feed any information already
598
collected that can be useful when creating a new account.</p>
599
<p>If the <em class="parameter"><code>preseed_data</code></em>
600
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed to allow
601
'inline' use of the <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a> family of functions.</p>
602
<div class="refsect3">
603
<a name="id-1.5.2.3.8.9.6"></a><h4>Parameters</h4>
604
<div class="informaltable"><table width="100%" border="0">
606
<col width="150px" class="parameters_name">
607
<col class="parameters_description">
608
<col width="200px" class="parameters_annotations">
612
<td class="parameter_name"><p>provider</p></td>
613
<td class="parameter_description"><p>The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a></p></td>
614
<td class="parameter_annotations"> </td>
617
<td class="parameter_name"><p>preseed_data</p></td>
618
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type a{sv}</p></td>
619
<td class="parameter_annotations"> </td>
626
<div class="refsect2">
627
<a name="goa-provider-get-preseed-data"></a><h3>goa_provider_get_preseed_data ()</h3>
628
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
629
goa_provider_get_preseed_data (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
630
<p>Gets the <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> set through the <a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title="The “preseed-data” property"><span class="type">“preseed-data”</span></a> property.</p>
631
<div class="refsect3">
632
<a name="id-1.5.2.3.8.10.5"></a><h4>Parameters</h4>
633
<div class="informaltable"><table width="100%" border="0">
635
<col width="150px" class="parameters_name">
636
<col class="parameters_description">
637
<col width="200px" class="parameters_annotations">
640
<td class="parameter_name"><p>provider</p></td>
641
<td class="parameter_description"><p>The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a></p></td>
642
<td class="parameter_annotations"> </td>
646
<div class="refsect3">
647
<a name="id-1.5.2.3.8.10.6"></a><h4>Returns</h4>
648
<p> A <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> that is known to be valid until
649
the property is overridden or the provider freed. </p>
650
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
654
<div class="refsect2">
655
<a name="goa-provider-refresh-account"></a><h3>goa_provider_refresh_account ()</h3>
656
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
657
goa_provider_refresh_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
658
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
659
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
660
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkWindow.html"><span class="type">GtkWindow</span></a> *parent</code></em>,
661
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
662
<p>This method brings up the user interface necessary for refreshing
663
the credentials for the account specified by <em class="parameter"><code>object</code></em>
665
typically involves having the user log in to the account again.</p>
666
<p>Implementations should use <em class="parameter"><code>parent</code></em>
667
(unless <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) as the transient
668
parent of any created windows/dialogs.</p>
669
<p>Implementations should run the default main loop while
670
interacting with the user.</p>
671
<p>This is a pure virtual method - a subclass must provide an
673
<div class="refsect3">
674
<a name="id-1.5.2.3.8.11.8"></a><h4>Parameters</h4>
675
<div class="informaltable"><table width="100%" border="0">
677
<col width="150px" class="parameters_name">
678
<col class="parameters_description">
679
<col width="200px" class="parameters_annotations">
683
<td class="parameter_name"><p>provider</p></td>
684
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
685
<td class="parameter_annotations"> </td>
688
<td class="parameter_name"><p>client</p></td>
689
<td class="parameter_description"><p>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</p></td>
690
<td class="parameter_annotations"> </td>
693
<td class="parameter_name"><p>object</p></td>
694
<td class="parameter_description"><p>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</p></td>
695
<td class="parameter_annotations"> </td>
698
<td class="parameter_name"><p>parent</p></td>
699
<td class="parameter_description"><p> Transient parent of dialogs or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
700
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
703
<td class="parameter_name"><p>error</p></td>
704
<td class="parameter_description"><p>Return location for error or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
705
<td class="parameter_annotations"> </td>
710
<div class="refsect3">
711
<a name="id-1.5.2.3.8.11.9"></a><h4>Returns</h4>
712
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the account has been refreshed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
718
<div class="refsect2">
719
<a name="goa-provider-show-account"></a><h3>goa_provider_show_account ()</h3>
720
<pre class="programlisting"><span class="returnvalue">void</span>
721
goa_provider_show_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
722
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
723
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
724
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkBox.html"><span class="type">GtkBox</span></a> *vbox</code></em>,
725
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkGrid.html"><span class="type">GtkGrid</span></a> *grid</code></em>,
726
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkGrid.html"><span class="type">GtkGrid</span></a> *dummy</code></em>);</pre>
727
<p>Method used to add widgets in the control panel for the account
728
represented by <em class="parameter"><code>object</code></em>
730
<p>This is a pure virtual method - a subclass must provide an
732
<div class="refsect3">
733
<a name="id-1.5.2.3.8.12.6"></a><h4>Parameters</h4>
734
<div class="informaltable"><table width="100%" border="0">
736
<col width="150px" class="parameters_name">
737
<col class="parameters_description">
738
<col width="200px" class="parameters_annotations">
742
<td class="parameter_name"><p>provider</p></td>
743
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
744
<td class="parameter_annotations"> </td>
747
<td class="parameter_name"><p>client</p></td>
748
<td class="parameter_description"><p>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</p></td>
749
<td class="parameter_annotations"> </td>
752
<td class="parameter_name"><p>object</p></td>
753
<td class="parameter_description"><p>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</p></td>
754
<td class="parameter_annotations"> </td>
757
<td class="parameter_name"><p>vbox</p></td>
758
<td class="parameter_description"><p>A vertically oriented <a href="http://developer.gnome.org/gtk2/GtkBox.html"><span class="type">GtkBox</span></a> to put content in.</p></td>
759
<td class="parameter_annotations"> </td>
762
<td class="parameter_name"><p>grid</p></td>
763
<td class="parameter_description"><p>A <a href="http://developer.gnome.org/gtk2/GtkGrid.html"><span class="type">GtkGrid</span></a> to put content in.</p></td>
764
<td class="parameter_annotations"> </td>
767
<td class="parameter_name"><p>dummy</p></td>
768
<td class="parameter_description"><p>Unused.</p></td>
769
<td class="parameter_annotations"> </td>
776
<div class="refsect2">
777
<a name="goa-provider-ensure-credentials"></a><h3>goa_provider_ensure_credentials ()</h3>
778
<pre class="programlisting"><span class="returnvalue">void</span>
779
goa_provider_ensure_credentials (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
780
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
781
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
782
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
783
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
784
<p>Ensures that credentials for <em class="parameter"><code>object</code></em>
786
<p>When the result is ready, <em class="parameter"><code>callback</code></em>
787
will be called in the the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
788
loop</GTKDOCLINK> this function was called from. You can then call
789
<a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-finish" title="goa_provider_ensure_credentials_finish ()"><code class="function">goa_provider_ensure_credentials_finish()</code></a> to get the result
790
of the operation.</p>
791
<p>This is a virtual method where the default implementation simply
792
throws the <a class="link" href="goa-GoaError.html#GOA-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">GOA_ERROR_NOT_SUPPORTED</code></a> error. A subclass may provide
793
another implementation.</p>
794
<div class="refsect3">
795
<a name="id-1.5.2.3.8.13.7"></a><h4>Parameters</h4>
796
<div class="informaltable"><table width="100%" border="0">
798
<col width="150px" class="parameters_name">
799
<col class="parameters_description">
800
<col width="200px" class="parameters_annotations">
804
<td class="parameter_name"><p>provider</p></td>
805
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
806
<td class="parameter_annotations"> </td>
809
<td class="parameter_name"><p>object</p></td>
810
<td class="parameter_description"><p>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</p></td>
811
<td class="parameter_annotations"> </td>
814
<td class="parameter_name"><p>cancellable</p></td>
815
<td class="parameter_description"><p> A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
816
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
819
<td class="parameter_name"><p>callback</p></td>
820
<td class="parameter_description"><p>The function to call when the request is satisfied.</p></td>
821
<td class="parameter_annotations"> </td>
824
<td class="parameter_name"><p>user_data</p></td>
825
<td class="parameter_description"><p>Pointer to pass to <em class="parameter"><code>callback</code></em>
827
<td class="parameter_annotations"> </td>
834
<div class="refsect2">
835
<a name="goa-provider-ensure-credentials-finish"></a><h3>goa_provider_ensure_credentials_finish ()</h3>
836
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
837
goa_provider_ensure_credentials_finish
838
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
839
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *out_expires_in</code></em>,
840
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *res</code></em>,
841
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
842
<p>Finishes an operation started with <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a>.</p>
843
<div class="refsect3">
844
<a name="id-1.5.2.3.8.14.5"></a><h4>Parameters</h4>
845
<div class="informaltable"><table width="100%" border="0">
847
<col width="150px" class="parameters_name">
848
<col class="parameters_description">
849
<col width="200px" class="parameters_annotations">
853
<td class="parameter_name"><p>provider</p></td>
854
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
855
<td class="parameter_annotations"> </td>
858
<td class="parameter_name"><p>out_expires_in</p></td>
859
<td class="parameter_description"><p> Return location for how long the expired credentials are good for (0 if unknown) or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
860
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
863
<td class="parameter_name"><p>res</p></td>
864
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> obtained from the <a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a>.</p></td>
865
<td class="parameter_annotations"> </td>
868
<td class="parameter_name"><p>error</p></td>
869
<td class="parameter_description"><p>Return location for error or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
870
<td class="parameter_annotations"> </td>
875
<div class="refsect3">
876
<a name="id-1.5.2.3.8.14.6"></a><h4>Returns</h4>
877
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the credentials for the passed <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> are valid, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
883
<div class="refsect2">
884
<a name="goa-provider-ensure-credentials-sync"></a><h3>goa_provider_ensure_credentials_sync ()</h3>
885
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
886
goa_provider_ensure_credentials_sync (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
887
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
888
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *out_expires_in</code></em>,
889
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
890
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
891
<p>Like <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a> but blocks the
892
calling thread until an answer is received.</p>
893
<div class="refsect3">
894
<a name="id-1.5.2.3.8.15.5"></a><h4>Parameters</h4>
895
<div class="informaltable"><table width="100%" border="0">
897
<col width="150px" class="parameters_name">
898
<col class="parameters_description">
899
<col width="200px" class="parameters_annotations">
903
<td class="parameter_name"><p>provider</p></td>
904
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
905
<td class="parameter_annotations"> </td>
908
<td class="parameter_name"><p>object</p></td>
909
<td class="parameter_description"><p>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</p></td>
910
<td class="parameter_annotations"> </td>
913
<td class="parameter_name"><p>out_expires_in</p></td>
914
<td class="parameter_description"><p> Return location for how long the expired credentials are good for (0 if unknown) or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
915
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
918
<td class="parameter_name"><p>cancellable</p></td>
919
<td class="parameter_description"><p> A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
920
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
923
<td class="parameter_name"><p>error</p></td>
924
<td class="parameter_description"><p>Return location for error or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
925
<td class="parameter_annotations"> </td>
930
<div class="refsect3">
931
<a name="id-1.5.2.3.8.15.6"></a><h4>Returns</h4>
932
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the credentials for the passed <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> are valid, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
938
<div class="refsect2">
939
<a name="goa-provider-get-credentials-generation"></a><h3>goa_provider_get_credentials_generation ()</h3>
940
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
941
goa_provider_get_credentials_generation
942
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
943
<p>Gets the generation of credentials being used for the provider.</p>
944
<p>Implementations should bump this number when changes are introduced
945
that may render existing credentials unusable.</p>
946
<p>For example, if an additional scope is requested (e.g. access to
947
contacts data) while obtaining credentials, then this number needs
948
to be bumped since existing credentials are not good for the added
950
<p>This is a virtual method where the default implementation returns
952
<div class="refsect3">
953
<a name="id-1.5.2.3.8.16.8"></a><h4>Parameters</h4>
954
<div class="informaltable"><table width="100%" border="0">
956
<col width="150px" class="parameters_name">
957
<col class="parameters_description">
958
<col width="200px" class="parameters_annotations">
961
<td class="parameter_name"><p>provider</p></td>
962
<td class="parameter_description"><p>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p></td>
963
<td class="parameter_annotations"> </td>
967
<div class="refsect3">
968
<a name="id-1.5.2.3.8.16.9"></a><h4>Returns</h4>
969
<p> The current generation of credentials.</p>
974
<div class="refsect2">
975
<a name="goa-provider-get-all"></a><h3>goa_provider_get_all ()</h3>
976
<pre class="programlisting"><span class="returnvalue">void</span>
977
goa_provider_get_all (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
978
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
979
<p>Creates a list of all the available <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> instances.</p>
980
<p>When the result is ready, <em class="parameter"><code>callback</code></em>
981
will be called in the the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
982
loop</GTKDOCLINK> this function was called from. You can then call
983
<code class="function">goa_provider_get_all_finish()</code> to get the result of the operation.</p>
984
<p>See <a class="link" href="GoaProvider.html#goa-provider-get-for-provider-type" title="goa_provider_get_for_provider_type ()"><code class="function">goa_provider_get_for_provider_type()</code></a> for details on how the providers
986
<div class="refsect3">
987
<a name="id-1.5.2.3.8.17.7"></a><h4>Parameters</h4>
988
<div class="informaltable"><table width="100%" border="0">
990
<col width="150px" class="parameters_name">
991
<col class="parameters_description">
992
<col width="200px" class="parameters_annotations">
996
<td class="parameter_name"><p>callback</p></td>
997
<td class="parameter_description"><p>The function to call when the request is satisfied.</p></td>
998
<td class="parameter_annotations"> </td>
1001
<td class="parameter_name"><p>user_data</p></td>
1002
<td class="parameter_description"><p>Pointer to pass to <em class="parameter"><code>callback</code></em>
1004
<td class="parameter_annotations"> </td>
1011
<div class="refsect2">
1012
<a name="goa-provider-get-for-provider-type"></a><h3>goa_provider_get_for_provider_type ()</h3>
1013
<pre class="programlisting"><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="returnvalue">GoaProvider</span></a> *
1014
goa_provider_get_for_provider_type (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *provider_type</code></em>);</pre>
1015
<p>Returns a <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> for <em class="parameter"><code>provider_type</code></em>
1017
<p>If <em class="parameter"><code>provider_type</code></em>
1018
doesn't contain any "/", a
1019
<a class="link" href="GoaProvider.html#GOA-PROVIDER-EXTENSION-POINT-NAME:CAPS" title="GOA_PROVIDER_EXTENSION_POINT_NAME"><code class="literal">GOA_PROVIDER_EXTENSION_POINT_NAME</code></a> extension for <em class="parameter"><code>provider_type</code></em>
1021
and the newly created <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>, if any, is returned.</p>
1022
<p>If <em class="parameter"><code>provider_type</code></em>
1024
<a class="link" href="GoaProviderFactory.html#GOA-PROVIDER-FACTORY-EXTENSION-POINT-NAME:CAPS" title="GOA_PROVIDER_FACTORY_EXTENSION_POINT_NAME"><code class="literal">GOA_PROVIDER_FACTORY_EXTENSION_POINT_NAME</code></a> extension for the first part of
1025
<em class="parameter"><code>provider_type</code></em>
1026
is looked up. If found, the <a class="link" href="GoaProviderFactory.html" title="GoaProviderFactory"><span class="type">GoaProviderFactory</span></a> is used
1027
to create a dynamic <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> matching the second part of <em class="parameter"><code>provider_type</code></em>
1029
<div class="refsect3">
1030
<a name="id-1.5.2.3.8.18.7"></a><h4>Parameters</h4>
1031
<div class="informaltable"><table width="100%" border="0">
1033
<col width="150px" class="parameters_name">
1034
<col class="parameters_description">
1035
<col width="200px" class="parameters_annotations">
1038
<td class="parameter_name"><p>provider_type</p></td>
1039
<td class="parameter_description"><p>A provider type.</p></td>
1040
<td class="parameter_annotations"> </td>
1044
<div class="refsect3">
1045
<a name="id-1.5.2.3.8.18.8"></a><h4>Returns</h4>
1046
<p> A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> (that must be freed
1047
with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>) or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found. </p>
1048
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1052
<div class="refsect1">
1053
<a name="GoaProvider.other_details"></a><h2>Types and Values</h2>
128
1054
<div class="refsect2">
129
1055
<a name="GoaProvider-struct"></a><h3>GoaProvider</h3>
130
1056
<pre class="programlisting">typedef struct _GoaProvider GoaProvider;</pre>
132
The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> structure contains only private data and should
133
only be accessed using the provided API.
1057
<p>The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> structure contains only private data and should
1058
only be accessed using the provided API.</p>
137
1061
<div class="refsect2">
138
<a name="GoaProviderClass"></a><h3>struct GoaProviderClass</h3>
139
<pre class="programlisting">struct GoaProviderClass {
1062
<a name="GoaProviderClass"></a><h3>GoaProviderClass</h3>
1063
<pre class="programlisting">typedef struct {
140
1064
GObjectClass parent_class;
142
1066
/* pure virtual */
179
1103
/* pure virtual */
180
1104
GoaProviderGroup (*get_provider_group) (GoaProvider *provider);
181
1105
GoaProviderFeatures (*get_provider_features) (GoaProvider *provider);
185
Class structure for <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.
187
<div class="variablelist"><table border="0" class="variablelist">
1108
<p>Class structure for <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</p>
1109
<div class="refsect3">
1110
<a name="id-1.5.2.3.9.3.5"></a><h4>Members</h4>
1111
<div class="informaltable"><table width="100%" border="0">
189
<col align="left" valign="top">
1113
<col width="300px" class="struct_members_name">
1114
<col class="struct_members_description">
1115
<col width="200px" class="struct_members_annotations">
194
<td><p><span class="term"><span class="type">GObjectClass</span> <em class="structfield"><code><a name="GoaProviderClass.parent-class"></a>parent_class</code></em>;</span></p></td>
195
<td>The parent class.</td>
198
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-provider-type"></a>get_provider_type</code></em> ()</span></p></td>
199
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()"><code class="function">goa_provider_get_provider_type()</code></a>.</td>
202
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-provider-name"></a>get_provider_name</code></em> ()</span></p></td>
203
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-name" title="goa_provider_get_provider_name ()"><code class="function">goa_provider_get_provider_name()</code></a>.</td>
206
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-provider-icon"></a>get_provider_icon</code></em> ()</span></p></td>
207
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-icon" title="goa_provider_get_provider_icon ()"><code class="function">goa_provider_get_provider_icon()</code></a>.</td>
210
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.add-account"></a>add_account</code></em> ()</span></p></td>
211
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-add-account" title="goa_provider_add_account ()"><code class="function">goa_provider_add_account()</code></a>.</td>
214
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.refresh-account"></a>refresh_account</code></em> ()</span></p></td>
215
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-refresh-account" title="goa_provider_refresh_account ()"><code class="function">goa_provider_refresh_account()</code></a>.</td>
218
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.show-account"></a>show_account</code></em> ()</span></p></td>
219
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-show-account" title="goa_provider_show_account ()"><code class="function">goa_provider_show_account()</code></a>.</td>
222
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.build-object"></a>build_object</code></em> ()</span></p></td>
223
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-build-object" title="goa_provider_build_object ()"><code class="function">goa_provider_build_object()</code></a>.</td>
226
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.ensure-credentials-sync"></a>ensure_credentials_sync</code></em> ()</span></p></td>
227
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-sync" title="goa_provider_ensure_credentials_sync ()"><code class="function">goa_provider_ensure_credentials_sync()</code></a>.</td>
230
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-credentials-generation"></a>get_credentials_generation</code></em> ()</span></p></td>
231
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-credentials-generation" title="goa_provider_get_credentials_generation ()"><code class="function">goa_provider_get_credentials_generation()</code></a>.</td>
234
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-provider-group"></a>get_provider_group</code></em> ()</span></p></td>
235
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-group" title="goa_provider_get_provider_group ()"><code class="function">goa_provider_get_provider_group()</code></a>.</td>
238
<td><p><span class="term"><em class="structfield"><code><a name="GoaProviderClass.get-provider-features"></a>get_provider_features</code></em> ()</span></p></td>
239
<td>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()"><code class="function">goa_provider_get_provider_features()</code></a>.</td>
1119
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GoaProviderClass.parent-class"></a>parent_class</code></em>;</p></td>
1120
<td class="struct_member_description"><p>The parent class.</p></td>
1121
<td class="struct_member_annotations"> </td>
1124
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-provider-type"></a>get_provider_type</code></em> ()</p></td>
1125
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()"><code class="function">goa_provider_get_provider_type()</code></a>.</p></td>
1126
<td class="struct_member_annotations"> </td>
1129
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-provider-name"></a>get_provider_name</code></em> ()</p></td>
1130
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-name" title="goa_provider_get_provider_name ()"><code class="function">goa_provider_get_provider_name()</code></a>.</p></td>
1131
<td class="struct_member_annotations"> </td>
1134
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-provider-icon"></a>get_provider_icon</code></em> ()</p></td>
1135
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-icon" title="goa_provider_get_provider_icon ()"><code class="function">goa_provider_get_provider_icon()</code></a>.</p></td>
1136
<td class="struct_member_annotations"> </td>
1139
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.add-account"></a>add_account</code></em> ()</p></td>
1140
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-add-account" title="goa_provider_add_account ()"><code class="function">goa_provider_add_account()</code></a>.</p></td>
1141
<td class="struct_member_annotations"> </td>
1144
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.refresh-account"></a>refresh_account</code></em> ()</p></td>
1145
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-refresh-account" title="goa_provider_refresh_account ()"><code class="function">goa_provider_refresh_account()</code></a>.</p></td>
1146
<td class="struct_member_annotations"> </td>
1149
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.show-account"></a>show_account</code></em> ()</p></td>
1150
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-show-account" title="goa_provider_show_account ()"><code class="function">goa_provider_show_account()</code></a>.</p></td>
1151
<td class="struct_member_annotations"> </td>
1154
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.build-object"></a>build_object</code></em> ()</p></td>
1155
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-build-object" title="goa_provider_build_object ()"><code class="function">goa_provider_build_object()</code></a>.</p></td>
1156
<td class="struct_member_annotations"> </td>
1159
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.ensure-credentials-sync"></a>ensure_credentials_sync</code></em> ()</p></td>
1160
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-sync" title="goa_provider_ensure_credentials_sync ()"><code class="function">goa_provider_ensure_credentials_sync()</code></a>.</p></td>
1161
<td class="struct_member_annotations"> </td>
1164
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-credentials-generation"></a>get_credentials_generation</code></em> ()</p></td>
1165
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-credentials-generation" title="goa_provider_get_credentials_generation ()"><code class="function">goa_provider_get_credentials_generation()</code></a>.</p></td>
1166
<td class="struct_member_annotations"> </td>
1169
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-provider-group"></a>get_provider_group</code></em> ()</p></td>
1170
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-group" title="goa_provider_get_provider_group ()"><code class="function">goa_provider_get_provider_group()</code></a>.</p></td>
1171
<td class="struct_member_annotations"> </td>
1174
<td class="struct_member_name"><p><em class="structfield"><code><a name="GoaProviderClass.get-provider-features"></a>get_provider_features</code></em> ()</p></td>
1175
<td class="struct_member_description"><p>Virtual function for <a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()"><code class="function">goa_provider_get_provider_features()</code></a>.</p></td>
1176
<td class="struct_member_annotations"> </td>
245
1183
<div class="refsect2">
246
1184
<a name="GoaProviderGroup"></a><h3>enum GoaProviderGroup</h3>
247
<pre class="programlisting">typedef enum {
248
GOA_PROVIDER_GROUP_BRANDED,
249
GOA_PROVIDER_GROUP_CONTACTS,
250
GOA_PROVIDER_GROUP_MAIL,
251
GOA_PROVIDER_GROUP_TICKETING,
252
GOA_PROVIDER_GROUP_CHAT,
253
GOA_PROVIDER_GROUP_INVALID
257
An enum for specifying which group a provider belongs to. This is
1185
<p>An enum for specifying which group a provider belongs to. This is
258
1186
can be used to organize the providers while displaying them in an
261
<div class="variablelist"><table border="0" class="variablelist">
1188
<div class="refsect3">
1189
<a name="id-1.5.2.3.9.4.4"></a><h4>Members</h4>
1190
<div class="informaltable"><table width="100%" border="0">
263
<col align="left" valign="top">
1192
<col width="300px" class="enum_members_name">
1193
<col class="enum_members_description">
1194
<col width="200px" class="enum_members_annotations">
268
<td><p><a name="GOA-PROVIDER-GROUP-BRANDED:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_BRANDED</code></span></p></td>
269
<td>Providers with a well-known brand. For
270
example, Google and Facebook.
274
<td><p><a name="GOA-PROVIDER-GROUP-CONTACTS:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_CONTACTS</code></span></p></td>
275
<td>Providers that offer address book services.
276
For example, CardDAV.
280
<td><p><a name="GOA-PROVIDER-GROUP-MAIL:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_MAIL</code></span></p></td>
281
<td>Providers that offer email-like messaging
282
services. For example, IMAP and SMTP.
286
<td><p><a name="GOA-PROVIDER-GROUP-TICKETING:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_TICKETING</code></span></p></td>
287
<td>Providers with ticketing
288
capabilities. For example, Kerberos.
292
<td><p><a name="GOA-PROVIDER-GROUP-CHAT:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_CHAT</code></span></p></td>
297
<td><p><a name="GOA-PROVIDER-GROUP-INVALID:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_GROUP_INVALID</code></span></p></td>
298
<td>Used for error handling. No provider
299
should belong to this group.
1198
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-BRANDED:CAPS"></a>GOA_PROVIDER_GROUP_BRANDED</p></td>
1199
<td class="enum_member_description">
1200
<p>Providers with a well-known brand. For
1201
example, Google and Facebook.</p>
1203
<td class="enum_member_annotations"> </td>
1206
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-CONTACTS:CAPS"></a>GOA_PROVIDER_GROUP_CONTACTS</p></td>
1207
<td class="enum_member_description">
1208
<p>Providers that offer address book services.
1209
For example, CardDAV.</p>
1211
<td class="enum_member_annotations"> </td>
1214
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-MAIL:CAPS"></a>GOA_PROVIDER_GROUP_MAIL</p></td>
1215
<td class="enum_member_description">
1216
<p>Providers that offer email-like messaging
1217
services. For example, IMAP and SMTP.</p>
1219
<td class="enum_member_annotations"> </td>
1222
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-TICKETING:CAPS"></a>GOA_PROVIDER_GROUP_TICKETING</p></td>
1223
<td class="enum_member_description">
1224
<p>Providers with ticketing
1225
capabilities. For example, Kerberos.</p>
1227
<td class="enum_member_annotations"> </td>
1230
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-CHAT:CAPS"></a>GOA_PROVIDER_GROUP_CHAT</p></td>
1231
<td class="enum_member_description"> </td>
1232
<td class="enum_member_annotations"> </td>
1235
<td class="enum_member_name"><p><a name="GOA-PROVIDER-GROUP-INVALID:CAPS"></a>GOA_PROVIDER_GROUP_INVALID</p></td>
1236
<td class="enum_member_description">
1237
<p>Used for error handling. No provider
1238
should belong to this group.</p>
1240
<td class="enum_member_annotations"> </td>
306
1247
<div class="refsect2">
307
1248
<a name="GoaProviderFeatures"></a><h3>enum GoaProviderFeatures</h3>
308
<pre class="programlisting">typedef enum {
309
GOA_PROVIDER_FEATURE_BRANDED = 1 << 1,
310
GOA_PROVIDER_FEATURE_MAIL = 1 << 2,
311
GOA_PROVIDER_FEATURE_CALENDAR = 1 << 3,
312
GOA_PROVIDER_FEATURE_CONTACTS = 1 << 4,
313
GOA_PROVIDER_FEATURE_CHAT = 1 << 5,
314
GOA_PROVIDER_FEATURE_DOCUMENTS = 1 << 6,
315
GOA_PROVIDER_FEATURE_PHOTOS = 1 << 7,
316
GOA_PROVIDER_FEATURE_FILES = 1 << 8,
317
GOA_PROVIDER_FEATURE_TICKETING = 1 << 9,
318
GOA_PROVIDER_FEATURE_INVALID = 0
319
} GoaProviderFeatures;
322
These flags specify the features exported by each provider. They can be
1249
<p>These flags specify the features exported by each provider. They can be
323
1250
expecially useful to restrict the list of available providers when
324
1251
requesting the creation of an account for a specific purpose (eg. from a
327
<div class="variablelist"><table border="0" class="variablelist">
329
<col align="left" valign="top">
334
<td><p><a name="GOA-PROVIDER-FEATURE-BRANDED:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_BRANDED</code></span></p></td>
335
<td>Common providers to be highlighted (ie. Google, OwnCloud).
339
<td><p><a name="GOA-PROVIDER-FEATURE-MAIL:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_MAIL</code></span></p></td>
340
<td>Mail services (ie. SMTP, IMAP).
344
<td><p><a name="GOA-PROVIDER-FEATURE-CALENDAR:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_CALENDAR</code></span></p></td>
345
<td>Calendaring services (ie. CalDAV).
349
<td><p><a name="GOA-PROVIDER-FEATURE-CONTACTS:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_CONTACTS</code></span></p></td>
350
<td>Addressbook services (ie. CardDAV).
354
<td><p><a name="GOA-PROVIDER-FEATURE-CHAT:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_CHAT</code></span></p></td>
355
<td>Instant messaging services (ie. XMPP, IRC).
359
<td><p><a name="GOA-PROVIDER-FEATURE-DOCUMENTS:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_DOCUMENTS</code></span></p></td>
360
<td>Documents storage services (ie. Google Documents).
364
<td><p><a name="GOA-PROVIDER-FEATURE-PHOTOS:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_PHOTOS</code></span></p></td>
365
<td>Photos storage services (ie. Flickr).
369
<td><p><a name="GOA-PROVIDER-FEATURE-FILES:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_FILES</code></span></p></td>
370
<td>Files storage services (ie. WebDAV).
374
<td><p><a name="GOA-PROVIDER-FEATURE-TICKETING:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_TICKETING</code></span></p></td>
375
<td>Ticketing services (ie. Kerberos).
379
<td><p><a name="GOA-PROVIDER-FEATURE-INVALID:CAPS"></a><span class="term"><code class="literal">GOA_PROVIDER_FEATURE_INVALID</code></span></p></td>
380
<td>Used for error handling. No provider
381
should provide this feature.
386
<p class="since">Since 3.10</p>
389
<div class="refsect2">
390
<a name="goa-provider-get-provider-type"></a><h3>goa_provider_get_provider_type ()</h3>
391
<pre class="programlisting">const <span class="returnvalue">gchar</span> * goa_provider_get_provider_type (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
393
Gets the type of <em class="parameter"><code>provider</code></em>.
396
This is a pure virtual method - a subclass must provide an
399
<div class="variablelist"><table border="0" class="variablelist">
401
<col align="left" valign="top">
406
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
407
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
410
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
411
<td>A string owned by <em class="parameter"><code>provider</code></em>, do not free. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
418
<div class="refsect2">
419
<a name="goa-provider-get-provider-name"></a><h3>goa_provider_get_provider_name ()</h3>
420
<pre class="programlisting"><span class="returnvalue">gchar</span> * goa_provider_get_provider_name (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
421
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);</pre>
423
Gets a name for <em class="parameter"><code>provider</code></em> and <em class="parameter"><code>object</code></em> that is suitable for display
424
in an user interface. The returned value may depend on <em class="parameter"><code>object</code></em> (if
425
it's not <code class="literal">NULL</code>) - for example, hosted accounts might return a
429
This is a pure virtual method - a subclass must provide an
432
<div class="variablelist"><table border="0" class="variablelist">
434
<col align="left" valign="top">
439
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
440
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
443
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
444
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for an account. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
448
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
449
<td>A string that should be freed with <code class="function">g_free()</code>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
456
<div class="refsect2">
457
<a name="goa-provider-get-provider-icon"></a><h3>goa_provider_get_provider_icon ()</h3>
458
<pre class="programlisting"><span class="returnvalue">GIcon</span> * goa_provider_get_provider_icon (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
459
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>);</pre>
461
Gets an icon for <em class="parameter"><code>provider</code></em> and <em class="parameter"><code>object</code></em> that is suitable for display
462
in an user interface. The returned value may depend on <em class="parameter"><code>object</code></em> -
463
for example, hosted accounts might return a different icon.
466
This is a virtual method with a default implementation that returns
467
a <span class="type">GThemedIcon</span> with fallbacks constructed from the name
468
<code class="literal">goa-account-TYPE</code> where <code class="literal">TYPE</code>
469
is the return value of <a class="link" href="GoaProvider.html#goa-provider-get-provider-type" title="goa_provider_get_provider_type ()"><code class="function">goa_provider_get_provider_type()</code></a>.
471
<div class="variablelist"><table border="0" class="variablelist">
473
<col align="left" valign="top">
478
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
479
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
482
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
483
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for an account.</td>
486
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
487
<td>An icon that should be freed with <code class="function">g_object_unref()</code>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
494
<div class="refsect2">
495
<a name="goa-provider-get-provider-group"></a><h3>goa_provider_get_provider_group ()</h3>
496
<pre class="programlisting"><a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="returnvalue">GoaProviderGroup</span></a> goa_provider_get_provider_group (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
497
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
498
<h3 class="title">Warning</h3>
499
<p><code class="literal">goa_provider_get_provider_group</code> has been deprecated since version 3.10 and should not be used in newly-written code. Use <a class="link" href="GoaProvider.html#goa-provider-get-provider-features" title="goa_provider_get_provider_features ()"><code class="function">goa_provider_get_provider_features()</code></a> instead.</p>
502
Gets the group to which <em class="parameter"><code>provider</code></em> belongs that is suitable for
503
organizing the providers while displaying them in an user
507
This is a pure virtual method - a subclass must provide an
510
<div class="variablelist"><table border="0" class="variablelist">
512
<col align="left" valign="top">
517
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
518
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
521
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
522
<td>A <a class="link" href="GoaProvider.html#GoaProviderGroup" title="enum GoaProviderGroup"><span class="type">GoaProviderGroup</span></a>.</td>
526
<p class="since">Since 3.8</p>
529
<div class="refsect2">
530
<a name="goa-provider-get-provider-features"></a><h3>goa_provider_get_provider_features ()</h3>
531
<pre class="programlisting"><a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="returnvalue">GoaProviderFeatures</span></a> goa_provider_get_provider_features (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
533
Get the features bitmask (eg. <a class="link" href="GoaProvider.html#GOA-PROVIDER-FEATURE-CHAT:CAPS"><code class="literal">GOA_PROVIDER_FEATURE_CHAT</code></a>|<a class="link" href="GoaProvider.html#GOA-PROVIDER-FEATURE-CONTACTS:CAPS"><code class="literal">GOA_PROVIDER_FEATURE_CONTACTS</code></a>)
534
supported by the provider.
536
<div class="variablelist"><table border="0" class="variablelist">
538
<col align="left" valign="top">
543
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
544
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
547
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
548
<td>The <a class="link" href="GoaProvider.html#GoaProviderFeatures" title="enum GoaProviderFeatures"><span class="type">GoaProviderFeatures</span></a> bitmask with the provided features.</td>
552
<p class="since">Since 3.10</p>
555
<div class="refsect2">
556
<a name="goa-provider-build-object"></a><h3>goa_provider_build_object ()</h3>
557
<pre class="programlisting"><span class="returnvalue">gboolean</span> goa_provider_build_object (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
558
<em class="parameter"><code><a class="link" href="GoaObject.html#GoaObjectSkeleton"><span class="type">GoaObjectSkeleton</span></a> *object</code></em>,
559
<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
560
<em class="parameter"><code>const <span class="type">gchar</span> *group</code></em>,
561
<em class="parameter"><code><span class="type">GDBusConnection</span> *connection</code></em>,
562
<em class="parameter"><code><span class="type">gboolean</span> just_added</code></em>,
563
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
565
This method is called when construction account <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a>
566
from configuration data - it basically provides a way to add
567
provider-specific information.
570
The passed in <em class="parameter"><code>object</code></em> will have a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface
571
set. Implementations should validate and use data from <em class="parameter"><code>key_file</code></em> to
572
add more interfaces to <em class="parameter"><code>object</code></em>.
575
Note that this may be called on already exported objects - for
576
example on configuration files reload.
579
This is a pure virtual method - a subclass must provide an
582
<div class="variablelist"><table border="0" class="variablelist">
584
<col align="left" valign="top">
589
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
590
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
593
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
594
<td>The <a class="link" href="GoaObject.html#GoaObjectSkeleton"><span class="type">GoaObjectSkeleton</span></a> that is being built.</td>
597
<td><p><span class="term"><em class="parameter"><code>key_file</code></em> :</span></p></td>
598
<td>The <span class="type">GKeyFile</span> with configuation data.</td>
601
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
602
<td>The group in <em class="parameter"><code>key_file</code></em> to get data from.</td>
605
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
606
<td>The <span class="type">GDBusConnection</span> used by the daemon to connect to the message bus.</td>
609
<td><p><span class="term"><em class="parameter"><code>just_added</code></em> :</span></p></td>
610
<td>Whether the account was newly created or being updated.</td>
613
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
614
<td>Return location for error or <code class="literal">NULL</code>.</td>
617
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
619
<code class="literal">TRUE</code> if data was valid, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> is set.</td>
625
<div class="refsect2">
626
<a name="goa-provider-add-account"></a><h3>goa_provider_add_account ()</h3>
627
<pre class="programlisting"><a class="link" href="GoaObject.html" title="GoaObject"><span class="returnvalue">GoaObject</span></a> * goa_provider_add_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
628
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
629
<em class="parameter"><code><span class="type">GtkDialog</span> *dialog</code></em>,
630
<em class="parameter"><code><span class="type">GtkBox</span> *vbox</code></em>,
631
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
633
This method brings up the user interface necessary to create a new
634
account on <em class="parameter"><code>client</code></em> of the type for <em class="parameter"><code>provider</code></em>, interacts with the
635
user to get all information needed and creates the account.
638
The passed in <em class="parameter"><code>dialog</code></em> widget is guaranteed to be visible with <em class="parameter"><code>vbox</code></em>
639
being empty and the only visible widget in <em class="parameter"><code>dialog</code></em>'s content
640
area. The dialog has exactly one action widget, a cancel button
641
with response id GTK_RESPONSE_CANCEL. Implementations are free to
642
add additional action widgets, as needed.
645
If an account was successfully created, a <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for the
646
created account is returned. If <em class="parameter"><code>dialog</code></em> is dismissed, <code class="literal">NULL</code> is
647
returned and <em class="parameter"><code>error</code></em> is set to <a class="link" href="goa-GoaError.html#GOA-ERROR-DIALOG-DISMISSED:CAPS"><code class="literal">GOA_ERROR_DIALOG_DISMISSED</code></a>. If an
648
account couldn't be created then <em class="parameter"><code>error</code></em> is set. In some cases,
649
for example, when the credentials could not be stored in the
650
keyring, a <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> can be returned even if <em class="parameter"><code>error</code></em> is set.
653
The caller will always show an error dialog if <em class="parameter"><code>error</code></em> is set unless
654
the error is <a class="link" href="goa-GoaError.html#GOA-ERROR-DIALOG-DISMISSED:CAPS"><code class="literal">GOA_ERROR_DIALOG_DISMISSED</code></a>.
657
Implementations should run the default main loop while
658
interacting with the user and may do so using e.g. <code class="function">gtk_dialog_run()</code>
659
on <em class="parameter"><code>dialog</code></em>.
662
This is a pure virtual method - a subclass must provide an
665
<div class="variablelist"><table border="0" class="variablelist">
667
<col align="left" valign="top">
672
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
673
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
676
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
677
<td>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</td>
680
<td><p><span class="term"><em class="parameter"><code>dialog</code></em> :</span></p></td>
681
<td>A <span class="type">GtkDialog</span>.</td>
684
<td><p><span class="term"><em class="parameter"><code>vbox</code></em> :</span></p></td>
685
<td>A vertically oriented <span class="type">GtkBox</span> to put content in.</td>
688
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
689
<td>Return location for error or <code class="literal">NULL</code>.</td>
692
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
693
<td>The <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> for the created account (must be relased
694
with <code class="function">g_object_unref()</code>) or <code class="literal">NULL</code> if <em class="parameter"><code>error</code></em> is set.</td>
700
<div class="refsect2">
701
<a name="goa-provider-set-preseed-data"></a><h3>goa_provider_set_preseed_data ()</h3>
702
<pre class="programlisting"><span class="returnvalue">void</span> goa_provider_set_preseed_data (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
703
<em class="parameter"><code><span class="type">GVariant</span> *preseed_data</code></em>);</pre>
705
Sets the <a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title='The "preseed-data" property'><span class="type">"preseed-data"</span></a> property to feed any information already
706
collected that can be useful when creating a new account.
709
If the <em class="parameter"><code>preseed_data</code></em> <span class="type">GVariant</span> is floating, it is consumed to allow
710
'inline' use of the <code class="function">g_variant_new()</code> family of functions.
712
<div class="variablelist"><table border="0" class="variablelist">
714
<col align="left" valign="top">
719
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
720
<td>The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>
724
<td><p><span class="term"><em class="parameter"><code>preseed_data</code></em> :</span></p></td>
725
<td>A <span class="type">GVariant</span> of type a{sv}</td>
731
<div class="refsect2">
732
<a name="goa-provider-get-preseed-data"></a><h3>goa_provider_get_preseed_data ()</h3>
733
<pre class="programlisting"><span class="returnvalue">GVariant</span> * goa_provider_get_preseed_data (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
735
Gets the <span class="type">GVariant</span> set through the <a class="link" href="GoaProvider.html#GoaProvider--preseed-data" title='The "preseed-data" property'><span class="type">"preseed-data"</span></a> property.
737
<div class="variablelist"><table border="0" class="variablelist">
739
<col align="left" valign="top">
744
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
745
<td>The <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>
749
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
750
<td>A <span class="type">GVariant</span> that is known to be valid until
751
the property is overridden or the provider freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
758
<div class="refsect2">
759
<a name="goa-provider-refresh-account"></a><h3>goa_provider_refresh_account ()</h3>
760
<pre class="programlisting"><span class="returnvalue">gboolean</span> goa_provider_refresh_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
761
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
762
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
763
<em class="parameter"><code><span class="type">GtkWindow</span> *parent</code></em>,
764
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
766
This method brings up the user interface necessary for refreshing
767
the credentials for the account specified by <em class="parameter"><code>object</code></em>. This
768
typically involves having the user log in to the account again.
771
Implementations should use <em class="parameter"><code>parent</code></em> (unless <code class="literal">NULL</code>) as the transient
772
parent of any created windows/dialogs.
775
Implementations should run the default main loop while
776
interacting with the user.
779
This is a pure virtual method - a subclass must provide an
782
<div class="variablelist"><table border="0" class="variablelist">
784
<col align="left" valign="top">
789
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
790
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
793
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
794
<td>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</td>
797
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
798
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</td>
801
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
802
<td>Transient parent of dialogs or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
806
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
807
<td>Return location for error or <code class="literal">NULL</code>.</td>
810
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
812
<code class="literal">TRUE</code> if the account has been refreshed, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em>
819
<div class="refsect2">
820
<a name="goa-provider-show-account"></a><h3>goa_provider_show_account ()</h3>
821
<pre class="programlisting"><span class="returnvalue">void</span> goa_provider_show_account (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
822
<em class="parameter"><code><a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a> *client</code></em>,
823
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
824
<em class="parameter"><code><span class="type">GtkBox</span> *vbox</code></em>,
825
<em class="parameter"><code><span class="type">GtkGrid</span> *grid</code></em>,
826
<em class="parameter"><code><span class="type">GtkGrid</span> *dummy</code></em>);</pre>
828
Method used to add widgets in the control panel for the account
829
represented by <em class="parameter"><code>object</code></em>.
832
This is a pure virtual method - a subclass must provide an
835
<div class="variablelist"><table border="0" class="variablelist">
837
<col align="left" valign="top">
842
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
843
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
846
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
847
<td>A <a class="link" href="GoaClient.html" title="GoaClient"><span class="type">GoaClient</span></a>.</td>
850
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
851
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</td>
854
<td><p><span class="term"><em class="parameter"><code>vbox</code></em> :</span></p></td>
855
<td>A vertically oriented <span class="type">GtkBox</span> to put content in.</td>
858
<td><p><span class="term"><em class="parameter"><code>grid</code></em> :</span></p></td>
859
<td>A <span class="type">GtkGrid</span> to put content in.</td>
862
<td><p><span class="term"><em class="parameter"><code>dummy</code></em> :</span></p></td>
869
<div class="refsect2">
870
<a name="goa-provider-ensure-credentials"></a><h3>goa_provider_ensure_credentials ()</h3>
871
<pre class="programlisting"><span class="returnvalue">void</span> goa_provider_ensure_credentials (<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
872
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
873
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
874
<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
875
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
877
Ensures that credentials for <em class="parameter"><code>object</code></em> are still valid.
880
When the result is ready, <em class="parameter"><code>callback</code></em> will be called in the the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
881
loop</GTKDOCLINK> this function was called from. You can then call
882
<a class="link" href="GoaProvider.html#goa-provider-ensure-credentials-finish" title="goa_provider_ensure_credentials_finish ()"><code class="function">goa_provider_ensure_credentials_finish()</code></a> to get the result
886
This is a virtual method where the default implementation simply
887
throws the <a class="link" href="goa-GoaError.html#GOA-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">GOA_ERROR_NOT_SUPPORTED</code></a> error. A subclass may provide
888
another implementation.
890
<div class="variablelist"><table border="0" class="variablelist">
892
<col align="left" valign="top">
897
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
898
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
901
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
902
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</td>
905
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
906
<td>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
910
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
911
<td>The function to call when the request is satisfied.</td>
914
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
915
<td>Pointer to pass to <em class="parameter"><code>callback</code></em>.</td>
921
<div class="refsect2">
922
<a name="goa-provider-ensure-credentials-finish"></a><h3>goa_provider_ensure_credentials_finish ()</h3>
923
<pre class="programlisting"><span class="returnvalue">gboolean</span> goa_provider_ensure_credentials_finish
924
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
925
<em class="parameter"><code><span class="type">gint</span> *out_expires_in</code></em>,
926
<em class="parameter"><code><span class="type">GAsyncResult</span> *res</code></em>,
927
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
929
Finishes an operation started with <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a>.
931
<div class="variablelist"><table border="0" class="variablelist">
933
<col align="left" valign="top">
938
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
939
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
942
<td><p><span class="term"><em class="parameter"><code>out_expires_in</code></em> :</span></p></td>
943
<td>Return location for how long the expired credentials are good for (0 if unknown) or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
947
<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
948
<td>A <span class="type">GAsyncResult</span> obtained from the <span class="type">GAsyncReadyCallback</span> passed to <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a>.</td>
951
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
952
<td>Return location for error or <code class="literal">NULL</code>.</td>
955
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
957
<code class="literal">TRUE</code> if the credentials for the passed <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> are valid, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> is set.</td>
963
<div class="refsect2">
964
<a name="goa-provider-ensure-credentials-sync"></a><h3>goa_provider_ensure_credentials_sync ()</h3>
965
<pre class="programlisting"><span class="returnvalue">gboolean</span> goa_provider_ensure_credentials_sync
966
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>,
967
<em class="parameter"><code><a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> *object</code></em>,
968
<em class="parameter"><code><span class="type">gint</span> *out_expires_in</code></em>,
969
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
970
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
972
Like <a class="link" href="GoaProvider.html#goa-provider-ensure-credentials" title="goa_provider_ensure_credentials ()"><code class="function">goa_provider_ensure_credentials()</code></a> but blocks the
973
calling thread until an answer is received.
975
<div class="variablelist"><table border="0" class="variablelist">
977
<col align="left" valign="top">
982
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
983
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
986
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
987
<td>A <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> with a <a class="link" href="GoaAccount.html" title="GoaAccount"><span class="type">GoaAccount</span></a> interface.</td>
990
<td><p><span class="term"><em class="parameter"><code>out_expires_in</code></em> :</span></p></td>
991
<td>Return location for how long the expired credentials are good for (0 if unknown) or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
995
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
996
<td>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1000
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1001
<td>Return location for error or <code class="literal">NULL</code>.</td>
1004
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1006
<code class="literal">TRUE</code> if the credentials for the passed <a class="link" href="GoaObject.html" title="GoaObject"><span class="type">GoaObject</span></a> are valid, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> is set.</td>
1012
<div class="refsect2">
1013
<a name="goa-provider-get-credentials-generation"></a><h3>goa_provider_get_credentials_generation ()</h3>
1014
<pre class="programlisting"><span class="returnvalue">guint</span> goa_provider_get_credentials_generation
1015
(<em class="parameter"><code><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> *provider</code></em>);</pre>
1017
Gets the generation of credentials being used for the provider.
1020
Implementations should bump this number when changes are introduced
1021
that may render existing credentials unusable.
1024
For example, if an additional scope is requested (e.g. access to
1025
contacts data) while obtaining credentials, then this number needs
1026
to be bumped since existing credentials are not good for the added
1030
This is a virtual method where the default implementation returns
1033
<div class="variablelist"><table border="0" class="variablelist">
1035
<col align="left" valign="top">
1040
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
1041
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>.</td>
1044
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1045
<td>The current generation of credentials.</td>
1253
<div class="refsect3">
1254
<a name="id-1.5.2.3.9.5.4"></a><h4>Members</h4>
1255
<div class="informaltable"><table width="100%" border="0">
1257
<col width="300px" class="enum_members_name">
1258
<col class="enum_members_description">
1259
<col width="200px" class="enum_members_annotations">
1263
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-BRANDED:CAPS"></a>GOA_PROVIDER_FEATURE_BRANDED</p></td>
1264
<td class="enum_member_description">
1265
<p>Common providers to be highlighted (ie. Google, OwnCloud).</p>
1267
<td class="enum_member_annotations"> </td>
1270
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-MAIL:CAPS"></a>GOA_PROVIDER_FEATURE_MAIL</p></td>
1271
<td class="enum_member_description">
1272
<p>Mail services (ie. SMTP, IMAP).</p>
1274
<td class="enum_member_annotations"> </td>
1277
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-CALENDAR:CAPS"></a>GOA_PROVIDER_FEATURE_CALENDAR</p></td>
1278
<td class="enum_member_description">
1279
<p>Calendaring services (ie. CalDAV).</p>
1281
<td class="enum_member_annotations"> </td>
1284
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-CONTACTS:CAPS"></a>GOA_PROVIDER_FEATURE_CONTACTS</p></td>
1285
<td class="enum_member_description">
1286
<p>Addressbook services (ie. CardDAV).</p>
1288
<td class="enum_member_annotations"> </td>
1291
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-CHAT:CAPS"></a>GOA_PROVIDER_FEATURE_CHAT</p></td>
1292
<td class="enum_member_description">
1293
<p>Instant messaging services (ie. XMPP, IRC).</p>
1295
<td class="enum_member_annotations"> </td>
1298
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-DOCUMENTS:CAPS"></a>GOA_PROVIDER_FEATURE_DOCUMENTS</p></td>
1299
<td class="enum_member_description">
1300
<p>Documents storage services (ie. Google Documents).</p>
1302
<td class="enum_member_annotations"> </td>
1305
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-PHOTOS:CAPS"></a>GOA_PROVIDER_FEATURE_PHOTOS</p></td>
1306
<td class="enum_member_description">
1307
<p>Photos storage services (ie. Flickr).</p>
1309
<td class="enum_member_annotations"> </td>
1312
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-FILES:CAPS"></a>GOA_PROVIDER_FEATURE_FILES</p></td>
1313
<td class="enum_member_description">
1314
<p>Files storage services (ie. WebDAV).</p>
1316
<td class="enum_member_annotations"> </td>
1319
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-TICKETING:CAPS"></a>GOA_PROVIDER_FEATURE_TICKETING</p></td>
1320
<td class="enum_member_description">
1321
<p>Ticketing services (ie. Kerberos).</p>
1323
<td class="enum_member_annotations"> </td>
1326
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-READ-LATER:CAPS"></a>GOA_PROVIDER_FEATURE_READ_LATER</p></td>
1327
<td class="enum_member_description"> </td>
1328
<td class="enum_member_annotations"> </td>
1331
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-PRINTERS:CAPS"></a>GOA_PROVIDER_FEATURE_PRINTERS</p></td>
1332
<td class="enum_member_description">
1333
<p>Network printing services (e.g. Google Cloud Print).</p>
1335
<td class="enum_member_annotations"> </td>
1338
<td class="enum_member_name"><p><a name="GOA-PROVIDER-FEATURE-INVALID:CAPS"></a>GOA_PROVIDER_FEATURE_INVALID</p></td>
1339
<td class="enum_member_description">
1340
<p>Used for error handling. No provider
1341
should provide this feature.</p>
1343
<td class="enum_member_annotations"> </td>
1348
<p class="since">Since 3.10</p>
1051
1351
<div class="refsect2">
1052
1352
<a name="GOA-PROVIDER-EXTENSION-POINT-NAME:CAPS"></a><h3>GOA_PROVIDER_EXTENSION_POINT_NAME</h3>
1053
1353
<pre class="programlisting">#define GOA_PROVIDER_EXTENSION_POINT_NAME "goa-backend-provider"
1056
Extension point for <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> implementations.
1060
<div class="refsect2">
1061
<a name="goa-provider-get-all"></a><h3>goa_provider_get_all ()</h3>
1062
<pre class="programlisting"><span class="returnvalue">void</span> goa_provider_get_all (<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
1063
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
1065
Creates a list of all the available <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> instances.
1068
When the result is ready, <em class="parameter"><code>callback</code></em> will be called in the the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main
1069
loop</GTKDOCLINK> this function was called from. You can then call
1070
<code class="function">goa_provider_get_all_finish()</code> to get the result of the operation.
1073
See <a class="link" href="GoaProvider.html#goa-provider-get-for-provider-type" title="goa_provider_get_for_provider_type ()"><code class="function">goa_provider_get_for_provider_type()</code></a> for details on how the providers
1076
<div class="variablelist"><table border="0" class="variablelist">
1078
<col align="left" valign="top">
1083
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1084
<td>The function to call when the request is satisfied.</td>
1087
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1088
<td>Pointer to pass to <em class="parameter"><code>callback</code></em>.</td>
1094
<div class="refsect2">
1095
<a name="goa-provider-get-for-provider-type"></a><h3>goa_provider_get_for_provider_type ()</h3>
1096
<pre class="programlisting"><a class="link" href="GoaProvider.html" title="GoaProvider"><span class="returnvalue">GoaProvider</span></a> * goa_provider_get_for_provider_type (<em class="parameter"><code>const <span class="type">gchar</span> *provider_type</code></em>);</pre>
1098
Returns a <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> for <em class="parameter"><code>provider_type</code></em> (if available).
1101
If <em class="parameter"><code>provider_type</code></em> doesn't contain any "/", a
1102
<a class="link" href="GoaProvider.html#GOA-PROVIDER-EXTENSION-POINT-NAME:CAPS" title="GOA_PROVIDER_EXTENSION_POINT_NAME"><code class="literal">GOA_PROVIDER_EXTENSION_POINT_NAME</code></a> extension for <em class="parameter"><code>provider_type</code></em> is looked up
1103
and the newly created <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a>, if any, is returned.
1106
If <em class="parameter"><code>provider_type</code></em> contains a "/", a
1107
<code class="literal">GOA_PROVIDER_FACTORY_EXTENSION_POINT_NAME</code> extension for the first part of
1108
<em class="parameter"><code>provider_type</code></em> is looked up. If found, the <span class="type">GoaProviderFactory</span> is used
1109
to create a dynamic <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> matching the second part of <em class="parameter"><code>provider_type</code></em>.
1111
<div class="variablelist"><table border="0" class="variablelist">
1113
<col align="left" valign="top">
1118
<td><p><span class="term"><em class="parameter"><code>provider_type</code></em> :</span></p></td>
1119
<td>A provider type.</td>
1122
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1123
<td>A <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> (that must be freed
1124
with <code class="function">g_object_unref()</code>) or <code class="literal">NULL</code> if not found. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1355
<p>Extension point for <a class="link" href="GoaProvider.html" title="GoaProvider"><span class="type">GoaProvider</span></a> implementations.</p>
1131
1358
<div class="refsect1">
1132
1359
<a name="GoaProvider.property-details"></a><h2>Property Details</h2>
1133
1360
<div class="refsect2">
1134
<a name="GoaProvider--preseed-data"></a><h3>The <code class="literal">"preseed-data"</code> property</h3>
1135
<pre class="programlisting"> "preseed-data" <span class="type">GVariant</span>* : Read / Write</pre>
1137
An <span class="type">GVariant</span> of type a{sv} storing any information already collected that
1361
<a name="GoaProvider--preseed-data"></a><h3>The <code class="literal">“preseed-data”</code> property</h3>
1362
<pre class="programlisting"> “preseed-data” <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *</pre>
1363
<p>An <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type a{sv} storing any information already collected that
1138
1364
can be useful when creating a new account. For instance, this can be useful
1139
1365
to reuse the HTTP cookies from an existing browser session to skip the
1140
1366
prompt for username and password in the OAuth2-based providers by passing
1141
a <span class="type">GVariant</span> with the following contents:
1367
a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> with the following contents:</p>
1145
1368
<div class="informalexample">
1146
1369
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">