Index: src/plugin/PluginFilter.h |
=================================================================== |
--- a/src/plugin/PluginFilter.h |
+++ b/src/plugin/PluginFilter.h |
@@ -27,8 +27,8 @@ |
CFilterElementHideAttrType m_type; |
- CComBSTR m_bstrAttr; |
- CString m_value; |
+ std::wstring m_attr_name; |
+ std::wstring m_value; |
CFilterElementHideAttrSelector(); |
CFilterElementHideAttrSelector(const CFilterElementHideAttrSelector& filter); |
@@ -53,17 +53,17 @@ |
}; |
- CString m_filterText; |
+ std::wstring m_filterText; |
// For domain specific filters only |
- CString m_tagId; |
- CString m_tagClassName; |
- CString m_tag; |
+ std::wstring m_tagId; |
+ std::wstring m_tagClassName; |
+ std::wstring m_tag; |
std::vector<CFilterElementHideAttrSelector> m_attributeSelectors; |
std::shared_ptr<CFilterElementHide> m_predecessor; |
- CFilterElementHide(const CString& filterText=""); |
+ CFilterElementHide(const std::wstring & filterText=L""); |
CFilterElementHide(const CFilterElementHide& filter); |
ETraverserComplexType m_type; |
@@ -115,7 +115,7 @@ |
bool m_isFromStart; |
bool m_isFromEnd; |
int m_hitCount; |
- CString m_filterText; |
+ std::wstring m_filterText; |
CFilter(const CFilter&); |
CFilter(); |
@@ -130,18 +130,16 @@ |
private: |
- CString m_dataPath; |
- |
- std::map<int, CString> m_contentMapText; |
+ std::map< int, std::wstring > m_contentMapText; |
typedef std::map<DWORD, CFilter> TFilterMap; |
typedef std::vector<CFilter> TFilterMapDefault; |
// (Tag,Name) -> Filter |
- typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterElementHideTagsNamed; |
+ typedef std::multimap<std::pair< std::wstring, std::wstring >, CFilterElementHide> TFilterElementHideTagsNamed; |
// Tag -> Filter |
- typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags; |
+ typedef std::multimap< std::wstring, CFilterElementHide> TFilterElementHideTags; |
TFilterElementHideTagsNamed m_elementHideTagsId; |
@@ -155,17 +153,17 @@ |
public: |
- CPluginFilter(const CString& dataPath = ""); |
+ CPluginFilter(); |
bool LoadHideFilters(std::vector<std::wstring> filters); |
- bool AddFilterElementHide(CString filter); |
+ bool AddFilterElementHide( std::wstring filter); |
- bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& domain, const CString& indent) const; |
+ bool IsElementHidden(const std::wstring & tag, IHTMLElement* pEl, const std::wstring & domain, const std::wstring & indent) const; |
- bool ShouldBlock(CString src, int contentType, const CString& domain, bool addDebug=false) const; |
+ bool ShouldBlock( std::wstring src, int contentType, const std::wstring & domain, bool addDebug=false) const; |
HANDLE hideFiltersLoadedEvent; |
}; |