1 #ifndef BABELTRACE_GRAPH_COMPONENT_CLASS_H
2 #define BABELTRACE_GRAPH_COMPONENT_CLASS_H
5 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
6 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 /* For bt_component_class */
28 #include <babeltrace2/types.h>
30 /* For __BT_FUNC_STATUS_* */
31 #define __BT_FUNC_STATUS_ENABLE
32 #include <babeltrace2/func-status.h>
33 #undef __BT_FUNC_STATUS_ENABLE
39 typedef enum bt_component_class_init_method_status
{
40 BT_COMPONENT_CLASS_INIT_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
41 BT_COMPONENT_CLASS_INIT_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
42 BT_COMPONENT_CLASS_INIT_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
43 } bt_component_class_init_method_status
;
45 typedef enum bt_component_class_port_connected_method_status
{
46 BT_COMPONENT_CLASS_PORT_CONNECTED_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
47 BT_COMPONENT_CLASS_PORT_CONNECTED_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
48 BT_COMPONENT_CLASS_PORT_CONNECTED_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
49 } bt_component_class_port_connected_method_status
;
51 typedef enum bt_component_class_query_method_status
{
52 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
53 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_AGAIN
= __BT_FUNC_STATUS_AGAIN
,
54 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
55 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
56 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_INVALID_OBJECT
= __BT_FUNC_STATUS_INVALID_OBJECT
,
57 BT_COMPONENT_CLASS_QUERY_METHOD_STATUS_INVALID_PARAMS
= __BT_FUNC_STATUS_INVALID_PARAMS
,
58 } bt_component_class_query_method_status
;
60 typedef enum bt_component_class_message_iterator_init_method_status
{
61 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
62 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
63 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
64 } bt_component_class_message_iterator_init_method_status
;
66 typedef enum bt_component_class_message_iterator_next_method_status
{
67 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
68 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_AGAIN
= __BT_FUNC_STATUS_AGAIN
,
69 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
70 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
71 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_END
= __BT_FUNC_STATUS_END
,
72 } bt_component_class_message_iterator_next_method_status
;
74 typedef enum bt_component_class_message_iterator_seek_beginning_method_status
{
75 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
76 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_STATUS_AGAIN
= __BT_FUNC_STATUS_AGAIN
,
77 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
78 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
79 } bt_component_class_message_iterator_seek_beginning_method_status
;
81 typedef enum bt_component_class_message_iterator_seek_ns_from_origin_method_status
{
82 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
83 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_STATUS_AGAIN
= __BT_FUNC_STATUS_AGAIN
,
84 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
85 BT_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
86 } bt_component_class_message_iterator_seek_ns_from_origin_method_status
;
88 typedef enum bt_component_class_set_method_status
{
89 BT_COMPONENT_CLASS_SET_METHOD_STATUS_OK
= __BT_FUNC_STATUS_OK
,
90 } bt_component_class_set_method_status
;
92 typedef enum bt_component_class_set_description_status
{
93 BT_COMPONENT_CLASS_SET_DESCRIPTION_STATUS_OK
= __BT_FUNC_STATUS_OK
,
94 BT_COMPONENT_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
95 } bt_component_class_set_description_status
;
97 extern bt_component_class_set_description_status
98 bt_component_class_set_description(bt_component_class
*component_class
,
99 const char *description
);
101 typedef enum bt_component_class_set_help_status
{
102 BT_COMPONENT_CLASS_SET_HELP_STATUS_OK
= __BT_FUNC_STATUS_OK
,
103 BT_COMPONENT_CLASS_SET_HELP_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
104 } bt_component_class_set_help_status
;
106 extern bt_component_class_set_help_status
bt_component_class_set_help(
107 bt_component_class
*component_class
,
114 #include <babeltrace2/undef-func-status.h>
116 #endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_H */