OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 // | |
5 // Sync protocol datatype extension for push notifications.. | |
6 | |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | |
8 // any fields in this file. | |
9 | |
10 syntax = "proto2"; | |
11 | |
12 option optimize_for = LITE_RUNTIME; | |
13 option retain_unknown_fields = true; | |
14 | |
15 package sync_pb; | |
16 | |
17 import "server_render.proto"; | |
18 | |
Nicolas Zea
2013/01/05 01:18:48
remove extra newline
Pete Williamson
2013/01/18 18:58:39
Done.
| |
19 | |
20 // This message allows clients to identify a notification they have created. | |
21 // IMPORTANT: Everything in this message may be sent to the client in clear text | |
22 // - do not expose any user ids, internal product names, credit card numbers, | |
23 // etc... anywhere in the message. | |
24 message Identifier { | |
Nicolas Zea
2013/01/05 01:18:48
Given that these are all going to be part of the s
Pete Williamson
2013/01/18 18:58:39
Done.
| |
25 // The application that the notification is a part of. | |
26 // | |
27 // IMPORTANT: This string may be sent to the client in clear text - do not | |
28 // expose any user ids, internal product names, credit card numbers, etc... | |
29 optional string app_id = 1; | |
30 | |
31 // Notifications with the same coalescing key (isolated to the same app_id) | |
32 // will be grouped together when fetched. | |
33 // | |
34 // IMPORTANT: This string may be sent to the client in clear text - do not | |
35 // expose any user ids, internal product names, credit card numbers, etc... | |
36 optional string coalescing_key = 2; | |
37 } | |
38 | |
39 message Notification { | |
40 // The unique identifier to identify the notification. | |
41 optional Identifier id = 1; | |
42 | |
43 // A secondary type that is isolated within the same app_id. | |
44 // | |
45 // NOTE: For ASBE support purposes this must be in the format [A-Za-z_]+. | |
46 // | |
47 // IMPORTANT: This string may be sent to the client in clear text - do not | |
48 // expose any user ids, internal product names, credit card numbers, etc... | |
49 optional string type = 2; | |
50 | |
51 // Whatever string the client entered during creation. If no external_id is | |
52 // specified, the notification can no longer be identified individually for | |
53 // fetching/deleting, etc... | |
54 // | |
55 // IMPORTANT: This string may be sent to the client in clear text - do not | |
56 // expose any user ids, internal product names, credit card numbers, etc... | |
57 optional string external_id = 3; | |
58 } | |
59 | |
60 message CoalescedNotification { | |
61 // The identifier used to identify individual coalesced notifications. | |
62 optional Identifier id = 1; | |
63 | |
64 // All the notifications that are grouped together. | |
65 repeated Notification notification = 2; | |
66 | |
67 // Data that is used directly by endpoints to render notifications in the case | |
68 // where no "native" app can handle the notification. | |
69 optional RenderInfo render_info = 3; | |
70 | |
71 // Read state will be per coalesced notification. | |
72 enum ReadState { | |
73 UNREAD = 1; | |
74 READ = 2; | |
75 DISMISSED = 3; | |
76 } | |
77 optional ReadState read_state = 4; | |
78 | |
79 // The time when the LATEST notification of the coalesced notification is | |
80 // created (in Java time milliseconds). | |
81 optional uint64 creation_time_msec = 5; | |
82 } | |
OLD | NEW |