package obus

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.2.0.tar.gz
sha256=b8a0707f03d525a98c1c5a380b07074e52f2d26918c7b2ad90b5cc0f99a67f2d
md5=0896d5078bfd486a65cf9fa73a984b3f

doc/obus.internals/OBus_name/index.html

Module OBus_name

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
type bus = OBus_string.t

Bus names

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

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

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

type interface = OBus_string.t

Interface names

example: "org.freedesktop.DBus.Introspectable"

val validate_interface : OBus_string.validator
type member = OBus_string.t

Methods/signals/properties names

example: "StartServiceByName"

val validate_member : OBus_string.validator
type error = OBus_string.t

Error names

example: "org.freedesktop.Error.UnknownMethod"

val validate_error : OBus_string.validator
D-Bus name translation
val 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"]

val ocaml_lid : string -> string

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

caml_lid "SetCPUFreqGovernor" = "set_cpufreq_governor"

val ocaml_uid : string -> string

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

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

val haskell_lid : string -> string

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

haskell_lid "SetCPUFreqGovernor" = "setCPUFreqGovernor"

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