增加手动移出白名单
连续连接移出白名单
This commit is contained in:
筱傑
2019-01-12 10:40:27 +08:00
committed by GitHub
parent a4379453a9
commit 6a70501baa
24 changed files with 2299 additions and 0 deletions

41
dal.h Normal file
View File

@@ -0,0 +1,41 @@
#ifndef DAL_H
#define DAL_H
#include <QList>
#include <QString>
#include "model.h"
class DAL
{
public:
static DAL &instance()
{
static DAL obj;
return obj;
}
bool updateWhiteList(int id, QDateTime lastUpdateTime);
/**
* @brief 更新白名单用户
* @param ip地址
* @param 端口列表
* @return 是否成功
*/
bool updateWhiteList(QString ip, QList<int> portList);
QList<WhiteListItem> getWhiteList(QString ip);
void removeFromWhiteList(QString ip, QList<int> ports);
bool isExistsBlackList(int port);
bool isExistsBlackList(QString ip);
bool addItemToBlackList(int port);
bool addItemToBlackList(QString ip, int port);
QString getPortList();
void setPortList(QString portList);
private:
DAL();
};
#endif // DAL_H