Index: compiled/FilterNotifier.h |
=================================================================== |
--- a/compiled/FilterNotifier.h |
+++ b/compiled/FilterNotifier.h |
@@ -25,49 +25,60 @@ |
class Filter; |
class Subscription; |
namespace FilterNotifier |
{ |
enum class Topic |
{ |
NONE, |
+ FILTER_ADDED, |
+ FILTER_REMOVED, |
FILTER_DISABLED, |
FILTER_HITCOUNT, |
FILTER_LASTHIT, |
+ SUBSCRIPTION_ADDED, |
+ SUBSCRIPTION_REMOVED, |
+ SUBSCRIPTION_MOVED, |
SUBSCRIPTION_TITLE, |
SUBSCRIPTION_DISABLED, |
SUBSCRIPTION_FIXEDTITLE, |
SUBSCRIPTION_HOMEPAGE, |
SUBSCRIPTION_LASTCHECK, |
SUBSCRIPTION_LASTDOWNLOAD, |
SUBSCRIPTION_DOWNLOADSTATUS, |
SUBSCRIPTION_ERRORS, |
}; |
inline void GenerateCustomBindings() |
{ |
printf("var FilterNotifier = require('filterNotifier').FilterNotifier;\n"); |
printf("var notifierTopics = new Map([\n"); |
+ printf(" [%i, 'filter.added'],\n", Topic::FILTER_ADDED); |
+ printf(" [%i, 'filter.removed'],\n", Topic::FILTER_REMOVED); |
printf(" [%i, 'filter.disabled'],\n", Topic::FILTER_DISABLED); |
printf(" [%i, 'filter.hitCount'],\n", Topic::FILTER_HITCOUNT); |
printf(" [%i, 'filter.lastHit'],\n", Topic::FILTER_LASTHIT); |
+ printf(" [%i, 'subscription.added'],\n", Topic::SUBSCRIPTION_ADDED); |
+ printf(" [%i, 'subscription.removed'],\n", Topic::SUBSCRIPTION_REMOVED); |
+ printf(" [%i, 'subscription.moved'],\n", Topic::SUBSCRIPTION_MOVED); |
printf(" [%i, 'subscription.title'],\n", Topic::SUBSCRIPTION_TITLE); |
printf(" [%i, 'subscription.disabled'],\n", Topic::SUBSCRIPTION_DISABLED); |
printf(" [%i, 'subscription.fixedTitle'],\n", Topic::SUBSCRIPTION_FIXEDTITLE); |
printf(" [%i, 'subscription.homepage'],\n", Topic::SUBSCRIPTION_HOMEPAGE); |
printf(" [%i, 'subscription.lastCheck'],\n", Topic::SUBSCRIPTION_LASTCHECK); |
printf(" [%i, 'subscription.lastDownload'],\n", Topic::SUBSCRIPTION_LASTDOWNLOAD); |
printf(" [%i, 'subscription.downloadStatus'],\n", Topic::SUBSCRIPTION_DOWNLOADSTATUS); |
printf(" [%i, 'subscription.errors'],\n", Topic::SUBSCRIPTION_ERRORS); |
printf("]);"); |
} |
- inline void FilterChange(Topic topic, Filter* filter) |
+ inline void FilterChange(Topic topic, Filter* filter, |
+ Subscription* subscription = nullptr, unsigned int position = 0) |
{ |
- JSNotifyFilterChange(topic, filter); |
+ JSNotifyFilterChange(topic, filter, subscription, position); |
} |
inline void SubscriptionChange(Topic topic, Subscription* subscription) |
{ |
JSNotifySubscriptionChange(topic, subscription); |
} |
} |