package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/D_bus_proxy/index.html
Module Wrappers.D_bus_proxy
type t = [ `d_bus_proxy | `object_ ] Gobject.objval new_finish : [ `async_result ] Gobject.obj -> (t, GError.t) resultCreate a new DBusProxy
val new_for_bus_finish : [ `async_result ] Gobject.obj -> (t, GError.t) resultCreate a new DBusProxy
val new_for_bus_sync :
Gio_enums.bustype ->
Gio_enums.dbusproxyflags ->
[ `d_bus_interface_info ] Gobject.obj option ->
string ->
string ->
string ->
[ `cancellable | `object_ ] Gobject.obj option ->
(t, GError.t) resultCreate a new DBusProxy
val new_sync :
[ `d_bus_connection | `object_ ] Gobject.obj ->
Gio_enums.dbusproxyflags ->
[ `d_bus_interface_info ] Gobject.obj option ->
string option ->
string ->
string ->
[ `cancellable | `object_ ] Gobject.obj option ->
(t, GError.t) resultCreate a new DBusProxy
val set_interface_info :
t ->
[ `d_bus_interface_info ] Gobject.obj option ->
unitEnsure that interactions with @proxy conform to the given interface. See the #GDBusProxy:g-interface-info property for more details.
val set_default_timeout : t -> int -> unitSets 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.
val set_cached_property : t -> string -> Gvariant.t option -> unitIf @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) and @property_name is referenced by it, then @value is checked against the type of the property.
If the @value #GVariant is floating, it is consumed. This allows convenient 'inline' use of g_variant_new(), e.g. |<!-- language="C" --> 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 `org.freedesktop.DBus.Properties.PropertiesChanged` 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 `ChatroomParticipants` which is an array of 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 `ChatroomParticipantJoined(String name)` and `ChatroomParticipantParted(String name)`.
val get_object_path : t -> stringGets the object path @proxy is for.
val get_name_owner : t -> string optionThe 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.
val get_name : t -> string optionGets the name that @proxy was constructed for.
When connected to a message bus, this will usually be non-%NULL. However, it may be %NULL for a proxy that communicates using a peer-to-peer pattern.
val get_interface_name : t -> stringGets the D-Bus interface name @proxy is for.
val get_interface_info : t -> [ `d_bus_interface_info ] Gobject.obj optionReturns the #GDBusInterfaceInfo, if any, specifying the interface that @proxy conforms to. See the #GDBusProxy:g-interface-info property for more details.
val get_flags : t -> Gio_enums.dbusproxyflagsGets the flags that @proxy was constructed with.
val get_default_timeout : t -> intGets 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.
val get_connection : t -> [ `d_bus_connection | `object_ ] Gobject.objGets the connection @proxy is for.
val get_cached_property_names : t -> string array optionGets the names of all cached properties on @proxy.
val get_cached_property : t -> string -> Gvariant.t optionLooks 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) and @property_name is referenced by it, then @value is checked against the type of the property.
val call_sync :
t ->
string ->
Gvariant.t option ->
Gio_enums.dbuscallflags ->
int ->
[ `cancellable | `object_ ] Gobject.obj option ->
(Gvariant.t, GError.t) resultSynchronously 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 @cancellable is canceled, the operation will fail with %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.: |<!-- language="C" --> 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.
If @proxy has an expected interface (see #GDBusProxy:g-interface-info) and @method_name is referenced by it, then the return value is checked against the return type.
val call_finish :
t ->
[ `async_result ] Gobject.obj ->
(Gvariant.t, GError.t) resultFinishes an operation started with g_dbus_proxy_call().
val get_g_connection : t -> [ `d_bus_connection | `object_ ] Gobject.objGet property: g-connection
val get_g_default_timeout : t -> intGet property: g-default-timeout
val set_g_default_timeout : t -> int -> unitSet property: g-default-timeout
val get_g_flags : t -> Gio_enums.dbusproxyflagsGet property: g-flags
val get_g_interface_info : t -> [ `d_bus_interface_info ] Gobject.objGet property: g-interface-info
val set_g_interface_info : t -> [ `d_bus_interface_info ] Gobject.obj -> unitSet property: g-interface-info
val get_g_interface_name : t -> stringGet property: g-interface-name
val get_g_name : t -> stringGet property: g-name
val get_g_name_owner : t -> stringGet property: g-name-owner
val get_g_object_path : t -> stringGet property: g-object-path
val on_g_signal :
?after:bool ->
t ->
callback:
(sender_name:string -> signal_name:string -> parameters:Gvariant.t -> unit) ->
Gobject.Signal.handler_id