package obus

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.2.3.tar.gz
sha256=75703f78015e15d03d0fdba1633a155875daf17d854225658429e72a0df06258
md5=3090a796f0af95e16838d81656ac4b97

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.