Index: include/AdblockPlus/FilterEngine.h |
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h |
index b81433f5c9bf1b540cf837f6df1a1662bc623454..7b6a2e22f05dd5189f6ee7d77c288c7e63e09226 100644 |
--- a/include/AdblockPlus/FilterEngine.h |
+++ b/include/AdblockPlus/FilterEngine.h |
@@ -24,6 +24,7 @@ |
#include <vector> |
#include <AdblockPlus/JsEngine.h> |
#include <AdblockPlus/JsValue.h> |
+#include <AdblockPlus/Notification.h> |
#include "tr1_memory.h" |
@@ -237,6 +238,41 @@ namespace AdblockPlus |
std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; |
/** |
+ * Creates new Notification(see `Notification`) object. |
+ * @param type Type of the notification. |
+ * @param id Id of the newly created notification. |
+ * @return New Notification instance. |
+ */ |
+ std::tr1::shared_ptr<Notification> CreateNotification(NotificationType type, |
+ const std::string& id) const; |
+ |
+ /** |
+ * Determines which notification is to be shown next. |
+ * @param url URL to match notifications to (optional). |
+ * @return Notification to be shown, or null if there is no any. |
+ */ |
+ std::tr1::shared_ptr<Notification> GetNextNotificationToShow( |
+ const std::string& url = std::string()); |
+ |
+ /** |
+ * Adds a local notification. |
+ * @param value The notification to add |
+ */ |
+ void AddNotification(const std::tr1::shared_ptr<Notification>& value); |
+ |
+ /** |
+ * Removes an existing local notification. |
+ * @param notification The notification to remove. |
+ */ |
+ void RemoveNotification(const std::tr1::shared_ptr<Notification>& value); |
+ |
+ /** |
+ * Marks the notification as shown. |
+ * @param notificationId The notification ID. |
+ */ |
+ void MarkNotificationAsShown(const std::string& notificationId); |
+ |
+ /** |
* Checks if any active filter matches the supplied URL. |
* @param url URL to match. |
* @param contentType Content type of the requested resource. |