Index: src/plugin/AdblockPlusClient.h |
=================================================================== |
--- a/src/plugin/AdblockPlusClient.h |
+++ b/src/plugin/AdblockPlusClient.h |
@@ -1,28 +1,32 @@ |
#ifndef _SIMPLE_ADBLOCK_CLIENT_H_ |
#define _SIMPLE_ADBLOCK_CLIENT_H_ |
#include "PluginTypedef.h" |
#include "PluginClientBase.h" |
-#include "AdblockPlus.h" |
-using namespace AdblockPlus; |
- |
class CPluginFilter; |
+struct SubscriptionDescription |
+{ |
+ std::string url; |
+ std::string title; |
+ std::string specialization; |
+ bool listed; |
+}; |
+ |
class CAdblockPlusClient : public CPluginClientBase |
{ |
private: |
std::auto_ptr<CPluginFilter> m_filter; |
- std::auto_ptr<AdblockPlus::FilterEngine> filterEngine; |
CComAutoCriticalSection m_criticalSectionFilter; |
CComAutoCriticalSection m_criticalSectionCache; |
std::map<CString,bool> m_cacheBlockedSources; |
// Private constructor used by the singleton pattern |
@@ -42,16 +46,17 @@ public: |
bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& domain, const CString& indent, CPluginFilter* filter); |
bool IsUrlWhiteListed(const CString& url); |
int GetIEVersion(); |
bool Matches(const std::string& url, const std::string& contentType, const std::string& domain); |
std::vector<std::string> GetElementHidingSelectors(const std::string& domain); |
- std::vector<AdblockPlus::SubscriptionPtr> FetchAvailableSubscriptions(); |
- std::vector<AdblockPlus::FilterPtr> GetListedFilters(); |
- AdblockPlus::FilterPtr GetFilter(std::string text); |
- std::vector<AdblockPlus::SubscriptionPtr> GetListedSubscriptions(); |
- AdblockPlus::SubscriptionPtr GetSubscription(std::string url); |
+ std::vector<SubscriptionDescription> FetchAvailableSubscriptions(); |
+ std::vector<SubscriptionDescription> GetListedSubscriptions(); |
+ void SetSubscription(std::string url); |
+ void UpdateAllSubscriptions(); |
+ std::vector<std::string> GetExceptionDomains(); |
+ void AddFilter(const std::string& text); |
}; |
#endif // _SIMPLE_ADBLOCK_CLIENT_H_ |