From 7424c3499f1cfafabfca49710e757eb43813f65e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 19 Jul 2017 15:53:17 +0100 Subject: Add send_broadcast as an attribute of and elements only matches broadcasts, which are signals with a NULL destination. There was previously no way for the policy language to express "NULL destination", only "any destination". only matches non-broadcasts, which are non-signals or signals with a non-NULL destination. There was previously no way for the policy language to express "any non-NULL destination", only "any destination". Reviewed-by: Philip Withnall [smcv: improved documentation as per Philip's review] Signed-off-by: Simon McVittie Reviewed-by: Thiago Macieira Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92853 --- bus/policy.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bus/policy.h') diff --git a/bus/policy.h b/bus/policy.h index d1d3e72b..c5275a7b 100644 --- a/bus/policy.h +++ b/bus/policy.h @@ -39,6 +39,13 @@ typedef enum BUS_POLICY_RULE_GROUP } BusPolicyRuleType; +typedef enum +{ + BUS_POLICY_TRISTATE_ANY = 0, + BUS_POLICY_TRISTATE_FALSE, + BUS_POLICY_TRISTATE_TRUE +} BusPolicyTristate; + /** determines whether the rule affects a connection, or some global item */ #define BUS_POLICY_RULE_IS_PER_CLIENT(rule) (!((rule)->type == BUS_POLICY_RULE_USER || \ (rule)->type == BUS_POLICY_RULE_GROUP)) @@ -66,6 +73,7 @@ struct BusPolicyRule unsigned int eavesdrop : 1; unsigned int requested_reply : 1; unsigned int log : 1; + unsigned int broadcast : 2; /**< really a BusPolicyTristate */ } send; struct -- cgit v1.2.1