GObject.Object
Gio.DBusProxy
Import line: | Gio = imports.gi.Gio; |
GIR File: | Gio-2.0.gir |
C documentation: | GDBusProxy |
Class : | DBusProxy |
Implements: | Gio.AsyncInitable, Gio.Initable |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
g_bus_type : Gio.BusType
If this property is not G_BUS_TYPE_NONE, then
GDBusProxy:g-connection must be NULL and will be set to the GDBusConnection obtained by calling g_bus_get() with the value of this property. If this property is not G_BUS_TYPE_NONE, then
GDBusProxy:g-connection must be NULL and will be set to the GDBusConnection obtained by calling g_bus_get() with the value of this property. |
Gio.DBusProxy | |
g_connection : Gio.DBusConnection
The GDBusConnection the proxy is for.
The GDBusConnection the proxy is for.
|
Gio.DBusProxy | |
g_default_timeout : gint32
The timeout to use if -1 (specifying default timeout) is passed
as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. The timeout to use if -1 (specifying default timeout) is passed
as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. This allows applications to set a proxy-wide timeout for all remote method invocations on the proxy. If this property is -1, the default timeout (typically 25 seconds) is used. If set to G_MAXINT, then no timeout is used. |
Gio.DBusProxy | |
g_flags : Gio.DBusProxyFlags
Flags from the GDBusProxyFlags enumeration.
Flags from the GDBusProxyFlags enumeration.
|
Gio.DBusProxy | |
g_interface_info : Gio.DBusInterfaceInfo
Ensure that interactions with this proxy conform to the given
interface. 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 GError is set. Signals that have a type signature mismatch are simply dropped. |
Gio.DBusProxy | |
g_interface_name : String
The D-Bus interface name the proxy is for.
The D-Bus interface name the proxy is for.
|
Gio.DBusProxy | |
g_name : String
The well-known or unique name that the proxy is for.
The well-known or unique name that the proxy is for.
|
Gio.DBusProxy | |
g_name_owner : String
read only
The unique name that owns GDBusProxy:name or NULL if no-one
currently owns that name. The unique name that owns GDBusProxy:name or NULL if no-one
currently owns that name. You may connect to GObject::notify signal to track changes to this property. |
Gio.DBusProxy | |
g_object_path : String
The object path the proxy is for.
The object path the proxy is for.
|
Gio.DBusProxy | |
parent_instance : GObject.Object
read only
|
Gio.DBusProxy | |
priv : Gio.DBusProxyPrivate
read only
|
Gio.DBusProxy |
Method / Constructor | Defined By | |
---|---|---|
new Gio.DBusProxy
(Object properties)
Create a new Gio.DBusProxy
Create a new Gio.DBusProxy
|
||
Create a new Gio.DBusProxy
Create a new Gio.DBusProxy
|
||
Create a new Gio.DBusProxy
Create a new Gio.DBusProxy
|
||
new Gio.DBusProxy.for_bus_sync
(BusType bus_type, DBusProxyFlags flags, DBusInterfaceInfo info, String name, String object_path, String interface_name, Cancellable cancellable)
:
Gio.DBusProxy
Create a new Gio.DBusProxy
Create a new Gio.DBusProxy
|
||
new Gio.DBusProxy.sync
(DBusConnection connection, DBusProxyFlags flags, DBusInterfaceInfo info, String name, String object_path, String interface_name, Cancellable cancellable)
:
Gio.DBusProxy
Create a new Gio.DBusProxy
Create a new Gio.DBusProxy
|
||
Gio.DBusProxy.c_new
(DBusConnection connection, DBusProxyFlags flags, DBusInterfaceInfo info, String name, String object_path, String interface_name, Cancellable cancellable, Function callback, void* user_data)
:
none
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 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
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 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to the GDBusProxy::g-properties-changed signal to get notified about property changes. If the G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up match rules for signals. Connect to the GDBusProxy::g-signal signal to handle signals from the remote object. If name is a well-known name and the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name owner currently exists, the message bus will be requested to launch a name owner for the name. This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use g_dbus_proxy_new_finish() to get the result. See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. See
|
Gio.DBusProxy | |
Gio.DBusProxy.new_for_bus
(BusType bus_type, DBusProxyFlags flags, DBusInterfaceInfo info, String name, String object_path, String interface_name, Cancellable cancellable, Function callback, void* user_data)
:
none
Like g_dbus_proxy_new() but takes a GBusType instead of a GDBusConnection.
Like g_dbus_proxy_new() but takes a GBusType instead of a GDBusConnection.
See
|
Gio.DBusProxy | |
call
(String method_name, Variant parameters, DBusCallFlags flags, gint32 timeout_msec, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously invokes the method_name method on proxy.
Asynchronously invokes the method_name method on proxy.
If method_name contains any dots, then name is split into interface and method name parts. This allows using proxy for invoking methods on other interfaces. If the GDBusConnection associated with proxy is closed then the operation will fail with G_IO_ERROR_CLOSED. If G_IO_ERROR_CANCELLED. If parameters contains a value not compatible with the D-Bus protocol, the operation fails with G_IO_ERROR_INVALID_ARGUMENT. If the parameters GVariant is floating, it is consumed. This allows convenient 'inline' use of g_variant_new(), e.g.: |[ g_dbus_proxy_call (proxy, "TwoStrings", g_variant_new ("(ss)", "Thing One", "Thing Two"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) two_strings_done, &data); ]| This is an asynchronous method. When the operation is finished, thread-default main loop of the thread you are calling this method from. You can then call g_dbus_proxy_call_finish() to get the result of the operation. See g_dbus_proxy_call_sync() for the synchronous version of this method.
|
Gio.DBusProxy | |
call_finish
(AsyncResult res)
:
GLib.Variant
Finishes an operation started with g_dbus_proxy_call().
Finishes an operation started with g_dbus_proxy_call().
return values. Free with g_variant_unref().
|
Gio.DBusProxy | |
call_sync
(String method_name, Variant parameters, DBusCallFlags flags, gint32 timeout_msec, Cancellable cancellable)
:
GLib.Variant
Synchronously invokes the method_name method on proxy.
Synchronously invokes the method_name method on proxy.
If method_name contains any dots, then name is split into interface and method name parts. This allows using proxy for invoking methods on other interfaces. If the GDBusConnection associated with proxy is disconnected then the operation will fail with G_IO_ERROR_CLOSED. If G_IO_ERROR_CANCELLED. If parameters contains a value not compatible with the D-Bus protocol, the operation fails with G_IO_ERROR_INVALID_ARGUMENT. If the parameters GVariant is floating, it is consumed. This allows convenient 'inline' use of g_variant_new(), e.g.: |[ g_dbus_proxy_call_sync (proxy, "TwoStrings", g_variant_new ("(ss)", "Thing One", "Thing Two"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); ]| The calling thread is blocked until a reply is received. See g_dbus_proxy_call() for the asynchronous version of this method. return values. Free with g_variant_unref().
|
Gio.DBusProxy | |
get_cached_property
(String property_name)
:
GLib.Variant
Looks up the value for a property from the cache.
Looks up the value for a property from the cache. This call does no
blocking IO. If proxy has an expected interface (see GDBusProxy:g-interface-info), then property_name (for existence) is checked against it. for property_name or NULL if the value is not in the cache. The returned reference must be freed with g_variant_unref().
|
Gio.DBusProxy | |
get_connection
()
:
Gio.DBusConnection
Gets the connection proxy is for.
Gets the connection proxy is for.
|
Gio.DBusProxy | |
get_default_timeout
()
:
gint32
Gets the timeout to use if -1 (specifying default timeout) is
passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions.
Gets the timeout to use if -1 (specifying default timeout) is
passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. See the GDBusProxy:g-default-timeout property for more details.
|
Gio.DBusProxy | |
get_flags
()
:
Gio.DBusProxyFlags
Gets the flags that proxy was constructed with.
Gets the flags that proxy was constructed with.
|
Gio.DBusProxy | |
get_interface_info
()
:
Gio.DBusInterfaceInfo
Returns the GDBusInterfaceInfo, if any, specifying the minimal
interface that proxy conforms to.
Returns the GDBusInterfaceInfo, if any, specifying the minimal
interface that proxy conforms to. See the GDBusProxy:g-interface-info property for more details. object, it is owned by proxy.
|
Gio.DBusProxy | |
get_interface_name
()
:
String
Gets the D-Bus interface name proxy is for.
Gets the D-Bus interface name proxy is for.
|
Gio.DBusProxy | |
get_name
()
:
String
Gets the name that proxy was constructed for.
Gets the name that proxy was constructed for.
|
Gio.DBusProxy | |
get_name_owner
()
:
String
The unique name that owns the name that proxy is for or NULL if
no-one currently owns that name.
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 GObject::notify signal to track changes to the GDBusProxy:g-name-owner property.
|
Gio.DBusProxy | |
get_object_path
()
:
String
Gets the object path proxy is for.
Gets the object path proxy is for.
|
Gio.DBusProxy | |
init
(Cancellable cancellable)
:
gboolean
Initializes the object implementing the interface.
Initializes the object implementing the interface. This must be
done before any real use of the object after initial construction. Implementations may also support cancellation. If cancellable is not NULL, then initialization can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If cancellable is not NULL and the object doesn't support cancellable initialization the error G_IO_ERROR_NOT_SUPPORTED will be returned. If this function is not called, or returns with an error then all operations on the object should fail, generally returning the error G_IO_ERROR_NOT_INITIALIZED. Implementations of this method must be idempotent, i.e. multiple calls to this function with the same argument should return the same results. Only the first call initializes the object, further calls return the result of the first call. This is so that its safe to implement the singleton pattern in the GObject constructor function. return FALSE and set error appropriately if present.
|
Gio.Initable | |
Starts asynchronous initialization of the object implementing the
interface.
Starts asynchronous initialization of the object implementing the
interface. This must be done before any real use of the object after initial construction. If the object also implements GInitable you can optionally call g_initable_init() instead. When the initialization is finished, callback will be called. You can then call g_async_initable_init_finish() to get the result of the initialization. Implementations may also support cancellation. If cancellable is not NULL, then initialization can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If cancellable is not NULL, and the object doesn't support cancellable initialization, the error G_IO_ERROR_NOT_SUPPORTED will be returned. If this function is not called, or returns with an error, then all operations on the object should fail, generally returning the error G_IO_ERROR_NOT_INITIALIZED. to this function with the same argument should return the same results. Only the first call initializes the object; further calls return the result of the first call. This is so that it's safe to implement the singleton pattern in the GObject constructor function. For classes that also support the GInitable interface, the default implementation of this method will run the g_initable_init() function in a thread, so if you want to support asynchronous initialization via threads, just implement the GAsyncInitable interface without overriding any interface methods.
|
Gio.AsyncInitable | |
init_finish
(AsyncResult res)
:
gboolean
Finishes asynchronous initialization and returns the result.
Finishes asynchronous initialization and returns the result.
See g_async_initable_init_async(). will return FALSE and set error appropriately if present.
|
Gio.AsyncInitable | |
new_finish
(AsyncResult res)
:
GObject.Object
Finishes the async construction for the various g_async_initable_new calls,
returning the created object or NULL on error.
Finishes the async construction for the various g_async_initable_new calls,
returning the created object or NULL on error. g_object_unref().
|
Gio.AsyncInitable | |
If value is not NULL, sets the cached value for the property with
name property_name to the value in value.
If value is not NULL, sets the cached value for the property with
name property_name to the value in value. If value is NULL, then the cached value is removed from the property cache. If proxy has an expected interface (see GDBusProxy:g-interface-info), then property_name (for existence) and value (for the type) is checked against it. If the value GVariant is floating, it is consumed. This allows convenient 'inline' use of g_variant_new(), e.g. |[ g_dbus_proxy_set_cached_property (proxy, "SomeProperty", g_variant_new ("(si)", "A String", 42)); ]| Normally you will not need to use this method since proxy is tracking changes using the D-Bus signal. However, for performance reasons an object may decide to not use this signal for some properties and instead use a proprietary out-of-band mechanism to transmit changes. As a concrete example, consider an object with a property strings. Instead of transmitting the same (long) array every time the property changes, it is more efficient to only transmit the delta using e.g. signals name) name)
|
Gio.DBusProxy | |
set_default_timeout
(gint32 timeout_msec)
:
none
Sets the timeout to use if -1 (specifying default timeout) is
passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions.
Sets the timeout to use if -1 (specifying default timeout) is
passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. See the GDBusProxy:g-default-timeout property for more details.
|
Gio.DBusProxy | |
set_interface_info
(DBusInterfaceInfo info)
:
none
Ensure that interactions with proxy conform to the given
interface.
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 GError is set. Signals that have a type signature mismatch are simply dropped. See the GDBusProxy:g-interface-info property for more details.
|
Gio.DBusProxy |
Event | Defined By | |
---|---|---|
g_properties_changed (DBusProxy self, Variant changed_properties, Array invalidated_properties)
:
none
Emitted when one or more D-Bus properties on proxy changes.
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). This signal corresponds to the
|
Gio.DBusProxy | |
Emitted when a signal from the remote object and interface that proxy is for, has been received.
Emitted when a signal from the remote object and interface that proxy is for, has been received.
|
Gio.DBusProxy |