## Text channels Text channels — client-side wrappers for the Text channel type, and the Chat State and Password interfaces |

## Functions

gboolean | tp_cli_channel_type_text_run_acknowledge_pending_messages ()
gboolean | tp_cli_channel_type_text_run_get_message_types ()
gboolean | tp_cli_channel_type_text_run_list_pending_messages ()
gboolean | tp_cli_channel_type_text_run_send ()
TpProxyPendingCall * | tp_cli_channel_type_text_call_acknowledge_pending_messages ()
TpProxyPendingCall * | tp_cli_channel_type_text_call_get_message_types ()
TpProxyPendingCall * | tp_cli_channel_type_text_call_list_pending_messages ()
TpProxyPendingCall * | tp_cli_channel_type_text_call_send ()
void | (*tp_cli_channel_type_text_callback_for_acknowledge_pending_messages) ()
void | (*tp_cli_channel_type_text_callback_for_get_message_types) ()
void | (*tp_cli_channel_type_text_callback_for_list_pending_messages) ()
void | (*tp_cli_channel_type_text_callback_for_send) ()
TpProxySignalConnection * | tp_cli_channel_type_text_connect_to_lost_message ()
TpProxySignalConnection * | tp_cli_channel_type_text_connect_to_received ()
TpProxySignalConnection * | tp_cli_channel_type_text_connect_to_send_error ()
TpProxySignalConnection * | tp_cli_channel_type_text_connect_to_sent ()
void | (*tp_cli_channel_type_text_signal_callback_lost_message) ()
void | (*tp_cli_channel_type_text_signal_callback_received) ()
void | (*tp_cli_channel_type_text_signal_callback_send_error) ()
void | (*tp_cli_channel_type_text_signal_callback_sent) ()
void | (*tp_cli_channel_interface_messages_callback_for_get_pending_message_content) ()
TpProxyPendingCall * | tp_cli_channel_interface_messages_call_get_pending_message_content ()
gboolean | tp_cli_channel_interface_messages_run_get_pending_message_content ()
void | (*tp_cli_channel_interface_messages_callback_for_send_message) ()
TpProxyPendingCall * | tp_cli_channel_interface_messages_call_send_message ()
gboolean | tp_cli_channel_interface_messages_run_send_message ()
void | (*tp_cli_channel_interface_messages_signal_callback_message_received) ()
TpProxySignalConnection * | tp_cli_channel_interface_messages_connect_to_message_received ()
void | (*tp_cli_channel_interface_messages_signal_callback_message_sent) ()
TpProxySignalConnection * | tp_cli_channel_interface_messages_connect_to_message_sent ()
void | (*tp_cli_channel_interface_messages_signal_callback_pending_messages_removed) ()
TpProxySignalConnection * | tp_cli_channel_interface_messages_connect_to_pending_messages_removed ()
gboolean | tp_cli_channel_interface_chat_state_run_set_chat_state ()
TpProxyPendingCall * | tp_cli_channel_interface_chat_state_call_set_chat_state ()
void | (*tp_cli_channel_interface_chat_state_callback_for_set_chat_state) ()
TpProxySignalConnection * | tp_cli_channel_interface_chat_state_connect_to_chat_state_changed ()
void | (*tp_cli_channel_interface_chat_state_signal_callback_chat_state_changed) ()
gboolean | tp_cli_channel_interface_password_run_get_password_flags ()
gboolean | tp_cli_channel_interface_password_run_provide_password ()
TpProxyPendingCall * | tp_cli_channel_interface_password_call_get_password_flags ()
TpProxyPendingCall * | tp_cli_channel_interface_password_call_provide_password ()
void | (*tp_cli_channel_interface_password_callback_for_get_password_flags) ()
void | (*tp_cli_channel_interface_password_callback_for_provide_password) ()
TpProxySignalConnection * | tp_cli_channel_interface_password_connect_to_password_flags_changed ()
void | (*tp_cli_channel_interface_password_signal_callback_password_flags_changed) ()
TpProxySignalConnection * | tp_cli_channel_interface_sms_connect_to_sms_channel_changed ()
void | (*tp_cli_channel_interface_sms_signal_callback_sms_channel_changed) ()
TpProxyPendingCall * | tp_cli_channel_interface_sms_call_get_sms_length ()
void | (*tp_cli_channel_interface_sms_callback_for_get_sms_length) ()
gboolean | tp_cli_channel_interface_sms_run_get_sms_length ()

## Includes

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

## Description

A major use for instant messaging is obviously to send messages. Channels of type Text represent IM conversations or chat rooms.

This section documents the auto-generated C wrappers for the Text channel type, and also for the Chat State and Password interfaces, which are usually used in conjunction with Text channels.

## Functions

### tp_cli_channel_type_text_run_acknowledge_pending_messages ()

    gboolean
    tp_cli_channel_type_text_run_acknowledge_pending_messages
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GArray *in_IDs,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_type_text_run_acknowledge_pending_messages` is deprecated and should not be used in newly-written code.

Call the method AcknowledgePendingMessages and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Inform the channel that you have handled messages by displaying them to the user (or equivalent), so they can be removed from the pending queue.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_IDs | Used to pass an 'in' argument: The IDs of the messages to acknowledge |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_text_run_get_message_types ()

    gboolean
    tp_cli_channel_type_text_run_get_message_types
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    GArray **out_Available_Types,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_type_text_run_get_message_types` is deprecated and should not be used in newly-written code.

