udbus-0.1: Small DBus implementation

Network.DBus

Contents

Synopsis

Documentation

data DBusHandle Source

Represent an open access to dbus. for now only based on system handle.

authenticate :: ByteString -> DBusContext ()Source

authenticateUID :: Int -> DBusContext ()Source

connectSession :: IO DBusHandleSource

connect to the dbus session bus define by the environment variable DBUS_SESSION_BUS_ADDRESS

connectSystem :: IO DBusHandleSource

connect to the dbus system bus

connectHandle :: Handle -> IO DBusHandleSource

connect onto a previously open handle

withContext :: IO DBusHandle -> DBusContext a -> IO aSource

create a new Dbus context from a ini function to create a dbusHandle.

withSession :: DBusContext a -> IO aSource

create a new Dbus context on session bus

withSystem :: DBusContext a -> IO aSource

create a new Dbus context on system bus

messageSend :: Message -> DBusContext SerialSource

send one message to the bus note that the serial of the message sent is allocated here.

messageRecv :: DBusContext MessageSource

receive one single message from the bus it is not necessarily the reply from a previous sent message.

from Message module

data MessageFlag Source

dbus message flags

data Message Source

Constructors

Message 

Instances

type Serial = Word32Source

dbus serial number

msgMethodCall :: BusName -> ObjectPath -> Interface -> Member -> Body -> MessageSource

create a new method call message

msgMethodReturn :: Serial -> Body -> MessageSource

create a new method return message

msgError :: ErrorName -> Serial -> Body -> MessageSource

create a new error message

msgSignal :: ObjectPath -> Interface -> Member -> Body -> MessageSource

create a new signal message

read a message body

readBody :: Message -> BodySource

read message's body using the signature field as reference

readBodyWith :: Message -> Signature -> BodySource

read message's body with a defined signature

from Signature module

type Signature = [SignatureElem]Source

A list of signature element

from Type module

type ObjectPath = ByteStringSource

DBus ObjectPath