dbus-core-0.8.5.2: Low-level D-Bus protocol implementation

DBus.MatchRule

Synopsis

Documentation

data MatchRule Source

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.

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.

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.

formatRule :: MatchRule -> TextSource

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

addMatch :: MatchRule -> MethodCallSource

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

matchAll :: MatchRuleSource

An empty match rule, which matches everything.

matches :: MatchRule -> ReceivedMessage -> BoolSource

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