Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: jingle/notifier/listener/notification_defines.h

Issue 9234053: Revert 119171 - Maybe introduced a static initializer - or may be 119173 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
11 namespace notifier { 11 namespace notifier {
12 12
13 struct Subscription { 13 struct Subscription {
14 // The name of the channel to subscribe to; usually but not always 14 // The name of the channel to subscribe to; usually but not always
15 // a URL. 15 // a URL.
16 std::string channel; 16 std::string channel;
17 // A sender, which could be a domain or a bare JID, from which we 17 // A sender, which could be a domain or a bare JID, from which we
18 // will accept pushes. 18 // will accept pushes.
19 std::string from; 19 std::string from;
20 }; 20 };
21 21
22 typedef std::vector<Subscription> SubscriptionList; 22 typedef std::vector<Subscription> SubscriptionList;
23 23
24 // A structure representing a <recipient/> block within a push message.
25 struct Recipient {
26 // The bare jid of the recipient.
27 std::string to;
28 // User-specific data for the recipient.
29 std::string user_specific_data;
30 };
31
32 typedef std::vector<Recipient> RecipientList;
33
34 struct Notification { 24 struct Notification {
35 Notification();
36 ~Notification();
37
38 // The channel the notification is coming in on. 25 // The channel the notification is coming in on.
39 std::string channel; 26 std::string channel;
40 // Recipients for this notification (may be empty).
41 RecipientList recipients;
42 // The notification data payload. 27 // The notification data payload.
43 std::string data; 28 std::string data;
44 29
45 std::string ToString() const; 30 std::string ToString() const;
46 }; 31 };
47 32
48 } // namespace notifier 33 } // namespace notifier
49 34
50 #endif // JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_ 35 #endif // JINGLE_NOTIFIER_LISTENER_NOTIFICATION_DEFINES_H_
OLDNEW
« no previous file with comments | « jingle/notifier/base/fake_base_task.cc ('k') | jingle/notifier/listener/notification_defines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698