summaryrefslogtreecommitdiff
path: root/indra/llui/llnotificationtemplate.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llnotificationtemplate.h')
-rw-r--r--indra/llui/llnotificationtemplate.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index fb50c9c123..f7d08ae1f4 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -61,6 +61,17 @@ typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
// from the appropriate local language directory).
struct LLNotificationTemplate
{
+ struct CombineBehaviorNames
+ : public LLInitParam::TypeValuesHelper<LLNotification::ECombineBehavior, CombineBehaviorNames>
+ {
+ static void declareValues()
+ {
+ declare("newest", LLNotification::USE_NEWEST);
+ declare("oldest", LLNotification::USE_OLDEST);
+ }
+ };
+
+
struct GlobalString : public LLInitParam::Block<GlobalString>
{
Mandatory<std::string> name,
@@ -94,9 +105,11 @@ struct LLNotificationTemplate
Optional<LLInitParam::Flag> dummy_val;
public:
Multiple<UniquenessContext> contexts;
+ Optional<LLNotification::ECombineBehavior, CombineBehaviorNames> combine;
UniquenessConstraint()
: contexts("context"),
+ combine("combine", LLNotification::USE_NEWEST),
dummy_val("")
{}
};
@@ -170,7 +183,9 @@ struct LLNotificationTemplate
struct Params : public LLInitParam::Block<Params>
{
Mandatory<std::string> name;
- Optional<bool> persist;
+ Optional<bool> persist,
+ log_to_im,
+ log_to_chat;
Optional<std::string> functor,
icon,
label,
@@ -190,6 +205,8 @@ struct LLNotificationTemplate
Params()
: name("name"),
persist("persist", false),
+ log_to_im("log_to_im", false),
+ log_to_chat("log_to_chat", true),
functor("functor"),
icon("icon"),
label("label"),
@@ -245,6 +262,7 @@ struct LLNotificationTemplate
// (used for things like progress indications, or repeating warnings
// like "the grid is going down in N minutes")
bool mUnique;
+ LLNotification::ECombineBehavior mCombineBehavior;
// if we want to be unique only if a certain part of the payload or substitutions args
// are constant specify the field names for the payload. The notification will only be
// combined if all of the fields named in the context are identical in the
@@ -291,6 +309,10 @@ struct LLNotificationTemplate
LLUUID mSoundEffect;
// List of tags that rules can match against.
std::list<std::string> mTags;
+
+ // inject these notifications into chat/IM streams
+ bool mLogToChat;
+ bool mLogToIM;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H