summaryrefslogtreecommitdiff
path: root/indra/llui/llnotificationvisibilityrule.h
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-09-28 16:49:22 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-09-28 16:49:22 -0700
commitff071bbdce6478f8cd666ecf75658ca6e24f1140 (patch)
tree918fb32f419150709884d921f5903855681594a7 /indra/llui/llnotificationvisibilityrule.h
parent594a115c92a84c90d1dbcc393b2ee7a189644f5f (diff)
Added a mechanism for preventing classes of notifications from being displayed, controlled by the notification_visibility.xml file in the viewer skin.
Reviewed by Richard.
Diffstat (limited to 'indra/llui/llnotificationvisibilityrule.h')
-rw-r--r--indra/llui/llnotificationvisibilityrule.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/indra/llui/llnotificationvisibilityrule.h b/indra/llui/llnotificationvisibilityrule.h
new file mode 100644
index 0000000000..a98591c9d6
--- /dev/null
+++ b/indra/llui/llnotificationvisibilityrule.h
@@ -0,0 +1,76 @@
+/**
+* @file llnotificationvisibility.h
+* @brief Rules for
+* @author Monroe
+*
+* $LicenseInfo:firstyear=2010&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2010, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLNOTIFICATION_VISIBILITY_RULE_H
+#define LL_LLNOTIFICATION_VISIBILITY_RULE_H
+
+#include "llinitparam.h"
+//#include "llnotifications.h"
+
+
+
+// This is the class of object read from the XML file (notification_visibility.xml,
+// from the appropriate local language directory).
+struct LLNotificationVisibilityRule
+{
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<bool> visible;
+ Optional<std::string> type;
+ Optional<std::string> tag;
+
+ Params()
+ : visible("visible"),
+ type("type"),
+ tag("tag")
+ {}
+ };
+
+
+ struct Rules : public LLInitParam::Block<Rules>
+ {
+ Multiple<Params> rules;
+
+ Rules()
+ : rules("rule")
+ {}
+ };
+
+ LLNotificationVisibilityRule(const Params& p);
+
+ // If true, this rule makes matching notifications visible. Otherwise, it makes them invisible.
+ bool mVisible;
+
+ // String to match against the notification's "type". An empty string matches all notifications.
+ std::string mType;
+
+ // String to match against the notification's tag(s). An empty string matches all notifications.
+ std::string mTag;
+};
+
+#endif //LL_LLNOTIFICATION_VISIBILITY_RULE_H
+