Top |
TpStreamTubeChannel is a sub-class of TpChannel providing convenient API to offer and accept a stream tube.
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.
self |
an incoming TpStreamTubeChannel |
|
callback |
a callback to call when the tube has been accepted |
|
user_data |
data to pass to |
Since 0.13.2
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.
Since 0.13.2
GVariant *
tp_stream_tube_channel_dup_parameters (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.
Since 0.19.10
const gchar *
tp_stream_tube_channel_get_service (TpStreamTubeChannel *self
);
Return the “service” property
Since 0.13.2
void tp_stream_tube_channel_offer_async (TpStreamTubeChannel *self
,GVariant *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.
params
is consumed if it is floating.
self |
an outgoing TpStreamTubeChannel |
|
params |
a # |
[allow-none] |
callback |
a callback to call when the tube has been offered |
|
user_data |
data to pass to |
Since 0.13.2
gboolean tp_stream_tube_channel_offer_finish (TpStreamTubeChannel *self
,GAsyncResult *result
,GError **error
);
Finishes offering an outgoing stream tube.
Since 0.13.2
struct TpStreamTubeChannel;
Data structure representing a TpStreamTubeChannel.
Since 0.13.2
struct TpStreamTubeChannelClass { };
The class of a TpStreamTubeChannel.
Since 0.13.2
“parameters”
property“parameters” GVariant *
A G_VARIANT_TYPE_VARDICT
representing the parameters of the tube.
Will be NULL
for outgoing tubes until the tube has been offered.
Flags: Read
Allowed values: GVariant<a{sv}>
Default value: NULL
Since 0.19.10
“service”
property“service” gchar *
A string representing the service name that will be used over the tube.
Flags: Read
Default value: NULL
Since 0.13.2
“incoming”
signalvoid 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
self |
||
tube_connection |
the TpStreamTubeConnection for the connection |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last