telepathy-glib API Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Connection Location interfaceConnection Location interface — client-side wrappers for the Location interface |
#include <telepathy-glib/telepathy-glib-dbus.h> TpProxySignalConnection * tp_cli_connection_interface_location_connect_to_location_updated (TpConnection *proxy
,tp_cli_connection_interface_location_signal_callback_location_updated callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
,GError **error
); void (*tp_cli_connection_interface_location_signal_callback_location_updated) (TpConnection *proxy
,guint arg_Contact
,GHashTable *arg_Location
,gpointer user_data
,GObject *weak_object
); TpProxyPendingCall * tp_cli_connection_interface_location_call_get_locations (TpConnection *proxy
,gint timeout_ms
,const GArray *in_Contacts
,tp_cli_connection_interface_location_callback_for_get_locations callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
); void (*tp_cli_connection_interface_location_callback_for_get_locations) (TpConnection *proxy
,GHashTable *out_Locations
,const GError *error
,gpointer user_data
,GObject *weak_object
); TpProxyPendingCall * tp_cli_connection_interface_location_call_request_location (TpConnection *proxy
,gint timeout_ms
,guint in_Contact
,tp_cli_connection_interface_location_callback_for_request_location callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
); void (*tp_cli_connection_interface_location_callback_for_request_location) (TpConnection *proxy
,GHashTable *out_Location
,const GError *error
,gpointer user_data
,GObject *weak_object
); TpProxyPendingCall * tp_cli_connection_interface_location_call_set_location (TpConnection *proxy
,gint timeout_ms
,GHashTable *in_Location
,tp_cli_connection_interface_location_callback_for_set_location callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
); void (*tp_cli_connection_interface_location_callback_for_set_location) (TpConnection *proxy
,const GError *error
,gpointer user_data
,GObject *weak_object
);
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_location_connect_to_location_updated (TpConnection *proxy
,tp_cli_connection_interface_location_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.
|
A TpConnection or subclass |
|
Callback to be called when the signal is received |
|
User-supplied data for the callback |
|
Destructor for the user-supplied data, which
will be called when this signal is disconnected, or
before this function returns NULL
|
|
A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected |
|
If not NULL , used to raise an error if NULL is
returned |
Returns : |
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_location_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.
|
The proxy on which tp_cli_connection_interface_location_connect_to_location_updated()
was called |
|
The contact (TpContactHandle) |
|
The contact's location, or empty to indicate that nothing is known about the contact's location. |
|
User-supplied data |
|
User-supplied weakly referenced object |
TpProxyPendingCall * tp_cli_connection_interface_location_call_get_locations (TpConnection *proxy
,gint timeout_ms
,const GArray *in_Contacts
,tp_cli_connection_interface_location_callback_for_get_locations callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a GetLocations method call.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Return the current locations of the given contacts, if they are already known. If any of the given contacts' locations are not known, request their current locations, but return immediately without waiting for a reply; if a reply with a non-empty location is later received for those contacts, the <tp:member-ref>LocationUpdated</tp:member-ref> signal will be emitted for them.</p> <tp:rationale> <p>This method is appropriate for "lazy" location finding, for instance displaying the location (if available) of everyone in your contact list.</p> </tp:rationale> <p>For backwards compatibility, if this method is called by a client whose "interest count" for this interface, as defined by <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.AddClientInterest</tp:dbus-ref>, is zero, the Connection SHOULD behave as if AddClientInterest had been called for this interface just before that method call. Clients that do not explicitly call AddClientInterest SHOULD NOT call <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.RemoveClientInterest</tp:dbus-ref> either.</p>
|
the TpProxy |
|
the timeout in milliseconds, or -1 to use the default |
|
Used to pass an 'in' argument: The contacts whose locations should be returned or signalled. |
|
called when the method call succeeds or fails;
may be NULL to make a "fire and forget" call with no
reply tracking |
|
user-supplied data passed to the callback;
must be NULL if callback is NULL
|
|
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be NULL if callback is NULL
|
|
If not NULL , a GObject which will be
weakly referenced; if it is destroyed, this call
will automatically be cancelled. Must be NULL if
callback is NULL
|
Returns : |
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_location_callback_for_get_locations) (TpConnection *proxy
,GHashTable *out_Locations
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a GetLocations method call succeeds or fails.
|
the proxy on which the call was made |
|
Used to return an 'out' argument if error is NULL : The contacts' locations, if already known. Contacts whose locations are not already known are omitted from the mapping; contacts known to have no location information appear in the mapping with an empty Location dictionary. |
|
NULL on success, or an error on failure |
|
user-supplied data |
|
user-supplied object |
TpProxyPendingCall * tp_cli_connection_interface_location_call_request_location (TpConnection *proxy
,gint timeout_ms
,guint in_Contact
,tp_cli_connection_interface_location_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>
|
the TpProxy |
|
the timeout in milliseconds, or -1 to use the default |
|
Used to pass an 'in' argument: The contact whose location should be returned. (TpContactHandle) |
|
called when the method call succeeds or fails;
may be NULL to make a "fire and forget" call with no
reply tracking |
|
user-supplied data passed to the callback;
must be NULL if callback is NULL
|
|
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be NULL if callback is NULL
|
|
If not NULL , a GObject which will be
weakly referenced; if it is destroyed, this call
will automatically be cancelled. Must be NULL if
callback is NULL
|
Returns : |
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_location_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.
|
the proxy on which the call was made |
|
Used to return an 'out' argument if error is NULL : The contact's location. It MAY be empty, indicating that no location information was found. |
|
NULL on success, or an error on failure |
|
user-supplied data |
|
user-supplied object |
TpProxyPendingCall * tp_cli_connection_interface_location_call_set_location (TpConnection *proxy
,gint timeout_ms
,GHashTable *in_Location
,tp_cli_connection_interface_location_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.
|
the TpProxy |
|
the timeout in milliseconds, or -1 to use the default |
|
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. |
|
called when the method call succeeds or fails;
may be NULL to make a "fire and forget" call with no
reply tracking |
|
user-supplied data passed to the callback;
must be NULL if callback is NULL
|
|
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be NULL if callback is NULL
|
|
If not NULL , a GObject which will be
weakly referenced; if it is destroyed, this call
will automatically be cancelled. Must be NULL if
callback is NULL
|
Returns : |
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_location_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.
|
the proxy on which the call was made |
|
NULL on success, or an error on failure |
|
user-supplied data |
|
user-supplied object |