The Telepathy Account Manager stores the user's configured real-time
communication accounts. This object represents a stored account.
If this account is deleted from the account manager, the
#TpProxy::invalidated signal will be emitted
with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_OBJECT_REMOVED.
One can connect to the #GObject::notify signal to get change notifications
for many of the properties on this object. Refer to each property's
documentation for whether it can be used in this way.
Convenience function to create a new account proxy. The returned #TpAccount
is not guaranteed to be ready at the point of return.
not valid
a new reference to an account proxy, or %NULL if @object_path is
Proxy for the D-Bus daemon
The non-NULL object path of this account
<!-- -->
#TpAccount
the quark used for representing the core feature of a
Validates and parses a Telepathy Account's object path, extracting the
connection manager's name, the protocol, and the account's unique identifier
from the path. This includes replacing underscores with hyphens in the
protocol name, as defined in the Account specification.
Any of the out parameters may be %NULL if not needed. If %TRUE is returned,
the caller is responsible for freeing the strings stored in any non-%NULL
out parameters, using g_free().
%TRUE if @object_path was successfully parsed; %FALSE and sets
a Telepathy Account's object path
location at which to store the account's connection manager's name
location at which to store the account's protocol
location at which to store the account's unique identifier
Ensure that the known interfaces for TpAccount have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_ACCOUNT.
<!-- -->
connection property
Set the connection of the account by specifying the connection object path.
This function does not return a new ref and it is not guaranteed that the
returned #TpConnection object is ready.
The use-case for this function is in a HandleChannels callback and you
already know the object path for the connection, so you can let @account
create its #TpConnection and return it for use.
the object path @path is invalid or it is the null-value "/"
the connection of the account, or %NULL if either
the path to connection object for #TpAccount
<!-- -->
the same as the #TpAccount:display-name property
<!-- -->
the same as the #TpAccount:connection-manager property
<!-- -->
the same as the #TpAccount:protocol property
<!-- -->
the same as the #TpAccount:service property
<!-- -->
the same as the #TpAccount:icon-name property
Requests an asynchronous set of the Enabled property of @account. When the
operation is finished, @callback will be called. You can then call
tp_account_set_enabled_finish() to get the result of the operation.
the new enabled value of @account
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async set of the Enabled property.
%TRUE if the set was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous reconnect of @account. When the operation is
finished, @callback will be called. You can then call
tp_account_reconnect_finish() to get the result of the operation.
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async reconnect of @account.
%TRUE if the reconnect call was successful, otherwise %FALSE
a #GAsyncResult
<!-- -->
the same as the #TpAccount:enabled property
<!-- -->
the same as the #TpAccount:valid property
Requests an asynchronous update of parameters of @account. When the
operation is finished, @callback will be called. You can then call
tp_account_update_parameters_finish() to get the result of the operation.
new parameters to set on @account
list of parameters to unset on @account
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async update of the parameters on @account.
%TRUE if the request succeeded, otherwise %FALSE
a #GAsyncResult
a #GStrv to fill with properties that need a reconnect to take effect
Requests an asynchronous removal of @account. When the operation is
finished, @callback will be called. You can then call
tp_account_remove_finish() to get the result of the operation.
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async removal of @account.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous set of the DisplayName property of @account. When
the operation is finished, @callback will be called. You can then call
tp_account_set_display_name_finish() to get the result of the operation.
a new display name, or %NULL to unset the display name
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async set of the DisplayName property.
%TRUE if the call was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous set of the Icon property of @account. When
the operation is finished, @callback will be called. You can then call
tp_account_set_icon_name_finish() to get the result of the operation.
a new icon name, or %NULL to unset the icon name
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async set of the Icon parameter.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous set of the Service property on @self. When
the operation is finished, @callback will be called. You can then call
tp_account_set_service_finish() to get the result of the operation.
a new service name, or %NULL or the empty string to unset the service name (which will result in the #TpAccount:service property becoming the same as #TpAccount:protocol)
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async set of the Service parameter.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous change of presence on @account. When the
operation is finished, @callback will be called. You can then call
tp_account_request_presence_finish() to get the result of the operation.
the requested presence
a status message to set, or %NULL
a message for the change, or %NULL
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async presence change request on @account.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
<!-- -->
the same as the #TpAccount:connect-automatically property
Requests an asynchronous set of the ConnectAutomatically property of
then call tp_account_set_display_name_finish() to get the result of the
operation.
new value for the parameter
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async set of the ConnectAutomatically property.
%TRUE if the call was successful, otherwise %FALSE
a #GAsyncResult
<!-- -->
the same as the #TpAccount:has-been-online property
Gets the connection status and reason from @account. The two values
are the same as the #TpAccount:connection-status and
#TpAccount:connection-status-reason properties.
the same as the #TpAccount:connection-status property
a #TpConnectionStatusReason to fill, or %NULL
If the account's connection is not connected, return the D-Bus error name
with which it last disconnected or failed to connect (in particular, this
is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request).
This is the same as #TpAccount:connection-error.
If @details is not %NULL, it will be used to return additional details about
the error (the same as #TpAccount:connection-error-details).
Otherwise, return %NULL, without altering @details.
The returned string and @details may become invalid when the main loop is
re-entered or the account is destroyed.
a D-Bus error name, or %NULL.
optionally used to return a map from string to #GValue, which must not be modified, destroyed or unreffed by the caller
Gets the current presence, status and status message of @account. These
values are the same as the #TpAccount:current-presence-type,
#TpAccount:current-status and #TpAccount:current-status-message properties.
the same as the #TpAccount:current-presence-type property
return location for the current status
return location for the current status message
Gets the requested presence, status and status message of @account. These
values are the same as the #TpAccount:requested-presence-type,
#TpAccount:requested-status and #TpAccount:requested-status-message
properties.
the same as the #TpAccount:requested-presence-type property
return location for the requested status
return location for the requested status message
Returns the parameters of the account, in a hash table where each string
is the parameter name (account, password, require-encryption etc.), and
each value is a #GValue. Using the tp_asv_get family of functions
(tp_asv_get_uint32(), tp_asv_get_string() etc.) to access the parameters is
recommended.
The allowed parameters depend on the connection manager, and can be found
via tp_connection_manager_get_protocol() and
tp_connection_manager_protocol_get_param(). Well-known parameters are
listed
<ulink url="http://telepathy.freedesktop.org/spec/org.freedesktop.Telepathy.ConnectionManager.html#org.freedesktop.Telepathy.ConnectionManager.RequestConnection">in
the Telepathy D-Bus Interface Specification</ulink>.
parameters on @account
the hash table of
<!-- -->
the same as the #TpAccount:nickname property
Requests an asynchronous change of the Nickname parameter on @account. When
the operation is finished, @callback will be called. You can then call
tp_account_set_nickname_finish() to get the result of the operation.
a new nickname to set
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async nickname change request on @account.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous get of @account's avatar. When
the operation is finished, @callback will be called. You can then call
tp_account_get_avatar_finish() to get the result of the operation.
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async get operation of @account's avatar.
containing the bytes of the account's avatar, or %NULL on failure
a #GArray of #guchar
a #GAsyncResult
<!-- -->
the same thing as tp_proxy_is_prepared()
a feature which is required
Requests an asynchronous preparation of @account with the features specified
by @features. When the operation is finished, @callback will be called. You
can then call tp_account_prepare_finish() to get the result of the
operation.
If @features is %NULL, then @callback will be called when the implied
%TP_ACCOUNT_FEATURE_CORE feature is ready.
If %NULL is given to @callback, then no callback will be called when the
operation is finished. Instead, it will simply set @features on @manager.
Note that if @callback is %NULL, then @user_data must also be %NULL.
Since 0.11.3, this is equivalent to calling the new function
tp_proxy_prepare_async() with the same arguments.
a 0-terminated list of features, or %NULL
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async preparation of the account @account.
%TRUE if the preparation was successful, otherwise %FALSE
a #GAsyncResult
Requests an asynchronous change of the Avatar parameter on @self. When
the operation is finished, @callback will be called. You can then call
tp_account_set_avatar_finish() to get the result of the operation.
If @len equals 0, the avatar is cleared.
a new avatar to set; can be %NULL only if @len equals 0
the length of the new avatar
the MIME type of the new avatar; can be %NULL only if @len equals 0
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async avatar change request on @account.
%TRUE if the operation was successful, otherwise %FALSE
a #GAsyncResult
<!-- -->
the same as the #TpAccount:changing-presence property
%TRUE if an attempt is currently being made to change the account's
presence (#TpAccount:current-presence-type, #TpAccount:current-status
and #TpAccount:current-status-message) to match its requested presence
(#TpAccount:requested-presence-type, #TpAccount:requested-status
and #TpAccount:requested-status-message).
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%FALSE.
Whether the account should connect automatically or not. To change this
property, use tp_account_set_connect_automatically_async().
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%FALSE.
The connection of the account, or NULL if account is offline.
It is not guaranteed that the returned #TpConnection object is ready.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
The D-Bus error name for the last disconnection or connection failure,
(in particular, %TP_ERROR_STR_CANCELLED if it was disconnected by user
request), or %NULL if the account is connected.
One can receive change notifications on this property by connecting
to the #TpAccount::status-changed signal, or by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
A map from string to #GValue containing extensible error details
related to #TpAccount:connection-error. Functions like tp_asv_get_string()
can be used to read from this map.
The keys for this map are defined by
<ulink url="http://telepathy.freedesktop.org/spec/">the Telepathy D-Bus
Interface Specification</ulink>. They will typically include
<literal>debug-message</literal>, which is a debugging message in the C
locale, analogous to #GError.message.
One can receive change notifications on this property by connecting
to the #TpAccount::status-changed signal, or by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
an empty map.
The account's connection manager name.
The account's connection status type (a %TpConnectionStatus).
One can receive change notifications on this property by connecting
to the #TpAccount::status-changed signal, or by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%TP_CONNECTION_STATUS_DISCONNECTED.
The account's connection status reason (a %TpConnectionStatusReason).
One can receive change notifications on this property by connecting
to the #TpAccount::status-changed signal, or by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED.
The account connection's current presence type
(a %TpConnectionPresenceType).
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%TP_CONNECTION_PRESENCE_TYPE_UNSET.
The current Status string of the account.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
The current status message message of the account.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
The account's display name, from the DisplayName property.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
Whether this account is enabled or not.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is FALSE.
Whether this account has been online or not.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%FALSE.
The account's icon name. To change this propery, use
tp_account_set_icon_name_async().
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%NULL.
The account's machine-readable protocol name, such as "jabber", "msn" or
"local-xmpp". Recommended names for most protocols can be found in the
Telepathy D-Bus Interface Specification.
The account's requested presence type (a #TpConnectionPresenceType).
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
The requested Status string of the account.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
The requested status message message of the account.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
A machine-readable name identifying a specific service to which this
account connects, or a copy of #TpAccount:protocol if there is no more
specific service.
Well-known names for various services can be found in the Telepathy D-Bus
Interface Specification.
For instance, accounts for the "jabber" protocol should have the service
names "google-talk", "ovi-chat", "facebook" and "lj-talk" for accounts
that connect to Google Talk, Ovi Chat, Facebook and Livejournal,
respectively, and this property will be "jabber" for accounts that
connect to a generic Jabber server.
To change this property, use
tp_account_set_service_async().
Whether this account is valid.
One can receive change notifications on this property by connecting
to the #GObject::notify signal and using this property as the signal
detail.
This is not guaranteed to have been retrieved until
tp_proxy_prepare_async() has finished; until then, the value is
%FALSE.
Emitted when the presence of the account changes.
the new presence
the new presence status
the new presence status message
Emitted when the connection status on the account changes.
The @dbus_error_name and @details parameters were present, but
non-functional (always %NULL), in older versions. They have been
available with their current behaviour since version 0.11.7.
old #TpAccount:connection-status
new #TpAccount:connection-status
the #TpAccount:connection-status-reason
connection-error
the #TpAccount:connection-error-details
Data structure representing a #TpAccountChannelRequest object.
Convenience function to create a new #TpAccountChannelRequest object.
a new #TpAccountChannelRequest object
a #TpAccount
the requested properties of the channel (see #TpAccountChannelRequest:request)
the time of the user action that caused this request, or one of the special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or %TP_USER_ACTION_TIME_CURRENT_TIME (see #TpAccountChannelRequest:user-action-time)
Return the #TpAccountChannelRequest:account construct-only property
account
Return the #TpAccountChannelRequest:request construct-only property
request
Return the #TpAccountChannelRequest:user-action-time construct-only property
the value of #TpAccountChannelRequest:user-action-time
Asynchronously calls CreateChannel on the ChannelDispatcher to create a
channel with the properties defined in #TpAccountChannelRequest:request
that you are going to handle yourself.
When the operation is finished, @callback will be called. You can then call
tp_account_channel_request_create_and_handle_channel_finish() to get the
result of the operation.
(Behind the scenes, this works by creating a temporary #TpBaseClient, then
acting like tp_account_channel_request_create_channel_async() with the
temporary #TpBaseClient as the @preferred_handler.)
optional #GCancellable object, %NULL to ignore
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async channel creation started using
tp_account_channel_request_create_and_handle_channel_async().
See tp_account_channel_request_ensure_and_handle_channel_finish()
for details of how @context can be used.
channel was successfully created and you are handling it, otherwise %NULL.
a new reference on a #TpChannel if the
a #GAsyncResult
pointer used to return a reference to the context of the HandleChannels() call, or %NULL
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a
channel with the properties defined in #TpAccountChannelRequest:request
that you are going to handle yourself.
When the operation is finished, @callback will be called. You can then call
tp_account_channel_request_ensure_and_handle_channel_finish() to get the
result of the operation.
If the channel already exists and is already being handled, or if a
newly created channel is sent to a different handler, this operation
will fail with the error %TP_ERROR_NOT_YOURS. The other handler
will be notified that the channel was requested again (for instance
with #TpAccountChannelRequest::re-handled,
#TpBaseClientClassHandleChannelsImpl or #TpSimpleHandler:callback),
and can move its window to the foreground, if applicable.
(Behind the scenes, this works by creating a temporary #TpBaseClient, then
acting like tp_account_channel_request_ensure_channel_async() with the
temporary #TpBaseClient as the @preferred_handler.)
optional #GCancellable object, %NULL to ignore
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async channel creation started using
tp_account_channel_request_ensure_and_handle_channel_async().
If the channel already exists and is already being handled, or if a
newly created channel is sent to a different handler, this operation
will fail with the error %TP_ERROR_NOT_YOURS.
via tp_handle_channels_context_get_handler_info(), and any similar methods
that are added in future. It is not valid for the caller of this method
to call tp_handle_channels_context_accept(),
tp_handle_channels_context_delay() or tp_handle_channels_context_fail().
channel was successfully created and you are handling it, otherwise %NULL.
a new reference on a #TpChannel if the
a #GAsyncResult
pointer used to return a reference to the context of the HandleChannels() call, or %NULL
Asynchronously calls CreateChannel on the ChannelDispatcher to create a
channel with the properties defined in #TpAccountChannelRequest:request
and let the ChannelDispatcher dispatch it to an handler.
or the request has failed.
You can then call tp_account_channel_request_create_channel_finish() to
get the result of the operation.
Either the well-known bus name (starting with %TP_CLIENT_BUS_NAME_BASE) of the preferred handler for the channel, or %NULL to indicate that any handler would be acceptable.
optional #GCancellable object, %NULL to ignore
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async channel creation started using
tp_account_channel_request_create_channel_async().
otherwise %FALSE.
%TRUE if the channel was successfully created and dispatched,
a #GAsyncResult
Asynchronously calls EnsureChannel on the ChannelDispatcher to create a
channel with the properties defined in #TpAccountChannelRequest:request
and let the ChannelDispatcher dispatch it to an handler.
If a suitable channel already existed, its handler will be notified that
the channel was requested again (for instance with
#TpAccountChannelRequest::re-handled, #TpBaseClientClassHandleChannelsImpl
or #TpSimpleHandler:callback), and can move its window to the foreground,
if applicable. Otherwise, a new channel will be created and dispatched to
a handler.
notified, a new channel has been created and dispatched, or the request
has failed.
You can then call tp_account_channel_request_ensure_channel_finish() to
get the result of the operation.
Either the well-known bus name (starting with %TP_CLIENT_BUS_NAME_BASE) of the preferred handler for the channel, or %NULL to indicate that any handler would be acceptable.
optional #GCancellable object, %NULL to ignore
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async channel creation started using
tp_account_channel_request_ensure_channel_async().
otherwise %FALSE.
%TRUE if the channel was successfully ensured and (re-)dispatched,
a #GAsyncResult
The #TpAccount used to request the channel.
Read-only except during construction.
This property can't be %NULL.
The user action time that will be passed to the channel dispatcher when
requesting the channel.
This may be the time at which user action occurred, or one of the special
values %TP_USER_ACTION_TIME_NOT_USER_ACTION or
%TP_USER_ACTION_TIME_CURRENT_TIME.
If %TP_USER_ACTION_TIME_NOT_USER_ACTION, the action doesn't involve any
user action. Clients should avoid stealing focus when presenting the
channel.
If %TP_USER_ACTION_TIME_CURRENT_TIME, clients SHOULD behave as though the
user action happened at the current time, e.g. a client may
request that its window gains focus.
On X11-based systems, Gdk 2.x, Clutter 1.0 etc.,
tp_user_action_time_from_x11() can be used to convert an X11 timestamp to
a Telepathy user action time.
If the channel request succeeds, this user action time will be passed on
to the channel's handler. If the handler is a GUI, it may use
tp_user_action_time_should_present() to decide whether to bring its
window to the foreground.
Emitted when the channel created using @self has been "re-handled".
This means that a Telepathy client has made another request for a
matching channel using an "ensure" API like
tp_account_channel_request_ensure_channel_async(), while the channel
still exists. Instead of creating a new channel, the channel dispatcher
notifies the existing handler of @channel, resulting in this signal.
Most GUI handlers should respond to this signal by checking
via tp_handle_channels_context_get_handler_info(), and any similar methods
that are added in future. It is not valid for the receiver of this signal
to call tp_handle_channels_context_accept(),
tp_handle_channels_context_delay() or tp_handle_channels_context_fail().
the #TpChannel being re-handled
the time at which user action occurred, or one of the special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or %TP_USER_ACTION_TIME_CURRENT_TIME; see #TpAccountChannelRequest:user-action-time
a #TpHandleChannelsContext representing the context of the HandleChannels() call.
The class of a #TpAccountChannelRequest.
The class of a #TpAccount.
The Telepathy Account Manager stores real-time communication accounts and
their configuration, places accounts online on request, and manipulates
accounts' presence, nicknames and avatars.
Convenience function to create a new account manager proxy. The returned
#TpAccountManager is not guaranteed to be ready on return.
Use tp_account_manager_dup() instead if you want an account manager proxy
on the starter or session bus (which is almost always the right thing for
Telepathy).
a new reference to an account manager proxy
Proxy for the D-Bus daemon
<!-- -->
#TpAccountManager
the quark used for representing the core feature of a
Returns an account manager proxy on the D-Bus daemon on which this
process was activated (if it was launched by D-Bus service activation), or
the session bus (otherwise).
The returned #TpAccountManager is cached; the same #TpAccountManager object
will be returned by this function repeatedly, as long as at least one
reference exists. Note that the returned #TpAccountManager is not guaranteed
to be ready on return.
if it wasn't possible to get a dbus daemon proxy for the
appropriate bus
an account manager proxy on the starter or session bus, or %NULL
Ensure that the known interfaces for TpAccountManager have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_ACCOUNT_MANAGER.
Lookup an account in the account manager @manager. If the desired account
has already been ensured then the same object will be returned, otherwise
it will create a new #TpAccount and add it to @manager. As a result, if
to be ready on return.
The caller must keep a ref to the returned object using g_object_ref() if
it is to be kept.
a new #TpAccount at @path
the object path for an account
Returns a newly allocated #GList of valid accounts in @manager. The list
must be freed with g_list_free() after used. None of the accounts in the
returned list are guaranteed to be ready.
Note that the #TpAccount<!-- -->s in the returned #GList are not reffed
before returning from this function. One could ref every item in the list
like the following example:
|[
GList *accounts;
account = tp_account_manager_get_valid_accounts (manager);
g_list_foreach (accounts, (GFunc) g_object_ref, NULL);
]|
The list of valid accounts returned is not guaranteed to have been retrieved
until %TP_ACCOUNT_MANAGER_FEATURE_CORE is prepared
(tp_proxy_prepare_async() has returned). Until this feature has
been prepared, an empty list (%NULL) will be returned.
a newly allocated #GList of valid accounts in @manager
Iterates through the accounts in @manager and requests the presence
(@type, @status and @message). Note that the presence requested here is
merely a request, and if might not be satisfiable.
You can find the most available presence across all accounts by calling
tp_account_manager_get_most_available_presence().
Setting a requested presence on all accounts will have no effect
until tp_proxy_prepare_async()
(or the older tp_account_manager_prepare_async()) has finished.
a presence type to request
a status to request
a status message to request
Gets the most available presence over all accounts in @manager. This
function does not average presences across all accounts, but it merely
finds the "most available" presence. As a result, there is a guarantee
that there exists at least one account in @manager with the returned
presence.
If no accounts are enabled or valid the output will be
(%TP_CONNECTION_PRESENCE_TYPE_OFFLINE, "offline", "").
The return value of this function is not guaranteed to have been retrieved
until tp_proxy_prepare_async() has finished; until then, the
value will be the same as if no accounts are enabled or valid.
the most available presence across all accounts
a string to fill with the actual status
a string to fill with the actual status message
Requests an asynchronous create of an account on the account manager
then call tp_account_manager_create_account_finish() to get the result of
the operation.
%TP_ACCOUNT_FEATURE_CORE feature ready on it, so when calling
tp_account_manager_create_account_finish(), one can guarantee this feature
will be ready.
the name of a connection manager
the name of a protocol
the display name for the account
parameters for the new account
properties for the new account
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async create account operation, and returns a new #TpAccount
object, with the %TP_ACCOUNT_FEATURE_CORE feature ready on it.
The caller must keep a ref to the returned object using g_object_ref() if
it is to be kept.
success, otherwise %NULL
a new #TpAccount which was just created on
a #GAsyncResult
<!-- -->
the same thing as tp_proxy_is_prepared()
a feature which is required
Requests an asynchronous preparation of @manager with
%TP_ACCOUNT_MANAGER_FEATURE_CORE, plus any features specified
by @features. When the operation is finished, @callback will be called. You
can then call tp_account_manager_prepare_finish() to get the result of the
operation.
If %NULL is given to @callback, then no callback will be called when the
operation is finished. Instead, it will simply set @features on @manager.
Note that if @callback is %NULL, then @user_data must also be %NULL.
In version 0.11.3 or later, this is equivalent to calling
tp_proxy_prepare_async() with the same arguments.
a 0-terminated list of features, or %NULL
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async preparation of the account manager @manager.
%TRUE if the preparation was successful, otherwise %FALSE
a #GAsyncResult
Enable autostarting the account manager D-Bus service. This means
that the account manager will be restarted if it disappears from
the bus.
Emitted when an account from @manager is disabled.
a #TpAccount
Emitted when an account from @manager is enabled.
Note that the returned #TpAccount @account is not guaranteed to have any
features pre-prepared, including %TP_ACCOUNT_FEATURE_CORE.
a #TpAccount
Emitted when an account is removed from @manager.
a #TpAccount
Emitted when the validity on @account changes. @account is not guaranteed
to be ready when this signal is emitted.
a #TpAccount
%TRUE if the account is now valid
Emitted when the most available presence on @manager changes.
new presence type
new status
new status message
The class of a #TpAccount.
Data structure representing the context of a Approver.AddDispatchOperation()
call.
Called by #TpBaseClientClassAddDispatchOperationImpl when it's done so
the D-Bus method can return.
Called by #TpBaseClientClassAddDispatchOperationImpl to raise a D-Bus error.
the error to return from the method
Called by #TpBaseClientClassAddDispatchOperationImpl to indicate that it
implements the method in an async way. The caller must take a reference
to the #TpAddDispatchOperationContext before calling this function, and
is responsible for calling either
tp_add_dispatch_operation_context_accept() or
tp_add_dispatch_operation_context_fail() later.
A #TpAccount object representing the Account of the DispatchOperation
that has been passed to AddDispatchOperation.
Read-only except during construction.
This property can't be %NULL.
A #GPtrArray containing #TpChannel objects representing the channels
that have been passed to AddDispatchOperation.
Read-only except during construction.
This property can't be %NULL.
A #TpConnection object representing the Connection of the DispatchOperation
that has been passed to AddDispatchOperation.
Read-only except during construction.
This property can't be %NULL.
The #DBusGMethodInvocation representing the D-Bus context of the
AddDispatchOperation call.
Can only be written during construction.
A #TpChannelDispatchOperation object representing the
ChannelDispatchOperation that has been passed to AddDispatchOperation.
Read-only except during construction.
This property can't be %NULL.
The class of a #TpAddDispatchOperationContext.
Data structure representing a generic #TpSvcClient implementation.
Called by subclasses to define the actual implementation of the
ObserveChannels() D-Bus method.
Since 0.11.13 this is exactly equivalent to setting the
#TpBaseClientClass.observe_channels function pointer.
the #TpBaseClientClass of the object
the #TpBaseClientClassObserveChannelsImpl function implementing ObserveChannels()
Called by subclasses to define the actual implementation of the
AddDispatchOperation() D-Bus method.
Since 0.11.13 this is exactly equivalent to setting the
#TpBaseClientClass.add_dispatch_operation function pointer.
the #TpBaseClientClass of the object
the #TpBaseClientClassAddDispatchOperationImpl function implementing AddDispatchOperation()
Called by subclasses to define the actual implementation of the
HandleChannels() D-Bus method.
Since 0.11.13 this is exactly equivalent to setting the
#TpBaseClientClass.handle_channels function pointer.
the #TpBaseClientClass of the object
the #TpBaseClientClassHandleChannelsImpl function implementing HandleCHannels()
Register a new channel class as Observer.ObserverChannelFilter.
The #TpBaseClientClass.observe_channels virtual method will be called
whenever a new channel's properties match the ones in @filter.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.observe_channels.
a %TP_HASH_TYPE_CHANNEL_CLASS
The same as tp_base_client_add_observer_filter(), but ownership of @filter
is taken by @self. This makes it convenient to call using tp_asv_new():
|[
tp_base_client_take_observer_filter (client,
tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_TEXT,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
...));
]|
a %TP_HASH_TYPE_CHANNEL_CLASS, ownership of which is taken by @self
Set whether the channel dispatcher should attempt to recover
this Observer if it crashes. (This is implemented by setting
the value of its Recover D-Bus property.)
Normally, Observers are only notified when new channels
appear. If an Observer is set to recover, when it registers with
tp_base_client_register(), it will also be told about any channels
that already existed before it started.
For Observers that are activatable as a D-Bus service, if the
Observer exits or crashes while there are any channels that match
its filter, it will automatically be restarted by service-activation.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.observe_channels.
the value of the Observer.Recover property
Register a new channel class as Approver.ApproverChannelFilter.
The #TpBaseClientClass.add_dispatch_operation virtual method will be called
whenever a new channel's properties match the ones in @filter.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.add_dispatch_operation.
a %TP_HASH_TYPE_CHANNEL_CLASS
The same as tp_base_client_add_approver_filter(), but ownership of @filter
is taken by @self. This makes it convenient to call using tp_asv_new():
|[
tp_base_client_take_approver_filter (client,
tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_TEXT,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
...));
]|
a %TP_HASH_TYPE_CHANNEL_CLASS, ownership of which is taken by @self
Register @self as a ChannelHandler with an empty list of filter.
This is useful if you want to create a client that only handle channels
for which it's the PreferredHandler.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class has called
#TpBaseClientClass.handle_channels.
Register a new channel class as Handler.HandlerChannelFilter.
The #TpBaseClientClass.handle_channels virtual method will be called
whenever a new channel's properties match the ones in @filter.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
a %TP_HASH_TYPE_CHANNEL_CLASS
The same as tp_base_client_add_handler_filter(), but ownership of @filter
is taken by @self. This makes it convenient to call using tp_asv_new():
|[
tp_base_client_take_handler_filter (client,
tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_TEXT,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
...));
]|
a %TP_HASH_TYPE_CHANNEL_CLASS, ownership of which is taken by @self
Set whether the channels destined for this handler are automatically
handled, without invoking approvers.
(This is implemented by setting the value of its BypassApproval
D-Bus property.)
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
the value of the Handler.BypassApproval property
Indicate that @self is a Handler willing to be notified about requests for
channels that it is likely to be asked to handle.
That means the TpBaseClient::request-added and TpBaseClient::request-removed:
signals will be fired and tp_base_client_get_pending_requests() will
return the list of pending requests.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
Add one capability token to this client, as if via
tp_base_client_add_handler_capabilities().
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
a capability token as defined by the Telepathy D-Bus API Specification
Add several capability tokens to this client. These are used to signal
that Telepathy connection managers should advertise certain capabilities
to other contacts, such as the ability to receive audio/video calls using
particular streaming protocols and codecs.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
capability tokens as defined by the Telepathy D-Bus API Specification
Convenience C API equivalent to calling
tp_base_client_add_handler_capability() for each capability token.
This method may only be called before tp_base_client_register() is
called, and may only be called on objects whose class implements
#TpBaseClientClass.handle_channels.
a capability token from the Telepathy D-Bus API Specification
Request that the given features are prepared on each #TpAccount (in
addition to %TP_ACCOUNT_FEATURE_CORE) before calling
#TpBaseClient.observe_channels, #TpBaseClient.add_dispatch_operation or
#TpBaseClient.handle_channels, or emitting #TpBaseClient::request-added.
the features
the number of features, or -1 if @features is 0-terminated
The same as tp_base_client_add_account_features(), but with a more
convenient calling convention from C.
the first feature
Request that the given features are prepared on each #TpChannel (in
addition to %TP_CHANNEL_FEATURE_CORE) before calling
#TpBaseClient.observe_channels, #TpBaseClient.add_dispatch_operation or
#TpBaseClient.handle_channels.
the features
the number of features, or -1 if @features is 0-terminated
The same as tp_base_client_add_channel_features(), but with a more
convenient calling convention from C.
the first feature
Request that the given features are prepared on each #TpConnection (in
addition to %TP_CONNECTION_FEATURE_CORE) before calling
#TpBaseClient.observe_channels, #TpBaseClient.add_dispatch_operation or
#TpBaseClient.handle_channels.
the features
the number of features, or -1 if @features is 0-terminated
The same as tp_base_client_add_connection_features(), but with a more
convenient calling convention from C.
the first feature
Publish @self as an available client. After this method is called, as long
as it continues to exist, it will receive and process whatever events were
requested via the various filters.
Methods that set the filters and other immutable state, such as
tp_base_client_add_observer_filter(), cannot be called after this one.
%TRUE if the client was registered successfully
Only works if tp_base_client_set_handler_request_notification() has been
called.
Returns the list of requests @self is likely be asked to handle.
#GList of #TpChannelRequest
a
Returns the set of channels currently handled by this base client or by any
other #TpBaseClient with which it shares a unique name.
handled channels
the
Return the #TpBaseClient:name construct-only property, which is used as
part of the bus name and object path.
the value of #TpBaseClient:name
Return the #TpBaseClient:uniquify-name construct-only property; if this
is true, the bus name and object path will be made unique by appending
a suffix that includes the D-Bus unique name and a per-process counter.
the value of #TpBaseClient:uniquify-name
Return the bus name of @self. Note that doesn't mean the client is
actually owning this name; for example if tp_base_client_register()
has not been called yet or failed.
the bus name of the client
Return the object path of @self. Note that doesn't mean the client is
actually registered on this path; for example if tp_base_client_register()
has not been called yet or failed.
the object path of the client
Return the #TpBaseClient:dbus-daemon construct-only property, which
represents the D-Bus connection used to export this client object.
The returned object's reference count is not incremented, so it is not
necessarily valid after @self is destroyed.
dbus-daemon
Return the #TpBaseClient:account-manager construct-only property, which
is the account manager used to look up or create #TpAccount objects.
The returned object's reference count is not incremented, so it is not
necessarily valid after @self is destroyed.
It is not guaranteed that any particular features are prepared on this
object; enable and wait for features with tp_proxy_prepare_async().
account-manager
Remove this client object from D-Bus, if tp_base_client_register()
has already been called.
If the object is not registered, this method may be called, but has
no effect.
Releasing the last reference to the object also has the same effect
as calling this method, but this method should be preferred, as it
has more deterministic behaviour.
If the object still exists, tp_base_client_register() may be used to
attempt to register it again.
Account manager for this base client, used to look up or create
#TpAccount objects. This may be specified in the constructor in order
to get existing #TpAccount objects.
It is not guaranteed that any of its features have been prepared, and
it is not necessary to wait for any features before specifying this
property in the constructor.
Clients that interact with the #TpAccount should usually
set this property instead of #TpBaseClient:dbus-daemon. Doing this
will ensure that each account, connection or contact is represented by
a single #TpAccount, #TpConnection or #TpContact object, shared between
all the cooperating modules that have the same #TpAccountManager.
If the #TpBaseClient:dbus-daemon is set to the result of
tp_dbus_daemon_dup(), then this property defaults to
the result of tp_account_manager_dup().
This property may be %NULL initially, but will always be non-%NULL
after the #TpBaseClient has been constructed.
It is an error to specify both a non-%NULL account manager, and a
non-%NULL #TpBaseClient:dbus-daemon that is not the same as the
account manager's #TpProxy:dbus-daemon.
#TpDBusDaemon object encapsulating this object's connection to D-Bus.
Read-only except during construction.
This property can't be %NULL after construction.
Since 0.11.14 this property may be %NULL or unspecified in
g_object_new(), but only if #TpBaseClient:account-manager is provided
instead, in which case its #TpProxy:dbus-daemon property will be
used.
The name of the client. This is used to register the D-Bus service name
and object path of the service.
This property can't be %NULL.
If %TRUE, tp_base_client_register() will append an unique token to the
service bus name and object path to ensure they are unique.
Emitted when a channels have been requested, and that if the
request is successful, they will probably be handled by this Handler.
This signal is only fired if
tp_base_client_set_handler_request_notification() has been called
on @self previously.
the #TpAccount on which the request was made, with %TP_ACCOUNT_FEATURE_CORE, and any other features added via tp_base_client_add_account_features(), prepared if possible
a #TpChannelRequest having its object-path defined but is not guaranteed to be prepared.
Emitted when a request has failed and should be disregarded.
This signal is only fired if
tp_base_client_set_handler_request_notification() has been called
on @self previously.
the #TpChannelRequest being removed
the name of the D-Bus error with which the request failed.
any message supplied with the D-Bus error.
The class of a #TpBaseClient.
The virtual methods @observe_channels, @add_dispatch_operation and
tp_base_client_implement_observe_channels(),
tp_base_client_implement_add_dispatch_operation() and
tp_base_client_implement_handle_channels(). This is compatible with
telepathy-glib versions older than 0.11.13.
Signature of the implementation of the AddDispatchOperation method.
This function must call either tp_add_dispatch_operation_context_accept(),
tp_add_dispatch_operation_context_delay() or
tp_add_dispatch_operation_context_fail() on @context before it returns.
The implementation can then use
tp_channel_dispatch_operation_handle_with_async() to approve handling of the
channels, or tp_channel_dispatch_operation_claim_async() to take
responsibility for handling or closing them".
a #TpBaseClient instance
a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other features added via tp_base_client_add_account_features(), prepared if possible
a #TpConnection with %TP_CONNECTION_FEATURE_CORE, and any other features added via tp_base_client_add_connection_features(), prepared if possible
a #GList of #TpChannel, each with %TP_CHANNEL_FEATURE_CORE, and any other features added via tp_base_client_add_channel_features(), prepared if possible
a #TpChannelDispatchOperation having %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE prepared if possible
a #TpObserveChannelsContext representing the context of this D-Bus call
Signature of the implementation of the HandleChannels method.
This function must call either tp_handle_channels_context_accept(),
tp_handle_channels_context_delay() or tp_handle_channels_context_fail()
on @context before it returns.
a #TpBaseClient instance
a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other features added via tp_base_client_add_account_features(), prepared if possible
a #TpConnection with %TP_CONNECTION_FEATURE_CORE, and any other features added via tp_base_client_add_connection_features(), prepared if possible
a #GList of #TpChannel, each with %TP_CHANNEL_FEATURE_CORE, and any other features added via tp_base_client_add_channel_features(), prepared if possible
a #GList of #TpChannelRequest having their object-path defined but are not guaranteed to be prepared.
the time at which user action occurred, or one of the special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or %TP_USER_ACTION_TIME_CURRENT_TIME (see #TpAccountChannelRequest:user-action-time for details)
a #TpHandleChannelsContext representing the context of this D-Bus call
Signature of the implementation of the ObserveChannels method.
This function must call either tp_observe_channels_context_accept(),
tp_observe_channels_context_delay() or tp_observe_channels_context_fail()
on @context before it returns.
a #TpBaseClient instance
a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other features added via tp_base_client_add_account_features(), prepared if possible
a #TpConnection with %TP_CONNECTION_FEATURE_CORE, and any other features added via tp_base_client_add_connection_features(), prepared if possible
a #GList of #TpChannel, each with %TP_CHANNEL_FEATURE_CORE, and any other features added via tp_base_client_add_channel_features(), prepared if possible
a #TpChannelDispatchOperation or %NULL; the dispatch_operation is not guaranteed to be prepared
a #GList of #TpChannelRequest having their object-path defined but are not guaranteed to be prepared.
a #TpObserveChannelsContext representing the context of this D-Bus call
Data structure representing a generic #TpSvcConnection implementation.
In addition to the fields documented here, there are four gpointer fields
which must currently be %NULL (a meaning may be defined for these in a
future version of telepathy-glib), and a pointer to opaque private data.
Implements D-Bus method RequestHandles on interface
org.freedesktop.Telepathy.Connection. Exported so subclasses can
use it as a basis for their own implementations (for instance,
at the time of writing Gabble's GabbleConnection does its own processing
for room handles, in order to validate them asynchronously, but delegates
to this implementation for all other types).
A pointer to #TpBaseConnection, cast to a pointer to #TpSvcConnection
The handle type (#TpHandleType) as a guint
A strv of handle names
The dbus-glib method invocation context
Initializes an iterator over the #TpChannelManager objects known to
<informalexample><programlisting>
TpChannelManagerIter iter;
TpChannelManager *manager;
tp_base_connection_channel_manager_iter_init (&iter, base_conn);
while (tp_base_connection_channel_manager_iter_next (&iter, &manager))
{
...do something with manager...
}
</programlisting></informalexample>
an uninitialized #TpChannelManagerIter
a connection
Advances @iter, and retrieves the #TpChannelManager it now points to. If
there are no more channel managers, @manager_out is not set and %FALSE is
returned.
%FALSE if there are no more channel managers; else %TRUE.
an initialized #TpChannelManagerIter
a location to store the channel manager, or %NULL.
<!---->
handle type, or #NULL if it's unsupported or invalid.
the handle repository corresponding to the given
The handle type
Make the connection object appear on the bus, returning the bus
name and object path used. If %TRUE is returned, the connection owns the
bus name, and will release it when destroyed.
Since 0.11.11, @bus_name and @object_path may be %NULL if the
strings are not needed.
%TRUE on success, %FALSE on error.
The name of the connection manager in the Telepathy protocol
Used to return the bus name corresponding to the connection if %TRUE is returned. To be freed by the caller.
Used to return the object path of the connection if %TRUE is returned. To be freed by the caller.
Change the status of the connection to %TP_CONNECTION_STATUS_DISCONNECTED,
as if by a call to tp_base_connection_change_status(). Before doing so,
emit the ConnectionError D-Bus signal to give more details of the error.
"debug-message", whose value should have type G_TYPE_STRING.
The D-Bus error with which the connection changed status to Disconnected
Further details of the error, as a hash table where the keys are strings as defined in the Telepathy specification, and the values are GValues. %NULL is allowed, and treated as empty.
The reason code to use in the StatusChanged signal (a less specific, non-extensible version of @error_name)
Change the status of the connection. The allowed state transitions are:
<itemizedlist>
<listitem>NEW -> CONNECTING</listitem>
<listitem>CONNECTING -> CONNECTED</listitem>
<listitem>NEW -> CONNECTED (equivalent to both of the above one after the
other - see below)</listitem>
<listitem>(anything except DISCONNECTED) -> DISCONNECTED</listitem>
</itemizedlist>
Before the transition to CONNECTED, the implementation must have discovered
the handle for the local user, obtained a reference to that handle and
stored it in the @self_handle member of #TpBaseConnection.
Changing from NEW to CONNECTED is implemented by doing the transition from
NEW to CONNECTING, followed by the transition from CONNECTING to CONNECTED;
it's exactly equivalent to calling tp_base_connection_change_status for
those two transitions one after the other.
Any other valid transition does the following, in this order:
<itemizedlist>
<listitem>Update the @status member of #TpBaseConnection</listitem>
<listitem>If the new state is DISCONNECTED, call the close_all_channels
callback on all channel factories</listitem>
<listitem>Emit the D-Bus StatusChanged signal</listitem>
<listitem>Call the subclass' status change callback</listitem>
<listitem>Call the channel factories' status change callbacks</listitem>
<listitem>If the new state is DISCONNECTED, call the subclass'
</itemizedlist>
previously set to 0 at this stage. It now remains non-zero until the object
is disposed.
The new status
The reason for the status change
Returns the #TpBaseConnection:self-handle property, which is guaranteed not
to be 0 once the connection has moved to the CONNECTED state.
the current self handle of the connection.
Sets the #TpBaseConnection:self-handle property. self_handle may not be 0
once the connection has moved to the CONNECTED state.
The new self handle for the connection.
Tell the connection manager that this Connection has been disconnected,
has emitted StatusChanged and is ready to be removed from D-Bus.
Add some interfaces to the list supported by this Connection. If you're
going to call this function at all, you must do so before moving to state
CONNECTED (or DISCONNECTED); if you don't call it, only the set of
interfaces always present (@interfaces_always_present in
#TpBaseConnectionClass) will be supported.
A %NULL-terminated array of D-Bus interface names, which must remain valid at least until the connection enters state #TP_CONNECTION_STATUS_DISCONNECTED (in practice, you should either use static strings, or use strdup'd strings and free them in the dispose callback).
Register the Connection interface with the Contacts interface to make it
inspectable. The Contacts mixin should be initialized before this function
is called
<!-- -->
#TpBaseConnectionManager:dbus-daemon property. The caller must reference
the returned object with g_object_ref() if it will be kept.
the value of the
#TpDBusDaemon object encapsulating this object's connection to D-Bus.
Read-only except during construction.
If this property is %NULL or omitted during construction, the object will
automatically attempt to connect to the starter or session bus with
tp_dbus_daemon_dup() just after it is constructed; if this fails, this
property will remain %NULL, and tp_base_connection_register() will fail.
The Connection.Status as visible on D-Bus, which is the same as
#TpBaseConnection.status except that %TP_INTERNAL_CONNECTION_STATUS_NEW
is replaced by %TP_CONNECTION_STATUS_DISCONNECTED.
The #GObject::notify signal is not currently emitted for this property.
The set of D-Bus interfaces available on this Connection, other than
Connection itself.
Identifier used in the Telepathy protocol when this connection's protocol
name is required.
The handle of type %TP_HANDLE_TYPE_CONTACT representing the local user.
Must be set nonzero by the subclass before moving to state CONNECTED.
Emitted by tp_base_connection_finish_shutdown() when the underlying
network connection has been closed; #TpBaseConnectionManager listens
for this signal and removes connections from its table of active
connections when it is received.
The class of a #TpBaseConnection. Many members are virtual methods etc.
to be filled in in the subclass' class_init function.
In addition to the fields documented here, there are three gpointer fields
which must currently be %NULL (a meaning may be defined for these in a
future version of telepathy-glib), and a pointer to opaque private data.
Signature of an implementation of the create_channel_factories method
of #TpBaseConnection.
which, between them, implement all channel types this Connection
supports.
a GPtrArray of objects implementing #TpChannelFactoryIface
The implementation, a subclass of TpBaseConnection
Signature of an implementation of the create_channel_managers method
of #TpBaseConnection.
which, between them, implement all channel types this Connection
supports.
a GPtrArray of objects implementing #TpChannelManager
The implementation, a subclass of TpBaseConnection
Signature of an implementation of the create_handle_repos method
of #TpBaseConnection.
The connection object
An array of pointers to be filled in; the implementation may assume all are initially NULL.
Signature of the @get_unique_connection_name virtual method
on #TpBaseConnection.
connection manager process, as a string which the caller must free
with #g_free.
a name for this connection which will be unique within this
The implementation, a subclass of TpBaseConnection
Signature of a virtual method on #TpBaseConnection that takes no
additional parameters and returns nothing.
The connection object
Signature of an implementation of the start_connecting method
of #TpBaseConnection.
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
calling tp_base_connection_change_status(), or have arranged for a
status change to either state DISCONNECTED or CONNECTED to be signalled by
calling tp_base_connection_change_status() at some later time.
If the status is still NEW after returning %TRUE, #TpBaseConnection 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 after %FALSE is returned,
#TpBaseConnection 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.
%FALSE if failure has already occurred, else %TRUE.
The connection object
Describes possible sources of information on connection managers'
supported protocols.
Since 0.11.5, there is a corresponding #GEnumClass type,
%TP_TYPE_CM_INFO_SOURCE.
An object representing capabilities a #TpConnection or #TpContact supports.
<!-- -->
#TpCapabilities:channel-classes property
the same #GPtrArray as the
<!-- -->
the same #gboolean as the #TpCapabilities:contact-specific property
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.
HandleTypeContact as TargetHandleType and a contact identifier can be
expected to work, %FALSE otherwise.
%TRUE if a channel request containing Text as ChannelType,
If the #TpCapabilities:contact-specific property is %FALSE, this function
checks if named text chatrooms can be joined by providing a chatroom
identifier.
If the #TpCapabilities: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.
HandleTypeRoom as TargetHandleType and a channel identifier can be
expected to work, %FALSE otherwise.
%TRUE if a channel request containing Text as ChannelType,
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.
A proxy object for a Telepathy channel.
A proxy object for a Telepathy channel. There are no interesting
public struct fields.
(Changed in 0.7.12: the layout of the structure is visible, allowing
subclassing.)
<!-- -->
a new channel proxy, or %NULL on invalid arguments.
a connection; may not be %NULL
the object path of the channel; may not be %NULL
the channel type if already known, or %NULL if not
the handle type if already known, or %TP_UNKNOWN_HANDLE_TYPE if not
the handle if already known, or 0 if not (if @optional_handle_type is %TP_UNKNOWN_HANDLE_TYPE or %TP_HANDLE_TYPE_NONE, this must be 0)
<!-- -->
a new channel proxy, or %NULL on invalid arguments
a connection; may not be %NULL
the object path of the channel; may not be %NULL
the immutable properties of the channel, as signalled by the NewChannel D-Bus signal or returned by the CreateChannel and EnsureChannel D-Bus methods: a mapping from strings (D-Bus interface name + "." + property name) to #GValue instances
Ensure that the known interfaces for TpChannel have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_CHANNEL.
If @self is ready for use (introspection has finished, etc.), return
immediately. Otherwise, re-enter the main loop until the channel either
becomes invalid or becomes ready for use, or until the main loop stored
via @loop is cancelled.
%FALSE if the channel has become invalid.
or restructure your program in such a way as to avoid re-entering the
main loop.
%TRUE if the channel has been introspected and is ready for use,
if not %NULL and %FALSE is returned, used to raise an error
if not %NULL, a #GMainLoop is placed here while it is being run (so calling code can call g_main_loop_quit() to abort), and %NULL is placed here after the loop has been run
If @self is ready for use or has been invalidated, call @callback
immediately, then return. Otherwise, arrange
for @callback to be called when @self either becomes ready for use
or becomes invalid.
This is a less general form of tp_proxy_prepare_async(), which should be
used in new code. (One important difference is that this function can call
calls @callback from the main loop.)
called when the channel becomes ready or invalidated, whichever happens first
arbitrary user-supplied data passed to the callback
Returns the same thing as the #TpChannel:channel-ready property.
New code should use tp_proxy_is_prepared(), which is a more general form of
this method.
For group channels, this method is equivalent to checking for the
combination of %TP_CHANNEL_FEATURE_CORE and %TP_CHANNEL_FEATURE_GROUP; for
non-group channels, it's equivalent to checking for
%TP_CHANNEL_FEATURE_CORE.
One important difference is that after #TpProxy::invalidated is
signalled, #TpChannel:channel-ready keeps its current value - which might
be %TRUE, if the channel was successfully prepared before it became
invalidated - but tp_proxy_is_prepared() returns %FALSE for all features.
%TRUE if introspection has completed
Get the D-Bus interface name representing this channel's type,
if it has been discovered.
This is the same as the #TpChannelIface:channel-type property; it isn't
guaranteed to be non-%NULL until the %TP_CHANNEL_FEATURE_CORE feature has
been prepared.
type or %NULL, if the channel is not yet ready.
the channel type, if the channel is ready; either the channel
Get the D-Bus interface name representing this channel's type, as a GQuark,
if it has been discovered.
This is the same as the #TpChannelIface:channel-type property, except that it
is a GQuark rather than a string. It isn't guaranteed to be nonzero until
the %TP_CHANNEL_FEATURE_CORE property is ready.
type or 0, if the channel is not yet ready.
the channel type, if the channel is ready; either the channel
Get the handle representing the contact, chatroom, etc. with which this
channel communicates for its whole lifetime, or 0 if there is no such
handle or it has not yet been discovered.
This is the same as the #TpChannelIface:handle property. It isn't
guaranteed to have its final value until the %TP_CHANNEL_FEATURE_CORE
feature is ready.
If %handle_type is not %NULL, the type of handle is written into it.
This will be %TP_UNKNOWN_HANDLE_TYPE if the handle has not yet been
discovered, or %TP_HANDLE_TYPE_NONE if there is no handle with which this
channel will always communicate. This is the same as the
#TpChannelIface:handle-type property.
the handle
if not %NULL, used to return the type of this handle
This channel's associated identifier, or the empty string if no identifier
or unknown.
This is the same as the #TpChannel:identifier property, and isn't guaranteed
to be set until the %TP_CHANNEL_FEATURE_CORE property is ready.
previously either be %NULL or the empty string if there was no suitable
value. It is now non-%NULL in all cases.
the identifier
Returns the connection for this channel. The returned pointer is only valid
while this channel is valid - reference it with g_object_ref() if needed.
connection
Returns the immutable D-Bus properties of this channel, the same as
#TpChannel:channel-properties.
The returned hash table should not be altered, and is not necessarily
valid after the main loop is next re-entered. Copy it with
g_boxed_copy() (its type is %TP_HASH_TYPE_QUALIFIED_PROPERTY_VALUE_MAP)
if a copy that remains valid must be kept.
If the #TpChannel:channel-properties property was not set during
construction (e.g. by calling tp_channel_new_from_properties()), a
reasonable but possibly incomplete version will be made up from the values
of individual properties; reading this property repeatedly may yield
progressively more complete values until the %TP_CHANNEL_FEATURE_CORE
feature is prepared.
where the keys are strings,
D-Bus interface name + "." + property name, and the values are #GValue
instances
a #GHashTable
Return the chat state for the given contact. If tp_proxy_is_prepared()
would return %FALSE for the feature %TP_CHANNEL_FEATURE_CHAT_STATES,
the result will always be %TP_CHANNEL_CHAT_STATE_INACTIVE.
if their chat state is not known
the chat state for @contact, or %TP_CHANNEL_CHAT_STATE_INACTIVE
a contact handle
Initially %FALSE; changes to %TRUE when tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_FEATURE_CORE, and if the channel is a
group, %TP_CHANNEL_FEATURE_GROUP.
This is a less general form of tp_proxy_is_prepared(), which should be
used in new code.
One important difference is that after #TpProxy::invalidated is
signalled, #TpChannel:channel-ready keeps its current value - which might
be %TRUE, if the channel was successfully prepared before it became
invalidated - but tp_proxy_is_prepared() returns %FALSE for all features.
Change notification is via notify::channel-ready.
The #TpConnection to which this #TpChannel belongs. Used for e.g.
handle manipulation.
If the %TP_CHANNEL_FEATURE_GROUP feature has been prepared successfully,
#TpChannelGroupFlags indicating the capabilities and behaviour of that
group.
Otherwise, this may be 0.
Change notification is via notify::group-flags or
TpChannel::group-flags-changed.
If this channel is a group and %TP_CHANNEL_FEATURE_GROUP has been
prepared, and the user is a member of the group, the #TpHandle
representing them in this group.
Otherwise, the result may be either a handle representing the user, or 0.
Change notification is via notify::group-self-handle.
This channel's associated identifier, or the empty string if it has
handle type %TP_HANDLE_TYPE_NONE.
For channels where #TpChannelIface:handle is non-zero, this is the result
of inspecting #TpChannelIface:handle.
This is not guaranteed to be set until tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be
the empty string.
it was %NULL before an identifier was known, or when a channel
with no TargetID D-Bus property had TargetHandleType %TP_HANDLE_TYPE_NONE.
Emitted when a contact's chat state changes after tp_proxy_prepare_async()
has finished preparing the feature %TP_CHANNEL_FEATURE_CHAT_STATES.
a contact handle for the local user or another contact
the new #TpChannelChatState for the contact
Emitted when the #TpChannel:group-flags property changes while the
channel is ready.
#TpChannelGroupFlags which are newly set
#TpChannelGroupFlags which are no longer set
Emitted when the group members change in a Group channel that is ready.
an optional textual message
a #GArray of #guint containing the full members added
a #GArray of #guint containing the members (full, local-pending or remote-pending) removed
a #GArray of #guint containing the local-pending members added
a #GArray of #guint containing the remote-pending members added
the #TpHandle of the contact causing the change, or 0
the reason for the change as a #TpChannelGroupChangeReason
Emitted when the group members change in a Group channel that is ready.
Contains a superset of the information in the
TpChannel::group-members-changed signal, and is emitted at the same time;
applications can connect to this signal and ignore the other.
a #GArray of #guint containing the full members added
a #GArray of #guint containing the members (full, local-pending or remote-pending) removed
a #GArray of #guint containing the local-pending members added
a #GArray of #guint containing the remote-pending members added
a #GHashTable mapping (gchar *) to #GValue containing details about the change, as described in the specification of the MembersChangedDetailed signal.
The class of a #TpChannel. In addition to @parent_class there are four
pointers reserved for possible future use.
(Changed in 0.7.12: the layout of the structure is visible, allowing
subclassing.)
One of the channel dispatcher's functions is to offer incoming channels to
Approver clients for approval. An approver should generally ask the user
whether they want to participate in the requested communication channels
(join the chat or chatroom, answer the call, accept the file transfer, or
whatever is appropriate). A collection of channels offered in this way
is represented by a ChannelDispatchOperation object.
If the user wishes to accept the communication channels, the approver
should call tp_cli_channel_dispatch_operation_call_handle_with() to
indicate the user's or approver's preferred handler for the channels (the
empty string indicates no particular preference, and will cause any
suitable handler to be used).
If the user wishes to reject the communication channels, or if the user
accepts the channels and the approver will handle them itself, the approver
should call tp_cli_channel_dispatch_operation_call_claim(). If this method
succeeds, the approver immediately has control over the channels as their
primary handler, and may do anything with them (in particular, it may close
them in whatever way seems most appropriate).
There are various situations in which the channel dispatch operation will
be closed, causing the #TpProxy::invalidated signal to be emitted. If this
happens, the approver should stop prompting the user.
Because all approvers are launched simultaneously, the user might respond
to another approver; if this happens, the #TpProxy::invalidated signal
will be emitted with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_OBJECT_REMOVED.
If a channel closes, the #TpChannelDispatchOperation::channel-lost signal
is emitted. If all channels
close, there is nothing more to dispatch, so the #TpProxy::invalidated
signal will be emitted with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_OBJECT_REMOVED.
If the channel dispatcher crashes or exits, the #TpProxy::invalidated
signal will be emitted with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_NAME_OWNER_LOST. In a high-quality implementation, the
dispatcher should be restarted, at which point it will create new
channel dispatch operations for any undispatched channels, and the approver
will be notified again.
be added in a later version of telepathy-glib, along with a mechanism
similar to tp_connection_call_when_ready().
Convenience function to create a new channel dispatch operation proxy.
The @immutable_properties argument is not yet used.
running
a new reference to an channel dispatch operation proxy, or %NULL if
Proxy for the D-Bus daemon
The non-NULL object path of this channel dispatch operation
As many as are known of the immutable D-Bus properties of this channel dispatch operation, or %NULL if none are known
Ensure that the known interfaces for TpChannelDispatchOperation have been
set up. This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_CHANNEL_DISPATCH_OPERATION.
Returns the #TpConnection of this ChannelDispatchOperation.
The returned pointer is only valid while @self is valid - reference
it with g_object_ref() if needed.
connection
Returns the #TpAccount of this ChannelDispatchOperation.
The returned pointer is only valid while @self is valid - reference
it with g_object_ref() if needed.
account
Returns a #GPtrArray containing the #TpChannel of this
ChannelDispatchOperation.
The returned array and its #TpChannel are only valid while @self is
valid - copy array and reference channels with g_object_ref() if needed.
channels
Returns a #GStrv containing the possible handlers of this
ChannelDispatchOperation.
The returned array and its strings are only valid while @self is
valid - copy it with g_strdupv if needed.
#TpChannelDispatchOperation:possible-handlers
the value of
Returns the immutable D-Bus properties of this channel.
The returned hash table is only valid while @self is valid - reference
it with g_hash_table_ref() if needed.
#TpChannelDispatchOperation:cdo-properties
the value of
Called by an approver to accept a channel bundle and request that the
given handler be used to handle it.
If successful, this method will cause the #TpProxy::invalidated signal
to be emitted with the TP_DBUS_ERROR_OBJECT_REMOVED error code.
However, this method may fail because the dispatch has already been
completed and the object has already gone. If this occurs, it indicates
that another approver has asked for the bundle to be handled by a
particular handler. The approver MUST NOT attempt to interact with
the channels further in this case, unless it is separately
invoked as the handler.
Approvers which are also channel handlers SHOULD use
tp_channel_dispatch_operation_claim_async() instead
of tp_channel_dispatch_operation_handle_with_async() to request
that they can handle a channel bundle themselves.
The well-known bus name (starting with #TP_CLIENT_BUS_NAME_BASE) of the channel handler that should handle the channel, or %NULL if the client has no preferred channel handler
a callback to call when the call returns
data to pass to @callback
Finishes an async call to HandleWith().
%TRUE if the HandleWith() call was successful, otherwise %FALSE
a #GAsyncResult
Called by an approver to claim channels for handling internally.
If this method is called successfully, the process calling this
method becomes the handler for the channel.
If successful, this method will cause the #TpProxy::invalidated signal
to be emitted, in the same wayas for
tp_channel_dispatch_operation_handle_with_async().
This method may fail because the dispatch operation has already
been completed. Again, see tp_channel_dispatch_operation_claim_async()
for more details. The approver MUST NOT attempt to interact with
the channels further in this case.
a callback to call when the call returns
data to pass to @callback
Finishes an async call to Claim().
%TRUE if the Claim() call was successful, otherwise %FALSE
a #GAsyncResult
A variant of tp_channel_dispatch_operation_handle_with_async()
allowing the approver to pass an user action time.
This timestamp will be passed to the Handler when HandleChannels is called.
If an X server timestamp for the user action causing this method call is
available, @user_action_time should be this timestamp (for instance, the
result of gdk_event_get_time() if it is not %GDK_CURRENT_TIME). Otherwise, it
may be %TP_USER_ACTION_TIME_NOT_USER_ACTION to behave as if there was no
user action or it happened a long time ago, or
%TP_USER_ACTION_TIME_CURRENT_TIME to have the Handler behave as though the
user action had just happened (resembling, but not numerically equal to,
%GDK_CURRENT_TIME).
This method has been introduced in telepathy-mission-control 5.5.0.
The well-known bus name (starting with #TP_CLIENT_BUS_NAME_BASE) of the channel handler that should handle the channel, or %NULL if the client has no preferred channel handler
the time at which user action occurred, or one of the special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or %TP_USER_ACTION_TIME_CURRENT_TIME
a callback to call when the call returns
data to pass to @callback
Finishes an async call to HandleWithTime().
%TRUE if the HandleWithTime() call was successful, otherwise %FALSE
a #GAsyncResult
The #TpAccount with which the connection and channels are associated.
Read-only except during construction.
This is not guaranteed to be set until tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE.
A #GPtrArray containing the #TpChannel to be dispatched.
Read-only.
This is not guaranteed to be set until tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE.
The #TpConnection with which the channels are associated.
Read-only except during construction.
This is not guaranteed to be set until tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE.
A #GStrv containing the well known bus names (starting
with TP_CLIENT_BUS_NAME_BASE) of the possible Handlers for
the channels
Read-only except during construction.
This is not guaranteed to be set until tp_proxy_prepare_async() has
finished preparing %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE.
Emitted when a channel has closed before it could be claimed or handled.
the #TpChannel that closed
domain of a #GError indicating why the channel has been closed
error code of a #GError indicating why the channel has been closed
a message associated with the error
The class of a #TpChannelDispatchOperation.
An iterator over the #TpChannelManager objects known to a #TpBaseConnection.
It has no public fields.
Use tp_base_connection_channel_manager_iter_init() to start iteration and
tp_base_connection_channel_manager_iter_next() to continue.
Requesting a channel from the channel dispatcher can take some time, so an
object is created in the channel dispatcher to represent each request. This
proxy represents one of those objects.
Any client can call tp_cli_channel_request_call_cancel() at any time to
attempt to cancel the request.
On success, the #TpChannelRequest::succeeded signal will be emitted.
Immediately after that, the #TpProxy::invalidated signal will be emitted,
with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_OBJECT_REMOVED (this is not an error condition, it merely
indicates that the channel request no longer exists).
On failure, the #TpProxy::invalidated signal will be emitted with some
other suitable error, usually from the %TP_ERRORS domain.
If the channel dispatcher crashes or exits, the #TpProxy::invalidated
signal will be emitted with the domain %TP_DBUS_ERRORS and the error code
%TP_DBUS_ERROR_NAME_OWNER_LOST.
UserActionTime, PreferredHandler, Requests and Interfaces properties will
be added in a later version of telepathy-glib, along with a mechanism
similar to tp_connection_call_when_ready().
Until suitable convenience methods are implemented, the generic
tp_cli_dbus_properties_call_get_all() method can be used to get those
properties.
Convenience function to create a new channel request proxy.
If the channel request was newly created, the client making the request
is responsible for calling tp_cli_channel_request_call_proceed() when it
is ready for the channel request to proceed.
The @immutable_properties argument is not yet used.
not running
a new reference to an channel request proxy, or %NULL if
Proxy for the D-Bus daemon
The non-NULL object path of this channel request
As many as are known of the immutable D-Bus properties of this channel request, or %NULL if none are known
Ensure that the known interfaces for TpChannelRequest have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_CHANNEL_REQUEST.
Emitted when the channel request succeeds.
The class of a #TpChannelRequest.
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)
the channel (which may be in the middle of being disposed, if error is non-%NULL, error->domain is TP_DBUS_ERRORS and error->code is TP_DBUS_ERROR_PROXY_UNREFERENCED)
%NULL if the channel is ready for use, or the error with which it was invalidated if it is now invalid
whatever was passed to tp_channel_call_when_ready()
A proxy object for a Telepathy connection. There are no interesting
public struct fields.
(Changed in 0.7.12: the layout of the structure is visible, allowing
subclassing.)
<!-- -->
fails or on invalid arguments
a new connection proxy, or %NULL if unique-name resolution
a D-Bus daemon; may not be %NULL
the well-known or unique name of the connection process; if well-known, this function will make a blocking call to the bus daemon to resolve the unique name. May be %NULL if @object_path is not, in which case a well-known name will be derived from @object_path.
the object path of the connection process. May be %NULL if @bus_name is a well-known name, in which case the object path will be derived from @bus_name.
Ensure that the known interfaces for TpConnection have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_CONNECTION.
Compares @p1 and @p2 like strcmp(). @p1 > @p2 means @p1 is more available
than @p2.
unknown > unset
-1, 0 or 1, if @p1 is <, == or > than @p2.
a #TpConnectionPresenceType
a #TpConnectionPresenceType
If @reason is not %NULL it is set to the reason why "status" changed to its
current value, or %TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED if unknown.
don't know yet.
This connection's status, or %TP_UNKNOWN_CONNECTION_STATUS if we
a TpConnectionStatusReason, or %NULL
Return the %TP_HANDLE_TYPE_CONTACT handle of the local user on this
connection, or 0 if the self-handle is not known yet or the connection
has become invalid (the TpProxy::invalidated signal).
The returned handle is not necessarily valid forever (the
notify::self-handle signal will be emitted if it changes, which can happen
on protocols such as IRC). Construct a #TpContact object if you want to
track the local user's identifier in the protocol, or other information
like their presence status, over time.
the value of the TpConnection:self-handle property
<!-- -->
#TpConnection:capabilities property
the same #TpCapabilities as the
Returns the same thing as the #TpConnection:connection-ready property.
%TRUE if introspection has completed
If @self is connected and ready for use, return immediately. Otherwise,
call Connect() (unless @connect is %FALSE) and re-enter the main loop
until the connection becomes invalid, the connection connects successfully
and is introspected, or the main loop stored via @loop is cancelled.
%FALSE if the connection has become invalid.
or restructure your program in such a way as to avoid re-entering the
main loop.
%TRUE if the connection is now connected and ready for use,
if %TRUE, call Connect() if it appears to be necessary; if %FALSE, rely on Connect() to be called by another client
if not %NULL and %FALSE is returned, used to raise an error
if not %NULL, a #GMainLoop is placed here while it is being run (so calling code can call g_main_loop_quit() to abort), and %NULL is placed here after the loop has been run
If @self is ready for use or has been invalidated, call @callback
immediately, then return. Otherwise, arrange
for @callback to be called when @self either becomes ready for use
or becomes invalid.
Note that if the connection is not in state CONNECTED, the callback will
not be called until the connection either goes to state CONNECTED
or is invalidated (e.g. by going to state DISCONNECTED or by becoming
unreferenced). In particular, this method does not call Connect().
Call tp_cli_connection_call_connect() too, if you want to do that.
called when the connection becomes ready or invalidated, whichever happens first
arbitrary user-supplied data passed to the callback
If the object path of @connection is in the correct form, set
return FALSE.
TRUE if the object path was correctly parsed, FALSE otherwise.
If not NULL, used to return the protocol of the connection
If not NULL, used to return the connection manager name of the connection
If the connection has disconnected, return the D-Bus error name with which
it disconnected (in particular, this is %TP_ERROR_STR_CANCELLED if it was
disconnected by a user request).
Otherwise, return %NULL, without altering @details.
a D-Bus error name, or %NULL.
optionally used to return a map from string to #GValue, which must not be modified or destroyed by the caller
Hold (ensure a reference to) the given handles, if they are valid.
If they are valid, the callback will later be called with the given
handles; if not all of them are valid, the callback will be called with
an error.
This function, along with tp_connection_unref_handles(),
tp_connection_get_contact_attributes() and #TpContact, keeps a client-side
reference count of handles; you should not use the RequestHandles,
HoldHandles and GetContactAttributes D-Bus methods directly as well as these
functions.
the timeout in milliseconds, or -1 to use the default
the handle type
the number of handles in @handles (must be at least 1)
an array of handles
called on success or failure (unless @weak_object has become unreferenced)
arbitrary user-supplied data
called to destroy @user_data after calling @callback, or when
if not %NULL, an object to be weakly referenced: if it is destroyed, @callback will not be called
Request the handles corresponding to the given identifiers, and if they
are valid, hold (ensure a reference to) the corresponding handles.
If they are valid, the callback will later be called with the given
handles; if not all of them are valid, the callback will be called with
an error.
the timeout in milliseconds, or -1 to use the default
the handle type
an array of string identifiers for which handles are required, terminated by %NULL (must not be %NULL or empty)
called on success or failure (unless @weak_object has become unreferenced)
arbitrary user-supplied data
called to destroy @user_data after calling @callback, or when
if not %NULL, an object to be weakly referenced: if it is destroyed, @callback will not be called
Release the reference to the handles in @handles that was obtained by
calling tp_connection_hold_handles() or tp_connection_request_handles().
This function might release any references held by calling
tp_cli_connection_call_request_handles(),
tp_cli_connection_run_request_handles(),
tp_cli_connection_call_hold_handles(),
tp_cli_connection_run_hold_handles(),
tp_cli_connection_interface_contacts_call_get_contact_attributes() or
tp_cli_connection_interface_contacts_run_get_contact_attributes() directly.
Those functions should be avoided in favour of using #TpContact,
tp_connection_hold_handles(), tp_connection_request_handles() and
tp_connection_get_contact_attributes(), which along with this function
perform client-side reference counting of handles.
If @self has already become invalid, this function does nothing.
a handle type
the number of handles in @handles
an array of @n_handles handles
Return (via a callback) any number of attributes of the given handles, and
if they are valid and @hold is TRUE, hold a reference to them.
This is a thin wrapper around the GetContactAttributes D-Bus method, and
should be used in preference to
tp_cli_connection_interface_contacts_call_get_contact_attributes(); mixing this
function, tp_connection_hold_handles(), tp_connection_unref_handles(), and
#TpContact with direct use of the RequestHandles, HoldHandles and
GetContactAttributes D-Bus methods is unwise, as #TpConnection and
#TpContact perform client-side reference counting of handles.
The #TpContact API provides a higher-level abstraction which should
usually be used instead.
handles that were valid. Invalid handles are simply omitted from the
parameter to the callback.
If @hold is %TRUE, the @callback is given one reference to each handle
that appears as a key in the callback's @attributes parameter.
the timeout in milliseconds, or -1 to use the default
the number of handles in @handles (must be at least 1)
an array of handles
a #GStrv of interfaces
if %TRUE, the callback will hold one reference to each valid handle
called on success or failure (unless @weak_object has become unreferenced)
arbitrary user-supplied data
called to destroy @user_data after calling @callback, or when
if not %NULL, an object to be weakly referenced: if it is destroyed, @callback will not be called
Requests to refresh the #TpContact:contact-info property on each contact from
cached locally. "notify::contact-info" will be emitted when the contact's
information are updated.
If %TP_CONTACT_FEATURE_CONTACT_INFO is not yet set on a contact, it will be
set before its property gets updated.
The number of contacts in @contacts (must be at least 1)
An array of #TpContact objects associated with @self
Create a number of #TpContact objects and make asynchronous method calls
to hold their handles and ensure that all the features specified in
It is not an error to put features in @features even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
The number of handles in @handles (must be at least 1)
An array of handles of type %TP_HANDLE_TYPE_CONTACT representing the desired contacts
The number of features in @features (may be 0)
An array of features that must be ready for use (if supported) before the callback is called (may be %NULL if @n_features is 0)
A user callback to call when the contacts are ready
Data to pass to the callback
Called to destroy @user_data either after @callback has been called, or if the operation is cancelled
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Given several #TpContact objects, make asynchronous method calls
ensure that all the features specified in @features are ready for use
(if they are supported at all).
It is not an error to put features in @features even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
The number of contacts in @contacts (must be at least 1)
An array of #TpContact objects associated with @self
The number of features in @features (must be at least 1)
An array of features that must be ready for use (if supported) before the callback is called
A user callback to call when the contacts are ready
Data to pass to the callback
Called to destroy @user_data either after @callback has been called, or if the operation is cancelled
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Create a number of #TpContact objects and make asynchronous method calls
to obtain their handles and ensure that all the features specified in
It is not an error to put features in @features even if the connection
manager doesn't support them - users of this method should have a static
list of features they would like to use if possible, and use it for all
connection managers.
The number of IDs in @ids (must be at least 1)
An array of strings representing the desired contacts by their identifiers in the IM protocol (XMPP JIDs, SIP URIs, MSN Passports, AOL screen-names etc.)
The number of features in @features (may be 0)
An array of features that must be ready for use (if supported) before the callback is called (may be %NULL if @n_features is 0)
A user callback to call when the contacts are ready
Data to pass to the callback
Called to destroy @user_data either after @callback has been called, or if the operation is cancelled
An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
The %TpCapabilities object representing the capabilities of this
connection, or NULL if we don't know yet.
To wait for valid capability information, call tp_proxy_prepare_async()
with the feature %TP_CONNECTION_FEATURE_CAPABILITIES.
Initially %FALSE; changes to %TRUE when the connection has gone to
CONNECTED status, introspection has finished and it's ready for use.
By the time this property becomes %TRUE, any extra interfaces will
have been set up and the #TpProxy:interfaces property will have been
populated.
This is similar to %TP_CONNECTION_FEATURE_CONNECTED, except that once
it has changed to %TRUE, it remains %TRUE even if the connection has
been invalidated.
The %TP_HANDLE_TYPE_CONTACT handle of the local user on this connection,
or 0 if we don't know yet or if the connection has become invalid.
To wait for a valid self-handle (and other properties), call
tp_proxy_prepare_async() with the feature
%TP_CONNECTION_FEATURE_CONNECTED.
This connection's status, or %TP_UNKNOWN_CONNECTION_STATUS if we don't
know yet.
To wait for a valid status (and other properties), call
tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CORE.
Since version 0.11.3, the change to status
%TP_CONNECTION_STATUS_CONNECTED is delayed slightly, until introspection
of the connection has finished.
To wait for a valid status (and other properties), call
tp_proxy_prepare_async() with the feature %TP_CONNECTION_FEATURE_CORE.
The reason why #TpConnection:status changed to its current value,
or TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED if unknown.
know yet.
The class of a #TpConnection. In addition to @parent_class there are four
pointers reserved for possible future use.
(Changed in 0.7.12: the layout of the structure is visible, allowing
subclassing.)
Signature of a callback used to receive the result of
tp_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
tp_connection_get_contacts_by_handle() were not valid, this is not
considered to be a failure. @error will be %NULL in this situation,
valid (possibly none of them), and @invalid will contain the handles
that were not valid.
The connection
The number of TpContact objects successfully created (one per valid handle), or 0 on unrecoverable errors
An array of @n_contacts TpContact objects (this callback is not given a reference to any of these objects, and must call g_object_ref() on any that it will keep), or %NULL on unrecoverable errors
The number of invalid handles that were passed to tp_connection_get_contacts_by_handle() (or on unrecoverable errors, the total number of handles that were given)
An array of @n_failed handles that were passed to tp_connection_get_contacts_by_handle() but turned out to be invalid (or on unrecoverable errors, all the handles that were given)
%NULL on success, or an unrecoverable error that caused everything to fail
the @user_data that was passed to tp_connection_get_contacts_by_handle()
the @weak_object that was passed to tp_connection_get_contacts_by_handle()
Signature of a callback used to receive the result of
tp_connection_get_contacts_by_id().
The normalized form of requested_ids[i] is
tp_contact_get_identifier (contacts[i]).
If some or even all of the @ids passed to
tp_connection_get_contacts_by_id() were not valid, this is not
considered to be a fatal error. @error will be %NULL in this situation,
valid (it may be empty), and @failed_id_errors will map the IDs
that were not valid to a corresponding #GError (if the connection manager
complies with the Telepathy spec, it will have domain %TP_ERRORS and code
%TP_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 #GError (either one
indicating that the ID was invalid, if that was determined before the
fatal error occurred, or a copy of @error).
The connection
The number of TpContact objects successfully created (one per valid ID), or 0 on unrecoverable errors
An array of @n_contacts TpContact objects (this callback is not given a reference to any of these objects, and must call g_object_ref() on any that it will keep), or %NULL on unrecoverable errors
An array of @n_contacts valid IDs (JIDs, SIP URIs etc.) that were passed to tp_connection_get_contacts_by_id(), in an order corresponding to @contacts, or %NULL on unrecoverable errors
A hash table in which the keys are IDs and the values are errors (#GError)
%NULL on success, or an unrecoverable error that caused everything to fail
the @user_data that was passed to tp_connection_get_contacts_by_id()
the @weak_object that was passed to tp_connection_get_contacts_by_id()
Signature of the callback called when tp_connection_hold_handles() succeeds
or fails.
On success, the caller has one reference to each handle in @handles, which
may be released later with tp_connection_unref_handles(). If not
released, the handles will remain valid until @connection becomes invalid
(signalled by #TpProxy::invalidated).
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.
the connection
the handle type that was passed to tp_connection_hold_handles()
the number of handles that were passed to tp_connection_hold_handles() on success, or 0 on failure
a copy of the array of @n_handles handles that was passed to tp_connection_hold_handles() on success, or %NULL on failure
%NULL on success, or an error on failure
the same arbitrary pointer that was passed to tp_connection_hold_handles()
the same object that was passed to tp_connection_hold_handles()
A proxy object for a Telepathy connection manager.
This might represent a connection manager which is currently running
(in which case it can be introspected) or not (in which case its
capabilities can be read from .manager files in the filesystem).
Accordingly, this object never emits #TpProxy::invalidated unless all
references to it are discarded.
Various fields and methods on this object do not work until
%TP_CONNECTION_MANAGER_FEATURE_CORE is prepared. Use
tp_proxy_prepare_async() to wait for this to happen.
Note that the @protocols may be freed and reallocated (based on new
information) whenever the main loop is entered. Since 0.11.3, each protocol
struct can be copied with tp_connection_manager_protocol_copy() if a
private copy is needed.
Convenience function to create a new connection manager proxy. If
its protocol and parameter information are required, you should call
tp_connection_manager_call_when_ready() on the result.
is set.
a new reference to a connection manager proxy, or %NULL if @error
Proxy for the D-Bus daemon
The connection manager name (such as "gabble")
manager-file property, which may (and generally should) be %NULL.
Check that the given string is a valid connection manager name, i.e. that
it consists entirely of ASCII letters, digits and underscores, and starts
with a letter.
%TRUE if @name is valid
a possible connection manager name
Check that the given string is a valid protocol name, i.e. that
it consists entirely of ASCII letters, digits and hyphen/minus, and starts
with a letter.
%TRUE if @name is valid
a possible protocol name
Ensure that the known interfaces for TpConnectionManager have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_CONNECTION_MANAGER.
Attempt to run and introspect the connection manager, asynchronously.
Since 0.7.26 this function is not generally very useful, since
the connection manager will now be activated automatically if necessary.
If the CM was already running, do nothing and return %FALSE.
On success, emit #TpConnectionManager::activated when the CM appears
on the bus, and #TpConnectionManager::got-info when its capabilities
have been (re-)discovered.
On failure, emit #TpConnectionManager::exited without first emitting
activated.
if the connection manager was already running and no additional signals
will be emitted.
%TRUE if activation was needed and is now in progress, %FALSE
Call the @callback from the main loop when information about @cm's
supported protocols and parameters has been retrieved.
callback to call when information has been retrieved or on error
arbitrary data to pass to the callback
called to destroy @user_data
object to reference weakly; if it is destroyed, @callback will not be called, but @destroy will still be called
Return the internal name of this connection manager in the Telepathy
D-Bus API, e.g. "gabble" or "haze". This is often the name of the binary
without the "telepathy-" prefix.
The returned string is valid as long as @self is. Copy it with g_strdup()
if a longer lifetime is required.
the #TpConnectionManager:connection-manager property
If protocol and parameter information has been obtained from the connection
manager or the cache in the .manager file, return %TRUE. Otherwise,
return %FALSE.
This may change from %FALSE to %TRUE at any time that the main loop is
running; the #GObject::notify signal is emitted for the
#TpConnectionManager:info-source property.
%TP_CM_INFO_SOURCE_NONE
%TRUE, unless the #TpConnectionManager:info-source property is
Return %TRUE if this connection manager currently appears to be running.
This may change at any time that the main loop is running; the
#TpConnectionManager::activated and #TpConnectionManager::exited signals
are emitted.
whether the connection manager is currently running
If protocol and parameter information has been obtained from the connection
manager, return %TP_CM_INFO_SOURCE_LIVE; if it has been obtained from the
cache in the .manager file, return %TP_CM_INFO_SOURCE_FILE. If this
information has not yet been obtained, or obtaining it failed, return
%TP_CM_INFO_SOURCE_NONE.
This may increase at any time that the main loop is running; the
#GObject::notify signal is emitted.
the value of the #TpConnectionManager:info-source property
Returns a list of protocol names supported by this connection manager.
These are the internal protocol names used by the Telepathy specification
(e.g. "jabber" and "msn"), rather than user-visible names in any particular
locale.
If this function is called before the connection manager information has
been obtained, the result is always %NULL. Use
tp_connection_manager_call_when_ready() to wait for this.
The result is copied and must be freed by the caller, but it is not
necessarily still true after the main loop is re-entered.
a #GStrv of protocol names
Return whether @protocol is supported by this connection manager.
If this function is called before the connection manager information has
been obtained, the result is always %FALSE. Use
tp_connection_manager_call_when_ready() to wait for this.
%TRUE if this connection manager supports @protocol
the name of a protocol as defined in the Telepathy D-Bus API, e.g. "jabber" or "msn"
Returns a structure representing a protocol, or %NULL if this connection
manager does not support the specified protocol.
Since 0.11.11, you can get a #GObject version with more
functionality by calling tp_connection_manager_get_protocol_object().
If this function is called before the connection manager information has
been obtained, the result is always %NULL. Use
tp_connection_manager_call_when_ready() to wait for this.
The result is not necessarily valid after the main loop is re-entered.
Since 0.11.3, it can be copied with tp_connection_manager_protocol_copy()
if a permanently-valid copy is needed.
a structure representing the protocol
the name of a protocol as defined in the Telepathy D-Bus API, e.g. "jabber" or "msn"
Returns an object representing a protocol, or %NULL if this connection
manager does not support the specified protocol.
If this function is called before the connection manager information has
been obtained, the result is always %NULL. Use tp_proxy_prepare_async()
to wait for this.
The result should be referenced with g_object_ref() if it will be kept.
an object representing the protocol, or %NULL
the name of a protocol as defined in the Telepathy D-Bus API, e.g. "jabber" or "msn"
If %TRUE, always introspect the connection manager as it comes online,
even if we already have its info from a .manager file. Default %FALSE.
The name of the connection manager, e.g. "gabble" (read-only).
Where we got the current information on supported protocols
(a #TpCMInfoSource).
Since 0.7.26, the #GObject::notify signal is emitted for this
property.
(Note that this is of type %G_TYPE_UINT, not %TP_TYPE_CM_INFO_SOURCE,
for historical reasons.)
The absolute path of the .manager file. If set to %NULL (the default),
the XDG data directories will be searched for a .manager file of the
correct name.
If set to the empty string, no .manager file will be read.
Emitted when the connection manager's well-known name appears on the bus.
Emitted when the connection manager's well-known name disappears from
the bus or when activation fails.
Emitted when the connection manager's capabilities have been discovered.
This signal is not very helpful. Since 0.7.26, using
tp_connection_manager_call_when_ready() instead is recommended.
a #TpCMInfoSource
The class of a #TpConnectionManager.
Signature of the callback supplied to tp_list_connection_managers().
Since 0.11.3, tp_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.
%NULL-terminated array of #TpConnectionManager (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), or %NULL on error
number of connection managers in @cms (not including the final %NULL)
%NULL on success, or an error that occurred
user-supplied data
user-supplied weakly referenced object
Structure representing a connection manager parameter.
<!-- -->
the name of the parameter
<!-- -->
the D-Bus signature of the parameter
<!-- -->
%TRUE if the parameter is normally required
<!-- -->
(by setting the special "register" parameter to %TRUE)
%TRUE if the parameter is required when registering a new account
<!-- -->
%TRUE if the parameter's value is a password or other secret
<!-- -->
%TRUE if the parameter represents a D-Bus property of the same name
Get the default value for this parameter, if there is one. If %FALSE is
returned, @value is left uninitialized.
%TRUE if there is a default value
pointer to an unset (all zeroes) #GValue into which the default's type and value are written
<!-- Returns: says it all -->
tp_connection_manager_param_free()
a newly (slice) allocated #TpConnectionManagerParam, free with
Frees @param, which was copied with tp_connection_manager_param_copy().
Structure representing a protocol supported by a connection manager.
Note that the size of this structure may change, so its size must not be
relied on.
Returns a list of parameter names supported by this connection manager
for this protocol.
The result is copied and must be freed by the caller with g_strfreev().
a #GStrv of protocol names
<!-- no more to say -->
%TRUE if @protocol supports the parameter @param.
a parameter name
<!-- no more to say -->
supported
a structure representing the parameter @param, or %NULL if not
a parameter name
Return whether a new account can be registered on this protocol, by setting
the special "register" parameter to %TRUE.
%TRUE if @protocol supports the parameter "register"
<!-- Returns: says it all -->
tp_connection_manager_protocol_free()
a newly (slice) allocated #TpConnectionManagerProtocol, free with
Frees @proto, which was copied with tp_connection_manager_protocol_copy().
Called as the result of tp_connection_manager_call_when_ready(). If the
connection manager's protocol and parameter information could be retrieved,
non-%NULL and @cm is not ready.
a connection manager
%NULL on success, or the reason why tp_connection_manager_is_ready() would return %FALSE
the @user_data passed to tp_connection_manager_call_when_ready()
the @weak_object passed to tp_connection_manager_call_when_ready()
Signature of the callback supplied to tp_list_connection_names().
%NULL-terminated array of @n connection bus names, or %NULL on error
number of names (not including the final %NULL), or 0 on error
%NULL-terminated array of @n connection manager names (e.g. "gabble") in the same order as @names, or %NULL on error
%NULL-terminated array of same order as @names, or %NULL on error
%NULL on success, or an error that occurred
user-supplied data
user-supplied weakly referenced object
Signature of the callback called when tp_connection_request_handles()
succeeds or fails.
On success, the caller has one reference to each handle in @handles, which
may be released later with tp_connection_unref_handles(). If not
released, the handles will remain valid until @connection becomes invalid
(signalled by TpProxy::invalidated).
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.
the connection
the handle type that was passed to tp_connection_request_handles()
the number of IDs that were passed to tp_connection_request_handles() on success, or 0 on failure
the @n_handles handles corresponding to @ids, in the same order, or %NULL on failure
a copy of the array of @n_handles IDs that was passed to tp_connection_request_handles() on success, or %NULL on failure
%NULL on success, or an error on failure
the same arbitrary pointer that was passed to tp_connection_request_handles()
the same object that was passed to tp_connection_request_handles()
Signature of a callback used to receive the result of
tp_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.
The connection
The number of TpContact objects for which an upgrade was requested
An array of @n_contacts TpContact objects (this callback is not given an extra reference to any of these objects, and must call g_object_ref() on any that it will keep)
An unrecoverable error, or %NULL if the connection remains valid
the @user_data that was passed to tp_connection_upgrade_contacts()
the @weak_object that was passed to tp_connection_upgrade_contacts()
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)
the connection (which may be in the middle of being disposed, if error is non-%NULL, error->domain is TP_DBUS_ERRORS and error->code is TP_DBUS_ERROR_PROXY_UNREFERENCED)
%NULL if the connection is ready for use, or the error with which it was invalidated if it is now invalid
whatever was passed to tp_connection_call_when_ready()
An object representing a contact on a #TpConnection.
Contact objects support tracking a number of attributes of contacts, as
described by the #TpContactFeature flags. Features can be specified when
instantiating contact objects (with tp_connection_get_contacts_by_id() or
tp_connection_get_contacts_by_handle()), or added to an existing contact
object with tp_connection_upgrade_contacts(). For example, a client wishing
to keep track of a contact's alias would set #TP_CONTACT_FEATURE_ALIAS, and
then listen for the "notify::alias" signal, emitted whenever the
#TpContact:alias property changes.
Note that releasing a #TpContact object might release handle references
held by calling tp_cli_connection_call_request_handles(),
tp_cli_connection_run_request_handles(),
tp_cli_connection_call_hold_handles(),
tp_cli_connection_run_hold_handles(),
tp_cli_connection_interface_contacts_call_get_contact_attributes() or
tp_cli_connection_interface_contacts_run_get_contact_attributes() directly.
Those functions should be avoided in favour of using #TpContact,
tp_connection_hold_handles(), tp_connection_request_handles() and
tp_connection_get_contact_attributes().
<!-- nothing more to say -->
(it must be referenced with g_object_ref if it must remain valid
longer than the contact)
connection
Return the contact's handle, which is of type %TP_HANDLE_TYPE_CONTACT,
or 0 if the #TpContact:connection has become invalid.
This handle is referenced using the Telepathy D-Bus API and remains
referenced for as long as @self exists and the
#TpContact:connection remains valid.
However, the caller of this function does not gain an additional reference
to the handle.
the same handle as the #TpContact:handle property
Return the contact's identifier. This remains valid for as long as @self
exists; if the caller requires a string that will persist for longer than
that, it must be copied with g_strdup().
the same non-%NULL identifier as the #TpContact:identifier property
<!-- -->
%TRUE if @self has been set up to track the feature @feature
a desired feature
Return the contact's alias. This remains valid until the main loop
is re-entered; if the caller requires a string that will persist for
longer than that, it must be copied with g_strdup().
the same non-%NULL alias as the #TpContact:alias
Return the contact's avatar token. This remains valid until the main loop
is re-entered; if the caller requires a string that will persist for
longer than that, it must be copied with g_strdup().
(possibly %NULL)
the same token as the #TpContact:avatar-token property
If this object has been set up to track %TP_CONTACT_FEATURE_PRESENCE
and the underlying connection supports either the Presence or
SimplePresence interfaces, return the type of the contact's presence.
Otherwise, return %TP_CONNECTION_PRESENCE_TYPE_UNSET.
the same presence type as the #TpContact:presence-type property
Return the name of the contact's presence status, or an empty string.
This remains valid until the main loop is re-entered; if the caller
requires a string that will persist for longer than that, it must be
copied with g_strdup().
property
the same non-%NULL status name as the #TpContact:presence-status
Return the contact's user-defined status message, or an empty string.
This remains valid until the main loop is re-entered; if the caller
requires a string that will persist for longer than that, it must be
copied with g_strdup().
property
the same non-%NULL message as the #TpContact:presence-message
Return the contact's user-defined location or %NULL if the location is
unspecified.
This remains valid until the main loop is re-entered; if the caller
requires a hash table that will persist for longer than that, it must be
reffed with g_hash_table_ref().
#GHashTable (or %NULL) as the #TpContact:location property
the same
<!-- -->
#TpContact:capabilities property
the same #TpCapabilities (or %NULL) as the
Return the contact's avatar file. This remains valid until the main loop
is re-entered; if the caller requires a #GFile that will persist for
longer than that, it must be reffed with g_object_ref().
(possibly %NULL)
avatar-file property
Return the contact's avatar MIME type. This remains valid until the main loop
is re-entered; if the caller requires a string that will persist for
longer than that, it must be copied with g_strdup().
(possibly %NULL)
the same MIME type as the #TpContact:avatar-mime-type property
Returns a newly allocated #GList of contact's vCard fields. The list must be
freed with g_list_free() after used.
Note that the #TpContactInfoField<!-- -->s in the returned #GList are not
dupped before returning from this function. One could copy every item in the
list using tp_contact_info_field_copy().
Same as the #TpContact:contact-info property.
a #GList of #TpContactInfoField, or %NULL if the feature is not yet
prepared.
Requests an asynchronous request of the contact info of @self. When
the operation is finished, @callback will be called. You can then call
tp_contact_request_contact_info_finish() to get the result of the operation.
If the operation is successful, the #TpContact:contact-info property will be
updated (emitting "notify::contact-info" signal) before @callback is called.
That means you can call tp_contact_get_contact_info() to get the new vCard
inside @callback.
Note that requesting the vCard from the network can take significant time, so
a bigger timeout is set on the underlying D-Bus call. @cancellable can be
cancelled to free resources used in the D-Bus call if the caller is no longer
interested in the vCard.
If %TP_CONTACT_FEATURE_CONTACT_INFO is not yet set on @self, it will be
set before its property gets updated and @callback is called.
optional #GCancellable object, %NULL to ignore.
a callback to call when the request is satisfied
data to pass to @callback
Finishes an async request of @self info. If the operation was successful,
the contact's vCard can be accessed using tp_contact_get_contact_info().
%TRUE if the request call was successful, otherwise %FALSE
a #GAsyncResult
The contact's alias if available, falling back to their
#TpContact:identifier if no alias is available or if the #TpContact has
not been set up to track %TP_CONTACT_FEATURE_ALIAS.
This alias may have been supplied by the contact themselves, or by the
local user, so it does not necessarily unambiguously identify the contact.
However, it is suitable for use as a main "display name" for the contact.
This is never %NULL for contact objects that are visible to library-user
code.
#GFile to the latest cached avatar image, or %NULL if this contact has
no avatar, or if the avatar data is not yet retrieved.
When #TpContact:avatar-token changes, this property is not updated
immediately, but will be updated when the new avatar data is retrieved and
stored in cache. Until then, the file will keep its old value of the latest
cached avatar image.
This is set to %NULL if %TP_CONTACT_FEATURE_AVATAR_DATA is not set on this
contact. Note that setting %TP_CONTACT_FEATURE_AVATAR_DATA will also
implicitly set %TP_CONTACT_FEATURE_AVATAR_TOKEN.
MIME type of the latest cached avatar image, or %NULL if this contact has
no avatar, or if the avatar data is not yet retrieved.
This is always the MIME type of the image given by #TpContact:avatar-file.
An opaque string representing state of the contact's avatar (depending on
the protocol, this might be a hash, a timestamp or something else), or
an empty string if there is no avatar.
This may be %NULL if it is not known whether this contact has an avatar
or not (either for network protocol reasons, or because this #TpContact
has not been set up to track %TP_CONTACT_FEATURE_AVATAR_TOKEN).
The capabilities supported by this contact. If the underlying Connection
doesn't support the ContactCapabilities interface, this property will
contain the capabilities supported by the connection.
Use tp_capabilities_is_specific_to_contact() to check if the capabilities
are specific to this #TpContact or not.
This may be %NULL if this #TpContact object has not been set up to track
%TP_CONTACT_FEATURE_CAPABILITIES.
The #TpConnection to which this contact belongs.
A #GList of #TpContactInfoField representing the vCard of this contact.
This is set to %NULL if %TP_CONTACT_FEATURE_CONTACT_INFO is not set on this
contact.
The contact's handle in the Telepathy D-Bus API, a handle of type
%TP_HANDLE_TYPE_CONTACT representing the string
given by #TpContact:identifier.
This handle is referenced using the Telepathy D-Bus API and remains
referenced for as long as the #TpContact exists and the
#TpContact:connection remains valid.
However, getting this property does not cause an additional reference
to the handle to be held.
If the #TpContact:connection becomes invalid, this property is no longer
meaningful and will be set to 0.
The contact's identifier in the instant messaging protocol (e.g.
XMPP JID, SIP URI, AOL screenname or IRC nick - whatever the underlying
protocol uses to identify a user).
This is never %NULL for contact objects that are visible to library-user
code.
If this contact has set a user-defined status message, that message;
if not, an empty string (which user interfaces may replace with a
localized form of the #TpContact:presence-status or
#TpContact:presence-type).
This may be an empty string even if the contact has set a message,
if this #TpContact object has not been set up to track
%TP_CONTACT_FEATURE_PRESENCE. It is never %NULL.
A string representing the presence status of this contact. This may be
a well-known string from the Telepathy specification, like "available",
or a connection-manager-specific string, like "out-to-lunch".
This may be an empty string if this #TpContact object has not been set up
to track %TP_CONTACT_FEATURE_PRESENCE. It is never %NULL.
The #TpConnectionPresenceType representing the type of presence status
for this contact.
This is provided so even unknown values for #TpContact:presence-status
can be classified into their fundamental types.
This may be %TP_CONNECTION_PRESENCE_TYPE_UNSET if this #TpContact
has not been set up to track %TP_CONTACT_FEATURE_PRESENCE.
Emitted when this contact's presence changes.
The new value of #TpContact:presence-type
The new value of #TpContact:presence-status
The new value of #TpContact:presence-message
Enumeration representing the features a #TpContact can optionally support.
When requesting a #TpContact, library users specify the desired features;
the #TpContact code will only initialize state for those features, to
avoid unwanted D-Bus round-trips and signal connections.
Since 0.11.5, there is a corresponding #GEnumClass type,
%TP_TYPE_CONTACT_FEATURE.
Structure to be included in the instance structure of objects that
use this mixin. Initialize it with tp_contacts_mixin_init().
There are no public fields.
Structure to be included in the class structure of objects that
use this mixin. Initialize it with tp_contacts_mixin_class_init().
There are no public fields.
This function is called to supply contact attributes pertaining to
a particular interface, for a list of contacts.
All the handles in @contacts are guaranteed to be valid and
referenced.
An object implementing the Contacts interface with this mixin
The contact handles for which attributes are requested
hash of handle => hash of attributes, containing all the contacts in the contacts array
A subclass of #TpProxy that represents the D-Bus daemon. It mainly provides
functionality to manage well-known names on the bus.
Returns a proxy for signals and method calls on a particular bus
connection.
Use tp_dbus_daemon_dup() instead if you just want a connection to the
starter or session bus (which is almost always the right thing for
Telepathy).
to which @connection is connected
a new proxy for signals and method calls on the bus daemon
a connection to D-Bus
Returns a proxy for signals and method calls on the D-Bus daemon on which
this process was activated (if it was launched by D-Bus service
activation), or the session bus (otherwise).
If it is not possible to connect to the appropriate bus, raise an error
and return %NULL.
The returned #TpDBusDaemon is cached; the same #TpDBusDaemon object will
be returned by this function repeatedly, as long as at least one reference
exists.
daemon, or %NULL
a reference to a proxy for signals and method calls on the bus
Ensure that the known interfaces for TpDBusDaemon have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_DBUS_DAEMON.
Arrange for @callback to be called with the owner of @name as soon as
possible (which might even be before this function returns!), then
again every time the ownership of @name changes.
If multiple watches are registered for the same @name, they will be called
in the order they were registered.
The name whose ownership is to be watched
Callback to call when the ownership is discovered or changes
Arbitrary data to pass to @callback
Called to destroy @user_data when the name owner watch is cancelled due to tp_dbus_daemon_cancel_name_owner_watch()
If there was a previous call to tp_dbus_daemon_watch_name_owner()
with exactly the given @name, @callback and @user_data, remove it.
If more than one watch matching the details provided was active, remove
only the most recently added one.
%TRUE if there was such a watch, %FALSE otherwise
the name that was being watched
the callback that was called
the user data that was provided
Claim the given well-known name without queueing, allowing replacement
or replacing an existing name-owner. This makes a synchronous call to the
bus daemon.
an error occurred.
%TRUE if @well_known_name was claimed, or %FALSE and sets @error if
a well-known name to acquire
whether to consider it to be a success if this process already owns the name
Release the given well-known name. This makes a synchronous call to the bus
daemon.
if an error occurred.
%TRUE if @well_known_name was released, or %FALSE and sets @error
a well-known name owned by this process to release
<!-- Returns: is enough -->
as long as this #TpDBusDaemon is
the unique name of this connection to the bus, which is valid for
Call the ListNames method on the bus daemon, asynchronously. The @callback
will be called from the main loop with a list of all the names (either
unique or well-known) that exist on the bus.
In versions of telepathy-glib that have it, this should be preferred
instead of calling tp_cli_dbus_daemon_call_list_names(), since that
function will result in wakeups for every NameOwnerChanged signal.
timeout for the call
callback to be called on success or failure; must not be %NULL
opaque user-supplied data to pass to the callback
if not %NULL, called with @user_data as argument after the call has succeeded or failed, or after @weak_object has been destroyed
if not %NULL, a GObject which will be weakly referenced; if it is destroyed, @callback will not be called at all
Call the ListActivatableNames method on the bus daemon, asynchronously.
The @callback will be called from the main loop with a list of all the
well-known names that are available for service-activation on the bus.
In versions of telepathy-glib that have it, this should be preferred
instead of calling tp_cli_dbus_daemon_call_list_activatable_names(), since
that function will result in wakeups for every NameOwnerChanged signal.
timeout for the call
callback to be called on success or failure; must not be %NULL
opaque user-supplied data to pass to the callback
if not %NULL, called with @user_data as argument after the call has succeeded or failed, or after @weak_object has been destroyed
if not %NULL, a GObject which will be weakly referenced; if it is destroyed, @callback will not be called at all
Export @object at @object_path. This is a convenience wrapper around
dbus_g_connection_register_g_object(), and behaves similarly.
an object path
an object to export
Stop exporting @object on D-Bus. This is a convenience wrapper around
dbus_g_connection_unregister_g_object(), and behaves similarly.
an object previously exported with tp_dbus_daemon_register_object()
The class of #TpDBusDaemon.
Signature of a callback for functions that list bus names.
object representing a connection to a bus
constant %NULL-terminated array of constant strings representing bus names, or %NULL on error
the error that occurred, or %NULL on success
the same user data that was passed to tp_dbus_daemon_list_names or tp_dbus_daemon_list_activatable_names
the same object that was passed to tp_dbus_daemon_list_names or tp_dbus_daemon_list_activatable_names
The signature of the callback called by tp_dbus_daemon_watch_name_owner().
The D-Bus daemon
The name whose ownership has changed or been discovered
The unique name that now owns @name
Arbitrary user-supplied data as passed to tp_dbus_daemon_watch_name_owner()
#GError codes for use with the %TP_DBUS_ERRORS domain.
Since 0.11.5, there is a corresponding #GEnumClass type,
%TP_TYPE_DBUS_ERROR.
A set of flags indicating which D-Bus bus names are acceptable.
They can be combined with the bitwise-or operator to accept multiple
types. %TP_DBUS_NAME_TYPE_NOT_BUS_DAEMON and %TP_DBUS_NAME_TYPE_ANY are
the bitwise-or of other appropriate types, for convenience.
Since 0.11.5, there is a corresponding #GFlagsClass type,
%TP_TYPE_DBUS_NAME_TYPE.
Bitfield representing allowed access to a property.
Since 0.11.5, there is a corresponding #GFlagsClass type,
%TP_TYPE_DBUS_PROPERTIES_MIXIN_FLAGS.
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*.
The exported object with the properties
A quark representing the D-Bus interface name
A quark representing the D-Bus property name
A GValue pre-initialized to the right type, into which to put the value
The getter_data from the #TpDBusPropertiesMixinPropImpl
Structure representing an implementation of an interface's properties.
In addition to the documented fields, there are four pointers which must
be initialized to %NULL.
This structure must either be statically allocated, or duplicated and never
freed, so it always remains valid.
Semi-abstract description of an interface. Each service GInterface that
has properties must have one of these attached to it via
tp_svc_interface_set_dbus_properties_info() in its base_init function;
service GInterfaces that do not have properties may have one of these
with no properties.
This structure must either be statically allocated, or duplicated and never
freed, so it always remains valid.
In addition to the documented members, there are two private pointers
for future expansion, which must always be initialized to %NULL.
Structure representing an implementation of a property.
In addition to the documented fields, there are three pointers which must
be initialized to %NULL.
This structure must either be statically allocated, or duplicated and never
freed, so it always remains valid.
Semi-abstract description of a property, as attached to a service
GInterface. This structure must either be statically allocated, or
duplicated and never freed, so it always remains valid.
In addition to the documented members, there are two private pointers
for future expansion, which must always be initialized to %NULL.
Signature of a callback used to get the value of a property.
%TRUE on success, %FALSE (setting @error) on failure
The exported object with the properties
A quark representing the D-Bus interface name
A quark representing the D-Bus property name
The new value for the property
The setter_data from the #TpDBusPropertiesMixinPropImpl
Enumerated type representing the Telepathy D-Bus errors.
Structure representing the group mixin as used in a particular class.
To be placed in the implementation's instance structure.
All fields should be considered read-only.
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.
%TRUE on success, %FALSE with @error set on error
An object implementing the group interface with this mixin
The handle of the contact to be added
A message to be sent if the protocol supports it
Structure representing the group mixin as used in a particular class.
To be placed in the implementation's class structure.
Initialize this with tp_group_mixin_class_init().
All fields should be considered read-only.
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.
%TRUE on success, %FALSE with @error set on error
An object implementing the group interface with this mixin
The handle of the contact to be removed
A message to be sent if the protocol supports it
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(), .
%TRUE on success, %FALSE with @error set on error
An object implementing the group interface with this mixin
The handle of the contact to be removed
A message to be sent if the protocol supports it
A #TpChannelGroupChangeReason indicating the reason
Data structure representing the context of a Handler.HandleChannels()
call.
Called by #TpBaseClientClassAddDispatchOperationImpl when it's done so
the D-Bus method can return.
Called by #TpBaseClientClassAddDispatchOperationImpl to raise a D-Bus error.
the error to return from the method
Called by #TpBaseClientClassAddDispatchOperationImpl to indicate that it
implements the method in an async way. The caller must take a reference
to the #TpHandleChannelsContext before calling this function, and
is responsible for calling either
tp_handle_channels_context_accept() or
tp_handle_channels_context_fail() later.
Return any extra information that accompanied this request to handle
channels (the Handler_Info argument from the HandleChannels D-Bus method).
Well-known keys for this map will be defined by the Telepathy D-Bus
Interface Specification; at the time of writing, none have been defined.
The returned hash table is only valid for as long as @self is.
extra handler information, in a form suitable for use with
tp_asv_get_string() etc.
extensible
A #TpAccount object representing the Account of the DispatchOperation
that has been passed to HandleChannels.
Read-only except during construction.
This property can't be %NULL.
A #GPtrArray containing #TpChannel objects representing the channels
that have been passed to HandleChannels.
Read-only except during construction.
This property can't be %NULL.
A #TpConnection object representing the Connection of the DispatchOperation
that has been passed to HandleChannels.
Read-only except during construction.
This property can't be %NULL.
The #DBusGMethodInvocation representing the D-Bus context of the
HandleChannels call.
Can only be written during construction.
A #GPtrArray containing #TpChannelRequest objects representing the
requests that have been passed to HandleChannels.
Read-only except during construction.
This property can't be %NULL.
The time at which user action occurred, or one of the
special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or
%TP_USER_ACTION_TIME_CURRENT_TIME
(see #TpAccountChannelRequest:user-action-time for details)
Read-only except during construction.
Emitted when tp_handle_channels_context_accept has been called on @self.
The class of a #TpHandleChannelsContext.
Dummy typedef representing any implementation of this interface.
The class of a handle repository interface. The structure layout is
only available within telepathy-glib, for the handle repository
implementations' benefit.
A set of handles. This is similar to a #TpIntSet (and implemented using
one), but adding a handle to the set also references it.
Creates a new #TpHandleSet
A new #TpHandleSet
#TpHandleRepoIface that holds the handles to be reffed by this set
Creates a new #TpHandleSet
A new #TpHandleSet
#TpHandleRepoIface that holds the handles to be reffed by this set
array of handles to be referenced by this set
Creates a new #TpHandleSet with the same contents as @other.
a new set
Remove every handle from @set, releasing the references it holds.
Delete a #TpHandleSet and unreference any handles that it holds
<!--Returns: says it all, this comment is just to keep gtkdoc happy-->
the underlying #TpIntSet used by this #TpHandleSet
Add a handle to a #TpHandleSet, and reference it in the attached
#TpHandleRepoIface
handle to add
Remove a handle from a #TpHandleSet, and unreference it in the attached
#TpHandleRepoIface
FALSE if the handle was invalid, or was not in this set
handle to remove
Check if the handle is in this set
TRUE if the handle is in this set
handle to check
Call @func(@set, @handle, @userdata) for each handle in @set.
A callback
Arbitrary data to pass to @func
Return the same thing as <code>(tp_handle_set_size (set) == 0)</code>,
but calculated more efficiently.
%TRUE if the set has no members
<!--no further documentation needed-->
the number of handles in this set
<!--Returns: says it all, this comment is just to keep gtkdoc happy-->
the handles in the set
a newly-allocated GArray of guint representing
Add a set of handles to a handle set, referencing those which are not
already members. The TpIntSet returned must be freed with tp_intset_destroy.
the handles which were added (some subset of @add)
a #TpIntSet of handles to add
Remove a set of handles from a handle set, dereferencing those which are
members. The TpIntSet returned must be freed with tp_intset_destroy.
If you want to be able to inspect the handles in the set returned,
you must ensure that this function does not cause their refcount to drop
to zero, for instance by temporarily taking a reference to all the
handles in @remove, calling this function, doing something with the
result and discarding the temporary references.
of @remove).
the handles which were dereferenced and removed (some subset
a #TpIntSet of handles to remove
Signature of the callback used to iterate over the handle set in
tp_handle_set_foreach().
The set of handles on which tp_handle_set_foreach() was called
A handle in the set
Arbitrary user data as supplied to tp_handle_set_foreach()
A callback function acting on unsigned integers.
The relevant integer
Opaque user data
Opaque type representing a set of unsigned integers.
Allocate a new integer set.
a new, empty integer set to be destroyed with tp_intset_destroy()
Allocate a new integer set containing the given integer.
tp_intset_destroy()
a new integer set containing @element, to be destroyed with
integer to add to a new set
Free all memory used by the set.
Unset every integer in the set.
Add an integer into a TpIntSet.
integer to add
Remove an integer from a TpIntSet
%TRUE if @element was previously in @set
integer to add
Tests if @element is a member of @set
%TRUE if @element is in @set
integer to test
Call @func(element, @userdata) for each element of @set, in order.
@TpIntFunc to use to iterate the set
user data to pass to each call of @func
<!--Returns: says it all-->
the same integers as @set.
a GArray of guint (which must be freed by the caller) containing
Return the same thing as <code>(tp_intset_size (set) == 0)</code>,
but calculated more efficiently.
%TRUE if @set is empty
<!--Returns: says it all-->
The number of integers in @set
<!--Returns: says it all-->
%TRUE if @left and @right contain the same bits
A set of integers
<!--Returns: says it all-->
tp_intset_destroy() by the caller
A set containing the same integers as @orig, to be freed with
<!--Returns: says it all-->
(analogous to the bitwise operation left & right), to be freed with
tp_intset_destroy() by the caller
The set of those integers which are in both @left and @right
The right operand
<!--Returns: says it all-->
(analogous to the bitwise operation left | right), to be freed with
tp_intset_destroy() by the caller
The set of those integers which are in either @left or @right
The right operand
<!--Returns: says it all-->
(analogous to the bitwise operation left & (~right)), to be freed with
tp_intset_destroy() by the caller
The set of those integers which are in @left and not in @right
The right operand
<!--Returns: says it all-->
but not both (analogous to the bitwise operation left ^ right), to be freed
with tp_intset_destroy() by the caller
The set of those integers which are in either @left or @right
The right operand
<!--Returns: says it all-->
numbers in @set in a human-readable format
a string which the caller must free with g_free, listing the
An opaque structure representing iteration in undefined order over a set of
integers. Must be initialized with tp_intset_fast_iter_init().
Usage is similar to #GHashTableIter:
<informalexample><programlisting>
TpIntSetFastIter iter;
guint element;
tp_intset_fast_iter_init (&iter, intset);
while (tp_intset_fast_iter_next (&iter, &element))
{
printf ("%u is in the intset\n", element);
}
</programlisting></informalexample>
A structure representing iteration over a set of integers. Must be
initialized with either TP_INTSET_ITER_INIT() or tp_intset_iter_init().
Since 0.11.6, consider using #TpIntSetFastIter if iteration in
numerical order is not required.
Data structure representing the context of a Observer.ObserveChannels()
call.
Called by #TpBaseClientClassObserveChannelsImpl when it's done so the D-Bus
method can return.
Called by #TpBaseClientClassObserveChannelsImpl to raise a D-Bus error.
the error to return from the method
Called by #TpBaseClientClassObserveChannelsImpl to indicate that it
implements the method in an async way. The caller must take a reference
to the #TpObserveChannelsContext before calling this function, and
is responsible for calling either tp_observe_channels_context_accept() or
tp_observe_channels_context_fail() later.
If this call to ObserveChannels is for channels that already
existed before this observer started (because the observer used
tp_base_client_set_observer_recover()), return %TRUE.
In most cases, the result is %FALSE.
%TRUE for pre-existing channels, %FALSE for new channels
A #TpAccount object representing the Account that has been passed to
ObserveChannels.
Read-only except during construction.
This property can't be %NULL.
A #GPtrArray containing #TpChannel objects representing the channels
that have been passed to ObserveChannels.
Read-only except during construction.
This property can't be %NULL.
A #TpConnection object representing the Connection that has been passed
to ObserveChannels.
Read-only except during construction.
This property can't be %NULL.
The #DBusGMethodInvocation representing the D-Bus context of the
ObserveChannels call.
Can only be written during construction.
A #TpChannelDispatchOperation object representing the
ChannelDispatchOperation that has been passed to ObserveChannels,
or %NULL if none has been passed.
Read-only except during construction.
A #GPtrArray containing #TpChannelRequest objects representing the
requests that have been passed to ObserveChannels.
Read-only except during construction.
This property can't be %NULL.
The class of a #TpObserveChannelsContext.
Structure to be included in the instance structure of objects that
use this mixin. Initialize it with tp_presence_mixin_init().
There are no public fields.
Structure to be included in the class structure of objects that
use this mixin. Initialize it with tp_presence_mixin_class_init().
All fields should be considered read-only.
Signature of the callback used to get the stored presence status of
contacts. The returned hash table should have contact handles mapped to
their respective presence statuses in #TpPresenceStatus structs.
The returned hash table will be freed with g_hash_table_destroy. The
callback is responsible for ensuring that this does any cleanup that
may be necessary.
The contact presence on success, %NULL with error set on error
An object with this mixin.
An array of #TpHandle for the contacts to get presence status for
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 %NULL status
argument.
The optional_arguments hash table in @status, if not NULL, 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().
%TRUE if the operation was successful, %FALSE if not.
An object with this mixin.
The status to set, or NULL for whatever the protocol defines as a "default" status
Signature of the callback used to determine if a given status is currently
available to be set on the connection.
When implementing the
org.freedesktop.Telepathy.Connection.Interface.SimplePresence interface
this can be called while DISCONNECTED to determine which statuses can be set
in that state.
%TRUE if the status is available, %FALSE if not.
An object implementing the presence interface with this mixin
The index of the presence status in the provided supported presence statuses array
Structure representing a presence status.
In addition to the fields documented here, there are two gpointer fields
which must currently be %NULL. A meaning may be defined for these in a
future version of telepathy-glib.
Construct a presence status structure. You should free the returned
structure with #tp_presence_status_free.
A pointer to the newly allocated presence status structure.
Index of the presence status in the provided supported presence statuses array
Optional arguments for the presence statuses. Can be NULL if there are no optional arguments. The presence status object makes a copy of the hashtable, so you should free the original.
Deallocate all resources associated with a presence status structure.
A base class for connection managers' protocols.
<!-- -->
a new protocol proxy, or %NULL on invalid arguments
proxy for the D-Bus daemon; may not be %NULL
the connection manager name (such as "gabble")
the protocol name (such as "jabber")
the immutable D-Bus properties for this protocol
Ensure that the known interfaces for TpProtocol have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
tp_proxy_or_subclass_hook_on_interface_add() with first argument
%TP_TYPE_PROTOCOL.
Return the same thing as the protocol-name property, for convenient use
in C code. The returned string is valid for as long as @self exists.
the value of the #TpProtocol:protocol-name property
<!-- no more to say -->
supported
a structure representing the parameter @param, or %NULL if not
a parameter name
<!-- no more to say -->
%TRUE if @self supports the parameter @param.
a parameter name
Return whether a new account can be registered on this protocol, by setting
the special "register" parameter to %TRUE.
%TRUE if @protocol supports the parameter "register"
Returns a list of parameter names supported by this connection manager
for this protocol.
The result is copied and must be freed by the caller with g_strfreev().
#TpProtocol:param-names
a copy of
<!-- -->
the value of #TpProtocol:vcard-field
<!-- -->
the non-%NULL, non-empty value of #TpProtocol:english-name
<!-- -->
the non-%NULL, non-empty value of #TpProtocol:icon-name
<!-- -->
(if non-%NULL) if it will be kept
capabilities, which must be referenced
The classes of channel that can be requested from connections to this
protocol, or %NULL if this is unknown or the %TP_PROTOCOL_FEATURE_CORE
feature has not been prepared.
The name of the protocol in a form suitable for display to users,
such as "AIM" or "Yahoo!", or a string based on #TpProtocol:protocol-name
(currently constructed by putting the first character in title case,
but this is not guaranteed) if no better name is available or the
%TP_PROTOCOL_FEATURE_CORE feature has not been prepared.
This is effectively in the C locale (international English); user
interfaces requiring a localized protocol name should look one up in their
own message catalog based on either #TpProtocol:protocol-name or
#TpProtocol:english-name, but should use this English version as a
fallback if no translated version can be found.
The name of an icon in the system's icon theme. If none was supplied
by the Protocol, or the %TP_PROTOCOL_FEATURE_CORE feature has not been
prepared, a default is used; currently, this is "im-" plus
#TpProtocol:name.
A list of parameter names supported by this connection manager
for this protocol, or %NULL if %TP_PROTOCOL_FEATURE_PARAMETERS has not
been prepared.
The machine-readable name of the protocol, taken from the Telepathy
D-Bus Interface Specification, such as "jabber" or "local-xmpp".
The most common vCard field used for this protocol's contact
identifiers, normalized to lower case, or %NULL if there is no such field
or the %TP_PROTOCOL_FEATURE_CORE feature has not been prepared.
The class of a #TpProtocol.
Structure representing a Telepathy client-side proxy.
Return whether this proxy is known to have a particular interface, by its
quark ID. This is equivalent to using g_quark_to_string() followed by
tp_proxy_has_interface(), but more efficient.
%TRUE if this proxy implements the given interface.
quark representing the D-Bus interface required
Return whether this proxy is known to have a particular interface. In
versions older than 0.11.11, this was a macro wrapper around
tp_proxy_has_interface_by_id().
For objects that discover their interfaces at runtime, this method will
indicate that interfaces are missing until they are known to be present.
In subclasses that define features for use with tp_proxy_prepare_async(),
successfully preparing the "core" feature for that subclass (such as
%TP_CHANNEL_FEATURE_CORE or %TP_CONNECTION_FEATURE_CORE) implies that the
interfaces are known.
%TRUE if this proxy implements the given interface.
the D-Bus interface required, as a string
<!-- -->
this object, if any; always %NULL if this object is itself a
#TpDBusDaemon. The caller must reference the returned object with
g_object_ref() if it will be kept.
a borrowed reference to the #TpDBusDaemon for
<!-- -->
The caller must reference the returned pointer with
dbus_g_connection_ref() if it will be kept.
a borrowed reference to the D-Bus connection used by this object.
<!-- -->
must copy the string with g_strdup() if it will be kept.
the bus name of the application exporting the object. The caller
<!-- -->
string with g_strdup() if it will be kept.
the object path of the remote object. The caller must copy the
<!-- -->
invalidated. The caller must copy the error, for instance with
g_error_copy(), if it will be kept.
the reason this proxy was invalidated, or %NULL if has not been
Convert a D-Bus error name into a GError as if it was returned by a method
on this proxy. This method is useful when D-Bus error names are emitted in
signals, such as Connection.ConnectionError and
Group.MembersChangedDetailed.
a D-Bus error name, for instance from the callback for tp_cli_connection_connect_to_connection_error()
a debug message that accompanied the error name, or %NULL
Return %TRUE if @feature has been prepared successfully, or %FALSE if
available on this object at all.
(For instance, if @feature is %TP_CHANNEL_FEATURE_CHAT_STATES and @self
is a #TpChannel in a protocol that doesn't actually implement chat states,
or is not a #TpChannel at all, then this method will return %FALSE.)
To prepare features, call tp_proxy_prepare_async().
%TRUE if @feature has been prepared successfully
a feature that is supported by @self's class
#TpProxy itself does not support any features, but subclasses like
#TpChannel can support features, which can either be core functionality like
%TP_CHANNEL_FEATURE_CORE, or extended functionality like
%TP_CHANNEL_FEATURE_CHAT_STATES.
Proxy instances start with no features prepared. When features are
requested via tp_proxy_prepare_async(), the proxy starts to do the
necessary setup to use those features.
tp_proxy_prepare_async() always waits for core functionality of the proxy's
instance, because %TP_CHANNEL_FEATURE_CORE is core functionality of a
#TpChannel,
|[
TpChannel *channel = ...;
tp_proxy_prepare_async (channel, NULL, NULL, callback, user_data);
]|
is equivalent to
|[
TpChannel *channel = ...;
GQuark features[] = { TP_CHANNEL_FEATURE_CORE, 0 };
tp_proxy_prepare_async (channel, features, callback, user_data);
]|
If a feature represents core functionality (like %TP_CHANNEL_FEATURE_CORE),
failure to prepare it will result in tp_proxy_prepare_async() finishing
is no longer useful, it will also emit #TpProxy::invalidated.
If a feature represents non-essential functionality
(like %TP_CHANNEL_FEATURE_CHAT_STATES), or is not supported by the object
at all, then failure to prepare it is not fatal:
tp_proxy_prepare_async() will complete successfully, but
tp_proxy_is_prepared() will still return %FALSE for the feature, and
accessor methods for the feature will typically return a dummy value.
Some #TpProxy subclasses automatically start to prepare their core
features when instantiated, and features will sometimes become prepared as
a side-effect of other actions, but to ensure that a feature is present you
must generally call tp_proxy_prepare_async() and wait for the result.
an array of desired features, ending with 0; %NULL is equivalent to an array containing only 0
if not %NULL, called exactly once, when the features have all been prepared or failed to prepare, or after the proxy is invalidated
user data for @callback
Check for error in a call to tp_proxy_prepare_async(). An error here
generally indicates that either the asynchronous call was cancelled,
or @self has emitted #TpProxy::invalidated.
or was cancelled
%FALSE (setting @error) if tp_proxy_prepare_async() failed
the result passed to the callback of tp_proxy_prepare_async()
The D-Bus bus name for this object. Read-only except during construction.
The D-Bus daemon for this object (this object itself, if it is a
TpDBusDaemon). Read-only except during construction.
Known D-Bus interface names for this object.
The D-Bus object path for this object. Read-only except during
construction.
Emitted when this proxy has gained an interface. It is not guaranteed
to be emitted immediately, but will be emitted before the interface is
tp_proxy_borrow_interface_by_id(), any signal is connected, or any
method is called).
The intended use is to call dbus_g_proxy_add_signals(). This signal
should only be used by TpProy implementations
the GQuark representing the interface
the dbus-glib proxy representing the interface
Emitted when this proxy has been become invalid for
whatever reason. Any more specific signal should be emitted first.
domain of a GError indicating why this proxy was invalidated
error code of a GError indicating why this proxy was invalidated
a message associated with the error
The class of a #TpProxy. The struct fields not documented here are reserved.
Structure representing a feature. This is currently opaque to code outside
telepathy-glib itself.
Data structure representing a simple Approver implementation.
Convenient function to create a new #TpSimpleApprover instance.
If @dbus is not the result of tp_dbus_daemon_dup(), you should call
tp_simple_approver_new_with_am() instead, so that #TpAccount,
#TpConnection and #TpContact instances can be shared between modules.
a new #TpSimpleApprover
a #TpDBusDaemon object, may not be %NULL
the name of the Approver (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when ApproverChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleApprover is destroyed
Convenient function to create a new #TpSimpleApprover instance with a
specified #TpAccountManager.
It is not necessary to prepare any features on @account_manager before
calling this function.
a new #TpSimpleApprover
an account manager, which may not be %NULL
the name of the Approver (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when ApproverChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleApprover is destroyed
The TpSimpleApproverAddDispatchOperationImpl callback implementing the
ApproverChannels D-Bus method.
This property can't be %NULL.
The #GDestroyNotify function called to free the user-data pointer when
the #TpSimpleApprover is destroyed.
The user-data pointer passed to the callback implementing the
ApproverChannels D-Bus method.
Signature of the implementation of the AddDispatchOperation method.
This function must call either tp_add_dispatch_operation_context_accept(),
tp_add_dispatch_operation_context_delay() or
tp_add_dispatch_operation_context_fail() on @context before it returns.
a #TpSimpleApprover instance
a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared if possible
a #GList of #TpChannel, all having %TP_CHANNEL_FEATURE_CORE prepared
a #TpChannelDispatchOperation or %NULL; the dispatch_operation is not guaranteed to be prepared
a #TpAddDispatchOperationContext representing the context of this D-Bus call
arbitrary user-supplied data passed to tp_simple_approver_new()
The class of a #TpSimpleApprover.
Data structure representing a simple Handler implementation.
Convenient function to create a new #TpSimpleHandler instance.
If @dbus is not the result of tp_dbus_daemon_dup(), you should call
tp_simple_handler_new_with_am() instead, so that #TpAccount,
#TpConnection and #TpContact instances can be shared between modules.
a new #TpSimpleHandler
a #TpDBusDaemon object, may not be %NULL
the value of the Handler.BypassApproval D-Bus property (see tp_base_client_set_handler_bypass_approval() for details)
if this handler implement Requests (see tp_base_client_set_handler_request_notification() for details)
the name of the Handler (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when HandleChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleHandler is destroyed
Convenient function to create a new #TpSimpleHandler instance with a
specified #TpAccountManager.
It is not necessary to prepare any features on @account_manager before
calling this function.
a new #TpSimpleHandler
an account manager, which may not be %NULL
the value of the Handler.BypassApproval D-Bus property (see tp_base_client_set_handler_bypass_approval() for details)
if this handler implement Requests (see tp_base_client_set_handler_request_notification() for details)
the name of the Handler (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when HandleChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleHandler is destroyed
The value of the Handler.BypassApproval D-Bus property.
The TpSimpleHandlerHandleChannelsImpl callback implementing the
HandleChannels D-Bus method.
This property can't be %NULL.
The #GDestroyNotify function called to free the user-data pointer when
the #TpSimpleHandler is destroyed.
If %TRUE, the Handler will implement the Requests interface
The user-data pointer passed to the callback implementing the
HandleChannels D-Bus method.
The class of a #TpSimpleHandler.
Signature of the implementation of the HandleChannels method.
This function must call either tp_handle_channels_context_accept(),
tp_handle_channels_context_delay() or tp_handle_channels_context_fail()
on @context before it returns.
a #TpSimpleHandler instance
a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared if possible
a #GList of #TpChannel, all having %TP_CHANNEL_FEATURE_CORE prepared if possible
a #GList of #TpChannelRequest having their object-path defined but are not guaranteed to be prepared.
the time at which user action occurred, or one of the special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or %TP_USER_ACTION_TIME_CURRENT_TIME (see #TpAccountChannelRequest:user-action-time for details)
a #TpHandleChannelsContext representing the context of this D-Bus call
arbitrary user-supplied data passed to tp_simple_handler_new()
Data structure representing a simple Observer implementation.
Convenient function to create a new #TpSimpleObserver instance.
If @dbus is not the result of tp_dbus_daemon_dup(), you should call
tp_simple_observer_new_with_am() instead, so that #TpAccount,
#TpConnection and #TpContact instances can be shared between modules.
a new #TpSimpleObserver
a #TpDBusDaemon object, may not be %NULL
the value of the Observer.Recover D-Bus property
the name of the Observer (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when ObserverChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleObserver is destroyed
Convenient function to create a new #TpSimpleObserver instance with a
specified #TpAccountManager.
It is not necessary to prepare any features on @account_manager before
calling this function.
a new #TpSimpleObserver
an account manager, which may not be %NULL
the value of the Observer.Recover D-Bus property
the name of the Observer (see #TpBaseClient:name: for details)
the value of the TpBaseClient:uniquify-name: property
the function called when ObserverChannels is called
arbitrary user-supplied data passed to @callback
called with the user_data as argument, when the #TpSimpleObserver is destroyed
The TpSimpleObserverObserveChannelsImpl callback implementing the
ObserverChannels D-Bus method.
This property can't be %NULL.
The #GDestroyNotify function called to free the user-data pointer when
the #TpSimpleObserver is destroyed.
The value of the Observer.Recover D-Bus property.
The user-data pointer passed to the callback implementing the
ObserverChannels D-Bus method.
The class of a #TpSimpleObserver.
Signature of the implementation of the ObserveChannels method.
This function must call either tp_observe_channels_context_accept(),
tp_observe_channels_context_delay() or tp_observe_channels_context_fail()
on @context before it returns.
a #TpSimpleObserver instance
a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared if possible
a #GList of #TpChannel, all having %TP_CHANNEL_FEATURE_CORE prepared if possible
a #TpChannelDispatchOperation or %NULL; the dispatch_operation is not guaranteed to be prepared
a #GList of #TpChannelRequest, all having their object-path defined but are not guaranteed to be prepared.
a #TpObserveChannelsContext representing the context of this D-Bus call
arbitrary user-supplied data passed to tp_simple_observer_new()
Dumps the a{sv} map to the debugging console.
The purpose of this function is give the programmer the ability to easily
inspect the contents of an a{sv} map for debugging purposes.
a #GHashTable created with tp_asv_new()
If a value for @key in @asv is present and boolean, return it,
and set *@valid to %TRUE if @valid is not %NULL.
Otherwise return %FALSE, and set *@valid to %FALSE if @valid is not %NULL.
a boolean value for @key
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location to store %TRUE if the key actually exists and has a boolean value
If a value for @key in @asv is present and is of the desired type,
return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it, for instance with
g_boxed_copy(), if you need to keep it for longer.
the value of @key, or %NULL
A GHashTable where the keys are strings and the values are GValues
The key to look up
The type that the key's value should have, which must be derived from %G_TYPE_BOXED
If a value for @key in @asv is present and is an array of bytes
(its GType is %DBUS_TYPE_G_UCHAR_ARRAY), return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it with
g_boxed_copy (DBUS_TYPE_G_UCHAR_ARRAY, ...) if you need to keep
it for longer.
the string value of @key, or %NULL
A GHashTable where the keys are strings and the values are GValues
The key to look up
If a value for @key in @asv is present and has any numeric type used by
dbus-glib (guchar, gint, guint, gint64, guint64 or gdouble),
return it as a double, and if @valid is not %NULL, set *@valid to %TRUE.
Otherwise, return 0.0, and if @valid is not %NULL, set *@valid to %FALSE.
the double precision floating-point value of @key, or 0.0
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location in which to store %TRUE on success or %FALSE on failure
If a value for @key in @asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a gint32, return it, and if @valid is not %NULL, set *@valid to
%TRUE.
Otherwise, return 0, and if @valid is not %NULL, set *@valid to %FALSE.
the 32-bit signed integer value of @key, or 0
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location in which to store %TRUE on success or %FALSE on failure
If a value for @key in @asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a gint64, return it, and if @valid is not %NULL, set *@valid to
%TRUE.
Otherwise, return 0, and if @valid is not %NULL, set *@valid to %FALSE.
the 64-bit signed integer value of @key, or 0
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location in which to store %TRUE on success or %FALSE on failure
If a value for @key in @asv is present and is an object path, return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it with g_strdup() if you
need to keep it for longer.
%NULL
the object-path value of @key, or
A GHashTable where the keys are strings and the values are GValues
The key to look up
If a value for @key in @asv is present and is a string, return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it with g_strdup() if you
need to keep it for longer.
the string value of @key, or %NULL
A GHashTable where the keys are strings and the values are GValues
The key to look up
If a value for @key in @asv is present and is an array of strings (strv),
return it.
Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it with g_strdupv() if you
need to keep it for longer.
value of @key, or %NULL
the %NULL-terminated string-array
A GHashTable where the keys are strings and the values are GValues
The key to look up
If a value for @key in @asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and fits in the
range of a guint32, return it, and if @valid is not %NULL, set *@valid to
%TRUE.
Otherwise, return 0, and if @valid is not %NULL, set *@valid to %FALSE.
the 32-bit unsigned integer value of @key, or 0
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location in which to store %TRUE on success or %FALSE on failure
If a value for @key in @asv is present, has an integer type used by
dbus-glib (guchar, gint, guint, gint64 or guint64) and is non-negative,
return it, and if @valid is not %NULL, set *@valid to %TRUE.
Otherwise, return 0, and if @valid is not %NULL, set *@valid to %FALSE.
the 64-bit unsigned integer value of @key, or 0
A GHashTable where the keys are strings and the values are GValues
The key to look up
Either %NULL, or a location in which to store %TRUE on success or %FALSE on failure
If a value for @key in @asv is present, return it. Otherwise return %NULL.
The returned value is not copied, and is only valid as long as the value
for @key in @asv is not removed or altered. Copy it with (for instance)
g_value_copy() if you need to keep it for longer.
the value of @key, or %NULL
A GHashTable where the keys are strings and the values are GValues
The key to look up
Creates a new #GHashTable for use with a{sv} maps, containing the values
passed in as parameters.
The #GHashTable is synonymous with:
<informalexample><programlisting>
GHashTable *asv = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, (GDestroyNotify) tp_g_value_slice_free);
</programlisting></informalexample>
Followed by manual insertion of each of the parameters.
Parameters are stored in slice-allocated GValues and should be set using
tp_asv_set_*() and retrieved using tp_asv_get_*().
tp_g_value_slice_new() and tp_g_value_slice_dup() may also be used to insert
into the map if required.
<informalexample><programlisting>
g_hash_table_insert (parameters, "account",
tp_g_value_slice_new_string ("bob@mcbadgers.com"));
</programlisting></informalexample>
<example>
<title>Using tp_asv_new()</title>
<programlisting>
GHashTable *parameters = tp_asv_new (
"answer", G_TYPE_INT, 42,
"question", G_TYPE_STRING, "We just don't know",
NULL);</programlisting>
</example>
Allocated values will be automatically free'd when overwritten, removed or
the hash table destroyed with g_hash_table_destroy().
g_hash_table_destroy().
a newly created #GHashTable for storing a{sv} maps, free with
the name of the first key (or NULL)
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
the type of the key's value, which must be derived from %G_TYPE_BOXED
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
the number of bytes to copy
location of an array of bytes to be copied (this may be %NULL if and only if length is 0)
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_object_path()
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_static_boxed()
a #GHashTable created with tp_asv_new()
string key
the type of the key's value, which must be derived from %G_TYPE_BOXED
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_static_object_path()
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_static_string()
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
a %NULL-terminated string array
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
the type of the key's value, which must be derived from %G_TYPE_BOXED
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
a #GHashTable created with tp_asv_new()
string key
a non-NULL #GArray of %guchar, ownership of which will be taken by the #GValue
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_take_object_path()
a #GHashTable created with tp_asv_new()
string key
value
Stores the value in the map.
The value is stored as a slice-allocated GValue.
tp_g_value_slice_new_take_string()
a #GHashTable created with tp_asv_new()
string key
value
Declare that the given interface has contact attributes which can be added
to the attributes hash using the filler function. All the handles in the
handle array passed to the filler function are guaranteed to be valid and
referenced.
An instance of the implementation that uses this mixin
Name of the interface that has ContactAttributes
Contact attribute filler function
<!--no documentation beyond Returns: needed-->
the quark used for storing mixin offset on a GObjectClass
Initialize the contacts mixin. Should be called from the implementation's
class_init function like so:
<informalexample><programlisting>
tp_contacts_mixin_class_init ((GObjectClass *) klass,
G_STRUCT_OFFSET (SomeObjectClass, contacts_mixin));
</programlisting></informalexample>
The class of the implementation that uses this mixin
The byte offset of the TpContactsMixinClass within the class structure
Free resources held by the contacts mixin.
An object with this mixin.
<!--no documentation beyond Returns: needed-->
the quark used for storing mixin offset on a GObject
Fill in the vtable entries needed to implement the contacts interface
using this mixin. This function should usually be called via
G_IMPLEMENT_INTERFACE.
A pointer to the #TpSvcConnectionInterfaceContacts in an object class
Ignored
Initialize the contacts mixin. Should be called from the implementation's
instance init function like so:
<informalexample><programlisting>
tp_contacts_mixin_init ((GObject *) self,
G_STRUCT_OFFSET (SomeObject, contacts_mixin));
</programlisting></informalexample>
An instance of the implementation that uses this mixin
The byte offset of the TpContactsMixin within the object structure
Utility function to set attribute for handle to value in the attributes hash
as passed to a TpContactsMixinFillContactAttributesFunc.
contacts attribute hash as passed to TpContactsMixinFillContactAttributesFunc
Handle to set the attribute on
attribute name
slice allocated GValue containing the value of the attribute, for instance with tp_g_value_slice_new. Ownership of the GValue is taken over by the mixin
Check that the given string is a valid D-Bus bus name of an appropriate
type.
%TRUE if @name is valid
a possible bus name
some combination of %TP_DBUS_NAME_TYPE_UNIQUE, %TP_DBUS_NAME_TYPE_WELL_KNOWN or %TP_DBUS_NAME_TYPE_BUS_DAEMON (often this will be %TP_DBUS_NAME_TYPE_NOT_BUS_DAEMON or %TP_DBUS_NAME_TYPE_ANY)
Check that the given string is a valid D-Bus interface name. This is
also appropriate to use to check for valid error names.
%TRUE if @name is valid
a possible interface name
Check that the given string is a valid D-Bus member (method or signal) name.
%TRUE if @name is valid
a possible member name
Check that the given string is a valid D-Bus object path.
%TRUE if @path is valid
a possible object path
Return the Telepathy error NotImplemented from the method invocation
given by @context.
The D-Bus method invocation context
Initialize the class @cls to use the D-Bus Properties mixin.
The given struct member, of size sizeof(TpDBusPropertiesMixinClass),
will be used to store property implementation information.
Each property and each interface must have been declared as a member of
a GInterface implemented by @cls, using
tp_svc_interface_set_dbus_properties_info().
Before calling this function, the array @interfaces must have been
placed in the #TpDBusPropertiesMixinClass structure; if it would be empty,
it may instead be %NULL.
This function should be called from the class_init callback in such a way
that it will only be called once, even if the class is subclassed.
which means that only interfaces whose properties are set up using
tp_dbus_properties_mixin_implement_interface() will be used.
#TpDBusPropertiesMixinClass can be omitted from @cls. It is treated as if
it were present, but with all fields (including
TpDBusPropertiesMixinClass::interfaces) being %NULL, so only interfaces
whose properties are set using
tp_dbus_properties_mixin_implement_interface() will be used.
a subclass of #GObjectClass
the offset within @cls of a TpDBusPropertiesMixinClass structure
Retrieves the values of several D-Bus properties from an object, and adds
them to a hash mapping the fully-qualified name of the property to its
value. This is equivalent to calling tp_dbus_properties_mixin_get() for
each property and adding it to the table yourself, with the proviso that
this function will g_assert() if retrieving a property fails (for instance,
because it does not exist).
Note that in particular, @table does not have the same memory-allocation
model as the hash tables required by tp_asv_set_string() and similar
functions.
an object which uses the D-Bus properties mixin
a hash table where the keys are strings copied with g_strdup() and the values are slice-allocated #GValue<!-- -->s
the interface of the first property to be retrieved
the name of the first property to be retrieved
Initialize @value with the type of the property @property_name on
by calling the D-Bus method org.freedesktop.DBus.Properties.Get.
If Get would return a D-Bus error, @value remains unset and @error
is filled in instead.
on failure
%TRUE (filling @value) on success, %FALSE (setting @error)
an object with this mixin
a D-Bus interface name
a D-Bus property name
an unset GValue (initialized to all zeroes)
An implementation of #TpDBusPropertiesMixinGetter which assumes that
the @getter_data is the name of a readable #GObject property of an
appropriate type, and uses it for the value of the D-Bus property.
The exported object with the properties
A quark representing the D-Bus interface name
A quark representing the D-Bus property name
A GValue pre-initialized to the right type, into which to put the value
The getter_data from the #TpDBusPropertiesMixinPropImpl, which must be a string containing the GObject property's name
Declare that the DBus.Properties interface represented by @g_iface
is implemented using this mixin.
a pointer to a #TpSvcDBusPropertiesClass structure
ignored
Declare that, in addition to any interfaces set in
tp_dbus_properties_mixin_class_init(), the given class (and its subclasses)
will implement the properties of the interface @iface using the callbacks
This function should be called from the class_init callback in such a way
that it will only be called once, even if the class is subclassed.
Typically, the static array @interfaces in the #TpDBusPropertiesMixinClass
should be used for interfaces whose properties are implemented directly by
the class @cls, and this function should be used for interfaces whose
properties are implemented by mixins.
It is an error for the same interface to appear in the array @interfaces
in the #TpDBusPropertiesMixinClass, and also be set up by this function.
If a class C and a subclass S both implement the properties of the same
interface, only the implementations from the subclass S will be used,
regardless of whether the implementations in C and/or S were set up by
this function or via the array @interfaces in the
#TpDBusPropertiesMixinClass.
a subclass of #GObjectClass
a quark representing the the name of the interface to implement
a callback to get properties on this interface, or %NULL if they are all write-only
a callback to set properties on this interface, or %NULL if they are all read-only
an array of #TpDBusPropertiesMixinPropImpl representing individual properties, terminated by one with @name == %NULL
Retrieves the values of several D-Bus properties from an object, and builds
a hash mapping the fully-qualified name of the property to its value. This
is equivalent to calling tp_dbus_properties_mixin_get() for each property
and building the table yourself, with the proviso that this function will
g_assert() if retrieving a property fails (for instance, because it does not
exist).
Additional keys and values can be inserted into the returned hash table;
if this is done, the inserted keys and values will be freed when the
hash table is destroyed. The keys must be allocated with g_strdup() or
equivalent, and the values must be slice-allocated (for instance with
tp_g_value_slice_new_string() or a similar function).
Note that in particular, tp_asv_set_string() and similar functions should
not be used with this hash table.
GValues, which must be freed by the caller (at which point its
contents will also be freed).
a hash table mapping (gchar *) fully-qualified property names to
an object which uses the D-Bus properties mixin
the interface of the first property to be retrieved
the name of the first property to be retrieved
An implementation of #TpDBusPropertiesMixinSetter which assumes that the
type, and sets that property to the given value.
%TRUE
The exported object with the properties
A quark representing the D-Bus interface name
A quark representing the D-Bus property name
The new value for the property
The setter_data from the #TpDBusPropertiesMixinPropImpl, which must be a string containing the GObject property's name
Open the given file for writing and duplicate its file descriptor to
be used for stdout and stderr. This has the effect of closing the previous
stdout and stderr, and sending all messages that would have gone there
to the given file instead.
By default the file is truncated and hence overwritten each time the
process is executed.
Since version 0.7.14, if the filename is prefixed with '+' then the
file is not truncated and output is added at the end of the file.
Passing %NULL to this function is guaranteed to have no effect. This is
so you can call it with the recommended usage
<literal>tp_debug_divert_messages (g_getenv ("MYAPP_LOGFILE"))</literal>
and it won't do anything if the environment variable is not set.
This function still works if telepathy-glib was compiled without debug
support.
A file to which to divert stdout and stderr, or %NULL to do nothing
Activate all possible debug modes. This also activates persistent mode,
which should have been orthogonal.
tp_debug_set_persistent() instead.
Set the debug flags indicated by @flags_string, in addition to any already
set.
The parsing matches that of g_parse_debug_string().
If telepathy-glib was compiled with --disable-debug (not recommended),
this function has no practical effect, since the debug messages it would
enable were removed at compile time.
The flags to set, comma-separated. If %NULL or empty, no additional flags are set.
Equivalent to
<literal>tp_debug_set_flags_from_string (g_getenv (var))</literal>,
and has the same problem with persistence being included in "all".
tp_debug_set_persistent() instead
The name of the environment variable to parse
Set the debug flags indicated by @flags_string, in addition to any already
set. Unlike tp_debug_set_flags(), this enables persistence like
tp_debug_set_persistent() if the "persist" flag is present or the string
is "all" - this turns out to be unhelpful, as persistence should be
orthogonal.
The parsing matches that of g_parse_debug_string().
tp_debug_set_persistent() instead
The flags to set, comma-separated. If %NULL or empty, no additional flags are set.
Used to enable persistent operation of the connection manager process for
debugging purposes.
TRUE prevents the connection manager mainloop from exiting, FALSE enables exiting if there are no connections (the default behavior).
A #GLogFunc that prepends the UTC time (currently in ISO 8601 format,
with microsecond resolution) to the message, then calls
g_log_default_handler.
Intended usage is:
<informalexample><programlisting>if (g_getenv ("MYPROG_TIMING") != NULL)
g_log_set_default_handler (tp_debug_timestamped_log_handler, NULL);
</programlisting></informalexample>
If telepathy-glib was compiled with --disable-debug (not recommended),
this function is equivalent to g_log_default_handler().
RFC-3339 format. Previously, they were printed in local time, in a
format similar to RFC-3339.
the message's log domain
the log level of the message
the message to process
not used
<!-- -->
the D-Bus error name corresponding to @error.
a member of the #TpError enum.
<!-- -->
Remove the external group mixin. This function should usually be called
in the dispose or finalize function.
An object implementing the groups interface using an external group mixin
An implementation of #TpDBusPropertiesMixinGetter which assumes that the
interface.
An object with this mixin
Must be %TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP
A quark representing the D-Bus property name, either "GroupFlags", "HandleOwners", "LocalPendingMembers", "Members", "RemotePendingMembers" or "SelfHandle"
A GValue pre-initialized to the right type, into which to put the value
Ignored
Fill in the vtable entries needed to implement the group interface using
the group mixin of another object. This function should usually be called
via G_IMPLEMENT_INTERFACE.
A #TpSvcChannelInterfaceGroupClass
Unused
Fill in the qdata needed to implement the group interface using
the group mixin of another object. This function should usually be called
in the instance constructor.
An object implementing the groups interface using an external group mixin
A GObject with the group mixin
Set up #TpDBusPropertiesMixinClass to use this mixin's implementation of
the Group interface's properties.
This uses tp_group_mixin_get_dbus_property() as the property getter and
sets up a list of the supported properties for it. Having called this, you
should add #TP_CHANNEL_GROUP_FLAG_PROPERTIES to channels containing the
mixin used by this class with tp_group_mixin_change_flags() to indicate that
the DBus properties are available.
The class of an object with this mixin
Set the error NotImplemented for an invalid handle type,
with an appropriate message.
InvalidArgument.
An invalid handle type
Set the error NotImplemented for a handle type which is valid but is not
supported by this connection manager, with an appropriate message.
InvalidArgument.
An unsupported handle type
Slice-allocate a #GValue containing a byte-array, using
tp_g_value_slice_new_boxed(). This function is convenient to use when
constructing hash tables from string to #GValue, for example.
of @length bytes from @bytes, to be freed with tp_g_value_slice_free() or
g_slice_free()
a #GValue of type %DBUS_TYPE_G_UCHAR_ARRAY whose value is a copy
number of bytes to copy
location of an array of bytes to be copied (this may be %NULL if and only if length is 0)
Slice-allocate a #GValue containing an object path, using
tp_g_value_slice_new_boxed(). This function is convenient to use when
constructing hash tables from string to #GValue, for example.
of @path, to be freed with tp_g_value_slice_free() or g_slice_free()
a #GValue of type %DBUS_TYPE_G_OBJECT_PATH whose value is a copy
a valid D-Bus object path which will be copied
Slice-allocate a #GValue containing an object path, using
tp_g_value_slice_new_static_boxed(). This function is convenient to use when
constructing hash tables from string to #GValue, for example.
to be freed with tp_g_value_slice_free() or g_slice_free()
a #GValue of type %DBUS_TYPE_G_OBJECT_PATH whose value is @path,
a valid D-Bus object path which must remain valid forever
Slice-allocate a #GValue containing @bytes, using
tp_g_value_slice_new_boxed(). This function is convenient to use when
constructing hash tables from string to #GValue, for example.
g_slice_free()
a #GValue of type %DBUS_TYPE_G_UCHAR_ARRAY whose value is
a non-NULL #GArray of guchar, ownership of which will be taken by the #GValue
Slice-allocate a #GValue containing an object path, using
tp_g_value_slice_new_take_boxed(). This function is convenient to use when
constructing hash tables from string to #GValue, for example.
to be freed with tp_g_value_slice_free() or g_slice_free()
a #GValue of type %DBUS_TYPE_G_OBJECT_PATH whose value is @path,
a valid D-Bus object path which will be freed with g_free() by the returned #GValue (the caller must own it before calling this function, but no longer owns it after this function returns)
Returns a connection to the D-Bus daemon on which this process was
activated if it was launched by D-Bus service activation, or the session
bus otherwise.
If dbus_g_bus_get() fails, exit with error code 1.
Note that this function is not suitable for use in applications which can
be useful even in the absence of D-Bus - it is designed for use in
connection managers, which are not at all useful without a D-Bus
connection. See <https://bugs.freedesktop.org/show_bug.cgi?id=18832>.
Most processes should use tp_dbus_daemon_dup() instead.
a connection to the starter or session D-Bus daemon.
Return a #DBusGProxy for the bus daemon object. The same caveats as for
tp_get_bus() apply.
a proxy for the bus daemon object on the starter or session bus.
Note that the given local handle is an alias within this group
for the given globally-valid handle. It will be returned from subsequent
GetHandleOwner queries where appropriate.
0.17.6, before adding any channel-specific handle to the members,
local-pending members or remote-pending members, you must call either
this function or tp_group_mixin_add_handle_owners().
A GObject implementing the group interface with this mixin
A contact handle valid within this group (may not be 0)
A contact handle valid globally, or 0 if the owner of the
Note that the given local handles are aliases within this group
for the given globally-valid handles.
To comply with telepathy-spec 0.17.6, before adding any channel-specific
handle to the members, local-pending members or remote-pending members, you
must call either this function or tp_group_mixin_add_handle_owner().
A GObject implementing the group interface with this mixin
A map from contact handles valid within this group (which may not be 0) to either contact handles valid globally, or 0 if the owner of the corresponding key is unknown; all handles are stored using GUINT_TO_POINTER
Request that the given contacts be added to the group as if in response
to user action. If the group's flags prohibit this, raise
PermissionDenied. If any of the handles is invalid, raise InvalidHandle.
Otherwise attempt to add the contacts by calling the callbacks provided
by the channel implementation.
%TRUE on success
An object implementing the group interface using this mixin
A GArray of guint representing contacts
A message associated with the addition request, if supported
Request a change to be made to the flags. If any flags were actually
set or cleared, emits the GroupFlagsChanged signal with the changes.
It is an error to set any of the same bits in both @add and @del.
removing @del had no effect on the existing group flags.
An object implementing the groups interface using this mixin
Flags to be added
Flags to be removed
Change the sets of members as given by the arguments, and emit the
MembersChanged and MembersChangedDetailed signals if the changes were not a
no-op.
This function must be called in response to events on the underlying
IM protocol, and must not be called in direct response to user input;
it does not respect the permissions flags, but changes the group directly.
If any two of add, del, add_local_pending and add_remote_pending have
a non-empty intersection, the result is undefined. Don't do that.
Each of the TpIntSet arguments may be %NULL, which is treated as
equivalent to an empty set.
signals were emitted; %FALSE if nothing actually changed and the signals
were suppressed.
%TRUE if the group was changed and the MembersChanged(Detailed)
An object implementing the group interface using this mixin
A message to be sent to the affected contacts if possible; %NULL is allowed, and is mapped to an empty string
A set of contact handles to be added to the members (if not already present) and removed from local pending and remote pending (if present)
A set of contact handles to be removed from members, local pending or remote pending, wherever they are present
A set of contact handles to be added to local pending, and removed from members and remote pending
A set of contact handles to be added to remote pending, and removed from members and local pending
The handle of the contact responsible for this change
The reason for this change
Change the sets of members as given by the arguments, and emit the
MembersChanged and MembersChangedDetailed signals if the changes were not a
no-op.
This function must be called in response to events on the underlying
IM protocol, and must not be called in direct response to user input;
it does not respect the permissions flags, but changes the group directly.
If any two of add, del, add_local_pending and add_remote_pending have
a non-empty intersection, the result is undefined. Don't do that.
Each of the TpIntSet arguments may be %NULL, which is treated as
equivalent to an empty set.
details may contain, among other entries, the well-known
keys (and corresponding type, wrapped in a GValue) defined by the
Group.MembersChangedDetailed signal's specification; these include "actor"
(a handle as G_TYPE_UINT), "change-reason" (an element of
#TpChannelGroupChangeReason as G_TYPE_UINT), "message" (G_TYPE_STRING),
"error" (G_TYPE_STRING), "debug-message" (G_TYPE_STRING).
If all of the information in details could be passed to
tp_group_mixin_change_members() then calling this function instead provides
no benefit. Calling this function without setting
#TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED with
tp_group_mixin_change_members() first is not very useful, as clients will
not know to listen for MembersChangedDetailed and thus will miss the
details.
signals were emitted; %FALSE if nothing actually changed and the signals
were suppressed.
%TRUE if the group was changed and the MembersChanged(Detailed)
An object implementing the group interface using this mixin
A set of contact handles to be added to the members (if not already present) and removed from local pending and remote pending (if present)
A set of contact handles to be removed from members, local pending or remote pending, wherever they are present
A set of contact handles to be added to local pending, and removed from members and remote pending
A set of contact handles to be added to remote pending, and removed from members and local pending
a map from strings to GValues detailing the change
Change the self-handle for this group to the given value.
An object implementing the group interface using this mixin
The new self-handle for this group
Configure the mixin to allow attempts to remove the SelfHandle from this
Group, even if the group flags would otherwise disallow this. The
channel's #TpGroupMixinRemMemberFunc or
#TpGroupMixinRemMemberWithReasonFunc will be called as usual for such
attempts, and may make them fail with %TP_ERROR_PERMISSION_DENIED if
required.
This function should be called from the GObject @class_init callback,
after calling tp_group_mixin_class_init().
(Recent telepathy-spec changes make it valid to try to remove the
self-handle at all times, regardless of group flags. However, if this was
implemented automatically in TpGroupMixin, this would risk crashing
connection manager implementations that assume that TpGroupMixin will
enforce the group flags strictly. As a result, connection managers should
call this function to indicate to the TpGroupMixin that it may call their
removal callback with the self-handle regardless of flag settings.)
The class of an object implementing the group interface using this mixin
<!--Returns: says it all-->
the quark used for storing mixin offset on a GObjectClass
Configure the mixin for use with the given class.
The class of an object implementing the group interface using this mixin
The offset of the TpGroupMixinClass structure within the class structure
A callback to be used to add contacts to this group
A callback to be used to remove contacts from this group. This must be %NULL if you will subsequently call tp_group_mixin_class_set_remove_with_reason_func().
Set a callback to be used to implement RemoveMembers() and
RemoveMembersWithReason(). If this function is called during class
initialization, the given callback will be used instead of the remove
callback passed to tp_group_mixin_class_init() (which must be %NULL
in this case).
The class of an object implementing the group interface using this mixin
A callback to be used to remove contacts from this group with a specified reason.
Unreference handles and free resources used by this mixin.
An object implementing the group interface using this mixin
Get the group's current and pending members.
%TRUE
An object implementing the group interface using this mixin
Used to return a newly-allocated GArray of guint representing the handles of the group's members
Used to return a newly-allocated GArray of guint representing the handles of the group's local pending members
Used to return a newly-allocated GArray of guint representing the handles of the group's remote pending members
An implementation of #TpDBusPropertiesMixinGetter which assumes that the
An object with this mixin
Must be %TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP
A quark representing the D-Bus property name, either "GroupFlags", "HandleOwners", "LocalPendingMembers", "Members", "RemotePendingMembers" or "SelfHandle"
A GValue pre-initialized to the right type, into which to put the value
Ignored
Set the guint pointed to by ret to this group's flags, to be
interpreted according to TpChannelGroupFlags.
%TRUE
An object implementing the group mixin using this interface
Used to return the flags
If the mixin has the flag %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES,
return the global owners of the given local handles, or 0 where
unavailable.
failure
%TRUE (setting @ret) on success, %FALSE (setting @error) on
An object implementing the group interface with this mixin
An array of guint representing locally valid handles
Used to return an array of guint representing globally valid handles, or 0 where unavailable, if %TRUE is returned
Get the group's local-pending members.
%TRUE
An object implementing the group interface using this mixin
Used to return a newly-allocated GArray of guint contact handles
Get the group's local-pending members and information about their
requests to join the channel.
%TRUE
An object implementing the group interface using this mixin
Used to return a newly-allocated GPtrArray of D-Bus structures each containing the handle of a local-pending contact, the handle of a contact responsible for adding them to the group (or 0), the reason code and a related message (e.g. their request to join the group)
Get the group's current members
%TRUE
An object implementing the group interface using this mixin
Used to return a newly-allocated GArray of guint contact handles
<!--Returns: says it all-->
the quark used for storing mixin offset on a GObject
Get the group's remote-pending members.
%TRUE
An object implementing the group interface using this mixin
Used to return a newly-allocated GArray of guint representing the handles of the group's remote pending members
Set the guint pointed to by ret to the local user's handle in this
group, or to 0 if the local user is not present in this group.
%TRUE.
An object implementing the group mixin using this interface
Used to return the local user's handle in this group
Fill in the vtable entries needed to implement the group interface using
this mixin. This function should usually be called via
G_IMPLEMENT_INTERFACE.
A #TpSvcChannelInterfaceGroupClass
Unused
Initialize the mixin.
An object implementing the group interface using this mixin
The offset of the TpGroupMixin structure within the instance structure
The connection's handle repository for contacts
The handle of the local user in this group, if any
Set up #TpDBusPropertiesMixinClass to use this mixin's implementation of
the Group interface's properties.
This uses tp_group_mixin_get_dbus_property() as the property getter and
sets up a list of the supported properties for it. Having called this, you
should add #TP_CHANNEL_GROUP_FLAG_PROPERTIES to any channels of this class
with tp_group_mixin_change_flags() to indicate that the DBus properties are
available.
The class of an object with this mixin
Request that the given contacts be removed from the group as if in response
to user action. If the group's flags prohibit this, raise
PermissionDenied. If any of the handles is invalid, raise InvalidHandle.
If any of the handles is absent from the group, raise NotAvailable.
Otherwise attempt to remove the contacts by calling the callbacks provided
by the channel implementation.
%TRUE on success
An object implementing the group interface using this mixin
A GArray of guint representing contacts
A message to be sent to those contacts, if supported
Request that the given contacts be removed from the group as if in response
to user action. If the group's flags prohibit this, raise
PermissionDenied. If any of the handles is invalid, raise InvalidHandle.
If any of the handles is absent from the group, raise NotAvailable.
Otherwise attempt to remove the contacts by calling the callbacks provided
by the channel implementation.
%TRUE on success
An object implementing the group interface using this mixin
A GArray of guint representing contacts
A message to be sent to those contacts, if supported
A #TpChannelGroupChangeReason
Hold the given handle on behalf of the named client.
If the client leaves the bus, the reference is automatically discarded.
Handles held multiple times are the same as handles held
if you call tp_handle_client_hold() multiple times, then call
tp_handle_client_release() just once, the client no longer holds the handle.
It is an error for @handle not to be present in the repository.
%TRUE if the client name is valid; else %FALSE with @error set.
A handle repository implementation
The unique bus name of a D-Bus peer
A handle of the type stored in the repository
If the named client holds the given handle, release it.
If this causes the reference count to become zero, delete the handle.
For repository implementations which never free handles (like
#TpStaticHandleRepo) this has no effect.
a reference to the handle, else %FALSE.
%TRUE if the client name is valid and the client previously held
A handle repository implementation
The unique bus name of a D-Bus peer
A handle of the type stored in the repository
Return a new reference to the handle for the given string. The handle
is normalized, if possible. If no such handle exists it will be created.
is invalid.
the handle corresponding to the given string, or 0 if it
A handle repository implementation
A string whose handle is required
User data to be passed to the normalization callback
<!--Returns: says it all-->
if there is no associated data.
the data associated with a given key on a given handle; %NULL
A handle repository implementation
A handle to get data from
Key id of data to fetch
<!--Returns: says it all-->
handle is absent from the repository. The string is owned by the
handle repository and will remain valid as long as a reference to
the handle exists.
the string represented by the given handle, or NULL if the
A handle repository implementation
A handle of the type stored in the repository
<!--Returns: says it all-->
else %FALSE
%TRUE if the handle is nonzero and is present in the repository,
A handle repository implementation
A handle of the type stored in the repository @self
Return the handle for the given string, without incrementing its
reference count. The handle is normalized if possible.
does not exist or is invalid
the handle corresponding to the given string, or 0 if it
A handle repository implementation
A string whose handle is required
User data to be passed to the normalization callback
Increase the reference count of the given handle, which must be present
in the repository. For repository implementations which never free handles
(like #TpStaticHandleRepo) this has no effect.
A handle repository implementation
A handle of the type stored in the repository
Associates a blob of data with a given handle and a given key
If @destroy is set, then the data is freed when the handle is freed.
A handle repository implementation
A handle to set data on
Key id to associate data with
data to associate with handle
A #GDestroyNotify to call to destroy the data, or NULL if not needed.
If the given handle type is valid, return %TRUE. If not, set @error
and return %FALSE.
%TRUE if the handle type is valid.
A handle type, valid or not, to be checked
<!---->
For invalid handle types, returns "(no handle)" for 0 or
"(invalid handle type)" for others.
a human-readable string describing the handle type, e.g. "contact".
A handle type, which need not be valid
Decrease the reference count of the given handle. If it reaches zero,
delete the handle. It is an error to attempt to unref a handle
which is not present in the repository.
For repository implementations which never free handles (like
#TpStaticHandleRepo) this has no effect.
A handle repository implementation
A handle of the type stored in the repository
<!--Returns: says it all-->
%TRUE if the handle is present in the repository, else %FALSE
A handle repository implementation
Array of TpHandle representing handles of the type stored in the repository @self
If %TRUE, zero is treated like a valid handle
Hold the given handles on behalf of the named client.
If the client leaves the bus, the reference is automatically discarded.
If any of the handles are zero they will be ignored without error.
It is an error for any other invalid handle to be in @handles:
the caller is expected to have validated them first, e.g. using
tp_handles_are_valid().
Handles appearing multiple times are the same as handles appearing
If %FALSE is returned, the reference counts of all handles are unaffected
(the function either fails completely or succeeds completely).
%TRUE if the client name is valid; else %FALSE with @error set.
A handle repository implementation
The D-Bus unique name of a client
A GArray of TpHandle representing handles
Releases a reference to the given handles on behalf of the named client.
If any of the handles are zero they will be ignored without error.
It is an error for any other invalid handle to be in @handles:
the caller is expected to have validated them first, e.g. using
tp_handles_are_valid().
If %FALSE is returned, the reference counts of all handles are unaffected
(the function either fails completely or succeeds completely).
a reference to all the handles, else %FALSE.
%TRUE if the client name is valid and the client previously held
A handle repository implementation
The D-Bus unique name of a client
A GArray of TpHandle representing handles
Increase the reference count of the given handles. If a handle appears
multiple times in @handles it will be referenced that many times. If
any zero entries appear in @handles they will be ignored without error;
it is an error for any other invalid handle to appear in @handles.
A handle repository implementation
A GArray of TpHandle representing handles
Return %TRUE if the given handle type is supported (i.e. repos[handle_type]
is not %NULL) and the given handles are all valid in that repository.
If not, set @error and return %FALSE.
valid.
%TRUE if the handle type is supported and the handles are all
An array of possibly null pointers to handle repositories, indexed by handle type, where a null pointer means an unsupported handle type
The handle type
A GArray of guint representing handles of the given type
If %TRUE, zero is treated like a valid handle
Decrease the reference count of the given handles. If a handle appears
multiple times in @handles it will be dereferenced that many times. If
any zero entries appear in @handles they will be ignored without error;
it is an error for any other invalid handle to appear in @handles.
A handle repository implementation
A GArray of TpHandle representing handles
Initialize @iter to iterate over @set in arbitrary order. @iter will become
invalid if @set is modified.
an iterator
a set
Advances @iter and retrieves the integer it now points to. Iteration
is not necessarily in numerical order.
%FALSE if the end of the set has been reached
an iterator
a location to store a new integer, in arbitrary order
<!--Returns: says it all-->
A set containing the same integers as @array.
An array of guint
If there are integers in (@iter->set) higher than (@iter->element), set
(iter->element) to the next one and return %TRUE. Otherwise return %FALSE.
Usage:
<informalexample><programlisting>
TpIntSetIter iter = TP_INTSET_INIT (intset);
while (tp_intset_iter_next (&iter))
{
printf ("%u is in the intset\n", iter.element);
}
</programlisting></informalexample>
Since 0.11.6, consider using #TpIntSetFastIter if iteration in
numerical order is not required.
%TRUE if (@iter->element) has been advanced
An iterator originally initialized with TP_INTSET_INIT(set)
Allocate a new integer set.
a new, empty integer set to be destroyed with tp_intset_destroy()
ignored (it was previously 1 more than the largest integer you expect to store)
List the available (running or installed) connection managers. Call the
callback when done.
Since 0.7.26, this function will wait for each #TpConnectionManager
to be ready, so all connection managers passed to @callback will be ready
(tp_connection_manager_is_ready() will return %TRUE) unless an error
occurred while launching that connection manager.
proxy for the D-Bus daemon
callback to be called when listing the CMs succeeds or fails; not called if the @weak_object goes away
user-supplied data for the callback
callback to destroy the user-supplied data, called after
if not %NULL, will be weakly referenced; the callback will not be called, and the call will be cancelled, if the object has vanished
List the bus names of all the connections that currently exist, together
with the connection manager name and the protocol name for each connection.
Call the callback when done.
The bus names passed to the callback can be used to construct #TpConnection
objects for any connections that are of interest.
proxy for the D-Bus daemon
callback to be called when listing the connections succeeds or fails; not called if the D-Bus connection fails completely or if the
user-supplied data for the callback
callback to destroy the user-supplied data, called after goes away
if not %NULL, will be weakly referenced; the callback will not be called if the object has vanished
<!--no documentation beyond Returns: needed-->
the quark used for storing mixin offset on a GObjectClass
Initialize the presence mixin. Should be called from the implementation's
class_init function like so:
<informalexample><programlisting>
tp_presence_mixin_class_init ((GObjectClass *) klass,
G_STRUCT_OFFSET (SomeObjectClass,
presence_mixin));
</programlisting></informalexample>
The class of the implementation that uses this mixin
The byte offset of the TpPresenceMixinClass within the class structure
A callback to be used to determine if a given presence status is available to be set on the connection. If NULL, all statuses are always considered available. If SimplePresence is implemented, this callback may be called before the connection is connected.
A callback to be used get the current presence status for contacts. This is used in implementations of various D-Bus methods and hence must be provided.
A callback to be used to commit changes to the user's own presence status to the server. This is used in implementations of various D-Bus methods and hence must be provided.
An array of #TpPresenceStatusSpec structures representing all presence statuses supported by the protocol, terminated by a NULL name.
Emit the PresenceUpdate signal for a single contact. This method is just a
convenience wrapper around #tp_presence_mixin_emit_presence_update.
A connection object with this mixin
The handle of the contact to emit the signal for
The new status to emit
Emit the PresenceUpdate signal for multiple contacts. For emitting
PresenceUpdate for a single contact, there is a convenience wrapper called
#tp_presence_mixin_emit_one_presence_update.
A connection object with this mixin
A mapping of contact handles to #TpPresenceStatus structures with the presence data to emit
Free resources held by the presence mixin.
An object with this mixin.
<!--no documentation beyond Returns: needed-->
the quark used for storing mixin offset on a GObject
Fill in the vtable entries needed to implement the presence interface using
this mixin. This function should usually be called via G_IMPLEMENT_INTERFACE.
A pointer to the #TpSvcConnectionInterfacePresenceClass in an object class
Ignored
Initialize the presence mixin. Should be called from the implementation's
instance init function like so:
<informalexample><programlisting>
tp_presence_mixin_init ((GObject *) self,
G_STRUCT_OFFSET (SomeObject, presence_mixin));
</programlisting></informalexample>
An instance of the implementation that uses this mixin
The byte offset of the TpPresenceMixin within the object structure
Fill in the vtable entries needed to implement the simple presence interface
using this mixin. This function should usually be called via
G_IMPLEMENT_INTERFACE.
A pointer to the #TpSvcConnectionInterfaceSimplePresenceClass in an object class
Ignored
Set up #TpDBusPropertiesMixinClass to use this mixin's implementation of
the SimplePresence interface's properties.
This automatically sets up a list of the supported properties for the
SimplePresence interface.
The class of an object with this mixin
Register the SimplePresence interface with the Contacts interface to make it
inspectable. The Contacts mixin should be initialized before this function
is called
An instance that of the implementation that uses both the Contacts mixin and this mixin
Declare that @g_interface implements the given D-Bus interface, with the
given properties. This may only be called once per GInterface, usually from
a section of its base_init function that only runs once.
The #GType of a service interface
an interface description