package obus

  1. Overview
  2. Docs
Pure Ocaml implementation of the D-Bus protocol

Install

Dune Dependency

Authors

Maintainers

Sources

obus-1.2.5.tar.gz
md5=81eb1034c6ef4421a2368a9b352199de
sha512=4b540497188a7d78f4f14f94c6b7fdff47dd06436a34e650ff378dd77bb3e2acb7afd45cd72daf4ddba06e732e9944d560c2882dc37862f1b1f1bb6df37e6205

doc/obus.internals/OBus_name/index.html

Module OBus_nameSource

D-Bus names

For specific restrictions on D-Bus names, see

General restrictions include:

  • names must not be empty
  • names must contains only ascii characters

Bus names

example: "org.freedesktop.DBus", ":1.1"

Sourceval validate_bus : OBus_string.validator
Sourceval is_unique : bus -> bool

Tell wether a bus name is a unique connection name or not.

Sourcetype interface = OBus_string.t

Interface names

example: "org.freedesktop.DBus.Introspectable"

Sourceval validate_interface : OBus_string.validator
Sourcetype member = OBus_string.t

Methods/signals/properties names

example: "StartServiceByName"

Sourceval validate_member : OBus_string.validator
Sourcetype error = OBus_string.t

Error names

example: "org.freedesktop.Error.UnknownMethod"

Sourceval validate_error : OBus_string.validator
D-Bus name translation
Sourceval split : string -> string list

Split a name into longest blocks matched by the regular expression "A-Z*^A-Z.*":

split "SetCPUFreqGovernor" = ["Set"; "CPUFreq"; "Governor"], split "org.freedesktop.DBus" = ["org"; "freedesktop"; "DBus"]

Sourceval ocaml_lid : string -> string

Translate a D-Bus name into an ocaml-style lower-identifier:

caml_lid "SetCPUFreqGovernor" = "set_cpufreq_governor"

Sourceval ocaml_uid : string -> string

Translate a D-Bus name into an ocaml-style upper-identifier:

caml_uid "org.freedesktop.DBus" = "Org_freedesktop_dbus"

Sourceval haskell_lid : string -> string

Translate a D-Bus name into an haskell-style lower-identifier:

haskell_lid "SetCPUFreqGovernor" = "setCPUFreqGovernor"

Sourceval haskell_uid : string -> string

Translate a D-Bus name into an haskell-style upper-identifier:

haskell_uid "org.freedesktop.DBus" = "OrgFreedesktopDBus"

OCaml

Innovation. Community. Security.