module OBus_match:sig..end
type argument_filter =
| |
AF_string of |
(* | AF_string str matches any string argument which is equal
to str | *) |
| |
AF_string_path of |
(* | AF_string_path path matches any string or object-path
argument arg such that one of the following conditions
hold:
| *) |
| |
AF_namespace of |
(* | AF_namespace namespace matches any string argument arg
such that arg is bus or interface name in the namespace of
namespace. For example AF_namespace "a.b.c" matches any
string of the form "a.b.c", "a.b.c.foo",
"a.b.c.foo.bar", ... | *) |
typearguments = private(int * argument_filter) list
0..63..val make_arguments : (int * argument_filter) list -> argumentsInvalid_argument if one of the argument filters use a number
outside of the range 1..63val cast_arguments : arguments -> (int * argument_filter) listtype rule = {
|
typ : |
|
sender : |
|
interface : |
|
member : |
|
path : |
|
destination : |
|
arguments : |
|
eavesdrop : |
val typ : rule ->
[ `Error | `Method_call | `Method_return | `Signal ] option
val sender : rule -> OBus_name.bus
val interface : rule -> OBus_name.interface
val member : rule -> OBus_name.member
val path : rule -> OBus_path.t option
val destination : rule -> OBus_name.bus
val arguments : rule -> arguments
val eavesdrop : rule -> bool optionval rule : ?typ:[ `Error | `Method_call | `Method_return | `Signal ] ->
?sender:OBus_name.bus ->
?interface:OBus_name.interface ->
?member:OBus_name.member ->
?path:OBus_path.t ->
?destination:OBus_name.bus ->
?arguments:arguments -> ?eavesdrop:bool -> unit -> ruleval match_message : rule -> OBus_message.t -> boolmatch_message rule message returns wether message is matched
by ruleval match_values : arguments -> OBus_value.V.sequence -> boolmatch_values filters values returns whether values are
matched by the given list of argument filters.type comparison_result =
| |
More_general |
(* | r1 is more general than r2, i.e. any message matched by
r2 is also matched by r1 | *) |
| |
Less_general |
(* | r1 is less general than r2, i.e. any message matched by
r1 is also matched by r2 | *) |
| |
Equal |
(* | r1 and r2 are equal | *) |
| |
Incomparable |
(* | r1 and r2 are incomparable, i.e. there exists two
message m1 and m2 such that:
| *) |
r1 and r2:val compare_rules : rule -> rule -> comparison_resultcompare_rules r1 r2 compares the two matching rules r1 and
r2exception Parse_failure of string * int * string
Parse_failure(string, position, reason) is raised when parsing
a rule failedval string_of_rule : rule -> stringval rule_of_string : string -> ruleFailure if the given string does not contain a valid
matching rule.val export : ?switch:Lwt_switch.t -> OBus_connection.t -> rule -> unit Lwt.texport ?switch connection rule registers rule on the message
bus. If another rule more general than rule is already
exported, then it does nothihng.
You can provide a switch to manually disable the export.