type t = OBus_connection.t
Establish a connection with a message bus. The bus must be accessible with at least one of the given addresses
Register the given connection to a message bus. It has the side effect of requesting a name to the message bus if not already done.
Function which exit the program as follow:
OBus_connection.Connection_lost, it exits the program with a return code of 0
exnis a fatal error, it prints a message on stderr and exits the program with an exit code of 1
get_peer bus name returns the peer owning the bus name
name. If the service is not activated and is activable, then it is started
get_proxy bus name path resolves
get_peer and returns a proxy for the object with path
path on this service
names bus is the signal holding the set of all names we currently own. It raises
Invalid_argument if the connection is not a connection to a message bus.
hello connection sends an hello message to the message bus, which returns the unique connection name of the connection. Note that if the hello message has already been sent, it will fail.
Exception raised when a name cannot be owned due to security policies
val request_name : t -> ?allow_replacement:bool -> ?replace_existing:bool -> ?do_not_queue:bool -> OBus_name.bus -> request_name_result Lwt.t
Request a name to the bus. This is the way to acquire a well-know name.
All optional parameters default to
false, their meaning are:
allow_replacement: allow other application to steal this name from you
replace_existing: replace any existing owner of the name
do_not_queue: do not queue if not available
Exception raised when a service is not present on a message bus and can not be started automatically
Start a service on the given bus by its name
true if the service is currently running, i.e. some application offers it on the message bus
List services that can be activated. A service is automatically activated when you call one of its method or when you use
Return the connection unique name of the given service. Raise a
Name_has_no_owner if the given name does not have an owner.
Return the connection unique names of the applications waiting for a name
Note that you should prefer using
OBus_match.remove since they do not add duplicated rules several times.
Exception raised when the program tries to send an invalid match rule. This should never happen since values of type
OBus_match.rule are always valid.
Add a matching rule on a message bus. This means that every message routed on the message bus matching this rule will be sent to us.
It can raise
Remove a match rule from the message bus. It raises
Match_rule_not_found if the rule does not exists
These functions are also offered by the message bus
This signal is emitted each time the owner of a name (unique connection name or service name) changes.