summaryrefslogtreecommitdiff
path: root/include/wolf/errors.h
blob: c53119fd4f4e419f075d490989d03ca8222eb83b (plain)
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
/*
    Copyright (C) 2008 Andreas Baumann <abaumann@yahoo.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef WOLF_ERRORS_H
#define WOLF_ERRORS_H

/**
 * @addtogroup wolf_error Common error states
 * @{
 */

/**
 * @file errors.h
 * @brief Global Error States
 * @author Andreas Baumann <abaumann@yahoo.com>
 */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Possible error codes of the various libwolf libraries.
 */
typedef enum {
	WOLF_OK			=  0,	/**< no error, everything is fine */
	WOLF_ERR_OUT_OF_MEMORY	= -1,	/**< out of memory in malloc */
	WOLF_ERR_INVALID_STATE	= -2,	/**< the object is called in an illegal moment */
	WOLF_ERR_INVALID_VALUE	= -3,	/**< invalid parameter to a function */
	WOLF_ERR_INTERNAL	= -4,	/**< internal error of the object, usualy rare */
	WOLF_ERR_PROGRAMMING	= -5,	/**< programming mistake, should not happen */
	WOLF_ERR_NOT_IMPLEMENTED= -6,	/**< not implemented yet */
	WOLF_ERR_TIMEOUT	= -7	/**< timeout */
} wolf_error_t;

#ifdef __cplusplus
}
#endif

/** @} */ /* @addtogroup wolf_error */

#endif /* ifndef WOLF_ERRORS_H */