diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-07-09 15:13:38 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-07-09 15:13:38 +0300 |
commit | 13361137d0d2ccb750d6002826763579d3d1cc69 (patch) | |
tree | 8d890c7ca94e8ec00c2bf6aa54e7bf3e7b4cf75c /indra/newview/lllogchat.h | |
parent | aa9282be1fca61445c49a91c7ad512bd6b561bf6 (diff) |
CHUI-978 FIXED Load data from chat log file in separate thread to prevent viewer freeze
Diffstat (limited to 'indra/newview/lllogchat.h')
-rwxr-xr-x | indra/newview/lllogchat.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index bd70dbaac9..acee99afa2 100755 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -28,6 +28,24 @@ #define LL_LLLOGCHAT_H class LLChat; +class LLLoadHistoryThread : public LLThread +{ +private: + std::string mFileName; + std::list<LLSD> mMessages; + LLSD mLoadParams; + bool mNewLoad; +public: + LLLoadHistoryThread(); + + void setHistoryParams(const std::string& file_name, const LLSD& load_params); + virtual void loadHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params); + virtual void run(); + + typedef boost::signals2::signal<void (std::list<LLSD>& messages,const std::string& file_name)> load_end_signal_t; + static load_end_signal_t * mLoadEndSignal; + static boost::signals2::connection setLoadEndSignal(const load_end_signal_t::slot_type& cb); +}; class LLLogChat { @@ -39,6 +57,7 @@ public: LOG_LLSD, LOG_END }; + static std::string timestamp(bool withdate = false); static std::string makeLogFileName(std::string(filename)); /** @@ -54,6 +73,7 @@ public: static void getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions); static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD()); + static void startChatHistoryThread(const std::string& file_name, const LLSD& load_params); typedef boost::signals2::signal<void ()> save_history_signal_t; static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb); @@ -127,6 +147,7 @@ protected: virtual ~LLChatLogParser() {}; }; + // LLSD map lookup constants extern const std::string LL_IM_TIME; //("time"); extern const std::string LL_IM_TEXT; //("message"); |