Commit | Line | Data |
---|---|---|
fb25b9e3 | 1 | /* |
9df34b44 PP |
2 | * No include guards here: it is safe to include this file multiple |
3 | * times. | |
fb25b9e3 PP |
4 | */ |
5 | ||
6 | /* | |
0dcb770f | 7 | * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation |
fb25b9e3 PP |
8 | * |
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
10 | * of this software and associated documentation files (the "Software"), to deal | |
11 | * in the Software without restriction, including without limitation the rights | |
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
13 | * copies of the Software, and to permit persons to whom the Software is | |
14 | * furnished to do so, subject to the following conditions: | |
15 | * | |
16 | * The above copyright notice and this permission notice shall be included in | |
17 | * all copies or substantial portions of the Software. | |
18 | * | |
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
25 | * SOFTWARE. | |
26 | */ | |
27 | ||
9df34b44 PP |
28 | #ifndef __BT_IN_BABELTRACE_H |
29 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
fb25b9e3 PP |
30 | #endif |
31 | ||
32 | /* | |
33 | * This is NOT part of the API. | |
34 | * | |
35 | * Do NOT use a `__BT_FUNC_STATUS_*` value in user code: this inhibits | |
36 | * precious type checking. | |
37 | */ | |
38 | ||
39 | /* Value is too large for the given data type */ | |
9df34b44 PP |
40 | #ifndef __BT_FUNC_STATUS_OVERFLOW |
41 | # define __BT_FUNC_STATUS_OVERFLOW -75 | |
42 | #endif | |
fb25b9e3 | 43 | |
fb25b9e3 | 44 | /* Invalid query object */ |
9df34b44 PP |
45 | #ifndef __BT_FUNC_STATUS_INVALID_OBJECT |
46 | # define __BT_FUNC_STATUS_INVALID_OBJECT -23 | |
47 | #endif | |
fb25b9e3 PP |
48 | |
49 | /* Memory allocation error */ | |
9df34b44 PP |
50 | #ifndef __BT_FUNC_STATUS_MEMORY_ERROR |
51 | # define __BT_FUNC_STATUS_MEMORY_ERROR -12 | |
52 | #endif | |
fb25b9e3 | 53 | |
fb25b9e3 | 54 | /* General error */ |
9df34b44 PP |
55 | #ifndef __BT_FUNC_STATUS_ERROR |
56 | # define __BT_FUNC_STATUS_ERROR -1 | |
57 | #endif | |
fb25b9e3 PP |
58 | |
59 | /* Saul Goodman */ | |
9df34b44 PP |
60 | #ifndef __BT_FUNC_STATUS_OK |
61 | # define __BT_FUNC_STATUS_OK 0 | |
62 | #endif | |
fb25b9e3 PP |
63 | |
64 | /* End of iteration/consumption */ | |
9df34b44 PP |
65 | #ifndef __BT_FUNC_STATUS_END |
66 | # define __BT_FUNC_STATUS_END 1 | |
67 | #endif | |
fb25b9e3 PP |
68 | |
69 | /* Something can't be found */ | |
9df34b44 PP |
70 | #ifndef __BT_FUNC_STATUS_NOT_FOUND |
71 | # define __BT_FUNC_STATUS_NOT_FOUND 2 | |
72 | #endif | |
fb25b9e3 | 73 | |
d73bb381 PP |
74 | /* Object is interrupted */ |
75 | #ifndef __BT_FUNC_STATUS_INTERRUPTED | |
76 | # define __BT_FUNC_STATUS_INTERRUPTED 4 | |
77 | #endif | |
78 | ||
fb25b9e3 | 79 | /* Try operation again later */ |
9df34b44 PP |
80 | #ifndef __BT_FUNC_STATUS_AGAIN |
81 | # define __BT_FUNC_STATUS_AGAIN 11 | |
82 | #endif |