/
nyx_error.h
74 lines (64 loc) · 2.44 KB
/
nyx_error.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
/**
* @file nyx_error.h
*
*/
/**
* @brief Nyx's public error interface.
*
*/
#ifndef _NYX_ERROR_H_
#define _NYX_ERROR_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup nyx_error_public Errors
* @ingroup nyx_public
* @{
*/
/**
* Error codes returned from Nyx API functions.
*/
typedef enum {
NYX_ERROR_NONE, /**< Operation successful */
NYX_ERROR_INVALID_HANDLE, /**< Invalid handle passed to an API function */
NYX_ERROR_WRONG_DEVICE_TYPE, /**< Operation not defined for the supplied device */
NYX_ERROR_DEVICE_NOT_EXIST, /**< Device does not exist */
NYX_ERROR_TOO_MANY_OPENS, /**< Reached maximum opens allowed on device */
NYX_ERROR_OUT_OF_MEMORY, /**< Out of memory */
NYX_ERROR_DEVICE_UNAVAILABLE, /**< Device not present OR Connection to device not available */
NYX_ERROR_UNSUPPORTED_DEVICE_TYPE, /**< No support for this device type currently */
NYX_ERROR_INVALID_VALUE, /**< Value passed to an API function is not valid */
NYX_ERROR_NOT_IMPLEMENTED, /**< The method/function has not been implemented by module */
NYX_ERROR_INVALID_EVENT_TYPE, /**< Event is of a wrong type for this operation */
NYX_ERROR_INVALID_OPERATION, /**< This operation cannot be performed at this time */
NYX_ERROR_INVALID_FILE_ACCESS, /**< The requested access to the file is not allowed >**/
NYX_ERROR_VALUE_OUT_OF_RANGE, /**< The resulting value was out of range >**/
NYX_ERROR_NOT_FOUND, /**< Could not find the requested value >**/
NYX_ERROR_GENERIC, /**< Generic NYX_LOG_ERROR */
NYX_ERROR_ALREADY_UP_TO_DATE, /**< Firmware is already up-to-date */
NYX_ERROR_BAD_CHECKSUM, /**< Bad checksum */
NYX_ERROR_INCOMPATIBLE_LIBRARY, /**< The available nyx-lib is incompatible with the ABI the caller or module expects */
} nyx_error_t;
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* _NYX_ERROR_H_ */