Connection Renaming interface

Connection Renaming interface — client-side wrappers for the Renaming interface

Functions

Object Hierarchy


Includes

#include <telepathy-glib/telepathy-glib-dbus.h>

Description

In IRC, and perhaps other protocols, users' unique identifiers can change. The Renaming interface models this.

Functions

tp_cli_connection_interface_renaming1_call_request_rename ()

TpProxyPendingCall *
tp_cli_connection_interface_renaming1_call_request_rename
                               (TpConnection *proxy,
                                gint timeout_ms,
                                const gchar *in_Identifier,
                                tp_cli_connection_interface_renaming1_callback_for_request_rename callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a RequestRename method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request that the user's own identifier is changed on the server. If successful, a <tp:member-ref>Renamed</tp:member-ref> signal will be emitted for the current &quot;self handle&quot; as returned by the <tp:dbus-ref namespace="im.telepathy.v1.Connection">SelfHandle</tp:dbus-ref> property.</p> <p>It is protocol-dependent how the identifier that's actually used will be derived from the supplied identifier; some sort of normalization might take place.</p>

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

in_Identifier

Used to pass an 'in' argument: The desired identifier

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

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.


tp_cli_connection_interface_renaming1_callback_for_request_rename ()

void
(*tp_cli_connection_interface_renaming1_callback_for_request_rename)
                               (TpConnection *proxy,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a RequestRename method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_connection_interface_renaming1_connect_to_renamed ()

TpProxySignalConnection *
tp_cli_connection_interface_renaming1_connect_to_renamed
                               (TpConnection *proxy,
                                tp_cli_connection_interface_renaming1_signal_callback_renamed callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object,
                                GError **error);

Connect a handler to the signal Renamed.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Emitted when the unique identifier of a contact on the server changes.</p> <p>Any channels associated with the contact's original handle will continue to be to that handle, and so are no longer useful (unless the contact renames back, or another contact connects with that unique ID). Clients may open a similar channel associated with the new handle to continue communicating with the contact.</p> <p>For example, if a GUI client associates text channels with chat windows, it should detach the old channel from the chat window, closing it, and associate a channel to the new handle with the same window.</p> <p>If the contact's old handle is in any of the member lists of a channel which has the groups interface, it will be removed from the channel and the new handle will be added. The resulting <tp:dbus-ref namespace="im.telepathy.v1.Channel.Interface.Group1">MembersChanged</tp:dbus-ref> signal must be emitted <em>after</em> the <tp:member-ref>Renamed</tp:member-ref> signal; the reason should be RENAMED. </p> <p>The handles may be either general-purpose or channel-specific. If the original handle is general-purpose, the new handle must be general-purpose; if the original handle is channel-specific, the new handle must be channel-specific in the same channel. </p>

Parameters

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 NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

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.


tp_cli_connection_interface_renaming1_signal_callback_renamed ()

void
(*tp_cli_connection_interface_renaming1_signal_callback_renamed)
                               (TpConnection *proxy,
                                guint arg_Original,
                                guint arg_New_Handle,
                                const gchar *arg_New_Identifier,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal Renamed.

Parameters

proxy

The proxy on which tp_cli_connection_interface_renaming1_connect_to_renamed() was called

 

arg_Original

The handle of the original identifier (TpContactHandle)

 

arg_New_Handle

The handle of the new identifier (TpContactHandle)

 

arg_New_Identifier

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The normalized identifier corresponding to New_Handle.</p> <tp:rationale> <p>Providing this immediately means that client libraries can do useful things with this signal (log the change, construct contact objects, etc.) without an additional round-trip to find the corresponding string.</p> </tp:rationale>

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

Types and Values

See Also

TpConnection