## Tube channels Tube channels — client-side wrappers for the Tube channel interface, StreamTube channel type and DBusTube channel type. |

## Functions

TpProxySignalConnection * | tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed ()
void | (*tp_cli_channel_interface_tube_signal_callback_tube_channel_state_changed) ()
gboolean | tp_cli_channel_type_stream_tube_run_offer ()
gboolean | tp_cli_channel_type_stream_tube_run_accept ()
TpProxyPendingCall * | tp_cli_channel_type_stream_tube_call_offer ()
TpProxyPendingCall * | tp_cli_channel_type_stream_tube_call_accept ()
void | (*tp_cli_channel_type_stream_tube_callback_for_offer) ()
void | (*tp_cli_channel_type_stream_tube_callback_for_accept) ()
TpProxySignalConnection * | tp_cli_channel_type_stream_tube_connect_to_new_remote_connection ()
TpProxySignalConnection * | tp_cli_channel_type_stream_tube_connect_to_new_local_connection ()
TpProxySignalConnection * | tp_cli_channel_type_stream_tube_connect_to_connection_closed ()
void | (*tp_cli_channel_type_stream_tube_signal_callback_new_remote_connection) ()
void | (*tp_cli_channel_type_stream_tube_signal_callback_new_local_connection) ()
void | (*tp_cli_channel_type_stream_tube_signal_callback_connection_closed) ()
gboolean | tp_cli_channel_type_dbus_tube_run_offer ()
gboolean | tp_cli_channel_type_dbus_tube_run_accept ()
TpProxyPendingCall * | tp_cli_channel_type_dbus_tube_call_offer ()
TpProxyPendingCall * | tp_cli_channel_type_dbus_tube_call_accept ()
void | (*tp_cli_channel_type_dbus_tube_callback_for_offer) ()
void | (*tp_cli_channel_type_dbus_tube_callback_for_accept) ()
TpProxySignalConnection * | tp_cli_channel_type_dbus_tube_connect_to_dbus_names_changed ()
void | (*tp_cli_channel_type_dbus_tube_signal_callback_dbus_names_changed) ()

## Includes

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

## Description

A "tube" is a mechanism for arbitrary data transfer. This section documents the auto-generated C wrappers for the Tube channel interface, StreamTube channel type and DBusTube channel type.

## Functions

### tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed ()

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

Connect a handler to the signal TubeChannelStateChanged.

Emitted when the state of the tube channel changes. Valid state transitions are documented with <tp:type>Tube_Channel_State</tp:type>.

#### 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_tube_signal_callback_tube_channel_state_changed ()

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

Represents the signature of a callback for the signal TubeChannelStateChanged.

#### Parameters

proxy | The proxy on which `tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed()` was called |
arg_State | The new state of the tube. (TpTubeChannelState) |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_stream_tube_run_offer ()

    gboolean
    tp_cli_channel_type_stream_tube_run_offer
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_address_type,
                                    const GValue *in_address,
                                    guint in_access_control,
                                    GHashTable *in_parameters,
                                    GError **error,
                                    GMainLoop **loop);

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

Call the method Offer 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.

Offer a stream tube exporting the local socket specified.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_address_type | Used to pass an 'in' argument: The type of the listening address of the local service, as a member of Socket_Address_Type. (TpSocketAddressType) |
in_address | Used to pass an 'in' argument: The listening address of the local service, as indicated by the address_type. |
in_access_control | Used to pass an 'in' argument: The access control the local service applies to the local socket, specified so the connection manager can behave appropriately when it connects. (TpSocketAccessControl) |
in_parameters | Used to pass an 'in' argument: The dictionary of arbitrary <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref> to send with the tube offer. |
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_stream_tube_run_accept ()

    gboolean
    tp_cli_channel_type_stream_tube_run_accept
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_address_type,
                                    guint in_access_control,
                                    const GValue *in_access_control_param,
                                    GValue **out_address,
                                    GError **error,
                                    GMainLoop **loop);

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

Call the method Accept 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.

Accept a stream tube that's in the &quot;local pending&quot; state. The connection manager will attempt to open the tube. The tube remains in the &quot;local pending&quot; state until the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref> signal is emitted.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_address_type | Used to pass an 'in' argument: The type of address the connection manager should listen on. (TpSocketAddressType) |
in_access_control | Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The type of access control the connection manager should apply to the socket.</p> <p>Note that if you plan to establish more than one connection through the tube, the Socket_Access_Control_Port access control can't be used as you can't connect more than once from the same port.</p> (TpSocketAccessControl) |
in_access_control_param | Used to pass an 'in' argument: A parameter for the access control type, to be interpreted as specified in the documentation for the Socket_Access_Control enum. |
out_address | Used to return an 'out' argument if `TRUE` is returned: The address on which the connection manager will listen for connections to this tube. The client should not attempt to connect to the address until the tube is open. |
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_stream_tube_call_offer ()

    TpProxyPendingCall *
    tp_cli_channel_type_stream_tube_call_offer
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_address_type,
                                    const GValue *in_address,
                                    guint in_access_control,
                                    GHashTable *in_parameters,
                                    tp_cli_channel_type_stream_tube_callback_for_offer callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a Offer method call.

