Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
DBus.Internal.Message
Synopsis
- class Message a where
- messageTypeCode :: a -> Word8
- messageHeaderFields :: a -> [HeaderField]
- messageBody :: a -> [Variant]
- messageFlags :: a -> Word8
- data UnknownMessage = UnknownMessage {
- unknownMessageType :: Word8
- unknownMessageSender :: Maybe BusName
- unknownMessageBody :: [Variant]
- data MethodCall = MethodCall {
- methodCallPath :: ObjectPath
- methodCallInterface :: Maybe InterfaceName
- methodCallMember :: MemberName
- methodCallSender :: Maybe BusName
- methodCallDestination :: Maybe BusName
- methodCallReplyExpected :: Bool
- methodCallAutoStart :: Bool
- methodCallBody :: [Variant]
- data MethodReturn = MethodReturn {
- methodReturnSerial :: Serial
- methodReturnSender :: Maybe BusName
- methodReturnDestination :: Maybe BusName
- methodReturnBody :: [Variant]
- data MethodError = MethodError {
- methodErrorName :: ErrorName
- methodErrorSerial :: Serial
- methodErrorSender :: Maybe BusName
- methodErrorDestination :: Maybe BusName
- methodErrorBody :: [Variant]
- methodErrorMessage :: MethodError -> String
- data Signal = Signal {
- signalPath :: ObjectPath
- signalInterface :: InterfaceName
- signalMember :: MemberName
- signalSender :: Maybe BusName
- signalDestination :: Maybe BusName
- signalBody :: [Variant]
- data ReceivedMessage
- data HeaderField
- setMethodCallFlags :: MethodCall -> Word8 -> MethodCall
Documentation
class Message a where Source #
Minimal complete definition
Methods
messageTypeCode :: a -> Word8 Source #
messageHeaderFields :: a -> [HeaderField] Source #
messageBody :: a -> [Variant] Source #
messageFlags :: a -> Word8 Source #
Instances
data UnknownMessage Source #
Constructors
UnknownMessage | |
Fields
|
Instances
Show UnknownMessage Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> UnknownMessage -> ShowS show :: UnknownMessage -> String showList :: [UnknownMessage] -> ShowS | |
Eq UnknownMessage Source # | |
Defined in DBus.Internal.Message Methods (==) :: UnknownMessage -> UnknownMessage -> Bool (/=) :: UnknownMessage -> UnknownMessage -> Bool |
data MethodCall Source #
A method call is a request to run some procedure exported by the remote process. Procedures are identified by an (object_path, interface_name, method_name) tuple.
Constructors
MethodCall | |
Fields
|
Instances
Show MethodCall Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> MethodCall -> ShowS show :: MethodCall -> String showList :: [MethodCall] -> ShowS | |
Message MethodCall Source # | |
Defined in DBus.Internal.Message Methods messageTypeCode :: MethodCall -> Word8 Source # messageHeaderFields :: MethodCall -> [HeaderField] Source # messageBody :: MethodCall -> [Variant] Source # messageFlags :: MethodCall -> Word8 Source # | |
Eq MethodCall Source # | |
Defined in DBus.Internal.Message |
data MethodReturn Source #
A method return is a reply to a method call, indicating that the call succeeded.
Constructors
MethodReturn | |
Fields
|
Instances
Show MethodReturn Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> MethodReturn -> ShowS show :: MethodReturn -> String showList :: [MethodReturn] -> ShowS | |
Message MethodReturn Source # | |
Defined in DBus.Internal.Message Methods messageTypeCode :: MethodReturn -> Word8 Source # messageHeaderFields :: MethodReturn -> [HeaderField] Source # messageBody :: MethodReturn -> [Variant] Source # messageFlags :: MethodReturn -> Word8 Source # | |
Eq MethodReturn Source # | |
Defined in DBus.Internal.Message |
data MethodError Source #
A method error is a reply to a method call, indicating that the call received an error and did not succeed.
Constructors
MethodError | |
Fields
|
Instances
Show MethodError Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> MethodError -> ShowS show :: MethodError -> String showList :: [MethodError] -> ShowS | |
Message MethodError Source # | |
Defined in DBus.Internal.Message Methods messageTypeCode :: MethodError -> Word8 Source # messageHeaderFields :: MethodError -> [HeaderField] Source # messageBody :: MethodError -> [Variant] Source # messageFlags :: MethodError -> Word8 Source # | |
Eq MethodError Source # | |
Defined in DBus.Internal.Message |
methodErrorMessage :: MethodError -> String Source #
Get a human-readable description of the error, by returning the first item in the error body if it's a string.
Signals are broadcast by applications to notify other clients of some event.
Constructors
Signal | |
Fields
|
Instances
Show Signal Source # | |
Message Signal Source # | |
Defined in DBus.Internal.Message Methods messageTypeCode :: Signal -> Word8 Source # messageHeaderFields :: Signal -> [HeaderField] Source # messageBody :: Signal -> [Variant] Source # messageFlags :: Signal -> Word8 Source # | |
Eq Signal Source # | |
data ReceivedMessage Source #
Not an actual message type, but a wrapper around messages received from
the bus. Each value contains the message's Serial
.
If casing against these constructors, always include a default case to handle messages of an unknown type. New message types may be added to the D-Bus specification, and applications should handle them gracefully by either ignoring or logging them.
Constructors
ReceivedMethodCall Serial MethodCall | |
ReceivedMethodReturn Serial MethodReturn | |
ReceivedMethodError Serial MethodError | |
ReceivedSignal Serial Signal | |
ReceivedUnknown Serial UnknownMessage |
Instances
Show ReceivedMessage Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> ReceivedMessage -> ShowS show :: ReceivedMessage -> String showList :: [ReceivedMessage] -> ShowS | |
Eq ReceivedMessage Source # | |
Defined in DBus.Internal.Message Methods (==) :: ReceivedMessage -> ReceivedMessage -> Bool (/=) :: ReceivedMessage -> ReceivedMessage -> Bool |
data HeaderField Source #
Constructors
Instances
Show HeaderField Source # | |
Defined in DBus.Internal.Message Methods showsPrec :: Int -> HeaderField -> ShowS show :: HeaderField -> String showList :: [HeaderField] -> ShowS | |
Eq HeaderField Source # | |
Defined in DBus.Internal.Message |
setMethodCallFlags :: MethodCall -> Word8 -> MethodCall Source #