| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // Interface that encapsulates the network communications with the Google Cloud | 35 // Interface that encapsulates the network communications with the Google Cloud |
| 36 // Messaging server. This interface is not supposed to be thread-safe. | 36 // Messaging server. This interface is not supposed to be thread-safe. |
| 37 class GCM_EXPORT GCMClient { | 37 class GCM_EXPORT GCMClient { |
| 38 public: | 38 public: |
| 39 enum Result { | 39 enum Result { |
| 40 // Successful operation. | 40 // Successful operation. |
| 41 SUCCESS, | 41 SUCCESS, |
| 42 // Invalid parameter. | 42 // Invalid parameter. |
| 43 INVALID_PARAMETER, | 43 INVALID_PARAMETER, |
| 44 // GCM is disabled. |
| 45 GCM_DISABLED, |
| 44 // Profile not signed in. | 46 // Profile not signed in. |
| 45 NOT_SIGNED_IN, | 47 NOT_SIGNED_IN, |
| 46 // Previous asynchronous operation is still pending to finish. Certain | 48 // Previous asynchronous operation is still pending to finish. Certain |
| 47 // operation, like register, is only allowed one at a time. | 49 // operation, like register, is only allowed one at a time. |
| 48 ASYNC_OPERATION_PENDING, | 50 ASYNC_OPERATION_PENDING, |
| 49 // Network socket error. | 51 // Network socket error. |
| 50 NETWORK_ERROR, | 52 NETWORK_ERROR, |
| 51 // Problem at the server. | 53 // Problem at the server. |
| 52 SERVER_ERROR, | 54 SERVER_ERROR, |
| 53 // Exceeded the specified TTL during message sending. | 55 // Exceeded the specified TTL during message sending. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // Clear all recorded GCM activity logs. | 232 // Clear all recorded GCM activity logs. |
| 231 virtual void ClearActivityLogs() = 0; | 233 virtual void ClearActivityLogs() = 0; |
| 232 | 234 |
| 233 // Gets internal states and statistics. | 235 // Gets internal states and statistics. |
| 234 virtual GCMStatistics GetStatistics() const = 0; | 236 virtual GCMStatistics GetStatistics() const = 0; |
| 235 }; | 237 }; |
| 236 | 238 |
| 237 } // namespace gcm | 239 } // namespace gcm |
| 238 | 240 |
| 239 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 241 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
| OLD | NEW |