Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- TelepathyGLib.AccountChannelRequestDelegatedChannelCb(request, channel, *user_data)¶
- Parameters:
request (
TelepathyGLib.AccountChannelRequest
) – aTelepathyGLib.AccountChannelRequest
instancechannel (
TelepathyGLib.Channel
) – aTelepathyGLib.Channel
user_data (
object
orNone
) – arbitrary user-supplied data passed toTelepathyGLib.AccountChannelRequest.set_delegated_channel_callback
()
Called when a client asked us to delegate channel to another Handler. When this function is called you are no longer handling channel.
New in version 0.15.3.
- TelepathyGLib.BaseClientClassAddDispatchOperationImpl(client, account, connection, channels, dispatch_operation, context)¶
- Parameters:
client (
TelepathyGLib.BaseClient
) – aTelepathyGLib.BaseClient
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
with %TP_ACCOUNT_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_account_features
() orTelepathyGLib.SimpleClientFactory.add_account_features
(), prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
with %TP_CONNECTION_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_connection_features
(), orTelepathyGLib.SimpleClientFactory.add_connection_features
(), prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, each with %TP_CHANNEL_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_channel_features
() orTelepathyGLib.SimpleClientFactory.add_channel_features
(), prepared if possibledispatch_operation (
TelepathyGLib.ChannelDispatchOperation
) – aTelepathyGLib.ChannelDispatchOperation
having %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE prepared if possiblecontext (
TelepathyGLib.AddDispatchOperationContext
) – aTelepathyGLib.ObserveChannelsContext
representing the context of this D-Bus call
Signature of the implementation of the AddDispatchOperation method.
This function must call either
TelepathyGLib.AddDispatchOperationContext.accept
(),TelepathyGLib.AddDispatchOperationContext.delay
() orTelepathyGLib.AddDispatchOperationContext.fail
() on context before it returns.The implementation can then use
TelepathyGLib.ChannelDispatchOperation.handle_with_async
() to approve handling of the channels, orTelepathyGLib.ChannelDispatchOperation.claim_async
() to take responsibility for handling or closing them”.New in version 0.11.5.
- TelepathyGLib.BaseClientClassHandleChannelsImpl(client, account, connection, channels, requests_satisfied, user_action_time, context)¶
- Parameters:
client (
TelepathyGLib.BaseClient
) – aTelepathyGLib.BaseClient
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
with %TP_ACCOUNT_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_account_features
() orTelepathyGLib.SimpleClientFactory.add_account_features
(), prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
with %TP_CONNECTION_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_connection_features
(), orTelepathyGLib.SimpleClientFactory.add_connection_features
(), prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, each with %TP_CHANNEL_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_channel_features
() orTelepathyGLib.SimpleClientFactory.add_channel_features
(), prepared if possiblerequests_satisfied ([
TelepathyGLib.ChannelRequest
]) – aGLib.List
ofTelepathyGLib.ChannelRequest
having their object-path defined but are not guaranteed to be prepared.user_action_time (
int
) – the time at which user action occurred, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
for details)context (
TelepathyGLib.HandleChannelsContext
) – aTelepathyGLib.HandleChannelsContext
representing the context of this D-Bus call
Signature of the implementation of the HandleChannels method.
This function must call either
TelepathyGLib.HandleChannelsContext.accept
(),TelepathyGLib.HandleChannelsContext.delay
() orTelepathyGLib.HandleChannelsContext.fail
() on context before it returns.New in version 0.11.6.
- TelepathyGLib.BaseClientClassObserveChannelsImpl(client, account, connection, channels, dispatch_operation, requests, context)¶
- Parameters:
client (
TelepathyGLib.BaseClient
) – aTelepathyGLib.BaseClient
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
with %TP_ACCOUNT_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_account_features
() orTelepathyGLib.SimpleClientFactory.add_account_features
(), prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
with %TP_CONNECTION_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_connection_features
(), orTelepathyGLib.SimpleClientFactory.add_connection_features
(), prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, each with %TP_CHANNEL_FEATURE_CORE, and any other features added viaTelepathyGLib.BaseClient.add_channel_features
() orTelepathyGLib.SimpleClientFactory.add_channel_features
(), prepared if possibledispatch_operation (
TelepathyGLib.ChannelDispatchOperation
orNone
) – aTelepathyGLib.ChannelDispatchOperation
orNone
; the dispatch_operation is not guaranteed to be preparedrequests ([
TelepathyGLib.ChannelRequest
]) – aGLib.List
ofTelepathyGLib.ChannelRequest
having their object-path defined but are not guaranteed to be prepared.context (
TelepathyGLib.ObserveChannelsContext
) – aTelepathyGLib.ObserveChannelsContext
representing the context of this D-Bus call
Signature of the implementation of the ObserveChannels method.
This function must call either
TelepathyGLib.ObserveChannelsContext.accept
(),TelepathyGLib.ObserveChannelsContext.delay
() orTelepathyGLib.ObserveChannelsContext.fail
() on context before it returns.New in version 0.11.5.
- TelepathyGLib.BaseClientDelegatedChannelsCb(client, channels, *user_data)¶
- Parameters:
client (
TelepathyGLib.BaseClient
) – aTelepathyGLib.BaseClient
instancechannels ([
TelepathyGLib.Channel
]) – aGLib.PtrArray
ofTelepathyGLib.Channel
user_data (
object
orNone
) – arbitrary user-supplied data passed toTelepathyGLib.BaseClient.set_delegated_channels_callback
()
Called when a client asked us to delegate channels to another Handler. When this function is called client is not longer handling channels.
New in version 0.15.3.
- TelepathyGLib.BaseConnectionGetUniqueConnectionNameImpl(self)¶
- Parameters:
self (
TelepathyGLib.BaseConnection
) – The implementation, a subclass ofTelepathyGLib.BaseConnection
- Returns:
a name for this connection which will be unique within this connection manager process, as a string which the caller must free with
GLib.free
.- Return type:
Signature of the get_unique_connection_name virtual method on
TelepathyGLib.BaseConnection
.
- TelepathyGLib.BaseConnectionProc(self)¶
- Parameters:
self (
TelepathyGLib.BaseConnection
) – The connection object
Signature of a virtual method on
TelepathyGLib.BaseConnection
that takes no additional parameters and returns nothing.
- TelepathyGLib.BaseConnectionStartConnectingImpl(self)¶
- Parameters:
self (
TelepathyGLib.BaseConnection
) – The connection object- Returns:
- Return type:
Signature of an implementation of the start_connecting method of
TelepathyGLib.BaseConnection
.On entry, the implementation may assume that it is in state NEW.
If
True
is returned, the Connect D-Bus method succeeds; the implementation must either have already set the status to CONNECTED by callingTelepathyGLib.BaseConnection.change_status
(), or have arranged for a status change to either state DISCONNECTED or CONNECTED to be signalled by callingTelepathyGLib.BaseConnection.change_status
() at some later time. If the status is still NEW after returningTrue
,TelepathyGLib.BaseConnection
will automatically change it to CONNECTING for reason REQUESTED.If
False
is returned, the error will be raised from Connect as an exception. If the status is not DISCONNECTED afterFalse
is returned,TelepathyGLib.BaseConnection
will automatically change it to DISCONNECTED with a reason appropriate to the error; NetworkError results in NETWORK_ERROR, PermissionDenied results in AUTHENTICATION_FAILED, and all other errors currently result in NONE_SPECIFIED.All except the simplest connection managers are expected to implement this asynchronously, returning
True
in most cases and changing the status to CONNECTED or DISCONNECTED later.
- TelepathyGLib.ChannelWhenReadyCb(channel, error, *user_data)¶
- Parameters:
channel (
TelepathyGLib.Channel
) – the channel (which may be in the middle of being disposed, if error is non-None
, error->domain is TP_DBUS_ERRORS and error->code isTelepathyGLib.DBusError.PROXY_UNREFERENCED
)error (
GLib.Error
) –None
if the channel is ready for use, or the error with which it was invalidated if it is now invaliduser_data (
object
orNone
) – whatever was passed to tp_channel_call_when_ready()
Signature of a callback passed to tp_channel_call_when_ready(), which will be called exactly once, when the channel becomes ready or invalid (whichever happens first)
Deprecated since version 0.17.6.
- TelepathyGLib.ConnectionContactsByHandleCb(connection, contacts, failed, error, user_data, weak_object)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – The connectioncontacts ([
TelepathyGLib.Contact
]) – An array of n_contactsTelepathyGLib.Contact
objects (this callback is not given a reference to any of these objects, and must callGObject.Object.ref
() on any that it will keep), orNone
on unrecoverable errorsfailed ([
int
]) – An array of n_failed handles that were passed toTelepathyGLib.Connection.get_contacts_by_handle
() but turned out to be invalid (or on unrecoverable errors, all the handles that were given)error (
GLib.Error
) –None
on success, or an unrecoverable error that caused everything to failuser_data (
object
orNone
) – the user_data that was passed toTelepathyGLib.Connection.get_contacts_by_handle
()weak_object (
GObject.Object
) – the weak_object that was passed toTelepathyGLib.Connection.get_contacts_by_handle
()
Signature of a callback used to receive the result of
TelepathyGLib.Connection.get_contacts_by_handle
().If an unrecoverable error occurs (for instance, if connection becomes disconnected) the whole operation fails, and no contacts or invalid handles are returned.
If some or even all of the handles passed to
TelepathyGLib.Connection.get_contacts_by_handle
() were not valid, this is not considered to be a failure. error will beNone
in this situation, contacts will contain contact objects for those handles that were valid (possibly none of them), and invalid will contain the handles that were not valid.New in version 0.7.18.
- TelepathyGLib.ConnectionContactsByIdCb(connection, contacts, requested_ids, failed_id_errors, error, user_data, weak_object)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – The connectioncontacts ([
TelepathyGLib.Contact
]) – An array of n_contactsTelepathyGLib.Contact
objects (this callback is not given a reference to any of these objects, and must callGObject.Object.ref
() on any that it will keep), orNone
on unrecoverable errorsrequested_ids ([
str
]) – An array of n_contacts valid IDs (JIDs, SIP URIs etc.) that were passed toTelepathyGLib.Connection.get_contacts_by_id
(), in an order corresponding to contacts, orNone
on unrecoverable errorsfailed_id_errors ({
str
:GLib.Error
}) – A hash table in which the keys are IDs and the values are errors (GLib.Error
)error (
GLib.Error
) –None
on success, or an unrecoverable error that caused everything to failuser_data (
object
orNone
) – the user_data that was passed toTelepathyGLib.Connection.get_contacts_by_id
()weak_object (
GObject.Object
) – the weak_object that was passed toTelepathyGLib.Connection.get_contacts_by_id
()
Signature of a callback used to receive the result of
TelepathyGLib.Connection.get_contacts_by_id
().requested_ids contains the IDs that were converted to handles successfully. The normalized form of requested_ids[i] is
TelepathyGLib.Contact.get_identifier
(contacts[i]).If some or even all of the ids passed to
TelepathyGLib.Connection.get_contacts_by_id
() were not valid, this is not considered to be a fatal error. error will beNone
in this situation, contacts will contain contact objects for those IDs that were valid (it may be empty), and failed_id_errors will map the IDs that were not valid to a correspondingGLib.Error
(if the connection manager complies with the Telepathy spec, it will have domain %TP_ERROR and codeTelepathyGLib.Error.INVALID_HANDLE
).If an unrecoverable error occurs (for instance, if connection becomes disconnected) the whole operation fails, and no contacts or requested IDs are returned. failed_id_errors will contain all the IDs that were requested, mapped to a corresponding
GLib.Error
(either one indicating that the ID was invalid, if that was determined before the fatal error occurred, or a copy of error).New in version 0.7.18.
- TelepathyGLib.ConnectionHoldHandlesCb(connection, handle_type, n_handles, handles, error, user_data, weak_object)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – the connectionhandle_type (
TelepathyGLib.HandleType
) – the handle type that was passed toTelepathyGLib.Connection.hold_handles
()n_handles (
int
) – the number of handles that were passed toTelepathyGLib.Connection.hold_handles
() on success, or 0 on failurehandles (
int
) – a copy of the array of n_handles handles that was passed toTelepathyGLib.Connection.hold_handles
() on success, orNone
on failureerror (
GLib.Error
) –None
on success, or an error on failureuser_data (
object
orNone
) – the same arbitrary pointer that was passed toTelepathyGLib.Connection.hold_handles
()weak_object (
GObject.Object
) – the same object that was passed toTelepathyGLib.Connection.hold_handles
()
Signature of the callback called when
TelepathyGLib.Connection.hold_handles
() succeeds or fails.On success, the caller has a reference to each handle in handles.
Since telepathy-glib version 0.13.8, the handles will remain valid until connection becomes invalid (signalled by
TelepathyGLib.Proxy
::invalidated
). In earlier versions, they could be released withTelepathyGLib.Connection.unref_handles
().For convenience, the handle type and handles requested by the caller are passed through to this callback on success, so the caller does not have to include them in user_data.
Deprecated since version ???: See
TelepathyGLib.Connection.hold_handles
().
- TelepathyGLib.ConnectionManagerListCb(cms, n_cms, error, user_data, weak_object)¶
- Parameters:
cms ([
TelepathyGLib.ConnectionManager
]) –None
-terminated array ofTelepathyGLib.ConnectionManager
(the objects will be unreferenced and the array will be freed after the callback returns, so the callback must reference any CMs it stores a pointer to), orNone
on errorn_cms (
int
) – number of connection managers in cms (not including the finalNone
)error (
GLib.Error
) –None
on success, or an error that occurredweak_object (
GObject.Object
) – user-supplied weakly referenced object
Signature of the callback supplied to
TelepathyGLib.list_connection_managers
().Since 0.11.3,
TelepathyGLib.list_connection_managers
() will wait for %TP_CONNECTION_MANAGER_FEATURE_CORE to be prepared on each connection manager passed to callback, unless an error occurred while launching that connection manager.New in version 0.7.1.
- TelepathyGLib.ConnectionManagerWhenReadyCb(cm, error, user_data, weak_object)¶
- Parameters:
cm (
TelepathyGLib.ConnectionManager
) – a connection managererror (
GLib.Error
) –None
on success, or the reason why tp_connection_manager_is_ready() would returnFalse
user_data (
object
orNone
) – the user_data passed to tp_connection_manager_call_when_ready()weak_object (
GObject.Object
) – the weak_object passed to tp_connection_manager_call_when_ready()
Called as the result of tp_connection_manager_call_when_ready(). If the connection manager’s protocol and parameter information could be retrieved, error is
None
and cm is considered to be ready. Otherwise, error is non-None
and cm is not ready.Deprecated since version ???: since 0.17.6, use
TelepathyGLib.Proxy.prepare_async
() instead
- TelepathyGLib.ConnectionNameListCb(names, n, cms, protocols, error, user_data, weak_object)¶
- Parameters:
names ([
str
]) –None
-terminated array of n connection bus names, orNone
on errorn (
int
) – number of names (not including the finalNone
), or 0 on errorcms ([
str
]) –None
-terminated array of n connection manager names (e.g. “gabble”) in the same order as names, orNone
on errorprotocols ([
str
]) –None
-terminated array of n protocol names as defined in the Telepathy spec (e.g. “jabber”) in the same order as names, orNone
on errorerror (
GLib.Error
) –None
on success, or an error that occurredweak_object (
GObject.Object
) – user-supplied weakly referenced object
Signature of the callback supplied to
TelepathyGLib.list_connection_names
().New in version 0.7.1.
- TelepathyGLib.ConnectionRequestHandlesCb(connection, handle_type, handles, ids, error, user_data, weak_object)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – the connectionhandle_type (
TelepathyGLib.HandleType
) – the handle type that was passed toTelepathyGLib.Connection.request_handles
()handles ([
int
]) – the n_handles handles corresponding to ids, in the same order, orNone
on failureids ([
str
]) – a copy of the array of n_handles IDs that was passed toTelepathyGLib.Connection.request_handles
() on success, orNone
on failureerror (
GLib.Error
) –None
on success, or an error on failureuser_data (
object
orNone
) – the same arbitrary pointer that was passed toTelepathyGLib.Connection.request_handles
()weak_object (
GObject.Object
) – the same object that was passed toTelepathyGLib.Connection.request_handles
()
Signature of the callback called when
TelepathyGLib.Connection.request_handles
() succeeds or fails.On success, the caller has a reference to each handle in handles.
Since telepathy-glib version 0.13.8, the handles will remain valid until connection becomes invalid (signalled by
TelepathyGLib.Proxy
::invalidated
). In earlier versions, they could be released withTelepathyGLib.Connection.unref_handles
().For convenience, the handle type and IDs requested by the caller are passed through to this callback, so the caller does not have to include them in user_data.
Deprecated since version ???: See
TelepathyGLib.Connection.request_handles
().
- TelepathyGLib.ConnectionUpgradeContactsCb(connection, contacts, error, user_data, weak_object)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – The connectioncontacts ([
TelepathyGLib.Contact
]) – An array of n_contactsTelepathyGLib.Contact
objects (this callback is not given an extra reference to any of these objects, and must callGObject.Object.ref
() on any that it will keep)error (
GLib.Error
) – An unrecoverable error, orNone
if the connection remains validuser_data (
object
orNone
) – the user_data that was passed toTelepathyGLib.Connection.upgrade_contacts
()weak_object (
GObject.Object
) – the weak_object that was passed toTelepathyGLib.Connection.upgrade_contacts
()
Signature of a callback used to receive the result of
TelepathyGLib.Connection.upgrade_contacts
().If an unrecoverable error occurs (for instance, if connection becomes disconnected) it is indicated by error, but the contacts in contacts are still provided.
New in version 0.7.18.
- TelepathyGLib.ConnectionWhenReadyCb(connection, error, *user_data)¶
- Parameters:
connection (
TelepathyGLib.Connection
) – the connection (which may be in the middle of being disposed, if error is non-None
, error->domain is TP_DBUS_ERRORS and error->code isTelepathyGLib.DBusError.PROXY_UNREFERENCED
)error (
GLib.Error
) –None
if the connection is ready for use, or the error with which it was invalidated if it is now invaliduser_data (
object
orNone
) – whatever was passed to tp_connection_call_when_ready()
Signature of a callback passed to tp_connection_call_when_ready(), which will be called exactly once, when the connection becomes ready or invalid (whichever happens first)
Deprecated since version 0.17.6.
- TelepathyGLib.DBusDaemonListNamesCb(bus_daemon, names, error, user_data, weak_object)¶
- Parameters:
bus_daemon (
TelepathyGLib.DBusDaemon
) – object representing a connection to a busnames (
str
) – constantNone
-terminated array of constant strings representing bus names, orNone
on errorerror (
GLib.Error
) – the error that occurred, orNone
on successuser_data (
object
orNone
) – the same user data that was passed toTelepathyGLib.DBusDaemon.list_names
orTelepathyGLib.DBusDaemon.list_activatable_names
weak_object (
GObject.Object
) – the same object that was passed toTelepathyGLib.DBusDaemon.list_names
orTelepathyGLib.DBusDaemon.list_activatable_names
Signature of a callback for functions that list bus names.
New in version 0.7.35.
- TelepathyGLib.DBusDaemonNameOwnerChangedCb(bus_daemon, name, new_owner, *user_data)¶
- Parameters:
bus_daemon (
TelepathyGLib.DBusDaemon
) – The D-Bus daemonname (
str
) – The name whose ownership has changed or been discoverednew_owner (
str
) – The unique name that now owns nameuser_data (
object
orNone
) – Arbitrary user-supplied data as passed toTelepathyGLib.DBusDaemon.watch_name_owner
()
The signature of the callback called by
TelepathyGLib.DBusDaemon.watch_name_owner
().New in version 0.7.1.
- TelepathyGLib.DBusPropertiesMixinGetter(object, iface, name, value, getter_data)¶
- Parameters:
object (
GObject.Object
) – The exported object with the propertiesiface (
int
) – A quark representing the D-Bus interface namename (
int
) – A quark representing the D-Bus property namevalue (
GObject.Value
) – AGObject.Value
pre-initialized to the right type, into which to put the valuegetter_data (
object
orNone
) – The getter_data from theTelepathyGLib.DBusPropertiesMixinPropImpl
Signature of a callback used to get the value of a property.
For simplicity, in this mixin we don’t allow getting a property to fail; implementations must always be prepared to return *something*.
- TelepathyGLib.DBusPropertiesMixinSetter(object, iface, name, value, setter_data)¶
- Parameters:
object (
GObject.Object
) – The exported object with the propertiesiface (
int
) – A quark representing the D-Bus interface namename (
int
) – A quark representing the D-Bus property namevalue (
GObject.Value
) – The new value for the propertysetter_data (
object
orNone
) – The setter_data from theTelepathyGLib.DBusPropertiesMixinPropImpl
- Returns:
- Return type:
Signature of a callback used to get the value of a property.
- TelepathyGLib.GroupMixinAddMemberFunc(obj, handle, message)¶
- Parameters:
obj (
GObject.Object
) – An object implementing the group interface with this mixinhandle (
int
) – The handle of the contact to be addedmessage (
str
) – A message to be sent if the protocol supports it
- Returns:
- Return type:
Signature of the callback used to add a member to the group. This should perform the necessary operations in the underlying IM protocol to cause the member to be added.
- TelepathyGLib.GroupMixinRemMemberFunc(obj, handle, message)¶
- Parameters:
obj (
GObject.Object
) – An object implementing the group interface with this mixinhandle (
int
) – The handle of the contact to be removedmessage (
str
) – A message to be sent if the protocol supports it
- Returns:
- Return type:
Signature of the callback used to remove a member from the group. This should perform the necessary operations in the underlying IM protocol to cause the member to be removed.
- TelepathyGLib.GroupMixinRemMemberWithReasonFunc(obj, handle, message, reason)¶
- Parameters:
obj (
GObject.Object
) – An object implementing the group interface with this mixinhandle (
int
) – The handle of the contact to be removedmessage (
str
) – A message to be sent if the protocol supports itreason (
int
) – ATelepathyGLib.ChannelGroupChangeReason
indicating the reason
- Returns:
- Return type:
Signature of the callback used to remove a member from the group. This should perform the necessary operations in the underlying IM protocol to cause the member to be removed.
Set this with tp_group_mixin_class_set_remove_with_reason_func(), .
- TelepathyGLib.IntFunc(i, userdata)¶
-
A callback function acting on unsigned integers.
- TelepathyGLib.PresenceMixinGetMaximumStatusMessageLengthFunc(obj)¶
- Parameters:
obj (
GObject.Object
) – An object with this mixin.- Returns:
the maximum number of UTF-8 characters which may appear in a status message, or 0 if there is no limit.
- Return type:
Signature of a callback used to determine the maximum length of status messages. If this callback is provided and returns non-zero, the
TelepathyGLib.PresenceMixinSetOwnStatusFunc
implementation is responsible for truncating the message to fit this limit, if necessary.New in version 0.14.5.
- TelepathyGLib.PresenceMixinSetOwnStatusFunc(obj, status)¶
- Parameters:
obj (
GObject.Object
) – An object with this mixin.status (
TelepathyGLib.PresenceStatus
) – The status to set, orNone
for whatever the protocol defines as a “default” status
- Returns:
- Return type:
Signature of the callback used to commit changes to the user’s own presence status in SetStatuses. It is also used in ClearStatus and RemoveStatus to reset the user’s own status back to the “default” one with a
None
status argument.The optional_arguments hash table in status, if not
None
, will have been filtered so it only contains recognised parameters, so the callback need not (and cannot) check for unrecognised parameters. However, the types of the parameters are not currently checked, so the callback is responsible for doing so.The callback is responsible for emitting PresenceUpdate, if appropriate, by calling tp_presence_mixin_emit_presence_update().
- TelepathyGLib.PresenceMixinStatusAvailableFunc(obj, which)¶
- Parameters:
obj (
GObject.Object
) – An instance of aTelepathyGLib.BaseConnection
subclass implementing the presence interface with this mixinwhich (
int
) – An index into the array ofTelepathyGLib.PresenceStatusSpec
provided to tp_presence_mixin_class_init()
- Returns:
True
if the status can be set on this connection;False
if not.- Return type:
Signature of a callback to be used to determine if a given presence status can be set on the connection. Most users of this mixin do not need to supply an implementation of this callback: the value of TelepathyGLib.PresenceStatusSpec.self is enough to determine whether this is a user-settable presence, so
None
should be passed to tp_presence_mixin_class_init() for this callback.One place where this callback may be needed is on XMPP: not all server implementation support the user becoming invisible. So an XMPP implementation would implement this function, so that—once connected—the hidden status is only available if the server supports it. Before the connection is connected, this callback should return
True
for every status that might possibly be supported: this allows the user to at least try to sign in as invisible.
- TelepathyGLib.ProxyPrepareAsync(proxy, feature, callback, *user_data)¶
- Parameters:
proxy (
TelepathyGLib.Proxy
) – the object on which feature has to be preparedfeature (
TelepathyGLib.ProxyFeature
) – a #GQuark representing the feature to preparecallback (
Gio.AsyncReadyCallback
orNone
) – called when the feature has been prepared, or the preparation failed
Function called when feature has to be prepared for proxy.
- TelepathyGLib.SimpleApproverAddDispatchOperationImpl(approver, account, connection, channels, dispatch_operation, context, *user_data)¶
- Parameters:
approver (
TelepathyGLib.SimpleApprover
) – aTelepathyGLib.SimpleApprover
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
having %TP_ACCOUNT_FEATURE_CORE prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
having %TP_CONNECTION_FEATURE_CORE prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, all having %TP_CHANNEL_FEATURE_CORE prepareddispatch_operation (
TelepathyGLib.ChannelDispatchOperation
orNone
) – aTelepathyGLib.ChannelDispatchOperation
orNone
; the dispatch_operation is not guaranteed to be preparedcontext (
TelepathyGLib.AddDispatchOperationContext
) – aTelepathyGLib.AddDispatchOperationContext
representing the context of this D-Bus calluser_data (
object
orNone
) – arbitrary user-supplied data passed toTelepathyGLib.SimpleApprover.new
()
Signature of the implementation of the AddDispatchOperation method.
This function must call either
TelepathyGLib.AddDispatchOperationContext.accept
(),TelepathyGLib.AddDispatchOperationContext.delay
() orTelepathyGLib.AddDispatchOperationContext.fail
() on context before it returns.New in version 0.11.5.
- TelepathyGLib.SimpleHandlerHandleChannelsImpl(handler, account, connection, channels, requests_satisfied, user_action_time, context, *user_data)¶
- Parameters:
handler (
TelepathyGLib.SimpleHandler
) – aTelepathyGLib.SimpleHandler
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
having %TP_ACCOUNT_FEATURE_CORE prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
having %TP_CONNECTION_FEATURE_CORE prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, all having %TP_CHANNEL_FEATURE_CORE prepared if possiblerequests_satisfied ([
TelepathyGLib.ChannelRequest
]) – aGLib.List
ofTelepathyGLib.ChannelRequest
having their object-path defined but are not guaranteed to be prepared.user_action_time (
int
) – the time at which user action occurred, or one of the special valuesTelepathyGLib.USER_ACTION_TIME_NOT_USER_ACTION
or %TP_USER_ACTION_TIME_CURRENT_TIME (seeTelepathyGLib.AccountChannelRequest
:user-action-time
for details)context (
TelepathyGLib.HandleChannelsContext
) – aTelepathyGLib.HandleChannelsContext
representing the context of this D-Bus calluser_data (
object
orNone
) – arbitrary user-supplied data passed toTelepathyGLib.SimpleHandler.new
()
Signature of the implementation of the HandleChannels method.
This function must call either
TelepathyGLib.HandleChannelsContext.accept
(),TelepathyGLib.HandleChannelsContext.delay
() orTelepathyGLib.HandleChannelsContext.fail
() on context before it returns.New in version 0.11.6.
- TelepathyGLib.SimpleObserverObserveChannelsImpl(observer, account, connection, channels, dispatch_operation, requests, context, *user_data)¶
- Parameters:
observer (
TelepathyGLib.SimpleObserver
) – aTelepathyGLib.SimpleObserver
instanceaccount (
TelepathyGLib.Account
) – aTelepathyGLib.Account
having %TP_ACCOUNT_FEATURE_CORE prepared if possibleconnection (
TelepathyGLib.Connection
) – aTelepathyGLib.Connection
having %TP_CONNECTION_FEATURE_CORE prepared if possiblechannels ([
TelepathyGLib.Channel
]) – aGLib.List
ofTelepathyGLib.Channel
, all having %TP_CHANNEL_FEATURE_CORE prepared if possibledispatch_operation (
TelepathyGLib.ChannelDispatchOperation
orNone
) – aTelepathyGLib.ChannelDispatchOperation
orNone
; the dispatch_operation is not guaranteed to be preparedrequests ([
TelepathyGLib.ChannelRequest
]) – aGLib.List
ofTelepathyGLib.ChannelRequest
, all having their object-path defined but are not guaranteed to be prepared.context (
TelepathyGLib.ObserveChannelsContext
) – aTelepathyGLib.ObserveChannelsContext
representing the context of this D-Bus calluser_data (
object
orNone
) – arbitrary user-supplied data passed toTelepathyGLib.SimpleObserver.new
()
Signature of the implementation of the ObserveChannels method.
This function must call either
TelepathyGLib.ObserveChannelsContext.accept
(),TelepathyGLib.ObserveChannelsContext.delay
() orTelepathyGLib.ObserveChannelsContext.fail
() on context before it returns.New in version 0.11.5.