summaryrefslogtreecommitdiff
path: root/indra/newview/lllogchat.h
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2013-07-09 15:13:38 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2013-07-09 15:13:38 +0300
commit13361137d0d2ccb750d6002826763579d3d1cc69 (patch)
tree8d890c7ca94e8ec00c2bf6aa54e7bf3e7b4cf75c /indra/newview/lllogchat.h
parentaa9282be1fca61445c49a91c7ad512bd6b561bf6 (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-xindra/newview/lllogchat.h21
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");