summaryrefslogtreecommitdiff
path: root/indra/newview/lllogininstance.cpp
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-07-24 15:08:16 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-07-24 15:08:16 -0700
commit9538328d5f7cf0f0be5dd77b8e27032e09104fff (patch)
tree7592050ae6c8854284f5961558249985e3abec82 /indra/newview/lllogininstance.cpp
parentdb7f15df68cda2850c3d8a7ffcc59fc136de6f95 (diff)
Adding LLLoginInstance unit test.
- Added LLNotificationsInterface class. - Removed LLLoginInstance use of LLNotifications EventAPI
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r--indra/newview/lllogininstance.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index bf42129fc1..c08cc2baae 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -59,6 +59,7 @@ std::string construct_start_string();
LLLoginInstance::LLLoginInstance() :
mLoginModule(new LLLogin()),
+ mNotifications(NULL),
mLoginState("offline"),
mUserInteraction(true),
mSkipOptionalUpdate(false),
@@ -345,10 +346,13 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
#endif
}
- // *NOTE:Mani - for reference
-// LLNotifications::instance().add(notification_name, args, payload,
-// boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+ if(mNotifications)
+ {
+ mNotifications->add(notification_name, args, payload,
+ boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+ }
+ /* *NOTE:Mani Experiment with Event API interface.
if(!mUpdateAppResponse)
{
bool make_unique = true;
@@ -368,12 +372,11 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
event["reply"] = mUpdateAppResponse->getName();
LLEventPumps::getInstance()->obtain("LLNotifications").post(event);
+ */
}
-bool LLLoginInstance::updateDialogCallback(const LLSD& event)
+bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response)
{
- LLSD notification = event["notification"];
- LLSD response = event["response"];
S32 option = LLNotification::getSelectedOption(notification, response);
std::string update_exe_path;
bool mandatory = notification["payload"]["mandatory"].asBoolean();