TelepathyGLib.Capabilities¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The channel classes supported |
||
r/w/co |
|
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class TelepathyGLib.Capabilities(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An object representing capabilities a
TelepathyGLib.Connection
orTelepathyGLib.Contact
supports.New in version 0.11.3.
- dup_channel_classes_variant()¶
- Returns:
the value of the
TelepathyGLib.Capabilities
:channel-classes-variant
property- Return type:
Return the
TelepathyGLib.Capabilities
:channel-classes-variant
propertyNew in version 0.19.0.
- get_channel_classes()¶
- Return type:
[{object:
object}]
New in version 0.11.3.
- is_specific_to_contact()¶
- Returns:
the same
bool
as theTelepathyGLib.Capabilities
:contact-specific
property- Return type:
New in version 0.11.3.
- supports_audio_call(handle_type)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – the handle type of the call;TelepathyGLib.HandleType.CONTACT
for private,TelepathyGLib.HandleType.ROOM
orTelepathyGLib.HandleType.NONE
for conference (depending on the protocol)- Returns:
True
if a channel request containing Call as ChannelType, handle_type as TargetHandleType, a True value for InitialAudio and an identifier of the appropriate type can be expected to work,False
otherwise.- Return type:
Return whether audio calls can be established, for instance by calling
TelepathyGLib.AccountChannelRequest.new_audio_call
(), followed byTelepathyGLib.AccountChannelRequest.set_target_id
() with handle_type.To check whether requests using
TelepathyGLib.AccountChannelRequest.set_target_contact
() would work, set handle_type toTelepathyGLib.HandleType.CONTACT
.New in version 0.17.6.
- supports_audio_video_call(handle_type)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – the handle type of the call;TelepathyGLib.HandleType.CONTACT
for private,TelepathyGLib.HandleType.ROOM
orTelepathyGLib.HandleType.NONE
for conference (depending on the protocol)- Returns:
True
if a channel request containing Call as ChannelType, handle_type as TargetHandleType, a True value for InitialAudio/InitialVideo and an identifier of the appropriate type can be expected to work,False
otherwise.- Return type:
Return whether audio/video calls can be established, for instance by calling
TelepathyGLib.AccountChannelRequest.new_audio_video_call
(), followed byTelepathyGLib.AccountChannelRequest.set_target_id
() with handle_type.To check whether requests using
TelepathyGLib.AccountChannelRequest.set_target_contact
() would work, set handle_type toTelepathyGLib.HandleType.CONTACT
.New in version 0.17.6.
- supports_contact_search()¶
- Returns:
True
ifTelepathyGLib.ContactSearch
can be used.- with_limit:
if not
None
, used to returnTrue
if the limit parameter toTelepathyGLib.ContactSearch.new_async
() andTelepathyGLib.ContactSearch.reset_async
() can be nonzero- with_server:
if not
None
, used to returnTrue
if the server parameter toTelepathyGLib.ContactSearch.new_async
() andTelepathyGLib.ContactSearch.reset_async
() can be non-None
- Return type:
Return whether this protocol or connection can perform contact searches. Optionally, also return whether a limited number of results can be specified, and whether alternative servers can be searched.
New in version 0.13.11.
- supports_dbus_tubes(handle_type, service_name)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – the handle type of the tube (eitherTelepathyGLib.HandleType.CONTACT
orTelepathyGLib.HandleType.ROOM
)
- Returns:
True
if the contact or connection supports this type of D-Bus tubes.- Return type:
If the
TelepathyGLib.Capabilities
:contact-specific
property isTrue
, this function checks if the contact associated with thisTelepathyGLib.Capabilities
supports D-Bus tubes with handle_type as TargetHandleType. If service_name is notNone
, it also checks if it supports stream tubes with service asTelepathyGLib.PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME
.If the
TelepathyGLib.Capabilities
:contact-specific
property isFalse
, 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.New in version 0.13.0.
- supports_file_transfer()¶
- Returns:
True
if a channel request containing FileTransfer as ChannelType, HandleTypeContact as TargetHandleType and a contact identifier can be expected to work,False
otherwise.- Return type:
Return whether private file transfer can be established by providing a contact identifier.
New in version 0.17.6.
- supports_file_transfer_description()¶
- Returns:
True
if requests as described forTelepathyGLib.Capabilities.supports_file_transfer
() can also specify the outgoing file’s description- Return type:
New in version 0.19.0.
- supports_file_transfer_initial_offset()¶
- Returns:
True
if requests as described forTelepathyGLib.Capabilities.supports_file_transfer
() can also specify an initial offset greater than 0- Return type:
Return whether an initial offset other than 0 can be specified on outgoing file transfers. This can be used to resume partial transfers, by omitting the part that has already been sent.
New in version 0.19.0.
- supports_file_transfer_timestamp()¶
- Returns:
True
if requests as described forTelepathyGLib.Capabilities.supports_file_transfer
() can also specify the outgoing file’s timestamp- Return type:
New in version 0.19.0.
- supports_file_transfer_uri()¶
- Returns:
True
if requests as described forTelepathyGLib.Capabilities.supports_file_transfer
() can also specify the outgoing file’s URI- Return type:
New in version 0.19.0.
- supports_room_list()¶
- Returns:
True
if a channel request containing RoomList as ChannelType, HandleTypeNone as TargetHandleType can be expected to work,False
otherwise.- with_server:
if not
None
, used to returnTrue
if theTelepathyGLib.PROP_CHANNEL_TYPE_ROOM_LIST_SERVER
property can be defined when requesting a RoomList channel.
- Return type:
Discovers whether this protocol or connection supports listing rooms. Specifically, if this function returns
True
, a room list channel can be requested as follows:GHashTable *request; TpAccountChannelRequest *req; request = tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_ROOM_LIST, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_NONE, NULL); req = tp_account_channel_request_new (account, request, TP_USER_ACTION_TIME_CURRENT_TIME); tp_account_channel_request_create_and_handle_channel_async (req, NULL, create_channel_cb, NULL); g_object_unref (req); g_hash_table_unref (request);
If with_server is set to
True
, a list of rooms on a particular server can be requested as follows:/\* Same code as above but with request defined using: *\/ request = tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_ROOM_LIST, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_NONE, TP_PROP_CHANNEL_TYPE_ROOM_LIST_SERVER, G_TYPE_STRING, "characters.shakespeare.lit", NULL);
New in version 0.13.14.
- supports_sms()¶
- Returns:
True
if a channel request containing Text as ChannelType, HandleTypeContact as TargetHandleType, a channel identifier andTelepathyGLib.PROP_CHANNEL_INTERFACE_SMS_SMS_CHANNEL
set toTrue
can be expected to work,False
otherwise.- Return type:
If the
TelepathyGLib.Capabilities
:contact-specific
property isFalse
, this function checks if SMS text channels can be requested with the connection associated with thisTelepathyGLib.Capabilities
.If the
TelepathyGLib.Capabilities
:contact-specific
property isTrue
, this function checks if the contact associated with thisTelepathyGLib.Capabilities
supports SMS text channels.New in version 0.19.0.
- supports_stream_tubes(handle_type, service)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – the handle type of the tube (eitherTelepathyGLib.HandleType.CONTACT
orTelepathyGLib.HandleType.ROOM
)
- Returns:
True
if the contact or connection supports this type of stream tubes.- Return type:
If the
TelepathyGLib.Capabilities
:contact-specific
property isTrue
, this function checks if the contact associated with thisTelepathyGLib.Capabilities
supports stream tubes with handle_type as TargetHandleType. If service is notNone
, it also checks if it supports stream tubes with service asTelepathyGLib.PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE
.If the
TelepathyGLib.Capabilities
:contact-specific
property isFalse
, this function checks if the connection supports requesting stream tube channels with handle_type as ChannelType. The service argument is unused in this case.New in version 0.13.0.
- supports_text_chatrooms()¶
- Returns:
True
if a channel request containing Text as ChannelType, HandleTypeRoom as TargetHandleType and a channel identifier can be expected to work,False
otherwise.- Return type:
If the
TelepathyGLib.Capabilities
:contact-specific
property isFalse
, this function checks if named text chatrooms can be joined by providing a chatroom identifier, for instance by callingTelepathyGLib.AccountChannelRequest.new_text
() followed byTelepathyGLib.AccountChannelRequest.set_target_id
() withTelepathyGLib.HandleType.ROOM
.If the
TelepathyGLib.Capabilities
:contact-specific
property isTrue
, this function checks if the contact associated with thisTelepathyGLib.Capabilities
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
.New in version 0.11.3.
- supports_text_chats()¶
- Returns:
True
if a channel request containing Text as ChannelType, HandleTypeContact as TargetHandleType and a contact identifier can be expected to work,False
otherwise.- Return type:
Return whether private text channels can be established by providing a contact identifier, for instance by calling
TelepathyGLib.AccountChannelRequest.new_text
() followed byTelepathyGLib.AccountChannelRequest.set_target_contact
().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
.New in version 0.11.3.
Property Details¶
- TelepathyGLib.Capabilities.props.channel_classes_variant¶
- Name:
channel-classes-variant
- Type:
- Default Value:
- Flags:
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
GLib.Variant
of type a(a{sv}as).The higher-level methods like
TelepathyGLib.Capabilities.supports_text_chats
() are likely to be more useful to the majority of clients.New in version 0.19.0.
- TelepathyGLib.Capabilities.props.contact_specific¶
- Name:
contact-specific
- Type:
- Default Value:
- Flags:
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.