Consulting MessageTypes is preferred.

Call the method GetMessageTypes and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Return an array indicating which types of message may be sent on this channel.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
out_Available_Types | Used to return an 'out' argument if `TRUE` is returned: An array of integer message types (ChannelTextMessageType) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_text_run_list_pending_messages ()

    gboolean
    tp_cli_channel_type_text_run_list_pending_messages
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    gboolean in_Clear,
                                    GPtrArray **out_Pending_Messages,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_type_text_run_list_pending_messages` is deprecated and should not be used in newly-written code.

Consulting PendingMessages is preferred.

Call the method ListPendingMessages and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

List the messages currently in the pending queue, and optionally remove then all.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Clear | Used to pass an 'in' argument: If true, behave as if <tp:member-ref>AcknowledgePendingMessages</tp:member-ref> had also been called. |
out_Pending_Messages | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs representing the pending queue. Each contains: <ul> <li>a numeric identifier</li> <li>a Unix timestamp indicating when the message was received</li> <li>the contact handle for the contact who sent the message</li> <li>the message type, taken from ChannelTextMessageType</li> <li>the bitwise-OR of the message flags from ChannelTextMessageFlags</li> <li>the text of the message</li> </ul> |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_text_run_send ()

    gboolean
    tp_cli_channel_type_text_run_send (TpChannel *proxy,
                                       gint timeout_ms,
                                       guint in_Type,
                                       const gchar *in_Text,
                                       GError **error,
                                       GMainLoop **loop);

`tp_cli_channel_type_text_run_send` is deprecated and should not be used in newly-written code.

The SendMessage method is more flexible.

Call the method Send and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request that a message be sent on this channel. When the message has been submitted for delivery, this method will return and the <tp:member-ref>Sent</tp:member-ref> signal will be emitted. If the message cannot be submitted for delivery, the method returns an error and no signal is emitted.</p> <p>This method SHOULD return before the Sent signal is emitted.</p> <tp:rationale> <p>When a Text channel implements the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref> interface, that &quot;SHOULD&quot; becomes a &quot;MUST&quot;.</p> </tp:rationale>

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Type | Used to pass an 'in' argument: An integer indicating the type of the message (TpChannelTextMessageType) |
in_Text | Used to pass an 'in' argument: The message to send |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_text_call_acknowledge_pending_messages ()

    TpProxyPendingCall *
    tp_cli_channel_type_text_call_acknowledge_pending_messages
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GArray *in_IDs,
                                    tp_cli_channel_type_text_callback_for_acknowledge_pending_messages callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a AcknowledgePendingMessages method call.

Inform the channel that you have handled messages by displaying them to the user (or equivalent), so they can be removed from the pending queue.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_IDs | Used to pass an 'in' argument: The IDs of the messages to acknowledge |
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_channel_type_text_call_get_message_types ()

    TpProxyPendingCall *
    tp_cli_channel_type_text_call_get_message_types
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    tp_cli_channel_type_text_callback_for_get_message_types callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

`tp_cli_channel_type_text_call_get_message_types` is deprecated and should not be used in newly-written code.

Consulting MessageTypes is preferred.

Start a GetMessageTypes method call.

Return an array indicating which types of message may be sent on this channel.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
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_channel_type_text_call_list_pending_messages ()

    TpProxyPendingCall *
    tp_cli_channel_type_text_call_list_pending_messages
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    gboolean in_Clear,
                                    tp_cli_channel_type_text_callback_for_list_pending_messages callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

`tp_cli_channel_type_text_call_list_pending_messages` is deprecated and should not be used in newly-written code.

Consulting PendingMessages is preferred.

Start a ListPendingMessages method call.

List the messages currently in the pending queue, and optionally remove then all.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Clear | Used to pass an 'in' argument: If true, behave as if <tp:member-ref>AcknowledgePendingMessages</tp:member-ref> had also been called. |
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_channel_type_text_call_send ()

    TpProxyPendingCall *
    tp_cli_channel_type_text_call_send (TpChannel *proxy,
                                        gint timeout_ms,
                                        guint in_Type,
                                        const gchar *in_Text,
                                        tp_cli_channel_type_text_callback_for_send callback,
                                        gpointer user_data,
                                        GDestroyNotify destroy,
                                        GObject *weak_object);

`tp_cli_channel_type_text_call_send` is deprecated and should not be used in newly-written code.

The SendMessage method is more flexible.

Start a Send method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request that a message be sent on this channel. When the message has been submitted for delivery, this method will return and the <tp:member-ref>Sent</tp:member-ref> signal will be emitted. If the message cannot be submitted for delivery, the method returns an error and no signal is emitted.</p> <p>This method SHOULD return before the Sent signal is emitted.</p> <tp:rationale> <p>When a Text channel implements the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref> interface, that &quot;SHOULD&quot; becomes a &quot;MUST&quot;.</p> </tp:rationale>

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Type | Used to pass an 'in' argument: An integer indicating the type of the message (TpChannelTextMessageType) |
in_Text | Used to pass an 'in' argument: The message to send |
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_channel_type_text_callback_for_acknowledge_pending_messages ()

    void
    (*tp_cli_channel_type_text_callback_for_acknowledge_pending_messages)
                                   (TpChannel *proxy,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a AcknowledgePendingMessages 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_channel_type_text_callback_for_get_message_types ()

    void
    (*tp_cli_channel_type_text_callback_for_get_message_types)
                                   (TpChannel *proxy,
                                    const GArray *out_Available_Types,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

`tp_cli_channel_type_text_callback_for_get_message_types` is deprecated and should not be used in newly-written code.

Consulting MessageTypes is preferred.

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

#### Parameters

proxy | the proxy on which the call was made |
out_Available_Types | Used to return an 'out' argument if `error` is `NULL`: An array of integer message types (ChannelTextMessageType) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_type_text_callback_for_list_pending_messages ()

    void
    (*tp_cli_channel_type_text_callback_for_list_pending_messages)
                                   (TpChannel *proxy,
                                    const GPtrArray *out_Pending_Messages,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

`tp_cli_channel_type_text_callback_for_list_pending_messages` is deprecated and should not be used in newly-written code.

Consulting PendingMessages is preferred.

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

#### Parameters

proxy | the proxy on which the call was made |
out_Pending_Messages | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs representing the pending queue. Each contains: <ul> <li>a numeric identifier</li> <li>a Unix timestamp indicating when the message was received</li> <li>the contact handle for the contact who sent the message</li> <li>the message type, taken from ChannelTextMessageType</li> <li>the bitwise-OR of the message flags from ChannelTextMessageFlags</li> <li>the text of the message</li> </ul> |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_type_text_callback_for_send ()

    void
    (*tp_cli_channel_type_text_callback_for_send)
                                   (TpChannel *proxy,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

`tp_cli_channel_type_text_callback_for_send` is deprecated and should not be used in newly-written code.

The SendMessage method is more flexible.

Signature of the callback called when a Send 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_channel_type_text_connect_to_lost_message ()

    TpProxySignalConnection *
    tp_cli_channel_type_text_connect_to_lost_message
                                   (TpChannel *proxy,
                                    tp_cli_channel_type_text_signal_callback_lost_message callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal LostMessage.

This signal is emitted to indicate that an incoming message was not able to be stored and forwarded by the connection manager due to lack of memory.

#### Parameters

proxy | A TpChannel 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_channel_type_text_connect_to_received ()

    TpProxySignalConnection *
    tp_cli_channel_type_text_connect_to_received
                                   (TpChannel *proxy,
                                    tp_cli_channel_type_text_signal_callback_received callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal Received.

Signals that a message with the given id, timestamp, sender, type and text has been received on this channel. Applications that catch this signal and reliably inform the user of the message should acknowledge that they have dealt with the message with the <tp:member-ref>AcknowledgePendingMessages</tp:member-ref> method.

#### Parameters

proxy | A TpChannel 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_channel_type_text_connect_to_send_error ()

    TpProxySignalConnection *
    tp_cli_channel_type_text_connect_to_send_error
                                   (TpChannel *proxy,
                                    tp_cli_channel_type_text_signal_callback_send_error callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal SendError.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Signals that an outgoing message has failed to send. The error will be one of the values from ChannelTextSendError.</p> <p>This signal should only be emitted for messages for which <tp:member-ref>Sent</tp:member-ref> has already been emitted and <tp:member-ref>Send</tp:member-ref> has already returned success.</p>

#### Parameters

proxy | A TpChannel 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_channel_type_text_connect_to_sent ()

    TpProxySignalConnection *
    tp_cli_channel_type_text_connect_to_sent
                                   (TpChannel *proxy,
                                    tp_cli_channel_type_text_signal_callback_sent callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal Sent.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Signals that a message has been submitted for sending.</p>

#### Parameters

proxy | A TpChannel 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_channel_type_text_signal_callback_lost_message ()

    void
    (*tp_cli_channel_type_text_signal_callback_lost_message)
                                   (TpChannel *proxy,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal LostMessage.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_text_connect_to_lost_message()` was called |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_text_signal_callback_received ()

    void
    (*tp_cli_channel_type_text_signal_callback_received)
                                   (TpChannel *proxy,
                                    guint arg_ID,
                                    guint arg_Timestamp,
                                    guint arg_Sender,
                                    guint arg_Type,
                                    guint arg_Flags,
                                    const gchar *arg_Text,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal Received.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_text_connect_to_received()` was called |
arg_ID | A numeric identifier for acknowledging the message |
arg_Timestamp | A Unix timestamp indicating when the message was received (TpUnixTimestamp) |
arg_Sender | The handle of the contact who sent the message (TpContactHandle) |
arg_Type | The type of the message (normal, action, notice, etc.) (TpChannelTextMessageType) |
arg_Flags | A bitwise OR of the message flags (TpChannelTextMessageFlags) |
arg_Text | The text of the message |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_text_signal_callback_send_error ()

    void
    (*tp_cli_channel_type_text_signal_callback_send_error)
                                   (TpChannel *proxy,
                                    guint arg_Error,
                                    guint arg_Timestamp,
                                    guint arg_Type,
                                    const gchar *arg_Text,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal SendError.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_text_connect_to_send_error()` was called |
arg_Error | The error that occurred (TpChannelTextSendError) |
arg_Timestamp | The Unix timestamp indicating when the message was sent (TpUnixTimestamp) |
arg_Type | The message type (TpChannelTextMessageType) |
arg_Text | The text of the message |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_text_signal_callback_sent ()

    void
    (*tp_cli_channel_type_text_signal_callback_sent)
                                   (TpChannel *proxy,
                                    guint arg_Timestamp,
                                    guint arg_Type,
                                    const gchar *arg_Text,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal Sent.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_text_connect_to_sent()` was called |
arg_Timestamp | Unix timestamp indicating when the message was sent (TpUnixTimestamp) |
arg_Type | The message type (normal, action, notice, etc) from ChannelTextMessageType (TpChannelTextMessageType) |
arg_Text | The text of the message. If the message was, or will be, altered during transmission, this argument SHOULD reflect what other contacts will receive rather than being a copy of the argument to <tp:member-ref>Send</tp:member-ref>. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_messages_callback_for_get_pending_message_content ()

    void
    (*tp_cli_channel_interface_messages_callback_for_get_pending_message_content)
                                   (TpChannel *proxy,
                                    GHashTable *out_Content,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

`tp_cli_channel_interface_messages_callback_for_get_pending_message_content` is deprecated and should not be used in newly-written code.

This method has never been implemented, and in any case would have been impossible to use correctly when multiple clients (such as a logger and the handler) are interested in a text channel. See freedesktop.org bug 26417 for more details.

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

#### Parameters

proxy | the proxy on which the call was made |
out_Content | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The content of the requested parts. The keys in this mapping are positions in the array of message parts; the values are either of type 's' or 'ay' (UTF-8 text string, or byte array), following the same rules as for the value of the 'content' key in the <tp:type>Message_Part</tp:type> mappings.</p> <p>If the one of the requested part numbers was greater than zero but referred to a part that had no content (i.e. it had no 'content-type' key or no 'content' key), it is simply omitted from this mapping; this is not considered to be an error condition.</p> |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_interface_messages_call_get_pending_message_content ()

    TpProxyPendingCall *
    tp_cli_channel_interface_messages_call_get_pending_message_content
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_Message_ID,
                                    const GArray *in_Parts,
                                    tp_cli_channel_interface_messages_callback_for_get_pending_message_content callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

`tp_cli_channel_interface_messages_call_get_pending_message_content` is deprecated and should not be used in newly-written code.

This method has never been implemented, and in any case would have been impossible to use correctly when multiple clients (such as a logger and the handler) are interested in a text channel. See freedesktop.org bug 26417 for more details.

Start a GetPendingMessageContent method call.

Retrieve the content of one or more parts of a pending message. Note that this function may take a considerable amount of time to return if the part's 'needs-retrieval' flag is true; consider extending the default D-Bus method call timeout. Additional API is likely to be added in future, to stream large message parts.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Message_ID | Used to pass an 'in' argument: The ID of a pending message (TpMessageID) |
in_Parts | Used to pass an 'in' argument: The desired entries in the array of message parts, identified by their position. The &quot;headers&quot; part (which is not a valid argument to this method) is considered to be part 0, so the valid part numbers start at 1 (for the second Message_Part). |
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_channel_interface_messages_run_get_pending_message_content ()

    gboolean
    tp_cli_channel_interface_messages_run_get_pending_message_content
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_Message_ID,
                                    const GArray *in_Parts,
                                    GHashTable **out_Content,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_messages_run_get_pending_message_content` is deprecated and should not be used in newly-written code.

This method has never been implemented, and in any case would have been impossible to use correctly when multiple clients (such as a logger and the handler) are interested in a text channel. See freedesktop.org bug 26417 for more details.

Call the method GetPendingMessageContent and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Retrieve the content of one or more parts of a pending message. Note that this function may take a considerable amount of time to return if the part's 'needs-retrieval' flag is true; consider extending the default D-Bus method call timeout. Additional API is likely to be added in future, to stream large message parts.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Message_ID | Used to pass an 'in' argument: The ID of a pending message (TpMessageID) |
in_Parts | Used to pass an 'in' argument: The desired entries in the array of message parts, identified by their position. The &quot;headers&quot; part (which is not a valid argument to this method) is considered to be part 0, so the valid part numbers start at 1 (for the second Message_Part). |
out_Content | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The content of the requested parts. The keys in this mapping are positions in the array of message parts; the values are either of type 's' or 'ay' (UTF-8 text string, or byte array), following the same rules as for the value of the 'content' key in the <tp:type>Message_Part</tp:type> mappings.</p> <p>If the one of the requested part numbers was greater than zero but referred to a part that had no content (i.e. it had no 'content-type' key or no 'content' key), it is simply omitted from this mapping; this is not considered to be an error condition.</p> |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_messages_callback_for_send_message ()

    void
    (*tp_cli_channel_interface_messages_callback_for_send_message)
                                   (TpChannel *proxy,
                                    const gchar *out_Token,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

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

#### Parameters

proxy | the proxy on which the call was made |
out_Token | Used to return an 'out' argument if `error` is `NULL`: An opaque token used to match any incoming delivery or failure reports against this message, or an empty string if the message is not readily identifiable. |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_interface_messages_call_send_message ()

    TpProxyPendingCall *
    tp_cli_channel_interface_messages_call_send_message
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GPtrArray *in_Message,
                                    guint in_Flags,
                                    tp_cli_channel_interface_messages_callback_for_send_message callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a SendMessage method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Submit a message to the server for sending. If this method returns successfully, the message has been submitted to the server and the <tp:member-ref>MessageSent</tp:member-ref> signal is emitted. A corresponding <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref> signal on the Text interface MUST also be emitted.</p> <p>This method MUST return before the MessageSent signal is emitted.</p> <tp:rationale> <p>This means that the process sending the message is the first to see the <tp:type>Protocol_Message_Token</tp:type>, and can relate the message to the corresponding <tp:member-ref>MessageSent</tp:member-ref> signal by comparing message tokens (if supported by the protocol).</p> </tp:rationale> <p>If this method fails, message submission to the server has failed and no signal on this interface (or the Text interface) is emitted.</p> <p>If this method succeeds, message submission to the server has succeeded, but the message has not necessarily reached its intended recipient. If a delivery failure is detected later, this is signalled by receiving a message whose <code>message-type</code> header maps to <tp:value-ref type="Channel_Text_Message_Type">Delivery_Report</tp:value-ref>. Similarly, if delivery is detected to have been successful (which is not possible in all protocols), a successful delivery report will be signalled.</p>

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Message | Used to pass an 'in' argument: The message content, including any attachments or alternatives. This MUST NOT include the following headers, or any others that do not make sense for a client to specify: <code>message-sender</code>, <code>message-sender-id</code>, <code>message-sent</code>, <code>message-received</code>, <code>pending-message-id</code>. |
in_Flags | Used to pass an 'in' argument: Flags affecting how the message is sent. The channel MAY ignore some or all flags, depending on <tp:member-ref>DeliveryReportingSupport</tp:member-ref>; the flags that were handled by the CM are provided in <tp:member-ref>MessageSent</tp:member-ref>. (TpMessageSendingFlags) |
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_channel_interface_messages_run_send_message ()

    gboolean
    tp_cli_channel_interface_messages_run_send_message
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GPtrArray *in_Message,
                                    guint in_Flags,
                                    gchar **out_Token,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_messages_run_send_message` is deprecated and should not be used in newly-written code.

Call the method SendMessage and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Submit a message to the server for sending. If this method returns successfully, the message has been submitted to the server and the <tp:member-ref>MessageSent</tp:member-ref> signal is emitted. A corresponding <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref> signal on the Text interface MUST also be emitted.</p> <p>This method MUST return before the MessageSent signal is emitted.</p> <tp:rationale> <p>This means that the process sending the message is the first to see the <tp:type>Protocol_Message_Token</tp:type>, and can relate the message to the corresponding <tp:member-ref>MessageSent</tp:member-ref> signal by comparing message tokens (if supported by the protocol).</p> </tp:rationale> <p>If this method fails, message submission to the server has failed and no signal on this interface (or the Text interface) is emitted.</p> <p>If this method succeeds, message submission to the server has succeeded, but the message has not necessarily reached its intended recipient. If a delivery failure is detected later, this is signalled by receiving a message whose <code>message-type</code> header maps to <tp:value-ref type="Channel_Text_Message_Type">Delivery_Report</tp:value-ref>. Similarly, if delivery is detected to have been successful (which is not possible in all protocols), a successful delivery report will be signalled.</p>

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Message | Used to pass an 'in' argument: The message content, including any attachments or alternatives. This MUST NOT include the following headers, or any others that do not make sense for a client to specify: <code>message-sender</code>, <code>message-sender-id</code>, <code>message-sent</code>, <code>message-received</code>, <code>pending-message-id</code>. |
in_Flags | Used to pass an 'in' argument: Flags affecting how the message is sent. The channel MAY ignore some or all flags, depending on <tp:member-ref>DeliveryReportingSupport</tp:member-ref>; the flags that were handled by the CM are provided in <tp:member-ref>MessageSent</tp:member-ref>. (TpMessageSendingFlags) |
out_Token | Used to return an 'out' argument if `TRUE` is returned: An opaque token used to match any incoming delivery or failure reports against this message, or an empty string if the message is not readily identifiable. |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_messages_signal_callback_message_received ()

    void
    (*tp_cli_channel_interface_messages_signal_callback_message_received)
                                   (TpChannel *proxy,
                                    const GPtrArray *arg_Message,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal MessageReceived.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_messages_connect_to_message_received()` was called |
arg_Message | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The message content, including any attachments or alternatives. If the incoming message contains formatted text without a plain text alternative, the connection manager MUST generate a <tt>text/plain</tt> alternative from the formatted text, and include it in this message (both here, and in the <tp:member-ref>PendingMessages</tp:member-ref> property).</p> |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_messages_connect_to_message_received ()

    TpProxySignalConnection *
    tp_cli_channel_interface_messages_connect_to_message_received
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_messages_signal_callback_message_received callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal MessageReceived.

Signals that a message has been received and added to the pending messages queue. This MUST be emitted exactly once per emission of the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Received</tp:dbus-ref> signal on the Text interface, for backwards-compatibility; clients SHOULD ignore the latter in favour of this signal if this interface is present, as mentioned in the introduction.

#### Parameters

proxy | A TpChannel 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_channel_interface_messages_signal_callback_message_sent ()

    void
    (*tp_cli_channel_interface_messages_signal_callback_message_sent)
                                   (TpChannel *proxy,
                                    const GPtrArray *arg_Content,
                                    guint arg_Flags,
                                    const gchar *arg_Message_Token,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal MessageSent.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_messages_connect_to_message_sent()` was called |
arg_Content | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The message content (see <tp:type>Message_Part</tp:type> for full details). If the message that was passed to <tp:member-ref>SendMessage</tp:member-ref> has a formatted text part that the connection manager recognises, but no <tt>text/plain</tt> alternative, the CM MUST use the formatted text part to generate a <tt>text/plain</tt> alternative which is also included in this signal argument.</p> <p>The connection manager SHOULD include the <code>message-sender</code>, <code>message-sender-id</code> and <code>message-sent</code> headers in the representation of the message that is signalled here. If the channel has channel-specific handles, the <code>message-sender</code> and <code>message-sender-id</code> SHOULD reflect the sender that other contacts will see.</p> <p>If the connection manager can predict that the message will be altered during transmission, this argument SHOULD reflect what other contacts will receive, rather than being a copy of the argument to SendMessage (if the message is truncated, formatting or alternatives are dropped, etc., then the edited version SHOULD appear in this signal).</p> |
arg_Flags | <p>Flags affecting how the message was sent. The flags might be a subset of those passed to SendMessage if the caller requested unsupported flags.</p> (TpMessageSendingFlags) |
arg_Message_Token | An opaque token used to match any incoming delivery or failure reports against this message, or an empty string if the message is not readily identifiable. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_messages_connect_to_message_sent ()

    TpProxySignalConnection *
    tp_cli_channel_interface_messages_connect_to_message_sent
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_messages_signal_callback_message_sent callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal MessageSent.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Signals that a message has been submitted for sending. This MUST be emitted exactly once per emission of the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref> signal on the Text interface, for backwards-compatibility; clients SHOULD ignore the latter if this interface is present, as mentioned in the introduction.</p> <p>This SHOULD be emitted as soon as the CM determines it's theoretically possible to send the message (e.g. the parameters are supported and correct).</p> <tp:rationale> <p>This signal allows a process that is not the caller of SendMessage to log sent messages.</p> </tp:rationale>

#### Parameters

proxy | A TpChannel 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_channel_interface_messages_signal_callback_pending_messages_removed ()

    void
    (*tp_cli_channel_interface_messages_signal_callback_pending_messages_removed)
                                   (TpChannel *proxy,
                                    const GArray *arg_Message_IDs,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal PendingMessagesRemoved.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_messages_connect_to_pending_messages_removed()` was called |
arg_Message_IDs | The messages that have been removed from the pending message list. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_messages_connect_to_pending_messages_removed ()

    TpProxySignalConnection *
    tp_cli_channel_interface_messages_connect_to_pending_messages_removed
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_messages_signal_callback_pending_messages_removed callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal PendingMessagesRemoved.

The messages with the given IDs have been removed from the <tp:member-ref>PendingMessages</tp:member-ref> list. Clients SHOULD NOT attempt to acknowledge those messages. <tp:rationale> This completes change notification for the PendingMessages property (previously, there was change notification when pending messages were added, but not when they were removed). </tp:rationale>

#### Parameters

proxy | A TpChannel 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_channel_interface_chat_state_run_set_chat_state ()

    gboolean
    tp_cli_channel_interface_chat_state_run_set_chat_state
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_State,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_chat_state_run_set_chat_state` is deprecated and should not be used in newly-written code.

Call the method SetChatState and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Set the local state and notify other members of the channel that it has changed.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_State | Used to pass an 'in' argument: The new state. (TpChannelChatState) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_chat_state_call_set_chat_state ()

    TpProxyPendingCall *
    tp_cli_channel_interface_chat_state_call_set_chat_state
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_State,
                                    tp_cli_channel_interface_chat_state_callback_for_set_chat_state callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a SetChatState method call.

Set the local state and notify other members of the channel that it has changed.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_State | Used to pass an 'in' argument: The new state. (TpChannelChatState) |
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_channel_interface_chat_state_callback_for_set_chat_state ()

    void
    (*tp_cli_channel_interface_chat_state_callback_for_set_chat_state)
                                   (TpChannel *proxy,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a SetChatState 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_channel_interface_chat_state_connect_to_chat_state_changed ()

    TpProxySignalConnection *
    tp_cli_channel_interface_chat_state_connect_to_chat_state_changed
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_chat_state_signal_callback_chat_state_changed callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal ChatStateChanged.

Emitted when the state of a member of the channel has changed. This includes local state.

#### Parameters

proxy | A TpChannel 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_channel_interface_chat_state_signal_callback_chat_state_changed ()

    void
    (*tp_cli_channel_interface_chat_state_signal_callback_chat_state_changed)
                                   (TpChannel *proxy,
                                    guint arg_Contact,
                                    guint arg_State,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal ChatStateChanged.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_chat_state_connect_to_chat_state_changed()` was called |
arg_Contact | An integer handle for the contact. (TpContactHandle) |
arg_State | The new state of this contact. (TpChannelChatState) |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_password_run_get_password_flags ()

    gboolean
    tp_cli_channel_interface_password_run_get_password_flags
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint *out_Password_Flags,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_password_run_get_password_flags` is deprecated and should not be used in newly-written code.

Call the method GetPasswordFlags and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Returns the bitwise-OR of the flags relevant to the password on this channel. The user interface can use this to present information about which operations are currently valid.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
out_Password_Flags | Used to return an 'out' argument if `TRUE` is returned: An integer with the logical OR of all the flags set (values of ChannelPasswordFlags) |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_password_run_provide_password ()

    gboolean
    tp_cli_channel_interface_password_run_provide_password
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const gchar *in_Password,
                                    gboolean *out_Correct,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_password_run_provide_password` is deprecated and should not be used in newly-written code.

Call the method ProvidePassword and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Provide the password so that the channel can be joined. Must be called with the correct password in order for channel joining to proceed if the 'provide' password flag is set.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Password | Used to pass an 'in' argument: The password |
out_Correct | Used to return an 'out' argument if `TRUE` is returned: A boolean indicating whether or not the password was correct |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_password_call_get_password_flags ()

    TpProxyPendingCall *
    tp_cli_channel_interface_password_call_get_password_flags
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    tp_cli_channel_interface_password_callback_for_get_password_flags callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a GetPasswordFlags method call.

Returns the bitwise-OR of the flags relevant to the password on this channel. The user interface can use this to present information about which operations are currently valid.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
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_channel_interface_password_call_provide_password ()

    TpProxyPendingCall *
    tp_cli_channel_interface_password_call_provide_password
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const gchar *in_Password,
                                    tp_cli_channel_interface_password_callback_for_provide_password callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a ProvidePassword method call.

Provide the password so that the channel can be joined. Must be called with the correct password in order for channel joining to proceed if the 'provide' password flag is set.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Password | Used to pass an 'in' argument: The password |
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_channel_interface_password_callback_for_get_password_flags ()

    void
    (*tp_cli_channel_interface_password_callback_for_get_password_flags)
                                   (TpChannel *proxy,
                                    guint out_Password_Flags,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

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

#### Parameters

proxy | the proxy on which the call was made |
out_Password_Flags | Used to return an 'out' argument if `error` is `NULL`: An integer with the logical OR of all the flags set (values of ChannelPasswordFlags) (TpChannelPasswordFlags) |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_interface_password_callback_for_provide_password ()

    void
    (*tp_cli_channel_interface_password_callback_for_provide_password)
                                   (TpChannel *proxy,
                                    gboolean out_Correct,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

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

#### Parameters

proxy | the proxy on which the call was made |
out_Correct | Used to return an 'out' argument if `error` is `NULL`: A boolean indicating whether or not the password was correct |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_interface_password_connect_to_password_flags_changed ()

    TpProxySignalConnection *
    tp_cli_channel_interface_password_connect_to_password_flags_changed
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_password_signal_callback_password_flags_changed callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal PasswordFlagsChanged.

Emitted when the flags as returned by <tp:member-ref>GetPasswordFlags</tp:member-ref> are changed. The user interface should be updated as appropriate.

#### Parameters

proxy | A TpChannel 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_channel_interface_password_signal_callback_password_flags_changed ()

    void
    (*tp_cli_channel_interface_password_signal_callback_password_flags_changed)
                                   (TpChannel *proxy,
                                    guint arg_Added,
                                    guint arg_Removed,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal PasswordFlagsChanged.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_password_connect_to_password_flags_changed()` was called |
arg_Added | A bitwise OR of the flags which have been set (TpChannelPasswordFlags) |
arg_Removed | A bitwise OR of the flags which have been cleared (TpChannelPasswordFlags) |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_sms_connect_to_sms_channel_changed ()

    TpProxySignalConnection *
    tp_cli_channel_interface_sms_connect_to_sms_channel_changed
                                   (TpChannel *proxy,
                                    tp_cli_channel_interface_sms_signal_callback_sms_channel_changed callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object,
                                    GError **error);

Connect a handler to the signal SMSChannelChanged.

This signal indicates a change in the <tp:member-ref>SMSChannel</tp:member-ref> property.

#### Parameters

proxy | A TpChannel 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_channel_interface_sms_signal_callback_sms_channel_changed ()

    void
    (*tp_cli_channel_interface_sms_signal_callback_sms_channel_changed)
                                   (TpChannel *proxy,
                                    gboolean arg_SMSChannel,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal SMSChannelChanged.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_sms_connect_to_sms_channel_changed()` was called |
arg_SMSChannel | The new value for <tp:member-ref>SMSChannel</tp:member-ref>. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_interface_sms_call_get_sms_length ()

    TpProxyPendingCall *
    tp_cli_channel_interface_sms_call_get_sms_length
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GPtrArray *in_Message,
                                    tp_cli_channel_interface_sms_callback_for_get_sms_length callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a GetSMSLength method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Returns the number of 140 octet chunks required to send a message via SMS, as well as the number of remaining characters available in the final chunk and, if possible, an estimate of the cost.</p> <tp:rationale> <p>There are a number of different SMS encoding mechanisms, and the client doesn't know which mechanisms an individual CM might support. This method allows the client, without any knowledge of the encoding mechanism, to provide length details to the user.</p> </tp:rationale> <p>Clients SHOULD limit the frequency with which this method is called and SHOULD NOT call it for every keystroke. Clients MAY estimate the remaining size between single keystrokes.</p>

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Message | Used to pass an 'in' argument: The message the user wishes to send. |
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_channel_interface_sms_callback_for_get_sms_length ()

    void
    (*tp_cli_channel_interface_sms_callback_for_get_sms_length)
                                   (TpChannel *proxy,
                                    guint out_Chunks_Required,
                                    gint out_Remaining_Characters,
                                    gint out_Estimated_Cost,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

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

#### Parameters

proxy | the proxy on which the call was made |
out_Chunks_Required | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The number of 140 octet chunks required to send this message.</p> <p>For example, in the GSM standard 7-bit encoding, a 162 character message would require 2 chunks.</p> |
out_Remaining_Characters | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The number of further characters that can be fit in the final chunk. A negative value indicates that the message will be truncated by <code>abs(Remaining_Characters)</code>. The value <code>MIN_INT32</code> (<code>-2<sup>31</sup></code>) indicates the message will be truncated by an unknown amount.</p> <p>For example, in the GSM standard 7-bit encoding, a 162 character message would return 144 remaining characters (because of the space required for the multipart SMS header).</p> |
out_Estimated_Cost | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The estimated cost of sending this message. The currency and scale of this value are the same as the <tp:dbus-ref namespace="ofdT.Connection.Interface">Balance.AccountBalance</tp:dbus-ref> property.</p> <p>A value of <code>-1</code> indicates the cost could not be estimated.</p> |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_interface_sms_run_get_sms_length ()

    gboolean
    tp_cli_channel_interface_sms_run_get_sms_length
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    const GPtrArray *in_Message,
                                    guint *out_Chunks_Required,
                                    gint *out_Remaining_Characters,
                                    gint *out_Estimated_Cost,
                                    GError **error,
                                    GMainLoop **loop);

`tp_cli_channel_interface_sms_run_get_sms_length` is deprecated and should not be used in newly-written code.

Call the method GetSMSLength and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Returns the number of 140 octet chunks required to send a message via SMS, as well as the number of remaining characters available in the final chunk and, if possible, an estimate of the cost.</p> <tp:rationale> <p>There are a number of different SMS encoding mechanisms, and the client doesn't know which mechanisms an individual CM might support. This method allows the client, without any knowledge of the encoding mechanism, to provide length details to the user.</p> </tp:rationale> <p>Clients SHOULD limit the frequency with which this method is called and SHOULD NOT call it for every keystroke. Clients MAY estimate the remaining size between single keystrokes.</p>

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_Message | Used to pass an 'in' argument: The message the user wishes to send. |
out_Chunks_Required | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The number of 140 octet chunks required to send this message.</p> <p>For example, in the GSM standard 7-bit encoding, a 162 character message would require 2 chunks.</p> |
out_Remaining_Characters | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The number of further characters that can be fit in the final chunk. A negative value indicates that the message will be truncated by <code>abs(Remaining_Characters)</code>. The value <code>MIN_INT32</code> (<code>-2<sup>31</sup></code>) indicates the message will be truncated by an unknown amount.</p> <p>For example, in the GSM standard 7-bit encoding, a 162 character message would return 144 remaining characters (because of the space required for the multipart SMS header).</p> |
out_Estimated_Cost | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The estimated cost of sending this message. The currency and scale of this value are the same as the <tp:dbus-ref namespace="ofdT.Connection.Interface">Balance.AccountBalance</tp:dbus-ref> property.</p> <p>A value of <code>-1</code> indicates the cost could not be estimated.</p> |
error | If not `NULL`, used to return errors if `FALSE` is returned |
loop | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED` |

#### Returns

TRUE on success, FALSE and sets `error` on error

## See Also

channel-group, TpChannel