OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool is_recording; | 98 bool is_recording; |
99 bool gcm_client_created; | 99 bool gcm_client_created; |
100 std::string gcm_client_state; | 100 std::string gcm_client_state; |
101 bool connection_client_created; | 101 bool connection_client_created; |
102 std::string connection_state; | 102 std::string connection_state; |
103 uint64 android_id; | 103 uint64 android_id; |
104 std::vector<std::string> registered_app_ids; | 104 std::vector<std::string> registered_app_ids; |
105 int send_queue_size; | 105 int send_queue_size; |
106 int resend_queue_size; | 106 int resend_queue_size; |
107 | 107 |
108 std::vector<GCMStatsRecorder::SendingActivity> sending_activities; | 108 GCMStatsRecorder::RecordedActivities recorded_activities; |
109 }; | 109 }; |
110 | 110 |
111 // A delegate interface that allows the GCMClient instance to interact with | 111 // A delegate interface that allows the GCMClient instance to interact with |
112 // its caller, i.e. notifying asynchronous event. | 112 // its caller, i.e. notifying asynchronous event. |
113 class Delegate { | 113 class Delegate { |
114 public: | 114 public: |
115 // Called when the registration completed successfully or an error occurs. | 115 // Called when the registration completed successfully or an error occurs. |
116 // |app_id|: application ID. | 116 // |app_id|: application ID. |
117 // |registration_id|: non-empty if the registration completed successfully. | 117 // |registration_id|: non-empty if the registration completed successfully. |
118 // |result|: the type of the error if an error occured, success otherwise. | 118 // |result|: the type of the error if an error occured, success otherwise. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Clear all recorded GCM activity logs. | 221 // Clear all recorded GCM activity logs. |
222 virtual void ClearActivityLogs() = 0; | 222 virtual void ClearActivityLogs() = 0; |
223 | 223 |
224 // Gets internal states and statistics. | 224 // Gets internal states and statistics. |
225 virtual GCMStatistics GetStatistics() const = 0; | 225 virtual GCMStatistics GetStatistics() const = 0; |
226 }; | 226 }; |
227 | 227 |
228 } // namespace gcm | 228 } // namespace gcm |
229 | 229 |
230 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 230 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
OLD | NEW |