OLD | NEW |
1 #include <iostream> | 1 #include <iostream> |
2 #include <sstream> | 2 #include <sstream> |
3 | 3 |
4 #include "SubscriptionsCommand.h" | 4 #include "SubscriptionsCommand.h" |
5 | 5 |
6 namespace | 6 namespace |
7 { | 7 { |
8 typedef std::vector<AdblockPlus::Subscription*> SubscriptionList; | 8 typedef std::vector<AdblockPlus::SubscriptionPtr> SubscriptionList; |
9 | 9 |
10 void ShowSubscriptionList(const SubscriptionList& subscriptions) | 10 void ShowSubscriptionList(const SubscriptionList& subscriptions) |
11 { | 11 { |
12 for (SubscriptionList::const_iterator it = subscriptions.begin(); | 12 for (SubscriptionList::const_iterator it = subscriptions.begin(); |
13 it != subscriptions.end(); it++) | 13 it != subscriptions.end(); it++) |
14 std::cout << (*it)->GetProperty("title", "(no title)") << " - " << (*it)->
GetProperty("url", "") << std::endl; | 14 std::cout << (*it)->GetProperty("title", "(no title)") << " - " << (*it)->
GetProperty("url", "") << std::endl; |
15 } | 15 } |
16 } | 16 } |
17 | 17 |
18 SubscriptionsCommand::SubscriptionsCommand( | 18 SubscriptionsCommand::SubscriptionsCommand( |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const SubscriptionList& subscriptions = filterEngine.GetListedSubscriptions(); | 100 const SubscriptionList& subscriptions = filterEngine.GetListedSubscriptions(); |
101 for (SubscriptionList::const_iterator it = subscriptions.begin(); | 101 for (SubscriptionList::const_iterator it = subscriptions.begin(); |
102 it != subscriptions.end(); it++) | 102 it != subscriptions.end(); it++) |
103 (*it)->UpdateFilters(); | 103 (*it)->UpdateFilters(); |
104 } | 104 } |
105 | 105 |
106 void SubscriptionsCommand::FetchSubscriptions() | 106 void SubscriptionsCommand::FetchSubscriptions() |
107 { | 107 { |
108 filterEngine.FetchAvailableSubscriptions(&ShowSubscriptionList); | 108 filterEngine.FetchAvailableSubscriptions(&ShowSubscriptionList); |
109 } | 109 } |
OLD | NEW |