TpClientChannelFactoryInterface

TpClientChannelFactoryInterface — an interface for client channel factories

Synopsis

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

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

Object Hierarchy

  GInterface
   +----TpClientChannelFactory

Prerequisites

TpClientChannelFactory requires GObject.

Known Implementations

TpClientChannelFactory is implemented by TpAutomaticProxyFactory and TpBasicProxyFactory.

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

TpClientChannelFactory

typedef struct _TpClientChannelFactory TpClientChannelFactory;

Opaque typedef representing a GObject that implements the TP_TYPE_CLIENT_CHANNEL_FACTORY interface.

Since 0.13.6


struct TpClientChannelFactoryInterface

struct TpClientChannelFactoryInterface {
    GTypeInterface parent;

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

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

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

    GArray *(*obj_dup_channel_features) (TpClientChannelFactory *self,
        TpChannel *channel);
};

Interface for a channel factory

GTypeInterface parent;

the parent

create_channel ()

obsolete version of obj_create_channel which does not receive the object instance as an argument

dup_channel_features ()

obsolete version of obj_dup_channel_features which does not receive the object instance as an argument

obj_create_channel ()

virtual method used to create channels; see tp_client_channel_factory_create_channel()

obj_dup_channel_features ()

virtual method returning channel features that have to be prepared on newly created channels; see tp_client_channel_factory_dup_channel_features()

Since 0.13.2


tp_client_channel_factory_create_channel ()

TpChannel *         tp_client_channel_factory_create_channel
                                                        (TpClientChannelFactory *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.

Changed in 0.13.6: the function's signature was previously wrong; it expected an object instance as its first parameter, but the type of the parameter was the type of the interface vtable.

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. [transfer full]

Since 0.13.2


tp_client_channel_factory_dup_channel_features ()

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

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

Changed in 0.13.6: the function's signature was previously wrong; it expected an object instance as its first parameter, but the type of the parameter was the type of the interface vtable.

self :

a client channel factory

channel :

a TpChannel

Returns :

a newly allocated GArray. [transfer full][element-type GQuark]

Since 0.13.3