Offer a stream tube exporting the local socket specified.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_address_type | Used to pass an 'in' argument: The type of the listening address of the local service, as a member of Socket_Address_Type. (TpSocketAddressType) |
in_address | Used to pass an 'in' argument: The listening address of the local service, as indicated by the address_type. |
in_access_control | Used to pass an 'in' argument: The access control the local service applies to the local socket, specified so the connection manager can behave appropriately when it connects. (TpSocketAccessControl) |
in_parameters | Used to pass an 'in' argument: The dictionary of arbitrary <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref> to send with the tube offer. |
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_stream_tube_call_accept ()

    TpProxyPendingCall *
    tp_cli_channel_type_stream_tube_call_accept
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_address_type,
                                    guint in_access_control,
                                    const GValue *in_access_control_param,
                                    tp_cli_channel_type_stream_tube_callback_for_accept callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a Accept method call.

Accept a stream tube that's in the &quot;local pending&quot; state. The connection manager will attempt to open the tube. The tube remains in the &quot;local pending&quot; state until the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref> signal is emitted.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_address_type | Used to pass an 'in' argument: The type of address the connection manager should listen on. (TpSocketAddressType) |
in_access_control | Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The type of access control the connection manager should apply to the socket.</p> <p>Note that if you plan to establish more than one connection through the tube, the Socket_Access_Control_Port access control can't be used as you can't connect more than once from the same port.</p> (TpSocketAccessControl) |
in_access_control_param | Used to pass an 'in' argument: A parameter for the access control type, to be interpreted as specified in the documentation for the Socket_Access_Control enum. |
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_stream_tube_callback_for_offer ()

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

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

    void
    (*tp_cli_channel_type_stream_tube_callback_for_accept)
                                   (TpChannel *proxy,
                                    const GValue *out_address,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

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

#### Parameters

proxy | the proxy on which the call was made |
out_address | Used to return an 'out' argument if `error` is `NULL`: The address on which the connection manager will listen for connections to this tube. The client should not attempt to connect to the address until the tube is open. |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_type_stream_tube_connect_to_new_remote_connection ()

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

Connect a handler to the signal NewRemoteConnection.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Emitted each time a participant opens a new connection to its socket.</p> <p>This signal is only fired on the offering side.</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_stream_tube_connect_to_new_local_connection ()

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

Connect a handler to the signal NewLocalConnection.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Emitted when the tube application connects to the CM's socket.</p> <p>This signal is only fired on the accepting side.</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_stream_tube_connect_to_connection_closed ()

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

Connect a handler to the signal ConnectionClosed.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Emitted when a connection has been closed.</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_stream_tube_signal_callback_new_remote_connection ()

    void
    (*tp_cli_channel_type_stream_tube_signal_callback_new_remote_connection)
                                   (TpChannel *proxy,
                                    guint arg_Handle,
                                    const GValue *arg_Connection_Param,
                                    guint arg_Connection_ID,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal NewRemoteConnection.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_stream_tube_connect_to_new_remote_connection()` was called |
arg_Handle | The handle of the participant who opened the new connection (TpContactHandle) |
arg_Connection_Param | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A parameter which can be used by the listening process to identify the connection. Note that this parameter has a meaningful value only in the Socket_Access_Control_Port and Socket_Access_Control_Credentials cases. If a different Socket_Access_Control has been chosen when offering the tube, this parameter should be ignored.</p> <p>In the Socket_Access_Control_Port case, the variant contains a struct Socket_Address_IPv4 (or Socket_Address_IPv6) containing the address from which the CM is connected to the client application.</p> <p>In the Socket_Access_Control_Credentials case, the variant contains the byte (D-Bus signature 'y') that has been sent with the credentials.</p> |
arg_Connection_ID | The unique ID associated with this connection. This ID will be used to identifiy the connection when reporting errors with <tp:member-ref>ConnectionClosed</tp:member-ref>. (TpStreamTubeConnectionID) |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_stream_tube_signal_callback_new_local_connection ()

    void
    (*tp_cli_channel_type_stream_tube_signal_callback_new_local_connection)
                                   (TpChannel *proxy,
                                    guint arg_Connection_ID,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal NewLocalConnection.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_stream_tube_connect_to_new_local_connection()` was called |
arg_Connection_ID | The unique ID associated with this connection. This ID will be used to identifiy the connection when reporting errors with <tp:member-ref>ConnectionClosed</tp:member-ref>. (TpStreamTubeConnectionID) |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_stream_tube_signal_callback_connection_closed ()

    void
    (*tp_cli_channel_type_stream_tube_signal_callback_connection_closed)
                                   (TpChannel *proxy,
                                    guint arg_Connection_ID,
                                    const gchar *arg_Error,
                                    const gchar *arg_Message,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal ConnectionClosed.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_stream_tube_connect_to_connection_closed()` was called |
arg_Connection_ID | The ID of the connection. (TpStreamTubeConnectionID) |
arg_Error | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The name of a D-Bus error describing the error that occurred.</p> <p>The following errors can be used:</p> <ul> <li><code>org.freedesktop.Telepathy.Error.Cancelled</code>: user closed the socket or the tube.</li> <li><code>org.freedesktop.Telepathy.Error.ConnectionLost</code>: the bytestream relaying connection's data has been broken.</li> <li><code>org.freedesktop.Telepathy.Error.ConnectionRefused</code>: the tube offer refused the connection.</li> </ul> |
arg_Message | A debug message. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

### tp_cli_channel_type_dbus_tube_run_offer ()

    gboolean
    tp_cli_channel_type_dbus_tube_run_offer
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    GHashTable *in_parameters,
                                    guint in_access_control,
                                    gchar **out_address,
                                    GError **error,
                                    GMainLoop **loop);

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

Call the method Offer 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.

Offers a D-Bus tube providing the service specified.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_parameters | Used to pass an 'in' argument: The dictionary of arbitrary <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref> to send with the tube offer. |
in_access_control | Used to pass an 'in' argument: The access control the connection manager applies to the D-Bus socket. (TpSocketAccessControl) |
out_address | Used to return an 'out' argument if `TRUE` is returned: The string describing the address of the private bus. The client SHOULD NOT attempt to connect to the address until the tube is open. |
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_dbus_tube_run_accept ()

    gboolean
    tp_cli_channel_type_dbus_tube_run_accept
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_access_control,
                                    gchar **out_address,
                                    GError **error,
                                    GMainLoop **loop);

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

Call the method Accept 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.

Accept a D-Bus tube that's in the &quot;local pending&quot; state. The connection manager will attempt to open the tube. The tube remains in the &quot;local pending&quot; state until the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref> signal is emitted.

#### Parameters

proxy | A TpChannel or subclass |
timeout_ms | Timeout in milliseconds, or -1 for default |
in_access_control | Used to pass an 'in' argument: The access control the connection manager applies to the D-Bus socket. (TpSocketAccessControl) |
out_address | Used to return an 'out' argument if `TRUE` is returned: The string describing the address of the private bus. The client SHOULD NOT attempt to connect to the address until the tube is open. |
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_dbus_tube_call_offer ()

    TpProxyPendingCall *
    tp_cli_channel_type_dbus_tube_call_offer
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    GHashTable *in_parameters,
                                    guint in_access_control,
                                    tp_cli_channel_type_dbus_tube_callback_for_offer callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a Offer method call.

Offers a D-Bus tube providing the service specified.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_parameters | Used to pass an 'in' argument: The dictionary of arbitrary <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref> to send with the tube offer. |
in_access_control | Used to pass an 'in' argument: The access control the connection manager applies to the D-Bus socket. (TpSocketAccessControl) |
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_dbus_tube_call_accept ()

    TpProxyPendingCall *
    tp_cli_channel_type_dbus_tube_call_accept
                                   (TpChannel *proxy,
                                    gint timeout_ms,
                                    guint in_access_control,
                                    tp_cli_channel_type_dbus_tube_callback_for_accept callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a Accept method call.

Accept a D-Bus tube that's in the &quot;local pending&quot; state. The connection manager will attempt to open the tube. The tube remains in the &quot;local pending&quot; state until the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref> signal is emitted.

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_access_control | Used to pass an 'in' argument: The access control the connection manager applies to the D-Bus socket. (TpSocketAccessControl) |
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_dbus_tube_callback_for_offer ()

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

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

#### Parameters

proxy | the proxy on which the call was made |
out_address | Used to return an 'out' argument if `error` is `NULL`: The string describing the address of the private bus. The client SHOULD NOT attempt to connect to the address until the tube is open. |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_type_dbus_tube_callback_for_accept ()

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

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

#### Parameters

proxy | the proxy on which the call was made |
out_address | Used to return an 'out' argument if `error` is `NULL`: The string describing the address of the private bus. The client SHOULD NOT attempt to connect to the address until the tube is open. |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_channel_type_dbus_tube_connect_to_dbus_names_changed ()

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

Connect a handler to the signal DBusNamesChanged.

Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a participant opens or closes the tube. This provides change notification for the <tp:member-ref>DBusNames</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_type_dbus_tube_signal_callback_dbus_names_changed ()

    void
    (*tp_cli_channel_type_dbus_tube_signal_callback_dbus_names_changed)
                                   (TpChannel *proxy,
                                    GHashTable *arg_Added,
                                    const GArray *arg_Removed,
                                    gpointer user_data,
                                    GObject *weak_object);

Represents the signature of a callback for the signal DBusNamesChanged.

#### Parameters

proxy | The proxy on which `tp_cli_channel_type_dbus_tube_connect_to_dbus_names_changed()` was called |
arg_Added | Array of handles and D-Bus names of new participants. |
arg_Removed | Array of handles of former participants. |
user_data | User-supplied data |
weak_object | User-supplied weakly referenced object |

## See Also

channel-group