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 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 public std::enable_shared_from_this<Notification> | 52 public std::enable_shared_from_this<Notification> |
53 { | 53 { |
54 friend class FilterEngine; | 54 friend class FilterEngine; |
55 protected: | 55 protected: |
56 /** | 56 /** |
57 * Constructor. | 57 * Constructor. |
58 * @param jsValue `JsValue&&` notification JavaScript object. | 58 * @param jsValue `JsValue&&` notification JavaScript object. |
59 */ | 59 */ |
60 explicit Notification(JsValue&& jsValue); | 60 explicit Notification(JsValue&& jsValue); |
61 public: | 61 public: |
| 62 Notification(Notification&&) = default; |
| 63 |
62 /** | 64 /** |
63 * Retrieves the type of this notification. | 65 * Retrieves the type of this notification. |
64 * @return Type of this notification. | 66 * @return Type of this notification. |
65 */ | 67 */ |
66 NotificationType GetType() const; | 68 NotificationType GetType() const; |
67 | 69 |
68 /** | 70 /** |
69 * Retrieves the title and message of this notification. | 71 * Retrieves the title and message of this notification. |
70 * @return Translated texts. | 72 * @return Translated texts. |
71 */ | 73 */ |
72 NotificationTexts GetTexts() const; | 74 NotificationTexts GetTexts() const; |
73 | 75 |
74 /** | 76 /** |
75 * Retrieves the URLs which should be mapped to the links in the message. | 77 * Retrieves the URLs which should be mapped to the links in the message. |
76 * @return List of links. | 78 * @return List of links. |
77 */ | 79 */ |
78 std::vector<std::string> GetLinks() const; | 80 std::vector<std::string> GetLinks() const; |
79 | 81 |
80 /** | 82 /** |
81 * Marks this notification as shown. It is only relevant for question | 83 * Marks this notification as shown. It is only relevant for question |
82 * notifications. Other notifications are marked automatically. | 84 * notifications. Other notifications are marked automatically. |
83 */ | 85 */ |
84 void MarkAsShown(); | 86 void MarkAsShown(); |
85 private: | 87 private: |
86 }; | 88 }; |
87 typedef std::shared_ptr<Notification> NotificationPtr; | |
88 } | 89 } |
89 | 90 |
90 #endif | 91 #endif |
OLD | NEW |