2015-03-24 14:29:27 +00:00
|
|
|
#ifndef FILEUPDATER_H
|
|
|
|
#define FILEUPDATER_H
|
|
|
|
|
|
|
|
#ifndef Sleep
|
|
|
|
#define Sleep(msecs) usleep((msecs)*1000)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <fstream>
|
2015-03-25 14:29:08 +00:00
|
|
|
#include <mutex>
|
|
|
|
#include <condition_variable>
|
2015-03-24 14:29:27 +00:00
|
|
|
#include "externData.h"
|
|
|
|
#include "externFunctions.h"
|
|
|
|
|
|
|
|
class FileUpdater {
|
|
|
|
public:
|
|
|
|
static long oldNegLstSize;
|
|
|
|
static long oldLoginLstSize;
|
|
|
|
static long oldPassLstSize;
|
|
|
|
static long oldSSHLstSize;
|
|
|
|
static long oldWFLoginLstSize;
|
|
|
|
static long oldWFPassLstSize;
|
2015-03-25 14:29:08 +00:00
|
|
|
static bool ready;
|
|
|
|
static std::condition_variable cv;
|
|
|
|
static std::mutex filesUpdatingMutex;
|
|
|
|
static std::unique_lock<std::mutex> lk;
|
2015-03-24 14:29:27 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
static int updateLists();
|
2015-03-27 13:38:53 +00:00
|
|
|
static int loadOnce();
|
|
|
|
static void FUClear();
|
2015-03-24 14:29:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FILEUPDATER_H
|