Namespace l2dbus.Match

L2DBUS Match

This section defines the data structures associated with the representation of a match rule.

Tables

MatchRule The table that describes keys/fields for matching a message.
FilterArgs The table that describes matches on the N'th argument of the body of a message.


Tables

MatchRule
The table that describes keys/fields for matching a message. Excluding a field indicates a wildcard match while including a field narrows the scope of a match (e.g. makes it more inclusive).

Fields:

  • msgType (number) The type of the D-Bus message to match. Possible options include:
  • member (string) Matches messages with a particular signal or member name
  • objInterface (string) Matches messages sent over or to a particular object interface
  • sender (string) Matches messages sent by a particular sender.
  • path (string) Matches messages which are sent from or to the given object. This can be treated as an object path or namespace depending on how treatPathAsNamespace is configured.
  • treatPathAsNamespace (bool) An optional value that determines how to interpret the path field. If true then the path is treated as a Java-like namespace. If false (the default) then treat path as an object path.
  • arg0Namespace (string) Matches messages whose first argument is a string and is a bus name or interface name within the specified namespace. This is primarily intended for watching name owner changes for a group of related bus names, rather than for signal name or all name changes.
  • eavesdrop (bool) Since D-Bus 1.5.6, match rules do not match messages which have a DESTINATION field unless the match rule specifically requests this by specifying eavesdrop as true in the match rule. Setting eavesdrop as false restores the default behavior. Messages are delivered to their DESTINATION regardless of match rules, so this match does not affect normal delivery of unicast messages. If the message bus has a security policy which forbids eavesdropping, this match may still be used without error, but will not have any practical effect. In older versions of D-Bus, this match was not allowed in match rules, and all match rules behaved as if eavesdrop equals true had been used.
  • filterArgs (array) A Lua array of argN filter arguments.
FilterArgs
The table that describes matches on the N'th argument of the body of a message. Only arguments of D-Bus type string or object path can be matched depending on how the argument is interpreted. At most 64 filter arguments can be specified.

Fields:

  • type (string) Possible values are string or path depending on how the match should be interpreted. If not specified then string is the default.
  • index (number) The argument index [0, 63].
  • value (string) The D-Bus string or object path.
generated by LDoc 1.3