Index: src/FilterEngine.cpp |
=================================================================== |
--- a/src/FilterEngine.cpp |
+++ b/src/FilterEngine.cpp |
@@ -277,49 +277,49 @@ |
} |
Filter FilterEngine::GetFilter(const std::string& text) const |
{ |
JsValue func = jsEngine->Evaluate("API.getFilterFromText"); |
return Filter(func.Call(jsEngine->NewValue(text))); |
} |
-SubscriptionPtr FilterEngine::GetSubscription(const std::string& url) const |
+Subscription FilterEngine::GetSubscription(const std::string& url) const |
{ |
JsValue func = jsEngine->Evaluate("API.getSubscriptionFromUrl"); |
- return SubscriptionPtr(new Subscription(func.Call(jsEngine->NewValue(url)))); |
+ return Subscription(func.Call(jsEngine->NewValue(url))); |
} |
std::vector<Filter> FilterEngine::GetListedFilters() const |
{ |
JsValue func = jsEngine->Evaluate("API.getListedFilters"); |
JsValueList values = func.Call().AsList(); |
std::vector<Filter> result; |
for (JsValueList::iterator it = values.begin(); it != values.end(); it++) |
result.push_back(Filter(std::move(*it))); |
return result; |
} |
-std::vector<SubscriptionPtr> FilterEngine::GetListedSubscriptions() const |
+std::vector<Subscription> FilterEngine::GetListedSubscriptions() const |
{ |
JsValue func = jsEngine->Evaluate("API.getListedSubscriptions"); |
JsValueList values = func.Call().AsList(); |
- std::vector<SubscriptionPtr> result; |
+ std::vector<Subscription> result; |
for (JsValueList::iterator it = values.begin(); it != values.end(); it++) |
- result.push_back(SubscriptionPtr(new Subscription(std::move(*it)))); |
+ result.push_back(Subscription(std::move(*it))); |
return result; |
} |
-std::vector<SubscriptionPtr> FilterEngine::FetchAvailableSubscriptions() const |
+std::vector<Subscription> FilterEngine::FetchAvailableSubscriptions() const |
{ |
JsValue func = jsEngine->Evaluate("API.getRecommendedSubscriptions"); |
JsValueList values = func.Call().AsList(); |
- std::vector<SubscriptionPtr> result; |
+ std::vector<Subscription> result; |
for (JsValueList::iterator it = values.begin(); it != values.end(); it++) |
- result.push_back(SubscriptionPtr(new Subscription(std::move(*it)))); |
+ result.push_back(Subscription(std::move(*it))); |
return result; |
} |
void FilterEngine::SetAAEnabled(bool enabled) |
{ |
jsEngine->Evaluate("API.setAASubscriptionEnabled").Call(jsEngine->NewValue(enabled)); |
} |