Safe Haskell | None |
---|---|
Language | Haskell98 |
- module Data.Int
- module Data.Word
- data Client :: *
- data BusName :: *
- data ObjectPath :: *
- data InterfaceName :: *
- data MemberName :: *
- data Variant :: *
- connectSession :: IO Client
- connectSystem :: IO Client
- data Signature
- data Function = Function {
- fnName :: String
- fnDBusName :: String
- fnSignature :: Signature
- (=::) :: String -> Signature -> Function
- as :: Function -> String -> Function
- interface :: String -> String -> String -> Maybe String -> [Function] -> Q [Dec]
Documentation
module Data.Int
module Data.Word
data Client :: *
An active client session to a message bus. Clients may send or receive method calls, and listen for or emit signals.
data BusName :: *
Bus names are used to identify particular clients on the message bus. A bus name may be either unique or well-known, where unique names start with a colon. Bus names consist of alphanumeric characters separated by periods.
See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus for details.
data ObjectPath :: *
Object paths are special strings, used to identify a particular object exported from a D-Bus application.
Object paths must begin with a slash, and consist of alphanumeric characters separated by slashes.
See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path for details.
data InterfaceName :: *
Interfaces are used to group a set of methods and signals within an exported object. Interface names consist of alphanumeric characters separated by periods.
See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface for details.
data MemberName :: *
Member names are used to identify a single method or signal within an interface. Method names consist of alphanumeric characters.
See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-member for details.
data Variant :: *
Variants may contain any other built-in D-Bus value. Besides
representing native VARIANT
values, they allow type-safe storage and
inspection of D-Bus collections.
Connect to the bus specified in the environment variable
DBUS_SESSION_BUS_ADDRESS
, which must be set.
Throws a ClientError
if DBUS_SESSION_BUS_ADDRESS
is unset, contains an
invalid address, or if connecting to the bus failed.
Connect to the bus specified in the environment variable
DBUS_SYSTEM_BUS_ADDRESS
, or to
unix:path=/var/run/dbus/system_bus_socket
if DBUS_SYSTEM_BUS_ADDRESS
is not set.
Throws a ClientError
if DBUS_SYSTEM_BUS_ADDRESS
contains an invalid
address, or if connecting to the bus failed.
Function signature
Function with DBus name and Haskell name
Function | |
|
(=::) :: String -> Signature -> Function infixr 5 Source
Create a Function from it's name and Signature. Sets fnDBusName == fnName.
:: String | Bus name |
-> String | Interface name |
-> String | Object name |
-> Maybe String | Prefix |
-> [Function] | List of functions |
-> Q [Dec] |
Generate bindings for methods in specific DBus interface. If second argument is (Just prefix), then prefix will be added to the beginning of all DBus names and removed from all Haskell names.