Text channels

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

## Synopsis

    #include <telepathy-glib/channel.h>

    gboolean            tp_cli_channel_type_text_run_acknowledge_pending_messages
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_ids,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_text_run_get_message_types
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             GArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_text_run_list_pending_messages
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             gboolean in_clear,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_text_run_send   (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_type,
                                                             const gchar *in_text,
                                                             GError **error,
                                                             GMainLoop **loop);
    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);
    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);
    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);
    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);
    void                (*tp_cli_channel_type_text_callback_for_acknowledge_pending_messages)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_text_callback_for_get_message_types)
                                                            (TpChannel *proxy,
                                                             const GArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_text_callback_for_list_pending_messages)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_text_callback_for_send)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    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);
    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);
    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);
    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);
    void                (*tp_cli_channel_type_text_signal_callback_lost_message)
                                                            (TpChannel *proxy,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    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);
    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);
    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);

    gboolean            tp_cli_channel_interface_chat_state_run_set_chat_state
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_state,
                                                             GError **error,
                                                             GMainLoop **loop);
    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);
    void                (*tp_cli_channel_interface_chat_state_callback_for_set_chat_state)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    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);
    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);

    gboolean            tp_cli_channel_interface_password_run_get_password_flags
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint *out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_interface_password_run_provide_password
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const gchar *in_password,
                                                             gboolean *out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    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);
    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);
    void                (*tp_cli_channel_interface_password_callback_for_get_password_flags)
                                                            (TpChannel *proxy,
                                                             guint out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_interface_password_callback_for_provide_password)
                                                            (TpChannel *proxy,
                                                             gboolean out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    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);
    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);

## 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.

## Details

### 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);

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.

`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 **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

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.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`out0` : | 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 **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

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.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_clear` : | Used to pass an 'in' argument: If true, remove all messages from the queue
`out0` : | Used to return an 'out' argument if `TRUE` is returned: 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);

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.

Request that a message be sent on this channel. The Sent signal will be emitted when the message has been sent, and this method will return.

`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, from ChannelTextMessageType
`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.

`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
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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);

Start a GetMessageTypes method call.

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

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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);

Start a ListPendingMessages method call.

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

`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, remove all messages from the queue
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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);

Start a Send method call.

Request that a message be sent on this channel. The Sent signal will be emitted when the message has been sent, and this method will return.

`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, from ChannelTextMessageType
`in_text` : | Used to pass an 'in' argument: The message to send
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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.

`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 *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | 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 *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: 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);

Signature of the callback called when a Send 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_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.

`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 AcknowledgePendingMessage method.

`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.

Signals that an outgoing message has failed to send. The error will be one of the values from ChannelTextSendError.

`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.

Signals that a message has been sent on this channel.

`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.

`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.

`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
`arg_sender` : | The handle of the contact who sent the message
`arg_type` : | The type of the message (normal, action, notice, etc), from ChannelTextMessageType
`arg_flags` : | A bitwise OR of the message flags as defined by ChannelTextMessageFlags
`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.

`proxy` : | The proxy on which `tp_cli_channel_type_text_connect_to_send_error()` was called
`arg_error` : | One of the values of ChannelTextSendError
`arg_timestamp` : | The Unix timestamp indicating when the message was sent
`arg_type` : | The message type from ChannelTextMessageType
`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.

`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
`arg_type` : | The message type (normal, action, notice, etc) from ChannelTextMessageType
`arg_text` : | The text of the message
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### 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);

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.

`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: one of the values of ChannelChatState.
`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.

`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: one of the values of ChannelChatState.
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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.

`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.

`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.

`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.
`arg_state` : | The new state of this contact: one of the values of ChannelChatState.
`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 *out0,
                                                             GError **error,
                                                             GMainLoop **loop);

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.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`out0` : | 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 *out0,
                                                             GError **error,
                                                             GMainLoop **loop);

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.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_password` : | Used to pass an 'in' argument: The password
`out0` : | Used to return an 'out' argument if `TRUE` is returned: (Undocumented)
`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.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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.

`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
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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 out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: An integer with the logical OR of all the flags set (values of ChannelPasswordFlags)
`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 out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: (Undocumented)
`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 GetPasswordFlags are changed. The user interface should be updated as appropriate.

`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.

`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
`arg_removed` : | A bitwise OR of the flags which have been cleared
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

## See Also

channel-group, TpChannel