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: Simplify the logic of Process() Created Dec. 4, 2017, 10:04 a.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 explicit Subscription(Type type, const String& id); 74 explicit Subscription(Type type, const String& id);
75 ~Subscription(); 75 ~Subscription();
76 76
77 Type mType; 77 Type mType;
78 78
79 const BINDINGS_EXPORTED String& GetID() const 79 const BINDINGS_EXPORTED String& GetID() const
80 { 80 {
81 return mID; 81 return mID;
82 } 82 }
83 83
84 void SetFilters(Filters&& filters)
85 {
86 mFilters = filters;
87 }
88
89 void ClearFilters()
90 {
91 mFilters.clear();
92 }
93
84 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); 94 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle);
85 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, 95 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED,
86 GetDisabled, SetDisabled); 96 GetDisabled, SetDisabled);
87 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); 97 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed);
88 98
89 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const 99 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const
90 { 100 {
91 return mFilters.size(); 101 return mFilters.size();
92 } 102 }
93 103
(...skipping 17 matching lines...) Expand all
111 const T* As() const 121 const T* As() const
112 { 122 {
113 if (mType != T::classType) 123 if (mType != T::classType)
114 return nullptr; 124 return nullptr;
115 125
116 return static_cast<const T*>(this); 126 return static_cast<const T*>(this);
117 } 127 }
118 }; 128 };
119 129
120 typedef intrusive_ptr<Subscription> SubscriptionPtr; 130 typedef intrusive_ptr<Subscription> SubscriptionPtr;
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