TelepathyGLib.StreamTubeChannel

g GObject.Object GObject.Object TelepathyGLib.Proxy TelepathyGLib.Proxy GObject.Object->TelepathyGLib.Proxy TelepathyGLib.Channel TelepathyGLib.Channel TelepathyGLib.StreamTubeChannel TelepathyGLib.StreamTubeChannel TelepathyGLib.Channel->TelepathyGLib.StreamTubeChannel TelepathyGLib.Proxy->TelepathyGLib.Channel

Subclasses:

None

Methods

Inherited:

TelepathyGLib.Channel (44), TelepathyGLib.Proxy (11), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (conn, object_path, immutable_properties)

accept_async (callback, *user_data)

accept_finish (result)

dup_parameters_vardict ()

get_service ()

offer_async (params, callback, *user_data)

offer_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

TelepathyGLib.Channel (12), TelepathyGLib.Proxy (5)

Name

Type

Flags

Short Description

parameters-vardict

GLib.Variant

r

The parameters of the stream tube

service

str

r

The service of the stream tube

Signals

Inherited:

TelepathyGLib.Channel (5), TelepathyGLib.Proxy (2), GObject.Object (1)

Name

Short Description

incoming

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

Fields

Inherited:

TelepathyGLib.Channel (5), TelepathyGLib.Proxy (2), GObject.Object (1)

Name

Type

Access

Description

parent

TelepathyGLib.Channel

r

Class Details

class TelepathyGLib.StreamTubeChannel(**kwargs)
Bases:

TelepathyGLib.Channel

Abstract:

No

Structure:

TelepathyGLib.StreamTubeChannelClass

Data structure representing a TelepathyGLib.StreamTubeChannel.

New in version 0.13.2.

classmethod new(conn, object_path, immutable_properties)
Parameters:
  • conn (TelepathyGLib.Connection) – a TelepathyGLib.Connection; may not be None

  • object_path (str) – the object path of the channel; may not be None

  • immutable_properties ({str: GObject.Value}) – 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 GObject.Value instances

Raises:

GLib.Error

Returns:

a newly-created TelepathyGLib.StreamTubeChannel proxy

Return type:

TelepathyGLib.StreamTubeChannel

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

New in version 0.13.2.

Deprecated since version ???: Use TelepathyGLib.SimpleClientFactory.ensure_channel() instead.

accept_async(callback, *user_data)
Parameters:

Accept an incoming stream tube. When the tube has been accepted, callback will be called. You can then call TelepathyGLib.StreamTubeChannel.accept_finish() to get a TelepathyGLib.StreamTubeConnection connected to the tube.

New in version 0.13.2.

accept_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

a newly created TelepathyGLib.StreamTubeConnection

Return type:

TelepathyGLib.StreamTubeConnection

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

New in version 0.13.2.

dup_parameters_vardict()
Returns:

a new reference to a GLib.Variant

Return type:

GLib.Variant

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 GLib.Variant returned is None if this is an outgoing tube that has not yet been offered or the parameters property has not been set.

Use g_variant_lookup(), GLib.Variant.lookup_value(), or tp_vardict_get_uint32() and similar functions for convenient access to the values.

New in version 0.19.10.

get_service()
Returns:

the value of TelepathyGLib.StreamTubeChannel :service

Return type:

str

Return the TelepathyGLib.StreamTubeChannel :service property

New in version 0.13.2.

offer_async(params, callback, *user_data)
Parameters:

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

You have to connect to the TelepathyGLib.StreamTubeChannel ::incoming signal to get a TelepathyGLib.StreamTubeConnection each time a contact establishes a connection to the tube.

New in version 0.13.2.

offer_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True when a Tube has been successfully offered; False otherwise

Return type:

bool

Finishes offering an outgoing stream tube.

New in version 0.13.2.

Signal Details

TelepathyGLib.StreamTubeChannel.signals.incoming(stream_tube_channel, tube_connection)
Signal Name:

incoming

Flags:

RUN_LAST

Parameters:

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

Property Details

TelepathyGLib.StreamTubeChannel.props.parameters_vardict
Name:

parameters-vardict

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE

A %G_VARIANT_TYPE_VARDICT representing the parameters of the tube.

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

New in version 0.19.10.

TelepathyGLib.StreamTubeChannel.props.service
Name:

service

Type:

str

Default Value:

None

Flags:

READABLE

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

New in version 0.13.2.