OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 FilterPtr Matches(const std::string& url, | 85 FilterPtr Matches(const std::string& url, |
86 const std::string& contentType, | 86 const std::string& contentType, |
87 const std::vector<std::string>& documentUrls) const; | 87 const std::vector<std::string>& documentUrls) const; |
88 std::vector<std::string> GetElementHidingSelectors(const std::string& domain
) const; | 88 std::vector<std::string> GetElementHidingSelectors(const std::string& domain
) const; |
89 JsValuePtr GetPref(const std::string& pref) const; | 89 JsValuePtr GetPref(const std::string& pref) const; |
90 void SetPref(const std::string& pref, JsValuePtr value); | 90 void SetPref(const std::string& pref, JsValuePtr value); |
91 std::string GetHostFromURL(const std::string& url); | 91 std::string GetHostFromURL(const std::string& url); |
92 void ForceUpdateCheck(UpdaterCallback callback = 0); | 92 void ForceUpdateCheck(UpdaterCallback callback = 0); |
93 void SetFilterChangeCallback(FilterChangeCallback callback); | 93 void SetFilterChangeCallback(FilterChangeCallback callback); |
94 void RemoveFilterChangeCallback(); | 94 void RemoveFilterChangeCallback(); |
| 95 int CompareVersions(const std::string& v1, const std::string& v2); |
95 | 96 |
96 private: | 97 private: |
97 JsEnginePtr jsEngine; | 98 JsEnginePtr jsEngine; |
98 bool initialized; | 99 bool initialized; |
99 bool firstRun; | 100 bool firstRun; |
100 int updateCheckId; | 101 int updateCheckId; |
101 | 102 |
102 void InitDone(JsValueList& params); | 103 void InitDone(JsValueList& params); |
103 FilterPtr CheckFilterMatch(const std::string& url, | 104 FilterPtr CheckFilterMatch(const std::string& url, |
104 const std::string& contentType, | 105 const std::string& contentType, |
105 const std::string& documentUrl) const; | 106 const std::string& documentUrl) const; |
106 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback,
JsValueList& params); | 107 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback,
JsValueList& params); |
107 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 108 void FilterChanged(FilterChangeCallback callback, JsValueList& params); |
108 }; | 109 }; |
109 } | 110 } |
110 | 111 |
111 #endif | 112 #endif |
OLD | NEW |