| 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 GOOGLE_APIS_GCM_GCM_ACTIVITY_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_ |
| 6 #define GOOGLE_APIS_GCM_GCM_ACTIVITY_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "google_apis/gcm/base/gcm_export.h" | |
| 13 | 12 |
| 14 namespace gcm { | 13 namespace gcm { |
| 15 | 14 |
| 16 // Contains data that are common to all activity kinds below. | 15 // Contains data that are common to all activity kinds below. |
| 17 struct GCM_EXPORT Activity { | 16 struct Activity { |
| 18 Activity(); | 17 Activity(); |
| 19 virtual ~Activity(); | 18 virtual ~Activity(); |
| 20 | 19 |
| 21 base::Time time; | 20 base::Time time; |
| 22 std::string event; // A short description of the event. | 21 std::string event; // A short description of the event. |
| 23 std::string details; // Any additional detail about the event. | 22 std::string details; // Any additional detail about the event. |
| 24 }; | 23 }; |
| 25 | 24 |
| 26 // Contains relevant data of a connection activity. | 25 // Contains relevant data of a connection activity. |
| 27 struct GCM_EXPORT ConnectionActivity : Activity { | 26 struct ConnectionActivity : Activity { |
| 28 ConnectionActivity(); | 27 ConnectionActivity(); |
| 29 virtual ~ConnectionActivity(); | 28 virtual ~ConnectionActivity(); |
| 30 }; | 29 }; |
| 31 | 30 |
| 32 // Contains relevant data of a check-in activity. | 31 // Contains relevant data of a check-in activity. |
| 33 struct GCM_EXPORT CheckinActivity : Activity { | 32 struct CheckinActivity : Activity { |
| 34 CheckinActivity(); | 33 CheckinActivity(); |
| 35 virtual ~CheckinActivity(); | 34 virtual ~CheckinActivity(); |
| 36 }; | 35 }; |
| 37 | 36 |
| 38 // Contains relevant data of a registration/unregistration step. | 37 // Contains relevant data of a registration/unregistration step. |
| 39 struct GCM_EXPORT RegistrationActivity : Activity { | 38 struct RegistrationActivity : Activity { |
| 40 RegistrationActivity(); | 39 RegistrationActivity(); |
| 41 virtual ~RegistrationActivity(); | 40 virtual ~RegistrationActivity(); |
| 42 | 41 |
| 43 std::string app_id; | 42 std::string app_id; |
| 44 std::string sender_ids; // Comma separated sender ids. | 43 std::string sender_ids; // Comma separated sender ids. |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 // Contains relevant data of a message receiving event. | 46 // Contains relevant data of a message receiving event. |
| 48 struct GCM_EXPORT ReceivingActivity : Activity { | 47 struct ReceivingActivity : Activity { |
| 49 ReceivingActivity(); | 48 ReceivingActivity(); |
| 50 virtual ~ReceivingActivity(); | 49 virtual ~ReceivingActivity(); |
| 51 | 50 |
| 52 std::string app_id; | 51 std::string app_id; |
| 53 std::string from; | 52 std::string from; |
| 54 int message_byte_size; | 53 int message_byte_size; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 // Contains relevant data of a send-message step. | 56 // Contains relevant data of a send-message step. |
| 58 struct GCM_EXPORT SendingActivity : Activity { | 57 struct SendingActivity : Activity { |
| 59 SendingActivity(); | 58 SendingActivity(); |
| 60 virtual ~SendingActivity(); | 59 virtual ~SendingActivity(); |
| 61 | 60 |
| 62 std::string app_id; | 61 std::string app_id; |
| 63 std::string receiver_id; | 62 std::string receiver_id; |
| 64 std::string message_id; | 63 std::string message_id; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 struct GCM_EXPORT RecordedActivities { | 66 struct RecordedActivities { |
| 68 RecordedActivities(); | 67 RecordedActivities(); |
| 69 virtual ~RecordedActivities(); | 68 virtual ~RecordedActivities(); |
| 70 | 69 |
| 71 std::vector<CheckinActivity> checkin_activities; | 70 std::vector<CheckinActivity> checkin_activities; |
| 72 std::vector<ConnectionActivity> connection_activities; | 71 std::vector<ConnectionActivity> connection_activities; |
| 73 std::vector<RegistrationActivity> registration_activities; | 72 std::vector<RegistrationActivity> registration_activities; |
| 74 std::vector<ReceivingActivity> receiving_activities; | 73 std::vector<ReceivingActivity> receiving_activities; |
| 75 std::vector<SendingActivity> sending_activities; | 74 std::vector<SendingActivity> sending_activities; |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 } // namespace gcm | 77 } // namespace gcm |
| 79 | 78 |
| 80 #endif // GOOGLE_APIS_GCM_GCM_ACTIVITY_H_ | 79 #endif // COMPONENTS_GCM_DRIVER_GCM_ACTIVITY_H_ |
| OLD | NEW |