Add config options for REGEX support. Also add README.REGEX

This commit is contained in:
Simon 2018-11-17 16:37:11 +00:00
parent 4c47986da0
commit 08157c342c
6 changed files with 53 additions and 10 deletions

View file

@ -37,6 +37,8 @@ CConf::CConf(const std::string& file) :
m_file(file),
m_callsign(),
m_whiteList(),
m_blacklistRegexfile(),
m_whitelistRegexfile(),
m_rptAddress(),
m_rptPort(0U),
m_myAddress(),
@ -105,7 +107,11 @@ bool CConf::read()
m_whiteList.push_back(ric);
p = ::strtok(NULL, ",\r\n");
}
} else if (::strcmp(key, "RptAddress") == 0)
} else if (::strcmp(key,"BlacklistRegexfile") == 0)
m_blacklistRegexfile = value;
else if (::strcmp(key,"WhitelistRegexfile") == 0)
m_whitelistRegexfile = value;
else if (::strcmp(key, "RptAddress") == 0)
m_rptAddress = value;
else if (::strcmp(key, "RptPort") == 0)
m_rptPort = (unsigned int)::atoi(value);
@ -155,6 +161,16 @@ std::vector<uint32_t> CConf::getWhiteList() const
return m_whiteList;
}
std::string CConf::getblacklistRegexfile() const
{
return m_blacklistRegexfile;
}
std::string CConf::getwhitelistRegexfile() const
{
return m_whitelistRegexfile;
}
std::string CConf::getRptAddress() const
{
return m_rptAddress;