Top |
Connection ClientTypes interfaceConnection ClientTypes interface — client-side wrappers for the ClientTypes interface |
On some protocols it's possible to determine the type of client another user is using, ranging from a simple "phone or not?" indicator to a classification into several types of user interface. Telepathy represents these using the client types defined by XMPP.
This section documents the auto-generated C wrappers for the ClientTypes interface, used with TpConnection objects.
TpProxyPendingCall * tp_cli_connection_interface_client_types_call_get_client_types (TpConnection *proxy
,gint timeout_ms
,const GArray *in_Contacts
,tp_cli_connection_interface_client_types_callback_for_get_client_types callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a GetClientTypes method call.
Return the client types of the given contacts, if they are already known. If any of the given contacts' client types are not known, request their current client types, but return immediately without waiting for a reply; if a reply with a non-empty client type array is later received for those contacts, the <tp:member-ref>ClientTypesUpdated</tp:member-ref> signal will be emitted for them. <tp:rationale> This method is appropriate for "lazy" client type finding, for instance displaying the client types (if available) of everyone in your contact list. </tp:rationale>
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Contacts |
Used to pass an 'in' argument: The contacts whose client types should be returned or signalled. |
|
callback |
called when the method call succeeds or fails;
may be |
|
user_data |
user-supplied data passed to the callback;
must be |
|
destroy |
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be |
|
weak_object |
If not |
a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.
TpProxyPendingCall * tp_cli_connection_interface_client_types_call_request_client_types (TpConnection *proxy
,gint timeout_ms
,guint in_Contact
,tp_cli_connection_interface_client_types_callback_for_request_client_types callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a RequestClientTypes method call.
Return the current client types of the given contact. If necessary, make a request to the server for up-to-date information, and wait for a reply. <tp:rationale> This method is appropriate for use in a "Contact Information..." dialog; it can be used to show progress information (while waiting for the method to return), and can distinguish between various error conditions. </tp:rationale>
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Contact |
Used to pass an 'in' argument: The contact whose client types should be returned. (TpContactHandle) |
|
callback |
called when the method call succeeds or fails;
may be |
|
user_data |
user-supplied data passed to the callback;
must be |
|
destroy |
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be |
|
weak_object |
If not |
a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.
void (*tp_cli_connection_interface_client_types_callback_for_get_client_types) (TpConnection *proxy
,GHashTable *out_Client_Types
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a GetClientTypes method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
out_Client_Types |
Used to return an 'out' argument if |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |
void (*tp_cli_connection_interface_client_types_callback_for_request_client_types) (TpConnection *proxy
,const gchar **out_Client_Types
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a RequestClientTypes method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
out_Client_Types |
Used to return an 'out' argument if |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |
TpProxySignalConnection * tp_cli_connection_interface_client_types_connect_to_client_types_updated (TpConnection *proxy
,tp_cli_connection_interface_client_types_signal_callback_client_types_updated callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
,GError **error
);
Connect a handler to the signal ClientTypesUpdated.
Emitted when a contact's client types change or become known.
proxy |
A TpConnection or subclass |
|
callback |
Callback to be called when the signal is received |
|
user_data |
User-supplied data for the callback |
|
destroy |
Destructor for the user-supplied data, which
will be called when this signal is disconnected, or
before this function returns |
|
weak_object |
A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected |
|
error |
If not |
a TpProxySignalConnection containing all of the
above, which can be used to disconnect the signal; or
NULL
if the proxy does not have the desired interface
or has become invalid.
void (*tp_cli_connection_interface_client_types_signal_callback_client_types_updated) (TpConnection *proxy
,guint arg_Contact
,const gchar **arg_Client_Types
,gpointer user_data
,GObject *weak_object
);
Represents the signature of a callback for the signal ClientTypesUpdated.
proxy |
The proxy on which |
|
arg_Contact |
The contact. (TpContactHandle) |
|
arg_Client_Types |
The contact's client types, or an empty list to indicate that nothing is known about the contact's client types. |
|
user_data |
User-supplied data |
|
weak_object |
User-supplied weakly referenced object |