summaryrefslogtreecommitdiff
path: root/indra/llui/llnotifications.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/llnotifications.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/llnotifications.h')
-rw-r--r--indra/llui/llnotifications.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 4fe1687f0e..75c67151ca 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -268,6 +268,11 @@ struct LLNotificationTemplate;
// with smart pointers
typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
+
+struct LLNotificationVisibilityRule;
+
+typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr;
+
/**
* @class LLNotification
* @brief The object that expresses the details of a notification
@@ -856,6 +861,10 @@ public:
// load notification descriptions from file;
// OK to call more than once because it will reload
bool loadTemplates();
+
+ // load visibility rules from file;
+ // OK to call more than once because it will reload
+ bool loadVisibilityRules();
// Add a simple notification (from XUI)
void addFromCallback(const LLSD& name);
@@ -902,6 +911,8 @@ public:
// test for existence
bool templateExists(const std::string& name);
+ typedef std::list<LLNotificationVisibilityRulePtr> VisibilityRuleList;
+
void forceResponse(const LLNotification::Params& params, S32 option);
void createDefaultChannels();
@@ -916,7 +927,9 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
-
+
+ bool isVisibleByRules(LLNotificationPtr pNotification);
+
private:
// we're a singleton, so we don't have a public constructor
LLNotifications();
@@ -935,6 +948,8 @@ private:
// put your template in
bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
TemplateMap mTemplates;
+
+ VisibilityRuleList mVisibilityRules;
std::string mFileName;