首页 > 代码库 > DBus

DBus

D-Bus helps coordinate process lifecycle. It makes it simple and reliable to code a “single instance” (?) application or deamon, and to launch applications and deamons on demand when their services are needed.

 

D-Bus is designed for two specific use cases:

l  A “system bus” for notifications from the system to user sessions, and to allow the system to request input from user sessions

l  A “session bus” used to implement desktop environments such as GNOME and KDE

 

Converting a value from some other representation into the wire format is called marshaling and converting it back from the wire format is unmarshaling.

a block of marshaled values must have a known type signature.

a single complete type is a sequence of type codes that fully describes one type: a single complete type is a basic type code, a variant type code, an array with its element type, or a struct with its fields.

  • basic types: struct is entirely defined by their 1-character type code.
    • 1) fixed type : values have a fixed length
    • 2) string-like types:
      • string:
      • object_path: are namespaced by starting with a reversed domain name and containing an interface version number
      • signature: ?
      • http://dbus.freedesktop.org/doc/dbus-specification.html