DBusProxy
Object Hierarchy:
Description:
Namespace: GLib
Package: gio-2.0
Content:
Properties:
-
public BusType g_bus_type { construct set; }
-
public DBusConnection g_connection { construct set; owned get; }
-
public int g_default_timeout { construct set; get; }
The timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the
call and call_sync
functions.
-
public DBusProxyFlags g_flags { construct set; get; }
-
public DBusInterfaceInfo g_interface_info { set; owned get; }
Ensure that interactions with this proxy conform to the given interface. For example, when completing a
method call, if the type signature of the message isn't what's expected, the given
Error is set. Signals that have a type signature mismatch are simply dropped.
-
public string g_interface_name { construct set; owned get; }
The D-Bus interface name the proxy is for.
-
public string g_name { construct set; owned get; }
The well-known or unique name that the proxy is for.
-
public string g_name_owner { owned get; }
The unique name that owns GDBusProxy:name or null if no-one currently owns
that name. You may connect to notify signal to track changes to
this property.
-
public string g_object_path { construct set; owned get; }
The object path the proxy is for.
Creation methods:
-
public DBusProxy (DBusConnection connection, DBusProxyFlags flags, DBusInterfaceInfo? info, string name, string object_path, string interface_name, Cancellable? cancellable = null) throws Error
Creates a proxy for accessing interface_name on the remote object at object_path
owned by name at connection and asynchronously loads D-Bus properties unless the
DO_NOT_LOAD_PROPERTIES flag is used. Connect to the
g_properties_changed signal to get notified about property
changes.
-
public DBusProxy.for_bus (BusType bus_type, DBusProxyFlags flags, DBusInterfaceInfo? info, string name, string object_path, string interface_name, Cancellable? cancellable = null) throws Error
-
public DBusProxy.for_bus_sync (BusType bus_type, DBusProxyFlags flags, DBusInterfaceInfo? info, string name, string object_path, string interface_name, Cancellable? cancellable = null) throws Error
-
public DBusProxy.sync (DBusConnection connection, DBusProxyFlags flags, DBusInterfaceInfo? info, string name, string object_path, string interface_name, Cancellable? cancellable = null) throws Error
Creates a proxy for accessing interface_name on the remote object at object_path
owned by name at connection and synchronously loads D-Bus properties unless the
DO_NOT_LOAD_PROPERTIES flag is used.
Methods:
-
public async Variant call (string method_name, Variant? parameters, DBusCallFlags flags, int timeout_msec, Cancellable? cancellable = null) throws Error
Asynchronously invokes the method_name method on proxy.
-
public Variant call_sync (string method_name, Variant? parameters, DBusCallFlags flags, int timeout_msec, Cancellable? cancellable = null) throws Error
Synchronously invokes the method_name method on proxy.
-
public async Variant call_with_unix_fd_list (string method_name, Variant? parameters, DBusCallFlags flags, int timeout_msec, UnixFDList? fd_list, Cancellable? cancellable = null, out UnixFDList? out_fd_list) throws Error
-
public Variant call_with_unix_fd_list_sync (string method_name, Variant? parameters, DBusCallFlags flags, int timeout_msec, UnixFDList? fd_list, out UnixFDList? out_fd_list, Cancellable? cancellable = null) throws Error
-
public weak Variant get_cached_property (string property_name)
Looks up the value for a property from the cache. This call does no blocking IO.
-
public unowned string get_cached_property_names ()
Gets the names of all cached properties on proxy.
-
public weak DBusConnection get_connection ()
Gets the connection proxy is for.
-
public int get_default_timeout ()
Gets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the
call and call_sync
functions.
-
public DBusProxyFlags get_flags ()
Gets the flags that proxy was constructed with.
-
public weak DBusInterfaceInfo get_interface_info ()
Returns the DBusInterfaceInfo, if any,
specifying the minimal interface that proxy conforms to.
-
public unowned string get_interface_name ()
Gets the D-Bus interface name proxy is for.
-
public unowned string get_name ()
Gets the name that proxy was constructed for.
-
public unowned string get_name_owner ()
The unique name that owns the name that proxy is for or null if no-one
currently owns that name. You may connect to the notify signal to
track changes to the g_name_owner property.
-
public unowned string get_object_path ()
Gets the object path proxy is for.
-
public void set_cached_property (string property_name, Variant value)
If value is not null, sets the cached value for the property with name
property_name to the value in value.
-
public void set_default_timeout (int timeout_msec)
Sets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the
call and call_sync
functions.
-
public void set_interface_info (DBusInterfaceInfo info)
Ensure that interactions with proxy conform to the given interface. For example, when
completing a method call, if the type signature of the message isn't what's expected, the given
Error is set. Signals that have a type signature mismatch are simply dropped.
Signals:
-
public virtual void g_properties_changed (Variant changed_properties, string[] invalidated_properties)
Emitted when one or more D-Bus properties on proxy changes. The local cache has already
been updated when this signal fires. Note that both changed_properties and invalidated_properties are
guaranteed to never be null (either may be empty though).
-
public virtual void g_signal (string sender_name, string signal_name, Variant parameters)
Emitted when a signal from the remote object and interface that proxy is for, has been
received.