Legend:
Library
Module
Module type
Parameter
Class
Class type
D-Bus connections
This module implements manipulation of a D-Bus connection. A D-Bus connection is a channel opened with another application which also implement the D-Bus protocol. It is used to exchange D-Bus messages.
Same as Stdlib.compare. It allows this module to be used as argument to the functors Set.Make and Map.Make.
Creation
The following functions will return a connection which is ready to send and receive messages. You should use them only for direct connection to another application without passing through a message bus.
Otherwise you should use OBus_bus or immediately call OBus_bus.register_connection after the creation.
of_addresses ?switch ?shared addresses try to get a working D-Bus connection from a list of addresses. The server must be accessible from at least one of these addresses.
If shared is true and a connection to the same server is already open, then it is used instead of transport. This is the default behaviour.
Returns the unique name of the connection. This is only meaningful is the other endpoint of the connection is a message bus. If it is not the case it returns "".
set connection key value attach value to connection under the key key. set connection key None will remove any occurence of key from connection.
Errors handling
Note: when a filter/signal handler/method_call handler raise an exception, it is just dropped. If OBus_info.debug is set then a message is printed on stderr
val set_on_disconnect : t->(exn ->unit Lwt.t)-> unit
Sets the function called when a fatal error happen or when the conection is lost.
Notes:
the default function does nothing
it is not called when the connection is closed using close