Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / components / gcm_driver / common / gcm_messages.h
blob8d8c5b957c0664f803cb02929e49eccce5d5a1a7
1 // Copyright 2015 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.
5 #ifndef COMPONENTS_GCM_DRIVER_COMMON_GCM_MESSAGES_H_
6 #define COMPONENTS_GCM_DRIVER_COMMON_GCM_MESSAGES_H_
8 #include <map>
9 #include <string>
11 #include "components/gcm_driver/common/gcm_driver_export.h"
13 namespace gcm {
15 // Message data consisting of key-value pairs.
16 typedef std::map<std::string, std::string> MessageData;
18 // Message to be delivered to the other party.
19 struct GCM_DRIVER_EXPORT OutgoingMessage {
20 OutgoingMessage();
21 ~OutgoingMessage();
23 // Message ID.
24 std::string id;
25 // In seconds.
26 int time_to_live;
27 MessageData data;
29 static const int kMaximumTTL;
32 // Message being received from the other party.
33 struct GCM_DRIVER_EXPORT IncomingMessage {
34 IncomingMessage();
35 ~IncomingMessage();
37 MessageData data;
38 std::string collapse_key;
39 std::string sender_id;
40 std::string raw_data;
43 } // namespace gcm
45 #endif // COMPONENTS_GCM_DRIVER_COMMON_GCM_MESSAGES_H_