OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include <Wbemidl.h> | 3 #include <Wbemidl.h> |
4 #include <time.h> | 4 #include <time.h> |
5 #include "PluginIniFileW.h" | 5 #include "PluginIniFileW.h" |
6 #include "PluginIniFile.h" | 6 #include "PluginIniFile.h" |
7 #include "PluginSettings.h" | 7 #include "PluginSettings.h" |
8 #include "PluginClient.h" | 8 #include "PluginClient.h" |
9 #include "PluginChecksum.h" | 9 #include "PluginChecksum.h" |
10 #include "PluginSystem.h" | 10 #include "PluginSystem.h" |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 DEBUG_SETTINGS("SettingsWhitelist::AddWhiteListedDomain domain:" + domain) | 1279 DEBUG_SETTINGS("SettingsWhitelist::AddWhiteListedDomain domain:" + domain) |
1280 CPluginClient::GetInstance()->AddFilter(CreateDomainWhitelistingFilter(domain)
); | 1280 CPluginClient::GetInstance()->AddFilter(CreateDomainWhitelistingFilter(domain)
); |
1281 } | 1281 } |
1282 | 1282 |
1283 void CPluginSettings::RemoveWhiteListedDomain(const CString& domain) | 1283 void CPluginSettings::RemoveWhiteListedDomain(const CString& domain) |
1284 { | 1284 { |
1285 DEBUG_SETTINGS("SettingsWhitelist::RemoveWhiteListedDomain domain:" + domain) | 1285 DEBUG_SETTINGS("SettingsWhitelist::RemoveWhiteListedDomain domain:" + domain) |
1286 CPluginClient::GetInstance()->RemoveFilter(CreateDomainWhitelistingFilter(doma
in)); | 1286 CPluginClient::GetInstance()->RemoveFilter(CreateDomainWhitelistingFilter(doma
in)); |
1287 } | 1287 } |
1288 | 1288 |
1289 bool CPluginSettings::IsWhiteListedDomain(const CString& domain) const | |
1290 { | |
1291 bool bIsWhiteListed; | |
1292 | |
1293 s_criticalSectionLocal.Lock(); | |
1294 { | |
1295 bIsWhiteListed = std::find(m_whitelistedDomains.begin(), m_whitelistedDomain
s.end(), std::string(CW2A(domain, CP_UTF8))) != m_whitelistedDomains.end(); | |
1296 } | |
1297 s_criticalSectionLocal.Unlock(); | |
1298 | |
1299 return bIsWhiteListed; | |
1300 } | |
1301 | |
1302 int CPluginSettings::GetWhiteListedDomainCount() const | 1289 int CPluginSettings::GetWhiteListedDomainCount() const |
1303 { | 1290 { |
1304 int count = 0; | 1291 int count = 0; |
1305 | 1292 |
1306 s_criticalSectionLocal.Lock(); | 1293 s_criticalSectionLocal.Lock(); |
1307 { | 1294 { |
1308 count = (int)m_whitelistedDomains.size(); | 1295 count = (int)m_whitelistedDomains.size(); |
1309 } | 1296 } |
1310 s_criticalSectionLocal.Unlock(); | 1297 s_criticalSectionLocal.Unlock(); |
1311 | 1298 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 return CString(L""); | 1371 return CString(L""); |
1385 } | 1372 } |
1386 | 1373 |
1387 | 1374 |
1388 void CPluginSettings::RefreshFilterlist() | 1375 void CPluginSettings::RefreshFilterlist() |
1389 { | 1376 { |
1390 CPluginClient::GetInstance()->UpdateAllSubscriptions(); | 1377 CPluginClient::GetInstance()->UpdateAllSubscriptions(); |
1391 } | 1378 } |
1392 | 1379 |
1393 #endif // SUPPORT_WHITELIST | 1380 #endif // SUPPORT_WHITELIST |
OLD | NEW |