OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 struct OutgoingMessage { | 92 struct OutgoingMessage { |
93 OutgoingMessage(); | 93 OutgoingMessage(); |
94 ~OutgoingMessage(); | 94 ~OutgoingMessage(); |
95 | 95 |
96 // Message ID. | 96 // Message ID. |
97 std::string id; | 97 std::string id; |
98 // In seconds. | 98 // In seconds. |
99 int time_to_live; | 99 int time_to_live; |
100 MessageData data; | 100 MessageData data; |
101 | 101 |
102 static const int kMaximumTTL = 4 * 7 * 24 * 60 * 60; // 4 weeks. | 102 static const int kMaximumTTL; |
103 }; | 103 }; |
104 | 104 |
105 // Message being received from the other party. | 105 // Message being received from the other party. |
106 struct IncomingMessage { | 106 struct IncomingMessage { |
107 IncomingMessage(); | 107 IncomingMessage(); |
108 ~IncomingMessage(); | 108 ~IncomingMessage(); |
109 | 109 |
110 MessageData data; | 110 MessageData data; |
111 std::string collapse_key; | 111 std::string collapse_key; |
112 std::string sender_id; | 112 std::string sender_id; |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0; | 289 virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0; |
290 | 290 |
291 // Removes the account mapping related to |account_id| from the persistent | 291 // Removes the account mapping related to |account_id| from the persistent |
292 // store. | 292 // store. |
293 virtual void RemoveAccountMapping(const std::string& account_id) = 0; | 293 virtual void RemoveAccountMapping(const std::string& account_id) = 0; |
294 }; | 294 }; |
295 | 295 |
296 } // namespace gcm | 296 } // namespace gcm |
297 | 297 |
298 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 298 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
OLD | NEW |