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: Created Nov. 13, 2017, 10:25 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
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 Filters& GetFilters()
85 {
86 return mFilters;
87 }
88
84 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); 89 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle);
85 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, 90 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED,
86 GetDisabled, SetDisabled); 91 GetDisabled, SetDisabled);
87 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); 92 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed);
88 93
89 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const 94 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const
90 { 95 {
91 return mFilters.size(); 96 return mFilters.size();
92 } 97 }
93 98
(...skipping 17 matching lines...) Expand all
111 const T* As() const 116 const T* As() const
112 { 117 {
113 if (mType != T::classType) 118 if (mType != T::classType)
114 return nullptr; 119 return nullptr;
115 120
116 return static_cast<const T*>(this); 121 return static_cast<const T*>(this);
117 } 122 }
118 }; 123 };
119 124
120 typedef intrusive_ptr<Subscription> SubscriptionPtr; 125 typedef intrusive_ptr<Subscription> SubscriptionPtr;
OLDNEW

Powered by Google App Engine
This is Rietveld