use UserDBentry from findWithName() to writeDMR(), add writeDMREx()

This commit is contained in:
SASANO Takayoshi 2020-03-08 08:06:27 +09:00
parent abf17e19fc
commit 4ff77c50d6
5 changed files with 58 additions and 30 deletions

View file

@ -20,10 +20,9 @@
#define DMRLookup_H
#include "Thread.h"
#include "Mutex.h"
#include "UserDB.h"
#include <string>
#include <unordered_map>
class CDMRLookup : public CThread {
public:
@ -35,20 +34,17 @@ public:
virtual void entry();
std::string find(unsigned int id);
std::string findWithName(unsigned int id);
void findWithName(unsigned int id, class CUserDBentry *entry);
bool exists(unsigned int id);
void stop();
private:
std::string m_filename;
unsigned int m_reloadTime;
std::unordered_map<unsigned int, std::string> m_table;
CMutex m_mutex;
bool m_stop;
bool load();
std::string m_filename;
unsigned int m_reloadTime;
class CUserDB m_table;
bool m_stop;
};
#endif