BaseClient
Object Hierarchy:
Description:
[ CCode ( type_id = "tp_base_client_get_type ()" ) ]
[ Version ( since = "0.11.5" ) ]
public abstract class BaseClient : Object
[ Version ( since = "0.11.5" ) ]
public abstract class BaseClient : Object
Data structure representing a generic TpSvcClient
implementation.
All known sub-classes:
Namespace: TelepathyGLib
Package: telepathy-glib
Content:
Properties:
- public AccountManager account_manager { owned get; construct; }
Account manager for this base client, used to look up or create Account objects.
- public Object channel_factory { owned get; construct; }
The object implementing the
TpClientChannelFactoryInterface
interface that will be used to create channel proxies. - public DBusDaemon dbus_daemon { get; construct; }
DBusDaemon object encapsulating this object's connection to D-Bus.
- public SimpleClientFactory factory { owned get; construct; }
Factory for this base client, used to look up or create Account objects.
- public string name { get; construct; }
The name of the client.
- public bool uniquify_name { get; construct; }
If
true
, register will append an unique token to the service bus name and object path to ensure they are unique.
Creation methods:
- protected BaseClient ()
Methods:
- public void add_account_features (Quark[] features)
Request that the given features are prepared on each Account (in addition to
TP_ACCOUNT_FEATURE_CORE
) before calling observe_channels, add_dispatch_operation or handle_channels, or emitting request_added. - public void add_approver_filter (HashTable<string,Value?> filter)
Register a new channel class as Approver.
- public void add_approver_filter_vardict (Variant filter)
Register a new channel class as Approver.
- public void add_channel_features (Quark[] features)
Request that the given features are prepared on each Channel (in addition to
TP_CHANNEL_FEATURE_CORE
) before calling observe_channels, add_dispatch_operation or handle_channels. - public void add_connection_features (Quark[] features)
Request that the given features are prepared on each Connection (in addition to
TP_CONNECTION_FEATURE_CORE
) before calling observe_channels, add_dispatch_operation or handle_channels. - public virtual void add_dispatch_operation (Account account, Connection connection, List<Channel> channels, ChannelDispatchOperation dispatch_operation, AddDispatchOperationContext context)
- public void add_handler_capabilities (string[] tokens)
Add several capability tokens to this client.
- public void add_handler_capability (string token)
Add one capability token to this client, as if via add_handler_capabilities.
- public void add_handler_filter (HashTable<string,Value?> filter)
Register a new channel class as Handler.
- public void add_handler_filter_vardict (Variant filter)
Register a new channel class as Handler.
- public void add_observer_filter (HashTable<string,Value?> filter)
Register a new channel class as Observer.
- public void add_observer_filter_vardict (Variant filter)
Register a new channel class as Observer.
- public void be_a_handler ()
Register this as a Client.
- public async bool delegate_channels_async (List<Channel> channels, int64 user_action_time, string preferred_handler, out GenericArray<unowned Channel> delegated, out HashTable<unowned Channel,unowned Error> not_delegated) throws Error
Asynchronously calls DelegateChannels on the ChannelDispatcher to try stopping handling
channels
and pass them to another Handler. - public List<Channel> dup_handled_channels ()
Returns the set of channels currently handled by this base client or by any other BaseClient with which it shares a unique name.
- public List<ChannelRequest> dup_pending_requests ()
Only works if set_handler_request_notification has been called.
- public unowned string get_bus_name ()
Return the bus name of this.
- public unowned DBusDaemon get_dbus_daemon ()
Return the dbus_daemon construct-only property, which represents the D-Bus connection used to export this client object.
- public List<unowned Channel> get_handled_channels ()
Returns the set of channels currently handled by this base client or by any other BaseClient with which it shares a unique name.
- public unowned string get_name ()
Return the name construct-only property, which is used as part of the bus name and object path.
- public unowned string get_object_path ()
Return the object path of this.
- public List<unowned ChannelRequest> get_pending_requests ()
Only works if set_handler_request_notification has been called.
- public bool get_uniquify_name ()
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.
- public virtual void handle_channels (Account account, Connection connection, List<Channel> channels, List<ChannelRequest> requests_satisfied, int64 user_action_time, HandleChannelsContext context)
- public bool is_handling_channel (Channel channel)
Check if this is currently handling
channel
. - public virtual void observe_channels (Account account, Connection connection, List<Channel> channels, ChannelDispatchOperation? dispatch_operation, List<ChannelRequest> requests, ObserveChannelsContext context)
- public bool register () throws Error
Publish this as an available client.
- public void set_channel_factory (ClientChannelFactory factory)
Change the value of the channel_factory property.
- public void set_delegated_channels_callback (owned BaseClientDelegatedChannelsCb callback)
Turn on support for the org.
- public void set_handler_bypass_approval (bool bypass_approval)
Set whether the channels destined for this handler are automatically handled, without invoking approvers.
- public void set_handler_request_notification ()
Indicate that this is a Handler willing to be notified about requests for channels that it is likely to be asked to handle.
- public void set_observer_delay_approvers (bool delay)
Set whether the channel dispatcher should wait for accept or fail to be called before calling add_dispatch_operation on appropriate Approvers.
- public void set_observer_recover (bool recover)
Set whether the channel dispatcher should attempt to recover this Observer if it crashes.
- public void unregister ()
Remove this client object from D-Bus, if register has already been called.
Signals:
- public signal void request_added (Account account, ChannelRequest request)
Emitted when a channels have been requested, and that if the request is successful, they will probably be handled by this Handler.
- public signal void request_removed (ChannelRequest request, string error, string message)
Emitted when a request has failed and should be disregarded.
Inherited Members:
All known members inherited from class GLib.Object