Files
Sourcetrail/src/lib/ApplicationStateMonitor.h
T
malte_langkabel 9084d3bd7c ui: added info screen for indexer crash investigation
* in case Coati crashes while indexing this screen will inform the user of further steps to take in order to find out what happened
2016-11-21 12:36:42 +01:00

31 lines
692 B
C++

#ifndef APPLICATION_STATE_MONITOR_H
#define APPLICATION_STATE_MONITOR_H
#include <mutex>
#include <set>
#include "utility/file/FilePath.h"
class ApplicationStateMonitor
{
public:
static std::shared_ptr<ApplicationStateMonitor> getInstance();
static std::vector<FilePath> getStoredIndexingFiles();
static void clearStoredIndexingFiles();
void clearIndexingFiles();
void addIndexingFile(FilePath file);
void removeIndexingFile(FilePath file);
private:
static std::shared_ptr<ApplicationStateMonitor> s_instance;
ApplicationStateMonitor();
void storeCurrentState();
std::set<FilePath> m_indexingFiles;
std::mutex m_indexingFilesMutex;
};
#endif // APPLICATION_STATE_MONITOR_H