Top |
Connection Location interfaceConnection Location interface — client-side wrappers for the Location interface |
Some instant messaging protocols support "rich presence" functionality, such as geolocation (advertising the user's location to authorized contacts, and receiving contacts' locations).
This section documents the auto-generated C wrappers for the Location interface, used with TpConnection objects.
TpProxySignalConnection * tp_cli_connection_interface_location1_connect_to_location_updated (TpConnection *proxy
,tp_cli_connection_interface_location1_signal_callback_location_updated callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
,GError **error
);
Connect a handler to the signal LocationUpdated.
Emitted when a contact's location changes or becomes 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 |
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_location1_signal_callback_location_updated) (TpConnection *proxy
,guint arg_Contact
,GHashTable *arg_Location
,gpointer user_data
,GObject *weak_object
);
Represents the signature of a callback for the signal LocationUpdated.
proxy |
The proxy on which |
|
arg_Contact |
The contact (TpContactHandle) |
|
arg_Location |
The contact's location, or empty to indicate that nothing is known about the contact's location. |
|
user_data |
User-supplied data |
|
weak_object |
User-supplied weakly referenced object |
TpProxyPendingCall * tp_cli_connection_interface_location1_call_request_location (TpConnection *proxy
,gint timeout_ms
,guint in_Contact
,tp_cli_connection_interface_location1_callback_for_request_location callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a RequestLocation method call.
Return the current location 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 location 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_location1_callback_for_request_location) (TpConnection *proxy
,GHashTable *out_Location
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a RequestLocation method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
out_Location |
Used to return an 'out' argument if |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |
TpProxyPendingCall * tp_cli_connection_interface_location1_call_set_location (TpConnection *proxy
,gint timeout_ms
,GHashTable *in_Location
,tp_cli_connection_interface_location1_callback_for_set_location callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a SetLocation method call.
Set the local user's own location.
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Location |
Used to pass an 'in' argument: The location to advertise. If the user wants to obscure their exact location by reducing the precision or accuracy, clients MUST do this themselves, rather than relying on the connection manager to do so. Clients that interact with more than one connection SHOULD advertise the same reduced-accuracy location to all of them, so that contacts cannot obtain an undesirably accurate location by assuming that random errors have been added and averaging the locations advertised on multiple connections. |
|
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_location1_callback_for_set_location) (TpConnection *proxy
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a SetLocation method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |