TpCapabilities

## TpCapabilities TpCapabilities — object representing capabilities |

## Synopsis

    #include <telepathy-glib/capabilities.h>

                        TpCapabilities;
    GPtrArray *         tp_capabilities_get_channel_classes (TpCapabilities *self);
    gboolean            tp_capabilities_is_specific_to_contact
                                                            (TpCapabilities *self);
    gboolean            tp_capabilities_supports_text_chatrooms
                                                            (TpCapabilities *self);
    gboolean            tp_capabilities_supports_text_chats (TpCapabilities *self);

## Object Hierarchy

      GObject
       +----TpCapabilities

## Properties

      "channel-classes"          GPtrArray_GValueArray_GHashTable_gchararray+GValue_+GStrv__*  : Read / Write / Construct Only
      "contact-specific"         gboolean              : Read / Write / Construct Only

## Description

TpCapabilities objects represent the capabilities a TpConnection or a TpContact supports.

## Details

### TpCapabilities

    typedef struct _TpCapabilities TpCapabilities;

An object representing capabilities a TpConnection or TpContact supports.

Since 0.11.3

### tp_capabilities_get_channel_classes ()

    GPtrArray *         tp_capabilities_get_channel_classes (TpCapabilities *self);

`self` : | a TpCapabilities object
Returns : | the same GPtrArray as the "channel-classes" property

Since 0.11.3

### tp_capabilities_is_specific_to_contact ()

    gboolean            tp_capabilities_is_specific_to_contact
                                                            (TpCapabilities *self);

`self` : | a TpCapabilities object
Returns : | the same gboolean as the "contact-specific" property

Since 0.11.3

### tp_capabilities_supports_text_chatrooms ()

    gboolean            tp_capabilities_supports_text_chatrooms
                                                            (TpCapabilities *self);

If the "contact-specific" property is `FALSE`, this function checks if named text chatrooms can be joined by providing a chatroom identifier.

If the "contact-specific" property is `TRUE`, this function checks if the contact associated with this TpCapabilities can be invited to named text chatrooms.

If the protocol is such that chatrooms can be joined or contacts can be invited, but only via a more elaborate D-Bus API than normal (because more information is needed), then this method will return `FALSE`.

`self` : | a TpCapabilities object
Returns : | `TRUE` if a channel request containing Text as ChannelType, HandleTypeRoom as TargetHandleType and a channel identifier can be expected to work, `FALSE` otherwise.

Since 0.11.3

### tp_capabilities_supports_text_chats ()

    gboolean            tp_capabilities_supports_text_chats (TpCapabilities *self);

Return whether private text channels can be established by providing a contact identifier.

If the protocol is such that text chats can be established, but only via a more elaborate D-Bus API than normal (because more information is needed), then this method will return `FALSE`.

`self` : | a TpCapabilities object
Returns : | `TRUE` if a channel request containing Text as ChannelType, HandleTypeContact as TargetHandleType and a contact identifier can be expected to work, `FALSE` otherwise.

Since 0.11.3

## Property Details

### The `"channel-classes"` property

      "channel-classes"          GPtrArray_GValueArray_GHashTable_gchararray+GValue_+GStrv__*  : Read / Write / Construct Only

The underlying data structure used by Telepathy to represent the requests that can succeed.

This can be used by advanced clients to determine whether an unusually complex request would succeed. See the Telepathy D-Bus API Specification for details of how to interpret the returned GPtrArray of TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS.

The higher-level methods like `tp_capabilities_supports_text_chats()` are likely to be more useful to the majority of clients.

### The `"contact-specific"` property

      "contact-specific"         gboolean              : Read / Write / Construct Only

Whether this object accurately describes the capabilities of a particular contact, or if it's only a guess based on the capabilities of the underlying connection.

Default value: FALSE