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
- signatureResult :: Signature -> Name
- data Function = Function {
- fnName :: String
- fnDBusName :: String
- fnSignature :: Signature
- (=::) :: String -> Signature -> Function
- as :: Function -> String -> Function
- function :: String -> String -> String -> Maybe String -> Function -> Q [Dec]
- interface :: String -> String -> String -> Maybe String -> [Function] -> Q [Dec]
- function' :: String -> Maybe String -> String -> Maybe String -> Function -> Q [Dec]
- interface' :: String -> Maybe String -> String -> Maybe String -> [Function] -> Q [Dec]
Documentation
module Data.Int
module Data.Word
An active client session to a message bus. Clients may send or receive method calls, and listen for or emit signals.
IsValue a => AutoMethod (DBusR (Either Reply a)) | |
IsValue a => AutoMethod (DBusR a) | |
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.
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.
connectSession :: IO Client #
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.
connectSystem :: IO Client #
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
signatureResult :: Signature -> Name Source #
Return type name for 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 | Object name |
-> String | Interface name |
-> Maybe String | Prefix |
-> Function | Function |
-> Q [Dec] |
Generate binding for one method 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.
:: String | Bus name |
-> String | Object name |
-> String | Interface 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.
:: String | Bus name |
-> Maybe String | Just name - use fixed object name; Nothing - object name will be 2nd argument of generated function |
-> String | Interface name |
-> Maybe String | Prefix |
-> Function | Function |
-> Q [Dec] |
Generate binding for one method 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.
:: String | Bus name |
-> Maybe String | Just name - use fixed object name; Nothing - object name will be 2nd argument of generated functions |
-> String | Interface 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.