## TpAutomaticClientFactory TpAutomaticClientFactory — Factory for specialized TpChannel subclasses. |

## Functions

TpAutomaticClientFactory * | tp_automatic_client_factory_new ()

## Types and Values

struct | TpAutomaticClientFactory
struct | TpAutomaticClientFactoryClass

## Object Hierarchy

        GObject
        ╰── TpSimpleClientFactory
            ╰── TpAutomaticClientFactory

## Includes

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

## Description

This factory overrides some TpSimpleClientFactory virtual methods to create specialized TpChannel subclasses.

TpAutomaticClientFactory will currently create TpChannel objects as follows:

- a TpStreamTubeChannel, if the channel is of type `TP_IFACE_CHANNEL_TYPE_STREAM_TUBE`;

- a TpDBusTubeChannel, if the channel is of type `TP_IFACE_CHANNEL_TYPE_DBUS_TUBE`;

- a TpTextChannel, if the channel is of type `TP_IFACE_CHANNEL_TYPE_TEXT` and implements `TP_IFACE_CHANNEL_INTERFACE_MESSAGES`;

- a TpFileTransferChannel, if the channel is of type `TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER`;

- a TpCallChannel, if the channel is of type `TP_IFACE_CHANNEL_TYPE_CALL`;

- a plain TpChannel, otherwise

It is guaranteed that the objects returned by future versions will be either the class that is currently used, or a more specific subclass of that class.

This factory asks to prepare the following features:

- `TP_CHANNEL_FEATURE_CORE`, `TP_CHANNEL_FEATURE_GROUP` and `TP_CHANNEL_FEATURE_PASSWORD` for all type of channels.

- `TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES` and `TP_TEXT_CHANNEL_FEATURE_SMS` for TpTextChannel

- `TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE` for TpFileTransferChannel

- `TP_CALL_CHANNEL_FEATURE_CORE` for TpCallChannel

- `TP_DBUS_TUBE_CHANNEL_FEATURE_CORE` for TpDBusTubeChannel

## Functions

### tp_automatic_client_factory_new ()

    TpAutomaticClientFactory *
    tp_automatic_client_factory_new (TpDBusDaemon *dbus);

Returns a new TpAutomaticClientFactory instance. If `dbus` is `NULL`, `tp_dbus_daemon_dup()` will be used.

#### Parameters

dbus | a TpDBusDaemon, or `NULL`. | [allow-none]

#### Returns

a new TpAutomaticClientFactory

Since: 0.15.5

## Types and Values

### struct TpAutomaticClientFactory

    struct TpAutomaticClientFactory;

Data structure representing a TpAutomaticClientFactory

Since: 0.15.5

### struct TpAutomaticClientFactoryClass

    struct TpAutomaticClientFactoryClass {
        TpSimpleClientFactoryClass parent_class;
    };

The class of a TpAutomaticClientFactory.

#### Members

TpSimpleClientFactoryClass `parent_class`; | the parent class |

Since: 0.15.5

## See Also

TpSimpleClientFactory