libfswatch  1.9.3
error.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015 Enrico M. Crisostomo
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free Software
6  * Foundation; either version 3, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU General Public License along with
14  * this program. If not, see <http://www.gnu.org/licenses/>.
15  */
27 #ifndef FSW__ERROR_H
28 # define FSW__ERROR_H
29 
30 # ifdef __cplusplus
31 extern "C"
32 {
33 # endif
34 
35 // Error codes
36 # define FSW_OK 0
37 # define FSW_ERR_UNKNOWN_ERROR (1 << 0)
38 # define FSW_ERR_SESSION_UNKNOWN (1 << 1)
39 # define FSW_ERR_MONITOR_ALREADY_EXISTS (1 << 2)
40 # define FSW_ERR_MEMORY (1 << 3)
41 # define FSW_ERR_UNKNOWN_MONITOR_TYPE (1 << 4)
42 # define FSW_ERR_CALLBACK_NOT_SET (1 << 5)
43 # define FSW_ERR_PATHS_NOT_SET (1 << 6)
44 # define FSW_ERR_MISSING_CONTEXT (1 << 7)
45 # define FSW_ERR_INVALID_PATH (1 << 8)
46 # define FSW_ERR_INVALID_CALLBACK (1 << 9)
47 # define FSW_ERR_INVALID_LATENCY (1 << 10)
48 # define FSW_ERR_INVALID_REGEX (1 << 11)
49 # define FSW_ERR_MONITOR_ALREADY_RUNNING (1 << 12)
50 # define FSW_ERR_UNKNOWN_VALUE (1 << 13)
51 # define FSW_ERR_INVALID_PROPERTY (1 << 14)
53 # ifdef __cplusplus
54 }
55 # endif
56 
57 #endif /* FSW__ERROR_H */