mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Clean up TG rewrite code.
This commit is contained in:
@@ -18,13 +18,14 @@
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
|
||||
class DMRAccessControl {
|
||||
class CDMRAccessControl {
|
||||
public:
|
||||
static bool validateAccess (unsigned int src_id, unsigned int dst_id, unsigned int slot, bool network);
|
||||
static bool validateAccess(unsigned int srcId, unsigned int dstId, unsigned int slot, bool network);
|
||||
|
||||
static void init(const std::vector<unsigned int>& DstIdBlacklistSlot1RF, const std::vector<unsigned int>& DstIdWhitelistSlot1RF, const std::vector<unsigned int>& DstIdBlacklistSlot2RF, const std::vector<unsigned int>& DstIdWhitelistSlot2RF, const std::vector<unsigned int>& DstIdBlacklistSlot1NET, const std::vector<unsigned int>& DstIdWhitelistSlot1NET, const std::vector<unsigned int>& DstIdBlacklistSlot2NET, const std::vector<unsigned int>& DstIdWhitelistSlot2NET, const std::vector<unsigned int>& SrcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes,unsigned int id,unsigned int callHang, bool TGRewrteSlot1, bool TGRewrteSlot2);
|
||||
static void init(const std::vector<unsigned int>& dstIdBlacklistSlot1RF, const std::vector<unsigned int>& dstIdWhitelistSlot1RF, const std::vector<unsigned int>& dstIdBlacklistSlot2RF, const std::vector<unsigned int>& dstIdWhitelistSlot2RF, const std::vector<unsigned int>& dstIdBlacklistSlot1NET, const std::vector<unsigned int>& dstIdWhitelistSlot1NET, const std::vector<unsigned int>& dstIdBlacklistSlot2NET, const std::vector<unsigned int>& dstIdWhitelistSlot2NET, const std::vector<unsigned int>& srcIdBlacklist, bool selfOnly, const std::vector<unsigned int>& prefixes, unsigned int id, unsigned int callHang, bool tgRewrteSlot1, bool tgRewrteSlot2);
|
||||
|
||||
static unsigned int DstIdRewrite(unsigned int id, unsigned int sid,unsigned int slot, bool network);
|
||||
static unsigned int dstIdRewrite(unsigned int id, unsigned int sid,unsigned int slot, bool network);
|
||||
|
||||
static void setOverEndTime();
|
||||
|
||||
private:
|
||||
@@ -38,7 +39,7 @@ private:
|
||||
static std::vector<unsigned int> m_dstWhiteListSlot1NET;
|
||||
static std::vector<unsigned int> m_dstWhiteListSlot2NET;
|
||||
|
||||
static std::vector<unsigned int> m_SrcIdBlacklist;
|
||||
static std::vector<unsigned int> m_srcIdBlacklist;
|
||||
|
||||
static std::vector<unsigned int> m_prefixes;
|
||||
|
||||
@@ -47,21 +48,18 @@ private:
|
||||
static bool m_selfOnly;
|
||||
static unsigned int m_id;
|
||||
|
||||
static bool DstIdBlacklist(unsigned int did,unsigned int slot, bool network);
|
||||
static bool DstIdWhitelist(unsigned int did,unsigned int slot,bool gt4k, bool network);
|
||||
static bool dstIdBlacklist(unsigned int did,unsigned int slot, bool network);
|
||||
static bool dstIdWhitelist(unsigned int did,unsigned int slot,bool gt4k, bool network);
|
||||
|
||||
static bool validateSrcId(unsigned int id);
|
||||
|
||||
static std::time_t m_time;
|
||||
|
||||
static unsigned int m_dstRewriteID;
|
||||
static unsigned int m_SrcID;
|
||||
static unsigned int m_srcID;
|
||||
|
||||
static bool m_TGRewriteSlot1;
|
||||
static bool m_TGRewriteSlot2;
|
||||
|
||||
|
||||
|
||||
static bool m_tgRewriteSlot1;
|
||||
static bool m_tgRewriteSlot2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user