OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ | 5 #ifndef JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ |
6 #define JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ | 6 #define JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 typedef std::vector<Recipient> RecipientList; | 43 typedef std::vector<Recipient> RecipientList; |
44 | 44 |
45 bool RecipientListsEqual(const RecipientList& recipients1, | 45 bool RecipientListsEqual(const RecipientList& recipients1, |
46 const RecipientList& recipients2); | 46 const RecipientList& recipients2); |
47 | 47 |
48 struct Notification { | 48 struct Notification { |
49 Notification(); | 49 Notification(); |
50 ~Notification(); | 50 ~Notification(); |
51 | 51 |
52 // Set true if this is a ping notification. | |
53 bool ping; | |
akalin
2012/10/23 00:37:21
i think this can be done without adding this field
| |
52 // The channel the notification is coming in on. | 54 // The channel the notification is coming in on. |
53 std::string channel; | 55 std::string channel; |
54 // Recipients for this notification (may be empty). | 56 // Recipients for this notification (may be empty). |
55 RecipientList recipients; | 57 RecipientList recipients; |
56 // The notification data payload. | 58 // The notification data payload. |
57 std::string data; | 59 std::string data; |
58 | 60 |
59 bool Equals(const Notification& other) const; | 61 bool Equals(const Notification& other) const; |
60 std::string ToString() const; | 62 std::string ToString() const; |
61 }; | 63 }; |
62 | 64 |
63 } // namespace notifier | 65 } // namespace notifier |
64 | 66 |
65 #endif // JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ | 67 #endif // JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ |
OLD | NEW |