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

## Synopsis

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

    TpProxyPendingCall * tp_cli_connection_interface_renaming_call_request_rename
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const gchar *in_Identifier,
                                                             tp_cli_connection_interface_renaming_callback_for_request_rename callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_renaming_callback_for_request_rename)
                                                            (TpConnection *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    TpProxySignalConnection * tp_cli_connection_interface_renaming_connect_to_renamed
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_renaming_signal_callback_renamed callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    void                (*tp_cli_connection_interface_renaming_signal_callback_renamed)
                                                            (TpConnection *proxy,
                                                             guint arg_Original,
                                                             guint arg_New,
                                                             gpointer user_data,
                                                             GObject *weak_object);

## Description

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

## Details

### tp_cli_connection_interface_renaming_call_request_rename ()

    TpProxyPendingCall * tp_cli_connection_interface_renaming_call_request_rename
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const gchar *in_Identifier,
                                                             tp_cli_connection_interface_renaming_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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>.</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>

`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_renaming_callback_for_request_rename ()

    void                (*tp_cli_connection_interface_renaming_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.

`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_renaming_connect_to_renamed ()

    TpProxySignalConnection * tp_cli_connection_interface_renaming_connect_to_renamed
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_renaming_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="org.freedesktop.Telepathy.Channel.Interface.Group">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>

`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_renaming_signal_callback_renamed ()

    void                (*tp_cli_connection_interface_renaming_signal_callback_renamed)
                                                            (TpConnection *proxy,
                                                             guint arg_Original,
                                                             guint arg_New,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal Renamed.

`proxy` : | The proxy on which `tp_cli_connection_interface_renaming_connect_to_renamed()` was called
`arg_Original` : | The handle of the original identifier (TpContactHandle)
`arg_New` : | The handle of the new identifier (TpContactHandle)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

## See Also

TpConnection