OLD | NEW |
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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #pragma once | 18 #pragma once |
19 | 19 |
20 #include <cstdio> | 20 #include <cstdio> |
21 | 21 |
| 22 #include "library.h" |
22 #include "String.h" | 23 #include "String.h" |
23 | 24 |
24 class Filter; | 25 class Filter; |
25 class Subscription; | 26 class Subscription; |
26 | 27 |
27 namespace FilterNotifier | 28 namespace FilterNotifier |
28 { | 29 { |
29 enum class Topic | 30 enum class Topic |
30 { | 31 { |
31 NONE, | 32 NONE, |
(...skipping 21 matching lines...) Expand all Loading... |
53 printf(" [%i, 'subscription.disabled'],\n", Topic::SUBSCRIPTION_DISABLED); | 54 printf(" [%i, 'subscription.disabled'],\n", Topic::SUBSCRIPTION_DISABLED); |
54 printf(" [%i, 'subscription.fixedTitle'],\n", Topic::SUBSCRIPTION_FIXEDTITL
E); | 55 printf(" [%i, 'subscription.fixedTitle'],\n", Topic::SUBSCRIPTION_FIXEDTITL
E); |
55 printf(" [%i, 'subscription.homepage'],\n", Topic::SUBSCRIPTION_HOMEPAGE); | 56 printf(" [%i, 'subscription.homepage'],\n", Topic::SUBSCRIPTION_HOMEPAGE); |
56 printf(" [%i, 'subscription.lastCheck'],\n", Topic::SUBSCRIPTION_LASTCHECK)
; | 57 printf(" [%i, 'subscription.lastCheck'],\n", Topic::SUBSCRIPTION_LASTCHECK)
; |
57 printf(" [%i, 'subscription.lastDownload'],\n", Topic::SUBSCRIPTION_LASTDOW
NLOAD); | 58 printf(" [%i, 'subscription.lastDownload'],\n", Topic::SUBSCRIPTION_LASTDOW
NLOAD); |
58 printf(" [%i, 'subscription.downloadStatus'],\n", Topic::SUBSCRIPTION_DOWNL
OADSTATUS); | 59 printf(" [%i, 'subscription.downloadStatus'],\n", Topic::SUBSCRIPTION_DOWNL
OADSTATUS); |
59 printf(" [%i, 'subscription.errors'],\n", Topic::SUBSCRIPTION_ERRORS); | 60 printf(" [%i, 'subscription.errors'],\n", Topic::SUBSCRIPTION_ERRORS); |
60 printf("]);"); | 61 printf("]);"); |
61 } | 62 } |
62 | 63 |
63 void FilterChange(Topic topic, Filter* filter); | 64 inline void FilterChange(Topic topic, Filter* filter) |
64 void SubscriptionChange(Topic topic, Subscription* subscription); | 65 { |
| 66 JSNotifyFilterChange(topic, filter); |
| 67 } |
| 68 |
| 69 inline void SubscriptionChange(Topic topic, Subscription* subscription) |
| 70 { |
| 71 JSNotifySubscriptionChange(topic, subscription); |
| 72 } |
65 } | 73 } |
OLD | NEW |