| LEFT | RIGHT |
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 */ | 231 */ |
| 232 std::vector<SubscriptionPtr> GetListedSubscriptions() const; | 232 std::vector<SubscriptionPtr> GetListedSubscriptions() const; |
| 233 | 233 |
| 234 /** | 234 /** |
| 235 * Retrieves all recommended subscriptions. | 235 * Retrieves all recommended subscriptions. |
| 236 * @return List of recommended subscriptions. | 236 * @return List of recommended subscriptions. |
| 237 */ | 237 */ |
| 238 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; | 238 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; |
| 239 | 239 |
| 240 /** | 240 /** |
| 241 * Creates new Notification(see `Notification`) object. | |
| 242 * @param type Type of the notification. | |
| 243 * @param id Id of the newly created notification. | |
| 244 * @return New Notification instance. | |
| 245 */ | |
| 246 std::tr1::shared_ptr<Notification> CreateNotification(NotificationType type, | |
| 247 const std::string& id) const; | |
| 248 | |
| 249 /** | |
| 250 * Determines which notification is to be shown next. | 241 * Determines which notification is to be shown next. |
| 251 * @param url URL to match notifications to (optional). | 242 * @param url URL to match notifications to (optional). |
| 252 * @return Notification to be shown, or null if there is no any. | 243 * @return Notification to be shown, or `null` if there is no any. |
| 253 */ | 244 */ |
| 254 std::tr1::shared_ptr<Notification> GetNextNotificationToShow( | 245 NotificationPtr GetNextNotificationToShow( |
| 255 const std::string& url = std::string()); | 246 const std::string& url = std::string()); |
| 256 | |
| 257 /** | |
| 258 * Adds a local notification. | |
| 259 * @param value The notification to add | |
| 260 */ | |
| 261 void AddNotification(const std::tr1::shared_ptr<Notification>& value); | |
| 262 | |
| 263 /** | |
| 264 * Removes an existing local notification. | |
| 265 * @param notification The notification to remove. | |
| 266 */ | |
| 267 void RemoveNotification(const std::tr1::shared_ptr<Notification>& value); | |
| 268 | |
| 269 /** | |
| 270 * Marks the notification as shown. | |
| 271 * @param notificationId The notification ID. | |
| 272 */ | |
| 273 void MarkNotificationAsShown(const std::string& notificationId); | |
| 274 | 247 |
| 275 /** | 248 /** |
| 276 * Checks if any active filter matches the supplied URL. | 249 * Checks if any active filter matches the supplied URL. |
| 277 * @param url URL to match. | 250 * @param url URL to match. |
| 278 * @param contentType Content type of the requested resource. | 251 * @param contentType Content type of the requested resource. |
| 279 * @param documentUrl URL of the document requesting the resource. | 252 * @param documentUrl URL of the document requesting the resource. |
| 280 * Note that there will be more than one document if frames are | 253 * Note that there will be more than one document if frames are |
| 281 * involved, see | 254 * involved, see |
| 282 * Matches(const std::string&, const std::string&, const std::vector<
std::string>&) const. | 255 * Matches(const std::string&, const std::string&, const std::vector<
std::string>&) const. |
| 283 * @return Matching filter, or `null` if there was no match. | 256 * @return Matching filter, or `null` if there was no match. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 ContentType contentType, | 383 ContentType contentType, |
| 411 const std::string& documentUrl) const; | 384 const std::string& documentUrl) const; |
| 412 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); | 385 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); |
| 413 void UpdateCheckDone(const std::string& eventName, | 386 void UpdateCheckDone(const std::string& eventName, |
| 414 UpdateCheckDoneCallback callback, JsValueList& params); | 387 UpdateCheckDoneCallback callback, JsValueList& params); |
| 415 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 388 void FilterChanged(FilterChangeCallback callback, JsValueList& params); |
| 416 }; | 389 }; |
| 417 } | 390 } |
| 418 | 391 |
| 419 #endif | 392 #endif |
| LEFT | RIGHT |