![]() |
![]() |
![]() |
telepathy-glib API Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#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
); gboolean tp_capabilities_supports_stream_tubes (TpCapabilities *self
,TpHandleType handle_type
,const gchar *service
); gboolean tp_capabilities_supports_dbus_tubes (TpCapabilities *self
,TpHandleType handle_type
,const gchar *service_name
);
"channel-classes" GPtrArray_GValueArray_GHashTable_gchararray+GValue_+GStrv__* : Read / Write / Construct Only "contact-specific" gboolean : Read / Write / Construct Only
TpCapabilities objects represent the capabilities a TpConnection or a TpContact supports.
typedef struct _TpCapabilities TpCapabilities;
An object representing capabilities a TpConnection or TpContact supports.
Since 0.11.3
GPtrArray * tp_capabilities_get_channel_classes (TpCapabilities *self
);
|
a TpCapabilities object |
Returns : |
the same GPtrArray as the "channel-classes" property. [transfer none] |
Since 0.11.3
gboolean tp_capabilities_is_specific_to_contact
(TpCapabilities *self
);
|
a TpCapabilities object |
Returns : |
the same gboolean as the "contact-specific" property |
Since 0.11.3
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
.
|
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
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
.
|
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
gboolean tp_capabilities_supports_stream_tubes (TpCapabilities *self
,TpHandleType handle_type
,const gchar *service
);
If the "contact-specific" property is TRUE
, this function
checks if the contact associated with this TpCapabilities supports
stream tubes with handle_type
as TargetHandleType.
If service
is not NULL
, it also checks if it supports stream tubes
with service
as TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE.
If the "contact-specific" property is FALSE
, this function
checks if the connection supports requesting stream tube channels with
handle_type
as ChannelType. The service
argument is unused in this case.
|
a TpCapabilities object |
|
the handle type of the tube (either TP_HANDLE_TYPE_CONTACT or TP_HANDLE_TYPE_ROOM) |
|
the service of the tube, or NULL
|
Returns : |
TRUE if the contact or connection supports this type of stream
tubes.
|
Since 0.13.0
gboolean tp_capabilities_supports_dbus_tubes (TpCapabilities *self
,TpHandleType handle_type
,const gchar *service_name
);
If the "contact-specific" property is TRUE
, this function
checks if the contact associated with this TpCapabilities supports
D-Bus tubes with handle_type
as TargetHandleType.
If service_name
is not NULL
, it also checks if it supports stream tubes
with service
as TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME.
If the "contact-specific" property is FALSE
, this function
checks if the connection supports requesting D-Bus tube channels with
handle_type
as ChannelType. The service_name
argument is unused in
this case.
|
a TpCapabilities object |
|
the handle type of the tube (either TP_HANDLE_TYPE_CONTACT or TP_HANDLE_TYPE_ROOM) |
|
the service name of the tube, or NULL
|
Returns : |
TRUE if the contact or connection supports this type of D-Bus
tubes.
|
Since 0.13.0
"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.
"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