2 * No include guards here: this header is included by a public header to
3 * get the `__BT_FUNC_STATUS_*` definitions locally, and then
4 * <babeltrace2/undef-func-status.h> is included at the end of the
5 * header to undefine all those definitions.
7 * If we forget to include <babeltrace2/undef-func-status.h> at the end
8 * of a public header, we want to get the "redefined" compiler warning
13 * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
15 * Permission is hereby granted, free of charge, to any person obtaining a copy
16 * of this software and associated documentation files (the "Software"), to deal
17 * in the Software without restriction, including without limitation the rights
18 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 * copies of the Software, and to permit persons to whom the Software is
20 * furnished to do so, subject to the following conditions:
22 * The above copyright notice and this permission notice shall be included in
23 * all copies or substantial portions of the Software.
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35 * This is just extra protection, in case the user tries to include
36 * <babeltrace2/func-status.h> in user code: this is a redminder that
37 * this header is reserved for internal use.
39 * The correct way for a public header to include this is:
41 * #define __BT_FUNC_STATUS_ENABLE
42 * #include <babeltrace2/func-status.h>
43 * #undef __BT_FUNC_STATUS_ENABLE
45 #ifndef __BT_FUNC_STATUS_ENABLE
46 # error Do NOT include <babeltrace2/func-status.h> in user code.
50 * This is NOT part of the API.
52 * Do NOT use a `__BT_FUNC_STATUS_*` value in user code: this inhibits
53 * precious type checking.
56 /* Value is too large for the given data type */
57 #define __BT_FUNC_STATUS_OVERFLOW -75
59 /* Invalid query parameters */
60 #define __BT_FUNC_STATUS_INVALID_PARAMS -24
62 /* Invalid query object */
63 #define __BT_FUNC_STATUS_INVALID_OBJECT -23
65 /* Memory allocation error */
66 #define __BT_FUNC_STATUS_MEMORY_ERROR -12
68 /* Plugin loading error */
69 #define __BT_FUNC_STATUS_LOADING_ERROR -2
72 #define __BT_FUNC_STATUS_ERROR -1
75 #define __BT_FUNC_STATUS_OK 0
77 /* End of iteration/consumption */
78 #define __BT_FUNC_STATUS_END 1
80 /* Something can't be found */
81 #define __BT_FUNC_STATUS_NOT_FOUND 2
83 /* Try operation again later */
84 #define __BT_FUNC_STATUS_AGAIN 11
86 /* Unsupported operation */
87 #define __BT_FUNC_STATUS_UNSUPPORTED 95
89 /* Object is canceled */
90 #define __BT_FUNC_STATUS_CANCELED 125
This page took 0.03203 seconds and 4 git commands to generate.