Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: include/AdblockPlus/FilterEngine.h

Issue 29419623: Issue 5165 - Remove SubscriptionPtr (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Added move constructor. Created April 24, 2017, 1:45 p.m.
Right Patch Set: Call the inherited operator Created April 24, 2017, 8:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | shell/src/SubscriptionsCommand.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 friend class FilterEngine;
94 public: 94 public:
95 /** 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
115 /**
96 * 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.
97 * @return `true` if this subscription has been added. 117 * @return `true` if this subscription has been added.
98 */ 118 */
99 bool IsListed() const; 119 bool IsListed() const;
100 120
101 /** 121 /**
102 * Adds this subscription to the list of subscriptions. 122 * Adds this subscription to the list of subscriptions.
103 */ 123 */
104 void AddToList(); 124 void AddToList();
105 125
(...skipping 14 matching lines...) Expand all
120 */ 140 */
121 bool IsUpdating() const; 141 bool IsUpdating() const;
122 142
123 /** 143 /**
124 * Indicates whether the subscription is the Acceptable Ads subscription. 144 * Indicates whether the subscription is the Acceptable Ads subscription.
125 * @return `true` if this subscription is the Acceptable Ads subscription. 145 * @return `true` if this subscription is the Acceptable Ads subscription.
126 */ 146 */
127 bool IsAA() const; 147 bool IsAA() const;
128 148
129 bool operator==(const Subscription& subscription) const; 149 bool operator==(const Subscription& subscription) const;
130 Subscription(Subscription&&) = default;
sergei 2017/04/24 14:12:36 It would be better to put the ctrs on the top of t
sergei 2017/04/24 14:12:36 On windows we are currently bound to MSVS2012 and
hub 2017/04/24 15:02:42 Done.
131 150
132 protected: 151 protected:
133 /** 152 /**
134 * Creates a wrapper for an existing JavaScript subscription object. 153 * Creates a wrapper for an existing JavaScript subscription object.
135 * Normally you shouldn't call this directly, but use 154 * Normally you shouldn't call this directly, but use
136 * FilterEngine::GetSubscription() instead. 155 * FilterEngine::GetSubscription() instead.
137 * @param value JavaScript subscription object. 156 * @param value JavaScript subscription object.
138 */ 157 */
139 Subscription(JsValue&& value); 158 Subscription(JsValue&& value);
140 }; 159 };
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 const JsValueList& param) const; 559 const JsValueList& param) const;
541 FilterPtr GetWhitelistingFilter(const std::string& url, 560 FilterPtr GetWhitelistingFilter(const std::string& url,
542 ContentTypeMask contentTypeMask, const std::string& documentUrl) const; 561 ContentTypeMask contentTypeMask, const std::string& documentUrl) const;
543 FilterPtr GetWhitelistingFilter(const std::string& url, 562 FilterPtr GetWhitelistingFilter(const std::string& url,
544 ContentTypeMask contentTypeMask, 563 ContentTypeMask contentTypeMask,
545 const std::vector<std::string>& documentUrls) const; 564 const std::vector<std::string>& documentUrls) const;
546 }; 565 };
547 } 566 }
548 567
549 #endif 568 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld