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

Side by Side Diff: compiled/subscription/Subscription.h

Issue 29606600: Issue 5146 - Implement DownloadableSubscription parsing in C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Removed Md5sum and associated code Created Aug. 14, 2018, 12:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/subscription/DownloadableSubscription.cpp ('k') | lib/synchronizer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 explicit Subscription(Type type, const String& id); 77 explicit Subscription(Type type, const String& id);
78 ~Subscription(); 78 ~Subscription();
79 79
80 Type mType; 80 Type mType;
81 81
82 const BINDINGS_EXPORTED String& GetID() const 82 const BINDINGS_EXPORTED String& GetID() const
83 { 83 {
84 return mID; 84 return mID;
85 } 85 }
86 86
87 void SetFilters(Filters&& filters)
88 {
89 mFilters = filters;
90 }
91
92 void ClearFilters()
93 {
94 mFilters.clear();
95 }
96
87 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); 97 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle);
88 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, 98 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED,
89 GetDisabled, SetDisabled); 99 GetDisabled, SetDisabled);
90 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); 100 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed);
91 101
92 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const 102 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const
93 { 103 {
94 return mFilters.size(); 104 return mFilters.size();
95 } 105 }
96 106
(...skipping 19 matching lines...) Expand all
116 if (mType != T::classType) 126 if (mType != T::classType)
117 return nullptr; 127 return nullptr;
118 128
119 return static_cast<const T*>(this); 129 return static_cast<const T*>(this);
120 } 130 }
121 }; 131 };
122 132
123 typedef intrusive_ptr<Subscription> SubscriptionPtr; 133 typedef intrusive_ptr<Subscription> SubscriptionPtr;
124 134
125 ABP_NS_END 135 ABP_NS_END
OLDNEW
« no previous file with comments | « compiled/subscription/DownloadableSubscription.cpp ('k') | lib/synchronizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld