package obus
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b8a0707f03d525a98c1c5a380b07074e52f2d26918c7b2ad90b5cc0f99a67f2d
md5=0896d5078bfd486a65cf9fa73a984b3f
doc/obus/OBus_proxy/index.html
Module OBus_proxy
Remote D-Bus objects
A proxy is an object on which live on a different processus, but behave as a native ocaml value.
type t = {peer : OBus_peer.t;(*Peer owning the object
*)path : OBus_path.t;(*Path of the object on the peer
*)
}The default type for proxies
Same as Pervasives.compare. It allows this module to be used as argument to the functors Set.Make and Map.Make.
val make : peer:OBus_peer.t -> path:OBus_path.t -> tCreates a proxy from the given peer and path
Informations
val peer : t -> OBus_peer.tReturns the peer pointed by a proxy
val path : t -> OBus_path.tReturns the path of a proxy
val connection : t -> OBus_connection.tconnection proxy = OBus_peer.connection (peer proxy)
val name : t -> OBus_name.busconnection proxy = OBus_peer.name (peer proxy)
val introspect : t -> OBus_introspect.document Lwt.tintrospect proxy introspects the given proxy
Method calls
val call :
t ->
interface:OBus_name.interface ->
member:OBus_name.member ->
i_args:'a OBus_value.C.sequence ->
o_args:'b OBus_value.C.sequence ->
'a ->
'b Lwt.tcall proxy ~interface ~member ~i_args ~o_args args calls the given method on the given proxy and wait for the reply.
val call_with_context :
t ->
interface:OBus_name.interface ->
member:OBus_name.member ->
i_args:'a OBus_value.C.sequence ->
o_args:'b OBus_value.C.sequence ->
'a ->
(OBus_context.t * 'b) Lwt.tcall_with_context is like call except that is also returns the context of the method return
val call_no_reply :
t ->
interface:OBus_name.interface ->
member:OBus_name.member ->
i_args:'a OBus_value.C.sequence ->
'a ->
unit Lwt.tcall_no_reply is the same as call except that it does not wait for a reply
Private proxies
The two following module interface and implementations are helpers for using private proxies. A private proxy is just a normal proxy but defined as a private type, to avoid incorrect use.
type proxy = tmodule type Private = sig ... endMinimal interface of private proxies
module Private : sig ... endMinimal implementation of private proxies