| LEFT | RIGHT | 
|    1 /* |    1 /* | 
|    2  * This file is part of Adblock Plus <https://adblockplus.org/>, |    2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
|    3  * Copyright (C) 2006-2017 eyeo GmbH |    3  * Copyright (C) 2006-2017 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   83  |   83  | 
|   84   /** |   84   /** | 
|   85    * Wrapper for a subscription object. |   85    * Wrapper for a subscription object. | 
|   86    * There are no accessors for most |   86    * There are no accessors for most | 
|   87    * [subscription properties](https://adblockplus.org/jsdoc/adblockpluscore/Sub
     scription.html), |   87    * [subscription properties](https://adblockplus.org/jsdoc/adblockpluscore/Sub
     scription.html), | 
|   88    * use `GetProperty()` to retrieve them by name. |   88    * use `GetProperty()` to retrieve them by name. | 
|   89    */ |   89    */ | 
|   90   class Subscription : public JsValue, |   90   class Subscription : public JsValue, | 
|   91                        public std::enable_shared_from_this<Subscription> |   91                        public std::enable_shared_from_this<Subscription> | 
|   92   { |   92   { | 
 |   93     friend class FilterEngine; | 
|   93   public: |   94   public: | 
 |   95     /** | 
 |   96      * Copy constructor | 
 |   97      */ | 
 |   98     Subscription(const Subscription& src); | 
 |   99  | 
 |  100     /** | 
 |  101      * Move constructor | 
 |  102      */ | 
 |  103     Subscription(Subscription&& src); | 
 |  104  | 
 |  105     /** | 
 |  106      * Assignment operator | 
 |  107      */ | 
 |  108     Subscription& operator=(const Subscription& src); | 
 |  109  | 
 |  110     /** | 
 |  111      * Move assignment operator | 
 |  112      */ | 
 |  113     Subscription& operator=(Subscription&& src); | 
 |  114  | 
|   94     /** |  115     /** | 
|   95      * Checks if this subscription has been added to the list of subscriptions. |  116      * Checks if this subscription has been added to the list of subscriptions. | 
|   96      * @return `true` if this subscription has been added. |  117      * @return `true` if this subscription has been added. | 
|   97      */ |  118      */ | 
|   98     bool IsListed() const; |  119     bool IsListed() const; | 
|   99  |  120  | 
|  100     /** |  121     /** | 
|  101      * Adds this subscription to the list of subscriptions. |  122      * Adds this subscription to the list of subscriptions. | 
|  102      */ |  123      */ | 
|  103     void AddToList(); |  124     void AddToList(); | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
|  120     bool IsUpdating() const; |  141     bool IsUpdating() const; | 
|  121  |  142  | 
|  122     /** |  143     /** | 
|  123      * Indicates whether the subscription is the Acceptable Ads subscription. |  144      * Indicates whether the subscription is the Acceptable Ads subscription. | 
|  124      * @return `true` if this subscription is the Acceptable Ads subscription. |  145      * @return `true` if this subscription is the Acceptable Ads subscription. | 
|  125      */ |  146      */ | 
|  126     bool IsAA() const; |  147     bool IsAA() const; | 
|  127  |  148  | 
|  128     bool operator==(const Subscription& subscription) const; |  149     bool operator==(const Subscription& subscription) const; | 
|  129  |  150  | 
 |  151   protected: | 
|  130     /** |  152     /** | 
|  131      * Creates a wrapper for an existing JavaScript subscription object. |  153      * Creates a wrapper for an existing JavaScript subscription object. | 
|  132      * Normally you shouldn't call this directly, but use |  154      * Normally you shouldn't call this directly, but use | 
|  133      * FilterEngine::GetSubscription() instead. |  155      * FilterEngine::GetSubscription() instead. | 
|  134      * @param value JavaScript subscription object. |  156      * @param value JavaScript subscription object. | 
|  135      */ |  157      */ | 
|  136     Subscription(JsValue&& value); |  158     Subscription(JsValue&& value); | 
|  137   }; |  159   }; | 
|  138  |  160  | 
|  139   /** |  161   /** | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  205  |  227  | 
|  206     /** |  228     /** | 
|  207      * Container of name-value pairs representing a set of preferences. |  229      * Container of name-value pairs representing a set of preferences. | 
|  208      */ |  230      */ | 
|  209     typedef std::map<std::string, AdblockPlus::JsValue> Prefs; |  231     typedef std::map<std::string, AdblockPlus::JsValue> Prefs; | 
|  210  |  232  | 
|  211     /** |  233     /** | 
|  212      * Callback type invoked when a new notification should be shown. |  234      * Callback type invoked when a new notification should be shown. | 
|  213      * The parameter is the Notification object to be shown. |  235      * The parameter is the Notification object to be shown. | 
|  214      */ |  236      */ | 
|  215     typedef std::function<void(const Notification&)> ShowNotificationCallback; |  237     typedef std::function<void(Notification&)> ShowNotificationCallback; | 
|  216  |  238  | 
|  217     /** |  239     /** | 
|  218      * Callback function returning false when current connection is not |  240      * Callback function returning false when current connection is not | 
|  219      * allowedConnectionType, e.g. because it is a metered connection. |  241      * allowedConnectionType, e.g. because it is a metered connection. | 
|  220      */ |  242      */ | 
|  221     typedef std::function<bool(const std::string* allowedConnectionType)> IsConn
     ectionAllowedCallback; |  243     typedef std::function<bool(const std::string* allowedConnectionType)> IsConn
     ectionAllowedCallback; | 
|  222  |  244  | 
|  223     /** |  245     /** | 
|  224      * FilterEngine creation parameters. |  246      * FilterEngine creation parameters. | 
|  225      */ |  247      */ | 
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  537       const JsValueList& param) const; |  559       const JsValueList& param) const; | 
|  538     FilterPtr GetWhitelistingFilter(const std::string& url, |  560     FilterPtr GetWhitelistingFilter(const std::string& url, | 
|  539       ContentTypeMask contentTypeMask, const std::string& documentUrl) const; |  561       ContentTypeMask contentTypeMask, const std::string& documentUrl) const; | 
|  540     FilterPtr GetWhitelistingFilter(const std::string& url, |  562     FilterPtr GetWhitelistingFilter(const std::string& url, | 
|  541       ContentTypeMask contentTypeMask, |  563       ContentTypeMask contentTypeMask, | 
|  542       const std::vector<std::string>& documentUrls) const; |  564       const std::vector<std::string>& documentUrls) const; | 
|  543   }; |  565   }; | 
|  544 } |  566 } | 
|  545  |  567  | 
|  546 #endif |  568 #endif | 
| LEFT | RIGHT |