49
49
#include <telepathy-glib/connection.h>
52
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
53
>gboolean</a> <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-capabilities-run-advertise-capabilities" title="tp_cli_connection_interface_capabilities_run_advertise_capabilities ()">tp_cli_connection_interface_capabilities_run_advertise_capabilities</a>
51
void (<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-get-contact-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities ()">*tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities</a>)
54
52
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
56
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
59
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
60
>GPtrArray</a> *in_Add,
62
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
63
>gchar</a> **in_Remove,
65
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
66
>GPtrArray</a> **out_Self_Capabilities,
54
href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"
55
>GHashTable</a> *out_Contact_Capabilities,
68
57
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
71
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
72
>GMainLoop</a> **loop);
74
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
75
>gboolean</a> <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-capabilities-run-get-capabilities" title="tp_cli_connection_interface_capabilities_run_get_capabilities ()">tp_cli_connection_interface_capabilities_run_get_capabilities</a>
60
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
61
>gpointer</a> user_data,
63
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
64
>GObject</a> *weak_object);
65
<a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall">TpProxyPendingCall</a> * <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-call-get-contact-capabilities" title="tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ()">tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities</a>
76
66
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
78
68
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
79
69
>gint</a> timeout_ms,
81
71
href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"
82
>GArray</a> *in_Handles,
72
>GArray</a> *in_handles,
73
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-get-contact-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities ()">tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities</a> callback,
75
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
76
>gpointer</a> user_data,
78
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
79
>GDestroyNotify</a> destroy,
81
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
82
>GObject</a> *weak_object);
83
void (<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-update-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities ()">*tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities</a>)
84
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
86
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
89
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
90
>gpointer</a> user_data,
92
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
93
>GObject</a> *weak_object);
94
<a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall">TpProxyPendingCall</a> * <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-call-update-capabilities" title="tp_cli_connection_interface_contact_capabilities_call_update_capabilities ()">tp_cli_connection_interface_contact_capabilities_call_update_capabilities</a>
95
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
97
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
84
100
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
85
>GPtrArray</a> **out_Contact_Capabilities,
101
>GPtrArray</a> *in_Handler_Capabilities,
102
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-update-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities ()">tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities</a> callback,
104
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
105
>gpointer</a> user_data,
107
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
108
>GDestroyNotify</a> destroy,
110
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
111
>GObject</a> *weak_object);
112
void (<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-signal-callback-contact-capabilities-changed" title="tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed ()">*tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed</a>)
113
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
115
href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"
116
>GHashTable</a> *arg_caps,
118
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
119
>gpointer</a> user_data,
121
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
122
>GObject</a> *weak_object);
123
<a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection">TpProxySignalConnection</a> * <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-connect-to-contact-capabilities-changed" title="tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed ()">tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed</a>
124
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
125
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-signal-callback-contact-capabilities-changed" title="tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed ()">tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed</a> callback,
127
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
128
>gpointer</a> user_data,
130
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
131
>GDestroyNotify</a> destroy,
133
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
134
>GObject</a> *weak_object,
87
136
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
90
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
91
>GMainLoop</a> **loop);
137
>GError</a> **error);
92
140
<a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall">TpProxyPendingCall</a> * <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-capabilities-call-advertise-capabilities" title="tp_cli_connection_interface_capabilities_call_advertise_capabilities ()">tp_cli_connection_interface_capabilities_call_advertise_capabilities</a>
93
141
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
188
236
<a name="telepathy-glib-connection-caps.description"></a><h2>Description</h2>
190
238
Some instant messaging protocols allow discovery of the capabilities of
191
a user's client. In Telepathy, this is represented by the Capabilities
192
interface, which lets applications advertise extra capabilities for the
193
local user, and query the interfaces supported by their contacts.
239
a user's client. In Telepathy, this is represented by the
240
ContactCapabilities interface, which lets applications advertise extra
241
capabilities for the local user, and query the interfaces supported by
245
The Capabilities interface is an older API with similar functionality.
196
248
This section documents the auto-generated C wrappers for the
197
Capabilities interface, used with <a class="link" href="telepathy-glib-connection.html#TpConnection"><span class="type">TpConnection</span></a> objects.</p>
249
ContactCapabilities and Capabilities interfaces, used with
250
<a class="link" href="telepathy-glib-connection.html#TpConnection"><span class="type">TpConnection</span></a> objects.</p>
201
254
<div class="refsect1" title="Details">
202
255
<a name="telepathy-glib-connection-caps.details"></a><h2>Details</h2>
203
<div class="refsect2" title="tp_cli_connection_interface_capabilities_run_advertise_capabilities ()">
204
<a name="tp-cli-connection-interface-capabilities-run-advertise-capabilities"></a><h3>tp_cli_connection_interface_capabilities_run_advertise_capabilities ()</h3>
205
<pre class="programlisting"><a
206
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
207
>gboolean</a> tp_cli_connection_interface_capabilities_run_advertise_capabilities
256
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities ()">
257
<a name="tp-cli-connection-interface-contact-capabilities-callback-for-get-contact-capabilities"></a><h3>tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities ()</h3>
258
<pre class="programlisting">void (*tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities)
208
259
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
210
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
211
>gint</a> timeout_ms,
213
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
214
>GPtrArray</a> *in_Add,
216
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
217
>gchar</a> **in_Remove,
219
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
220
>GPtrArray</a> **out_Self_Capabilities,
261
href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"
262
>GHashTable</a> *out_Contact_Capabilities,
222
264
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
225
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
226
>GMainLoop</a> **loop);</pre>
228
Call the method AdvertiseCapabilities and run the main loop
229
until it returns. Before calling this method, you must
230
add a reference to any borrowed objects you need to keep,
231
and generally ensure that everything is in a consistent
235
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Used by user interfaces to indicate which channel types they are able to handle on this connection. Because these may be provided by different client processes, this method accepts channel types to add and remove from the set already advertised on this connection. The type of advertised capabilities (create versus invite) is protocol-dependent and hence cannot be set by the this method. In the case of a client adding an already advertised channel type but with new channel type specific flags, the connection manager should simply add the new flags to the set of advertised capabilities.</p> <p>Upon a successful invocation of this method, the <tp:member-ref>CapabilitiesChanged</tp:member-ref> signal will be emitted for the user's own handle ( <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>) by the connection manager to indicate the changes that have been made. This signal should also be monitored to ensure that the set is kept accurate - for example, a client may remove capabilities or type specific capability flags when it exits which are still provided by another client.</p> <p>On connections managed by the <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>, this method SHOULD NOT be used by clients other than the ChannelDispatcher itself.</p></p>
267
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
268
>gpointer</a> user_data,
270
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
271
>GObject</a> *weak_object);</pre>
273
Signature of the callback called when a GetContactCapabilities method call
274
succeeds or fails.</p>
238
277
<div class="variablelist"><table border="0">
242
281
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
243
<td> A <a class="link" href="telepathy-glib-connection.html#TpConnection"><span class="type">TpConnection</span></a> or subclass
247
<td><p><span class="term"><em class="parameter"><code>timeout_ms</code></em> :</span></p></td>
248
<td> Timeout in milliseconds, or -1 for default
252
<td><p><span class="term"><em class="parameter"><code>in_Add</code></em> :</span></p></td>
253
<td> Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structures containing: <ul> <li>a string channel type</li> <li>a bitwise OR of type specific capability flags</li> </ul>
257
<td><p><span class="term"><em class="parameter"><code>in_Remove</code></em> :</span></p></td>
258
<td> Used to pass an 'in' argument: An array of D-Bus interface names of channel types to remove
262
<td><p><span class="term"><em class="parameter"><code>out_Self_Capabilities</code></em> :</span></p></td>
263
<td> Used to return an 'out' argument if <a
264
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
265
><code class="literal">TRUE</code></a> is returned: An array of structures describing the current capabilities containing: <ul> <li>a string channel type</li> <li>a bitwise OR of type specific capability flags</li> </ul>
282
<td> the proxy on which the call was made
286
<td><p><span class="term"><em class="parameter"><code>out_Contact_Capabilities</code></em> :</span></p></td>
287
<td> Used to return an 'out' argument if <em class="parameter"><code>error</code></em> is <a
288
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
289
><code class="literal">NULL</code></a>: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structures containing: <ul> <li>a dictionary mapping the channel properties to their values.</li> <li>an array of additional allowed properties</li> </ul>
269
293
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
271
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
272
><code class="literal">NULL</code></a>, used to return errors if <a
273
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
274
><code class="literal">FALSE</code></a>
279
<td><p><span class="term"><em class="parameter"><code>loop</code></em> :</span></p></td>
281
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
282
><code class="literal">NULL</code></a>, set before re-entering
283
the main loop, to point to a <a
284
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
285
><span class="type">GMainLoop</span></a>
286
which can be used to cancel this call with
288
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-loop-quit"
289
><code class="function">g_main_loop_quit()</code></a>, causing a return of
291
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
292
><code class="literal">FALSE</code></a> with <em class="parameter"><code>error</code></em> set to <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERROR-CANCELLED--CAPS"><code class="literal">TP_DBUS_ERROR_CANCELLED</code></a>
296
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
297
<td> TRUE on success, FALSE and sets <em class="parameter"><code>error</code></em> on error
295
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
296
><code class="literal">NULL</code></a> on success, or an error on failure
300
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
301
<td> user-supplied data
305
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
306
<td> user-supplied object
304
<div class="refsect2" title="tp_cli_connection_interface_capabilities_run_get_capabilities ()">
305
<a name="tp-cli-connection-interface-capabilities-run-get-capabilities"></a><h3>tp_cli_connection_interface_capabilities_run_get_capabilities ()</h3>
306
<pre class="programlisting"><a
307
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
308
>gboolean</a> tp_cli_connection_interface_capabilities_run_get_capabilities
313
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ()">
314
<a name="tp-cli-connection-interface-contact-capabilities-call-get-contact-capabilities"></a><h3>tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ()</h3>
315
<pre class="programlisting"><a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall">TpProxyPendingCall</a> * tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities
309
316
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
311
318
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
312
319
>gint</a> timeout_ms,
314
321
href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"
315
>GArray</a> *in_Handles,
322
>GArray</a> *in_handles,
323
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-get-contact-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities ()">tp_cli_connection_interface_contact_capabilities_callback_for_get_contact_capabilities</a> callback,
325
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
326
>gpointer</a> user_data,
328
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
329
>GDestroyNotify</a> destroy,
331
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
332
>GObject</a> *weak_object);</pre>
334
Start a GetContactCapabilities method call.
337
Returns an array of enhanced capabilities for the given contact handles.</p>
340
<div class="variablelist"><table border="0">
341
<col align="left" valign="top">
344
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
345
<td> the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a>
349
<td><p><span class="term"><em class="parameter"><code>timeout_ms</code></em> :</span></p></td>
350
<td> the timeout in milliseconds, or -1 to use the
355
<td><p><span class="term"><em class="parameter"><code>in_handles</code></em> :</span></p></td>
356
<td> Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>An array of contact handles for this connection.</p> <p>The handle zero MUST NOT be included in the request.</p>
360
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
361
<td> called when the method call succeeds or fails;
363
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
364
><code class="literal">NULL</code></a> to make a "fire and forget" call with no
369
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
370
<td> user-supplied data passed to the callback;
372
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
373
><code class="literal">NULL</code></a> if <em class="parameter"><code>callback</code></em> is <a
374
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
375
><code class="literal">NULL</code></a>
379
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
380
<td> called with the user_data as argument, after the
381
call has succeeded, failed or been cancelled;
383
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
384
><code class="literal">NULL</code></a> if <em class="parameter"><code>callback</code></em> is <a
385
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
386
><code class="literal">NULL</code></a>
390
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
392
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
393
><code class="literal">NULL</code></a>, a <a
394
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
395
><span class="type">GObject</span></a> which will be
396
weakly referenced; if it is destroyed, this call
397
will automatically be cancelled. Must be <a
398
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
399
><code class="literal">NULL</code></a> if
400
<em class="parameter"><code>callback</code></em> is <a
401
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
402
><code class="literal">NULL</code></a>
406
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
407
<td> a <a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> representing the call in
408
progress. It is borrowed from the object, and will become
409
invalid when the callback is called, the call is
410
cancelled or the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> becomes invalid.
417
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities ()">
418
<a name="tp-cli-connection-interface-contact-capabilities-callback-for-update-capabilities"></a><h3>tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities ()</h3>
419
<pre class="programlisting">void (*tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities)
420
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
422
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
425
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
426
>gpointer</a> user_data,
428
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
429
>GObject</a> *weak_object);</pre>
431
Signature of the callback called when a UpdateCapabilities method call
432
succeeds or fails.</p>
435
<div class="variablelist"><table border="0">
436
<col align="left" valign="top">
439
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
440
<td> the proxy on which the call was made
444
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
446
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
447
><code class="literal">NULL</code></a> on success, or an error on failure
451
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
452
<td> user-supplied data
456
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
457
<td> user-supplied object
464
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_call_update_capabilities ()">
465
<a name="tp-cli-connection-interface-contact-capabilities-call-update-capabilities"></a><h3>tp_cli_connection_interface_contact_capabilities_call_update_capabilities ()</h3>
466
<pre class="programlisting"><a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall">TpProxyPendingCall</a> * tp_cli_connection_interface_contact_capabilities_call_update_capabilities
467
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
469
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
470
>gint</a> timeout_ms,
317
472
href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"
318
>GPtrArray</a> **out_Contact_Capabilities,
473
>GPtrArray</a> *in_Handler_Capabilities,
474
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-callback-for-update-capabilities" title="tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities ()">tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilities</a> callback,
476
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
477
>gpointer</a> user_data,
479
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
480
>GDestroyNotify</a> destroy,
482
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
483
>GObject</a> *weak_object);</pre>
485
Start a UpdateCapabilities method call.
488
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Alter the connection's advertised capabilities to include the intersection of the given clients' capabilities with what the connection manager is able to implement.</p> <p>On connections managed by the ChannelDispatcher, processes other than the ChannelDispatcher SHOULD NOT call this method, and the ChannelDispatcher SHOULD use this method to advertise the capabilities of all the registered <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Handler</tp:dbus-ref> implementations.On connections not managed by the ChannelDispatcher, clients MAY use this method directly, to indicate the channels they will handle and the extra capabilities they have.</p> <p>Upon a successful invocation of this method, the connection manager will only emit the <tp:member-ref>ContactCapabilitiesChanged</tp:member-ref> signal for the user's <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">SelfHandle</tp:dbus-ref> if, in the underlying protocol, the new capabilities are distinct from the previous state.</p> <tp:rationale> <p>The connection manager will essentially intersect the provided capabilities and the channel classes it implements. Therefore, certain properties which are never fixed for a channel class (such as the target handle, or the Parameters property of a tube channel) will almost certainly not be advertised.</p> </tp:rationale> <p>This method MAY be called on a newly-created connection while it is still in the DISCONNECTED state, to request that when the connection connects, it will do so with the appropriate capabilities. Doing so MUST NOT fail.</p></p>
491
<div class="variablelist"><table border="0">
492
<col align="left" valign="top">
495
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
496
<td> the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a>
500
<td><p><span class="term"><em class="parameter"><code>timeout_ms</code></em> :</span></p></td>
501
<td> the timeout in milliseconds, or -1 to use the
506
<td><p><span class="term"><em class="parameter"><code>in_Handler_Capabilities</code></em> :</span></p></td>
507
<td> Used to pass an 'in' argument: <p>The capabilities of one or more clients.</p> <p>For each client in the given list, any capabilities previously advertised for the same client name are discarded, then replaced by the capabilities indicated.</p> <p>As a result, if a client becomes unavailable, this method SHOULD be called with a <tp:type>Handler_Capabilities</tp:type> structure containing its name, an empty list of channel classes, and an empty list of capabilities. When this is done, the connection manager SHOULD free all memory associated with that client name.</p> <tp:rationale> <p>This method takes a list of clients so that when the channel dispatcher first calls it (with a list of all the Handlers that are initially available), the changes can be made atomically, with only one transmission of updated capabilities to the network. Afterwards, the channel dispatcher will call this method with a single-element list every time a Handler becomes available or unavailable.</p> </tp:rationale> <p>The connection manager MUST ignore any channel classes and client capabilities for which there is no representation in the protocol or no support in the connection manager.</p>
511
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
512
<td> called when the method call succeeds or fails;
514
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
515
><code class="literal">NULL</code></a> to make a "fire and forget" call with no
520
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
521
<td> user-supplied data passed to the callback;
523
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
524
><code class="literal">NULL</code></a> if <em class="parameter"><code>callback</code></em> is <a
525
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
526
><code class="literal">NULL</code></a>
530
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
531
<td> called with the user_data as argument, after the
532
call has succeeded, failed or been cancelled;
534
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
535
><code class="literal">NULL</code></a> if <em class="parameter"><code>callback</code></em> is <a
536
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
537
><code class="literal">NULL</code></a>
541
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
543
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
544
><code class="literal">NULL</code></a>, a <a
545
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
546
><span class="type">GObject</span></a> which will be
547
weakly referenced; if it is destroyed, this call
548
will automatically be cancelled. Must be <a
549
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
550
><code class="literal">NULL</code></a> if
551
<em class="parameter"><code>callback</code></em> is <a
552
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
553
><code class="literal">NULL</code></a>
557
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
558
<td> a <a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> representing the call in
559
progress. It is borrowed from the object, and will become
560
invalid when the callback is called, the call is
561
cancelled or the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> becomes invalid.
568
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed ()">
569
<a name="tp-cli-connection-interface-contact-capabilities-signal-callback-contact-capabilities-changed"></a><h3>tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed ()</h3>
570
<pre class="programlisting">void (*tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed)
571
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
573
href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"
574
>GHashTable</a> *arg_caps,
576
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
577
>gpointer</a> user_data,
579
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
580
>GObject</a> *weak_object);</pre>
582
Represents the signature of a callback for the signal ContactCapabilitiesChanged.</p>
585
<div class="variablelist"><table border="0">
586
<col align="left" valign="top">
589
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
590
<td> The proxy on which <a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-connect-to-contact-capabilities-changed" title="tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed ()"><code class="function">tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed()</code></a>
595
<td><p><span class="term"><em class="parameter"><code>arg_caps</code></em> :</span></p></td>
596
<td> <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> All the capabilities of the contacts
600
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
601
<td> User-supplied data
605
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
606
<td> User-supplied weakly referenced object
613
<div class="refsect2" title="tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed ()">
614
<a name="tp-cli-connection-interface-contact-capabilities-connect-to-contact-capabilities-changed"></a><h3>tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed ()</h3>
615
<pre class="programlisting"><a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection">TpProxySignalConnection</a> * tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed
616
(<a class="link" href="telepathy-glib-connection.html#TpConnection">TpConnection</a> *proxy,
617
<a class="link" href="telepathy-glib-connection-caps.html#tp-cli-connection-interface-contact-capabilities-signal-callback-contact-capabilities-changed" title="tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed ()">tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed</a> callback,
619
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
620
>gpointer</a> user_data,
622
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
623
>GDestroyNotify</a> destroy,
625
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
626
>GObject</a> *weak_object,
320
628
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
323
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
324
>GMainLoop</a> **loop);</pre>
629
>GError</a> **error);</pre>
326
Call the method GetCapabilities and run the main loop
327
until it returns. Before calling this method, you must
328
add a reference to any borrowed objects you need to keep,
329
and generally ensure that everything is in a consistent
631
Connect a handler to the signal ContactCapabilitiesChanged.
333
Returns an array of capabilities for the given contact handles.</p>
634
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Announce that there has been a change of capabilities on the given handles. A single signal can be emitted for several contacts.</p> <tp:rationale> <p>The underlying protocol can get several contacts' capabilities at the same time.</p> </tp:rationale></p>
336
637
<div class="variablelist"><table border="0">
345
<td><p><span class="term"><em class="parameter"><code>timeout_ms</code></em> :</span></p></td>
346
<td> Timeout in milliseconds, or -1 for default
350
<td><p><span class="term"><em class="parameter"><code>in_Handles</code></em> :</span></p></td>
351
<td> Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>An array of contact handles for this connection.</p> <p>This may include zero, which originally meant a query for capabilities available on the connection itself. This usage is deprecated; clients SHOULD NOT do this, and connection managers SHOULD proceed as though zero had not been present in this list.</p>
355
<td><p><span class="term"><em class="parameter"><code>out_Contact_Capabilities</code></em> :</span></p></td>
356
<td> Used to return an 'out' argument if <a
357
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
358
><code class="literal">TRUE</code></a> is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structures containing: <ul> <li>an integer handle representing the contact</li> <li>a string channel type</li> <li>a bitwise OR of generic capability flags for the type</li> <li>a bitwise OR of type specific capability flags for the type</li> </ul>
646
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
647
<td> Callback to be called when the signal is
652
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
653
<td> User-supplied data for the callback
657
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
658
<td> Destructor for the user-supplied data, which
659
will be called when this signal is disconnected, or
660
before this function returns <a
661
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
662
><code class="literal">NULL</code></a>
666
<td><p><span class="term"><em class="parameter"><code>weak_object</code></em> :</span></p></td>
668
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
669
><span class="type">GObject</span></a> which will be weakly referenced;
670
if it is destroyed, this callback will automatically be
362
675
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
364
677
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
365
><code class="literal">NULL</code></a>, used to return errors if <a
366
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
367
><code class="literal">FALSE</code></a>
372
<td><p><span class="term"><em class="parameter"><code>loop</code></em> :</span></p></td>
678
><code class="literal">NULL</code></a>, used to raise an error if <a
374
679
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
375
><code class="literal">NULL</code></a>, set before re-entering
376
the main loop, to point to a <a
377
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainLoop"
378
><span class="type">GMainLoop</span></a>
379
which can be used to cancel this call with
381
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-loop-quit"
382
><code class="function">g_main_loop_quit()</code></a>, causing a return of
384
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
385
><code class="literal">FALSE</code></a> with <em class="parameter"><code>error</code></em> set to <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERROR-CANCELLED--CAPS"><code class="literal">TP_DBUS_ERROR_CANCELLED</code></a>
680
><code class="literal">NULL</code></a> is
389
685
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
390
<td> TRUE on success, FALSE and sets <em class="parameter"><code>error</code></em> on error
686
<td> a <a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection"><span class="type">TpProxySignalConnection</span></a> containing all of the
687
above, which can be used to disconnect the signal; or
689
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
690
><code class="literal">NULL</code></a> if the proxy does not have the desired interface
691
or has become invalid.