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