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> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" |
13 #include "google_apis/gcm/base/gcm_export.h" | 14 #include "google_apis/gcm/base/gcm_export.h" |
14 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" | 15 #include "google_apis/gcm/gcm_activity.h" |
15 | 16 |
16 template <class T> class scoped_refptr; | 17 template <class T> class scoped_refptr; |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class FilePath; | 20 class FilePath; |
20 class SequencedTaskRunner; | 21 class SequencedTaskRunner; |
21 } | 22 } |
22 | 23 |
23 namespace net { | 24 namespace net { |
24 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 bool is_recording; | 128 bool is_recording; |
128 bool gcm_client_created; | 129 bool gcm_client_created; |
129 std::string gcm_client_state; | 130 std::string gcm_client_state; |
130 bool connection_client_created; | 131 bool connection_client_created; |
131 std::string connection_state; | 132 std::string connection_state; |
132 uint64 android_id; | 133 uint64 android_id; |
133 std::vector<std::string> registered_app_ids; | 134 std::vector<std::string> registered_app_ids; |
134 int send_queue_size; | 135 int send_queue_size; |
135 int resend_queue_size; | 136 int resend_queue_size; |
136 | 137 |
137 GCMStatsRecorder::RecordedActivities recorded_activities; | 138 RecordedActivities recorded_activities; |
138 }; | 139 }; |
139 | 140 |
140 // A delegate interface that allows the GCMClient instance to interact with | 141 // A delegate interface that allows the GCMClient instance to interact with |
141 // its caller, i.e. notifying asynchronous event. | 142 // its caller, i.e. notifying asynchronous event. |
142 class Delegate { | 143 class Delegate { |
143 public: | 144 public: |
144 // Called when the registration completed successfully or an error occurs. | 145 // Called when the registration completed successfully or an error occurs. |
145 // |app_id|: application ID. | 146 // |app_id|: application ID. |
146 // |registration_id|: non-empty if the registration completed successfully. | 147 // |registration_id|: non-empty if the registration completed successfully. |
147 // |result|: the type of the error if an error occured, success otherwise. | 148 // |result|: the type of the error if an error occured, success otherwise. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // Clear all recorded GCM activity logs. | 256 // Clear all recorded GCM activity logs. |
256 virtual void ClearActivityLogs() = 0; | 257 virtual void ClearActivityLogs() = 0; |
257 | 258 |
258 // Gets internal states and statistics. | 259 // Gets internal states and statistics. |
259 virtual GCMStatistics GetStatistics() const = 0; | 260 virtual GCMStatistics GetStatistics() const = 0; |
260 }; | 261 }; |
261 | 262 |
262 } // namespace gcm | 263 } // namespace gcm |
263 | 264 |
264 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 265 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
OLD | NEW |