* in case Coati crashes while indexing this screen will inform the user of further steps to take in order to find out what happened
31 lines
692 B
C++
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
|