summaryrefslogtreecommitdiff
path: root/indra/newview/lllogchat.h
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-16 20:32:25 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-16 20:32:25 +0300
commit0ea0b980848d69aee1f9aee9cc360abc61dc1eec (patch)
tree8d2c054f8951840c31dab3a448bcc3e6fcc213ed /indra/newview/lllogchat.h
parent37eb735ba7579a68bba45003935998ce67d871af (diff)
DRTVWR-493 LLLogChat to singleton
Diffstat (limited to 'indra/newview/lllogchat.h')
-rw-r--r--indra/newview/lllogchat.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index fcbd38a044..b71a34ae0a 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -79,8 +79,10 @@ public:
static void deleteHistory();
};
-class LLLogChat
+class LLLogChat : public LLSingleton<LLLogChat>
{
+ LLSINGLETON(LLLogChat);
+ ~LLLogChat();
public:
// status values for callback function
enum ELogLineType {
@@ -107,7 +109,7 @@ public:
static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD());
typedef boost::signals2::signal<void ()> save_history_signal_t;
- static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb);
+ boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb);
static bool moveTranscripts(const std::string currentDirectory,
const std::string newDirectory,
@@ -123,21 +125,23 @@ public:
static bool isAdHocTranscriptExist(std::string file_name);
static bool isTranscriptFileFound(std::string fullname);
- static bool historyThreadsFinished(LLUUID session_id);
- static LLLoadHistoryThread* getLoadHistoryThread(LLUUID session_id);
- static LLDeleteHistoryThread* getDeleteHistoryThread(LLUUID session_id);
- static bool addLoadHistoryThread(LLUUID& session_id, LLLoadHistoryThread* lthread);
- static bool addDeleteHistoryThread(LLUUID& session_id, LLDeleteHistoryThread* dthread);
- static void cleanupHistoryThreads();
+ bool historyThreadsFinished(LLUUID session_id);
+ LLLoadHistoryThread* getLoadHistoryThread(LLUUID session_id);
+ LLDeleteHistoryThread* getDeleteHistoryThread(LLUUID session_id);
+ bool addLoadHistoryThread(LLUUID& session_id, LLLoadHistoryThread* lthread);
+ bool addDeleteHistoryThread(LLUUID& session_id, LLDeleteHistoryThread* dthread);
+ void cleanupHistoryThreads();
private:
static std::string cleanFileName(std::string filename);
- static save_history_signal_t * sSaveHistorySignal;
- static std::map<LLUUID,LLLoadHistoryThread *> sLoadHistoryThreads;
- static std::map<LLUUID,LLDeleteHistoryThread *> sDeleteHistoryThreads;
- static LLMutex* sHistoryThreadsMutex;
- static LLMutex* historyThreadsMutex();
+ LLMutex* historyThreadsMutex();
+ void triggerHistorySignal();
+
+ save_history_signal_t * mSaveHistorySignal;
+ std::map<LLUUID,LLLoadHistoryThread *> mLoadHistoryThreads;
+ std::map<LLUUID,LLDeleteHistoryThread *> mDeleteHistoryThreads;
+ LLMutex* mHistoryThreadsMutex;
};
/**