channel-factory

## channel-factory channel-factory |

## Synopsis

    #define             TPL_CHANNEL_FACTORY_ERROR
    enum                TplChannelFactoryError;
    TplChannel *        (*TplChannelConstructor)            (TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);
    TplChannel *        (*TplChannelFactory)                (const gchar *chan_type,
                                                             TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);
    void                tpl_channel_factory_init            (void);
    void                tpl_channel_factory_deinit          (void);
    void                tpl_channel_factory_add             (const gchar *type,
                                                             TplChannelConstructor constructor);
    TplChannelConstructor  tpl_channel_factory_lookup       (const gchar *type);
    TplChannel *        tpl_channel_factory_build           (const gchar *channel_type,
                                                             TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);

## Description

## Details

### TPL_CHANNEL_FACTORY_ERROR

    #define             TPL_CHANNEL_FACTORY_ERROR

### enum TplChannelFactoryError

    typedef enum
    {
      /* generic error */
      TPL_CHANNEL_FACTORY_ERROR_FAILED,
      TPL_CHANNEL_FACTORY_ERROR_CHANNEL_TYPE_NOT_HANDLED
    } TplChannelFactoryError;

### TplChannelConstructor ()

    TplChannel *        (*TplChannelConstructor)            (TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);

`conn` : |
`object_path` : |
`tp_chan_props` : |
`tp_acc` : |
`error` : |
Returns : |

### TplChannelFactory ()

    TplChannel *        (*TplChannelFactory)                (const gchar *chan_type,
                                                             TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);

`chan_type` : |
`conn` : |
`object_path` : |
`tp_chan_props` : |
`tp_acc` : |
`error` : |
Returns : |

### tpl_channel_factory_init ()

    void                tpl_channel_factory_init            (void);

### tpl_channel_factory_deinit ()

    void                tpl_channel_factory_deinit          (void);

### tpl_channel_factory_add ()

    void                tpl_channel_factory_add             (const gchar *type,
                                                             TplChannelConstructor constructor);

`type` : |
`constructor` : |

### tpl_channel_factory_lookup ()

    TplChannelConstructor  tpl_channel_factory_lookup       (const gchar *type);

`type` : |
Returns : |

### tpl_channel_factory_build ()

    TplChannel *        tpl_channel_factory_build           (const gchar *channel_type,
                                                             TpConnection *conn,
                                                             const gchar *object_path,
                                                             GHashTable *tp_chan_props,
                                                             TpAccount *tp_acc,
                                                             GError **error);

`channel_type` : |
`conn` : |
`object_path` : |
`tp_chan_props` : |
`tp_acc` : |
`error` : |
Returns : |