summaryrefslogtreecommitdiff
path: root/indra/llui/llnotificationvisibilityrule.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llnotificationvisibilityrule.h')
-rw-r--r--indra/llui/llnotificationvisibilityrule.h45
1 files changed, 31 insertions, 14 deletions
diff --git a/indra/llui/llnotificationvisibilityrule.h b/indra/llui/llnotificationvisibilityrule.h
index 58a7eb6176..78bdec2a8f 100644
--- a/indra/llui/llnotificationvisibilityrule.h
+++ b/indra/llui/llnotificationvisibilityrule.h
@@ -37,34 +37,51 @@
// from the appropriate local language directory).
struct LLNotificationVisibilityRule
{
- struct Params : public LLInitParam::Block<Params>
+ struct Filter : public LLInitParam::Block<Filter>
{
- Mandatory<bool> visible;
- Optional<std::string> response;
- Optional<std::string> type;
- Optional<std::string> tag;
- Optional<std::string> name;
-
- Params()
- : visible("visible"),
- response("response"),
- type("type"),
+ Optional<std::string> type,
+ tag,
+ name;
+
+ Filter()
+ : type("type"),
tag("tag"),
name("name")
{}
};
+ struct Respond : public LLInitParam::Block<Respond, Filter>
+ {
+ Mandatory<std::string> response;
+
+ Respond()
+ : response("response")
+ {}
+ };
+
+ struct Rule : public LLInitParam::Choice<Rule>
+ {
+ Alternative<Filter> show;
+ Alternative<Filter> hide;
+ Alternative<Respond> respond;
+
+ Rule()
+ : show("show"),
+ hide("hide"),
+ respond("respond")
+ {}
+ };
struct Rules : public LLInitParam::Block<Rules>
{
- Multiple<Params> rules;
+ Multiple<Rule> rules;
Rules()
- : rules("rule")
+ : rules("")
{}
};
- LLNotificationVisibilityRule(const Params& p);
+ LLNotificationVisibilityRule(const Rule& p);
// If true, this rule makes matching notifications visible. Otherwise, it makes them invisible.
bool mVisible;