| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 |
| 6 /* From pp_errors.idl modified Sat Jul 16 16:50:26 2011. */ |
| 7 |
| 5 #ifndef PPAPI_C_PP_ERRORS_H_ | 8 #ifndef PPAPI_C_PP_ERRORS_H_ |
| 6 #define PPAPI_C_PP_ERRORS_H_ | 9 #define PPAPI_C_PP_ERRORS_H_ |
| 7 | 10 |
| 11 #include "ppapi/c/pp_macros.h" |
| 12 |
| 8 /** | 13 /** |
| 9 * @file | 14 * @file |
| 10 * This file defines an enumeration of all PPAPI error codes. | 15 * This file defines an enumeration of all PPAPI error codes. |
| 11 */ | 16 */ |
| 12 | 17 |
| 18 |
| 13 /** | 19 /** |
| 14 * | |
| 15 * @addtogroup Enums | 20 * @addtogroup Enums |
| 16 * @{ | 21 * @{ |
| 17 */ | 22 */ |
| 18 | |
| 19 /** | 23 /** |
| 20 * This enumeration contains enumerators of all PPAPI error codes. | 24 * This enumeration contains enumerators of all PPAPI error codes. |
| 21 * Errors are negative valued. | 25 * Errors are negative valued. |
| 22 */ | 26 */ |
| 23 enum { | 27 enum { |
| 24 /** | 28 /** |
| 25 * This value is returned by a function on successful synchronous completion | 29 * This value is returned by a function on successful synchronous completion |
| 26 * or is passed as a result to a PP_CompletionCallback_Func on successful | 30 * or is passed as a result to a PP_CompletionCallback_Func on successful |
| 27 * asynchronous completion. | 31 * asynchronous completion. |
| 28 */ | 32 */ |
| 29 PP_OK = 0, | 33 PP_OK = 0, |
| 30 | |
| 31 /** | 34 /** |
| 32 * This value is returned by a function that accepts a PP_CompletionCallback | 35 * This value is returned by a function that accepts a PP_CompletionCallback |
| 33 * and cannot complete synchronously. This code indicates that the given | 36 * and cannot complete synchronously. This code indicates that the given |
| 34 * callback will be asynchronously notified of the final result once it is | 37 * callback will be asynchronously notified of the final result once it is |
| 35 * available. | 38 * available. |
| 36 */ | 39 */ |
| 37 PP_OK_COMPLETIONPENDING = -1, | 40 PP_OK_COMPLETIONPENDING = -1, |
| 38 | |
| 39 /** This value indicates failure for unspecified reasons. */ | 41 /** This value indicates failure for unspecified reasons. */ |
| 40 PP_ERROR_FAILED = -2, | 42 PP_ERROR_FAILED = -2, |
| 41 | |
| 42 /** | 43 /** |
| 43 * This value indicates failure due to an asynchronous operation being | 44 * This value indicates failure due to an asynchronous operation being |
| 44 * interrupted, typically as a result of user action. | 45 * interrupted, typically as a result of user action. |
| 45 */ | 46 */ |
| 46 PP_ERROR_ABORTED = -3, | 47 PP_ERROR_ABORTED = -3, |
| 47 | |
| 48 /** This value indicates failure due to an invalid argument. */ | 48 /** This value indicates failure due to an invalid argument. */ |
| 49 PP_ERROR_BADARGUMENT = -4, | 49 PP_ERROR_BADARGUMENT = -4, |
| 50 | |
| 51 /** This value indicates failure due to an invalid PP_Resource. */ | 50 /** This value indicates failure due to an invalid PP_Resource. */ |
| 52 PP_ERROR_BADRESOURCE = -5, | 51 PP_ERROR_BADRESOURCE = -5, |
| 53 | |
| 54 /** This value indicates failure due to an unavailable PPAPI interface. */ | 52 /** This value indicates failure due to an unavailable PPAPI interface. */ |
| 55 PP_ERROR_NOINTERFACE = -6, | 53 PP_ERROR_NOINTERFACE = -6, |
| 56 | |
| 57 /** This value indicates failure due to insufficient privileges. */ | 54 /** This value indicates failure due to insufficient privileges. */ |
| 58 PP_ERROR_NOACCESS = -7, | 55 PP_ERROR_NOACCESS = -7, |
| 59 | |
| 60 /** This value indicates failure due to insufficient memory. */ | 56 /** This value indicates failure due to insufficient memory. */ |
| 61 PP_ERROR_NOMEMORY = -8, | 57 PP_ERROR_NOMEMORY = -8, |
| 62 | |
| 63 /** This value indicates failure due to insufficient storage space. */ | 58 /** This value indicates failure due to insufficient storage space. */ |
| 64 PP_ERROR_NOSPACE = -9, | 59 PP_ERROR_NOSPACE = -9, |
| 65 | |
| 66 /** This value indicates failure due to insufficient storage quota. */ | 60 /** This value indicates failure due to insufficient storage quota. */ |
| 67 PP_ERROR_NOQUOTA = -10, | 61 PP_ERROR_NOQUOTA = -10, |
| 68 | |
| 69 /** | 62 /** |
| 70 * This value indicates failure due to an action already being in | 63 * This value indicates failure due to an action already being in |
| 71 * progress. | 64 * progress. |
| 72 */ | 65 */ |
| 73 PP_ERROR_INPROGRESS = -11, | 66 PP_ERROR_INPROGRESS = -11, |
| 74 | 67 /** This value indicates failure due to a file that does not exist. */ |
| 75 /** | 68 /** |
| 76 * The requested command is not supported by the browser. | 69 * The requested command is not supported by the browser. |
| 77 */ | 70 */ |
| 78 PP_ERROR_NOTSUPPORTED = -12, | 71 PP_ERROR_NOTSUPPORTED = -12, |
| 79 | |
| 80 /** This value indicates failure due to a file that does not exist. */ | |
| 81 PP_ERROR_FILENOTFOUND = -20, | 72 PP_ERROR_FILENOTFOUND = -20, |
| 82 | |
| 83 /** This value indicates failure due to a file that already exists. */ | 73 /** This value indicates failure due to a file that already exists. */ |
| 84 PP_ERROR_FILEEXISTS = -21, | 74 PP_ERROR_FILEEXISTS = -21, |
| 85 | |
| 86 /** This value indicates failure due to a file that is too big. */ | 75 /** This value indicates failure due to a file that is too big. */ |
| 87 PP_ERROR_FILETOOBIG = -22, | 76 PP_ERROR_FILETOOBIG = -22, |
| 88 | |
| 89 /** | 77 /** |
| 90 * This value indicates failure due to a file having been modified | 78 * This value indicates failure due to a file having been modified |
| 91 * unexpectedly. | 79 * unexpectedly. |
| 92 */ | 80 */ |
| 93 PP_ERROR_FILECHANGED = -23, | 81 PP_ERROR_FILECHANGED = -23, |
| 94 | |
| 95 /** This value indicates failure due to a time limit being exceeded. */ | 82 /** This value indicates failure due to a time limit being exceeded. */ |
| 96 PP_ERROR_TIMEDOUT = -30, | 83 PP_ERROR_TIMEDOUT = -30, |
| 97 | |
| 98 /** | 84 /** |
| 99 * This value indicates that the user cancelled rather than providing | 85 * This value indicates that the user cancelled rather than providing |
| 100 * expected input. | 86 * expected input. |
| 101 */ | 87 */ |
| 102 PP_ERROR_USERCANCEL = -40 | 88 PP_ERROR_USERCANCEL = -40 |
| 103 }; | 89 }; |
| 104 | |
| 105 /** | 90 /** |
| 106 * @} | 91 * @} |
| 107 */ | 92 */ |
| 108 | 93 |
| 109 #endif /* PPAPI_C_PP_ERRORS_H_ */ | 94 #endif /* PPAPI_C_PP_ERRORS_H_ */ |
| 95 |
| OLD | NEW |