Top |
TpAccountManager * | account-manager | Read / Write / Construct Only |
GObject * | channel-factory | Read / Write / Construct Only |
TpDBusDaemon * | dbus-daemon | Read / Write / Construct Only |
TpSimpleClientFactory * | factory | Read / Write / Construct Only |
gchar * | name | Read / Write / Construct Only |
gboolean | uniquify-name | Read / Write / Construct Only |
GObject ╰── TpBaseClient ├── TpSimpleApprover ├── TpSimpleHandler ╰── TpSimpleObserver
TpBaseClient implements TpSvcDBusProperties, TpSvcClient, TpSvcClientObserver, TpSvcClientApprover, TpSvcClientHandler and TpSvcClientInterfaceRequests.
This base class makes it easier to write TpSvcClient implementations. Subclasses should usually pass the filters they want and override the D-Bus methods they implement.
For many applications, the provided TpSimpleObserver, TpSimpleApprover and TpSimpleHandler subclasses can be used instead of deriving from this class.
void tp_base_client_add_observer_filter (TpBaseClient *self
,GHashTable *filter
);
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.
Since: 0.11.5
void tp_base_client_add_observer_filter_vardict (TpBaseClient *self
,GVariant *filter
);
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.
If the variant is floating (see g_variant_ref_sink()
), ownership
will be taken, allowing for uses like this:
1 2 3 4 5 |
tp_base_client_add_observer_filter_vardict (client, g_variant_new_parsed ("{ %s: <%s>, %s: <%u>, ... }", TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_TEXT, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, (guint32) TP_HANDLE_TYPE_CONTACT, ...)); |
Since: 0.19.10
void tp_base_client_take_observer_filter (TpBaseClient *self
,GHashTable *filter
);
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()
:
1 2 3 4 5 6 7 |
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, ...)); |
[skip]
self |
a client |
|
filter |
a |
[transfer full][element-type utf8 GObject.Value] |
Since: 0.11.5
void tp_base_client_set_observer_recover (TpBaseClient *self
,gboolean recover
);
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.
Since: 0.11.5
void tp_base_client_set_observer_delay_approvers (TpBaseClient *self
,gboolean delay
);
Set whether the channel dispatcher should wait for
tp_observe_channels_context_accept()
or tp_observe_channels_context_fail()
to be called before calling
TpBaseClientClass.add_dispatch_operation on appropriate Approvers.
This is implemented by setting the value of the DelayApprovers 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.observe_channels.
Since: 0.13.16
void (*TpBaseClientClassObserveChannelsImpl) (TpBaseClient *client
,TpAccount *account
,TpConnection *connection
,GList *channels
,TpChannelDispatchOperation *dispatch_operation
,GList *requests
,TpObserveChannelsContext *context
);
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.
client |
a TpBaseClient instance |
|
account |
a TpAccount with |
|
connection |
a TpConnection with |
|
channels |
a GList of TpChannel,
each with |
[element-type TelepathyGLib.Channel] |
dispatch_operation |
a TpChannelDispatchOperation or |
[allow-none] |
requests |
a GList of TpChannelRequest having their object-path defined but are not guaranteed to be prepared. |
[element-type TelepathyGLib.ChannelRequest] |
context |
a TpObserveChannelsContext representing the context of this D-Bus call |
Since: 0.11.5
void tp_base_client_implement_observe_channels (TpBaseClientClass *klass
,TpBaseClientClassObserveChannelsImpl impl
);
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.
[skip]
klass |
the TpBaseClientClass of the object |
|
impl |
the TpBaseClientClassObserveChannelsImpl function implementing
|
Since: 0.11.5
void tp_base_client_add_approver_filter (TpBaseClient *self
,GHashTable *filter
);
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.
Since: 0.11.5
void tp_base_client_add_approver_filter_vardict (TpBaseClient *self
,GVariant *filter
);
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.
If the variant is floating (see g_variant_ref_sink()
), ownership
will be taken. See tp_base_client_add_observer_filter_vardict()
for
more details.
Since: 0.19.10
void tp_base_client_take_approver_filter (TpBaseClient *self
,GHashTable *filter
);
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()
:
1 2 3 4 5 6 7 |
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, ...)); |
[skip]
self |
a client |
|
filter |
a |
[transfer full][element-type utf8 GObject.Value] |
Since: 0.11.5
void (*TpBaseClientClassAddDispatchOperationImpl) (TpBaseClient *client
,TpAccount *account
,TpConnection *connection
,GList *channels
,TpChannelDispatchOperation *dispatch_operation
,TpAddDispatchOperationContext *context
);
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".
client |
a TpBaseClient instance |
|
account |
a TpAccount with |
|
connection |
a TpConnection with |
|
channels |
a GList of TpChannel,
each with |
[element-type TelepathyGLib.Channel] |
dispatch_operation |
a TpChannelDispatchOperation having
|
|
context |
a TpObserveChannelsContext representing the context of this D-Bus call |
Since: 0.11.5
void tp_base_client_implement_add_dispatch_operation (TpBaseClientClass *klass
,TpBaseClientClassAddDispatchOperationImpl impl
);
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.
[skip]
klass |
the TpBaseClientClass of the object |
|
impl |
the TpBaseClientClassAddDispatchOperationImpl function implementing
|
Since: 0.11.5
void tp_base_client_add_handler_capabilities (TpBaseClient *self
,const gchar * const *tokens
);
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.
self |
a client, which must not have been registered with
|
|
tokens |
capability tokens as defined by the Telepathy D-Bus API Specification. |
[array zero-terminated=1][element-type utf8] |
Since: 0.11.6
void tp_base_client_add_handler_capabilities_varargs (TpBaseClient *self
,const gchar *first_token
,...
);
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.
[skip]
self |
a client, which must not have been registered with
|
|
first_token |
a capability token from the Telepathy D-Bus API Specification |
|
... |
more tokens, ending with |
Since: 0.11.6
void tp_base_client_add_handler_capability (TpBaseClient *self
,const gchar *token
);
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.
self |
a client, which must not have been registered with
|
|
token |
a capability token as defined by the Telepathy D-Bus API Specification |
Since: 0.11.6
void tp_base_client_add_handler_filter (TpBaseClient *self
,GHashTable *filter
);
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.
Since: 0.11.6
void tp_base_client_add_handler_filter_vardict (TpBaseClient *self
,GVariant *filter
);
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.
If the variant is floating (see g_variant_ref_sink()
), ownership
will be taken. See tp_base_client_add_observer_filter_vardict()
for
more details.
Since: 0.19.10
void tp_base_client_take_handler_filter (TpBaseClient *self
,GHashTable *filter
);
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()
:
1 2 3 4 5 6 7 |
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, ...)); |
[skip]
self |
||
filter |
a |
[transfer full][element-type utf8 GObject.Value] |
Since: 0.11.6
void
tp_base_client_be_a_handler (TpBaseClient *self
);
Register self
as a Client.Handler with an empty list of filters.
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 implements
TpBaseClientClass.handle_channels.
Since: 0.11.6
void (*TpBaseClientClassHandleChannelsImpl) (TpBaseClient *client
,TpAccount *account
,TpConnection *connection
,GList *channels
,GList *requests_satisfied
,gint64 user_action_time
,TpHandleChannelsContext *context
);
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.
client |
a TpBaseClient instance |
|
account |
a TpAccount with |
|
connection |
a TpConnection with |
|
channels |
a GList of TpChannel,
each with |
[element-type TelepathyGLib.Channel] |
requests_satisfied |
a GList of TpChannelRequest having their object-path defined but are not guaranteed to be prepared. |
[element-type TelepathyGLib.ChannelRequest] |
user_action_time |
the time at which user action occurred, or one of the
special values |
|
context |
a TpHandleChannelsContext representing the context of this D-Bus call |
Since: 0.11.6
void tp_base_client_implement_handle_channels (TpBaseClientClass *klass
,TpBaseClientClassHandleChannelsImpl impl
);
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.
[skip]
klass |
the TpBaseClientClass of the object |
|
impl |
the TpBaseClientClassHandleChannelsImpl function implementing
|
Since: 0.11.6
void tp_base_client_add_account_features (TpBaseClient *self
,const GQuark *features
,gssize n
);
tp_base_client_add_account_features
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_account_features()
instead.
Request that the given features are prepared on each TpAccount (in
addition to TP_ACCOUNT_FEATURE_CORE
) before calling
TpBaseClientClass.observe_channels,
TpBaseClientClass.add_dispatch_operation or
TpBaseClientClass.handle_channels, or emitting
“request-added”.
self |
a client |
|
features |
the features. |
[array length=n] |
n |
the number of features, or -1 if |
Since: 0.11.14
void tp_base_client_add_account_features_varargs (TpBaseClient *self
,GQuark feature
,...
);
tp_base_client_add_account_features_varargs
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_account_features_varargs()
instead.
The same as tp_base_client_add_account_features()
, but with a more
convenient calling convention from C.
[skip]
self |
a client |
|
feature |
the first feature |
|
... |
the second and subsequent features, if any, ending with 0 |
Since: 0.11.14
void tp_base_client_add_connection_features (TpBaseClient *self
,const GQuark *features
,gssize n
);
tp_base_client_add_connection_features
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_connection_features()
instead.
Request that the given features are prepared on each TpConnection (in
addition to TP_CONNECTION_FEATURE_CORE
) before calling
TpBaseClientClass.observe_channels,
TpBaseClientClass.add_dispatch_operation or
TpBaseClientClass.handle_channels.
self |
a client |
|
features |
the features. |
[array length=n] |
n |
the number of features, or -1 if |
Since: 0.11.14
void tp_base_client_add_connection_features_varargs (TpBaseClient *self
,GQuark feature
,...
);
tp_base_client_add_connection_features_varargs
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_connection_features_varargs()
instead.
The same as tp_base_client_add_connection_features()
, but with a more
convenient calling convention from C.
[skip]
self |
a client |
|
feature |
the first feature |
|
... |
the second and subsequent features, if any, ending with 0 |
Since: 0.11.14
void tp_base_client_add_channel_features (TpBaseClient *self
,const GQuark *features
,gssize n
);
tp_base_client_add_channel_features
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_channel_features()
instead.
Request that the given features are prepared on each TpChannel (in
addition to TP_CHANNEL_FEATURE_CORE
) before calling
TpBaseClientClass.observe_channels,
TpBaseClientClass.add_dispatch_operation or
TpBaseClientClass.handle_channels.
self |
a client |
|
features |
the features. |
[array length=n] |
n |
the number of features, or -1 if |
Since: 0.11.14
void tp_base_client_add_channel_features_varargs (TpBaseClient *self
,GQuark feature
,...
);
tp_base_client_add_channel_features_varargs
is deprecated and should not be used in newly-written code.
New code should use
tp_simple_client_factory_add_channel_features_varargs()
instead.
The same as tp_base_client_add_channel_features()
, but with a more
convenient calling convention from C.
[skip]
self |
a client |
|
feature |
the first feature |
|
... |
the second and subsequent features, if any, ending with 0 |
Since: 0.11.14
GList *
tp_base_client_get_handled_channels (TpBaseClient *self
);
tp_base_client_get_handled_channels
is deprecated and should not be used in newly-written code.
Since 0.19.9. New code should use
tp_base_client_dup_handled_channels()
instead.
Returns the set of channels currently handled by this base client or by any other TpBaseClient with which it shares a unique name.
Since: 0.11.6
GList *
tp_base_client_dup_handled_channels (TpBaseClient *self
);
Returns the set of channels currently handled by this base client or by any other TpBaseClient with which it shares a unique name.
Since: 0.19.9
gboolean tp_base_client_is_handling_channel (TpBaseClient *self
,TpChannel *channel
);
Check if self
is currently handling channel
.
Since: 0.14.5
void tp_base_client_delegate_channels_async (TpBaseClient *self
,GList *channels
,gint64 user_action_time
,const gchar *preferred_handler
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls DelegateChannels on the ChannelDispatcher to try
stopping handling channels
and pass them to another Handler.
You can then call tp_base_client_delegate_channels_finish()
to
get the result of the operation.
self |
||
channels |
a GList of TpChannel
handled by |
[element-type TelepathyGLib.Channel] |
user_action_time |
the time at which user action occurred, or TP_USER_ACTION_TIME_NOT_USER_ACTION if this delegation request is for some reason not involving user action. |
|
preferred_handler |
Either the well-known bus name (starting with
|
|
callback |
a callback to call when the request is satisfied |
|
user_data |
data to pass to |
Since: 0.15.0
gboolean tp_base_client_delegate_channels_finish (TpBaseClient *self
,GAsyncResult *result
,GPtrArray **delegated
,GHashTable **not_delegated
,GError **error
);
Finishes an async channels delegation request started using
tp_base_client_delegate_channels_async()
.
self |
||
result |
a GAsyncResult |
|
delegated |
if not |
[out][element-type TelepathyGLib.Channel][transfer container] |
not_delegated |
if not not |
[out][element-type TelepathyGLib.Channel GLib.Error][transfer container] |
error |
a GError to fill |
TRUE
if the operation succeed, delegated
and not_delegated
can be used to know the channels that self
is not handling any more,
otherwise FALSE
.
Since: 0.15.0
void (*TpBaseClientDelegatedChannelsCb) (TpBaseClient *client
,GPtrArray *channels
,gpointer user_data
);
Called when a client asked us to delegate channels
to another Handler.
When this function is called client
is not longer handling channels
.
client |
a TpBaseClient instance |
|
channels |
a GPtrArray of TpChannel. |
[element-type TelepathyGLib.Channel] |
user_data |
arbitrary user-supplied data passed to
|
Since: 0.15.3
void tp_base_client_set_delegated_channels_callback (TpBaseClient *self
,TpBaseClientDelegatedChannelsCb callback
,gpointer user_data
,GDestroyNotify destroy
);
Turn on support for the org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler hint.
When receiving a request containing this hint, self
will automatically
delegate the channels to the preferred handler of the request and then call
callback
to inform the client that it is no longer handling those
channels.
self |
a TpBaseClient implementing Handler |
|
callback |
function called when channels currently handled by |
|
user_data |
arbitrary user-supplied data passed to |
|
destroy |
called with the |
Since: 0.15.3
void tp_channel_dispatcher_present_channel_async (TpChannelDispatcher *self
,TpChannel *channel
,gint64 user_action_time
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls PresentChannel on the ChannelDispatcher to ask
to the handler of channel
to re-present it to the user.
You can then call tp_channel_dispatcher_present_channel_finish()
to
get the result of the operation.
self |
||
channel |
||
user_action_time |
the time at which user action occurred, or TP_USER_ACTION_TIME_NOT_USER_ACTION if this presentation request is for some reason not involving user action. |
|
callback |
a callback to call when the request is satisfied |
|
user_data |
data to pass to |
Since: 0.15.0
gboolean tp_channel_dispatcher_present_channel_finish (TpChannelDispatcher *self
,GAsyncResult *result
,GError **error
);
Finishes an async channel presentation request started using
tp_channel_dispatcher_present_channel_async()
.
Since: 0.15.0
GList *
tp_base_client_get_pending_requests (TpBaseClient *self
);
tp_base_client_get_pending_requests
is deprecated and should not be used in newly-written code.
Since 0.19.9. New code should use
tp_base_client_dup_pending_requests()
instead.
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.
a GList of TpChannelRequest.
[transfer container][element-type TelepathyGLib.ChannelRequest]
Since: 0.11.6
GList *
tp_base_client_dup_pending_requests (TpBaseClient *self
);
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.
Since: 0.19.9
void tp_base_client_set_handler_bypass_approval (TpBaseClient *self
,gboolean bypass_approval
);
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.
Since: 0.11.6
void
tp_base_client_set_handler_request_notification
(TpBaseClient *self
);
Indicate that self
is a Handler willing to be notified about requests for
channels that it is likely to be asked to handle. This means that the
“request-added” and “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.
Since: 0.11.6
gboolean tp_base_client_register (TpBaseClient *self
,GError **error
);
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.
self |
a TpBaseClient, which must not have been registered with
|
|
error |
used to indicate the error if |
Since: 0.11.5
void
tp_base_client_unregister (TpBaseClient *self
);
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.
self |
a client, which may already have been registered with
|
Since: 0.11.6
const gchar *
tp_base_client_get_bus_name (TpBaseClient *self
);
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.
Since: 0.11.5
const gchar *
tp_base_client_get_object_path (TpBaseClient *self
);
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.
Since: 0.11.5
TpDBusDaemon *
tp_base_client_get_dbus_daemon (TpBaseClient *self
);
Return the “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.
Since: 0.11.11
const gchar *
tp_base_client_get_name (TpBaseClient *self
);
Return the “name” construct-only property, which is used as part of the bus name and object path.
Since: 0.11.11
gboolean
tp_base_client_get_uniquify_name (TpBaseClient *self
);
Return the “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.
Since: 0.11.11
TpAccountManager *
tp_base_client_get_account_manager (TpBaseClient *self
);
tp_base_client_get_account_manager
is deprecated and should not be used in newly-written code.
New code should not use this function, it may return NULL
in
the case self
was constructed with a TpSimpleClientFactory.
Return the “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()
.
[skip]
Since: 0.11.14
void tp_base_client_set_channel_factory (TpBaseClient *self
,TpClientChannelFactory *factory
);
tp_base_client_set_channel_factory
is deprecated and should not be used in newly-written code.
since 0.15.5. The factory is taken from “account-manager”.
Change the value of the “channel-factory” property.
It can't be changed once self
has been registered.
Since: 0.13.2
TpClientChannelFactory *
tp_base_client_get_channel_factory (TpBaseClient *self
);
tp_base_client_get_channel_factory
is deprecated and should not be used in newly-written code.
since 0.15.5. The factory is taken from “account-manager”.
Return the “channel-factory” property.
[skip]
Since: 0.13.2
struct TpBaseClient;
Data structure representing a generic TpSvcClient implementation.
Since: 0.11.5
struct TpBaseClientClass { GObjectClass parent_class; TpBaseClientClassObserveChannelsImpl observe_channels; TpBaseClientClassAddDispatchOperationImpl add_dispatch_operation; TpBaseClientClassHandleChannelsImpl handle_channels; };
The class of a TpBaseClient.
The virtual methods observe_channels
, add_dispatch_operation
and
handle_channels
can be also implemented by calling
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.
the parent class |
||
TpBaseClientClassObserveChannelsImpl |
the function called to observe newly-created channels matching this client's observer filter (since 0.11.13) |
|
TpBaseClientClassAddDispatchOperationImpl |
the function called to request user approval of unrequested (incoming) channels matching this client's approver filter (since 0.11.13) |
|
TpBaseClientClassHandleChannelsImpl |
the function called to handle channels matching this client's handler filter (since 0.11.13) |
Since: 0.11.5
“account-manager”
property“account-manager” TpAccountManager *
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 “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 “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
“dbus-daemon” that is not the same as the
account manager's “dbus-daemon”.
TpBaseClient:account-manager
is deprecated and should not be used in newly-written code.
New code should not use this property, it may be NULL
in
the case self
was constructed with a TpSimpleClientFactory.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Since: 0.11.14
“channel-factory”
property “channel-factory” GObject *
The object implementing the TpClientChannelFactoryInterface interface
that will be used to create channel proxies. While
tp_base_client_register()
has not yet been called, this property can be
changed using tp_base_client_set_channel_factory()
.
If no channel factory is specified then TpAutomaticProxyFactory is used.
TpBaseClient:channel-factory
is deprecated and should not be used in newly-written code.
since 0.15.5. The factory is taken from “account-manager”.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Since: 0.13.2
“dbus-daemon”
property“dbus-daemon” TpDBusDaemon *
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 “account-manager” is provided
instead, in which case its “dbus-daemon” property will be
used.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Since: 0.11.5
“factory”
property“factory” TpSimpleClientFactory *
Factory for this base client, used to look up or create TpAccount objects.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Since: 0.15.5
“name”
property “name” gchar *
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
.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Default value: NULL
Since: 0.11.5
“uniquify-name”
property “uniquify-name” gboolean
If TRUE
, tp_base_client_register()
will append an unique token to the
service bus name and object path to ensure they are unique.
Owner: TpBaseClient
Flags: Read / Write / Construct Only
Default value: FALSE
Since: 0.11.5
“request-added”
signalvoid user_function (TpBaseClient *self, TpAccount *account, TpChannelRequest *request, gpointer user_data)
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.
self |
||
account |
the TpAccount on which the request was made,
with |
|
request |
a TpChannelRequest having its object-path defined but is not guaranteed to be prepared. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Has Details
Since: 0.11.6
“request-removed”
signalvoid user_function (TpBaseClient *self, TpChannelRequest *request, gchar *error, gchar *message, gpointer user_data)
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.
self |
||
request |
the TpChannelRequest being removed |
|
error |
the name of the D-Bus error with which the request failed. |
|
message |
any message supplied with the D-Bus error. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Has Details
Since: 0.11.6