From 4cdfc5e86b64137d96c31495cbdea99801714c2b Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Sat, 8 Dec 2018 16:09:46 -0500 Subject: [PATCH] lib: add aliases for Babeltrace enumeration types And uses aliases in CLI, plugins, and tests. Signed-off-by: Philippe Proulx --- cli/babeltrace-cfg-cli-args.c | 12 ++-- cli/babeltrace-cfg.h | 2 +- cli/babeltrace.c | 32 +++++----- .../babeltrace/graph/component-class-const.h | 12 ++-- .../babeltrace/graph/component-class-filter.h | 22 +++---- .../babeltrace/graph/component-class-sink.h | 16 +++-- .../babeltrace/graph/component-class-source.h | 22 +++---- include/babeltrace/graph/component-class.h | 6 +- include/babeltrace/graph/component-const.h | 4 +- include/babeltrace/graph/graph-const.h | 4 +- include/babeltrace/graph/graph.h | 62 ++++++++----------- include/babeltrace/graph/message-const.h | 7 +-- .../graph/message-inactivity-const.h | 4 +- include/babeltrace/graph/message-iterator.h | 4 +- .../babeltrace/graph/message-stream-const.h | 6 +- include/babeltrace/graph/port-const.h | 6 +- include/babeltrace/graph/port-input-const.h | 3 +- include/babeltrace/graph/port-output-const.h | 3 +- .../graph/port-output-message-iterator.h | 4 +- .../babeltrace/graph/query-executor-const.h | 4 +- include/babeltrace/graph/query-executor.h | 6 +- .../babeltrace/graph/self-component-filter.h | 6 +- ...lf-component-port-input-message-iterator.h | 4 +- .../graph/self-component-port-input.h | 3 - .../graph/self-component-port-output.h | 3 - .../babeltrace/graph/self-component-port.h | 6 +- .../babeltrace/graph/self-component-sink.h | 4 +- .../babeltrace/graph/self-component-source.h | 4 +- include/babeltrace/graph/self-component.h | 4 +- .../babeltrace/graph/self-message-iterator.h | 4 +- include/babeltrace/logging.h | 10 +-- include/babeltrace/plugin/plugin-const.h | 16 +---- include/babeltrace/plugin/plugin-dev.h | 16 ++--- include/babeltrace/property.h | 4 +- .../babeltrace/trace-ir/clock-class-const.h | 6 +- include/babeltrace/trace-ir/clock-class.h | 6 +- .../trace-ir/clock-snapshot-const.h | 10 +-- .../babeltrace/trace-ir/event-class-const.h | 14 ++--- include/babeltrace/trace-ir/event-class.h | 18 +++--- include/babeltrace/trace-ir/event-const.h | 8 +-- include/babeltrace/trace-ir/event.h | 4 +- .../babeltrace/trace-ir/field-class-const.h | 20 +++--- include/babeltrace/trace-ir/field-class.h | 18 +++--- include/babeltrace/trace-ir/field-const.h | 12 ++-- .../babeltrace/trace-ir/field-path-const.h | 6 +- include/babeltrace/trace-ir/field.h | 14 ++--- include/babeltrace/trace-ir/packet-const.h | 17 +++-- include/babeltrace/trace-ir/packet.h | 6 +- .../babeltrace/trace-ir/stream-class-const.h | 4 +- include/babeltrace/trace-ir/stream-class.h | 12 ++-- include/babeltrace/trace-ir/stream-const.h | 4 +- include/babeltrace/trace-ir/stream.h | 4 +- .../babeltrace/trace-ir/trace-class-const.h | 4 +- include/babeltrace/trace-ir/trace-class.h | 10 +-- include/babeltrace/trace-ir/trace-const.h | 8 +-- include/babeltrace/trace-ir/trace.h | 6 +- include/babeltrace/value-const.h | 16 ++--- include/babeltrace/value.h | 36 +++++------ .../ctf/common/metadata/ctf-meta-resolve.c | 14 ++--- plugins/ctf/common/metadata/ctf-meta.h | 6 +- .../ctf/common/metadata/visitor-generate-ir.c | 4 +- plugins/ctf/fs-sink/write.c | 24 +++---- plugins/ctf/fs-sink/writer.c | 24 +++---- plugins/ctf/fs-sink/writer.h | 14 ++--- plugins/ctf/fs-src/data-stream-file.c | 4 +- plugins/ctf/fs-src/data-stream-file.h | 2 +- plugins/ctf/fs-src/fs.c | 20 +++--- plugins/ctf/fs-src/fs.h | 8 +-- plugins/ctf/fs-src/query.c | 18 +++--- plugins/ctf/fs-src/query.h | 4 +- plugins/ctf/lttng-live/data-stream.c | 2 +- plugins/ctf/lttng-live/data-stream.h | 2 +- plugins/ctf/lttng-live/lttng-live-internal.h | 12 ++-- plugins/ctf/lttng-live/lttng-live.c | 48 +++++++------- plugins/ctf/lttng-live/metadata.c | 8 +-- plugins/ctf/lttng-live/metadata.h | 2 +- plugins/ctf/lttng-live/viewer-connection.c | 16 ++--- plugins/libctfcopytrace/ctfcopytrace.c | 16 ++--- plugins/libctfcopytrace/ctfcopytrace.h | 8 +-- plugins/lttng-utils/copy.c | 6 +- plugins/lttng-utils/plugin.c | 24 +++---- plugins/text/dmesg/dmesg.c | 18 +++--- plugins/text/dmesg/dmesg.h | 6 +- plugins/text/pretty/pretty.c | 22 +++---- plugins/text/pretty/pretty.h | 6 +- plugins/text/pretty/print.c | 14 ++--- plugins/utils/counter/counter.c | 14 ++--- plugins/utils/counter/counter.h | 6 +- plugins/utils/dummy/dummy.c | 14 ++--- plugins/utils/dummy/dummy.h | 6 +- plugins/utils/muxer/muxer.c | 48 +++++++------- plugins/utils/muxer/muxer.h | 8 +-- plugins/utils/trimmer/copy.c | 4 +- plugins/utils/trimmer/copy.h | 2 +- plugins/utils/trimmer/iterator.c | 14 ++--- plugins/utils/trimmer/iterator.h | 2 +- plugins/utils/trimmer/trimmer.c | 10 +-- plugins/utils/trimmer/trimmer.h | 2 +- tests/lib/test-plugin-plugins/minimal.c | 2 +- tests/lib/test-plugin-plugins/sfs.c | 10 +-- tests/lib/test_bt_message_iterator.c | 28 ++++----- tests/lib/test_bt_values.c | 8 +-- tests/lib/test_graph_topo.c | 28 ++++----- tests/lib/test_plugin.c | 2 +- 104 files changed, 556 insertions(+), 592 deletions(-) diff --git a/cli/babeltrace-cfg-cli-args.c b/cli/babeltrace-cfg-cli-args.c index 1a41bcbf..c3d7250d 100644 --- a/cli/babeltrace-cfg-cli-args.c +++ b/cli/babeltrace-cfg-cli-args.c @@ -596,7 +596,7 @@ end: */ static void plugin_comp_cls_names(const char *arg, char **name, char **plugin, - char **comp_cls, enum bt_component_class_type *comp_cls_type) + char **comp_cls, bt_component_class_type *comp_cls_type) { const char *at = arg; GString *gs_name = NULL; @@ -775,7 +775,7 @@ end: */ static struct bt_config_component *bt_config_component_create( - enum bt_component_class_type type, + bt_component_class_type type, const char *plugin_name, const char *comp_cls_name) { struct bt_config_component *cfg_component = NULL; @@ -834,7 +834,7 @@ struct bt_config_component *bt_config_component_from_arg(const char *arg) char *name = NULL; char *plugin_name = NULL; char *comp_cls_name = NULL; - enum bt_component_class_type type; + bt_component_class_type type; plugin_comp_cls_names(arg, &name, &plugin_name, &comp_cls_name, &type); if (!plugin_name || !comp_cls_name) { @@ -2379,7 +2379,7 @@ struct bt_config *bt_config_run_from_args(int argc, const char *argv[], GString *cur_param_key = NULL; char error_buf[256] = { 0 }; long retry_duration = -1; - enum bt_value_status status; + bt_value_status status; struct poptOption run_long_options[] = { { "base-params", 'b', POPT_ARG_STRING, NULL, OPT_BASE_PARAMS, NULL, NULL }, { "component", 'c', POPT_ARG_STRING, NULL, OPT_COMPONENT, NULL, NULL }, @@ -3518,7 +3518,7 @@ int fill_implicit_ctf_inputs_args(GPtrArray *implicit_ctf_inputs_args, { int ret = 0; GList *leftover; - enum bt_value_status status; + bt_value_status status; for (leftover = leftovers; leftover != NULL; leftover = g_list_next(leftover)) { @@ -3737,7 +3737,7 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[], switch (opt) { case OPT_COMPONENT: { - enum bt_component_class_type type; + bt_component_class_type type; const char *type_prefix; /* Append current component's name if needed */ diff --git a/cli/babeltrace-cfg.h b/cli/babeltrace-cfg.h index 7ccf9515..6d98cd33 100644 --- a/cli/babeltrace-cfg.h +++ b/cli/babeltrace-cfg.h @@ -45,7 +45,7 @@ enum bt_config_command { struct bt_config_component { bt_object base; - enum bt_component_class_type type; + bt_component_class_type type; GString *plugin_name; GString *comp_cls_name; bt_value *params; diff --git a/cli/babeltrace.c b/cli/babeltrace.c index 5abbcd0d..29f811f4 100644 --- a/cli/babeltrace.c +++ b/cli/babeltrace.c @@ -174,7 +174,7 @@ int query(const bt_component_class *comp_cls, const char *obj, const char **fail_reason) { const bt_value *result = NULL; - enum bt_query_executor_status status; + bt_query_executor_status status; *fail_reason = "unknown error"; int ret = 0; @@ -360,7 +360,7 @@ const bt_component_class_sink *find_sink_component_class( static const bt_component_class *find_component_class(const char *plugin_name, const char *comp_class_name, - enum bt_component_class_type comp_class_type) + bt_component_class_type comp_class_type) { const bt_component_class *comp_cls = NULL; @@ -392,7 +392,7 @@ void print_indent(FILE *fp, size_t indent) } static -const char *component_type_str(enum bt_component_class_type type) +const char *component_type_str(bt_component_class_type type) { switch (type) { case BT_COMPONENT_CLASS_TYPE_SOURCE: @@ -408,7 +408,7 @@ const char *component_type_str(enum bt_component_class_type type) static void print_plugin_comp_cls_opt(FILE *fh, const char *plugin_name, - const char *comp_cls_name, enum bt_component_class_type type) + const char *comp_cls_name, bt_component_class_type type) { GString *shell_plugin_name = NULL; GString *shell_comp_cls_name = NULL; @@ -883,7 +883,7 @@ void print_plugin_info(const bt_plugin *plugin) { unsigned int major, minor, patch; const char *extra; - enum bt_property_availability version_avail; + bt_property_availability version_avail; const char *plugin_name; const char *path; const char *author; @@ -1010,7 +1010,7 @@ void print_component_class_help(const char *plugin_name, bt_component_class_get_description(comp_cls); const char *comp_class_help = bt_component_class_get_help(comp_cls); - enum bt_component_class_type type = + bt_component_class_type type = bt_component_class_get_type(comp_cls); print_plugin_comp_cls_opt(stdout, plugin_name, comp_class_name, type); @@ -1128,7 +1128,7 @@ void cmd_list_plugins_print_component_classes(const bt_plugin *plugin, bt_component_class_get_name(comp_class); const char *comp_class_description = bt_component_class_get_description(comp_class); - enum bt_component_class_type type = + bt_component_class_type type = bt_component_class_get_type(comp_class); printf(" "); @@ -1219,7 +1219,7 @@ int cmd_print_lttng_live_sessions(struct bt_config *cfg) const bt_value *v = NULL; static const char * const plugin_name = "ctf"; static const char * const comp_cls_name = "lttng-live"; - static const enum bt_component_class_type comp_cls_type = + static const bt_component_class_type comp_cls_type = BT_COMPONENT_CLASS_TYPE_SOURCE; int64_t array_size, i; const char *fail_reason = NULL; @@ -1371,7 +1371,7 @@ int cmd_print_ctf_metadata(struct bt_config *cfg) const char *metadata_text = NULL; static const char * const plugin_name = "ctf"; static const char * const comp_cls_name = "fs"; - static const enum bt_component_class_type comp_cls_type = + static const bt_component_class_type comp_cls_type = BT_COMPONENT_CLASS_TYPE_SOURCE; const char *fail_reason = NULL; FILE *out_stream = stdout; @@ -1610,7 +1610,7 @@ int cmd_run_ctx_connect_upstream_port_to_downstream_component( uint64_t i; input_port_count_func_t port_count_fn; borrow_input_port_by_index_func_t port_by_index_fn; - enum bt_graph_status status = BT_GRAPH_STATUS_ERROR; + bt_graph_status status = BT_GRAPH_STATUS_ERROR; bool insert_trimmer = false; bt_value *trimmer_params = NULL; char *intersection_begin = NULL; @@ -1636,7 +1636,7 @@ int cmd_run_ctx_connect_upstream_port_to_downstream_component( range = (struct trace_range *) g_hash_table_lookup( ctx->intersections, &port_id); if (range) { - enum bt_value_status status; + bt_value_status status; intersection_begin = s_from_ns( range->intersection_range_begin_ns); @@ -1756,7 +1756,7 @@ int cmd_run_ctx_connect_upstream_port_to_downstream_component( * source and the trimmer. */ char *trimmer_name = NULL; - enum bt_graph_status graph_status; + bt_graph_status graph_status; ret = asprintf(&trimmer_name, "stream-intersection-trimmer-%s", @@ -2076,7 +2076,7 @@ static int cmd_run_ctx_init(struct cmd_run_ctx *ctx, struct bt_config *cfg) { int ret = 0; - enum bt_graph_status status; + bt_graph_status status; ctx->cfg = cfg; ctx->connect_ports = false; @@ -2147,7 +2147,7 @@ int set_stream_intersections(struct cmd_run_ctx *ctx, int ret = 0; uint64_t trace_idx; int64_t trace_count; - enum bt_value_status value_status; + bt_value_status value_status; const char *path = NULL; const bt_value *component_path_value = NULL; bt_value *query_params = NULL; @@ -2619,7 +2619,7 @@ end: } static inline -const char *bt_graph_status_str(enum bt_graph_status status) +const char *bt_graph_status_str(bt_graph_status status) { switch (status) { case BT_GRAPH_STATUS_OK: @@ -2693,7 +2693,7 @@ int cmd_run(struct bt_config *cfg) /* Run the graph */ while (true) { - enum bt_graph_status graph_status = bt_graph_run(ctx.graph); + bt_graph_status graph_status = bt_graph_run(ctx.graph); /* * Reset console in case something messed with console diff --git a/include/babeltrace/graph/component-class-const.h b/include/babeltrace/graph/component-class-const.h index 9e4e6c7f..1c54f6e9 100644 --- a/include/babeltrace/graph/component-class-const.h +++ b/include/babeltrace/graph/component-class-const.h @@ -31,11 +31,11 @@ extern "C" { #endif -enum bt_component_class_type { - BT_COMPONENT_CLASS_TYPE_SOURCE = 0, - BT_COMPONENT_CLASS_TYPE_FILTER = 1, - BT_COMPONENT_CLASS_TYPE_SINK = 2, -}; +typedef enum bt_component_class_type { + BT_COMPONENT_CLASS_TYPE_SOURCE = 0, + BT_COMPONENT_CLASS_TYPE_FILTER = 1, + BT_COMPONENT_CLASS_TYPE_SINK = 2, +} bt_component_class_type; extern const char *bt_component_class_get_name( const bt_component_class *component_class); @@ -46,7 +46,7 @@ extern const char *bt_component_class_get_description( extern const char *bt_component_class_get_help( const bt_component_class *component_class); -extern enum bt_component_class_type bt_component_class_get_type( +extern bt_component_class_type bt_component_class_get_type( const bt_component_class *component_class); static inline diff --git a/include/babeltrace/graph/component-class-filter.h b/include/babeltrace/graph/component-class-filter.h index 80aeeb74..56d04437 100644 --- a/include/babeltrace/graph/component-class-filter.h +++ b/include/babeltrace/graph/component-class-filter.h @@ -26,13 +26,13 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include -/* For enum bt_self_message_iterator_status */ +/* For bt_self_message_iterator_status */ #include -/* For enum bt_query_status */ +/* For bt_query_status */ #include /* @@ -47,7 +47,7 @@ extern "C" { #endif -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_filter_init_method)( bt_self_component_filter *self_component, const bt_value *params, void *init_method_data); @@ -55,7 +55,7 @@ typedef enum bt_self_component_status typedef void (*bt_component_class_filter_finalize_method)( bt_self_component_filter *self_component); -typedef enum bt_self_message_iterator_status +typedef bt_self_message_iterator_status (*bt_component_class_filter_message_iterator_init_method)( bt_self_message_iterator *message_iterator, bt_self_component_filter *self_component, @@ -65,38 +65,38 @@ typedef void (*bt_component_class_filter_message_iterator_finalize_method)( bt_self_message_iterator *message_iterator); -typedef enum bt_self_message_iterator_status +typedef bt_self_message_iterator_status (*bt_component_class_filter_message_iterator_next_method)( bt_self_message_iterator *message_iterator, bt_message_array_const msgs, uint64_t capacity, uint64_t *count); -typedef enum bt_query_status +typedef bt_query_status (*bt_component_class_filter_query_method)( bt_self_component_class_filter *comp_class, const bt_query_executor *query_executor, const char *object, const bt_value *params, const bt_value **result); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_filter_accept_input_port_connection_method)( bt_self_component_filter *self_component, bt_self_component_port_input *self_port, const bt_port_output *other_port); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_filter_accept_output_port_connection_method)( bt_self_component_filter *self_component, bt_self_component_port_output *self_port, const bt_port_input *other_port); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_filter_input_port_connected_method)( bt_self_component_filter *self_component, bt_self_component_port_input *self_port, const bt_port_output *other_port); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_filter_output_port_connected_method)( bt_self_component_filter *self_component, bt_self_component_port_output *self_port, diff --git a/include/babeltrace/graph/component-class-sink.h b/include/babeltrace/graph/component-class-sink.h index b57abc94..6ed02751 100644 --- a/include/babeltrace/graph/component-class-sink.h +++ b/include/babeltrace/graph/component-class-sink.h @@ -26,10 +26,10 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include -/* For enum bt_query_status */ +/* For bt_query_status */ #include /* @@ -43,28 +43,27 @@ extern "C" { #endif -typedef enum bt_self_component_status -(*bt_component_class_sink_init_method)( +typedef bt_self_component_status (*bt_component_class_sink_init_method)( bt_self_component_sink *self_component, const bt_value *params, void *init_method_data); typedef void (*bt_component_class_sink_finalize_method)( bt_self_component_sink *self_component); -typedef enum bt_query_status +typedef bt_query_status (*bt_component_class_sink_query_method)( bt_self_component_class_sink *comp_class, const bt_query_executor *query_executor, const char *object, const bt_value *params, const bt_value **result); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_sink_accept_input_port_connection_method)( bt_self_component_sink *self_component, bt_self_component_port_input *self_port, const bt_port_output *other_port); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_sink_input_port_connected_method)( bt_self_component_sink *self_component, bt_self_component_port_input *self_port, @@ -75,8 +74,7 @@ typedef void bt_self_component_sink *self_component, bt_self_component_port_input *self_port); -typedef enum bt_self_component_status -(*bt_component_class_sink_consume_method)( +typedef bt_self_component_status (*bt_component_class_sink_consume_method)( bt_self_component_sink *self_component); static inline diff --git a/include/babeltrace/graph/component-class-source.h b/include/babeltrace/graph/component-class-source.h index d0fed047..4c949181 100644 --- a/include/babeltrace/graph/component-class-source.h +++ b/include/babeltrace/graph/component-class-source.h @@ -26,13 +26,13 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include -/* For enum bt_self_message_iterator_status */ +/* For bt_self_message_iterator_status */ #include -/* For enum bt_query_status */ +/* For bt_query_status */ #include /* @@ -47,7 +47,7 @@ extern "C" { #endif -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_source_init_method)( bt_self_component_source *self_component, const bt_value *params, void *init_method_data); @@ -55,7 +55,7 @@ typedef enum bt_self_component_status typedef void (*bt_component_class_source_finalize_method)( bt_self_component_source *self_component); -typedef enum bt_self_message_iterator_status +typedef bt_self_message_iterator_status (*bt_component_class_source_message_iterator_init_method)( bt_self_message_iterator *message_iterator, bt_self_component_source *self_component, @@ -65,33 +65,31 @@ typedef void (*bt_component_class_source_message_iterator_finalize_method)( bt_self_message_iterator *message_iterator); -typedef enum bt_self_message_iterator_status +typedef bt_self_message_iterator_status (*bt_component_class_source_message_iterator_next_method)( bt_self_message_iterator *message_iterator, bt_message_array_const msgs, uint64_t capacity, uint64_t *count); -typedef enum bt_query_status -(*bt_component_class_source_query_method)( +typedef bt_query_status (*bt_component_class_source_query_method)( bt_self_component_class_source *comp_class, const bt_query_executor *query_executor, const char *object, const bt_value *params, const bt_value **result); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_source_accept_output_port_connection_method)( bt_self_component_source *self_component, bt_self_component_port_output *self_port, const bt_port_input *other_port); -typedef enum bt_self_component_status +typedef bt_self_component_status (*bt_component_class_source_output_port_connected_method)( bt_self_component_source *self_component, bt_self_component_port_output *self_port, const bt_port_input *other_port); -typedef void -(*bt_component_class_source_output_port_disconnected_method)( +typedef void (*bt_component_class_source_output_port_disconnected_method)( bt_self_component_source *self_component, bt_self_component_port_output *self_port); diff --git a/include/babeltrace/graph/component-class.h b/include/babeltrace/graph/component-class.h index bc278ce1..bfd2d08f 100644 --- a/include/babeltrace/graph/component-class.h +++ b/include/babeltrace/graph/component-class.h @@ -24,7 +24,7 @@ * SOFTWARE. */ -/* For enum bt_query_executor_status */ +/* For BT_QUERY_EXECUTOR_STATUS_* */ #include /* For bt_component_class */ @@ -34,14 +34,14 @@ extern "C" { #endif -enum bt_query_status { +typedef enum bt_query_status { BT_QUERY_STATUS_OK = BT_QUERY_EXECUTOR_STATUS_OK, BT_QUERY_STATUS_AGAIN = BT_QUERY_EXECUTOR_STATUS_AGAIN, BT_QUERY_STATUS_ERROR = BT_QUERY_EXECUTOR_STATUS_ERROR, BT_QUERY_STATUS_NOMEM = BT_QUERY_EXECUTOR_STATUS_NOMEM, BT_QUERY_STATUS_INVALID_OBJECT = BT_QUERY_EXECUTOR_STATUS_INVALID_OBJECT, BT_QUERY_STATUS_INVALID_PARAMS = BT_QUERY_EXECUTOR_STATUS_INVALID_PARAMS, -}; +} bt_query_status; extern int bt_component_class_set_description( bt_component_class *component_class, diff --git a/include/babeltrace/graph/component-const.h b/include/babeltrace/graph/component-const.h index 8a3f2add..a0187477 100644 --- a/include/babeltrace/graph/component-const.h +++ b/include/babeltrace/graph/component-const.h @@ -24,7 +24,7 @@ * SOFTWARE. */ -/* For enum bt_component_class_type */ +/* For bt_component_class_type */ #include /* @@ -54,7 +54,7 @@ extern const char *bt_component_get_name(const bt_component *component); extern const bt_component_class *bt_component_borrow_class_const( const bt_component *component); -extern enum bt_component_class_type bt_component_get_class_type( +extern bt_component_class_type bt_component_get_class_type( const bt_component *component); static inline diff --git a/include/babeltrace/graph/graph-const.h b/include/babeltrace/graph/graph-const.h index 1ce433ea..a8c5a514 100644 --- a/include/babeltrace/graph/graph-const.h +++ b/include/babeltrace/graph/graph-const.h @@ -31,7 +31,7 @@ extern "C" { #endif -enum bt_graph_status { +typedef enum bt_graph_status { BT_GRAPH_STATUS_OK = 0, BT_GRAPH_STATUS_END = 1, BT_GRAPH_STATUS_AGAIN = 11, @@ -40,7 +40,7 @@ enum bt_graph_status { BT_GRAPH_STATUS_ERROR = -1, BT_GRAPH_STATUS_NO_SINK = -6, BT_GRAPH_STATUS_NOMEM = -12, -}; +} bt_graph_status; extern bt_bool bt_graph_is_canceled(const bt_graph *graph); diff --git a/include/babeltrace/graph/graph.h b/include/babeltrace/graph/graph.h index 2b0e4eb1..d3a9a875 100644 --- a/include/babeltrace/graph/graph.h +++ b/include/babeltrace/graph/graph.h @@ -33,7 +33,7 @@ */ #include -/* For enum bt_graph_status */ +/* For bt_graph_status */ #include #ifdef __cplusplus @@ -115,158 +115,150 @@ typedef void (* bt_graph_listener_removed_func)(void *data); extern bt_graph *bt_graph_create(void); -extern enum bt_graph_status bt_graph_add_source_component( - bt_graph *graph, +extern bt_graph_status bt_graph_add_source_component(bt_graph *graph, const bt_component_class_source *component_class, const char *name, const bt_value *params, const bt_component_source **component); -extern enum bt_graph_status -bt_graph_add_source_component_with_init_method_data( +extern bt_graph_status bt_graph_add_source_component_with_init_method_data( bt_graph *graph, const bt_component_class_source *component_class, const char *name, const bt_value *params, void *init_method_data, const bt_component_source **component); -extern enum bt_graph_status bt_graph_add_filter_component( - bt_graph *graph, +extern bt_graph_status bt_graph_add_filter_component(bt_graph *graph, const bt_component_class_filter *component_class, const char *name, const bt_value *params, const bt_component_filter **component); -extern enum bt_graph_status -bt_graph_add_filter_component_with_init_method_data( +extern bt_graph_status bt_graph_add_filter_component_with_init_method_data( bt_graph *graph, const bt_component_class_filter *component_class, const char *name, const bt_value *params, void *init_method_data, const bt_component_filter **component); -extern enum bt_graph_status bt_graph_add_sink_component( - bt_graph *graph, - const bt_component_class_sink *component_class, +extern bt_graph_status bt_graph_add_sink_component( + bt_graph *graph, const bt_component_class_sink *component_class, const char *name, const bt_value *params, const bt_component_sink **component); -extern enum bt_graph_status -bt_graph_add_sink_component_with_init_method_data( - bt_graph *graph, - const bt_component_class_sink *component_class, +extern bt_graph_status bt_graph_add_sink_component_with_init_method_data( + bt_graph *graph, const bt_component_class_sink *component_class, const char *name, const bt_value *params, void *init_method_data, const bt_component_sink **component); -extern enum bt_graph_status bt_graph_connect_ports( - bt_graph *graph, +extern bt_graph_status bt_graph_connect_ports(bt_graph *graph, const bt_port_output *upstream, const bt_port_input *downstream, const bt_connection **connection); -extern enum bt_graph_status bt_graph_run(bt_graph *graph); +extern bt_graph_status bt_graph_run(bt_graph *graph); -extern enum bt_graph_status bt_graph_consume( +extern bt_graph_status bt_graph_consume( bt_graph *graph); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_component_input_port_added_listener( bt_graph *graph, bt_graph_filter_component_input_port_added_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_sink_component_input_port_added_listener( bt_graph *graph, bt_graph_sink_component_input_port_added_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_component_output_port_added_listener( bt_graph *graph, bt_graph_source_component_output_port_added_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_component_output_port_added_listener( bt_graph *graph, bt_graph_filter_component_output_port_added_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_component_input_port_removed_listener( bt_graph *graph, bt_graph_filter_component_input_port_removed_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_sink_component_input_port_removed_listener( bt_graph *graph, bt_graph_sink_component_input_port_removed_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_component_output_port_removed_listener( bt_graph *graph, bt_graph_source_component_output_port_removed_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_component_output_port_removed_listener( bt_graph *graph, bt_graph_filter_component_output_port_removed_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_filter_component_ports_connected_listener( bt_graph *graph, bt_graph_source_filter_component_ports_connected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_sink_component_ports_connected_listener( bt_graph *graph, bt_graph_source_sink_component_ports_connected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_sink_component_ports_connected_listener( bt_graph *graph, bt_graph_filter_sink_component_ports_connected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_filter_component_ports_disconnected_listener( bt_graph *graph, bt_graph_source_filter_component_ports_disconnected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_source_sink_component_ports_disconnected_listener( bt_graph *graph, bt_graph_source_sink_component_ports_disconnected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status +extern bt_graph_status bt_graph_add_filter_sink_component_ports_disconnected_listener( bt_graph *graph, bt_graph_filter_sink_component_ports_disconnected_listener_func listener, bt_graph_listener_removed_func listener_removed, void *data, int *listener_id); -extern enum bt_graph_status bt_graph_cancel(bt_graph *graph); +extern bt_graph_status bt_graph_cancel(bt_graph *graph); #ifdef __cplusplus } diff --git a/include/babeltrace/graph/message-const.h b/include/babeltrace/graph/message-const.h index e345ca4d..d445e5f7 100644 --- a/include/babeltrace/graph/message-const.h +++ b/include/babeltrace/graph/message-const.h @@ -34,14 +34,14 @@ extern "C" { /** * Message types. Unhandled message types should be ignored. */ -enum bt_message_type { +typedef enum bt_message_type { BT_MESSAGE_TYPE_EVENT = 0, BT_MESSAGE_TYPE_INACTIVITY = 1, BT_MESSAGE_TYPE_STREAM_BEGINNING = 2, BT_MESSAGE_TYPE_STREAM_END = 3, BT_MESSAGE_TYPE_PACKET_BEGINNING = 4, BT_MESSAGE_TYPE_PACKET_END = 5, -}; +} bt_message_type; /** * Get a message's type. @@ -49,8 +49,7 @@ enum bt_message_type { * @param message Message instance * @returns One of #bt_message_type */ -extern enum bt_message_type bt_message_get_type( - const bt_message *message); +extern bt_message_type bt_message_get_type(const bt_message *message); extern void bt_message_get_ref(const bt_message *message); diff --git a/include/babeltrace/graph/message-inactivity-const.h b/include/babeltrace/graph/message-inactivity-const.h index 0642c409..b473b849 100644 --- a/include/babeltrace/graph/message-inactivity-const.h +++ b/include/babeltrace/graph/message-inactivity-const.h @@ -26,14 +26,14 @@ /* For bt_message, bt_clock_snapshot */ #include -/* For enum bt_clock_snapshot_state */ +/* For bt_clock_snapshot_state */ #include #ifdef __cplusplus extern "C" { #endif -extern enum bt_clock_snapshot_state +extern bt_clock_snapshot_state bt_message_inactivity_borrow_default_clock_snapshot_const( const bt_message *msg, const bt_clock_snapshot **snapshot); diff --git a/include/babeltrace/graph/message-iterator.h b/include/babeltrace/graph/message-iterator.h index b54df9cd..d26cc768 100644 --- a/include/babeltrace/graph/message-iterator.h +++ b/include/babeltrace/graph/message-iterator.h @@ -31,14 +31,14 @@ extern "C" { #endif -enum bt_message_iterator_status { +typedef enum bt_message_iterator_status { BT_MESSAGE_ITERATOR_STATUS_OK = 0, BT_MESSAGE_ITERATOR_STATUS_END = 1, BT_MESSAGE_ITERATOR_STATUS_AGAIN = 11, BT_MESSAGE_ITERATOR_STATUS_CANCELED = 125, BT_MESSAGE_ITERATOR_STATUS_ERROR = -1, BT_MESSAGE_ITERATOR_STATUS_NOMEM = -12, -}; +} bt_message_iterator_status; #ifdef __cplusplus } diff --git a/include/babeltrace/graph/message-stream-const.h b/include/babeltrace/graph/message-stream-const.h index 7b902f07..a7bf8d7b 100644 --- a/include/babeltrace/graph/message-stream-const.h +++ b/include/babeltrace/graph/message-stream-const.h @@ -27,7 +27,7 @@ /* For bt_message, bt_clock_snapshot, bt_stream */ #include -/* For enum bt_clock_snapshot_state */ +/* For bt_clock_snapshot_state */ #include #ifdef __cplusplus @@ -37,14 +37,14 @@ extern "C" { extern const bt_stream *bt_message_stream_beginning_borrow_stream_const( const bt_message *message); -extern enum bt_clock_snapshot_state +extern bt_clock_snapshot_state bt_message_stream_beginning_borrow_default_clock_snapshot_const( const bt_message *msg, const bt_clock_snapshot **snapshot); extern const bt_stream *bt_message_stream_end_borrow_stream_const( const bt_message *message); -extern enum bt_clock_snapshot_state +extern bt_clock_snapshot_state bt_message_stream_end_borrow_default_clock_snapshot_const( const bt_message *msg, const bt_clock_snapshot **snapshot); diff --git a/include/babeltrace/graph/port-const.h b/include/babeltrace/graph/port-const.h index cb290cdb..fdc0cd69 100644 --- a/include/babeltrace/graph/port-const.h +++ b/include/babeltrace/graph/port-const.h @@ -33,14 +33,14 @@ extern "C" { #endif -enum bt_port_type { +typedef enum bt_port_type { BT_PORT_TYPE_INPUT = 0, BT_PORT_TYPE_OUTPUT = 1, -}; +} bt_port_type; extern const char *bt_port_get_name(const bt_port *port); -extern enum bt_port_type bt_port_get_type(const bt_port *port); +extern bt_port_type bt_port_get_type(const bt_port *port); extern const bt_connection *bt_port_borrow_connection_const( const bt_port *port); diff --git a/include/babeltrace/graph/port-input-const.h b/include/babeltrace/graph/port-input-const.h index 51aef473..c98972e8 100644 --- a/include/babeltrace/graph/port-input-const.h +++ b/include/babeltrace/graph/port-input-const.h @@ -34,8 +34,7 @@ extern "C" { #endif static inline -const bt_port *bt_port_input_as_port_const( - const bt_port_input *port_input) +const bt_port *bt_port_input_as_port_const(const bt_port_input *port_input) { return (const void *) port_input; } diff --git a/include/babeltrace/graph/port-output-const.h b/include/babeltrace/graph/port-output-const.h index 7c6e801f..19a5db51 100644 --- a/include/babeltrace/graph/port-output-const.h +++ b/include/babeltrace/graph/port-output-const.h @@ -34,8 +34,7 @@ extern "C" { #endif static inline -const bt_port *bt_port_output_as_port_const( - const bt_port_output *port_output) +const bt_port *bt_port_output_as_port_const(const bt_port_output *port_output) { return (const void *) port_output; } diff --git a/include/babeltrace/graph/port-output-message-iterator.h b/include/babeltrace/graph/port-output-message-iterator.h index 41d8d288..08cc225b 100644 --- a/include/babeltrace/graph/port-output-message-iterator.h +++ b/include/babeltrace/graph/port-output-message-iterator.h @@ -25,7 +25,7 @@ #include -/* For enum bt_message_iterator_status */ +/* For bt_message_iterator_status */ #include /* @@ -52,7 +52,7 @@ bt_port_output_message_iterator_create( bt_graph *graph, const bt_port_output *output_port); -extern enum bt_message_iterator_status +extern bt_message_iterator_status bt_port_output_message_iterator_next( bt_port_output_message_iterator *iterator, bt_message_array_const *msgs, uint64_t *count); diff --git a/include/babeltrace/graph/query-executor-const.h b/include/babeltrace/graph/query-executor-const.h index ab6dc242..faec5f8c 100644 --- a/include/babeltrace/graph/query-executor-const.h +++ b/include/babeltrace/graph/query-executor-const.h @@ -30,7 +30,7 @@ extern "C" { #endif -enum bt_query_executor_status { +typedef enum bt_query_executor_status { BT_QUERY_EXECUTOR_STATUS_OK = 0, BT_QUERY_EXECUTOR_STATUS_AGAIN = 11, BT_QUERY_EXECUTOR_STATUS_UNSUPPORTED = 95, @@ -39,7 +39,7 @@ enum bt_query_executor_status { BT_QUERY_EXECUTOR_STATUS_NOMEM = -12, BT_QUERY_EXECUTOR_STATUS_INVALID_OBJECT = -23, BT_QUERY_EXECUTOR_STATUS_INVALID_PARAMS = -24, -}; +} bt_query_executor_status; extern bt_bool bt_query_executor_is_canceled( diff --git a/include/babeltrace/graph/query-executor.h b/include/babeltrace/graph/query-executor.h index ef1b09e2..336de60e 100644 --- a/include/babeltrace/graph/query-executor.h +++ b/include/babeltrace/graph/query-executor.h @@ -23,7 +23,7 @@ * SOFTWARE. */ -/* For enum bt_query_executor_status */ +/* For bt_query_executor_status */ #include /* For bt_query_executor, bt_component_class, bt_value */ @@ -37,14 +37,14 @@ extern bt_query_executor *bt_query_executor_create(void); extern -enum bt_query_executor_status bt_query_executor_query( +bt_query_executor_status bt_query_executor_query( bt_query_executor *query_executor, const bt_component_class *component_class, const char *object, const bt_value *params, const bt_value **result); extern -enum bt_query_executor_status bt_query_executor_cancel( +bt_query_executor_status bt_query_executor_cancel( bt_query_executor *query_executor); #ifdef __cplusplus diff --git a/include/babeltrace/graph/self-component-filter.h b/include/babeltrace/graph/self-component-filter.h index 13a976f4..36ac696c 100644 --- a/include/babeltrace/graph/self-component-filter.h +++ b/include/babeltrace/graph/self-component-filter.h @@ -26,7 +26,7 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include /* @@ -67,7 +67,7 @@ bt_self_component_filter_borrow_output_port_by_index( bt_self_component_filter *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_filter_add_output_port( bt_self_component_filter *self_component, const char *name, void *data, @@ -83,7 +83,7 @@ bt_self_component_filter_borrow_input_port_by_index( bt_self_component_filter *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_filter_add_input_port( bt_self_component_filter *self_component, const char *name, void *data, diff --git a/include/babeltrace/graph/self-component-port-input-message-iterator.h b/include/babeltrace/graph/self-component-port-input-message-iterator.h index c952f520..480c1430 100644 --- a/include/babeltrace/graph/self-component-port-input-message-iterator.h +++ b/include/babeltrace/graph/self-component-port-input-message-iterator.h @@ -25,7 +25,7 @@ #include -/* For enum bt_message_iterator_status */ +/* For bt_message_iterator_status */ #include /* @@ -55,7 +55,7 @@ extern bt_component * bt_self_component_port_input_message_iterator_borrow_component( bt_self_component_port_input_message_iterator *iterator); -extern enum bt_message_iterator_status +extern bt_message_iterator_status bt_self_component_port_input_message_iterator_next( bt_self_component_port_input_message_iterator *iterator, bt_message_array_const *msgs, uint64_t *count); diff --git a/include/babeltrace/graph/self-component-port-input.h b/include/babeltrace/graph/self-component-port-input.h index ab8694b1..ba3991b2 100644 --- a/include/babeltrace/graph/self-component-port-input.h +++ b/include/babeltrace/graph/self-component-port-input.h @@ -23,9 +23,6 @@ * SOFTWARE. */ -/* For enum bt_self_component_port_status */ -#include - /* * For bt_port_input, bt_self_component_port, * bt_self_component_port_input diff --git a/include/babeltrace/graph/self-component-port-output.h b/include/babeltrace/graph/self-component-port-output.h index 6fd4b138..293f705b 100644 --- a/include/babeltrace/graph/self-component-port-output.h +++ b/include/babeltrace/graph/self-component-port-output.h @@ -23,9 +23,6 @@ * SOFTWARE. */ -/* For enum bt_self_component_port_status */ -#include - /* * For bt_port_output, bt_self_component_port, * bt_self_component_port_output diff --git a/include/babeltrace/graph/self-component-port.h b/include/babeltrace/graph/self-component-port.h index 4a79409b..b396afff 100644 --- a/include/babeltrace/graph/self-component-port.h +++ b/include/babeltrace/graph/self-component-port.h @@ -32,9 +32,9 @@ extern "C" { #endif -enum bt_self_component_port_status { +typedef enum bt_self_component_port_status { BT_SELF_PORT_STATUS_OK = 0, -}; +} bt_self_component_port_status; static inline const bt_port *bt_self_component_port_as_port( @@ -46,7 +46,7 @@ const bt_port *bt_self_component_port_as_port( extern bt_self_component *bt_self_component_port_borrow_component( bt_self_component_port *self_port); -extern enum bt_self_component_port_status +extern bt_self_component_port_status bt_self_component_port_remove_from_component( bt_self_component_port *self_port); diff --git a/include/babeltrace/graph/self-component-sink.h b/include/babeltrace/graph/self-component-sink.h index 720a9919..9f2d6bd6 100644 --- a/include/babeltrace/graph/self-component-sink.h +++ b/include/babeltrace/graph/self-component-sink.h @@ -25,7 +25,7 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include /* @@ -62,7 +62,7 @@ extern bt_self_component_port_input * bt_self_component_sink_borrow_input_port_by_index( bt_self_component_sink *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_sink_add_input_port( bt_self_component_sink *self_component, const char *name, void *user_data, diff --git a/include/babeltrace/graph/self-component-source.h b/include/babeltrace/graph/self-component-source.h index ed2676e7..3b96af1e 100644 --- a/include/babeltrace/graph/self-component-source.h +++ b/include/babeltrace/graph/self-component-source.h @@ -25,7 +25,7 @@ #include -/* For enum bt_self_component_status */ +/* For bt_self_component_status */ #include /* @@ -63,7 +63,7 @@ bt_self_component_source_borrow_output_port_by_index( bt_self_component_source *self_component, uint64_t index); -extern enum bt_self_component_status +extern bt_self_component_status bt_self_component_source_add_output_port( bt_self_component_source *self_component, const char *name, void *user_data, diff --git a/include/babeltrace/graph/self-component.h b/include/babeltrace/graph/self-component.h index 3461eace..c11d8e45 100644 --- a/include/babeltrace/graph/self-component.h +++ b/include/babeltrace/graph/self-component.h @@ -30,14 +30,14 @@ extern "C" { #endif -enum bt_self_component_status { +typedef enum bt_self_component_status { BT_SELF_COMPONENT_STATUS_OK = 0, BT_SELF_COMPONENT_STATUS_END = 1, BT_SELF_COMPONENT_STATUS_AGAIN = 11, BT_SELF_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 111, BT_SELF_COMPONENT_STATUS_ERROR = -1, BT_SELF_COMPONENT_STATUS_NOMEM = -12, -}; +} bt_self_component_status; static inline const bt_component *bt_self_component_as_component( diff --git a/include/babeltrace/graph/self-message-iterator.h b/include/babeltrace/graph/self-message-iterator.h index 90143e30..a66234bd 100644 --- a/include/babeltrace/graph/self-message-iterator.h +++ b/include/babeltrace/graph/self-message-iterator.h @@ -33,13 +33,13 @@ extern "C" { #endif -enum bt_self_message_iterator_status { +typedef enum bt_self_message_iterator_status { BT_SELF_MESSAGE_ITERATOR_STATUS_OK = BT_MESSAGE_ITERATOR_STATUS_OK, BT_SELF_MESSAGE_ITERATOR_STATUS_END = BT_MESSAGE_ITERATOR_STATUS_END, BT_SELF_MESSAGE_ITERATOR_STATUS_AGAIN = BT_MESSAGE_ITERATOR_STATUS_AGAIN, BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR = BT_MESSAGE_ITERATOR_STATUS_ERROR, BT_SELF_MESSAGE_ITERATOR_STATUS_NOMEM = BT_MESSAGE_ITERATOR_STATUS_NOMEM, -}; +} bt_self_message_iterator_status; extern bt_self_component * bt_self_message_iterator_borrow_component( diff --git a/include/babeltrace/logging.h b/include/babeltrace/logging.h index 69efddcd..f1370577 100644 --- a/include/babeltrace/logging.h +++ b/include/babeltrace/logging.h @@ -60,7 +60,7 @@ current global log level and the minimal log level are not executed. /** @brief Log levels. */ -enum bt_logging_level { +typedef enum bt_logging_level { /// Additional, low-level debugging context information. BT_LOGGING_LEVEL_VERBOSE = 1, @@ -100,7 +100,7 @@ enum bt_logging_level { /// Logging is disabled. BT_LOGGING_LEVEL_NONE = 0xff, -}; +} bt_logging_level; /** @brief Returns the minimal log level of the Babeltrace library. @@ -114,7 +114,7 @@ global log level with bt_logging_set_global_level() below this level. @sa bt_logging_get_global_level(): Returns the current global log level. */ -extern enum bt_logging_level bt_logging_get_minimal_level(void); +extern bt_logging_level bt_logging_get_minimal_level(void); /** @brief Returns the current global log level of the Babeltrace library. @@ -124,7 +124,7 @@ extern enum bt_logging_level bt_logging_get_minimal_level(void); @sa bt_logging_set_global_level(): Sets the current global log level. @sa bt_logging_get_minimal_level(): Returns the minimal log level. */ -extern enum bt_logging_level bt_logging_get_global_level(void); +extern bt_logging_level bt_logging_get_global_level(void); /** @brief Sets the current global log level of the Babeltrace library @@ -138,7 +138,7 @@ log level cannot be executed. @sa bt_logging_get_global_level(): Returns the global log level. */ -extern void bt_logging_set_global_level(enum bt_logging_level log_level); +extern void bt_logging_set_global_level(bt_logging_level log_level); /** @} */ diff --git a/include/babeltrace/plugin/plugin-const.h b/include/babeltrace/plugin/plugin-const.h index f19da61d..1c6c49f1 100644 --- a/include/babeltrace/plugin/plugin-const.h +++ b/include/babeltrace/plugin/plugin-const.h @@ -36,19 +36,7 @@ */ #include -/* For enum bt_component_class_type */ -#include - -/* For enum bt_component_class_source */ -#include - -/* For enum bt_component_class_filter */ -#include - -/* For enum bt_component_class_sink */ -#include - -/* For enum bt_property_availability */ +/* For bt_property_availability */ #include #ifdef __cplusplus @@ -75,7 +63,7 @@ extern const char *bt_plugin_get_description(const bt_plugin *plugin); extern const char *bt_plugin_get_path(const bt_plugin *plugin); -extern enum bt_property_availability bt_plugin_get_version( +extern bt_property_availability bt_plugin_get_version( const bt_plugin *plugin, unsigned int *major, unsigned int *minor, unsigned int *patch, const char **extra); diff --git a/include/babeltrace/plugin/plugin-dev.h b/include/babeltrace/plugin/plugin-dev.h index 1ddbf9d6..5b941a3b 100644 --- a/include/babeltrace/plugin/plugin-dev.h +++ b/include/babeltrace/plugin/plugin-dev.h @@ -32,13 +32,13 @@ /* For enum bt_plugin_status */ #include -/* For enum bt_component_class_type */ +/* For bt_component_class_type */ #include /* For component class method type definitions */ -#include -#include -#include +#include +#include +#include /* * _BT_HIDDEN: set the hidden attribute for internal functions @@ -63,15 +63,15 @@ extern "C" { #define __BT_PLUGIN_VERSION_MINOR 0 /* Plugin initialization function type */ -enum bt_self_plugin_status { +typedef enum bt_self_plugin_status { BT_SELF_PLUGIN_STATUS_OK = 0, BT_SELF_PLUGIN_STATUS_NOMEM = -12, BT_SELF_PLUGIN_STATUS_ERROR = -1, -}; +} bt_self_plugin_status; typedef struct bt_self_plugin bt_self_plugin; -typedef enum bt_self_plugin_status (*bt_plugin_init_func)( +typedef bt_self_plugin_status (*bt_plugin_init_func)( bt_self_plugin *plugin); /* Plugin exit function type */ @@ -152,7 +152,7 @@ struct __bt_plugin_component_class_descriptor { const char *name; /* Component class type */ - enum bt_component_class_type type; + bt_component_class_type type; /* Mandatory methods (depends on component class type) */ union { diff --git a/include/babeltrace/property.h b/include/babeltrace/property.h index 9d79d78e..cc3906b4 100644 --- a/include/babeltrace/property.h +++ b/include/babeltrace/property.h @@ -27,10 +27,10 @@ extern "C" { #endif -enum bt_property_availability { +typedef enum bt_property_availability { BT_PROPERTY_AVAILABILITY_AVAILABLE, BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE, -}; +} bt_property_availability; #ifdef __cplusplus } diff --git a/include/babeltrace/trace-ir/clock-class-const.h b/include/babeltrace/trace-ir/clock-class-const.h index f7afc248..d609770d 100644 --- a/include/babeltrace/trace-ir/clock-class-const.h +++ b/include/babeltrace/trace-ir/clock-class-const.h @@ -36,11 +36,11 @@ extern "C" { #endif -enum bt_clock_class_status { +typedef enum bt_clock_class_status { BT_CLOCK_CLASS_STATUS_OK = 0, BT_CLOCK_CLASS_STATUS_NOMEM = -12, BT_CLOCK_CLASS_STATUS_OVERFLOW = -75, -}; +} bt_clock_class_status; extern const char *bt_clock_class_get_name( const bt_clock_class *clock_class); @@ -63,7 +63,7 @@ extern bt_bool bt_clock_class_is_absolute( extern bt_uuid bt_clock_class_get_uuid( const bt_clock_class *clock_class); -extern enum bt_clock_class_status bt_clock_class_cycles_to_ns_from_origin( +extern bt_clock_class_status bt_clock_class_cycles_to_ns_from_origin( const bt_clock_class *clock_class, uint64_t cycles, int64_t *ns_from_origin); diff --git a/include/babeltrace/trace-ir/clock-class.h b/include/babeltrace/trace-ir/clock-class.h index e0d87730..c2bc7fde 100644 --- a/include/babeltrace/trace-ir/clock-class.h +++ b/include/babeltrace/trace-ir/clock-class.h @@ -32,7 +32,7 @@ /* For bt_bool, bt_uuid, bt_clock_class */ #include -/* For enum bt_clock_class_status */ +/* For bt_clock_class_status */ #include #ifdef __cplusplus @@ -41,10 +41,10 @@ extern "C" { extern bt_clock_class *bt_clock_class_create(void); -extern enum bt_clock_class_status bt_clock_class_set_name( +extern bt_clock_class_status bt_clock_class_set_name( bt_clock_class *clock_class, const char *name); -extern enum bt_clock_class_status bt_clock_class_set_description( +extern bt_clock_class_status bt_clock_class_set_description( bt_clock_class *clock_class, const char *description); extern void bt_clock_class_set_frequency(bt_clock_class *clock_class, diff --git a/include/babeltrace/trace-ir/clock-snapshot-const.h b/include/babeltrace/trace-ir/clock-snapshot-const.h index e0f5f05f..73ddb5be 100644 --- a/include/babeltrace/trace-ir/clock-snapshot-const.h +++ b/include/babeltrace/trace-ir/clock-snapshot-const.h @@ -36,15 +36,15 @@ extern "C" { #endif -enum bt_clock_snapshot_state { +typedef enum bt_clock_snapshot_state { BT_CLOCK_SNAPSHOT_STATE_KNOWN, BT_CLOCK_SNAPSHOT_STATE_UNKNOWN, -}; +} bt_clock_snapshot_state; -enum bt_clock_snapshot_status { +typedef enum bt_clock_snapshot_status { BT_CLOCK_SNAPSHOT_STATUS_OK = 0, BT_CLOCK_SNAPSHOT_STATUS_OVERFLOW = -75, -}; +} bt_clock_snapshot_status; extern const bt_clock_class *bt_clock_snapshot_borrow_clock_class_const( const bt_clock_snapshot *clock_snapshot); @@ -52,7 +52,7 @@ extern const bt_clock_class *bt_clock_snapshot_borrow_clock_class_const( extern uint64_t bt_clock_snapshot_get_value( const bt_clock_snapshot *clock_snapshot); -extern enum bt_clock_snapshot_status bt_clock_snapshot_get_ns_from_origin( +extern bt_clock_snapshot_status bt_clock_snapshot_get_ns_from_origin( const bt_clock_snapshot *clock_snapshot, int64_t *ns_from_origin); diff --git a/include/babeltrace/trace-ir/event-class-const.h b/include/babeltrace/trace-ir/event-class-const.h index b7e559e2..a8408b59 100644 --- a/include/babeltrace/trace-ir/event-class-const.h +++ b/include/babeltrace/trace-ir/event-class-const.h @@ -27,7 +27,7 @@ * http://www.efficios.com/ctf */ -/* For enum bt_property_availability */ +/* For bt_property_availability */ #include /* For bt_event_class, bt_field_class, bt_stream_class */ @@ -40,12 +40,12 @@ extern "C" { #endif -enum bt_event_class_status { +typedef enum bt_event_class_status { BT_EVENT_CLASS_STATUS_OK = 0, BT_EVENT_CLASS_STATUS_NOMEM = -12, -}; +} bt_event_class_status; -enum bt_event_class_log_level { +typedef enum bt_event_class_log_level { BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY, BT_EVENT_CLASS_LOG_LEVEL_ALERT, BT_EVENT_CLASS_LOG_LEVEL_CRITICAL, @@ -61,7 +61,7 @@ enum bt_event_class_log_level { BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION, BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE, BT_EVENT_CLASS_LOG_LEVEL_DEBUG, -}; +} bt_event_class_log_level; extern const bt_stream_class *bt_event_class_borrow_stream_class_const( const bt_event_class *event_class); @@ -70,9 +70,9 @@ extern const char *bt_event_class_get_name(const bt_event_class *event_class); extern uint64_t bt_event_class_get_id(const bt_event_class *event_class); -extern enum bt_property_availability bt_event_class_get_log_level( +extern bt_property_availability bt_event_class_get_log_level( const bt_event_class *event_class, - enum bt_event_class_log_level *log_level); + bt_event_class_log_level *log_level); extern const char *bt_event_class_get_emf_uri( const bt_event_class *event_class); diff --git a/include/babeltrace/trace-ir/event-class.h b/include/babeltrace/trace-ir/event-class.h index be6bcf9b..7067b582 100644 --- a/include/babeltrace/trace-ir/event-class.h +++ b/include/babeltrace/trace-ir/event-class.h @@ -27,7 +27,7 @@ * http://www.efficios.com/ctf */ -/* For enum bt_event_class_status, enum bt_event_class_log_level */ +/* For bt_event_class_status, bt_event_class_log_level */ #include /* For bt_event_class, bt_stream_class */ @@ -48,22 +48,20 @@ extern bt_event_class *bt_event_class_create_with_id( extern bt_stream_class *bt_event_class_borrow_stream_class( bt_event_class *event_class); -extern enum bt_event_class_status bt_event_class_set_name( +extern bt_event_class_status bt_event_class_set_name( bt_event_class *event_class, const char *name); -extern void bt_event_class_set_log_level( - bt_event_class *event_class, - enum bt_event_class_log_level log_level); +extern void bt_event_class_set_log_level(bt_event_class *event_class, + bt_event_class_log_level log_level); -extern enum bt_event_class_status bt_event_class_set_emf_uri( - bt_event_class *event_class, - const char *emf_uri); +extern bt_event_class_status bt_event_class_set_emf_uri( + bt_event_class *event_class, const char *emf_uri); -extern enum bt_event_class_status +extern bt_event_class_status bt_event_class_set_specific_context_field_class(bt_event_class *event_class, bt_field_class *field_class); -extern enum bt_event_class_status bt_event_class_set_payload_field_class( +extern bt_event_class_status bt_event_class_set_payload_field_class( bt_event_class *event_class, bt_field_class *field_class); diff --git a/include/babeltrace/trace-ir/event-const.h b/include/babeltrace/trace-ir/event-const.h index 680e459f..3fafc484 100644 --- a/include/babeltrace/trace-ir/event-const.h +++ b/include/babeltrace/trace-ir/event-const.h @@ -27,7 +27,7 @@ * http://www.efficios.com/ctf */ -/* For enum bt_clock_snapshot_state */ +/* For bt_clock_snapshot_state */ #include /* For bt_event, bt_clock_snapshot, bt_event_class, bt_field, bt_packet */ @@ -37,10 +37,10 @@ extern "C" { #endif -enum bt_event_status { +typedef enum bt_event_status { BT_EVENT_STATUS_OK = 0, BT_EVENT_STATUS_NOMEM = -12, -}; +} bt_event_status; extern const bt_event_class *bt_event_borrow_class_const( const bt_event *event); @@ -63,7 +63,7 @@ extern const bt_field *bt_event_borrow_specific_context_field_const( extern const bt_field *bt_event_borrow_payload_field_const( const bt_event *event); -extern enum bt_clock_snapshot_state bt_event_borrow_default_clock_snapshot_const( +extern bt_clock_snapshot_state bt_event_borrow_default_clock_snapshot_const( const bt_event *event, const bt_clock_snapshot **clock_snapshot); diff --git a/include/babeltrace/trace-ir/event.h b/include/babeltrace/trace-ir/event.h index 2e97972c..cf18584a 100644 --- a/include/babeltrace/trace-ir/event.h +++ b/include/babeltrace/trace-ir/event.h @@ -30,7 +30,7 @@ /* For bt_event, bt_event_header_field, bt_event_class, bt_field, bt_packet */ #include -/* For enum bt_event_status */ +/* For bt_event_status */ #include #ifdef __cplusplus @@ -45,7 +45,7 @@ extern bt_stream *bt_event_borrow_stream(bt_event *event); extern bt_field *bt_event_borrow_header_field(bt_event *event); -extern enum bt_event_status bt_event_move_header_field(bt_event *event, +extern bt_event_status bt_event_move_header_field(bt_event *event, bt_event_header_field *header); extern bt_field * diff --git a/include/babeltrace/trace-ir/field-class-const.h b/include/babeltrace/trace-ir/field-class-const.h index cb369b37..c3c2d8ec 100644 --- a/include/babeltrace/trace-ir/field-class-const.h +++ b/include/babeltrace/trace-ir/field-class-const.h @@ -42,12 +42,12 @@ extern "C" { #endif -enum bt_field_class_status { +typedef enum bt_field_class_status { BT_FIELD_CLASS_STATUS_OK = 0, BT_FIELD_CLASS_STATUS_NOMEM = -12, -}; +} bt_field_class_status; -enum bt_field_class_type { +typedef enum bt_field_class_type { BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER, BT_FIELD_CLASS_TYPE_SIGNED_INTEGER, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION, @@ -58,22 +58,22 @@ enum bt_field_class_type { BT_FIELD_CLASS_TYPE_STATIC_ARRAY, BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY, BT_FIELD_CLASS_TYPE_VARIANT, -}; +} bt_field_class_type; -enum bt_field_class_integer_preferred_display_base { +typedef enum bt_field_class_integer_preferred_display_base { BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY, BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL, BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL, BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL, -}; +} bt_field_class_integer_preferred_display_base; -extern enum bt_field_class_type bt_field_class_get_type( +extern bt_field_class_type bt_field_class_get_type( const bt_field_class *field_class); extern uint64_t bt_field_class_integer_get_field_value_range( const bt_field_class *field_class); -extern enum bt_field_class_integer_preferred_display_base +extern bt_field_class_integer_preferred_display_base bt_field_class_integer_get_preferred_display_base( const bt_field_class *field_class); @@ -111,13 +111,13 @@ bt_field_class_signed_enumeration_mapping_ranges_get_range_by_index( const bt_field_class_unsigned_enumeration_mapping_ranges *ranges, uint64_t index, int64_t *lower, int64_t *upper); -extern enum bt_field_class_status +extern bt_field_class_status bt_field_class_unsigned_enumeration_get_mapping_labels_by_value( const bt_field_class *field_class, uint64_t value, bt_field_class_enumeration_mapping_label_array *label_array, uint64_t *count); -extern enum bt_field_class_status +extern bt_field_class_status bt_field_class_signed_enumeration_get_mapping_labels_by_value( const bt_field_class *field_class, int64_t value, bt_field_class_enumeration_mapping_label_array *label_array, diff --git a/include/babeltrace/trace-ir/field-class.h b/include/babeltrace/trace-ir/field-class.h index 71942862..c770f81a 100644 --- a/include/babeltrace/trace-ir/field-class.h +++ b/include/babeltrace/trace-ir/field-class.h @@ -31,8 +31,8 @@ #include /* - * For enum bt_field_class_status, - * enum bt_field_class_integer_preferred_display_base + * For bt_field_class_status, + * bt_field_class_integer_preferred_display_base */ #include @@ -52,7 +52,7 @@ extern void bt_field_class_integer_set_field_value_range( extern void bt_field_class_integer_set_preferred_display_base( bt_field_class *field_class, - enum bt_field_class_integer_preferred_display_base base); + bt_field_class_integer_preferred_display_base base); extern bt_field_class *bt_field_class_real_create(void); @@ -64,11 +64,11 @@ extern bt_field_class *bt_field_class_unsigned_enumeration_create(void); extern bt_field_class *bt_field_class_signed_enumeration_create(void); -extern enum bt_field_class_status bt_field_class_unsigned_enumeration_map_range( +extern bt_field_class_status bt_field_class_unsigned_enumeration_map_range( bt_field_class *field_class, const char *label, uint64_t range_lower, uint64_t range_upper); -extern enum bt_field_class_status bt_field_class_signed_enumeration_map_range( +extern bt_field_class_status bt_field_class_signed_enumeration_map_range( bt_field_class *field_class, const char *label, int64_t range_lower, int64_t range_upper); @@ -76,7 +76,7 @@ extern bt_field_class *bt_field_class_string_create(void); extern bt_field_class *bt_field_class_structure_create(void); -extern enum bt_field_class_status bt_field_class_structure_append_member( +extern bt_field_class_status bt_field_class_structure_append_member( bt_field_class *struct_field_class, const char *name, bt_field_class *field_class); @@ -86,18 +86,18 @@ extern bt_field_class *bt_field_class_static_array_create( extern bt_field_class *bt_field_class_dynamic_array_create( bt_field_class *elem_field_class); -extern enum bt_field_class_status +extern bt_field_class_status bt_field_class_dynamic_array_set_length_field_class( bt_field_class *field_class, bt_field_class *length_field_class); extern bt_field_class *bt_field_class_variant_create(void); -extern enum bt_field_class_status +extern bt_field_class_status bt_field_class_variant_set_selector_field_class(bt_field_class *field_class, bt_field_class *selector_field_class); -extern enum bt_field_class_status bt_field_class_variant_append_option( +extern bt_field_class_status bt_field_class_variant_append_option( bt_field_class *var_field_class, const char *name, bt_field_class *field_class); diff --git a/include/babeltrace/trace-ir/field-const.h b/include/babeltrace/trace-ir/field-const.h index e44e8328..880cde97 100644 --- a/include/babeltrace/trace-ir/field-const.h +++ b/include/babeltrace/trace-ir/field-const.h @@ -29,7 +29,7 @@ #include -/* For enum bt_field_class_type */ +/* For bt_field_class_type */ #include /* For bt_field, bt_field_class */ @@ -39,15 +39,15 @@ extern "C" { #endif -enum bt_field_status { +typedef enum bt_field_status { BT_FIELD_STATUS_OK = 0, BT_FIELD_STATUS_NOMEM = -12, -}; +} bt_field_status; extern const bt_field_class *bt_field_borrow_class_const( const bt_field *field); -extern enum bt_field_class_type bt_field_get_class_type( +extern bt_field_class_type bt_field_get_class_type( const bt_field *field); extern int64_t bt_field_signed_integer_get_value(const bt_field *field); @@ -57,12 +57,12 @@ extern uint64_t bt_field_unsigned_integer_get_value( extern double bt_field_real_get_value(const bt_field *field); -extern enum bt_field_status bt_field_unsigned_enumeration_get_mapping_labels( +extern bt_field_status bt_field_unsigned_enumeration_get_mapping_labels( const bt_field *field, bt_field_class_enumeration_mapping_label_array *label_array, uint64_t *count); -extern enum bt_field_status bt_field_signed_enumeration_get_mapping_labels( +extern bt_field_status bt_field_signed_enumeration_get_mapping_labels( const bt_field *field, bt_field_class_enumeration_mapping_label_array *label_array, uint64_t *count); diff --git a/include/babeltrace/trace-ir/field-path-const.h b/include/babeltrace/trace-ir/field-path-const.h index 1d80f939..fe5bef6f 100644 --- a/include/babeltrace/trace-ir/field-path-const.h +++ b/include/babeltrace/trace-ir/field-path-const.h @@ -35,16 +35,16 @@ extern "C" { #endif -enum bt_scope { +typedef enum bt_scope { BT_SCOPE_PACKET_HEADER, BT_SCOPE_PACKET_CONTEXT, BT_SCOPE_EVENT_HEADER, BT_SCOPE_EVENT_COMMON_CONTEXT, BT_SCOPE_EVENT_SPECIFIC_CONTEXT, BT_SCOPE_EVENT_PAYLOAD, -}; +} bt_scope; -extern enum bt_scope bt_field_path_get_root_scope( +extern bt_scope bt_field_path_get_root_scope( const bt_field_path *field_path); extern uint64_t bt_field_path_get_index_count( diff --git a/include/babeltrace/trace-ir/field.h b/include/babeltrace/trace-ir/field.h index 9c2d6e18..274794eb 100644 --- a/include/babeltrace/trace-ir/field.h +++ b/include/babeltrace/trace-ir/field.h @@ -32,7 +32,7 @@ /* For bt_field, bt_field_class */ #include -/* For enum bt_field_status */ +/* For bt_field_status */ #include #ifdef __cplusplus @@ -47,16 +47,16 @@ extern void bt_field_unsigned_integer_set_value(bt_field *field, extern void bt_field_real_set_value(bt_field *field, double value); -extern enum bt_field_status bt_field_string_set_value(bt_field *field, +extern bt_field_status bt_field_string_set_value(bt_field *field, const char *value); -extern enum bt_field_status bt_field_string_append(bt_field *field, +extern bt_field_status bt_field_string_append(bt_field *field, const char *value); -extern enum bt_field_status bt_field_string_append_with_length(bt_field *field, +extern bt_field_status bt_field_string_append_with_length(bt_field *field, const char *value, uint64_t length); -extern enum bt_field_status bt_field_string_clear(bt_field *field); +extern bt_field_status bt_field_string_clear(bt_field *field); extern bt_field *bt_field_structure_borrow_member_field_by_index( bt_field *field, uint64_t index); @@ -67,10 +67,10 @@ extern bt_field *bt_field_structure_borrow_member_field_by_name( extern bt_field *bt_field_array_borrow_element_field_by_index( bt_field *field, uint64_t index); -extern enum bt_field_status bt_field_dynamic_array_set_length(bt_field *field, +extern bt_field_status bt_field_dynamic_array_set_length(bt_field *field, uint64_t length); -extern enum bt_field_status bt_field_variant_select_option_field( +extern bt_field_status bt_field_variant_select_option_field( bt_field *field, uint64_t index); extern bt_field *bt_field_variant_borrow_selected_option_field( diff --git a/include/babeltrace/trace-ir/packet-const.h b/include/babeltrace/trace-ir/packet-const.h index 1f90f010..f2369177 100644 --- a/include/babeltrace/trace-ir/packet-const.h +++ b/include/babeltrace/trace-ir/packet-const.h @@ -28,10 +28,10 @@ #include -/* For enum bt_property_availability */ +/* For bt_property_availability */ #include -/* For enum bt_clock_snapshot_state */ +/* For bt_clock_snapshot_state */ #include /* @@ -44,10 +44,10 @@ extern "C" { #endif -enum bt_packet_status { +typedef enum bt_packet_status { BT_PACKET_STATUS_OK = 0, BT_PACKET_STATUS_NOMEM = -12, -}; +} bt_packet_status; extern const bt_stream *bt_packet_borrow_stream_const( const bt_packet *packet); @@ -61,22 +61,21 @@ const bt_field *bt_packet_borrow_context_field_const( const bt_packet *packet); extern -enum bt_clock_snapshot_state -bt_packet_borrow_default_beginning_clock_snapshot_const( +bt_clock_snapshot_state bt_packet_borrow_default_beginning_clock_snapshot_const( const bt_packet *packet, const bt_clock_snapshot **clock_snapshot); extern -enum bt_clock_snapshot_state bt_packet_borrow_default_end_clock_snapshot_const( +bt_clock_snapshot_state bt_packet_borrow_default_end_clock_snapshot_const( const bt_packet *packet, const bt_clock_snapshot **clock_snapshot); extern -enum bt_property_availability bt_packet_get_discarded_event_counter_snapshot( +bt_property_availability bt_packet_get_discarded_event_counter_snapshot( const bt_packet *packet, uint64_t *value); extern -enum bt_property_availability bt_packet_get_packet_counter_snapshot( +bt_property_availability bt_packet_get_packet_counter_snapshot( const bt_packet *packet, uint64_t *value); extern void bt_packet_get_ref(const bt_packet *packet); diff --git a/include/babeltrace/trace-ir/packet.h b/include/babeltrace/trace-ir/packet.h index 3de1edfe..eebe600a 100644 --- a/include/babeltrace/trace-ir/packet.h +++ b/include/babeltrace/trace-ir/packet.h @@ -29,7 +29,7 @@ /* For bt_packet, bt_packet_header_field, bt_packet_context_field, bt_stream */ #include -/* For enum bt_packet_status */ +/* For bt_packet_status */ #include #include @@ -46,14 +46,14 @@ extern bt_field *bt_packet_borrow_header_field(bt_packet *packet); extern -enum bt_packet_status bt_packet_move_header_field(bt_packet *packet, +bt_packet_status bt_packet_move_header_field(bt_packet *packet, bt_packet_header_field *header); extern bt_field *bt_packet_borrow_context_field(bt_packet *packet); extern -enum bt_packet_status bt_packet_move_context_field(bt_packet *packet, +bt_packet_status bt_packet_move_context_field(bt_packet *packet, bt_packet_context_field *context); extern diff --git a/include/babeltrace/trace-ir/stream-class-const.h b/include/babeltrace/trace-ir/stream-class-const.h index dee6fbde..c4307cf3 100644 --- a/include/babeltrace/trace-ir/stream-class-const.h +++ b/include/babeltrace/trace-ir/stream-class-const.h @@ -39,10 +39,10 @@ extern "C" { #endif -enum bt_stream_class_status { +typedef enum bt_stream_class_status { BT_STREAM_CLASS_STATUS_OK = 0, BT_STREAM_CLASS_STATUS_NOMEM = -12, -}; +} bt_stream_class_status; extern const bt_trace_class *bt_stream_class_borrow_trace_class_const( const bt_stream_class *stream_class); diff --git a/include/babeltrace/trace-ir/stream-class.h b/include/babeltrace/trace-ir/stream-class.h index c8a8c98b..7895568b 100644 --- a/include/babeltrace/trace-ir/stream-class.h +++ b/include/babeltrace/trace-ir/stream-class.h @@ -35,7 +35,7 @@ */ #include -/* For enum bt_stream_class_status */ +/* For bt_stream_class_status */ #include #ifdef __cplusplus @@ -51,7 +51,7 @@ extern bt_stream_class *bt_stream_class_create_with_id( extern bt_trace_class *bt_stream_class_borrow_trace_class( bt_stream_class *stream_class); -extern enum bt_stream_class_status bt_stream_class_set_name( +extern bt_stream_class_status bt_stream_class_set_name( bt_stream_class *stream_class, const char *name); extern void bt_stream_class_set_assigns_automatic_event_class_id( @@ -60,17 +60,17 @@ extern void bt_stream_class_set_assigns_automatic_event_class_id( extern void bt_stream_class_set_assigns_automatic_stream_id( bt_stream_class *stream_class, bt_bool value); -extern enum bt_stream_class_status +extern bt_stream_class_status bt_stream_class_set_packet_context_field_class( bt_stream_class *stream_class, bt_field_class *field_class); -extern enum bt_stream_class_status +extern bt_stream_class_status bt_stream_class_set_event_header_field_class( bt_stream_class *stream_class, bt_field_class *field_class); -extern enum bt_stream_class_status +extern bt_stream_class_status bt_stream_class_set_event_common_context_field_class( bt_stream_class *stream_class, bt_field_class *field_class); @@ -86,7 +86,7 @@ bt_stream_class_borrow_event_class_by_id( extern bt_clock_class *bt_stream_class_borrow_default_clock_class( bt_stream_class *stream_class); -extern enum bt_stream_class_status bt_stream_class_set_default_clock_class( +extern bt_stream_class_status bt_stream_class_set_default_clock_class( bt_stream_class *stream_class, bt_clock_class *clock_class); diff --git a/include/babeltrace/trace-ir/stream-const.h b/include/babeltrace/trace-ir/stream-const.h index 0edbdac1..875b9ddf 100644 --- a/include/babeltrace/trace-ir/stream-const.h +++ b/include/babeltrace/trace-ir/stream-const.h @@ -36,10 +36,10 @@ extern "C" { #endif -enum bt_stream_status { +typedef enum bt_stream_status { BT_STREAM_STATUS_OK = 0, BT_STREAM_STATUS_NOMEM = -12, -}; +} bt_stream_status; extern const bt_stream_class *bt_stream_borrow_class_const( const bt_stream *stream); diff --git a/include/babeltrace/trace-ir/stream.h b/include/babeltrace/trace-ir/stream.h index ba3921a8..71d21714 100644 --- a/include/babeltrace/trace-ir/stream.h +++ b/include/babeltrace/trace-ir/stream.h @@ -30,7 +30,7 @@ /* For bt_trace, bt_stream, bt_stream_class */ #include -/* For enum bt_stream_status */ +/* For bt_stream_status */ #include #include @@ -50,7 +50,7 @@ extern bt_trace *bt_stream_borrow_trace(bt_stream *stream); extern bt_stream_class *bt_stream_borrow_class(bt_stream *stream); -extern enum bt_stream_status bt_stream_set_name(bt_stream *stream, +extern bt_stream_status bt_stream_set_name(bt_stream *stream, const char *name); #ifdef __cplusplus diff --git a/include/babeltrace/trace-ir/trace-class-const.h b/include/babeltrace/trace-ir/trace-class-const.h index 0cc1ebb3..c4387998 100644 --- a/include/babeltrace/trace-ir/trace-class-const.h +++ b/include/babeltrace/trace-ir/trace-class-const.h @@ -39,10 +39,10 @@ extern "C" { #endif -enum bt_trace_class_status { +typedef enum bt_trace_class_status { BT_TRACE_CLASS_STATUS_OK = 0, BT_TRACE_CLASS_STATUS_NOMEM = -12, -}; +} bt_trace_class_status; extern bt_bool bt_trace_class_assigns_automatic_stream_class_id( const bt_trace_class *trace_class); diff --git a/include/babeltrace/trace-ir/trace-class.h b/include/babeltrace/trace-ir/trace-class.h index a22ff1aa..5cbabc03 100644 --- a/include/babeltrace/trace-ir/trace-class.h +++ b/include/babeltrace/trace-ir/trace-class.h @@ -30,7 +30,7 @@ /* For bt_bool, bt_uuid, bt_trace_class, bt_stream_class, bt_field_class */ #include -/* For enum bt_trace_class_status */ +/* For bt_trace_class_status */ #include #include @@ -44,21 +44,21 @@ extern bt_trace_class *bt_trace_class_create(void); extern void bt_trace_class_set_assigns_automatic_stream_class_id( bt_trace_class *trace_class, bt_bool value); -extern enum bt_trace_class_status bt_trace_class_set_name( +extern bt_trace_class_status bt_trace_class_set_name( bt_trace_class *trace_class, const char *name); extern void bt_trace_class_set_uuid(bt_trace_class *trace_class, bt_uuid uuid); -extern enum bt_trace_class_status bt_trace_class_set_environment_entry_integer( +extern bt_trace_class_status bt_trace_class_set_environment_entry_integer( bt_trace_class *trace_class, const char *name, int64_t value); -extern enum bt_trace_class_status bt_trace_class_set_environment_entry_string( +extern bt_trace_class_status bt_trace_class_set_environment_entry_string( bt_trace_class *trace_class, const char *name, const char *value); -extern enum bt_trace_class_status bt_trace_class_set_packet_header_field_class( +extern bt_trace_class_status bt_trace_class_set_packet_header_field_class( bt_trace_class *trace_class, bt_field_class *packet_header_field_class); diff --git a/include/babeltrace/trace-ir/trace-const.h b/include/babeltrace/trace-ir/trace-const.h index 42a80a79..adb38240 100644 --- a/include/babeltrace/trace-ir/trace-const.h +++ b/include/babeltrace/trace-ir/trace-const.h @@ -39,10 +39,10 @@ extern "C" { #endif -enum bt_trace_status { +typedef enum bt_trace_status { BT_TRACE_STATUS_OK = 0, BT_TRACE_STATUS_NOMEM = -12, -}; +} bt_trace_status; typedef void (* bt_trace_is_static_listener_func)(const bt_trace *trace, void *data); @@ -65,13 +65,13 @@ extern const bt_stream *bt_trace_borrow_stream_by_id_const( extern bt_bool bt_trace_is_static(const bt_trace *trace); -extern enum bt_trace_status bt_trace_add_is_static_listener( +extern bt_trace_status bt_trace_add_is_static_listener( const bt_trace *trace, bt_trace_is_static_listener_func listener, bt_trace_listener_removed_func listener_removed, void *data, uint64_t *listener_id); -extern enum bt_trace_status bt_trace_remove_is_static_listener( +extern bt_trace_status bt_trace_remove_is_static_listener( const bt_trace *trace, uint64_t listener_id); extern void bt_trace_get_ref(const bt_trace *trace); diff --git a/include/babeltrace/trace-ir/trace.h b/include/babeltrace/trace-ir/trace.h index 460c4b7d..0ae25f9a 100644 --- a/include/babeltrace/trace-ir/trace.h +++ b/include/babeltrace/trace-ir/trace.h @@ -30,7 +30,7 @@ /* For bt_bool, bt_trace, bt_trace_class, bt_stream */ #include -/* For enum bt_trace_status */ +/* For bt_trace_status */ #include #include @@ -43,7 +43,7 @@ extern bt_trace_class *bt_trace_borrow_class(bt_trace *trace); extern bt_trace *bt_trace_create(bt_trace_class *trace_class); -extern enum bt_trace_status bt_trace_set_name(bt_trace *trace, +extern bt_trace_status bt_trace_set_name(bt_trace *trace, const char *name); extern bt_stream *bt_trace_borrow_stream_by_index(bt_trace *trace, @@ -52,7 +52,7 @@ extern bt_stream *bt_trace_borrow_stream_by_index(bt_trace *trace, extern bt_stream *bt_trace_borrow_stream_by_id(bt_trace *trace, uint64_t id); -extern enum bt_trace_status bt_trace_make_static(bt_trace *trace); +extern bt_trace_status bt_trace_make_static(bt_trace *trace); #ifdef __cplusplus } diff --git a/include/babeltrace/value-const.h b/include/babeltrace/value-const.h index 8966194c..e5ff39da 100644 --- a/include/babeltrace/value-const.h +++ b/include/babeltrace/value-const.h @@ -33,7 +33,7 @@ extern "C" { #endif -enum bt_value_status { +typedef enum bt_value_status { /// Operation canceled. BT_VALUE_STATUS_CANCELED = 125, @@ -42,9 +42,9 @@ enum bt_value_status { /// Okay, no error. BT_VALUE_STATUS_OK = 0, -}; +} bt_value_status; -enum bt_value_type { +typedef enum bt_value_type { /// Null value object. BT_VALUE_TYPE_NULL = 0, @@ -65,9 +65,9 @@ enum bt_value_type { /// Map value object. BT_VALUE_TYPE_MAP = 6, -}; +} bt_value_type; -extern enum bt_value_type bt_value_get_type(const bt_value *object); +extern bt_value_type bt_value_get_type(const bt_value *object); static inline bt_bool bt_value_is_null(const bt_value *object) @@ -111,7 +111,7 @@ bt_bool bt_value_is_map(const bt_value *object) return bt_value_get_type(object) == BT_VALUE_TYPE_MAP; } -extern enum bt_value_status bt_value_copy(const bt_value *object, +extern bt_value_status bt_value_copy(const bt_value *object, bt_value **copy); extern bt_bool bt_value_compare(const bt_value *object_a, @@ -150,14 +150,14 @@ extern const bt_value *bt_value_map_borrow_entry_value_const( typedef bt_bool (* bt_value_map_foreach_entry_const_func)(const char *key, const bt_value *object, void *data); -extern enum bt_value_status bt_value_map_foreach_entry_const( +extern bt_value_status bt_value_map_foreach_entry_const( const bt_value *map_obj, bt_value_map_foreach_entry_const_func func, void *data); extern bt_bool bt_value_map_has_entry(const bt_value *map_obj, const char *key); -extern enum bt_value_status bt_value_map_extend( +extern bt_value_status bt_value_map_extend( const bt_value *base_map_obj, const bt_value *extension_map_obj, bt_value **extended_map_obj); diff --git a/include/babeltrace/value.h b/include/babeltrace/value.h index 9db6da22..1e6bdc47 100644 --- a/include/babeltrace/value.h +++ b/include/babeltrace/value.h @@ -29,7 +29,7 @@ /* For bt_bool, bt_value */ #include -/* For enum bt_value_status, enum bt_value_type */ +/* For bt_value_status, bt_value_type */ #include #ifdef __cplusplus @@ -61,7 +61,7 @@ extern bt_value *bt_value_string_create(void); extern bt_value *bt_value_string_create_init(const char *val); -extern enum bt_value_status bt_value_string_set(bt_value *string_obj, +extern bt_value_status bt_value_string_set(bt_value *string_obj, const char *val); extern bt_value *bt_value_array_create(void); @@ -69,29 +69,29 @@ extern bt_value *bt_value_array_create(void); extern bt_value *bt_value_array_borrow_element_by_index( bt_value *array_obj, uint64_t index); -extern enum bt_value_status bt_value_array_append_element( +extern bt_value_status bt_value_array_append_element( bt_value *array_obj, bt_value *element_obj); -extern enum bt_value_status bt_value_array_append_bool_element( +extern bt_value_status bt_value_array_append_bool_element( bt_value *array_obj, bt_bool val); -extern enum bt_value_status bt_value_array_append_integer_element( +extern bt_value_status bt_value_array_append_integer_element( bt_value *array_obj, int64_t val); -extern enum bt_value_status bt_value_array_append_real_element( +extern bt_value_status bt_value_array_append_real_element( bt_value *array_obj, double val); -extern enum bt_value_status bt_value_array_append_string_element( +extern bt_value_status bt_value_array_append_string_element( bt_value *array_obj, const char *val); -extern enum bt_value_status bt_value_array_append_empty_array_element( +extern bt_value_status bt_value_array_append_empty_array_element( bt_value *array_obj); -extern enum bt_value_status bt_value_array_append_empty_map_element( +extern bt_value_status bt_value_array_append_empty_map_element( bt_value *array_obj); -extern enum bt_value_status bt_value_array_set_element_by_index( +extern bt_value_status bt_value_array_set_element_by_index( bt_value *array_obj, uint64_t index, bt_value *element_obj); @@ -103,31 +103,31 @@ extern bt_value *bt_value_map_borrow_entry_value( typedef bt_bool (* bt_value_map_foreach_entry_func)(const char *key, bt_value *object, void *data); -extern enum bt_value_status bt_value_map_foreach_entry( +extern bt_value_status bt_value_map_foreach_entry( bt_value *map_obj, bt_value_map_foreach_entry_func func, void *data); -extern enum bt_value_status bt_value_map_insert_entry( +extern bt_value_status bt_value_map_insert_entry( bt_value *map_obj, const char *key, bt_value *element_obj); -extern enum bt_value_status bt_value_map_insert_bool_entry( +extern bt_value_status bt_value_map_insert_bool_entry( bt_value *map_obj, const char *key, bt_bool val); -extern enum bt_value_status bt_value_map_insert_integer_entry( +extern bt_value_status bt_value_map_insert_integer_entry( bt_value *map_obj, const char *key, int64_t val); -extern enum bt_value_status bt_value_map_insert_real_entry( +extern bt_value_status bt_value_map_insert_real_entry( bt_value *map_obj, const char *key, double val); -extern enum bt_value_status bt_value_map_insert_string_entry( +extern bt_value_status bt_value_map_insert_string_entry( bt_value *map_obj, const char *key, const char *val); -extern enum bt_value_status bt_value_map_insert_empty_array_entry( +extern bt_value_status bt_value_map_insert_empty_array_entry( bt_value *map_obj, const char *key); -extern enum bt_value_status bt_value_map_insert_empty_map_entry( +extern bt_value_status bt_value_map_insert_empty_map_entry( bt_value *map_obj, const char *key); #ifdef __cplusplus diff --git a/plugins/ctf/common/metadata/ctf-meta-resolve.c b/plugins/ctf/common/metadata/ctf-meta-resolve.c index 0292a7df..ab2b44aa 100644 --- a/plugins/ctf/common/metadata/ctf-meta-resolve.c +++ b/plugins/ctf/common/metadata/ctf-meta-resolve.c @@ -64,7 +64,7 @@ struct resolve_context { } scopes; /* Root scope being visited */ - enum bt_scope root_scope; + bt_scope root_scope; field_class_stack *field_class_stack; struct ctf_field_class *cur_fc; }; @@ -227,7 +227,7 @@ void field_class_stack_pop(field_class_stack *stack) */ static struct ctf_field_class *borrow_class_from_ctx(struct resolve_context *ctx, - enum bt_scope scope) + bt_scope scope) { switch (scope) { case BT_SCOPE_PACKET_HEADER: @@ -254,10 +254,10 @@ struct ctf_field_class *borrow_class_from_ctx(struct resolve_context *ctx, * is found to be relative. */ static -enum bt_scope get_root_scope_from_absolute_pathstr(const char *pathstr) +bt_scope get_root_scope_from_absolute_pathstr(const char *pathstr) { - enum bt_scope scope; - enum bt_scope ret = -1; + bt_scope scope; + bt_scope ret = -1; const size_t prefixes_count = sizeof(absolute_path_prefixes) / sizeof(*absolute_path_prefixes); @@ -637,7 +637,7 @@ int pathstr_to_field_path(const char *pathstr, struct ctf_field_path *field_path, struct resolve_context *ctx) { int ret = 0; - enum bt_scope root_scope; + bt_scope root_scope; GList *ptokens = NULL; /* Convert path string to path tokens */ @@ -1148,7 +1148,7 @@ end: * Resolves the root field class corresponding to the scope `root_scope`. */ static -int resolve_root_class(enum bt_scope root_scope, struct resolve_context *ctx) +int resolve_root_class(bt_scope root_scope, struct resolve_context *ctx) { int ret; diff --git a/plugins/ctf/common/metadata/ctf-meta.h b/plugins/ctf/common/metadata/ctf-meta.h index b4d56a45..bca30c7a 100644 --- a/plugins/ctf/common/metadata/ctf-meta.h +++ b/plugins/ctf/common/metadata/ctf-meta.h @@ -79,7 +79,7 @@ struct ctf_field_class_int { struct ctf_field_class_bit_array base; enum ctf_field_class_meaning meaning; bool is_signed; - enum bt_field_class_integer_preferred_display_base disp_base; + bt_field_class_integer_preferred_display_base disp_base; enum ctf_encoding encoding; int64_t storing_index; @@ -135,7 +135,7 @@ struct ctf_field_class_struct { }; struct ctf_field_path { - enum bt_scope root; + bt_scope root; /* Array of `int64_t` */ GArray *path; @@ -188,7 +188,7 @@ struct ctf_event_class { GString *name; uint64_t id; GString *emf_uri; - enum bt_event_class_log_level log_level; + bt_event_class_log_level log_level; bool is_translated; /* Owned by this */ diff --git a/plugins/ctf/common/metadata/visitor-generate-ir.c b/plugins/ctf/common/metadata/visitor-generate-ir.c index 08c1e03b..71957e20 100644 --- a/plugins/ctf/common/metadata/visitor-generate-ir.c +++ b/plugins/ctf/common/metadata/visitor-generate-ir.c @@ -2352,7 +2352,7 @@ int visit_integer_decl(struct ctx *ctx, uint64_t alignment = 0, size = 0; bt_clock_class *mapped_clock_class = NULL; enum ctf_encoding encoding = CTF_ENCODING_NONE; - enum bt_field_class_integer_preferred_display_base base = + bt_field_class_integer_preferred_display_base base = BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL; enum ctf_byte_order byte_order = ctx->ctf_tc->default_byte_order; @@ -3252,7 +3252,7 @@ int visit_event_decl_entry(struct ctx *ctx, struct ctf_node *node, _SET(set, _EVENT_FIELDS_SET); } else if (!strcmp(left, "loglevel")) { uint64_t loglevel_value; - enum bt_event_class_log_level log_level = -1; + bt_event_class_log_level log_level = -1; if (_IS_SET(set, _EVENT_LOG_LEVEL_SET)) { _BT_LOGE_DUP_ATTR(node, "loglevel", diff --git a/plugins/ctf/fs-sink/write.c b/plugins/ctf/fs-sink/write.c index 05a75e5a..82057e02 100644 --- a/plugins/ctf/fs-sink/write.c +++ b/plugins/ctf/fs-sink/write.c @@ -111,7 +111,7 @@ const bt_stream_class *insert_new_stream_class( const bt_stream_class *writer_stream_class = NULL; const bt_trace *trace = NULL, *writer_trace = NULL; struct bt_ctf_writer *ctf_writer = fs_writer->writer; - enum bt_component_status ret; + bt_component_status ret; trace = bt_stream_class_get_trace(stream_class); BT_ASSERT(trace); @@ -285,7 +285,7 @@ struct fs_writer *insert_new_writer( struct bt_ctf_writer *ctf_writer = NULL; const bt_trace *writer_trace = NULL; char trace_path[PATH_MAX]; - enum bt_component_status ret; + bt_component_status ret; const bt_stream *stream = NULL; struct fs_writer *fs_writer = NULL; int nr_stream, i; @@ -530,14 +530,14 @@ void writer_close(struct writer_component *writer_component, } BT_HIDDEN -enum bt_component_status writer_stream_begin( +bt_component_status writer_stream_begin( struct writer_component *writer_component, const bt_stream *stream) { const bt_stream_class *stream_class = NULL; struct fs_writer *fs_writer; const bt_stream *writer_stream = NULL; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; enum fs_writer_stream_state *state; stream_class = bt_stream_get_class(stream); @@ -582,14 +582,14 @@ end: } BT_HIDDEN -enum bt_component_status writer_stream_end( +bt_component_status writer_stream_end( struct writer_component *writer_component, const bt_stream *stream) { const bt_stream_class *stream_class = NULL; struct fs_writer *fs_writer; const bt_trace *trace = NULL; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; enum fs_writer_stream_state *state; stream_class = bt_stream_get_class(stream); @@ -633,12 +633,12 @@ end: } BT_HIDDEN -enum bt_component_status writer_new_packet( +bt_component_status writer_new_packet( struct writer_component *writer_component, const bt_packet *packet) { const bt_stream *stream = NULL, *writer_stream = NULL; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; int int_ret; stream = bt_packet_get_stream(packet); @@ -676,12 +676,12 @@ end: } BT_HIDDEN -enum bt_component_status writer_close_packet( +bt_component_status writer_close_packet( struct writer_component *writer_component, const bt_packet *packet) { const bt_stream *stream = NULL, *writer_stream = NULL; - enum bt_component_status ret; + bt_component_status ret; stream = bt_packet_get_stream(packet); BT_ASSERT(stream); @@ -715,11 +715,11 @@ end: } BT_HIDDEN -enum bt_component_status writer_output_event( +bt_component_status writer_output_event( struct writer_component *writer_component, const bt_event *event) { - enum bt_component_status ret; + bt_component_status ret; const bt_event_class *event_class = NULL, *writer_event_class = NULL; const bt_stream *stream = NULL, *writer_stream = NULL; const bt_stream_class *stream_class = NULL, *writer_stream_class = NULL; diff --git a/plugins/ctf/fs-sink/writer.c b/plugins/ctf/fs-sink/writer.c index 38db9a5e..72e3ab66 100644 --- a/plugins/ctf/fs-sink/writer.c +++ b/plugins/ctf/fs-sink/writer.c @@ -109,11 +109,11 @@ end: } static -enum bt_component_status handle_message( +bt_component_status handle_message( struct writer_component *writer_component, const bt_message *message) { - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; if (!writer_component) { ret = BT_COMPONENT_STATUS_ERROR; @@ -205,7 +205,7 @@ void writer_component_port_connected( { struct bt_private_connection *connection; struct writer_component *writer; - enum bt_connection_status conn_status; + bt_connection_status conn_status; writer = bt_self_component_get_user_data(component); BT_ASSERT(writer); @@ -222,14 +222,14 @@ void writer_component_port_connected( } BT_HIDDEN -enum bt_component_status writer_run(bt_self_component *component) +bt_component_status writer_run(bt_self_component *component) { - enum bt_component_status ret; + bt_component_status ret; const bt_message *message = NULL; bt_message_iterator *it; struct writer_component *writer_component = bt_self_component_get_user_data(component); - enum bt_message_iterator_status it_ret; + bt_message_iterator_status it_ret; if (unlikely(writer_component->error)) { ret = BT_COMPONENT_STATUS_ERROR; @@ -264,14 +264,14 @@ end: } static -enum bt_component_status apply_one_bool(const char *key, +bt_component_status apply_one_bool(const char *key, bt_value *params, bool *option, bool *found) { - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; bt_value *value = NULL; - enum bt_value_status status; + bt_value_status status; bt_bool bool_val; value = bt_value_map_get(params, key); @@ -290,12 +290,12 @@ end: } BT_HIDDEN -enum bt_component_status writer_component_init( +bt_component_status writer_component_init( bt_self_component *component, bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_component_status ret; - enum bt_value_status value_ret; + bt_component_status ret; + bt_value_status value_ret; struct writer_component *writer_component = create_writer_component(); bt_value *value = NULL; const char *path; diff --git a/plugins/ctf/fs-sink/writer.h b/plugins/ctf/fs-sink/writer.h index 965f3d2c..34f54ae7 100644 --- a/plugins/ctf/fs-sink/writer.h +++ b/plugins/ctf/fs-sink/writer.h @@ -75,28 +75,28 @@ BT_HIDDEN void writer_close(struct writer_component *writer_component, struct fs_writer *fs_writer); BT_HIDDEN -enum bt_component_status writer_output_event(struct writer_component *writer, +bt_component_status writer_output_event(struct writer_component *writer, const bt_event *event); BT_HIDDEN -enum bt_component_status writer_new_packet(struct writer_component *writer, +bt_component_status writer_new_packet(struct writer_component *writer, const bt_packet *packet); BT_HIDDEN -enum bt_component_status writer_close_packet(struct writer_component *writer, +bt_component_status writer_close_packet(struct writer_component *writer, const bt_packet *packet); BT_HIDDEN -enum bt_component_status writer_stream_begin(struct writer_component *writer, +bt_component_status writer_stream_begin(struct writer_component *writer, const bt_stream *stream); BT_HIDDEN -enum bt_component_status writer_stream_end(struct writer_component *writer, +bt_component_status writer_stream_end(struct writer_component *writer, const bt_stream *stream); BT_HIDDEN -enum bt_component_status writer_component_init( +bt_component_status writer_component_init( bt_self_component *component, bt_value *params, void *init_method_data); BT_HIDDEN -enum bt_component_status writer_run(bt_self_component *component); +bt_component_status writer_run(bt_self_component *component); BT_HIDDEN void writer_component_port_connected( diff --git a/plugins/ctf/fs-src/data-stream-file.c b/plugins/ctf/fs-src/data-stream-file.c index da4d1fa5..3c4b0bfe 100644 --- a/plugins/ctf/fs-src/data-stream-file.c +++ b/plugins/ctf/fs-src/data-stream-file.c @@ -706,12 +706,12 @@ void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file) } BT_HIDDEN -enum bt_message_iterator_status ctf_fs_ds_file_next( +bt_message_iterator_status ctf_fs_ds_file_next( struct ctf_fs_ds_file *ds_file, bt_message **msg) { enum bt_msg_iter_status msg_iter_status; - enum bt_message_iterator_status status; + bt_message_iterator_status status; msg_iter_status = bt_msg_iter_get_next_message( ds_file->msg_iter, ds_file->pc_msg_iter, msg); diff --git a/plugins/ctf/fs-src/data-stream-file.h b/plugins/ctf/fs-src/data-stream-file.h index 544e3559..0ccba27a 100644 --- a/plugins/ctf/fs-src/data-stream-file.h +++ b/plugins/ctf/fs-src/data-stream-file.h @@ -142,7 +142,7 @@ BT_HIDDEN void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream); BT_HIDDEN -enum bt_message_iterator_status ctf_fs_ds_file_next( +bt_message_iterator_status ctf_fs_ds_file_next( struct ctf_fs_ds_file *ds_file, bt_message **msg); diff --git a/plugins/ctf/fs-src/fs.c b/plugins/ctf/fs-src/fs.c index 5b15ffa2..b6e2fb4f 100644 --- a/plugins/ctf/fs-src/fs.c +++ b/plugins/ctf/fs-src/fs.c @@ -88,11 +88,11 @@ void ctf_fs_msg_iter_data_destroy( } static -enum bt_self_message_iterator_status ctf_fs_iterator_next_one( +bt_self_message_iterator_status ctf_fs_iterator_next_one( struct ctf_fs_msg_iter_data *msg_iter_data, const bt_message **msg) { - enum bt_self_message_iterator_status status; + bt_self_message_iterator_status status; bt_message *priv_msg; int ret; @@ -194,12 +194,12 @@ end: } BT_HIDDEN -enum bt_self_message_iterator_status ctf_fs_iterator_next( +bt_self_message_iterator_status ctf_fs_iterator_next( bt_self_message_iterator *iterator, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) { - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; struct ctf_fs_msg_iter_data *msg_iter_data = bt_self_message_iterator_get_data(iterator); @@ -237,14 +237,14 @@ void ctf_fs_iterator_finalize(bt_self_message_iterator *it) bt_self_message_iterator_get_data(it)); } -enum bt_self_message_iterator_status ctf_fs_iterator_init( +bt_self_message_iterator_status ctf_fs_iterator_init( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port) { struct ctf_fs_port_data *port_data; struct ctf_fs_msg_iter_data *msg_iter_data = NULL; - enum bt_self_message_iterator_status ret = + bt_self_message_iterator_status ret = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; int iret; @@ -1384,12 +1384,12 @@ end: } BT_HIDDEN -enum bt_self_component_status ctf_fs_init( +bt_self_component_status ctf_fs_init( bt_self_component_source *self_comp, const bt_value *params, UNUSED_VAR void *init_method_data) { struct ctf_fs_component *ctf_fs; - enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; ctf_fs = ctf_fs_create(self_comp, params); if (!ctf_fs) { @@ -1400,13 +1400,13 @@ enum bt_self_component_status ctf_fs_init( } BT_HIDDEN -enum bt_query_status ctf_fs_query( +bt_query_status ctf_fs_query( bt_self_component_class_source *comp_class, const bt_query_executor *query_exec, const char *object, const bt_value *params, const bt_value **result) { - enum bt_query_status status = BT_QUERY_STATUS_OK; + bt_query_status status = BT_QUERY_STATUS_OK; if (!strcmp(object, "metadata-info")) { status = metadata_info_query(comp_class, params, result); diff --git a/plugins/ctf/fs-src/fs.h b/plugins/ctf/fs-src/fs.h index bbcf48ee..3f36387f 100644 --- a/plugins/ctf/fs-src/fs.h +++ b/plugins/ctf/fs-src/fs.h @@ -155,7 +155,7 @@ struct ctf_fs_msg_iter_data { }; BT_HIDDEN -enum bt_self_component_status ctf_fs_init( +bt_self_component_status ctf_fs_init( bt_self_component_source *source, const bt_value *params, void *init_method_data); @@ -163,7 +163,7 @@ BT_HIDDEN void ctf_fs_finalize(bt_self_component_source *component); BT_HIDDEN -enum bt_query_status ctf_fs_query( +bt_query_status ctf_fs_query( bt_self_component_class_source *comp_class, const bt_query_executor *query_exec, const char *object, const bt_value *params, @@ -183,7 +183,7 @@ BT_HIDDEN GList *ctf_fs_create_trace_names(GList *trace_paths, const char *base_path); BT_HIDDEN -enum bt_self_message_iterator_status ctf_fs_iterator_init( +bt_self_message_iterator_status ctf_fs_iterator_init( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port); @@ -192,7 +192,7 @@ BT_HIDDEN void ctf_fs_iterator_finalize(bt_self_message_iterator *it); BT_HIDDEN -enum bt_self_message_iterator_status ctf_fs_iterator_next( +bt_self_message_iterator_status ctf_fs_iterator_next( bt_self_message_iterator *iterator, bt_message_array_const msgs, uint64_t capacity, uint64_t *count); diff --git a/plugins/ctf/fs-src/query.c b/plugins/ctf/fs-src/query.c index 0cdf22c1..bccb78aa 100644 --- a/plugins/ctf/fs-src/query.c +++ b/plugins/ctf/fs-src/query.c @@ -46,12 +46,12 @@ struct range { }; BT_HIDDEN -enum bt_query_status metadata_info_query( +bt_query_status metadata_info_query( bt_self_component_class_source *comp_class, const bt_value *params, const bt_value **user_result) { - enum bt_query_status status = BT_QUERY_STATUS_OK; + bt_query_status status = BT_QUERY_STATUS_OK; bt_value *result = NULL; const bt_value *path_value = NULL; char *metadata_text = NULL; @@ -185,7 +185,7 @@ int add_range(bt_value *info, struct range *range, const char *range_name) { int ret = 0; - enum bt_value_status status; + bt_value_status status; bt_value *range_map = NULL; if (!range->set) { @@ -230,7 +230,7 @@ int add_stream_ids(bt_value *info, const bt_stream *stream) { int ret = 0; int64_t stream_class_id, stream_instance_id; - enum bt_value_status status; + bt_value_status status; const bt_stream_class *stream_class = NULL; stream_instance_id = bt_stream_get_id(stream); @@ -271,7 +271,7 @@ int populate_stream_info(struct ctf_fs_ds_file_group *group, { int ret = 0; size_t file_idx; - enum bt_value_status status; + bt_value_status status; bt_value *file_paths; stream_range->begin_ns = INT64_MAX; @@ -347,7 +347,7 @@ int populate_trace_info(const char *trace_path, const char *trace_name, int ret = 0; size_t group_idx; struct ctf_fs_trace *trace = NULL; - enum bt_value_status status; + bt_value_status status; bt_value *file_groups; struct range trace_range = { .begin_ns = INT64_MAX, @@ -462,12 +462,12 @@ end: } BT_HIDDEN -enum bt_query_status trace_info_query( +bt_query_status trace_info_query( bt_self_component_class_source *comp_class, const bt_value *params, const bt_value **user_result) { - enum bt_query_status status = BT_QUERY_STATUS_OK; + bt_query_status status = BT_QUERY_STATUS_OK; bt_value *result = NULL; const bt_value *path_value = NULL; int ret = 0; @@ -520,7 +520,7 @@ enum bt_query_status trace_info_query( tn_node = g_list_next(tn_node)) { GString *trace_path = tp_node->data; GString *trace_name = tn_node->data; - enum bt_value_status status; + bt_value_status status; bt_value *trace_info; trace_info = bt_value_map_create(); diff --git a/plugins/ctf/fs-src/query.h b/plugins/ctf/fs-src/query.h index e778d4d0..25229fde 100644 --- a/plugins/ctf/fs-src/query.h +++ b/plugins/ctf/fs-src/query.h @@ -29,12 +29,12 @@ #include BT_HIDDEN -enum bt_query_status metadata_info_query( +bt_query_status metadata_info_query( bt_self_component_class_source *comp_class, const bt_value *params, const bt_value **result); BT_HIDDEN -enum bt_query_status trace_info_query( +bt_query_status trace_info_query( bt_self_component_class_source *comp_class, const bt_value *params, const bt_value **result); diff --git a/plugins/ctf/lttng-live/data-stream.c b/plugins/ctf/lttng-live/data-stream.c index 54eb9dfc..fde80b64 100644 --- a/plugins/ctf/lttng-live/data-stream.c +++ b/plugins/ctf/lttng-live/data-stream.c @@ -111,7 +111,7 @@ static struct bt_msg_iter_medium_ops medops = { }; BT_HIDDEN -enum bt_lttng_live_iterator_status lttng_live_lazy_msg_init( +bt_lttng_live_iterator_status lttng_live_lazy_msg_init( struct lttng_live_session *session) { struct lttng_live_component *lttng_live = session->lttng_live; diff --git a/plugins/ctf/lttng-live/data-stream.h b/plugins/ctf/lttng-live/data-stream.h index 3812315e..5c219c32 100644 --- a/plugins/ctf/lttng-live/data-stream.h +++ b/plugins/ctf/lttng-live/data-stream.h @@ -31,7 +31,7 @@ #include "lttng-live-internal.h" #include "../common/msg-iter/msg-iter.h" -enum bt_lttng_live_iterator_status lttng_live_lazy_msg_init( +bt_lttng_live_iterator_status lttng_live_lazy_msg_init( struct lttng_live_session *session); struct lttng_live_stream_iterator *lttng_live_stream_iterator_create( diff --git a/plugins/ctf/lttng-live/lttng-live-internal.h b/plugins/ctf/lttng-live/lttng-live-internal.h index f8923a74..fe353143 100644 --- a/plugins/ctf/lttng-live/lttng-live-internal.h +++ b/plugins/ctf/lttng-live/lttng-live-internal.h @@ -190,7 +190,7 @@ struct lttng_live_component { bt_component *downstream_component; }; -enum bt_lttng_live_iterator_status { +bt_lttng_live_iterator_status { /** Iterator state has progressed. Continue iteration immediately. */ BT_LTTNG_LIVE_ITERATOR_STATUS_CONTINUE = 3, /** No message available for now. Try again later. */ @@ -209,7 +209,7 @@ enum bt_lttng_live_iterator_status { BT_LTTNG_LIVE_ITERATOR_STATUS_UNSUPPORTED = -4, }; -enum bt_component_status lttng_live_component_init(bt_self_component *source, +bt_component_status lttng_live_component_init(bt_self_component *source, bt_value *params, void *init_method_data); bt_component_class_query_method_return lttng_live_query( @@ -222,12 +222,12 @@ void lttng_live_component_finalize(bt_self_component *component); bt_message_iterator_next_method_return lttng_live_iterator_next( bt_self_message_iterator *iterator); -enum bt_component_status lttng_live_accept_port_connection( +bt_component_status lttng_live_accept_port_connection( bt_self_component *private_component, struct bt_private_port *self_private_port, const bt_port *other_port); -enum bt_message_iterator_status lttng_live_iterator_init( +bt_message_iterator_status lttng_live_iterator_init( bt_self_message_iterator *it, struct bt_private_port *port); @@ -236,7 +236,7 @@ void lttng_live_iterator_finalize(bt_self_message_iterator *it); int lttng_live_create_viewer_session(struct lttng_live_component *lttng_live); int lttng_live_attach_session(struct lttng_live_session *session); int lttng_live_detach_session(struct lttng_live_session *session); -enum bt_lttng_live_iterator_status lttng_live_get_new_streams( +bt_lttng_live_iterator_status lttng_live_get_new_streams( struct lttng_live_session *session); int lttng_live_add_session(struct lttng_live_component *lttng_live, @@ -246,7 +246,7 @@ int lttng_live_add_session(struct lttng_live_component *lttng_live, ssize_t lttng_live_get_one_metadata_packet(struct lttng_live_trace *trace, FILE *fp); -enum bt_lttng_live_iterator_status lttng_live_get_next_index( +bt_lttng_live_iterator_status lttng_live_get_next_index( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *stream, struct packet_index *index); diff --git a/plugins/ctf/lttng-live/lttng-live.c b/plugins/ctf/lttng-live/lttng-live.c index f7036304..9fd35b2a 100644 --- a/plugins/ctf/lttng-live/lttng-live.c +++ b/plugins/ctf/lttng-live/lttng-live.c @@ -105,7 +105,7 @@ int lttng_live_add_port(struct lttng_live_component *lttng_live, int ret; struct bt_private_port *private_port; char name[STREAM_NAME_MAX_LEN]; - enum bt_component_status status; + bt_component_status status; ret = sprintf(name, STREAM_NAME_PREFIX "%" PRIu64, stream_iter->viewer_stream_id); BT_ASSERT(ret > 0); @@ -156,7 +156,7 @@ int lttng_live_remove_port(struct lttng_live_component *lttng_live, } BT_COMPONENT_PUT_REF_AND_RESET(component); if (nr_ports == 1) { - enum bt_component_status status; + bt_component_status status; BT_ASSERT(!lttng_live->no_stream_port); @@ -362,7 +362,7 @@ void lttng_live_iterator_finalize(bt_self_message_iterator *it) } static -enum bt_lttng_live_iterator_status lttng_live_iterator_next_check_stream_state( +bt_lttng_live_iterator_status lttng_live_iterator_next_check_stream_state( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *lttng_live_stream) { @@ -393,11 +393,11 @@ enum bt_lttng_live_iterator_status lttng_live_iterator_next_check_stream_state( * return EOF. */ static -enum bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_no_data_stream( +bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_no_data_stream( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *lttng_live_stream) { - enum bt_lttng_live_iterator_status ret = + bt_lttng_live_iterator_status ret = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; struct packet_index index; enum lttng_live_stream_state orig_state = lttng_live_stream->state; @@ -449,11 +449,11 @@ end: * per-stream messages. */ static -enum bt_lttng_live_iterator_status lttng_live_get_session( +bt_lttng_live_iterator_status lttng_live_get_session( struct lttng_live_component *lttng_live, struct lttng_live_session *session) { - enum bt_lttng_live_iterator_status status; + bt_lttng_live_iterator_status status; struct lttng_live_trace *trace, *t; if (lttng_live_attach_session(session)) { @@ -504,10 +504,10 @@ void lttng_live_force_new_streams_and_metadata(struct lttng_live_component *lttn } static -enum bt_lttng_live_iterator_status lttng_live_iterator_next_handle_new_streams_and_metadata( +bt_lttng_live_iterator_status lttng_live_iterator_next_handle_new_streams_and_metadata( struct lttng_live_component *lttng_live) { - enum bt_lttng_live_iterator_status ret = + bt_lttng_live_iterator_status ret = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; unsigned int nr_sessions_opened = 0; struct lttng_live_session *session, *s; @@ -553,13 +553,13 @@ end: } static -enum bt_lttng_live_iterator_status emit_inactivity_message( +bt_lttng_live_iterator_status emit_inactivity_message( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *lttng_live_stream, const bt_message **message, uint64_t timestamp) { - enum bt_lttng_live_iterator_status ret = + bt_lttng_live_iterator_status ret = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; struct lttng_live_trace *trace; const bt_clock_class *clock_class = NULL; @@ -600,12 +600,12 @@ error: } static -enum bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_quiescent_stream( +bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_quiescent_stream( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *lttng_live_stream, const bt_message **message) { - enum bt_lttng_live_iterator_status ret = + bt_lttng_live_iterator_status ret = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; const bt_clock_class *clock_class = NULL; bt_clock_snapshot *clock_snapshot = NULL; @@ -633,12 +633,12 @@ end: } static -enum bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_active_data_stream( +bt_lttng_live_iterator_status lttng_live_iterator_next_handle_one_active_data_stream( struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *lttng_live_stream, const bt_message **message) { - enum bt_lttng_live_iterator_status ret = + bt_lttng_live_iterator_status ret = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; enum bt_msg_iter_status status; struct lttng_live_session *session; @@ -759,7 +759,7 @@ bt_message_iterator_next_method_return lttng_live_iterator_next_stream( bt_self_message_iterator *iterator, struct lttng_live_stream_iterator *stream_iter) { - enum bt_lttng_live_iterator_status status; + bt_lttng_live_iterator_status status; bt_message_iterator_next_method_return next_return; struct lttng_live_component *lttng_live; @@ -830,7 +830,7 @@ bt_message_iterator_next_method_return lttng_live_iterator_next_no_stream( bt_self_message_iterator *iterator, struct lttng_live_no_stream_iterator *no_stream_iter) { - enum bt_lttng_live_iterator_status status; + bt_lttng_live_iterator_status status; bt_message_iterator_next_method_return next_return; struct lttng_live_component *lttng_live; @@ -899,11 +899,11 @@ bt_message_iterator_next_method_return lttng_live_iterator_next( } BT_HIDDEN -enum bt_message_iterator_status lttng_live_iterator_init( +bt_message_iterator_status lttng_live_iterator_init( bt_self_message_iterator *it, struct bt_private_port *port) { - enum bt_message_iterator_status ret = + bt_message_iterator_status ret = BT_MESSAGE_ITERATOR_STATUS_OK; struct lttng_live_stream_iterator_generic *s; @@ -1066,7 +1066,7 @@ struct lttng_live_component *lttng_live_component_create(bt_value *params, struct lttng_live_component *lttng_live; bt_value *value = NULL; const char *url; - enum bt_value_status ret; + bt_value_status ret; lttng_live = g_new0(struct lttng_live_component, 1); if (!lttng_live) { @@ -1106,12 +1106,12 @@ end: } BT_HIDDEN -enum bt_component_status lttng_live_component_init( +bt_component_status lttng_live_component_init( bt_self_component *private_component, bt_value *params, void *init_method_data) { struct lttng_live_component *lttng_live; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; /* Passes ownership of iter ref to lttng_live_component_create. */ lttng_live = lttng_live_component_create(params, private_component); @@ -1152,7 +1152,7 @@ error: } BT_HIDDEN -enum bt_component_status lttng_live_accept_port_connection( +bt_component_status lttng_live_accept_port_connection( bt_self_component *private_component, struct bt_private_port *self_private_port, const bt_port *other_port) @@ -1160,7 +1160,7 @@ enum bt_component_status lttng_live_accept_port_connection( struct lttng_live_component *lttng_live = bt_self_component_get_user_data(private_component); bt_component *other_component; - enum bt_component_status status = BT_COMPONENT_STATUS_OK; + bt_component_status status = BT_COMPONENT_STATUS_OK; const bt_port *self_port = bt_port_from_private(self_private_port); other_component = bt_port_get_component(other_port); diff --git a/plugins/ctf/lttng-live/metadata.c b/plugins/ctf/lttng-live/metadata.c index 3021f78a..42aac5d9 100644 --- a/plugins/ctf/lttng-live/metadata.c +++ b/plugins/ctf/lttng-live/metadata.c @@ -54,10 +54,10 @@ struct packet_header { } __attribute__((__packed__)); static -enum bt_lttng_live_iterator_status lttng_live_update_clock_map( +bt_lttng_live_iterator_status lttng_live_update_clock_map( struct lttng_live_trace *trace) { - enum bt_lttng_live_iterator_status status = + bt_lttng_live_iterator_status status = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; size_t i; int count, ret; @@ -93,7 +93,7 @@ end: } BT_HIDDEN -enum bt_lttng_live_iterator_status lttng_live_metadata_update( +bt_lttng_live_iterator_status lttng_live_metadata_update( struct lttng_live_trace *trace) { struct lttng_live_session *session = trace->session; @@ -103,7 +103,7 @@ enum bt_lttng_live_iterator_status lttng_live_metadata_update( char *metadata_buf = NULL; FILE *fp = NULL; enum ctf_metadata_decoder_status decoder_status; - enum bt_lttng_live_iterator_status status = + bt_lttng_live_iterator_status status = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; /* No metadata stream yet. */ diff --git a/plugins/ctf/lttng-live/metadata.h b/plugins/ctf/lttng-live/metadata.h index 2a4b9ded..f3b66ed7 100644 --- a/plugins/ctf/lttng-live/metadata.h +++ b/plugins/ctf/lttng-live/metadata.h @@ -33,7 +33,7 @@ int lttng_live_metadata_create_stream(struct lttng_live_session *session, uint64_t ctf_trace_id, uint64_t stream_id, const char *trace_name); -enum bt_lttng_live_iterator_status lttng_live_metadata_update( +bt_lttng_live_iterator_status lttng_live_metadata_update( struct lttng_live_trace *trace); void lttng_live_metadata_fini(struct lttng_live_trace *trace); diff --git a/plugins/ctf/lttng-live/viewer-connection.c b/plugins/ctf/lttng-live/viewer-connection.c index b4028978..d7a4a0a1 100644 --- a/plugins/ctf/lttng-live/viewer-connection.c +++ b/plugins/ctf/lttng-live/viewer-connection.c @@ -291,11 +291,11 @@ static void connection_release(bt_object *obj) } static -enum bt_value_status list_update_session(bt_value *results, +bt_value_status list_update_session(bt_value *results, const struct lttng_viewer_session *session, bool *_found) { - enum bt_value_status ret = BT_VALUE_STATUS_OK; + bt_value_status ret = BT_VALUE_STATUS_OK; bt_value *map = NULL; bt_value *hostname = NULL; bt_value *session_name = NULL; @@ -386,11 +386,11 @@ end: } static -enum bt_value_status list_append_session(bt_value *results, +bt_value_status list_append_session(bt_value *results, GString *base_url, const struct lttng_viewer_session *session) { - enum bt_value_status ret = BT_VALUE_STATUS_OK; + bt_value_status ret = BT_VALUE_STATUS_OK; bt_value *map = NULL; GString *url = NULL; bool found = false; @@ -1075,7 +1075,7 @@ void lttng_index_to_packet_index(struct lttng_viewer_index *lindex, } BT_HIDDEN -enum bt_lttng_live_iterator_status lttng_live_get_next_index(struct lttng_live_component *lttng_live, +bt_lttng_live_iterator_status lttng_live_get_next_index(struct lttng_live_component *lttng_live, struct lttng_live_stream_iterator *stream, struct packet_index *index) { @@ -1084,7 +1084,7 @@ enum bt_lttng_live_iterator_status lttng_live_get_next_index(struct lttng_live_c ssize_t ret_len; struct lttng_viewer_index rp; uint32_t flags, status; - enum bt_lttng_live_iterator_status retstatus = + bt_lttng_live_iterator_status retstatus = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; struct bt_live_viewer_connection *viewer_connection = lttng_live->viewer_connection; @@ -1337,10 +1337,10 @@ error: * Request new streams for a session. */ BT_HIDDEN -enum bt_lttng_live_iterator_status lttng_live_get_new_streams( +bt_lttng_live_iterator_status lttng_live_get_new_streams( struct lttng_live_session *session) { - enum bt_lttng_live_iterator_status status = + bt_lttng_live_iterator_status status = BT_LTTNG_LIVE_ITERATOR_STATUS_OK; struct lttng_viewer_cmd cmd; struct lttng_viewer_new_streams_request rq; diff --git a/plugins/libctfcopytrace/ctfcopytrace.c b/plugins/libctfcopytrace/ctfcopytrace.c index cb1f7aa7..b833fcda 100644 --- a/plugins/libctfcopytrace/ctfcopytrace.c +++ b/plugins/libctfcopytrace/ctfcopytrace.c @@ -94,12 +94,12 @@ end: } BT_HIDDEN -enum bt_component_status ctf_copy_clock_classes(FILE *err, +bt_component_status ctf_copy_clock_classes(FILE *err, const bt_trace *writer_trace, const bt_stream_class *writer_stream_class, const bt_trace *trace) { - enum bt_component_status ret; + bt_component_status ret; int int_ret, clock_class_count, i; clock_class_count = bt_trace_get_clock_class_count(trace); @@ -255,7 +255,7 @@ const bt_event_class *ctf_copy_event_class(FILE *err, const char *name; int ret; int64_t id; - enum bt_event_class_log_level log_level; + bt_event_class_log_level log_level; const char *emf_uri; name = bt_event_class_get_name(event_class); @@ -342,11 +342,11 @@ end: } BT_HIDDEN -enum bt_component_status ctf_copy_event_classes(FILE *err, +bt_component_status ctf_copy_event_classes(FILE *err, const bt_stream_class *stream_class, const bt_stream_class *writer_stream_class) { - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; const bt_event_class *event_class = NULL, *writer_event_class = NULL; int count, i; const bt_trace *writer_trace = @@ -855,13 +855,13 @@ end: } BT_HIDDEN -enum bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace, +bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace, const bt_trace *writer_trace) { - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; int field_count, i, int_ret; bt_field_type *header_type = NULL; - enum bt_byte_order order; + bt_byte_order order; const char *trace_name; const unsigned char *trace_uuid; diff --git a/plugins/libctfcopytrace/ctfcopytrace.h b/plugins/libctfcopytrace/ctfcopytrace.h index d7bdd026..76587738 100644 --- a/plugins/libctfcopytrace/ctfcopytrace.h +++ b/plugins/libctfcopytrace/ctfcopytrace.h @@ -51,7 +51,7 @@ const bt_clock_class *ctf_copy_clock_class(FILE *err, * error. */ BT_HIDDEN -enum bt_component_status ctf_copy_clock_classes(FILE *err, +bt_component_status ctf_copy_clock_classes(FILE *err, const bt_trace *writer_trace, const bt_stream_class *writer_stream_class, const bt_trace *trace); @@ -74,7 +74,7 @@ const bt_event_class *ctf_copy_event_class(FILE *err, * error. */ BT_HIDDEN -enum bt_component_status ctf_copy_event_classes(FILE *err, +bt_component_status ctf_copy_event_classes(FILE *err, const bt_stream_class *stream_class, const bt_stream_class *writer_stream_class); @@ -97,7 +97,7 @@ const bt_stream_class *ctf_copy_stream_class(FILE *err, * error. */ BT_HIDDEN -enum bt_component_status ctf_copy_packet_context_field(FILE *err, +bt_component_status ctf_copy_packet_context_field(FILE *err, const bt_field *field, const char *field_name, const bt_field *writer_packet_context, bt_field_type *writer_packet_context_type); @@ -174,7 +174,7 @@ int ctf_copy_event_header(FILE *err, const bt_event *event, * error. */ BT_HIDDEN -enum bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace, +bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace, const bt_trace *writer_trace); #ifdef __cplusplus diff --git a/plugins/lttng-utils/copy.c b/plugins/lttng-utils/copy.c index fa0298b2..918e6e17 100644 --- a/plugins/lttng-utils/copy.c +++ b/plugins/lttng-utils/copy.c @@ -440,7 +440,7 @@ struct debug_info *insert_new_debug_info(struct debug_info_iterator *debug_it, struct debug_info *debug_info = NULL; bt_value *field = NULL; const char *str_value; - enum bt_value_status ret; + bt_value_status ret; field = bt_trace_get_environment_field_value_by_name(writer_trace, "domain"); @@ -592,7 +592,7 @@ int sync_event_classes(struct debug_info_iterator *debug_it, int int_ret; const bt_stream_class *stream_class = NULL, *writer_stream_class = NULL; - enum bt_component_status ret; + bt_component_status ret; stream_class = bt_stream_get_class(stream); BT_ASSERT(stream_class); @@ -1065,7 +1065,7 @@ const bt_stream_class *insert_new_stream_class( const bt_stream_class *writer_stream_class = NULL; const bt_trace *trace, *writer_trace = NULL; struct debug_info_trace *di_trace; - enum bt_component_status ret; + bt_component_status ret; int int_ret; trace = bt_stream_class_get_trace(stream_class); diff --git a/plugins/lttng-utils/plugin.c b/plugins/lttng-utils/plugin.c index 6654e76d..5156e81a 100644 --- a/plugins/lttng-utils/plugin.c +++ b/plugins/lttng-utils/plugin.c @@ -266,14 +266,14 @@ end: } static -enum bt_message_iterator_status debug_info_iterator_init( +bt_message_iterator_status debug_info_iterator_init( bt_self_message_iterator *iterator, struct bt_private_port *port) { - enum bt_message_iterator_status ret = + bt_message_iterator_status ret = BT_MESSAGE_ITERATOR_STATUS_OK; - enum bt_message_iterator_status it_ret; - enum bt_connection_status conn_status; + bt_message_iterator_status it_ret; + bt_connection_status conn_status; struct bt_private_connection *connection = NULL; bt_self_component *component = bt_self_message_iterator_get_private_component(iterator); @@ -324,18 +324,18 @@ end: } static -enum bt_component_status init_from_params( +bt_component_status init_from_params( struct debug_info_component *debug_info_component, bt_value *params) { bt_value *value = NULL; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; BT_ASSERT(params); value = bt_value_map_get(params, "debug-info-field-name"); if (value) { - enum bt_value_status value_ret; + bt_value_status value_ret; const char *tmp; tmp = bt_value_string_get(value); @@ -358,7 +358,7 @@ enum bt_component_status init_from_params( value = bt_value_map_get(params, "debug-info-dir"); if (value) { - enum bt_value_status value_ret; + bt_value_status value_ret; debug_info_component->arg_debug_dir = bt_value_string_get(value); } @@ -369,7 +369,7 @@ enum bt_component_status init_from_params( value = bt_value_map_get(params, "target-prefix"); if (value) { - enum bt_value_status value_ret; + bt_value_status value_ret; debug_info_component->arg_target_prefix = bt_value_string_get(value); } @@ -380,7 +380,7 @@ enum bt_component_status init_from_params( value = bt_value_map_get(params, "full-path"); if (value) { - enum bt_value_status value_ret; + bt_value_status value_ret; bt_bool bool_val; bool_val = bt_value_bool_get(value); @@ -396,11 +396,11 @@ end: return ret; } -enum bt_component_status debug_info_component_init( +bt_component_status debug_info_component_init( bt_self_component *component, bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_component_status ret; + bt_component_status ret; struct debug_info_component *debug_info = create_debug_info_component_data(); if (!debug_info) { diff --git a/plugins/text/dmesg/dmesg.c b/plugins/text/dmesg/dmesg.c index 8a80df3b..00cac4a3 100644 --- a/plugins/text/dmesg/dmesg.c +++ b/plugins/text/dmesg/dmesg.c @@ -358,7 +358,7 @@ void destroy_dmesg_component(struct dmesg_component *dmesg_comp) } static -enum bt_self_component_status create_port( +bt_self_component_status create_port( bt_self_component_source *self_comp) { return bt_self_component_source_add_output_port(self_comp, @@ -366,13 +366,13 @@ enum bt_self_component_status create_port( } BT_HIDDEN -enum bt_self_component_status dmesg_init( +bt_self_component_status dmesg_init( bt_self_component_source *self_comp, bt_value *params, void *init_method_data) { int ret = 0; struct dmesg_component *dmesg_comp = g_new0(struct dmesg_component, 1); - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; if (!dmesg_comp) { BT_LOGE_STR("Failed to allocate one dmesg component structure."); @@ -629,7 +629,7 @@ void destroy_dmesg_msg_iter(struct dmesg_msg_iter *dmesg_msg_iter) } BT_HIDDEN -enum bt_self_message_iterator_status dmesg_msg_iter_init( +bt_self_message_iterator_status dmesg_msg_iter_init( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port) @@ -637,7 +637,7 @@ enum bt_self_message_iterator_status dmesg_msg_iter_init( struct dmesg_component *dmesg_comp; struct dmesg_msg_iter *dmesg_msg_iter = g_new0(struct dmesg_msg_iter, 1); - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; if (!dmesg_msg_iter) { @@ -686,13 +686,13 @@ void dmesg_msg_iter_finalize( } static -enum bt_self_message_iterator_status dmesg_msg_iter_next_one( +bt_self_message_iterator_status dmesg_msg_iter_next_one( struct dmesg_msg_iter *dmesg_msg_iter, bt_message **msg) { ssize_t len; struct dmesg_component *dmesg_comp; - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; BT_ASSERT(dmesg_msg_iter); @@ -808,7 +808,7 @@ end: } BT_HIDDEN -enum bt_self_message_iterator_status dmesg_msg_iter_next( +bt_self_message_iterator_status dmesg_msg_iter_next( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) @@ -816,7 +816,7 @@ enum bt_self_message_iterator_status dmesg_msg_iter_next( struct dmesg_msg_iter *dmesg_msg_iter = bt_self_message_iterator_get_data( self_msg_iter); - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; uint64_t i = 0; diff --git a/plugins/text/dmesg/dmesg.h b/plugins/text/dmesg/dmesg.h index 75603381..73d26d2f 100644 --- a/plugins/text/dmesg/dmesg.h +++ b/plugins/text/dmesg/dmesg.h @@ -28,7 +28,7 @@ #include BT_HIDDEN -enum bt_self_component_status dmesg_init( +bt_self_component_status dmesg_init( bt_self_component_source *self_comp, const bt_value *params, void *init_method_data); @@ -36,7 +36,7 @@ BT_HIDDEN void dmesg_finalize(bt_self_component_source *self_comp); BT_HIDDEN -enum bt_self_message_iterator_status dmesg_msg_iter_init( +bt_self_message_iterator_status dmesg_msg_iter_init( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port); @@ -46,7 +46,7 @@ void dmesg_msg_iter_finalize( bt_self_message_iterator *self_msg_iter); BT_HIDDEN -enum bt_self_message_iterator_status dmesg_msg_iter_next( +bt_self_message_iterator_status dmesg_msg_iter_next( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count); diff --git a/plugins/text/pretty/pretty.c b/plugins/text/pretty/pretty.c index abf14ecc..ef1224b7 100644 --- a/plugins/text/pretty/pretty.c +++ b/plugins/text/pretty/pretty.c @@ -121,11 +121,11 @@ void pretty_finalize(bt_self_component_sink *comp) } static -enum bt_self_component_status handle_message( +bt_self_component_status handle_message( struct pretty_component *pretty, const bt_message *message) { - enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; BT_ASSERT(pretty); @@ -151,12 +151,12 @@ enum bt_self_component_status handle_message( } BT_HIDDEN -enum bt_self_component_status pretty_port_connected( +bt_self_component_status pretty_port_connected( bt_self_component_sink *comp, bt_self_component_port_input *self_port, const bt_port_output *other_port) { - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct pretty_component *pretty; pretty = bt_self_component_get_data( @@ -173,15 +173,15 @@ enum bt_self_component_status pretty_port_connected( } BT_HIDDEN -enum bt_self_component_status pretty_consume( +bt_self_component_status pretty_consume( bt_self_component_sink *comp) { - enum bt_self_component_status ret; + bt_self_component_status ret; bt_message_array_const msgs; bt_self_component_port_input_message_iterator *it; struct pretty_component *pretty = bt_self_component_get_data( bt_self_component_sink_as_self_component(comp)); - enum bt_message_iterator_status it_ret; + bt_message_iterator_status it_ret; uint64_t count = 0; uint64_t i = 0; @@ -235,7 +235,7 @@ int add_params_to_map(bt_value *plugin_opt_map) for (i = 0; i < BT_ARRAY_SIZE(plugin_options); i++) { const char *key = plugin_options[i]; - enum bt_value_status status; + bt_value_status status; status = bt_value_map_insert_entry(plugin_opt_map, key, bt_value_null); @@ -340,7 +340,7 @@ static int apply_params(struct pretty_component *pretty, const bt_value *params) { int ret = 0; - enum bt_value_status status; + bt_value_status status; bool value, found; char *str = NULL; @@ -636,12 +636,12 @@ void init_stream_packet_context_quarks(void) } BT_HIDDEN -enum bt_self_component_status pretty_init( +bt_self_component_status pretty_init( bt_self_component_sink *comp, const bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_self_component_status ret; + bt_self_component_status ret; struct pretty_component *pretty = create_pretty(); if (!pretty) { diff --git a/plugins/text/pretty/pretty.h b/plugins/text/pretty/pretty.h index 86c27853..a9eb5d27 100644 --- a/plugins/text/pretty/pretty.h +++ b/plugins/text/pretty/pretty.h @@ -104,17 +104,17 @@ extern GQuark stream_packet_context_quarks[STREAM_PACKET_CONTEXT_QUARKS_LEN]; BT_HIDDEN -enum bt_self_component_status pretty_init( +bt_self_component_status pretty_init( bt_self_component_sink *component, const bt_value *params, void *init_method_data); BT_HIDDEN -enum bt_self_component_status pretty_consume( +bt_self_component_status pretty_consume( bt_self_component_sink *component); BT_HIDDEN -enum bt_self_component_status pretty_port_connected( +bt_self_component_status pretty_port_connected( bt_self_component_sink *component, bt_self_component_port_input *self_port, const bt_port_output *other_port); diff --git a/plugins/text/pretty/print.c b/plugins/text/pretty/print.c index 3661a64a..32719cba 100644 --- a/plugins/text/pretty/print.c +++ b/plugins/text/pretty/print.c @@ -82,7 +82,7 @@ void print_timestamp_cycles(struct pretty_component *pretty, { const bt_clock_snapshot *clock_snapshot; uint64_t cycles; - enum bt_clock_snapshot_state cs_state; + bt_clock_snapshot_state cs_state; cs_state = bt_event_borrow_default_clock_snapshot_const(event, &clock_snapshot); if (cs_state != BT_CLOCK_SNAPSHOT_STATE_KNOWN || !clock_snapshot) { @@ -223,7 +223,7 @@ int print_event_timestamp(struct pretty_component *pretty, const bt_stream *stream = NULL; const bt_stream_class *stream_class = NULL; const bt_clock_snapshot *clock_snapshot = NULL; - enum bt_clock_snapshot_state cs_state; + bt_clock_snapshot_state cs_state; stream = bt_event_borrow_stream_const(event); if (!stream) { @@ -319,7 +319,7 @@ int print_event_header(struct pretty_component *pretty, const bt_stream *stream = NULL; const bt_trace *trace = NULL; int dom_print = 0; - enum bt_property_availability prop_avail; + bt_property_availability prop_avail; event_class = bt_event_borrow_class_const(event); stream_class = bt_event_class_borrow_stream_class_const(event_class); @@ -451,7 +451,7 @@ int print_event_header(struct pretty_component *pretty, [ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE ] = "TRACE_DEBUG_LINE", [ BT_EVENT_CLASS_LOG_LEVEL_DEBUG ] = "TRACE_DEBUG", }; - enum bt_event_class_log_level log_level; + bt_event_class_log_level log_level; const char *log_level_str = NULL; prop_avail = bt_event_class_get_log_level(event_class, @@ -525,14 +525,14 @@ int print_integer(struct pretty_component *pretty, const bt_field *field) { int ret = 0; - enum bt_field_class_integer_preferred_display_base base; + bt_field_class_integer_preferred_display_base base; const bt_field_class *int_fc; union { uint64_t u; int64_t s; } v; bool rst_color = false; - enum bt_field_class_type ft_type; + bt_field_class_type ft_type; int_fc = bt_field_borrow_class_const(field); BT_ASSERT(int_fc); @@ -986,7 +986,7 @@ int print_field(struct pretty_component *pretty, const bt_field *field, bool print_names, GQuark *filter_fields, int filter_array_len) { - enum bt_field_class_type class_id; + bt_field_class_type class_id; class_id = bt_field_get_class_type(field); switch (class_id) { diff --git a/plugins/utils/counter/counter.c b/plugins/utils/counter/counter.c index e667e252..fa75b6ae 100644 --- a/plugins/utils/counter/counter.c +++ b/plugins/utils/counter/counter.c @@ -122,12 +122,12 @@ void counter_finalize(bt_self_component_sink *comp) } BT_HIDDEN -enum bt_self_component_status counter_init( +bt_self_component_status counter_init( bt_self_component_sink *component, const bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_self_component_status ret; + bt_self_component_status ret; struct counter *counter = g_new0(struct counter, 1); const bt_value *step = NULL; const bt_value *hide_zero = NULL; @@ -176,12 +176,12 @@ end: } BT_HIDDEN -enum bt_self_component_status counter_port_connected( +bt_self_component_status counter_port_connected( bt_self_component_sink *comp, bt_self_component_port_input *self_port, const bt_port_output *other_port) { - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct counter *counter; bt_self_component_port_input_message_iterator *iterator; @@ -203,12 +203,12 @@ end: } BT_HIDDEN -enum bt_self_component_status counter_consume( +bt_self_component_status counter_consume( bt_self_component_sink *comp) { - enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; struct counter *counter; - enum bt_message_iterator_status it_ret; + bt_message_iterator_status it_ret; uint64_t msg_count; bt_message_array_const msgs; diff --git a/plugins/utils/counter/counter.h b/plugins/utils/counter/counter.h index eb8a37bb..b3a93b6f 100644 --- a/plugins/utils/counter/counter.h +++ b/plugins/utils/counter/counter.h @@ -46,7 +46,7 @@ struct counter { }; BT_HIDDEN -enum bt_self_component_status counter_init( +bt_self_component_status counter_init( bt_self_component_sink *component, const bt_value *params, void *init_method_data); @@ -54,12 +54,12 @@ BT_HIDDEN void counter_finalize(bt_self_component_sink *component); BT_HIDDEN -enum bt_self_component_status counter_port_connected( +bt_self_component_status counter_port_connected( bt_self_component_sink *component, bt_self_component_port_input *self_port, const bt_port_output *other_port); BT_HIDDEN -enum bt_self_component_status counter_consume(bt_self_component_sink *component); +bt_self_component_status counter_consume(bt_self_component_sink *component); #endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_H */ diff --git a/plugins/utils/dummy/dummy.c b/plugins/utils/dummy/dummy.c index 5d513cf2..e0c44c5b 100644 --- a/plugins/utils/dummy/dummy.c +++ b/plugins/utils/dummy/dummy.c @@ -46,12 +46,12 @@ void dummy_finalize(bt_self_component_sink *comp) } BT_HIDDEN -enum bt_self_component_status dummy_init( +bt_self_component_status dummy_init( bt_self_component_sink *component, const bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_self_component_status ret; + bt_self_component_status ret; struct dummy *dummy = g_new0(struct dummy, 1); if (!dummy) { @@ -77,12 +77,12 @@ end: } BT_HIDDEN -enum bt_self_component_status dummy_port_connected( +bt_self_component_status dummy_port_connected( bt_self_component_sink *comp, bt_self_component_port_input *self_port, const bt_port_output *other_port) { - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct dummy *dummy; bt_self_component_port_input_message_iterator *iterator; @@ -104,14 +104,14 @@ end: } BT_HIDDEN -enum bt_self_component_status dummy_consume( +bt_self_component_status dummy_consume( bt_self_component_sink *component) { - enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; bt_message_array_const msgs; uint64_t count; struct dummy *dummy; - enum bt_message_iterator_status it_ret; + bt_message_iterator_status it_ret; uint64_t i; dummy = bt_self_component_get_data( diff --git a/plugins/utils/dummy/dummy.h b/plugins/utils/dummy/dummy.h index c87969d1..ed2ddfdb 100644 --- a/plugins/utils/dummy/dummy.h +++ b/plugins/utils/dummy/dummy.h @@ -33,7 +33,7 @@ struct dummy { }; BT_HIDDEN -enum bt_self_component_status dummy_init( +bt_self_component_status dummy_init( bt_self_component_sink *component, const bt_value *params, void *init_method_data); @@ -41,13 +41,13 @@ BT_HIDDEN void dummy_finalize(bt_self_component_sink *component); BT_HIDDEN -enum bt_self_component_status dummy_port_connected( +bt_self_component_status dummy_port_connected( bt_self_component_sink *comp, bt_self_component_port_input *self_port, const bt_port_output *other_port); BT_HIDDEN -enum bt_self_component_status dummy_consume( +bt_self_component_status dummy_consume( bt_self_component_sink *component); #endif /* BABELTRACE_PLUGINS_UTILS_DUMMY_H */ diff --git a/plugins/utils/muxer/muxer.c b/plugins/utils/muxer/muxer.c index 82344b72..cc6dc460 100644 --- a/plugins/utils/muxer/muxer.c +++ b/plugins/utils/muxer/muxer.c @@ -171,12 +171,12 @@ end: } static -enum bt_self_component_status ensure_available_input_port( +bt_self_component_status ensure_available_input_port( bt_self_component_filter *self_comp) { struct muxer_comp *muxer_comp = bt_self_component_get_data( bt_self_component_filter_as_self_component(self_comp)); - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; GString *port_name = NULL; BT_ASSERT(muxer_comp); @@ -217,7 +217,7 @@ end: } static -enum bt_self_component_status create_output_port( +bt_self_component_status create_output_port( bt_self_component_filter *self_comp) { return bt_self_component_filter_add_output_port( @@ -326,12 +326,12 @@ end: } BT_HIDDEN -enum bt_self_component_status muxer_init( +bt_self_component_status muxer_init( bt_self_component_filter *self_comp, bt_value *params, void *init_data) { int ret; - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct muxer_comp *muxer_comp = g_new0(struct muxer_comp, 1); BT_LOGD("Initializing muxer component: " @@ -447,10 +447,10 @@ end: } static -enum bt_message_iterator_status muxer_upstream_msg_iter_next( +bt_message_iterator_status muxer_upstream_msg_iter_next( struct muxer_upstream_msg_iter *muxer_upstream_msg_iter) { - enum bt_message_iterator_status status; + bt_message_iterator_status status; bt_message_array_const msgs; uint64_t i; uint64_t count; @@ -608,7 +608,7 @@ int get_msg_ts_ns(struct muxer_comp *muxer_comp, int ret = 0; const unsigned char *cc_uuid; const char *cc_name; - enum bt_clock_snapshot_state cs_state = BT_CLOCK_SNAPSHOT_STATE_KNOWN; + bt_clock_snapshot_state cs_state = BT_CLOCK_SNAPSHOT_STATE_KNOWN; BT_ASSERT(msg); BT_ASSERT(ts_ns); @@ -851,7 +851,7 @@ end: * the youngest, and sets *ts_ns to its time. */ static -enum bt_message_iterator_status +bt_message_iterator_status muxer_msg_iter_youngest_upstream_msg_iter( struct muxer_comp *muxer_comp, struct muxer_msg_iter *muxer_msg_iter, @@ -861,7 +861,7 @@ muxer_msg_iter_youngest_upstream_msg_iter( size_t i; int ret; int64_t youngest_ts_ns = INT64_MAX; - enum bt_message_iterator_status status = + bt_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; BT_ASSERT(muxer_comp); @@ -913,10 +913,10 @@ end: } static -enum bt_message_iterator_status validate_muxer_upstream_msg_iter( +bt_message_iterator_status validate_muxer_upstream_msg_iter( struct muxer_upstream_msg_iter *muxer_upstream_msg_iter) { - enum bt_message_iterator_status status = + bt_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; BT_LOGV("Validating muxer's upstream message iterator wrapper: " @@ -940,10 +940,10 @@ end: } static -enum bt_message_iterator_status validate_muxer_upstream_msg_iters( +bt_message_iterator_status validate_muxer_upstream_msg_iters( struct muxer_msg_iter *muxer_msg_iter) { - enum bt_message_iterator_status status = + bt_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; size_t i; @@ -1001,12 +1001,12 @@ end: } static inline -enum bt_message_iterator_status muxer_msg_iter_do_next_one( +bt_message_iterator_status muxer_msg_iter_do_next_one( struct muxer_comp *muxer_comp, struct muxer_msg_iter *muxer_msg_iter, const bt_message **msg) { - enum bt_message_iterator_status status = + bt_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; struct muxer_upstream_msg_iter *muxer_upstream_msg_iter = NULL; int64_t next_return_ts; @@ -1102,13 +1102,13 @@ end: } static -enum bt_message_iterator_status muxer_msg_iter_do_next( +bt_message_iterator_status muxer_msg_iter_do_next( struct muxer_comp *muxer_comp, struct muxer_msg_iter *muxer_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) { - enum bt_message_iterator_status status = + bt_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; uint64_t i = 0; @@ -1226,14 +1226,14 @@ end: } BT_HIDDEN -enum bt_self_message_iterator_status muxer_msg_iter_init( +bt_self_message_iterator_status muxer_msg_iter_init( bt_self_message_iterator *self_msg_iter, bt_self_component_filter *self_comp, bt_self_component_port_output *port) { struct muxer_comp *muxer_comp = NULL; struct muxer_msg_iter *muxer_msg_iter = NULL; - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK; int ret; @@ -1343,12 +1343,12 @@ void muxer_msg_iter_finalize( } BT_HIDDEN -enum bt_message_iterator_status muxer_msg_iter_next( +bt_message_iterator_status muxer_msg_iter_next( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) { - enum bt_message_iterator_status status; + bt_message_iterator_status status; struct muxer_msg_iter *muxer_msg_iter = bt_self_message_iterator_get_data(self_msg_iter); bt_self_component *self_comp = NULL; @@ -1383,12 +1383,12 @@ enum bt_message_iterator_status muxer_msg_iter_next( } BT_HIDDEN -enum bt_self_component_status muxer_input_port_connected( +bt_self_component_status muxer_input_port_connected( bt_self_component_filter *self_comp, bt_self_component_port_input *self_port, const bt_port_output *other_port) { - enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; const bt_port *port = bt_self_component_port_as_port( bt_self_component_port_input_as_self_component_port( self_port)); diff --git a/plugins/utils/muxer/muxer.h b/plugins/utils/muxer/muxer.h index c5b123f3..ba439e23 100644 --- a/plugins/utils/muxer/muxer.h +++ b/plugins/utils/muxer/muxer.h @@ -29,7 +29,7 @@ #include BT_HIDDEN -enum bt_self_component_status muxer_init( +bt_self_component_status muxer_init( bt_self_component_filter *self_comp, const bt_value *params, void *init_data); @@ -37,7 +37,7 @@ BT_HIDDEN void muxer_finalize(bt_self_component_filter *self_comp); BT_HIDDEN -enum bt_self_message_iterator_status muxer_msg_iter_init( +bt_self_message_iterator_status muxer_msg_iter_init( bt_self_message_iterator *self_msg_iter, bt_self_component_filter *self_comp, bt_self_component_port_output *self_port); @@ -47,13 +47,13 @@ void muxer_msg_iter_finalize( bt_self_message_iterator *self_msg_iter); BT_HIDDEN -enum bt_self_message_iterator_status muxer_msg_iter_next( +bt_self_message_iterator_status muxer_msg_iter_next( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count); BT_HIDDEN -enum bt_self_component_status muxer_input_port_connected( +bt_self_component_status muxer_input_port_connected( bt_self_component_filter *comp, bt_self_component_port_input *self_port, const bt_port_output *other_port); diff --git a/plugins/utils/trimmer/copy.c b/plugins/utils/trimmer/copy.c index 5fab0d6a..d5bcb5b7 100644 --- a/plugins/utils/trimmer/copy.c +++ b/plugins/utils/trimmer/copy.c @@ -76,11 +76,11 @@ end: } BT_HIDDEN -enum bt_component_status update_packet_context_field(FILE *err, +bt_component_status update_packet_context_field(FILE *err, const bt_packet *writer_packet, const char *name, int64_t value) { - enum bt_component_status ret; + bt_component_status ret; const bt_field *packet_context = NULL, *writer_packet_context = NULL; const bt_field_class *struct_class = NULL, *field_class = NULL; const bt_field *field = NULL, *writer_field = NULL; diff --git a/plugins/utils/trimmer/copy.h b/plugins/utils/trimmer/copy.h index 94b2150e..6049113a 100644 --- a/plugins/utils/trimmer/copy.h +++ b/plugins/utils/trimmer/copy.h @@ -41,7 +41,7 @@ BT_HIDDEN const bt_packet *trimmer_close_packet(struct trimmer_iterator *trim_it, const bt_packet *packet); BT_HIDDEN -enum bt_component_status update_packet_context_field(FILE *err, +bt_component_status update_packet_context_field(FILE *err, const bt_packet *writer_packet, const char *name, int64_t value); diff --git a/plugins/utils/trimmer/iterator.c b/plugins/utils/trimmer/iterator.c index 82f3410e..9ae675dd 100644 --- a/plugins/utils/trimmer/iterator.c +++ b/plugins/utils/trimmer/iterator.c @@ -64,14 +64,14 @@ void trimmer_iterator_finalize(bt_self_message_iterator *it) } BT_HIDDEN -enum bt_message_iterator_status trimmer_iterator_init( +bt_message_iterator_status trimmer_iterator_init( bt_self_message_iterator *iterator, struct bt_private_port *port) { - enum bt_message_iterator_status ret = + bt_message_iterator_status ret = BT_MESSAGE_ITERATOR_STATUS_OK; - enum bt_message_iterator_status it_ret; - enum bt_connection_status conn_status; + bt_message_iterator_status it_ret; + bt_connection_status conn_status; struct bt_private_port *input_port = NULL; struct bt_private_connection *connection = NULL; bt_self_component *component = @@ -388,7 +388,7 @@ const bt_message *evaluate_packet_message( *timestamp_begin = NULL, *timestamp_end = NULL; const bt_message *new_message = NULL; - enum bt_component_status ret; + bt_component_status ret; bool lazy_update = false; switch (bt_message_get_type(message)) { @@ -516,13 +516,13 @@ const bt_message *evaluate_stream_message( /* Return true if the message should be forwarded. */ static -enum bt_message_iterator_status evaluate_message( +bt_message_iterator_status evaluate_message( const bt_message **message, struct trimmer_iterator *trim_it, struct trimmer_bound *begin, struct trimmer_bound *end, bool *in_range) { - enum bt_message_type type; + bt_message_type type; const bt_message *new_message = NULL; bool finished = false; diff --git a/plugins/utils/trimmer/iterator.h b/plugins/utils/trimmer/iterator.h index bcfc416f..cede7c8f 100644 --- a/plugins/utils/trimmer/iterator.h +++ b/plugins/utils/trimmer/iterator.h @@ -40,7 +40,7 @@ struct trimmer_iterator { }; BT_HIDDEN -enum bt_message_iterator_status trimmer_iterator_init( +bt_message_iterator_status trimmer_iterator_init( bt_self_message_iterator *iterator, struct bt_private_port *port); diff --git a/plugins/utils/trimmer/trimmer.c b/plugins/utils/trimmer/trimmer.c index 0c5af147..42c5e5b0 100644 --- a/plugins/utils/trimmer/trimmer.c +++ b/plugins/utils/trimmer/trimmer.c @@ -291,18 +291,18 @@ lazy: } static -enum bt_component_status init_from_params(struct trimmer *trimmer, +bt_component_status init_from_params(struct trimmer *trimmer, bt_value *params) { bt_value *value = NULL; bt_bool gmt = BT_FALSE; - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + bt_component_status ret = BT_COMPONENT_STATUS_OK; BT_ASSERT(params); value = bt_value_map_get(params, "clock-gmt"); if (value) { - enum bt_value_status value_ret; + bt_value_status value_ret; gmt = bt_value_bool_get(value); } @@ -344,11 +344,11 @@ end: return ret; } -enum bt_component_status trimmer_component_init( +bt_component_status trimmer_component_init( bt_self_component *component, bt_value *params, UNUSED_VAR void *init_method_data) { - enum bt_component_status ret; + bt_component_status ret; struct trimmer *trimmer = create_trimmer_data(); if (!trimmer) { diff --git a/plugins/utils/trimmer/trimmer.h b/plugins/utils/trimmer/trimmer.h index f3980f07..2e63b881 100644 --- a/plugins/utils/trimmer/trimmer.h +++ b/plugins/utils/trimmer/trimmer.h @@ -49,7 +49,7 @@ struct trimmer { int year, month, day; }; -enum bt_component_status trimmer_component_init( +bt_component_status trimmer_component_init( bt_self_component *component, bt_value *params, void *init_method_data); diff --git a/tests/lib/test-plugin-plugins/minimal.c b/tests/lib/test-plugin-plugins/minimal.c index eb89a7e5..42f9c6be 100644 --- a/tests/lib/test-plugin-plugins/minimal.c +++ b/tests/lib/test-plugin-plugins/minimal.c @@ -19,7 +19,7 @@ #include #include -static enum bt_self_plugin_status plugin_init(bt_self_plugin *plugin) +static bt_self_plugin_status plugin_init(bt_self_plugin *plugin) { g_setenv("BT_TEST_PLUGIN_INIT_CALLED", "1", 1); return BT_SELF_PLUGIN_STATUS_OK; diff --git a/tests/lib/test-plugin-plugins/sfs.c b/tests/lib/test-plugin-plugins/sfs.c index b5487504..e9080b7e 100644 --- a/tests/lib/test-plugin-plugins/sfs.c +++ b/tests/lib/test-plugin-plugins/sfs.c @@ -18,13 +18,13 @@ #include #include -static enum bt_self_component_status sink_consume( +static bt_self_component_status sink_consume( bt_self_component_sink *self_comp) { return BT_SELF_COMPONENT_STATUS_OK; } -static enum bt_self_message_iterator_status src_dummy_iterator_init_method( +static bt_self_message_iterator_status src_dummy_iterator_init_method( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port) @@ -32,7 +32,7 @@ static enum bt_self_message_iterator_status src_dummy_iterator_init_method( return BT_SELF_MESSAGE_ITERATOR_STATUS_OK; } -static enum bt_self_message_iterator_status flt_dummy_iterator_init_method( +static bt_self_message_iterator_status flt_dummy_iterator_init_method( bt_self_message_iterator *self_msg_iter, bt_self_component_filter *self_comp, bt_self_component_port_output *self_port) @@ -45,7 +45,7 @@ static void dummy_iterator_finalize_method( { } -static enum bt_self_message_iterator_status dummy_iterator_next_method( +static bt_self_message_iterator_status dummy_iterator_next_method( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) @@ -53,7 +53,7 @@ static enum bt_self_message_iterator_status dummy_iterator_next_method( return BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR; } -static enum bt_query_status flt_query_method( +static bt_query_status flt_query_method( bt_self_component_class_filter *component_class, const bt_query_executor *query_exec, const char *object, const bt_value *params, diff --git a/tests/lib/test_bt_message_iterator.c b/tests/lib/test_bt_message_iterator.c index 5a1ef540..6738afdc 100644 --- a/tests/lib/test_bt_message_iterator.c +++ b/tests/lib/test_bt_message_iterator.c @@ -313,7 +313,7 @@ void src_iter_finalize(bt_self_message_iterator *self_msg_iter) } static -enum bt_self_message_iterator_status src_iter_init( +bt_self_message_iterator_status src_iter_init( bt_self_message_iterator *self_msg_iter, bt_self_component_source *self_comp, bt_self_component_port_output *self_port) @@ -419,13 +419,13 @@ void src_iter_next_seq_one(bt_self_message_iterator* msg_iter, } static -enum bt_self_message_iterator_status src_iter_next_seq( +bt_self_message_iterator_status src_iter_next_seq( bt_self_message_iterator *msg_iter, struct src_iter_user_data *user_data, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) { - enum bt_self_message_iterator_status status = + bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; uint64_t i = 0; @@ -449,7 +449,7 @@ end: } static -enum bt_self_message_iterator_status src_iter_next( +bt_self_message_iterator_status src_iter_next( bt_self_message_iterator *self_msg_iter, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) @@ -463,7 +463,7 @@ enum bt_self_message_iterator_status src_iter_next( } static -enum bt_self_component_status src_init( +bt_self_component_status src_init( bt_self_component_source *self_comp, const bt_value *params, void *init_method_data) { @@ -536,10 +536,10 @@ void append_test_events_from_message(const bt_message *message) } static -enum bt_message_iterator_status common_consume( +bt_message_iterator_status common_consume( void *msg_iter, bool is_output_port_msg_iter) { - enum bt_message_iterator_status ret; + bt_message_iterator_status ret; bt_message_array_const messages = NULL; uint64_t count = 0; struct test_event test_event = { 0 }; @@ -583,15 +583,15 @@ end: } static -enum bt_self_component_status sink_consume( +bt_self_component_status sink_consume( bt_self_component_sink *self_comp) { - enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; + bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK; struct sink_user_data *user_data = bt_self_component_get_data( bt_self_component_sink_as_self_component( self_comp)); - enum bt_message_iterator_status it_ret; + bt_message_iterator_status it_ret; BT_ASSERT(user_data && user_data->msg_iter); it_ret = common_consume(user_data->msg_iter, false); @@ -618,7 +618,7 @@ end: } static -enum bt_self_component_status sink_port_connected( +bt_self_component_status sink_port_connected( bt_self_component_sink *self_comp, bt_self_component_port_input *self_port, const bt_port_output *other_port) @@ -636,7 +636,7 @@ enum bt_self_component_status sink_port_connected( } static -enum bt_self_component_status sink_init( +bt_self_component_status sink_init( bt_self_component_sink *self_comp, const bt_value *params, void *init_method_data) { @@ -729,7 +729,7 @@ void do_std_test(enum test test, const char *name, const bt_component_sink *sink_comp; const bt_port_output *upstream_port; const bt_port_input *downstream_port; - enum bt_graph_status graph_status = BT_GRAPH_STATUS_OK; + bt_graph_status graph_status = BT_GRAPH_STATUS_OK; clear_test_events(); current_test = test; @@ -823,7 +823,7 @@ void test_output_port_message_iterator(void) }; const bt_component_source *src_comp; bt_port_output_message_iterator *msg_iter; - enum bt_message_iterator_status iter_status = + bt_message_iterator_status iter_status = BT_MESSAGE_ITERATOR_STATUS_OK; const bt_port_output *upstream_port; diff --git a/tests/lib/test_bt_values.c b/tests/lib/test_bt_values.c index 0bc1b109..d689973b 100644 --- a/tests/lib/test_bt_values.c +++ b/tests/lib/test_bt_values.c @@ -724,7 +724,7 @@ void test_compare_array(void) bt_value *array1 = bt_value_array_create(); bt_value *array2 = bt_value_array_create(); bt_value *array3 = bt_value_array_create(); - enum bt_value_status status; + bt_value_status status; BT_ASSERT(array1 && array2 && array3); @@ -775,7 +775,7 @@ void test_compare_map(void) bt_value *map1 = bt_value_map_create(); bt_value *map2 = bt_value_map_create(); bt_value *map3 = bt_value_map_create(); - enum bt_value_status status; + bt_value_status status; BT_ASSERT(map1 && map2 && map3); @@ -854,7 +854,7 @@ void test_copy(void) bt_value *string_obj, *string_copy_obj; bt_value *array_obj, *array_copy_obj; bt_value *map_obj, *map_copy_obj; - enum bt_value_status status; + bt_value_status status; bool_obj = bt_value_bool_create_init(BT_TRUE); integer_obj = bt_value_integer_create_init(23); @@ -950,7 +950,7 @@ void test_extend(void) bt_value *extension_map = bt_value_map_create(); bt_value *extended_map = NULL; bt_value *array = bt_value_array_create(); - enum bt_value_status status; + bt_value_status status; BT_ASSERT(base_map); BT_ASSERT(extension_map); diff --git a/tests/lib/test_graph_topo.c b/tests/lib/test_graph_topo.c index 7cf87083..7c63ec2c 100644 --- a/tests/lib/test_graph_topo.c +++ b/tests/lib/test_graph_topo.c @@ -364,7 +364,7 @@ size_t event_pos(struct event *event) } static -enum bt_self_message_iterator_status src_iter_next( +bt_self_message_iterator_status src_iter_next( bt_self_message_iterator *self_iterator, bt_message_array_const msgs, uint64_t capacity, uint64_t *count) @@ -373,7 +373,7 @@ enum bt_self_message_iterator_status src_iter_next( } static -enum bt_self_component_status src_accept_output_port_connection( +bt_self_component_status src_accept_output_port_connection( bt_self_component_source *self_comp, bt_self_component_port_output *self_comp_port, const bt_port_input *other_port) @@ -396,7 +396,7 @@ enum bt_self_component_status src_accept_output_port_connection( } static -enum bt_self_component_status sink_accept_input_port_connection( +bt_self_component_status sink_accept_input_port_connection( bt_self_component_sink *self_comp, bt_self_component_port_input *self_comp_port, const bt_port_output *other_port) @@ -419,7 +419,7 @@ enum bt_self_component_status sink_accept_input_port_connection( } static -enum bt_self_component_status src_output_port_connected( +bt_self_component_status src_output_port_connected( bt_self_component_source *self_comp, bt_self_component_port_output *self_comp_port, const bt_port_input *other_port) @@ -456,7 +456,7 @@ enum bt_self_component_status src_output_port_connected( } static -enum bt_self_component_status sink_input_port_connected( +bt_self_component_status sink_input_port_connected( bt_self_component_sink *self_comp, bt_self_component_port_input *self_comp_port, const bt_port_output *other_port) @@ -533,7 +533,7 @@ void sink_input_port_disconnected(bt_self_component_sink *self_comp, } static -enum bt_self_component_status src_init( +bt_self_component_status src_init( bt_self_component_source *self_comp, const bt_value *params, void *init_method_data) { @@ -546,7 +546,7 @@ enum bt_self_component_status src_init( } static -enum bt_self_component_status sink_init( +bt_self_component_status sink_init( bt_self_component_sink *self_comp, const bt_value *params, void *init_method_data) { @@ -559,7 +559,7 @@ enum bt_self_component_status sink_init( } static -enum bt_self_component_status sink_consume( +bt_self_component_status sink_consume( bt_self_component_sink *self_comp) { bt_self_component_port_input *def_port; @@ -810,7 +810,7 @@ void test_sink_removes_port_in_consume_then_src_removes_disconnected_port(void) const bt_port *gsrc_def_port; const bt_port *gsink_def_port; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t sink_accept_port_connection_pos; size_t src_port_connected_pos; @@ -992,7 +992,7 @@ void test_sink_removes_port_in_consume(void) const bt_port *gsrc_def_port; const bt_port *gsink_def_port; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t sink_accept_port_connection_pos; size_t src_port_connected_pos; @@ -1159,7 +1159,7 @@ void test_src_adds_port_in_port_connected(void) const bt_port *gsrc_hello_port; const bt_port *gsink_def_port; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t sink_accept_port_connection_pos; size_t src_port_connected_pos; @@ -1286,7 +1286,7 @@ void test_simple(void) const bt_port *gsrc_def_port; const bt_port *gsink_def_port; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t sink_accept_port_connection_pos; size_t src_port_connected_pos; @@ -1397,7 +1397,7 @@ void test_src_port_connected_error(void) const bt_port *gsink_def_port; const bt_connection *conn = NULL; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t src_port_connected_pos; @@ -1484,7 +1484,7 @@ void test_sink_port_connected_error(void) const bt_port *gsink_def_port; const bt_connection *conn = NULL; struct event event; - enum bt_graph_status status; + bt_graph_status status; size_t src_accept_port_connection_pos; size_t sink_accept_port_connection_pos; size_t src_port_connected_pos; diff --git a/tests/lib/test_plugin.c b/tests/lib/test_plugin.c index 6d9c4263..505fe86a 100644 --- a/tests/lib/test_plugin.c +++ b/tests/lib/test_plugin.c @@ -124,7 +124,7 @@ static void test_sfs(const char *plugin_dir) const bt_value *res_params; bt_graph *graph; const char *object_str; - enum bt_graph_status graph_ret; + bt_graph_status graph_ret; bt_query_executor *query_exec = bt_query_executor_create(); int ret; -- 2.34.1