diff options
Diffstat (limited to 'indra/llui/llnotificationtemplate.h')
-rw-r--r-- | indra/llui/llnotificationtemplate.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index b3b0bae862..9434efe1b9 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -61,6 +61,18 @@ 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("replace_with_new", LLNotification::REPLACE_WITH_NEW); + declare("keep_old", LLNotification::KEEP_OLD); + declare("cancel_old", LLNotification::CANCEL_OLD); + } + }; + + struct GlobalString : public LLInitParam::Block<GlobalString> { Mandatory<std::string> name, @@ -94,9 +106,11 @@ struct LLNotificationTemplate Optional<LLInitParam::Flag> dummy_val; public: Multiple<UniquenessContext> contexts; + Optional<LLNotification::ECombineBehavior, CombineBehaviorNames> combine; UniquenessConstraint() : contexts("context"), + combine("combine", LLNotification::REPLACE_WITH_NEW), dummy_val("") {} }; @@ -183,7 +197,10 @@ struct LLNotificationTemplate struct Params : public LLInitParam::Block<Params> { Mandatory<std::string> name; - Optional<bool> persist; + Optional<bool> persist, + log_to_im, + show_toast, + log_to_chat; Optional<std::string> functor, icon, label, @@ -204,6 +221,9 @@ struct LLNotificationTemplate Params() : name("name"), persist("persist", false), + log_to_im("log_to_im", false), + show_toast("show_toast", true), + log_to_chat("log_to_chat", true), functor("functor"), icon("icon"), label("label"), @@ -262,6 +282,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 @@ -308,6 +329,11 @@ 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; + bool mShowToast; }; #endif //LL_LLNOTIFICATION_TEMPLATE_H |