diff options
author | Rider Linden <rider@lindenlab.com> | 2015-08-26 15:50:15 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-08-26 15:50:15 -0700 |
commit | a455759e643ef3b285f8fa38d2a7c9db74605c44 (patch) | |
tree | c1a57819bad14c755632a5e1376ac9a1de08dfe0 /indra/newview/llfloaterexperiences.h | |
parent | 7e1efcd47423e66e3262dff137c793d9ef690a1b (diff) |
Convert exp floater to use coroutines
Convert script queue compilation exp request
Diffstat (limited to 'indra/newview/llfloaterexperiences.h')
-rw-r--r-- | indra/newview/llfloaterexperiences.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h index 769283ff07..c038aa6375 100644 --- a/indra/newview/llfloaterexperiences.h +++ b/indra/newview/llfloaterexperiences.h @@ -28,6 +28,7 @@ #define LL_LLFLOATEREXPERIENCES_H #include "llfloater.h" +#include "llcorehttputil.h" class LLPanelExperiences; @@ -41,6 +42,9 @@ public: virtual void onOpen(const LLSD& key); static LLFloaterExperiences* findInstance(); protected: + typedef std::map<std::string, std::string> NameMap_t; + typedef boost::function<void(LLPanelExperiences*, const LLSD&)> Callback_t; + void clearFromRecent(const LLSD& ids); void resizeToTabs(); /*virtual*/ BOOL postBuild(); @@ -49,11 +53,22 @@ protected: LLPanelExperiences* addTab(const std::string& name, bool select); bool updatePermissions(const LLSD& permission); - void sendPurchaseRequest() const; + void sendPurchaseRequest(); void checkPurchaseInfo(LLPanelExperiences* panel, const LLSD& content)const; void updateInfo(std::string experiences, std::string tab); + void retrieveExperienceList(const std::string &url, const LLHandle<LLFloaterExperiences> &hparent, const NameMap_t &tabMapping, + const std::string &errorNotify = std::string("ErrorMessage"), Callback_t cback = Callback_t()); + + void requestNewExperience(const std::string &url, const LLHandle<LLFloaterExperiences> &hparent, const NameMap_t &tabMapping, + const std::string &errorNotify, Callback_t cback); + private: + typedef boost::function < LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t, + const std::string, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t; + + static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent, + NameMap_t tabMapping, std::string errorNotify, Callback_t cback, invokationFn_t invoker); }; |