## TpStreamTubeChannel

TpStreamTubeChannel — proxy object for a stream tube channel

## Functions

void | tp_stream_tube_channel_accept_async ()
TpStreamTubeConnection * | tp_stream_tube_channel_accept_finish ()
GHashTable * | tp_stream_tube_channel_get_parameters ()
GVariant * | tp_stream_tube_channel_dup_parameters_vardict ()
const gchar * | tp_stream_tube_channel_get_service ()
TpStreamTubeChannel * | tp_stream_tube_channel_new ()
void | tp_stream_tube_channel_offer_async ()
gboolean | tp_stream_tube_channel_offer_finish ()

## Properties

GHashTable_gchararray+GValue_* | parameters | Read
GVariant * | parameters-vardict | Read
gchar * | service | Read

## Signals

void | incoming | Run Last

## Types and Values

struct | TpStreamTubeChannel
struct | TpStreamTubeChannelClass

## Object Hierarchy

        GObject
        ╰── TpProxy
            ╰── TpChannel
                ╰── TpStreamTubeChannel

## Implemented Interfaces

TpStreamTubeChannel implements TpChannelIface.

## Includes

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

## Description

TpStreamTubeChannel is a sub-class of TpChannel providing convenient API to offer and accept a stream tube.

## Functions

### tp_stream_tube_channel_accept_async ()

    void
    tp_stream_tube_channel_accept_async (TpStreamTubeChannel *self,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Accept an incoming stream tube. When the tube has been accepted, `callback` will be called. You can then call `tp_stream_tube_channel_accept_finish()` to get a TpStreamTubeConnection connected to the tube.

#### Parameters

self | an incoming TpStreamTubeChannel |
callback | a callback to call when the tube has been accepted |
user_data | data to pass to `callback` |

Since: 0.13.2

### tp_stream_tube_channel_accept_finish ()

    TpStreamTubeConnection *
    tp_stream_tube_channel_accept_finish (TpStreamTubeChannel *self,
                                          GAsyncResult *result,
                                          GError **error);

Finishes accepting an incoming stream tube. The returned TpStreamTubeConnection can then be used to exchange data through the tube.

#### Parameters

self | a TpStreamTubeChannel |
result | a GAsyncResult |
error | a GError to fill |

#### Returns

a newly created TpStreamTubeConnection.

[transfer full]

Since: 0.13.2

### tp_stream_tube_channel_get_parameters ()

    GHashTable *
    tp_stream_tube_channel_get_parameters (TpStreamTubeChannel *self);

Return the “parameters” property

[skip]

#### Parameters

self | a TpStreamTubeChannel |

#### Returns

the value of “parameters”.

[transfer none][element-type utf8 GObject.Value]

Since: 0.13.2

### tp_stream_tube_channel_dup_parameters_vardict ()

    GVariant *
    tp_stream_tube_channel_dup_parameters_vardict
                                   (TpStreamTubeChannel *self);

Return the parameters of the dbus-tube channel in a variant of type `G_VARIANT_TYPE_VARDICT` whose keys are strings representing parameter names and values are variants representing corresponding parameter values set by the offerer when offering this channel.

The GVariant returned is `NULL` if this is an outgoing tube that has not yet been offered or the parameters property has not been set.

Use `g_variant_lookup()`, `g_variant_lookup_value()`, or `tp_vardict_get_uint32()` and similar functions for convenient access to the values.

#### Parameters

self | a TpStreamTubeChannel |

#### Returns

a new reference to a GVariant.

[transfer full]

Since: 0.19.10

### tp_stream_tube_channel_get_service ()

    const gchar *
    tp_stream_tube_channel_get_service (TpStreamTubeChannel *self);

Return the “service” property

#### Parameters

self | a TpStreamTubeChannel |

#### Returns

the value of “service”.

[transfer none]

Since: 0.13.2

### tp_stream_tube_channel_new ()

    TpStreamTubeChannel *
    tp_stream_tube_channel_new (TpConnection *conn,
                                const gchar *object_path,
                                const GHashTable *immutable_properties,
                                GError **error);

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

Use `tp_simple_client_factory_ensure_channel()` instead.

Creates a new TpStreamTubeChannel proxy object from the provided path and properties. Most developers will not need to use this function; use TpAutomaticProxyFactory to automatically create TpStreamTubeChannel proxy objects.

#### Parameters

conn | a TpConnection; may not be `NULL` |
object_path | the object path of the channel; may not be `NULL` |
immutable_properties | the immutable properties of the channel, as signalled by the NewChannel D-Bus signal or returned by the CreateChannel and EnsureChannel D-Bus methods: a mapping from strings (D-Bus interface name + "." + property name) to GValue instances. | [transfer none][element-type utf8 GObject.Value]
error | used to indicate the error if `NULL` is returned |

#### Returns

a newly-created TpStreamTubeChannel proxy.

[transfer full]

Since: 0.13.2

### tp_stream_tube_channel_offer_async ()

    void
    tp_stream_tube_channel_offer_async (TpStreamTubeChannel *self,
                                        GHashTable *params,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

Offer an outgoing stream tube. When the tube has been offered, `callback` will be called. You can then call `tp_stream_tube_channel_offer_finish()` to get the result of the operation.

You have to connect to the “incoming” signal to get a TpStreamTubeConnection each time a contact establishes a connection to the tube.

#### Parameters

self | an outgoing TpStreamTubeChannel |
params | parameters of the tube, or `NULL`. | [allow-none][transfer none]
callback | a callback to call when the tube has been offered |
user_data | data to pass to `callback` |

Since: 0.13.2

### tp_stream_tube_channel_offer_finish ()

    gboolean
    tp_stream_tube_channel_offer_finish (TpStreamTubeChannel *self,
                                         GAsyncResult *result,
                                         GError **error);

Finishes offering an outgoing stream tube.

#### Parameters

self | a TpStreamTubeChannel |
result | a GAsyncResult |
error | a GError to fill |

#### Returns

`TRUE` when a Tube has been successfully offered; `FALSE` otherwise

Since: 0.13.2

## Types and Values

### struct TpStreamTubeChannel

    struct TpStreamTubeChannel;

Data structure representing a TpStreamTubeChannel.

Since: 0.13.2

### struct TpStreamTubeChannelClass

    struct TpStreamTubeChannelClass {
    };

The class of a TpStreamTubeChannel.

Since: 0.13.2

## Property Details

### The `“parameters”` property

      “parameters”               GHashTable_gchararray+GValue_*

A string to GValue GHashTable representing the parameters of the tube.

Will be `NULL` for outgoing tubes until the tube has been offered.

In high-level language bindings, use “parameters-vardict” or `tp_stream_tube_channel_dup_parameters_vardict()` to get the same information in a more convenient format.

Owner: TpStreamTubeChannel

Flags: Read

Since: 0.13.2

### The `“parameters-vardict”` property

      “parameters-vardict”       GVariant *

A `G_VARIANT_TYPE_VARDICT` representing the parameters of the tube.

Will be `NULL` for outgoing tubes until the tube has been offered.

Owner: TpStreamTubeChannel

Flags: Read

Allowed values: GVariant<a{sv}>

Default value: NULL

Since: 0.19.10

### The `“service”` property

      “service”                  gchar *

A string representing the service name that will be used over the tube.

Owner: TpStreamTubeChannel

Flags: Read

Default value: NULL

Since: 0.13.2

## Signal Details

### The `“incoming”` signal

    void
    user_function (TpStreamTubeChannel    *self,
                   TpStreamTubeConnection *tube_connection,
                   gpointer                user_data)

The ::incoming signal is emitted on offered Tubes when a new incoming connection is made from a remote user (one accepting the Tube).

Consumers of this signal must take their own references to `tube_connection`

#### Parameters

self | the TpStreamTubeChannel |
tube_connection | the TpStreamTubeConnection for the connection |
user_data | user data set when the signal handler was connected. |

Flags: Run Last