![]() |
![]() |
![]() |
telepathy-glib API Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <telepathy-glib/stream-tube-channel.h> struct TpStreamTubeChannel; struct TpStreamTubeChannelClass; void tp_stream_tube_channel_accept_async (TpStreamTubeChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
); TpStreamTubeConnection * tp_stream_tube_channel_accept_finish (TpStreamTubeChannel *self
,GAsyncResult *result
,GError **error
); GHashTable * tp_stream_tube_channel_get_parameters (TpStreamTubeChannel *self
); const gchar * tp_stream_tube_channel_get_service (TpStreamTubeChannel *self
); TpStreamTubeChannel * tp_stream_tube_channel_new (TpConnection *conn
,const gchar *object_path
,const GHashTable *immutable_properties
,GError **error
); void tp_stream_tube_channel_offer_async (TpStreamTubeChannel *self
,GHashTable *params
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_stream_tube_channel_offer_finish (TpStreamTubeChannel *self
,GAsyncResult *result
,GError **error
);
TpStreamTubeChannel is a sub-class of TpChannel providing convenient API to offer and accept a stream tube.
struct TpStreamTubeChannel;
Data structure representing a TpStreamTubeChannel.
Since 0.13.2
struct TpStreamTubeChannelClass { };
The class of a TpStreamTubeChannel.
Since 0.13.2
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.
|
an incoming TpStreamTubeChannel |
|
a callback to call when the tube has been accepted |
|
data to pass to callback
|
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.
|
a TpStreamTubeChannel |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
a newly created TpStreamTubeConnection. [transfer full] |
Since 0.13.2
GHashTable * tp_stream_tube_channel_get_parameters
(TpStreamTubeChannel *self
);
Return the "parameters" property
|
a TpStreamTubeChannel |
Returns : |
the value of "parameters". [transfer none][element-type utf8 GObject.Value] |
Since 0.13.2
const gchar * tp_stream_tube_channel_get_service (TpStreamTubeChannel *self
);
Return the "service" property
|
a TpStreamTubeChannel |
Returns : |
the value of "service". [transfer none] |
Since 0.13.2
TpStreamTubeChannel * tp_stream_tube_channel_new (TpConnection *conn
,const gchar *object_path
,const GHashTable *immutable_properties
,GError **error
);
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.
|
a TpConnection; may not be NULL
|
|
the object path of the channel; may not be NULL
|
|
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] |
|
used to indicate the error if NULL is returned |
Returns : |
a newly-created TpStreamTubeChannel proxy. [transfer full] |
Since 0.13.2
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.
|
an outgoing TpStreamTubeChannel |
|
parameters of the tube, or NULL . [allow-none][transfer none]
|
|
a callback to call when the tube has been offered |
|
data to pass to callback
|
Since 0.13.2
gboolean tp_stream_tube_channel_offer_finish (TpStreamTubeChannel *self
,GAsyncResult *result
,GError **error
);
Finishes offering an outgoing stream tube.
|
a TpStreamTubeChannel |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
TRUE when a Tube has been successfully offered; FALSE otherwise |
Since 0.13.2
"parameters"
property "parameters" GHashTable_gchararray+GValue_* : Read
A string to GValue GHashTable representing the parameters of the tube.
Will be NULL
for outgoing tubes until the tube has been offered.
Since 0.13.2
"service"
property"service" gchar* : Read
A string representing the service name that will be used over the tube.
Default value: NULL
Since 0.13.2
"incoming"
signalvoid user_function (TpStreamTubeChannel *self,
TpStreamTubeConnection *tube_connection,
gpointer user_data) : Run Last
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
|
the TpStreamTubeChannel |
|
the TpStreamTubeConnection for the connection |
|
user data set when the signal handler was connected. |