Client
Object Hierarchy:
Description:
[ CCode ( type_id = "e_client_get_type ()" ) ]
[ Version ( since = "3.2" ) ]
public abstract class Client : Object
Contains only private data that should be read and manipulated using the functions below.
Content:
Properties:
- public void* capabilities { get; }
The capabilities of this client
- public MainContext main_context { owned get; }
The main loop context in which notifications for this client will be
delivered.
- public bool online { get; set; }
Whether this client's backing data is online.
- public virtual bool opened { get; }
Whether this client is open and ready to use.
- public bool readonly { get; }
Whether this client's backing data is readonly.
- public Source source { get; construct; }
The Source for which this
client was created.
Static methods:
- public static Error error_create (ClientError code, string? custom_msg)
- public static Quark error_quark ()
- public static unowned string error_to_string (ClientError code)
Get localized human readable description of the given error code.
- public static SList<Object> util_copy_object_slist (owned SList<Object>? copy_to, SList<Object> objects)
Copies a SList of
Objects to the end of copy_to
.
- public static SList<string> util_copy_string_slist (owned SList<string>? copy_to, SList<string> strings)
Copies the SList of strings to the end of
copy_to
.
- public static void util_free_object_slist (SList<Object> objects)
Calls unref on each member of
objects
and then frees objects
itself.
- public static void util_free_string_slist (SList<string> strings)
- public static SList<string> util_parse_comma_strings (string strings)
Parses comma-separated list of values into SList
.
- public static string[] util_slist_to_strv (SList<string> strings)
Convert a list of strings into a null
-terminated array of
strings.
- public static SList<string> util_strv_to_slist (string strv)
Convert a null
-terminated array of strings to a list of
strings.
- public static bool util_unwrap_dbus_error (Error dbus_error, out Error client_error, ClientErrorsList known_errors, uint known_errors_count, Quark known_errors_domain, bool fail_when_none_matched)
The function takes a dbus_error
and tries to find a match
in known_errors
for it, if it is a G_IO_ERROR, G_IO_ERROR_DBUS_ERROR.
Creation methods:
Methods:
- public void cancel_all ()
Cancels all pending operations started on
this.
- public bool check_capability (string capability)
Check if backend supports particular capability.
- public bool check_refresh_supported ()
Checks whether a client supports explicit refreshing (see
refresh).
- public string dup_bus_name ()
Returns a D-Bus bus name that will be used to connect the client to
the backend subprocess.
- public virtual async bool get_backend_property (string prop_name, Cancellable? cancellable, out string prop_value) throws Error
Queries this's backend for a
property of name prop_name
.
- public virtual bool get_backend_property_sync (string prop_name, out string prop_value, Cancellable? cancellable = null) throws Error
Queries this's backend for a
property of name prop_name
.
- public unowned SList<string> get_capabilities ()
Get list of strings with capabilities advertised by a backend.
- public unowned Source get_source ()
Get the Source that this
client has assigned.
- public bool is_online ()
Check if this this is connected.
- public bool is_opened ()
Check if this this is fully opened.
- public bool is_readonly ()
Check if this this is read-only.
- public virtual async bool open (bool only_if_exists, Cancellable? cancellable) throws Error
Opens the this, making it ready for
queries and other operations.
- public virtual bool open_sync (bool only_if_exists, Cancellable? cancellable = null) throws Error
Opens the this, making it ready for
queries and other operations.
- public MainContext ref_main_context ()
Returns the MainContext on which event
sources for this are to be attached.
- public virtual async bool refresh (Cancellable? cancellable) throws Error
Initiates refresh on the this.
- public virtual bool refresh_sync (Cancellable? cancellable = null) throws Error
Initiates refresh on the this.
- public virtual async bool remove (Cancellable? cancellable) throws Error
Removes the backing data for this Client
.
- public virtual bool remove_sync (Cancellable? cancellable = null) throws Error
Removes the backing data for this Client
.
- public virtual async bool retrieve_capabilities (Cancellable? cancellable, out string capabilities) throws Error
Initiates retrieval of capabilities on the
this.
- public virtual bool retrieve_capabilities_sync (out string capabilities, Cancellable? cancellable = null) throws Error
Initiates retrieval of capabilities on the
this.
- public async bool retrieve_properties (Cancellable? cancellable) throws Error
Asynchronously retrieves this
properties to match server-side values, without waiting for the D-Bus property change notifications delivery.
- public virtual bool retrieve_properties_sync (Cancellable? cancellable = null) throws Error
Retrieves this properties to match
server-side values, without waiting for the D-Bus property change notifications delivery.
- public virtual async bool set_backend_property (string prop_name, string prop_value, Cancellable? cancellable) throws Error
Sets this's backend property of name
prop_name
to value prop_value
.
- public virtual bool set_backend_property_sync (string prop_name, string prop_value, Cancellable? cancellable = null) throws Error
Sets this's backend property of name
prop_name
to value prop_value
.
- public void set_bus_name (string bus_name)
Sets a D-Bus bus name that will be used to connect the client to the
backend subprocess.
- public virtual void unwrap_dbus_error (Error dbus_error) throws Error
Unwraps D-Bus error to local error.
- public async bool wait_for_connected (uint32 timeout_seconds, Cancellable? cancellable) throws Error
Asynchronously waits until the this
is connected (according to ESource::connection-status
property), but not longer than timeout_seconds
.
- public bool wait_for_connected_sync (uint32 timeout_seconds, Cancellable? cancellable = null) throws Error
Synchronously waits until the this
is connected (according to ESource::connection-status
property), but not longer than timeout_seconds
.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref