Safe Haskell | None |
---|
- data DBusHandle
- authenticate :: ByteString -> DBusContext ()
- authenticateUID :: Int -> DBusContext ()
- connectSession :: IO DBusHandle
- connectSystem :: IO DBusHandle
- connectHandle :: Handle -> IO DBusHandle
- withContext :: IO DBusHandle -> DBusContext a -> IO a
- withSession :: DBusContext a -> IO a
- withSystem :: DBusContext a -> IO a
- messageSend :: Message -> DBusContext Serial
- messageRecv :: DBusContext Message
- data MessageType
- data MessageFlag
- data Field
- = FieldPath ObjectPath
- | FieldInterface Interface
- | FieldMember Member
- | FieldErrorName ErrorName
- | FieldReplySerial Serial
- | FieldDestination BusName
- | FieldSender ByteString
- | FieldSignature Signature
- | FieldUnixFds Word32
- data Message = Message {
- msgEndian :: DbusEndian
- msgType :: !MessageType
- msgVersion :: !Int
- msgFlags :: !Int
- msgSerial :: !Serial
- msgFields :: [Field]
- msgBody :: ByteString
- type Serial = Word32
- msgMethodCall :: BusName -> ObjectPath -> Interface -> Member -> Body -> Message
- msgMethodReturn :: Serial -> Body -> Message
- msgError :: ErrorName -> Serial -> Body -> Message
- msgSignal :: ObjectPath -> Interface -> Member -> Body -> Message
- readBody :: Message -> Body
- readBodyWith :: Message -> Signature -> Body
- data SignatureElem
- = SigByte
- | SigBool
- | SigInt16
- | SigUInt16
- | SigInt32
- | SigUInt32
- | SigInt64
- | SigUInt64
- | SigDouble
- | SigString
- | SigObjectPath
- | SigSignature
- | SigArray SignatureElem
- | SigStruct [SignatureElem]
- | SigVariant
- | SigDict SignatureElem SignatureElem
- | SigUnixFD
- type Signature = [SignatureElem]
- type ObjectPath = ByteString
- data DbusType
- = DbusByte Word8
- | DbusBoolean Bool
- | DbusInt16 Int16
- | DbusUInt16 Word16
- | DbusInt32 Int32
- | DbusUInt32 Word32
- | DbusInt64 Int64
- | DbusUInt64 Word64
- | DbusDouble Double
- | DbusString ByteString
- | DbusObjectPath ObjectPath
- | DbusSignature Signature
- | DbusArray SignatureElem [DbusType]
- | DbusStruct Signature [DbusType]
- | DbusDict DbusType DbusType
- | DbusVariant DbusType
- | DbusUnixFD Word32
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 MessageType Source
dbus message types
data MessageFlag Source
dbus message flags
FieldPath ObjectPath | |
FieldInterface Interface | |
FieldMember Member | |
FieldErrorName ErrorName | |
FieldReplySerial Serial | |
FieldDestination BusName | |
FieldSender ByteString | |
FieldSignature Signature | |
FieldUnixFds Word32 |
Message | |
|
msgMethodCall :: BusName -> ObjectPath -> Interface -> Member -> Body -> MessageSource
create a new method call message
msgMethodReturn :: Serial -> Body -> MessageSource
create a new method return message
msgSignal :: ObjectPath -> Interface -> Member -> Body -> MessageSource
create a new signal message
read a message body
readBodyWith :: Message -> Signature -> BodySource
read message's body with a defined signature
from Signature module
data SignatureElem Source
One possible signature element
type Signature = [SignatureElem]Source
A list of signature element
from Type module
type ObjectPath = ByteStringSource
DBus ObjectPath
Dbus Types