OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DRIVE_GDATA_ERRORCODE_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_DRIVE_API_ERROR_CODES_H_ |
6 #define GOOGLE_APIS_DRIVE_GDATA_ERRORCODE_H_ | 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_ERROR_CODES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace google_apis { | 10 namespace google_apis { |
11 | 11 |
12 // HTTP errors that can be returned by GData service. | 12 // HTTP errors that can be returned by Drive API service. |
13 enum GDataErrorCode { | 13 enum DriveApiErrorCode { |
14 HTTP_SUCCESS = 200, | 14 HTTP_SUCCESS = 200, |
15 HTTP_CREATED = 201, | 15 HTTP_CREATED = 201, |
16 HTTP_NO_CONTENT = 204, | 16 HTTP_NO_CONTENT = 204, |
17 HTTP_FOUND = 302, | 17 HTTP_FOUND = 302, |
18 HTTP_NOT_MODIFIED = 304, | 18 HTTP_NOT_MODIFIED = 304, |
19 HTTP_RESUME_INCOMPLETE = 308, | 19 HTTP_RESUME_INCOMPLETE = 308, |
20 HTTP_BAD_REQUEST = 400, | 20 HTTP_BAD_REQUEST = 400, |
21 HTTP_UNAUTHORIZED = 401, | 21 HTTP_UNAUTHORIZED = 401, |
22 HTTP_FORBIDDEN = 403, | 22 HTTP_FORBIDDEN = 403, |
23 HTTP_NOT_FOUND = 404, | 23 HTTP_NOT_FOUND = 404, |
24 HTTP_CONFLICT = 409, | 24 HTTP_CONFLICT = 409, |
25 HTTP_GONE = 410, | 25 HTTP_GONE = 410, |
26 HTTP_LENGTH_REQUIRED = 411, | 26 HTTP_LENGTH_REQUIRED = 411, |
27 HTTP_PRECONDITION = 412, | 27 HTTP_PRECONDITION = 412, |
28 HTTP_INTERNAL_SERVER_ERROR = 500, | 28 HTTP_INTERNAL_SERVER_ERROR = 500, |
29 HTTP_NOT_IMPLEMENTED = 501, | 29 HTTP_NOT_IMPLEMENTED = 501, |
30 HTTP_BAD_GATEWAY = 502, | 30 HTTP_BAD_GATEWAY = 502, |
31 HTTP_SERVICE_UNAVAILABLE = 503, | 31 HTTP_SERVICE_UNAVAILABLE = 503, |
32 GDATA_PARSE_ERROR = -100, | 32 DRIVE_PARSE_ERROR = -100, |
33 GDATA_FILE_ERROR = -101, | 33 DRIVE_FILE_ERROR = -101, |
34 GDATA_CANCELLED = -102, | 34 DRIVE_CANCELLED = -102, |
35 GDATA_OTHER_ERROR = -103, | 35 DRIVE_OTHER_ERROR = -103, |
36 GDATA_NO_CONNECTION = -104, | 36 DRIVE_NO_CONNECTION = -104, |
37 GDATA_NOT_READY = -105, | 37 DRIVE_NOT_READY = -105, |
38 GDATA_NO_SPACE = -106, | 38 DRIVE_NO_SPACE = -106, |
39 }; | 39 }; |
40 | 40 |
41 // Returns a string representation of GDataErrorCode. | 41 // Returns a string representation of DriveApiErrorCode. |
42 std::string GDataErrorCodeToString(GDataErrorCode error); | 42 std::string DriveApiErrorCodeToString(DriveApiErrorCode error); |
43 | 43 |
44 } // namespace google_apis | 44 } // namespace google_apis |
45 | 45 |
46 #endif // GOOGLE_APIS_DRIVE_GDATA_ERRORCODE_H_ | 46 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_ERROR_CODES_H_ |
OLD | NEW |