2016-07-10 10:47:23 +00:00
|
|
|
/*
|
2016-12-22 09:41:42 +00:00
|
|
|
* Copyright (C) 2016 by Simon Rune G7RZU
|
2017-01-05 19:15:10 +00:00
|
|
|
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
2016-12-22 09:41:42 +00:00
|
|
|
*
|
2016-07-10 10:47:23 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
*/
|
|
|
|
#if !defined(DMRAccessControl_H)
|
|
|
|
#define DMRAccessControl_H
|
|
|
|
|
|
|
|
#include <vector>
|
2016-10-13 16:46:02 +00:00
|
|
|
|
2016-11-10 18:43:54 +00:00
|
|
|
class CDMRAccessControl {
|
2016-07-10 10:47:23 +00:00
|
|
|
public:
|
2017-01-05 19:15:10 +00:00
|
|
|
static bool validateSrcId(unsigned int id);
|
|
|
|
|
|
|
|
static bool validateTGId(unsigned int slotNo, bool group, unsigned int id);
|
2016-07-10 10:47:23 +00:00
|
|
|
|
2017-01-05 19:15:10 +00:00
|
|
|
static void init(const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, bool selfOnly, const std::vector<unsigned int>& prefixes, unsigned int id);
|
2016-09-11 11:15:03 +00:00
|
|
|
|
2016-07-10 10:47:23 +00:00
|
|
|
private:
|
2016-12-21 19:06:29 +00:00
|
|
|
static std::vector<unsigned int> m_blackList;
|
|
|
|
static std::vector<unsigned int> m_whiteList;
|
2016-07-11 16:41:53 +00:00
|
|
|
|
2016-07-10 15:46:02 +00:00
|
|
|
static std::vector<unsigned int> m_prefixes;
|
2017-01-05 19:15:10 +00:00
|
|
|
|
|
|
|
static std::vector<unsigned int> m_slot1TGWhiteList;
|
|
|
|
static std::vector<unsigned int> m_slot2TGWhiteList;
|
|
|
|
|
2016-07-10 15:46:02 +00:00
|
|
|
static bool m_selfOnly;
|
|
|
|
static unsigned int m_id;
|
2016-07-10 10:47:23 +00:00
|
|
|
};
|
|
|
|
|
2016-07-11 16:41:53 +00:00
|
|
|
#endif
|