TpClientChannelFactoryInterface

TpClientChannelFactoryInterface — an interface for client channel factories

Synopsis

#include <telepathy-glib/client-channel-factory.h>

                    TpClientChannelFactoryInterface;
TpChannel *         tp_client_channel_factory_create_channel
                                                        (TpClientChannelFactoryInterface *self,
                                                         TpConnection *conn,
                                                         const gchar *path,
                                                         GHashTable *properties,
                                                         GError **error);
GArray *            tp_client_channel_factory_dup_channel_features
                                                        (TpClientChannelFactoryInterface *self,
                                                         TpChannel *channel);

Description

Client channel factories are used to create channel proxies. An application wanting to use its own TpChannel subclass has to implement an object implementing the TpClientChannelFactoryInterface interface.

Once a channel has been created by a factory using tp_client_channel_factory_create_channel(), the caller should then prepare on it the channel features returned by tp_client_channel_factory_dup_channel_features() using tp_proxy_prepare_async().

Details

TpClientChannelFactoryInterface

typedef struct {
    GTypeInterface parent;

    TpChannel * (* create_channel) (TpClientChannelFactoryInterface *self,
        TpConnection *conn,
        const gchar *path,
        GHashTable *properties,
        GError **error);

    GArray * (* dup_channel_features) (TpClientChannelFactoryInterface *self,
        TpChannel *channel);
} TpClientChannelFactoryInterface;

Interface for a channel factory

GTypeInterface parent;

the parent

create_channel ()

the function used to create channels

dup_channel_features ()

channel features that have to be prepared on newly created channels

Since 0.13.2


tp_client_channel_factory_create_channel ()

TpChannel *         tp_client_channel_factory_create_channel
                                                        (TpClientChannelFactoryInterface *self,
                                                         TpConnection *conn,
                                                         const gchar *path,
                                                         GHashTable *properties,
                                                         GError **error);

Function called when a channel need to be created. Implementation can return a subclass of TpChannel if they need to.

self :

a client channel factory

conn :

a TpConnection

path :

the object path of the channel

properties :

the immutable properties of the channel. [transfer none][element-type utf8 GObject.Value]

error :

used to indicate the error if NULL is returned

Returns :

a new channel proxy, or NULL on invalid arguments

Since 0.13.2


tp_client_channel_factory_dup_channel_features ()

GArray *            tp_client_channel_factory_dup_channel_features
                                                        (TpClientChannelFactoryInterface *self,
                                                         TpChannel *channel);

Return a GArray containing the TpChannel features that should be prepared on channel.

self :

a client channel factory

channel :

a TpChannel

Returns :

a newly allocated GArray. [transfer full]

Since 0.13.3