package obus

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module OBus_proxySource

Remote D-Bus objects

A proxy is an object on which live on a different processus, but behave as a native ocaml value.

Sourcetype t = {
  1. peer : OBus_peer.t;
    (*

    Peer owning the object

    *)
  2. path : OBus_path.t;
    (*

    Path of the object on the peer

    *)
}

The default type for proxies

Sourceval compare : t -> t -> int

Same as Stdlib.compare. It allows this module to be used as argument to the functors Set.Make and Map.Make.

Sourceval make : peer:OBus_peer.t -> path:OBus_path.t -> t

Creates a proxy from the given peer and path

Informations
Sourceval peer : t -> OBus_peer.t

Returns the peer pointed by a proxy

Sourceval path : t -> OBus_path.t

Returns the path of a proxy

Sourceval connection : t -> OBus_connection.t

connection proxy = OBus_peer.connection (peer proxy)

Sourceval name : t -> OBus_name.bus

connection proxy = OBus_peer.name (peer proxy)

introspect proxy introspects the given proxy

Method calls
Sourceval 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.t

call proxy ~interface ~member ~i_args ~o_args args calls the given method on the given proxy and wait for the reply.

Sourceval 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.t

call_with_context is like call except that is also returns the context of the method return

Sourceval call_no_reply : t -> interface:OBus_name.interface -> member:OBus_name.member -> i_args:'a OBus_value.C.sequence -> 'a -> unit Lwt.t

call_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.

Sourcetype proxy = t
Sourcemodule type Private = sig ... end

Minimal interface of private proxies

Sourcemodule Private : sig ... end

Minimal implementation of private proxies

OCaml

Innovation. Community. Security.