dbus-th-0.1.1.1: TemplateHaskell generator of DBus bindings

Safe HaskellNone
LanguageHaskell98

DBus.TH

Synopsis

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.

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.

data Signature Source

Function signature

Constructors

Return Name 
Name :-> Signature infixr 6 

data Function Source

Function with DBus name and Haskell name

Constructors

Function 

Fields

fnName :: String

Function name to use in Haskell

fnDBusName :: String

Function name to use in DBus

fnSignature :: Signature

Function signature

(=::) :: String -> Signature -> Function infixr 5 Source

Create a Function from it's name and Signature. Sets fnDBusName == fnName.

as :: Function -> String -> Function infixl 4 Source

Set specific Haskell name for Function.

interface Source

Arguments

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