dbus-core-0.8.4: Low-level D-Bus protocol implementationSource codeContentsIndex
DBus.MatchRule
Synopsis
data MatchRule = MatchRule {
matchType :: Maybe MessageType
matchSender :: Maybe BusName
matchInterface :: Maybe InterfaceName
matchMember :: Maybe MemberName
matchPath :: Maybe ObjectPath
matchDestination :: Maybe BusName
matchParameters :: [ParameterValue]
}
data MessageType
= MethodCall
| MethodReturn
| Signal
| Error
data ParameterValue
= StringValue Word8 Text
| PathValue Word8 ObjectPath
formatRule :: MatchRule -> Text
addMatch :: MatchRule -> MethodCall
matchAll :: MatchRule
matches :: MatchRule -> ReceivedMessage -> Bool
Documentation
data MatchRule Source

Format a MatchRule as the bus expects to receive in a call to AddMatch.

Build a MethodCall for adding a match rule to the bus.

An empty match rule, which matches everything.

Whether a ReceivedMessage matches a given rule. This is useful for implementing signal handlers.

A match rule is a set of filters; most filters may have one possible value assigned, such as a single message type. The exception are parameter filters, which are limited in number only by the server implementation.

Constructors
MatchRule
matchType :: Maybe MessageType
matchSender :: Maybe BusName
matchInterface :: Maybe InterfaceName
matchMember :: Maybe MemberName
matchPath :: Maybe ObjectPath
matchDestination :: Maybe BusName
matchParameters :: [ParameterValue]
show/hide Instances
data MessageType Source
The set of allowed message types to filter on is separate from the set supported for sending over the wire. This allows the server to support additional types not yet implemented in the library, or vice-versa.
Constructors
MethodCall
MethodReturn
Signal
Error
show/hide Instances
data ParameterValue Source

Parameters may match against two types, strings and object paths. It's probably an error to have two values for the same parameter.

The constructor StringValue 3 "hello" means that the fourth parameter in the message body must be the string "hello". PathValue is the same, but its value must be an object path.

Constructors
StringValue Word8 Text
PathValue Word8 ObjectPath
show/hide Instances
formatRule :: MatchRule -> TextSource
addMatch :: MatchRule -> MethodCallSource
matchAll :: MatchRuleSource
matches :: MatchRule -> ReceivedMessage -> BoolSource
Produced by Haddock version 2.6.1