And uses aliases in CLI, plugins, and tests.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
}
static int validate_all_components_connected_in_array(GPtrArray *comps,
- const struct bt_value *connected_components,
+ const bt_value *connected_components,
char *error_buf, size_t error_buf_size)
{
int ret = 0;
{
size_t i;
int ret = 0;
- struct bt_value *connected_components = bt_value_map_create();
+ bt_value *connected_components = bt_value_map_create();
if (!connected_components) {
ret = -1;
{
size_t i;
int ret = 0;
- struct bt_value *flat_connection_names =
+ bt_value *flat_connection_names =
bt_value_map_create();
GString *flat_connection_name = NULL;
}
int bt_config_cli_args_create_connections(struct bt_config *cfg,
- const struct bt_value *connection_args,
+ const bt_value *connection_args,
char *error_buf, size_t error_buf_size)
{
int ret;
}
for (i = 0; i < bt_value_array_get_size(connection_args); i++) {
- const struct bt_value *arg_value =
+ const bt_value *arg_value =
bt_value_array_borrow_element_by_index_const(
connection_args, i);
const char *arg;
#include "babeltrace-cfg.h"
int bt_config_cli_args_create_connections(struct bt_config *cfg,
- const struct bt_value *connection_args,
+ const bt_value *connection_args,
char *error_buf, size_t error_buf_size);
#endif /* CLI_BABELTRACE_CFG_CLI_ARGS_CONNECT_H */
struct bt_config *bt_config_cli_args_create_with_default(int argc,
const char *argv[], int *retcode)
{
- struct bt_value *initial_plugin_paths;
+ bt_value *initial_plugin_paths;
struct bt_config *cfg = NULL;
int ret;
GScanner *scanner;
/* Output map value object being filled (owned by this) */
- struct bt_value *params;
+ bt_value *params;
/* Next expected FSM state */
enum ini_parsing_fsm_state expecting;
GString *output;
GString *dbg_info_dir;
GString *dbg_info_target_prefix;
- const struct bt_value *names;
- const struct bt_value *fields;
+ const bt_value *names;
+ const bt_value *fields;
/* Flags */
bool no_delta;
{
int ret = 0;
GTokenType token_type;
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
token_type = g_scanner_get_next_token(state->scanner);
if (token_type == G_TOKEN_EOF) {
* Return value is owned by the caller.
*/
static
-struct bt_value *bt_value_from_ini(const char *arg,
+bt_value *bt_value_from_ini(const char *arg,
GString *ini_error)
{
/* Lexical scanner configuration */
* Return value is owned by the caller.
*/
static
-struct bt_value *bt_value_from_arg(const char *arg)
+bt_value *bt_value_from_arg(const char *arg)
{
- struct bt_value *params = NULL;
+ bt_value *params = NULL;
GString *ini_error = NULL;
ini_error = g_string_new(NULL);
* Destroys a component configuration.
*/
static
-void bt_config_component_destroy(struct bt_object *obj)
+void bt_config_component_destroy(bt_object *obj)
{
struct bt_config_component *bt_config_component =
container_of(obj, struct bt_config_component, base);
* Destroys a configuration.
*/
static
-void bt_config_destroy(struct bt_object *obj)
+void bt_config_destroy(bt_object *obj)
{
struct bt_config *cfg =
container_of(obj, struct bt_config, base);
* Return value is owned by the caller.
*/
static
-struct bt_value *names_from_arg(const char *arg)
+bt_value *names_from_arg(const char *arg)
{
GScanner *scanner = NULL;
- struct bt_value *names = NULL;
+ bt_value *names = NULL;
bool found_all = false, found_none = false, found_item = false;
names = bt_value_array_create();
* Return value is owned by the caller.
*/
static
-struct bt_value *fields_from_arg(const char *arg)
+bt_value *fields_from_arg(const char *arg)
{
GScanner *scanner = NULL;
- struct bt_value *fields;
+ bt_value *fields;
fields = bt_value_array_create();
if (!fields) {
*/
static
int insert_flat_params_from_array(GString *params_arg,
- const struct bt_value *names_array, const char *prefix)
+ const bt_value *names_array, const char *prefix)
{
int ret = 0;
int i;
}
for (i = 0; i < bt_value_array_get_size(names_array); i++) {
- const struct bt_value *str_obj =
+ const bt_value *str_obj =
bt_value_array_borrow_element_by_index_const(names_array,
i);
const char *suffix;
int add_run_cfg_comp_check_name(struct bt_config *cfg,
struct bt_config_component *cfg_comp,
enum bt_config_component_dest dest,
- struct bt_value *instance_names)
+ bt_value *instance_names)
{
int ret = 0;
}
static
-int append_env_var_plugin_paths(struct bt_value *plugin_paths)
+int append_env_var_plugin_paths(bt_value *plugin_paths)
{
int ret = 0;
const char *envvar;
}
static
-int append_home_and_system_plugin_paths(struct bt_value *plugin_paths,
+int append_home_and_system_plugin_paths(bt_value *plugin_paths,
bool omit_system_plugin_path, bool omit_home_plugin_path)
{
int ret;
static
struct bt_config *bt_config_base_create(enum bt_config_command command,
- const struct bt_value *initial_plugin_paths,
+ const bt_value *initial_plugin_paths,
bool needs_plugins)
{
struct bt_config *cfg;
cfg->command_needs_plugins = needs_plugins;
if (initial_plugin_paths) {
- struct bt_value *initial_plugin_paths_copy;
+ bt_value *initial_plugin_paths_copy;
(void) bt_value_copy(initial_plugin_paths,
&initial_plugin_paths_copy);
static
struct bt_config *bt_config_run_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
struct bt_config *bt_config_list_plugins_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
struct bt_config *bt_config_help_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
struct bt_config *bt_config_query_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
struct bt_config *bt_config_print_ctf_metadata_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
struct bt_config *bt_config_print_lttng_live_sessions_create(
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg;
static
int bt_config_append_plugin_paths_check_setuid_setgid(
- struct bt_value *plugin_paths, const char *arg)
+ bt_value *plugin_paths, const char *arg)
{
int ret = 0;
struct bt_config *bt_config_help_from_args(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
poptContext pc = NULL;
char *arg = NULL;
struct bt_config *bt_config_query_from_args(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
poptContext pc = NULL;
char *arg = NULL;
int ret;
struct bt_config *cfg = NULL;
const char *leftover;
- struct bt_value *params = bt_value_null;
+ bt_value *params = bt_value_null;
*retcode = 0;
cfg = bt_config_query_create(initial_plugin_paths);
struct bt_config *bt_config_list_plugins_from_args(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
poptContext pc = NULL;
char *arg = NULL;
struct bt_config *bt_config_run_from_args(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
poptContext pc = NULL;
char *arg = NULL;
struct bt_config_component *cur_cfg_comp = NULL;
enum bt_config_component_dest cur_cfg_comp_dest =
BT_CONFIG_COMPONENT_DEST_UNKNOWN;
- struct bt_value *cur_base_params = NULL;
+ bt_value *cur_base_params = NULL;
int opt, ret = 0;
struct bt_config *cfg = NULL;
- struct bt_value *instance_names = NULL;
- struct bt_value *connection_args = NULL;
+ bt_value *instance_names = NULL;
+ bt_value *connection_args = NULL;
GString *cur_param_key = NULL;
char error_buf[256] = { 0 };
long retry_duration = -1;
}
case OPT_PARAMS:
{
- struct bt_value *params;
- struct bt_value *params_to_set;
+ bt_value *params;
+ bt_value *params_to_set;
if (!cur_cfg_comp) {
printf_err("Cannot add parameters to unavailable component:\n %s\n",
break;
case OPT_BASE_PARAMS:
{
- struct bt_value *params =
+ bt_value *params =
bt_value_from_arg(arg);
if (!params) {
}
static
-struct bt_config *bt_config_run_from_args_array(const struct bt_value *run_args,
+struct bt_config *bt_config_run_from_args_array(const bt_value *run_args,
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *cfg = NULL;
const char **argv;
goto end;
}
for (i = 0; i < len; i++) {
- const struct bt_value *arg_value =
+ const bt_value *arg_value =
bt_value_array_borrow_element_by_index_const(run_args,
i);
const char *arg;
static
GString *get_component_auto_name(const char *prefix,
- const struct bt_value *existing_names)
+ const bt_value *existing_names)
{
unsigned int i = 0;
GString *auto_name = g_string_new(NULL);
GString *comp_arg;
GString *name_arg;
GString *params_arg;
- struct bt_value *extra_params;
+ bt_value *extra_params;
};
static
int assign_name_to_implicit_component(struct implicit_component_args *args,
- const char *prefix, struct bt_value *existing_names,
+ const char *prefix, bt_value *existing_names,
GList **comp_names, bool append_to_comp_names)
{
int ret = 0;
static
int append_run_args_for_implicit_component(
struct implicit_component_args *impl_args,
- struct bt_value *run_args)
+ bt_value *run_args)
{
int ret = 0;
size_t i;
for (i = 0; i < bt_value_array_get_size(impl_args->extra_params);
i++) {
- const struct bt_value *elem;
+ const bt_value *elem;
const char *arg;
elem = bt_value_array_borrow_element_by_index(impl_args->extra_params,
static
int convert_append_name_param(enum bt_config_component_dest dest,
GString *cur_name, GString *cur_name_prefix,
- struct bt_value *run_args,
- struct bt_value *all_names,
+ bt_value *run_args,
+ bt_value *all_names,
GList **source_names, GList **filter_names,
GList **sink_names)
{
* function.
*/
static
-int append_connect_arg(struct bt_value *run_args,
+int append_connect_arg(bt_value *run_args,
const char *upstream_name, const char *downstream_name)
{
int ret = 0;
* Appends the run command's --connect options for the convert command.
*/
static
-int convert_auto_connect(struct bt_value *run_args,
+int convert_auto_connect(bt_value *run_args,
GList *source_names, GList *filter_names,
GList *sink_names)
{
struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths, char *log_level)
+ const bt_value *initial_plugin_paths, char *log_level)
{
poptContext pc = NULL;
char *arg = NULL;
bool print_run_args = false;
bool print_run_args_0 = false;
bool print_ctf_metadata = false;
- struct bt_value *run_args = NULL;
- struct bt_value *all_names = NULL;
+ bt_value *run_args = NULL;
+ bt_value *all_names = NULL;
GList *source_names = NULL;
GList *filter_names = NULL;
GList *sink_names = NULL;
struct implicit_component_args implicit_debug_info_args = { 0 };
struct implicit_component_args implicit_muxer_args = { 0 };
struct implicit_component_args implicit_trimmer_args = { 0 };
- struct bt_value *plugin_paths;
+ bt_value *plugin_paths;
char error_buf[256] = { 0 };
size_t i;
struct bt_common_lttng_live_url_parts lttng_live_url_parts = { 0 };
break;
case OPT_FIELDS:
{
- struct bt_value *fields = fields_from_arg(arg);
+ bt_value *fields = fields_from_arg(arg);
if (!fields) {
goto error;
}
case OPT_NAMES:
{
- struct bt_value *names = names_from_arg(arg);
+ bt_value *names = names_from_arg(arg);
if (!names) {
goto error;
}
for (i = 0; i < bt_value_array_get_size(run_args); i++) {
- const struct bt_value *arg_value =
+ const bt_value *arg_value =
bt_value_array_borrow_element_by_index(run_args,
i);
const char *arg;
struct bt_config *bt_config_cli_args_create(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths)
+ const bt_value *initial_plugin_paths)
{
struct bt_config *config = NULL;
int i;
struct bt_config *bt_config_cli_args_create(int argc, const char *argv[],
int *retcode, bool force_omit_system_plugin_path,
bool force_omit_home_plugin_path,
- const struct bt_value *initial_plugin_paths);
+ const bt_value *initial_plugin_paths);
#endif /* CLI_BABELTRACE_CFG_CLI_ARGS_H */
* and appends them to the array value object plugin_paths.
*/
int bt_config_append_plugin_paths(
- struct bt_value *plugin_paths, const char *arg)
+ bt_value *plugin_paths, const char *arg)
{
int ret = 0;
GPtrArray *dirs = g_ptr_array_new_with_free_func(destroy_gstring);
};
struct bt_config_component {
- struct bt_object base;
+ bt_object base;
enum bt_component_class_type type;
GString *plugin_name;
GString *comp_cls_name;
- struct bt_value *params;
+ bt_value *params;
GString *instance_name;
};
};
struct bt_config {
- struct bt_object base;
+ bt_object base;
bool debug;
bool verbose;
- struct bt_value *plugin_paths;
+ bt_value *plugin_paths;
bool omit_system_plugin_path;
bool omit_home_plugin_path;
bool command_needs_plugins;
return comp;
}
-int bt_config_append_plugin_paths(struct bt_value *plugin_paths,
+int bt_config_append_plugin_paths(bt_value *plugin_paths,
const char *arg);
void bt_config_connection_destroy(struct bt_config_connection *connection);
};
/* Application's processing graph (weak) */
-static struct bt_graph *the_graph;
-static struct bt_query_executor *the_query_executor;
+static bt_graph *the_graph;
+static bt_query_executor *the_query_executor;
static bool canceled = false;
GPtrArray *loaded_plugins;
}
static
-int query(const struct bt_component_class *comp_cls, const char *obj,
- const struct bt_value *params, const struct bt_value **user_result,
+int query(const bt_component_class *comp_cls, const char *obj,
+ const bt_value *params, const bt_value **user_result,
const char **fail_reason)
{
- const struct bt_value *result = NULL;
+ const bt_value *result = NULL;
enum bt_query_executor_status status;
*fail_reason = "unknown error";
int ret = 0;
}
static
-const struct bt_plugin *find_plugin(const char *name)
+const bt_plugin *find_plugin(const char *name)
{
int i;
- const struct bt_plugin *plugin = NULL;
+ const bt_plugin *plugin = NULL;
BT_ASSERT(name);
BT_LOGD("Finding plugin: name=\"%s\"", name);
}
typedef const void *(*plugin_borrow_comp_cls_func_t)(
- const struct bt_plugin *, const char *);
+ const bt_plugin *, const char *);
static
const void *find_component_class_from_plugin(const char *plugin_name,
plugin_borrow_comp_cls_func_t plugin_borrow_comp_cls_func)
{
const void *comp_class = NULL;
- const struct bt_plugin *plugin;
+ const bt_plugin *plugin;
BT_LOGD("Finding component class: plugin-name=\"%s\", "
"comp-cls-name=\"%s\"", plugin_name, comp_class_name);
}
static
-const struct bt_component_class_source *find_source_component_class(
+const bt_component_class_source *find_source_component_class(
const char *plugin_name, const char *comp_class_name)
{
return (const void *) find_component_class_from_plugin(
}
static
-const struct bt_component_class_filter *find_filter_component_class(
+const bt_component_class_filter *find_filter_component_class(
const char *plugin_name, const char *comp_class_name)
{
return (const void *) find_component_class_from_plugin(
}
static
-const struct bt_component_class_sink *find_sink_component_class(
+const bt_component_class_sink *find_sink_component_class(
const char *plugin_name, const char *comp_class_name)
{
return (const void *) find_component_class_from_plugin(plugin_name,
}
static
-const struct bt_component_class *find_component_class(const char *plugin_name,
+const bt_component_class *find_component_class(const char *plugin_name,
const char *comp_class_name,
enum bt_component_class_type comp_class_type)
{
- const struct bt_component_class *comp_cls = NULL;
+ const bt_component_class *comp_cls = NULL;
switch (comp_class_type) {
case BT_COMPONENT_CLASS_TYPE_SOURCE:
}
static
-void print_value(FILE *, const struct bt_value *, size_t);
+void print_value(FILE *, const bt_value *, size_t);
static
-void print_value_rec(FILE *, const struct bt_value *, size_t);
+void print_value_rec(FILE *, const bt_value *, size_t);
struct print_map_value_data {
size_t indent;
};
static
-bt_bool print_map_value(const char *key, const struct bt_value *object,
+bt_bool print_map_value(const char *key, const bt_value *object,
void *data)
{
struct print_map_value_data *print_map_value_data = data;
}
static
-void print_value_rec(FILE *fp, const struct bt_value *value, size_t indent)
+void print_value_rec(FILE *fp, const bt_value *value, size_t indent)
{
bt_bool bool_val;
int64_t int_val;
}
for (i = 0; i < size; i++) {
- const struct bt_value *element =
+ const bt_value *element =
bt_value_array_borrow_element_by_index_const(
value, i);
}
static
-void print_value(FILE *fp, const struct bt_value *value, size_t indent)
+void print_value(FILE *fp, const bt_value *value, size_t indent)
{
if (!bt_value_is_array(value) && !bt_value_is_map(value)) {
print_indent(fp, indent);
}
static
-void print_plugin_paths(const struct bt_value *plugin_paths)
+void print_plugin_paths(const bt_value *plugin_paths)
{
fprintf(stderr, " Plugin paths:\n");
print_value(stderr, plugin_paths, 4);
}
static
-void add_to_loaded_plugins(const struct bt_plugin_set *plugin_set)
+void add_to_loaded_plugins(const bt_plugin_set *plugin_set)
{
int64_t i;
int64_t count;
BT_ASSERT(count >= 0);
for (i = 0; i < count; i++) {
- const struct bt_plugin *plugin =
+ const bt_plugin *plugin =
bt_plugin_set_borrow_plugin_by_index_const(plugin_set, i);
- const struct bt_plugin *loaded_plugin =
+ const bt_plugin *loaded_plugin =
find_plugin(bt_plugin_get_name(plugin));
BT_ASSERT(plugin);
}
static
-int load_dynamic_plugins(const struct bt_value *plugin_paths)
+int load_dynamic_plugins(const bt_value *plugin_paths)
{
int nr_paths, i, ret = 0;
BT_LOGI("Loading dynamic plugins.");
for (i = 0; i < nr_paths; i++) {
- const struct bt_value *plugin_path_value = NULL;
+ const bt_value *plugin_path_value = NULL;
const char *plugin_path;
- const struct bt_plugin_set *plugin_set;
+ const bt_plugin_set *plugin_set;
plugin_path_value =
bt_value_array_borrow_element_by_index_const(
int load_static_plugins(void)
{
int ret = 0;
- const struct bt_plugin_set *plugin_set;
+ const bt_plugin_set *plugin_set;
BT_LOGI("Loading static plugins.");
plugin_set = bt_plugin_create_all_from_static();
}
static
-int load_all_plugins(const struct bt_value *plugin_paths)
+int load_all_plugins(const bt_value *plugin_paths)
{
int ret = 0;
}
static
-void print_plugin_info(const struct bt_plugin *plugin)
+void print_plugin_info(const bt_plugin *plugin)
{
unsigned int major, minor, patch;
const char *extra;
int cmd_query(struct bt_config *cfg)
{
int ret = 0;
- const struct bt_component_class *comp_cls = NULL;
- const struct bt_value *results = NULL;
+ const bt_component_class *comp_cls = NULL;
+ const bt_value *results = NULL;
const char *fail_reason = NULL;
comp_cls = find_component_class(
static
void print_component_class_help(const char *plugin_name,
- const struct bt_component_class *comp_cls)
+ const bt_component_class *comp_cls)
{
const char *comp_class_name =
bt_component_class_get_name(comp_cls);
int cmd_help(struct bt_config *cfg)
{
int ret = 0;
- const struct bt_plugin *plugin = NULL;
- const struct bt_component_class *needed_comp_cls = NULL;
+ const bt_plugin *plugin = NULL;
+ const bt_component_class *needed_comp_cls = NULL;
plugin = find_plugin(cfg->cmd_data.help.cfg_component->plugin_name->str);
if (!plugin) {
return ret;
}
-typedef void *(* plugin_borrow_comp_cls_by_index_func_t)(const struct bt_plugin *,
+typedef void *(* plugin_borrow_comp_cls_by_index_func_t)(const bt_plugin *,
uint64_t);
-typedef const struct bt_component_class *(* spec_comp_cls_borrow_comp_cls_func_t)(
+typedef const bt_component_class *(* spec_comp_cls_borrow_comp_cls_func_t)(
void *);
-void cmd_list_plugins_print_component_classes(const struct bt_plugin *plugin,
+void cmd_list_plugins_print_component_classes(const bt_plugin *plugin,
const char *cc_type_name, uint64_t count,
plugin_borrow_comp_cls_by_index_func_t borrow_comp_cls_by_index_func,
spec_comp_cls_borrow_comp_cls_func_t spec_comp_cls_borrow_comp_cls_func)
}
for (i = 0; i < count; i++) {
- const struct bt_component_class *comp_class =
+ const bt_component_class *comp_class =
spec_comp_cls_borrow_comp_cls_func(
borrow_comp_cls_by_index_func(plugin, i));
const char *comp_class_name =
}
for (i = 0; i < plugins_count; i++) {
- const struct bt_plugin *plugin = g_ptr_array_index(loaded_plugins, i);
+ const bt_plugin *plugin = g_ptr_array_index(loaded_plugins, i);
component_classes_count +=
bt_plugin_get_source_component_class_count(plugin) +
bt_common_color_reset());
for (i = 0; i < plugins_count; i++) {
- const struct bt_plugin *plugin = g_ptr_array_index(loaded_plugins, i);
+ const bt_plugin *plugin = g_ptr_array_index(loaded_plugins, i);
printf("\n");
print_plugin_info(plugin);
int cmd_print_lttng_live_sessions(struct bt_config *cfg)
{
int ret = 0;
- const struct bt_component_class *comp_cls = NULL;
- const struct bt_value *results = NULL;
- struct bt_value *params = NULL;
- const struct bt_value *map = NULL;
- const struct bt_value *v = NULL;
+ const bt_component_class *comp_cls = NULL;
+ const bt_value *results = NULL;
+ bt_value *params = NULL;
+ const bt_value *map = NULL;
+ 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 =
int cmd_print_ctf_metadata(struct bt_config *cfg)
{
int ret = 0;
- const struct bt_component_class *comp_cls = NULL;
- const struct bt_value *results = NULL;
- struct bt_value *params = NULL;
- const struct bt_value *metadata_text_value = NULL;
+ const bt_component_class *comp_cls = NULL;
+ const bt_value *results = NULL;
+ bt_value *params = NULL;
+ const bt_value *metadata_text_value = NULL;
const char *metadata_text = NULL;
static const char * const plugin_name = "ctf";
static const char * const comp_cls_name = "fs";
GHashTable *sink_components;
/* Owned by this */
- struct bt_graph *graph;
+ bt_graph *graph;
/* Weak */
struct bt_config *cfg;
static
int cmd_run_ctx_connect_upstream_port_to_downstream_component(
struct cmd_run_ctx *ctx,
- const struct bt_component *upstream_comp,
- const struct bt_port_output *out_upstream_port,
+ const bt_component *upstream_comp,
+ const bt_port_output *out_upstream_port,
struct bt_config_connection *cfg_conn)
{
typedef uint64_t (*input_port_count_func_t)(void *);
- typedef const struct bt_port_input *(*borrow_input_port_by_index_func_t)(
+ typedef const bt_port_input *(*borrow_input_port_by_index_func_t)(
const void *, uint64_t);
- const struct bt_port *upstream_port =
+ const bt_port *upstream_port =
bt_port_output_as_port_const(out_upstream_port);
int ret = 0;
borrow_input_port_by_index_func_t port_by_index_fn;
enum bt_graph_status status = BT_GRAPH_STATUS_ERROR;
bool insert_trimmer = false;
- struct bt_value *trimmer_params = NULL;
+ bt_value *trimmer_params = NULL;
char *intersection_begin = NULL;
char *intersection_end = NULL;
- const struct bt_component_filter *trimmer = NULL;
- const struct bt_component_class_filter *trimmer_class = NULL;
- const struct bt_port_input *trimmer_input = NULL;
- const struct bt_port_output *trimmer_output = NULL;
+ const bt_component_filter *trimmer = NULL;
+ const bt_component_class_filter *trimmer_class = NULL;
+ const bt_port_input *trimmer_input = NULL;
+ const bt_port_output *trimmer_output = NULL;
if (ctx->intersections &&
bt_component_get_class_type(upstream_comp) ==
BT_ASSERT(downstream_port_count >= 0);
for (i = 0; i < downstream_port_count; i++) {
- const struct bt_port_input *in_downstream_port =
+ const bt_port_input *in_downstream_port =
port_by_index_fn(downstream_comp, i);
- const struct bt_port *downstream_port =
+ const bt_port *downstream_port =
bt_port_input_as_port_const(in_downstream_port);
const char *upstream_port_name;
const char *downstream_port_name;
static
int cmd_run_ctx_connect_upstream_port(struct cmd_run_ctx *ctx,
- const struct bt_port_output *upstream_port)
+ const bt_port_output *upstream_port)
{
int ret = 0;
const char *upstream_port_name;
const char *upstream_comp_name;
- const struct bt_component *upstream_comp = NULL;
+ const bt_component *upstream_comp = NULL;
size_t i;
BT_ASSERT(ctx);
static
void graph_output_port_added_listener(struct cmd_run_ctx *ctx,
- const struct bt_port_output *out_port)
+ const bt_port_output *out_port)
{
- const struct bt_component *comp;
- const struct bt_port *port = bt_port_output_as_port_const(out_port);
+ const bt_component *comp;
+ const bt_port *port = bt_port_output_as_port_const(out_port);
comp = bt_port_borrow_component_const(port);
BT_LOGI("Port added to a graph's component: comp-addr=%p, "
static
void graph_source_output_port_added_listener(
- const struct bt_component_source *component,
- const struct bt_port_output *port, void *data)
+ const bt_component_source *component,
+ const bt_port_output *port, void *data)
{
graph_output_port_added_listener(data, port);
}
static
void graph_filter_output_port_added_listener(
- const struct bt_component_filter *component,
- const struct bt_port_output *port, void *data)
+ const bt_component_filter *component,
+ const bt_port_output *port, void *data)
{
graph_output_port_added_listener(data, port);
}
static
int set_stream_intersections(struct cmd_run_ctx *ctx,
struct bt_config_component *cfg_comp,
- const struct bt_component_class_source *src_comp_cls)
+ const bt_component_class_source *src_comp_cls)
{
int ret = 0;
uint64_t trace_idx;
int64_t trace_count;
enum bt_value_status value_status;
const char *path = NULL;
- const struct bt_value *component_path_value = NULL;
- struct bt_value *query_params = NULL;
- const struct bt_value *query_result = NULL;
- const struct bt_value *trace_info = NULL;
- const struct bt_value *intersection_range = NULL;
- const struct bt_value *intersection_begin = NULL;
- const struct bt_value *intersection_end = NULL;
- const struct bt_value *stream_path_value = NULL;
- const struct bt_value *stream_paths = NULL;
- const struct bt_value *stream_infos = NULL;
- const struct bt_value *stream_info = NULL;
+ const bt_value *component_path_value = NULL;
+ bt_value *query_params = NULL;
+ const bt_value *query_result = NULL;
+ const bt_value *trace_info = NULL;
+ const bt_value *intersection_range = NULL;
+ const bt_value *intersection_begin = NULL;
+ const bt_value *intersection_end = NULL;
+ const bt_value *stream_path_value = NULL;
+ const bt_value *stream_paths = NULL;
+ const bt_value *stream_infos = NULL;
+ const bt_value *stream_info = NULL;
struct port_id *port_id = NULL;
struct trace_range *trace_range = NULL;
const char *fail_reason = NULL;
- const struct bt_component_class *comp_cls =
+ const bt_component_class *comp_cls =
bt_component_class_source_as_component_class_const(src_comp_cls);
component_path_value = bt_value_map_borrow_entry_value(cfg_comp->params,
}
typedef uint64_t (*output_port_count_func_t)(const void *);
-typedef const struct bt_port_output *(*borrow_output_port_by_index_func_t)(
+typedef const bt_port_output *(*borrow_output_port_by_index_func_t)(
const void *, uint64_t);
static
BT_ASSERT(count >= 0);
for (i = 0; i < count; i++) {
- const struct bt_port_output *upstream_port = port_by_index_fn(comp, i);
+ const bt_port_output *upstream_port = port_by_index_fn(comp, i);
BT_ASSERT(upstream_port);
ret = cmd_run_ctx_connect_upstream_port(ctx, upstream_port);
* SOFTWARE.
*/
-/* For bt_bool */
+/* For bt_bool, bt_component_class */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-
enum bt_component_class_type {
BT_COMPONENT_CLASS_TYPE_SOURCE = 0,
BT_COMPONENT_CLASS_TYPE_FILTER = 1,
};
extern const char *bt_component_class_get_name(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
extern const char *bt_component_class_get_description(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
extern const char *bt_component_class_get_help(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
extern enum bt_component_class_type bt_component_class_get_type(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
static inline
bt_bool bt_component_class_is_source(
- const struct bt_component_class *component_class)
+ const bt_component_class *component_class)
{
return bt_component_class_get_type(component_class) ==
BT_COMPONENT_CLASS_TYPE_SOURCE;
static inline
bt_bool bt_component_class_is_filter(
- const struct bt_component_class *component_class)
+ const bt_component_class *component_class)
{
return bt_component_class_get_type(component_class) ==
BT_COMPONENT_CLASS_TYPE_FILTER;
static inline
bt_bool bt_component_class_is_sink(
- const struct bt_component_class *component_class)
+ const bt_component_class *component_class)
{
return bt_component_class_get_type(component_class) ==
BT_COMPONENT_CLASS_TYPE_SINK;
}
extern void bt_component_class_get_ref(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
extern void bt_component_class_put_ref(
- const struct bt_component_class *component_class);
+ const bt_component_class *component_class);
#define BT_COMPONENT_CLASS_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
+/* For bt_component_class, bt_component_class_filter */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_class_filter;
-
static inline
-const struct bt_component_class *
+const bt_component_class *
bt_component_class_filter_as_component_class_const(
- const struct bt_component_class_filter *comp_cls_filter)
+ const bt_component_class_filter *comp_cls_filter)
{
return (const void *) comp_cls_filter;
}
extern void bt_component_class_filter_get_ref(
- const struct bt_component_class_filter *component_class_filter);
+ const bt_component_class_filter *component_class_filter);
extern void bt_component_class_filter_put_ref(
- const struct bt_component_class_filter *component_class_filter);
+ const bt_component_class_filter *component_class_filter);
#define BT_COMPONENT_CLASS_FILTER_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
-/* For enum bt_notification_array_const */
-#include <babeltrace/graph/notification-const.h>
-
/* For enum bt_self_component_status */
#include <babeltrace/graph/self-component.h>
/* For enum bt_query_status */
#include <babeltrace/graph/component-class.h>
+/*
+ * For bt_component_class, bt_component_class_filter, bt_port_input,
+ * bt_port_output, bt_query_executor, bt_self_component_class_filter,
+ * bt_self_component_filter, bt_self_component_port_input,
+ * bt_self_component_port_output, bt_value, bt_notification_array_const
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_class_filter;
-struct bt_port_input;
-struct bt_port_output;
-struct bt_query_executor;
-struct bt_self_component_class_filter;
-struct bt_self_component_filter;
-struct bt_self_component_port_input;
-struct bt_self_component_port_output;
-struct bt_value;
-
typedef enum bt_self_component_status
(*bt_component_class_filter_init_method)(
- struct bt_self_component_filter *self_component,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_filter *self_component,
+ const bt_value *params, void *init_method_data);
typedef void (*bt_component_class_filter_finalize_method)(
- struct bt_self_component_filter *self_component);
+ bt_self_component_filter *self_component);
typedef enum bt_self_notification_iterator_status
(*bt_component_class_filter_notification_iterator_init_method)(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_output *port);
+ bt_self_notification_iterator *notification_iterator,
+ bt_self_component_filter *self_component,
+ bt_self_component_port_output *port);
typedef void
(*bt_component_class_filter_notification_iterator_finalize_method)(
- struct bt_self_notification_iterator *notification_iterator);
+ bt_self_notification_iterator *notification_iterator);
typedef enum bt_self_notification_iterator_status
(*bt_component_class_filter_notification_iterator_next_method)(
- struct bt_self_notification_iterator *notification_iterator,
+ bt_self_notification_iterator *notification_iterator,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count);
typedef enum bt_query_status
(*bt_component_class_filter_query_method)(
- struct bt_self_component_class_filter *comp_class,
- const struct bt_query_executor *query_executor,
- const char *object, const struct bt_value *params,
- const struct bt_value **result);
+ 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
(*bt_component_class_filter_accept_input_port_connection_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ 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
(*bt_component_class_filter_accept_output_port_connection_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_output *self_port,
- const struct bt_port_input *other_port);
+ 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
(*bt_component_class_filter_input_port_connected_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ 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
(*bt_component_class_filter_output_port_connected_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_output *self_port,
- const struct bt_port_input *other_port);
+ bt_self_component_filter *self_component,
+ bt_self_component_port_output *self_port,
+ const bt_port_input *other_port);
typedef void
(*bt_component_class_filter_input_port_disconnected_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_input *self_port);
+ bt_self_component_filter *self_component,
+ bt_self_component_port_input *self_port);
typedef void
(*bt_component_class_filter_output_port_disconnected_method)(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_output *self_port);
+ bt_self_component_filter *self_component,
+ bt_self_component_port_output *self_port);
static inline
-struct bt_component_class *bt_component_class_filter_as_component_class(
- struct bt_component_class_filter *comp_cls_filter)
+bt_component_class *bt_component_class_filter_as_component_class(
+ bt_component_class_filter *comp_cls_filter)
{
return (void *) comp_cls_filter;
}
extern
-struct bt_component_class_filter *bt_component_class_filter_create(
+bt_component_class_filter *bt_component_class_filter_create(
const char *name,
bt_component_class_filter_notification_iterator_next_method method);
extern int bt_component_class_filter_set_init_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_init_method method);
extern int bt_component_class_filter_set_finalize_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_finalize_method method);
extern int bt_component_class_filter_set_accept_input_port_connection_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_accept_input_port_connection_method method);
extern int bt_component_class_filter_set_accept_output_port_connection_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_accept_output_port_connection_method method);
extern int bt_component_class_filter_set_input_port_connected_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_input_port_connected_method method);
extern int bt_component_class_filter_set_output_port_connected_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_output_port_connected_method method);
extern int bt_component_class_filter_set_input_port_disconnected_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_input_port_disconnected_method method);
extern int bt_component_class_filter_set_output_port_disconnected_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_output_port_disconnected_method method);
extern int bt_component_class_filter_set_query_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_query_method method);
extern int bt_component_class_filter_set_notification_iterator_init_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_notification_iterator_init_method method);
extern int bt_component_class_filter_set_notification_iterator_finalize_method(
- struct bt_component_class_filter *comp_class,
+ bt_component_class_filter *comp_class,
bt_component_class_filter_notification_iterator_finalize_method method);
#ifdef __cplusplus
* SOFTWARE.
*/
+/* For bt_component_class, bt_component_class_sink */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_class_sink;
-
static inline
-const struct bt_component_class *
+const bt_component_class *
bt_component_class_sink_as_component_class_const(
- const struct bt_component_class_sink *comp_cls_sink)
+ const bt_component_class_sink *comp_cls_sink)
{
return (const void *) comp_cls_sink;
}
extern void bt_component_class_sink_get_ref(
- const struct bt_component_class_sink *component_class_sink);
+ const bt_component_class_sink *component_class_sink);
extern void bt_component_class_sink_put_ref(
- const struct bt_component_class_sink *component_class_sink);
+ const bt_component_class_sink *component_class_sink);
#define BT_COMPONENT_CLASS_SINK_PUT_REF_AND_RESET(_var) \
do { \
/* For enum bt_query_status */
#include <babeltrace/graph/component-class.h>
+/*
+ * For bt_component_class, bt_component_class_sink, bt_port_output,
+ * bt_query_executor, bt_self_component_class_sink,
+ * bt_self_component_sink, bt_self_component_port_input, bt_value
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_class_sink;
-struct bt_port_output;
-struct bt_query_executor;
-struct bt_self_component_class_sink;
-struct bt_self_component_port_input;
-struct bt_self_component_sink;
-struct bt_value;
-
typedef enum bt_self_component_status
(*bt_component_class_sink_init_method)(
- struct bt_self_component_sink *self_component,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_sink *self_component,
+ const bt_value *params, void *init_method_data);
typedef void (*bt_component_class_sink_finalize_method)(
- struct bt_self_component_sink *self_component);
+ bt_self_component_sink *self_component);
typedef enum bt_query_status
(*bt_component_class_sink_query_method)(
- struct bt_self_component_class_sink *comp_class,
- const struct bt_query_executor *query_executor,
- const char *object, const struct bt_value *params,
- const struct bt_value **result);
+ 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
(*bt_component_class_sink_accept_input_port_connection_method)(
- struct bt_self_component_sink *self_component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ 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
(*bt_component_class_sink_input_port_connected_method)(
- struct bt_self_component_sink *self_component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ bt_self_component_sink *self_component,
+ bt_self_component_port_input *self_port,
+ const bt_port_output *other_port);
typedef void
(*bt_component_class_sink_input_port_disconnected_method)(
- struct bt_self_component_sink *self_component,
- struct bt_self_component_port_input *self_port);
+ 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)(
- struct bt_self_component_sink *self_component);
+ bt_self_component_sink *self_component);
static inline
-struct bt_component_class *bt_component_class_sink_as_component_class(
- struct bt_component_class_sink *comp_cls_sink)
+bt_component_class *bt_component_class_sink_as_component_class(
+ bt_component_class_sink *comp_cls_sink)
{
return (void *) comp_cls_sink;
}
extern
-struct bt_component_class_sink *bt_component_class_sink_create(
+bt_component_class_sink *bt_component_class_sink_create(
const char *name,
bt_component_class_sink_consume_method method);
extern int bt_component_class_sink_set_init_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_init_method method);
extern int bt_component_class_sink_set_finalize_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_finalize_method method);
extern int bt_component_class_sink_set_accept_input_port_connection_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_accept_input_port_connection_method method);
extern int bt_component_class_sink_set_input_port_connected_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_input_port_connected_method method);
extern int bt_component_class_sink_set_input_port_disconnected_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_input_port_disconnected_method method);
extern int bt_component_class_sink_set_query_method(
- struct bt_component_class_sink *comp_class,
+ bt_component_class_sink *comp_class,
bt_component_class_sink_query_method method);
#ifdef __cplusplus
* SOFTWARE.
*/
+/* For bt_component_class, bt_component_class_source */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_class_source;
-
static inline
-const struct bt_component_class *
+const bt_component_class *
bt_component_class_source_as_component_class_const(
- const struct bt_component_class_source *comp_cls_source)
+ const bt_component_class_source *comp_cls_source)
{
return (const void *) comp_cls_source;
}
extern void bt_component_class_source_get_ref(
- const struct bt_component_class_source *component_class_source);
+ const bt_component_class_source *component_class_source);
extern void bt_component_class_source_put_ref(
- const struct bt_component_class_source *component_class_source);
+ const bt_component_class_source *component_class_source);
#define BT_COMPONENT_CLASS_SOURCE_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
-/* For enum bt_notification_array_const */
-#include <babeltrace/graph/notification-const.h>
-
/* For enum bt_self_component_status */
#include <babeltrace/graph/self-component.h>
/* For enum bt_query_status */
#include <babeltrace/graph/component-class.h>
+/*
+ * For bt_component_class, bt_component_class_source, bt_port_input,
+ * bt_query_executor, bt_self_component_class_source,
+ * bt_self_component_source, bt_self_component_port_output, bt_value,
+ * bt_notification_array_const
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_self_component_class_source;
-struct bt_component_class_source;
-struct bt_self_component_source;
-struct bt_component_class_source;
-struct bt_self_component_port_output;
-struct bt_port_input;
-struct bt_query_executor;
-struct bt_value;
-
typedef enum bt_self_component_status
(*bt_component_class_source_init_method)(
- struct bt_self_component_source *self_component,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_source *self_component,
+ const bt_value *params, void *init_method_data);
typedef void (*bt_component_class_source_finalize_method)(
- struct bt_self_component_source *self_component);
+ bt_self_component_source *self_component);
typedef enum bt_self_notification_iterator_status
(*bt_component_class_source_notification_iterator_init_method)(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_self_component_source *self_component,
- struct bt_self_component_port_output *port);
+ bt_self_notification_iterator *notification_iterator,
+ bt_self_component_source *self_component,
+ bt_self_component_port_output *port);
typedef void
(*bt_component_class_source_notification_iterator_finalize_method)(
- struct bt_self_notification_iterator *notification_iterator);
+ bt_self_notification_iterator *notification_iterator);
typedef enum bt_self_notification_iterator_status
(*bt_component_class_source_notification_iterator_next_method)(
- struct bt_self_notification_iterator *notification_iterator,
+ bt_self_notification_iterator *notification_iterator,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count);
typedef enum bt_query_status
(*bt_component_class_source_query_method)(
- struct bt_self_component_class_source *comp_class,
- const struct bt_query_executor *query_executor,
- const char *object, const struct bt_value *params,
- const struct bt_value **result);
+ 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
(*bt_component_class_source_accept_output_port_connection_method)(
- struct bt_self_component_source *self_component,
- struct bt_self_component_port_output *self_port,
- const struct bt_port_input *other_port);
+ 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
(*bt_component_class_source_output_port_connected_method)(
- struct bt_self_component_source *self_component,
- struct bt_self_component_port_output *self_port,
- const struct bt_port_input *other_port);
+ 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)(
- struct bt_self_component_source *self_component,
- struct bt_self_component_port_output *self_port);
+ bt_self_component_source *self_component,
+ bt_self_component_port_output *self_port);
static inline
-struct bt_component_class *bt_component_class_source_as_component_class(
- struct bt_component_class_source *comp_cls_source)
+bt_component_class *bt_component_class_source_as_component_class(
+ bt_component_class_source *comp_cls_source)
{
return (void *) comp_cls_source;
}
extern
-struct bt_component_class_source *bt_component_class_source_create(
+bt_component_class_source *bt_component_class_source_create(
const char *name,
bt_component_class_source_notification_iterator_next_method method);
extern int bt_component_class_source_set_init_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_init_method method);
extern int bt_component_class_source_set_finalize_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_finalize_method method);
extern int bt_component_class_source_set_accept_output_port_connection_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_accept_output_port_connection_method method);
extern int bt_component_class_source_set_output_port_connected_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_output_port_connected_method method);
extern int bt_component_class_source_set_output_port_disconnected_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_output_port_disconnected_method method);
extern int bt_component_class_source_set_query_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_query_method method);
extern int bt_component_class_source_set_notification_iterator_init_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_notification_iterator_init_method method);
extern int bt_component_class_source_set_notification_iterator_finalize_method(
- struct bt_component_class_source *comp_class,
+ bt_component_class_source *comp_class,
bt_component_class_source_notification_iterator_finalize_method method);
#ifdef __cplusplus
/* For enum bt_query_executor_status */
#include <babeltrace/graph/query-executor-const.h>
+/* For bt_component_class */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-
enum bt_query_status {
BT_QUERY_STATUS_OK = BT_QUERY_EXECUTOR_STATUS_OK,
BT_QUERY_STATUS_AGAIN = BT_QUERY_EXECUTOR_STATUS_AGAIN,
};
extern int bt_component_class_set_description(
- struct bt_component_class *component_class,
+ bt_component_class *component_class,
const char *description);
extern int bt_component_class_set_help(
- struct bt_component_class *component_class,
+ bt_component_class *component_class,
const char *help);
#ifdef __cplusplus
/* For enum bt_component_class_type */
#include <babeltrace/graph/component-class-const.h>
-/* For bt_bool */
+/*
+ * For bt_bool, bt_component_class, bt_component_graph, bt_component,
+ * bt_value, bt_port
+ */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class;
-struct bt_component_graph;
-struct bt_component;
-struct bt_value;
-struct bt_port;
-
/**
* Get component's name.
*
* @param component Component instance of which to get the name
* @returns Returns a pointer to the component's name
*/
-extern const char *bt_component_get_name(const struct bt_component *component);
+extern const char *bt_component_get_name(const bt_component *component);
/**
* Get component's class.
* @param component Component instance of which to get the class
* @returns The component's class
*/
-extern const struct bt_component_class *bt_component_borrow_class_const(
- const struct 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(
- const struct bt_component *component);
+ const bt_component *component);
static inline
-bt_bool bt_component_is_source(const struct bt_component *component)
+bt_bool bt_component_is_source(const bt_component *component)
{
return bt_component_get_class_type(component) ==
BT_COMPONENT_CLASS_TYPE_SOURCE;
}
static inline
-bt_bool bt_component_is_filter(const struct bt_component *component)
+bt_bool bt_component_is_filter(const bt_component *component)
{
return bt_component_get_class_type(component) ==
BT_COMPONENT_CLASS_TYPE_FILTER;
}
static inline
-bt_bool bt_component_is_sink(const struct bt_component *component)
+bt_bool bt_component_is_sink(const bt_component *component)
{
return bt_component_get_class_type(component) ==
BT_COMPONENT_CLASS_TYPE_SINK;
}
extern bt_bool bt_component_graph_is_canceled(
- const struct bt_component *component);
+ const bt_component *component);
-extern void bt_component_get_ref(const struct bt_component *component);
+extern void bt_component_get_ref(const bt_component *component);
-extern void bt_component_put_ref(const struct bt_component *component);
+extern void bt_component_put_ref(const bt_component *component);
#define BT_COMPONENT_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
+/* For bt_component, bt_component_filter, bt_port_input, bt_port_output */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component;
-struct bt_component_filter;
-struct bt_port_input;
-struct bt_port_output;
-
static inline
-const struct bt_component *bt_component_filter_as_component_const(
- const struct bt_component_filter *component)
+const bt_component *bt_component_filter_as_component_const(
+ const bt_component_filter *component)
{
return (const void *) component;
}
extern uint64_t bt_component_filter_get_input_port_count(
- const struct bt_component_filter *component);
+ const bt_component_filter *component);
-extern const struct bt_port_input *
+extern const bt_port_input *
bt_component_filter_borrow_input_port_by_name_const(
- const struct bt_component_filter *component, const char *name);
+ const bt_component_filter *component, const char *name);
-extern const struct bt_port_input *
+extern const bt_port_input *
bt_component_filter_borrow_input_port_by_index_const(
- const struct bt_component_filter *component, uint64_t index);
+ const bt_component_filter *component, uint64_t index);
extern uint64_t bt_component_filter_get_output_port_count(
- const struct bt_component_filter *component);
+ const bt_component_filter *component);
-extern const struct bt_port_output *
+extern const bt_port_output *
bt_component_filter_borrow_output_port_by_name_const(
- const struct bt_component_filter *component, const char *name);
+ const bt_component_filter *component, const char *name);
-extern const struct bt_port_output *
+extern const bt_port_output *
bt_component_filter_borrow_output_port_by_index_const(
- const struct bt_component_filter *component, uint64_t index);
+ const bt_component_filter *component, uint64_t index);
extern void bt_component_filter_get_ref(
- const struct bt_component_filter *component_filter);
+ const bt_component_filter *component_filter);
extern void bt_component_filter_put_ref(
- const struct bt_component_filter *component_filter);
+ const bt_component_filter *component_filter);
#define BT_COMPONENT_FILTER_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
+/* For bt_component, bt_component_filter, bt_port_input */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component;
-struct bt_component_sink;
-struct bt_port_input;
-
static inline
-const struct bt_component *bt_component_sink_as_component_const(
- const struct bt_component_sink *component)
+const bt_component *bt_component_sink_as_component_const(
+ const bt_component_sink *component)
{
return (const void *) component;
}
extern uint64_t bt_component_sink_get_input_port_count(
- const struct bt_component_sink *component);
+ const bt_component_sink *component);
-extern const struct bt_port_input *
+extern const bt_port_input *
bt_component_sink_borrow_input_port_by_name_const(
- const struct bt_component_sink *component, const char *name);
+ const bt_component_sink *component, const char *name);
-extern const struct bt_port_input *
+extern const bt_port_input *
bt_component_sink_borrow_input_port_by_index_const(
- const struct bt_component_sink *component, uint64_t index);
+ const bt_component_sink *component, uint64_t index);
extern void bt_component_sink_get_ref(
- const struct bt_component_sink *component_sink);
+ const bt_component_sink *component_sink);
extern void bt_component_sink_put_ref(
- const struct bt_component_sink *component_sink);
+ const bt_component_sink *component_sink);
#define BT_COMPONENT_SINK_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
+/* For bt_component, bt_component_filter, bt_port_output */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component;
-struct bt_component_source;
-struct bt_port_output;
-
static inline
-const struct bt_component *bt_component_source_as_component_const(
- const struct bt_component_source *component)
+const bt_component *bt_component_source_as_component_const(
+ const bt_component_source *component)
{
return (void *) component;
}
extern uint64_t bt_component_source_get_output_port_count(
- const struct bt_component_source *component);
+ const bt_component_source *component);
-extern const struct bt_port_output *
+extern const bt_port_output *
bt_component_source_borrow_output_port_by_name_const(
- const struct bt_component_source *component, const char *name);
+ const bt_component_source *component, const char *name);
-extern const struct bt_port_output *
+extern const bt_port_output *
bt_component_source_borrow_output_port_by_index_const(
- const struct bt_component_source *component, uint64_t index);
+ const bt_component_source *component, uint64_t index);
extern void bt_component_source_get_ref(
- const struct bt_component_source *component_source);
+ const bt_component_source *component_source);
extern void bt_component_source_put_ref(
- const struct bt_component_source *component_source);
+ const bt_component_source *component_source);
#define BT_COMPONENT_SOURCE_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
-/* For bt_bool */
+/* For bt_bool, bt_port_input, bt_port_output, bt_connection */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port_input;
-struct bt_port_output;
-struct bt_connection;
+extern const bt_port_input *bt_connection_borrow_downstream_port_const(
+ const bt_connection *connection);
-extern const struct bt_port_input *bt_connection_borrow_downstream_port_const(
- const struct bt_connection *connection);
+extern const bt_port_output *bt_connection_borrow_upstream_port_const(
+ const bt_connection *connection);
-extern const struct bt_port_output *bt_connection_borrow_upstream_port_const(
- const struct bt_connection *connection);
+extern bt_bool bt_connection_is_ended(const bt_connection *connection);
-extern bt_bool bt_connection_is_ended(const struct bt_connection *connection);
+extern void bt_connection_get_ref(const bt_connection *connection);
-extern void bt_connection_get_ref(const struct bt_connection *connection);
-
-extern void bt_connection_put_ref(const struct bt_connection *connection);
+extern void bt_connection_put_ref(const bt_connection *connection);
#define BT_CONNECTION_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
-/* For bt_bool */
+/* For bt_bool, bt_graph */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_graph;
-
enum bt_graph_status {
BT_GRAPH_STATUS_OK = 0,
BT_GRAPH_STATUS_END = 1,
BT_GRAPH_STATUS_NOMEM = -12,
};
-extern bt_bool bt_graph_is_canceled(const struct bt_graph *graph);
+extern bt_bool bt_graph_is_canceled(const bt_graph *graph);
-extern void bt_graph_get_ref(const struct bt_graph *graph);
+extern void bt_graph_get_ref(const bt_graph *graph);
-extern void bt_graph_put_ref(const struct bt_graph *graph);
+extern void bt_graph_put_ref(const bt_graph *graph);
#define BT_GRAPH_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
-/* For bt_bool */
+/*
+ * For bt_bool, bt_component, bt_component_class,
+ * bt_component_class_filter, bt_component_class_sink,
+ * bt_component_class_source, bt_component_filter, bt_component_sink,
+ * bt_component_source, bt_connection, bt_graph, bt_port_input,
+ * bt_port_output, bt_value
+ */
#include <babeltrace/types.h>
/* For enum bt_graph_status */
extern "C" {
#endif
-struct bt_component;
-struct bt_component_class;
-struct bt_component_class_filter;
-struct bt_component_class_sink;
-struct bt_component_class_source;
-struct bt_component_filter;
-struct bt_component_sink;
-struct bt_component_source;
-struct bt_connection;
-struct bt_graph;
-struct bt_port_input;
-struct bt_port_output;
-struct bt_value;
-
typedef void (*bt_graph_filter_component_input_port_added_listener_func)(
- const struct bt_component_filter *component,
- const struct bt_port_input *port, void *data);
+ const bt_component_filter *component,
+ const bt_port_input *port, void *data);
typedef void (*bt_graph_sink_component_input_port_added_listener_func)(
- const struct bt_component_sink *component,
- const struct bt_port_input *port, void *data);
+ const bt_component_sink *component,
+ const bt_port_input *port, void *data);
typedef void (*bt_graph_source_component_output_port_added_listener_func)(
- const struct bt_component_source *component,
- const struct bt_port_output *port, void *data);
+ const bt_component_source *component,
+ const bt_port_output *port, void *data);
typedef void (*bt_graph_filter_component_output_port_added_listener_func)(
- const struct bt_component_filter *component,
- const struct bt_port_output *port, void *data);
+ const bt_component_filter *component,
+ const bt_port_output *port, void *data);
typedef void (*bt_graph_filter_component_input_port_removed_listener_func)(
- const struct bt_component_filter *component,
- const struct bt_port_input *port, void *data);
+ const bt_component_filter *component,
+ const bt_port_input *port, void *data);
typedef void (*bt_graph_sink_component_input_port_removed_listener_func)(
- const struct bt_component_sink *component,
- const struct bt_port_input *port, void *data);
+ const bt_component_sink *component,
+ const bt_port_input *port, void *data);
typedef void (*bt_graph_source_component_output_port_removed_listener_func)(
- const struct bt_component_source *component,
- const struct bt_port_output *port, void *data);
+ const bt_component_source *component,
+ const bt_port_output *port, void *data);
typedef void (*bt_graph_filter_component_output_port_removed_listener_func)(
- const struct bt_component_filter *component,
- const struct bt_port_output *port, void *data);
+ const bt_component_filter *component,
+ const bt_port_output *port, void *data);
typedef void (*bt_graph_source_filter_component_ports_connected_listener_func)(
- const struct bt_component_source *source_component,
- const struct bt_component_filter *filter_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port, void *data);
+ const bt_component_source *source_component,
+ const bt_component_filter *filter_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port, void *data);
typedef void (*bt_graph_source_sink_component_ports_connected_listener_func)(
- const struct bt_component_source *source_component,
- const struct bt_component_sink *sink_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port, void *data);
+ const bt_component_source *source_component,
+ const bt_component_sink *sink_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port, void *data);
typedef void (*bt_graph_filter_sink_component_ports_connected_listener_func)(
- const struct bt_component_filter *filter_component,
- const struct bt_component_sink *sink_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port, void *data);
+ const bt_component_filter *filter_component,
+ const bt_component_sink *sink_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port, void *data);
typedef void (*bt_graph_source_filter_component_ports_disconnected_listener_func)(
- const struct bt_component_source *source_component,
- const struct bt_component_filter *filter_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port,
+ const bt_component_source *source_component,
+ const bt_component_filter *filter_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port,
void *data);
typedef void (*bt_graph_source_sink_component_ports_disconnected_listener_func)(
- const struct bt_component_source *source_component,
- const struct bt_component_sink *sink_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port,
+ const bt_component_source *source_component,
+ const bt_component_sink *sink_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port,
void *data);
typedef void (*bt_graph_filter_sink_component_ports_disconnected_listener_func)(
- const struct bt_component_filter *filter_component,
- const struct bt_component_sink *sink_component,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port,
+ const bt_component_filter *filter_component,
+ const bt_component_sink *sink_component,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port,
void *data);
typedef void (* bt_graph_listener_removed_func)(void *data);
-extern struct bt_graph *bt_graph_create(void);
+extern bt_graph *bt_graph_create(void);
extern enum bt_graph_status bt_graph_add_source_component(
- struct bt_graph *graph,
- const struct bt_component_class_source *component_class,
- const char *name, const struct bt_value *params,
- const struct bt_component_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(
- struct bt_graph *graph,
- const struct bt_component_class_source *component_class,
- const char *name, const struct bt_value *params,
+ bt_graph *graph,
+ const bt_component_class_source *component_class,
+ const char *name, const bt_value *params,
void *init_method_data,
- const struct bt_component_source **component);
+ const bt_component_source **component);
extern enum bt_graph_status bt_graph_add_filter_component(
- struct bt_graph *graph,
- const struct bt_component_class_filter *component_class,
- const char *name, const struct bt_value *params,
- const struct bt_component_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(
- struct bt_graph *graph,
- const struct bt_component_class_filter *component_class,
- const char *name, const struct bt_value *params,
+ bt_graph *graph,
+ const bt_component_class_filter *component_class,
+ const char *name, const bt_value *params,
void *init_method_data,
- const struct bt_component_filter **component);
+ const bt_component_filter **component);
extern enum bt_graph_status bt_graph_add_sink_component(
- struct bt_graph *graph,
- const struct bt_component_class_sink *component_class,
- const char *name, const struct bt_value *params,
- const struct bt_component_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(
- struct bt_graph *graph,
- const struct bt_component_class_sink *component_class,
- const char *name, const struct bt_value *params,
+ bt_graph *graph,
+ const bt_component_class_sink *component_class,
+ const char *name, const bt_value *params,
void *init_method_data,
- const struct bt_component_sink **component);
+ const bt_component_sink **component);
extern enum bt_graph_status bt_graph_connect_ports(
- struct bt_graph *graph,
- const struct bt_port_output *upstream,
- const struct bt_port_input *downstream,
- const struct bt_connection **connection);
+ 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(struct bt_graph *graph);
+extern enum bt_graph_status bt_graph_run(bt_graph *graph);
extern enum bt_graph_status bt_graph_consume(
- struct bt_graph *graph);
+ bt_graph *graph);
extern enum bt_graph_status
bt_graph_add_filter_component_input_port_added_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_sink_component_input_port_added_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_component_output_port_added_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_filter_component_output_port_added_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_filter_component_input_port_removed_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_sink_component_input_port_removed_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_component_output_port_removed_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_filter_component_output_port_removed_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_filter_component_ports_connected_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_sink_component_ports_connected_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_filter_sink_component_ports_connected_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_filter_component_ports_disconnected_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_source_sink_component_ports_disconnected_listener(
- struct bt_graph *graph,
+ 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
bt_graph_add_filter_sink_component_ports_disconnected_listener(
- struct bt_graph *graph,
+ 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(struct bt_graph *graph);
+extern enum bt_graph_status bt_graph_cancel(bt_graph *graph);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_notification */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-
-typedef const struct bt_notification **bt_notification_array_const;
-
/**
* Notification types. Unhandled notification types should be ignored.
*/
* @returns One of #bt_notification_type
*/
extern enum bt_notification_type bt_notification_get_type(
- const struct bt_notification *notification);
+ const bt_notification *notification);
-extern void bt_notification_get_ref(const struct bt_notification *notification);
+extern void bt_notification_get_ref(const bt_notification *notification);
-extern void bt_notification_put_ref(const struct bt_notification *notification);
+extern void bt_notification_put_ref(const bt_notification *notification);
#define BT_NOTIFICATION_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
+/* For bt_notification, bt_event */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_event;
-
-extern const struct bt_event *bt_notification_event_borrow_event_const(
- const struct bt_notification *notification);
+extern const bt_event *bt_notification_event_borrow_event_const(
+ const bt_notification *notification);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/*
+ * For bt_self_notification_iterator, bt_event, bt_packet,
+ * bt_event_class, bt_notification
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_self_notification_iterator;
-struct bt_event;
-struct bt_packet;
-struct bt_event_class;
-
extern
-struct bt_notification *bt_notification_event_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_event_class *event_class,
- struct bt_packet *packet);
+bt_notification *bt_notification_event_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_event_class *event_class,
+ bt_packet *packet);
-extern struct bt_event *bt_notification_event_borrow_event(
- struct bt_notification *notification);
+extern bt_event *bt_notification_event_borrow_event(
+ bt_notification *notification);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_notification, bt_clock_value */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_clock_value;
-
-extern const struct bt_clock_value *
+extern const bt_clock_value *
bt_notification_inactivity_borrow_default_clock_value_const(
- const struct bt_notification *notif);
+ const bt_notification *notif);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_self_notification_iterator, bt_notification, bt_clock_class */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_self_notification_iterator;
-struct bt_clock_class;
-
extern
-struct bt_notification *bt_notification_inactivity_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_clock_class *default_clock_class);
+bt_notification *bt_notification_inactivity_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_clock_class *default_clock_class);
extern void bt_notification_inactivity_set_default_clock_value(
- struct bt_notification *notif, uint64_t raw_value);
+ bt_notification *notif, uint64_t raw_value);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_notification, bt_notification_iterator */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_notification_iterator;
-
enum bt_notification_iterator_status {
BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
* SOFTWARE.
*/
+/* For bt_notification, bt_packet */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_packet;
-
-extern const struct bt_packet *bt_notification_packet_beginning_borrow_packet_const(
- const struct bt_notification *notification);
+extern const bt_packet *bt_notification_packet_beginning_borrow_packet_const(
+ const bt_notification *notification);
-extern const struct bt_packet *bt_notification_packet_end_borrow_packet_const(
- const struct bt_notification *notification);
+extern const bt_packet *bt_notification_packet_end_borrow_packet_const(
+ const bt_notification *notification);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_notification, bt_self_notification_iterator, bt_packet */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_self_notification_iterator;
-struct bt_packet;
-
extern
-struct bt_notification *bt_notification_packet_beginning_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_packet *packet);
+bt_notification *bt_notification_packet_beginning_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_packet *packet);
extern
-struct bt_notification *bt_notification_packet_end_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_packet *packet);
+bt_notification *bt_notification_packet_end_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_packet *packet);
-extern struct bt_packet *bt_notification_packet_beginning_borrow_packet(
- struct bt_notification *notification);
+extern bt_packet *bt_notification_packet_beginning_borrow_packet(
+ bt_notification *notification);
-extern struct bt_packet *bt_notification_packet_end_borrow_packet(
- struct bt_notification *notification);
+extern bt_packet *bt_notification_packet_end_borrow_packet(
+ bt_notification *notification);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_notification, bt_clock_value, bt_stream */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_self_notification_iterator;
-struct bt_clock_value;
-struct bt_stream;
-
-extern const struct bt_stream *bt_notification_stream_beginning_borrow_stream_const(
- const struct bt_notification *notification);
+extern const bt_stream *bt_notification_stream_beginning_borrow_stream_const(
+ const bt_notification *notification);
-extern const struct bt_clock_value *
+extern const bt_clock_value *
bt_notification_stream_beginning_borrow_default_clock_value_const(
- const struct bt_notification *notif);
+ const bt_notification *notif);
-extern const struct bt_stream *bt_notification_stream_end_borrow_stream_const(
- const struct bt_notification *notification);
+extern const bt_stream *bt_notification_stream_end_borrow_stream_const(
+ const bt_notification *notification);
-extern const struct bt_clock_value *
+extern const bt_clock_value *
bt_notification_stream_end_borrow_default_clock_value_const(
- const struct bt_notification *notif);
+ const bt_notification *notif);
#ifdef __cplusplus
}
* SOFTWARE.
*/
-#include <stdint.h>
+/* For bt_notification, bt_self_notification_iterator, bt_stream */
+#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_notification;
-struct bt_self_notification_iterator;
-struct bt_stream;
-
extern
-struct bt_notification *bt_notification_stream_beginning_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_stream *stream);
+bt_notification *bt_notification_stream_beginning_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_stream *stream);
extern
-struct bt_notification *bt_notification_stream_end_create(
- struct bt_self_notification_iterator *notification_iterator,
- struct bt_stream *stream);
+bt_notification *bt_notification_stream_end_create(
+ bt_self_notification_iterator *notification_iterator,
+ bt_stream *stream);
-extern struct bt_stream *bt_notification_stream_beginning_borrow_stream(
- struct bt_notification *notification);
+extern bt_stream *bt_notification_stream_beginning_borrow_stream(
+ bt_notification *notification);
extern void bt_notification_stream_beginning_set_default_clock_value(
- struct bt_notification *notif, uint64_t value_cycles);
+ bt_notification *notif, uint64_t value_cycles);
-extern struct bt_stream *bt_notification_stream_end_borrow_stream(
- struct bt_notification *notification);
+extern bt_stream *bt_notification_stream_end_borrow_stream(
+ bt_notification *notification);
extern void bt_notification_stream_end_set_default_clock_value(
- struct bt_notification *notif, uint64_t value_cycles);
+ bt_notification *notif, uint64_t value_cycles);
#ifdef __cplusplus
}
#include <stdint.h>
-/* For bt_bool */
+/* For bt_bool, bt_port, bt_connection, bt_component */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port;
-struct bt_connection;
-struct bt_component;
-
enum bt_port_type {
BT_PORT_TYPE_INPUT = 0,
BT_PORT_TYPE_OUTPUT = 1,
};
-extern const char *bt_port_get_name(const struct bt_port *port);
+extern const char *bt_port_get_name(const bt_port *port);
-extern enum bt_port_type bt_port_get_type(const struct bt_port *port);
+extern enum bt_port_type bt_port_get_type(const bt_port *port);
-extern const struct bt_connection *bt_port_borrow_connection_const(
- const struct bt_port *port);
+extern const bt_connection *bt_port_borrow_connection_const(
+ const bt_port *port);
-extern const struct bt_component *bt_port_borrow_component_const(
- const struct bt_port *port);
+extern const bt_component *bt_port_borrow_component_const(
+ const bt_port *port);
-extern bt_bool bt_port_is_connected(const struct bt_port *port);
+extern bt_bool bt_port_is_connected(const bt_port *port);
static inline
-bt_bool bt_port_is_input(const struct bt_port *port)
+bt_bool bt_port_is_input(const bt_port *port)
{
return bt_port_get_type(port) == BT_PORT_TYPE_INPUT;
}
static inline
-bt_bool bt_port_is_output(const struct bt_port *port)
+bt_bool bt_port_is_output(const bt_port *port)
{
return bt_port_get_type(port) == BT_PORT_TYPE_OUTPUT;
}
-extern void bt_port_get_ref(const struct bt_port *port);
+extern void bt_port_get_ref(const bt_port *port);
-extern void bt_port_put_ref(const struct bt_port *port);
+extern void bt_port_put_ref(const bt_port *port);
#define BT_PORT_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
+/* For bt_port, bt_port_input */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port;
-struct bt_port_input;
-
static inline
-const struct bt_port *bt_port_input_as_port_const(
- const struct 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;
}
-extern void bt_port_input_get_ref(const struct bt_port_input *port_input);
+extern void bt_port_input_get_ref(const bt_port_input *port_input);
-extern void bt_port_input_put_ref(const struct bt_port_input *port_input);
+extern void bt_port_input_put_ref(const bt_port_input *port_input);
#define BT_PORT_INPUT_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
+/* For bt_port, bt_port_output */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port;
-struct bt_port_output;
-
static inline
-const struct bt_port *bt_port_output_as_port_const(
- const struct 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;
}
-extern void bt_port_output_get_ref(const struct bt_port_output *port_output);
+extern void bt_port_output_get_ref(const bt_port_output *port_output);
-extern void bt_port_output_put_ref(const struct bt_port_output *port_output);
+extern void bt_port_output_put_ref(const bt_port_output *port_output);
#define BT_PORT_OUTPUT_PUT_REF_AND_RESET(_var) \
do { \
/* For enum bt_notification_iterator_status */
#include <babeltrace/graph/notification-iterator.h>
-/* For bt_notification_array_const */
-#include <babeltrace/graph/notification-const.h>
+/*
+ * For bt_port, bt_notification, bt_notification_iterator,
+ * bt_port_output_notification_iterator, bt_graph, bt_port_output,
+ * bt_notification_array_const
+ */
+#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port;
-struct bt_notification;
-struct bt_notification_iterator;
-struct bt_port_output_notification_iterator;
-struct bt_graph;
-struct bt_port_output;
-
static inline
-struct bt_notification_iterator *
+bt_notification_iterator *
bt_port_output_notification_iterator_as_notification_iterator(
- struct bt_port_output_notification_iterator *iterator)
+ bt_port_output_notification_iterator *iterator)
{
return (void *) iterator;
}
-extern struct bt_port_output_notification_iterator *
+extern bt_port_output_notification_iterator *
bt_port_output_notification_iterator_create(
- struct bt_graph *graph,
- const struct bt_port_output *output_port);
+ bt_graph *graph,
+ const bt_port_output *output_port);
extern enum bt_notification_iterator_status
bt_port_output_notification_iterator_next(
- struct bt_port_output_notification_iterator *iterator,
+ bt_port_output_notification_iterator *iterator,
bt_notification_array_const *notifs, uint64_t *count);
extern void bt_port_output_notification_iterator_get_ref(
- const struct bt_port_output_notification_iterator *port_output_notification_iterator);
+ const bt_port_output_notification_iterator *port_output_notification_iterator);
extern void bt_port_output_notification_iterator_put_ref(
- const struct bt_port_output_notification_iterator *port_output_notification_iterator);
+ const bt_port_output_notification_iterator *port_output_notification_iterator);
#define BT_PORT_OUTPUT_NOTIFICATION_ITERATOR_PUT_REF_AND_RESET(_var) \
do { \
* SOFTWARE.
*/
-/* For bt_bool */
+/* For bt_bool, bt_query_executor */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_query_executor;
-
enum bt_query_executor_status {
BT_QUERY_EXECUTOR_STATUS_OK = 0,
BT_QUERY_EXECUTOR_STATUS_AGAIN = 11,
extern
bt_bool bt_query_executor_is_canceled(
- const struct bt_query_executor *query_executor);
+ const bt_query_executor *query_executor);
extern void bt_query_executor_get_ref(
- const struct bt_query_executor *query_executor);
+ const bt_query_executor *query_executor);
extern void bt_query_executor_put_ref(
- const struct bt_query_executor *query_executor);
+ const bt_query_executor *query_executor);
#define BT_QUERY_EXECUTOR_PUT_REF_AND_RESET(_var) \
do { \
/* For enum bt_query_executor_status */
#include <babeltrace/graph/query-executor.h>
+/* For bt_query_executor, bt_component_class, bt_value */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_query_executor;
-struct bt_component_class;
-struct bt_value;
-
extern
-struct bt_query_executor *bt_query_executor_create(void);
+bt_query_executor *bt_query_executor_create(void);
extern
enum bt_query_executor_status bt_query_executor_query(
- struct bt_query_executor *query_executor,
- const struct bt_component_class *component_class,
- const char *object, const struct bt_value *params,
- const struct bt_value **result);
+ 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(
- struct bt_query_executor *query_executor);
+ bt_query_executor *query_executor);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_component_class_filter, bt_self_component_class_filter */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class_filter;
-struct bt_self_component_class_filter;
-
static inline
-const struct bt_component_class_filter *
+const bt_component_class_filter *
bt_self_component_class_filter_as_component_class_filter(
- struct bt_self_component_class_filter *self_comp_cls_filter)
+ bt_self_component_class_filter *self_comp_cls_filter)
{
return (const void *) self_comp_cls_filter;
}
* SOFTWARE.
*/
+/* For bt_component_class_sink, bt_self_component_class_sink */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class_sink;
-struct bt_self_component_class_sink;
-
static inline
-const struct bt_component_class_sink *
+const bt_component_class_sink *
bt_self_component_class_sink_as_component_class_sink(
- struct bt_self_component_class_sink *self_comp_cls_sink)
+ bt_self_component_class_sink *self_comp_cls_sink)
{
return (const void *) self_comp_cls_sink;
}
* SOFTWARE.
*/
+/* For bt_component_class_source, bt_self_component_class_source */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_class_source;
-struct bt_self_component_class_source;
-
static inline
-const struct bt_component_class_source *
+const bt_component_class_source *
bt_self_component_class_source_as_component_class_source(
- struct bt_self_component_class_source *self_comp_cls_source)
+ bt_self_component_class_source *self_comp_cls_source)
{
return (const void *) self_comp_cls_source;
}
/* For enum bt_self_component_status */
#include <babeltrace/graph/self-component.h>
+/*
+ * For bt_component_filter, bt_self_component, bt_self_component_filter,
+ * bt_self_component_port_input, bt_self_component_port_output
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_filter;
-struct bt_self_component;
-struct bt_self_component_filter;
-struct bt_self_component_port_input;
-struct bt_self_component_port_output;
-
static inline
-struct bt_self_component *bt_self_component_filter_as_self_component(
- struct bt_self_component_filter *self_comp_filter)
+bt_self_component *bt_self_component_filter_as_self_component(
+ bt_self_component_filter *self_comp_filter)
{
return (void *) self_comp_filter;
}
static inline
-const struct bt_component_filter *
+const bt_component_filter *
bt_self_component_filter_as_component_filter(
- struct bt_self_component_filter *self_comp_filter)
+ bt_self_component_filter *self_comp_filter)
{
return (const void *) self_comp_filter;
}
-extern struct bt_component_filter *bt_component_filter_borrow_from_self(
- struct bt_self_component_filter *self_component);
+extern bt_component_filter *bt_component_filter_borrow_from_self(
+ bt_self_component_filter *self_component);
-extern struct bt_self_component_port_output *
+extern bt_self_component_port_output *
bt_self_component_filter_borrow_output_port_by_name(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
const char *name);
-extern struct bt_self_component_port_output *
+extern bt_self_component_port_output *
bt_self_component_filter_borrow_output_port_by_index(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
uint64_t index);
extern enum bt_self_component_status
bt_self_component_filter_add_output_port(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
const char *name, void *data,
- struct bt_self_component_port_output **self_component_port);
+ bt_self_component_port_output **self_component_port);
-extern struct bt_self_component_port_input *
+extern bt_self_component_port_input *
bt_self_component_filter_borrow_input_port_by_name(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
const char *name);
-extern struct bt_self_component_port_input *
+extern bt_self_component_port_input *
bt_self_component_filter_borrow_input_port_by_index(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
uint64_t index);
extern enum bt_self_component_status
bt_self_component_filter_add_input_port(
- struct bt_self_component_filter *self_component,
+ bt_self_component_filter *self_component,
const char *name, void *data,
- struct bt_self_component_port_input **self_component_port);
+ bt_self_component_port_input **self_component_port);
#ifdef __cplusplus
}
/* For enum bt_notification_iterator_status */
#include <babeltrace/graph/notification-iterator.h>
-/* For bt_notification_array_const */
-#include <babeltrace/graph/notification-const.h>
+/*
+ * For bt_component, bt_notification_iterator,
+ * bt_self_component_port_input_notification_iterator,
+ * bt_self_component_port_input, bt_notification_array_const
+ */
+#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component;
-struct bt_notification_iterator;
-struct bt_self_component_port_input_notification_iterator;
-struct bt_self_component_port_input;
-
static inline
-struct bt_notification_iterator *
+bt_notification_iterator *
bt_self_component_port_input_notification_iterator_as_notification_iterator(
- struct bt_self_component_port_input_notification_iterator *iterator)
+ bt_self_component_port_input_notification_iterator *iterator)
{
return (void *) iterator;
}
-extern struct bt_self_component_port_input_notification_iterator *
+extern bt_self_component_port_input_notification_iterator *
bt_self_component_port_input_notification_iterator_create(
- struct bt_self_component_port_input *input_port);
+ bt_self_component_port_input *input_port);
-extern struct bt_component *
+extern bt_component *
bt_self_component_port_input_notification_iterator_borrow_component(
- struct bt_self_component_port_input_notification_iterator *iterator);
+ bt_self_component_port_input_notification_iterator *iterator);
extern enum bt_notification_iterator_status
bt_self_component_port_input_notification_iterator_next(
- struct bt_self_component_port_input_notification_iterator *iterator,
+ bt_self_component_port_input_notification_iterator *iterator,
bt_notification_array_const *notifs, uint64_t *count);
extern void bt_self_component_port_input_notification_iterator_get_ref(
- const struct bt_self_component_port_input_notification_iterator *self_component_port_input_notification_iterator);
+ const bt_self_component_port_input_notification_iterator *self_component_port_input_notification_iterator);
extern void bt_self_component_port_input_notification_iterator_put_ref(
- const struct bt_self_component_port_input_notification_iterator *self_component_port_input_notification_iterator);
+ const bt_self_component_port_input_notification_iterator *self_component_port_input_notification_iterator);
#define BT_SELF_COMPONENT_PORT_INPUT_NOTIFICATION_ITERATOR_PUT_REF_AND_RESET(_var) \
do { \
/* For enum bt_self_component_port_status */
#include <babeltrace/graph/self-component-port.h>
+/*
+ * For bt_port_input, bt_self_component_port,
+ * bt_self_component_port_input
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port_input;
-struct bt_self_component_port;
-struct bt_self_component_port_input;
-
static inline
-struct bt_self_component_port *
+bt_self_component_port *
bt_self_component_port_input_as_self_component_port(
- struct bt_self_component_port_input *self_component_port)
+ bt_self_component_port_input *self_component_port)
{
return (void *) self_component_port;
}
static inline
-const struct bt_port_input *bt_self_component_port_input_as_port_input(
- const struct bt_self_component_port_input *self_component_port)
+const bt_port_input *bt_self_component_port_input_as_port_input(
+ const bt_self_component_port_input *self_component_port)
{
return (const void *) self_component_port;
}
/* For enum bt_self_component_port_status */
#include <babeltrace/graph/self-component-port.h>
+/*
+ * For bt_port_output, bt_self_component_port,
+ * bt_self_component_port_output
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port_output;
-struct bt_self_component_port;
-struct bt_self_component_port_output;
-
static inline
-struct bt_self_component_port *
+bt_self_component_port *
bt_self_component_port_output_as_self_component_port(
- struct bt_self_component_port_output *self_component_port)
+ bt_self_component_port_output *self_component_port)
{
return (void *) self_component_port;
}
static inline
-const struct bt_port_output *bt_self_component_port_output_as_port_output(
- struct bt_self_component_port_output *self_component_port)
+const bt_port_output *bt_self_component_port_output_as_port_output(
+ bt_self_component_port_output *self_component_port)
{
return (const void *) self_component_port;
}
* SOFTWARE.
*/
+/*
+ * For bt_port, bt_self_component_port, bt_self_component, bt_connection
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port;
-struct bt_self_component_port;
-struct bt_self_component;
-struct bt_connection;
-
enum bt_self_component_port_status {
BT_SELF_PORT_STATUS_OK = 0,
};
static inline
-const struct bt_port *bt_self_component_port_as_port(
- struct bt_self_component_port *self_port)
+const bt_port *bt_self_component_port_as_port(
+ bt_self_component_port *self_port)
{
return (const void *) self_port;
}
-extern struct bt_self_component *bt_self_component_port_borrow_component(
- struct bt_self_component_port *self_port);
+extern bt_self_component *bt_self_component_port_borrow_component(
+ bt_self_component_port *self_port);
extern enum bt_self_component_port_status
bt_self_component_port_remove_from_component(
- struct bt_self_component_port *self_port);
+ bt_self_component_port *self_port);
extern void *bt_self_component_port_get_data(
- const struct bt_self_component_port *self_port);
+ const bt_self_component_port *self_port);
#ifdef __cplusplus
}
/* For enum bt_self_component_status */
#include <babeltrace/graph/self-component.h>
+/*
+ * For bt_component_sink, bt_self_component, bt_self_component_sink,
+ * bt_self_component_port_input
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_sink;
-struct bt_self_component;
-struct bt_self_component_sink;
-struct bt_self_component_port_input;
-
static inline
-struct bt_self_component *bt_self_component_sink_as_self_component(
- struct bt_self_component_sink *self_comp_sink)
+bt_self_component *bt_self_component_sink_as_self_component(
+ bt_self_component_sink *self_comp_sink)
{
return (void *) self_comp_sink;
}
static inline
-const struct bt_component_sink *
+const bt_component_sink *
bt_self_component_sink_as_component_sink(
- struct bt_self_component_sink *self_comp_sink)
+ bt_self_component_sink *self_comp_sink)
{
return (const void *) self_comp_sink;
}
-extern struct bt_self_component_port_input *
+extern bt_self_component_port_input *
bt_self_component_sink_borrow_input_port_by_name(
- struct bt_self_component_sink *self_component,
+ bt_self_component_sink *self_component,
const char *name);
-extern struct bt_self_component_port_input *
+extern bt_self_component_port_input *
bt_self_component_sink_borrow_input_port_by_index(
- struct bt_self_component_sink *self_component, uint64_t index);
+ bt_self_component_sink *self_component, uint64_t index);
extern enum bt_self_component_status
bt_self_component_sink_add_input_port(
- struct bt_self_component_sink *self_component,
+ bt_self_component_sink *self_component,
const char *name, void *user_data,
- struct bt_self_component_port_input **self_component_port);
+ bt_self_component_port_input **self_component_port);
#ifdef __cplusplus
}
/* For enum bt_self_component_status */
#include <babeltrace/graph/self-component.h>
+/*
+ * For bt_component_source, bt_self_component, bt_self_component_source,
+ * bt_self_component_port_output
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component_source;
-struct bt_self_component;
-struct bt_self_component_source;
-struct bt_self_component_port_output;
-
static inline
-struct bt_self_component *bt_self_component_source_as_self_component(
- struct bt_self_component_source *self_comp_source)
+bt_self_component *bt_self_component_source_as_self_component(
+ bt_self_component_source *self_comp_source)
{
return (void *) self_comp_source;
}
static inline
-const struct bt_component_source *
+const bt_component_source *
bt_self_component_source_as_component_source(
- struct bt_self_component_source *self_comp_source)
+ bt_self_component_source *self_comp_source)
{
return (const void *) self_comp_source;
}
-extern struct bt_self_component_port_output *
+extern bt_self_component_port_output *
bt_self_component_source_borrow_output_port_by_name(
- struct bt_self_component_source *self_component,
+ bt_self_component_source *self_component,
const char *name);
-extern struct bt_self_component_port_output *
+extern bt_self_component_port_output *
bt_self_component_source_borrow_output_port_by_index(
- struct bt_self_component_source *self_component,
+ bt_self_component_source *self_component,
uint64_t index);
extern enum bt_self_component_status
bt_self_component_source_add_output_port(
- struct bt_self_component_source *self_component,
+ bt_self_component_source *self_component,
const char *name, void *user_data,
- struct bt_self_component_port_output **self_component_port);
+ bt_self_component_port_output **self_component_port);
#ifdef __cplusplus
}
* SOFTWARE.
*/
+/* For bt_component, bt_self_component */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_component;
-struct bt_self_component;
-
enum bt_self_component_status {
BT_SELF_COMPONENT_STATUS_OK = 0,
BT_SELF_COMPONENT_STATUS_END = 1,
};
static inline
-const struct bt_component *bt_self_component_as_component(
- struct bt_self_component *self_component)
+const bt_component *bt_self_component_as_component(
+ bt_self_component *self_component)
{
return (const void *) self_component;
}
extern void *bt_self_component_get_data(
- const struct bt_self_component *private_component);
+ const bt_self_component *private_component);
extern void bt_self_component_set_data(
- struct bt_self_component *private_component, void *data);
+ bt_self_component *private_component, void *data);
#ifdef __cplusplus
}
/* For BT_NOTIFICATION_ITERATOR_STATUS_* */
#include <babeltrace/graph/notification-iterator.h>
+/* For bt_self_component, bt_self_notification_iterator, bt_self_port_output */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_self_component;
-struct bt_self_notification_iterator;
-
enum bt_self_notification_iterator_status {
BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK = BT_NOTIFICATION_ITERATOR_STATUS_OK,
BT_SELF_NOTIFICATION_ITERATOR_STATUS_END = BT_NOTIFICATION_ITERATOR_STATUS_END,
BT_SELF_NOTIFICATION_ITERATOR_STATUS_NOMEM = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM,
};
-extern struct bt_self_component *
+extern bt_self_component *
bt_self_notification_iterator_borrow_component(
- struct bt_self_notification_iterator *notification_iterator);
+ bt_self_notification_iterator *notification_iterator);
-extern struct bt_self_port_output *
+extern bt_self_port_output *
bt_self_notification_iterator_borrow_port(
- struct bt_self_notification_iterator *notification_iterator);
+ bt_self_notification_iterator *notification_iterator);
extern void bt_self_notification_iterator_set_data(
- struct bt_self_notification_iterator *notification_iterator,
+ bt_self_notification_iterator *notification_iterator,
void *user_data);
extern void *bt_self_notification_iterator_get_data(
- const struct bt_self_notification_iterator *notification_iterator);
+ const bt_self_notification_iterator *notification_iterator);
#ifdef __cplusplus
}
#include <stdint.h>
#include <stddef.h>
-/* For bt_bool */
+/*
+ * For bt_bool, bt_plugin, bt_plugin_set, bt_component_class,
+ * bt_component_class_source, bt_component_class_filter,
+ * bt_component_class_sink
+ */
#include <babeltrace/types.h>
/* For enum bt_component_class_type */
extern "C" {
#endif
-struct bt_plugin;
-struct bt_plugin_set;
-struct bt_component_class;
-struct bt_component_class_source;
-struct bt_component_class_filter;
-struct bt_component_class_sink;
-
enum bt_plugin_status {
BT_PLUGIN_STATUS_OK = 0,
BT_PLUGIN_STATUS_ERROR = -1,
BT_PLUGIN_STATUS_NOMEM = -12,
};
-extern const struct bt_plugin *bt_plugin_find(const char *plugin_name);
+extern const bt_plugin *bt_plugin_find(const char *plugin_name);
-extern const struct bt_plugin_set *bt_plugin_create_all_from_file(
+extern const bt_plugin_set *bt_plugin_create_all_from_file(
const char *path);
-extern const struct bt_plugin_set *bt_plugin_create_all_from_dir(
+extern const bt_plugin_set *bt_plugin_create_all_from_dir(
const char *path, bt_bool recurse);
-extern const struct bt_plugin_set *bt_plugin_create_all_from_static(void);
+extern const bt_plugin_set *bt_plugin_create_all_from_static(void);
-extern const char *bt_plugin_get_name(const struct bt_plugin *plugin);
+extern const char *bt_plugin_get_name(const bt_plugin *plugin);
-extern const char *bt_plugin_get_author(const struct bt_plugin *plugin);
+extern const char *bt_plugin_get_author(const bt_plugin *plugin);
-extern const char *bt_plugin_get_license(const struct bt_plugin *plugin);
+extern const char *bt_plugin_get_license(const bt_plugin *plugin);
-extern const char *bt_plugin_get_description(const struct bt_plugin *plugin);
+extern const char *bt_plugin_get_description(const bt_plugin *plugin);
-extern const char *bt_plugin_get_path(const struct bt_plugin *plugin);
+extern const char *bt_plugin_get_path(const bt_plugin *plugin);
extern enum bt_property_availability bt_plugin_get_version(
- const struct bt_plugin *plugin, unsigned int *major,
+ const bt_plugin *plugin, unsigned int *major,
unsigned int *minor, unsigned int *patch, const char **extra);
extern uint64_t bt_plugin_get_source_component_class_count(
- const struct bt_plugin *plugin);
+ const bt_plugin *plugin);
extern uint64_t bt_plugin_get_filter_component_class_count(
- const struct bt_plugin *plugin);
+ const bt_plugin *plugin);
extern uint64_t bt_plugin_get_sink_component_class_count(
- const struct bt_plugin *plugin);
+ const bt_plugin *plugin);
-extern const struct bt_component_class_source *
+extern const bt_component_class_source *
bt_plugin_borrow_source_component_class_by_index_const_const(
- const struct bt_plugin *plugin, uint64_t index);
+ const bt_plugin *plugin, uint64_t index);
-extern const struct bt_component_class_filter *
+extern const bt_component_class_filter *
bt_plugin_borrow_filter_component_class_by_index_const(
- const struct bt_plugin *plugin, uint64_t index);
+ const bt_plugin *plugin, uint64_t index);
-extern const struct bt_component_class_sink *
+extern const bt_component_class_sink *
bt_plugin_borrow_sink_component_class_by_index_const(
- const struct bt_plugin *plugin, uint64_t index);
+ const bt_plugin *plugin, uint64_t index);
-extern const struct bt_component_class_source *
+extern const bt_component_class_source *
bt_plugin_borrow_source_component_class_by_name_const(
- const struct bt_plugin *plugin, const char *name);
+ const bt_plugin *plugin, const char *name);
-extern const struct bt_component_class_filter *
+extern const bt_component_class_filter *
bt_plugin_borrow_filter_component_class_by_name_const(
- const struct bt_plugin *plugin, const char *name);
+ const bt_plugin *plugin, const char *name);
-extern const struct bt_component_class_sink *
+extern const bt_component_class_sink *
bt_plugin_borrow_sink_component_class_by_name_const(
- const struct bt_plugin *plugin, const char *name);
+ const bt_plugin *plugin, const char *name);
-extern void bt_plugin_get_ref(const struct bt_plugin *plugin);
+extern void bt_plugin_get_ref(const bt_plugin *plugin);
-extern void bt_plugin_put_ref(const struct bt_plugin *plugin);
+extern void bt_plugin_put_ref(const bt_plugin *plugin);
#define BT_PLUGIN_PUT_REF_AND_RESET(_var) \
do { \
/* Plugin initialization function type */
typedef enum bt_plugin_status (*bt_plugin_init_func)(
- const struct bt_plugin *plugin);
+ const bt_plugin *plugin);
/* Plugin exit function type */
typedef enum bt_plugin_status (*bt_plugin_exit_func)(void);
#include <stdint.h>
+/* For bt_plugin, bt_plugin_set */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_plugin;
-struct bt_plugin_set;
-
extern uint64_t bt_plugin_set_get_plugin_count(
- const struct bt_plugin_set *plugin_set);
+ const bt_plugin_set *plugin_set);
-extern const struct bt_plugin *bt_plugin_set_borrow_plugin_by_index_const(
- const struct bt_plugin_set *plugin_set, uint64_t index);
+extern const bt_plugin *bt_plugin_set_borrow_plugin_by_index_const(
+ const bt_plugin_set *plugin_set, uint64_t index);
-extern void bt_plugin_set_get_ref(const struct bt_plugin_set *plugin_set);
+extern void bt_plugin_set_get_ref(const bt_plugin_set *plugin_set);
-extern void bt_plugin_set_put_ref(const struct bt_plugin_set *plugin_set);
+extern void bt_plugin_set_put_ref(const bt_plugin_set *plugin_set);
#define BT_PLUGIN_SET_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
-/* For bt_bool, bt_uuid */
+/* For bt_bool, bt_uuid, bt_clock_class */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_clock_class;
-
extern const char *bt_clock_class_get_name(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
extern const char *bt_clock_class_get_description(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
extern uint64_t bt_clock_class_get_frequency(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
extern uint64_t bt_clock_class_get_precision(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
-extern void bt_clock_class_get_offset(const struct bt_clock_class *clock_class,
+extern void bt_clock_class_get_offset(const bt_clock_class *clock_class,
int64_t *seconds, uint64_t *cycles);
extern bt_bool bt_clock_class_is_absolute(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
extern bt_uuid bt_clock_class_get_uuid(
- const struct bt_clock_class *clock_class);
+ const bt_clock_class *clock_class);
extern int bt_clock_class_cycles_to_ns_from_origin(
- const struct bt_clock_class *clock_class,
+ const bt_clock_class *clock_class,
uint64_t cycles, int64_t *ns_from_origin);
-extern void bt_clock_class_get_ref(const struct bt_clock_class *clock_class);
+extern void bt_clock_class_get_ref(const bt_clock_class *clock_class);
-extern void bt_clock_class_put_ref(const struct bt_clock_class *clock_class);
+extern void bt_clock_class_put_ref(const bt_clock_class *clock_class);
#define BT_CLOCK_CLASS_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
-/* For bt_bool, bt_uuid */
+/* For bt_bool, bt_uuid, bt_clock_class */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_clock_class;
+extern bt_clock_class *bt_clock_class_create(void);
-extern struct bt_clock_class *bt_clock_class_create(void);
-
-extern int bt_clock_class_set_name(struct bt_clock_class *clock_class,
+extern int bt_clock_class_set_name(bt_clock_class *clock_class,
const char *name);
-extern int bt_clock_class_set_description(struct bt_clock_class *clock_class,
+extern int bt_clock_class_set_description(bt_clock_class *clock_class,
const char *description);
-extern void bt_clock_class_set_frequency(struct bt_clock_class *clock_class,
+extern void bt_clock_class_set_frequency(bt_clock_class *clock_class,
uint64_t freq);
-extern void bt_clock_class_set_precision(struct bt_clock_class *clock_class,
+extern void bt_clock_class_set_precision(bt_clock_class *clock_class,
uint64_t precision);
-extern void bt_clock_class_set_offset(struct bt_clock_class *clock_class,
+extern void bt_clock_class_set_offset(bt_clock_class *clock_class,
int64_t seconds, uint64_t cycles);
-extern void bt_clock_class_set_is_absolute(struct bt_clock_class *clock_class,
+extern void bt_clock_class_set_is_absolute(bt_clock_class *clock_class,
bt_bool is_absolute);
-extern void bt_clock_class_set_uuid(struct bt_clock_class *clock_class,
+extern void bt_clock_class_set_uuid(bt_clock_class *clock_class,
bt_uuid uuid);
#ifdef __cplusplus
#include <stdint.h>
+/* For bt_clock_class, bt_clock_value */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_clock_class;
-struct bt_clock_value;
-
enum bt_clock_value_status {
BT_CLOCK_VALUE_STATUS_KNOWN,
BT_CLOCK_VALUE_STATUS_UNKNOWN,
};
-extern const struct bt_clock_class *bt_clock_value_borrow_clock_class_const(
- const struct bt_clock_value *clock_value);
+extern const bt_clock_class *bt_clock_value_borrow_clock_class_const(
+ const bt_clock_value *clock_value);
extern uint64_t bt_clock_value_get_value(
- const struct bt_clock_value *clock_value);
+ const bt_clock_value *clock_value);
extern int bt_clock_value_get_ns_from_origin(
- const struct bt_clock_value *clock_value,
+ const bt_clock_value *clock_value,
int64_t *ns_from_origin);
#ifdef __cplusplus
/* For enum bt_property_availability */
#include <babeltrace/property.h>
+/* For bt_event_class, bt_field_class, bt_stream_class */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#include <stddef.h>
extern "C" {
#endif
-struct bt_event_class;
-struct bt_field_class;
-struct bt_stream_class;
-
enum bt_event_class_log_level {
BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY,
BT_EVENT_CLASS_LOG_LEVEL_ALERT,
BT_EVENT_CLASS_LOG_LEVEL_DEBUG,
};
-extern const struct bt_stream_class *bt_event_class_borrow_stream_class_const(
- const struct bt_event_class *event_class);
+extern const bt_stream_class *bt_event_class_borrow_stream_class_const(
+ const bt_event_class *event_class);
-extern const char *bt_event_class_get_name(const struct bt_event_class *event_class);
+extern const char *bt_event_class_get_name(const bt_event_class *event_class);
-extern uint64_t bt_event_class_get_id(const struct 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(
- const struct bt_event_class *event_class,
+ const bt_event_class *event_class,
enum bt_event_class_log_level *log_level);
extern const char *bt_event_class_get_emf_uri(
- const struct bt_event_class *event_class);
+ const bt_event_class *event_class);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_event_class_borrow_specific_context_field_class(
- const struct bt_event_class *event_class);
+ const bt_event_class *event_class);
-extern const struct bt_field_class *bt_event_class_borrow_payload_field_class(
- const struct bt_event_class *event_class);
+extern const bt_field_class *bt_event_class_borrow_payload_field_class(
+ const bt_event_class *event_class);
-extern void bt_event_class_get_ref(const struct bt_event_class *event_class);
+extern void bt_event_class_get_ref(const bt_event_class *event_class);
-extern void bt_event_class_put_ref(const struct bt_event_class *event_class);
+extern void bt_event_class_put_ref(const bt_event_class *event_class);
#define BT_EVENT_CLASS_PUT_REF_AND_RESET(_var) \
do { \
/* For enum bt_event_class_log_level */
#include <babeltrace/trace-ir/event-class-const.h>
+/* For bt_event_class, bt_stream_class */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_event_class;
-struct bt_stream_class;
-
-extern struct bt_event_class *bt_event_class_create(
- struct bt_stream_class *stream_class);
+extern bt_event_class *bt_event_class_create(
+ bt_stream_class *stream_class);
-extern struct bt_event_class *bt_event_class_create_with_id(
- struct bt_stream_class *stream_class, uint64_t id);
+extern bt_event_class *bt_event_class_create_with_id(
+ bt_stream_class *stream_class, uint64_t id);
-extern struct bt_stream_class *bt_event_class_borrow_stream_class(
- struct bt_event_class *event_class);
+extern bt_stream_class *bt_event_class_borrow_stream_class(
+ bt_event_class *event_class);
-extern int bt_event_class_set_name(struct bt_event_class *event_class,
+extern int bt_event_class_set_name(bt_event_class *event_class,
const char *name);
extern void bt_event_class_set_log_level(
- struct bt_event_class *event_class,
+ bt_event_class *event_class,
enum bt_event_class_log_level log_level);
extern int bt_event_class_set_emf_uri(
- struct bt_event_class *event_class,
+ bt_event_class *event_class,
const char *emf_uri);
extern int bt_event_class_set_specific_context_field_class(
- struct bt_event_class *event_class,
- struct bt_field_class *field_class);
+ bt_event_class *event_class,
+ bt_field_class *field_class);
extern int bt_event_class_set_payload_field_class(
- struct bt_event_class *event_class,
- struct bt_field_class *field_class);
+ bt_event_class *event_class,
+ bt_field_class *field_class);
#ifdef __cplusplus
}
/* For enum bt_clock_value_status */
#include <babeltrace/trace-ir/clock-value-const.h>
+/* For bt_event, bt_clock_value, bt_event_class, bt_field, bt_packet */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_event;
-struct bt_clock_value;
-struct bt_event_class;
-struct bt_field;
-struct bt_packet;
-
-extern const struct bt_event_class *bt_event_borrow_class_const(
- const struct bt_event *event);
+extern const bt_event_class *bt_event_borrow_class_const(
+ const bt_event *event);
-extern const struct bt_packet *bt_event_borrow_packet_const(
- const struct bt_event *event);
+extern const bt_packet *bt_event_borrow_packet_const(
+ const bt_event *event);
-extern const struct bt_stream *bt_event_borrow_stream_const(
- const struct bt_event *event);
+extern const bt_stream *bt_event_borrow_stream_const(
+ const bt_event *event);
-extern const struct bt_field *bt_event_borrow_header_field_const(
- const struct bt_event *event);
+extern const bt_field *bt_event_borrow_header_field_const(
+ const bt_event *event);
-extern const struct bt_field *bt_event_borrow_common_context_field_const(
- const struct bt_event *event);
+extern const bt_field *bt_event_borrow_common_context_field_const(
+ const bt_event *event);
-extern const struct bt_field *bt_event_borrow_specific_context_field_const(
- const struct bt_event *event);
+extern const bt_field *bt_event_borrow_specific_context_field_const(
+ const bt_event *event);
-extern const struct bt_field *bt_event_borrow_payload_field_const(
- const struct bt_event *event);
+extern const bt_field *bt_event_borrow_payload_field_const(
+ const bt_event *event);
extern enum bt_clock_value_status bt_event_borrow_default_clock_value_const(
- const struct bt_event *event,
- const struct bt_clock_value **clock_value);
+ const bt_event *event,
+ const bt_clock_value **clock_value);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
+/* For bt_stream_class, bt_event_header_field, bt_field */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_stream_class;
-struct bt_event_header_field;
-struct bt_field;
-
extern
-struct bt_event_header_field *bt_event_header_field_create(
- struct bt_stream_class *stream_class);
+bt_event_header_field *bt_event_header_field_create(
+ bt_stream_class *stream_class);
extern
-struct bt_field *bt_event_header_field_borrow_field(
- struct bt_event_header_field *field);
+bt_field *bt_event_header_field_borrow_field(
+ bt_event_header_field *field);
extern
-void bt_event_header_field_release(struct bt_event_header_field *field);
+void bt_event_header_field_release(bt_event_header_field *field);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
+/* For bt_event, bt_event_header_field, bt_event_class, bt_field, bt_packet */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_event;
-struct bt_event_header_field;
-struct bt_event_class;
-struct bt_field;
-struct bt_packet;
-
-extern struct bt_event_class *bt_event_borrow_class(struct bt_event *event);
+extern bt_event_class *bt_event_borrow_class(bt_event *event);
-extern struct bt_packet *bt_event_borrow_packet(struct bt_event *event);
+extern bt_packet *bt_event_borrow_packet(bt_event *event);
-extern struct bt_stream *bt_event_borrow_stream(struct bt_event *event);
+extern bt_stream *bt_event_borrow_stream(bt_event *event);
-extern struct bt_field *bt_event_borrow_header_field(struct bt_event *event);
+extern bt_field *bt_event_borrow_header_field(bt_event *event);
-extern int bt_event_move_header_field(struct bt_event *event,
- struct bt_event_header_field *header);
+extern int bt_event_move_header_field(bt_event *event,
+ bt_event_header_field *header);
-extern struct bt_field *
-bt_event_borrow_common_context_field(struct bt_event *event);
+extern bt_field *
+bt_event_borrow_common_context_field(bt_event *event);
-extern struct bt_field *
-bt_event_borrow_specific_context_field(struct bt_event *event);
+extern bt_field *
+bt_event_borrow_specific_context_field(bt_event *event);
-extern struct bt_field *bt_event_borrow_payload_field(struct bt_event *event);
+extern bt_field *bt_event_borrow_payload_field(bt_event *event);
-extern void bt_event_set_default_clock_value(struct bt_event *event,
+extern void bt_event_set_default_clock_value(bt_event *event,
uint64_t value_cycles);
#ifdef __cplusplus
* http://www.efficios.com/ctf
*/
-/* For bt_bool */
+/*
+ * For bt_bool, bt_field_class bt_field_path
+ * bt_field_class_signed_enumeration_mapping_ranges
+ * bt_field_class_unsigned_enumeration_mapping_ranges,
+ * bt_field_class_enumeration_mapping_label_array
+ */
#include <babeltrace/types.h>
#include <stdint.h>
extern "C" {
#endif
-struct bt_field_class;
-struct bt_field_path;
-struct bt_field_class_signed_enumeration_mapping_ranges;
-struct bt_field_class_unsigned_enumeration_mapping_ranges;
-
-typedef const char * const *bt_field_class_enumeration_mapping_label_array;
-
enum bt_field_class_type {
BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER,
BT_FIELD_CLASS_TYPE_SIGNED_INTEGER,
};
extern enum bt_field_class_type bt_field_class_get_type(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern uint64_t bt_field_class_integer_get_field_value_range(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern enum bt_field_class_integer_preferred_display_base
bt_field_class_integer_get_preferred_display_base(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern bt_bool bt_field_class_real_is_single_precision(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern uint64_t bt_field_class_enumeration_get_mapping_count(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern void bt_field_class_unsigned_enumeration_borrow_mapping_by_index_const(
- const struct bt_field_class *field_class, uint64_t index,
+ const bt_field_class *field_class, uint64_t index,
const char **label,
- const struct bt_field_class_unsigned_enumeration_mapping_ranges **ranges);
+ const bt_field_class_unsigned_enumeration_mapping_ranges **ranges);
extern void bt_field_class_signed_enumeration_borrow_mapping_by_index_const(
- const struct bt_field_class *field_class, uint64_t index,
+ const bt_field_class *field_class, uint64_t index,
const char **label,
- const struct bt_field_class_signed_enumeration_mapping_ranges **ranges);
+ const bt_field_class_signed_enumeration_mapping_ranges **ranges);
extern uint64_t
bt_field_class_unsigned_enumeration_mapping_ranges_get_range_count(
- const struct bt_field_class_unsigned_enumeration_mapping_ranges *ranges);
+ const bt_field_class_unsigned_enumeration_mapping_ranges *ranges);
extern uint64_t
bt_field_class_signed_enumeration_mapping_ranges_get_range_count(
- const struct bt_field_class_signed_enumeration_mapping_ranges *ranges);
+ const bt_field_class_signed_enumeration_mapping_ranges *ranges);
extern void
bt_field_class_unsigned_enumeration_mapping_ranges_get_range_by_index(
- const struct bt_field_class_unsigned_enumeration_mapping_ranges *ranges,
+ const bt_field_class_unsigned_enumeration_mapping_ranges *ranges,
uint64_t index, uint64_t *lower, uint64_t *upper);
extern void
bt_field_class_signed_enumeration_mapping_ranges_get_range_by_index(
- const struct bt_field_class_unsigned_enumeration_mapping_ranges *ranges,
+ const bt_field_class_unsigned_enumeration_mapping_ranges *ranges,
uint64_t index, int64_t *lower, int64_t *upper);
extern int bt_field_class_unsigned_enumeration_get_mapping_labels_by_value(
- const struct bt_field_class *field_class, uint64_t value,
+ const bt_field_class *field_class, uint64_t value,
bt_field_class_enumeration_mapping_label_array *label_array,
uint64_t *count);
extern int bt_field_class_signed_enumeration_get_mapping_labels_by_value(
- const struct bt_field_class *field_class, int64_t value,
+ const bt_field_class *field_class, int64_t value,
bt_field_class_enumeration_mapping_label_array *label_array,
uint64_t *count);
extern uint64_t bt_field_class_structure_get_member_count(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern void bt_field_class_structure_borrow_member_by_index_const(
- const struct bt_field_class *struct_field_class, uint64_t index,
- const char **name, const struct bt_field_class **field_class);
+ const bt_field_class *struct_field_class, uint64_t index,
+ const char **name, const bt_field_class **field_class);
extern
-const struct bt_field_class *
+const bt_field_class *
bt_field_class_structure_borrow_member_field_class_by_name_const(
- const struct bt_field_class *field_class, const char *name);
+ const bt_field_class *field_class, const char *name);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_field_class_array_borrow_element_field_class_const(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern uint64_t bt_field_class_static_array_get_length(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
-extern const struct bt_field_path *
+extern const bt_field_path *
bt_field_class_dynamic_array_borrow_length_field_path_const(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
-extern const struct bt_field_path *
+extern const bt_field_path *
bt_field_class_variant_borrow_selector_field_path_const(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern uint64_t bt_field_class_variant_get_option_count(
- const struct bt_field_class *field_class);
+ const bt_field_class *field_class);
extern void bt_field_class_variant_borrow_option_by_index_const(
- const struct bt_field_class *variant_field_class, uint64_t index,
- const char **name, const struct bt_field_class **field_class);
+ const bt_field_class *variant_field_class, uint64_t index,
+ const char **name, const bt_field_class **field_class);
extern
-const struct bt_field_class *
+const bt_field_class *
bt_field_class_variant_borrow_option_field_class_by_name_const(
- const struct bt_field_class *field_class,
+ const bt_field_class *field_class,
const char *name);
-extern void bt_field_class_get_ref(const struct bt_field_class *field_class);
+extern void bt_field_class_get_ref(const bt_field_class *field_class);
-extern void bt_field_class_put_ref(const struct bt_field_class *field_class);
+extern void bt_field_class_put_ref(const bt_field_class *field_class);
#define BT_FIELD_CLASS_PUT_REF_AND_RESET(_var) \
do { \
* http://www.efficios.com/ctf
*/
-/* For bt_bool */
+/* For bt_bool, bt_field_class */
#include <babeltrace/types.h>
/* For enum bt_field_class_integer_preferred_display_base */
extern "C" {
#endif
-struct bt_field_class;
+extern bt_field_class *bt_field_class_unsigned_integer_create(void);
-extern struct bt_field_class *bt_field_class_unsigned_integer_create(void);
-
-extern struct bt_field_class *bt_field_class_signed_integer_create(void);
+extern bt_field_class *bt_field_class_signed_integer_create(void);
extern void bt_field_class_integer_set_field_value_range(
- struct bt_field_class *field_class, uint64_t size);
+ bt_field_class *field_class, uint64_t size);
extern void bt_field_class_integer_set_preferred_display_base(
- struct bt_field_class *field_class,
+ bt_field_class *field_class,
enum bt_field_class_integer_preferred_display_base base);
-extern struct bt_field_class *bt_field_class_real_create(void);
+extern bt_field_class *bt_field_class_real_create(void);
extern void bt_field_class_real_set_is_single_precision(
- struct bt_field_class *field_class,
+ bt_field_class *field_class,
bt_bool is_single_precision);
-extern struct bt_field_class *bt_field_class_unsigned_enumeration_create(void);
+extern bt_field_class *bt_field_class_unsigned_enumeration_create(void);
-extern struct bt_field_class *bt_field_class_signed_enumeration_create(void);
+extern bt_field_class *bt_field_class_signed_enumeration_create(void);
extern int bt_field_class_unsigned_enumeration_map_range(
- struct bt_field_class *field_class, const char *label,
+ bt_field_class *field_class, const char *label,
uint64_t range_lower, uint64_t range_upper);
extern int bt_field_class_signed_enumeration_map_range(
- struct bt_field_class *field_class, const char *label,
+ bt_field_class *field_class, const char *label,
int64_t range_lower, int64_t range_upper);
-extern struct bt_field_class *bt_field_class_string_create(void);
+extern bt_field_class *bt_field_class_string_create(void);
-extern struct bt_field_class *bt_field_class_structure_create(void);
+extern bt_field_class *bt_field_class_structure_create(void);
extern int bt_field_class_structure_append_member(
- struct bt_field_class *struct_field_class,
- const char *name, struct bt_field_class *field_class);
+ bt_field_class *struct_field_class,
+ const char *name, bt_field_class *field_class);
-extern struct bt_field_class *bt_field_class_static_array_create(
- struct bt_field_class *elem_field_class, uint64_t length);
+extern bt_field_class *bt_field_class_static_array_create(
+ bt_field_class *elem_field_class, uint64_t length);
-extern struct bt_field_class *bt_field_class_dynamic_array_create(
- struct bt_field_class *elem_field_class);
+extern bt_field_class *bt_field_class_dynamic_array_create(
+ bt_field_class *elem_field_class);
extern int bt_field_class_dynamic_array_set_length_field_class(
- struct bt_field_class *field_class,
- struct bt_field_class *length_field_class);
+ bt_field_class *field_class,
+ bt_field_class *length_field_class);
-extern struct bt_field_class *bt_field_class_variant_create(void);
+extern bt_field_class *bt_field_class_variant_create(void);
extern int bt_field_class_variant_set_selector_field_class(
- struct bt_field_class *field_class,
- struct bt_field_class *selector_field_class);
+ bt_field_class *field_class,
+ bt_field_class *selector_field_class);
extern int bt_field_class_variant_append_option(
- struct bt_field_class *var_field_class,
- const char *name, struct bt_field_class *field_class);
+ bt_field_class *var_field_class,
+ const char *name, bt_field_class *field_class);
#ifdef __cplusplus
}
/* For enum bt_field_class_type */
#include <babeltrace/trace-ir/field-class.h>
+/* For bt_field, bt_field_class */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_field;
-struct bt_field_class;
-
-extern const struct bt_field_class *bt_field_borrow_class_const(
- const struct bt_field *field);
+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(
- const struct bt_field *field);
+ const bt_field *field);
-extern int64_t bt_field_signed_integer_get_value(const struct bt_field *field);
+extern int64_t bt_field_signed_integer_get_value(const bt_field *field);
extern uint64_t bt_field_unsigned_integer_get_value(
- const struct bt_field *field);
+ const bt_field *field);
-extern double bt_field_real_get_value(const struct bt_field *field);
+extern double bt_field_real_get_value(const bt_field *field);
extern int bt_field_unsigned_enumeration_get_mapping_labels(
- const struct bt_field *field,
+ const bt_field *field,
bt_field_class_enumeration_mapping_label_array *label_array,
uint64_t *count);
extern int bt_field_signed_enumeration_get_mapping_labels(
- const struct bt_field *field,
+ const bt_field *field,
bt_field_class_enumeration_mapping_label_array *label_array,
uint64_t *count);
-extern const char *bt_field_string_get_value(const struct bt_field *field);
+extern const char *bt_field_string_get_value(const bt_field *field);
-extern uint64_t bt_field_string_get_length(const struct bt_field *field);
+extern uint64_t bt_field_string_get_length(const bt_field *field);
-extern const struct bt_field *
+extern const bt_field *
bt_field_structure_borrow_member_field_by_index_const(
- const struct bt_field *field, uint64_t index);
+ const bt_field *field, uint64_t index);
-extern const struct bt_field *
+extern const bt_field *
bt_field_structure_borrow_member_field_by_name_const(
- const struct bt_field *field, const char *name);
+ const bt_field *field, const char *name);
-extern uint64_t bt_field_array_get_length(const struct bt_field *field);
+extern uint64_t bt_field_array_get_length(const bt_field *field);
-extern const struct bt_field *
+extern const bt_field *
bt_field_array_borrow_element_field_by_index_const(
- const struct bt_field *field, uint64_t index);
+ const bt_field *field, uint64_t index);
extern uint64_t bt_field_variant_get_selected_option_field_index(
- const struct bt_field *field);
+ const bt_field *field);
-extern const struct bt_field *
+extern const bt_field *
bt_field_variant_borrow_selected_option_field_const(
- const struct bt_field *field);
+ const bt_field *field);
#ifdef __cplusplus
}
#include <stdint.h>
+/* For bt_field_path */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_field_path;
-
enum bt_scope {
BT_SCOPE_PACKET_HEADER,
BT_SCOPE_PACKET_CONTEXT,
};
extern enum bt_scope bt_field_path_get_root_scope(
- const struct bt_field_path *field_path);
+ const bt_field_path *field_path);
extern uint64_t bt_field_path_get_index_count(
- const struct bt_field_path *field_path);
+ const bt_field_path *field_path);
extern uint64_t bt_field_path_get_index_by_index(
- const struct bt_field_path *field_path, uint64_t index);
+ const bt_field_path *field_path, uint64_t index);
-extern void bt_field_path_get_ref(const struct bt_field_path *field_path);
+extern void bt_field_path_get_ref(const bt_field_path *field_path);
-extern void bt_field_path_put_ref(const struct bt_field_path *field_path);
+extern void bt_field_path_put_ref(const bt_field_path *field_path);
#define BT_FIELD_PATH_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
+/* For bt_field, bt_field_class */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_field;
-struct bt_field_class;
-
-extern void bt_field_signed_integer_set_value(struct bt_field *field,
+extern void bt_field_signed_integer_set_value(bt_field *field,
int64_t value);
-extern void bt_field_unsigned_integer_set_value(struct bt_field *field,
+extern void bt_field_unsigned_integer_set_value(bt_field *field,
uint64_t value);
-extern void bt_field_real_set_value(struct bt_field *field, double value);
+extern void bt_field_real_set_value(bt_field *field, double value);
-extern int bt_field_string_set_value(struct bt_field *field, const char *value);
+extern int bt_field_string_set_value(bt_field *field, const char *value);
-extern int bt_field_string_append(struct bt_field *field, const char *value);
+extern int bt_field_string_append(bt_field *field, const char *value);
-extern int bt_field_string_append_with_length(struct bt_field *field,
+extern int bt_field_string_append_with_length(bt_field *field,
const char *value, uint64_t length);
-extern int bt_field_string_clear(struct bt_field *field);
+extern int bt_field_string_clear(bt_field *field);
-extern struct bt_field *bt_field_structure_borrow_member_field_by_index(
- struct bt_field *field, uint64_t index);
+extern bt_field *bt_field_structure_borrow_member_field_by_index(
+ bt_field *field, uint64_t index);
-extern struct bt_field *bt_field_structure_borrow_member_field_by_name(
- struct bt_field *field, const char *name);
+extern bt_field *bt_field_structure_borrow_member_field_by_name(
+ bt_field *field, const char *name);
-extern struct bt_field *bt_field_array_borrow_element_field_by_index(
- struct bt_field *field, uint64_t index);
+extern bt_field *bt_field_array_borrow_element_field_by_index(
+ bt_field *field, uint64_t index);
-extern int bt_field_dynamic_array_set_length(struct bt_field *field,
+extern int bt_field_dynamic_array_set_length(bt_field *field,
uint64_t length);
-extern int bt_field_variant_select_option_field(struct bt_field *field,
+extern int bt_field_variant_select_option_field(bt_field *field,
uint64_t index);
-extern struct bt_field *bt_field_variant_borrow_selected_option_field(
- struct bt_field *field);
+extern bt_field *bt_field_variant_borrow_selected_option_field(
+ bt_field *field);
#ifdef __cplusplus
}
/* For enum bt_clock_value_status */
#include <babeltrace/trace-ir/clock-value-const.h>
+/*
+ * For bt_packet, bt_packet_header_field, bt_packet_context_field,
+ * bt_stream, bt_clock_value
+ */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_packet;
-struct bt_packet_header_field;
-struct bt_packet_context_field;
-struct bt_stream;
-struct bt_clock_value;
-
-extern const struct bt_stream *bt_packet_borrow_stream_const(
- const struct bt_packet *packet);
+extern const bt_stream *bt_packet_borrow_stream_const(
+ const bt_packet *packet);
extern
-const struct bt_field *bt_packet_borrow_header_field_const(
- const struct bt_packet *packet);
+const bt_field *bt_packet_borrow_header_field_const(
+ const bt_packet *packet);
extern
-const struct bt_field *bt_packet_borrow_context_field_const(
- const struct bt_packet *packet);
+const bt_field *bt_packet_borrow_context_field_const(
+ const bt_packet *packet);
extern
enum bt_clock_value_status bt_packet_borrow_default_beginning_clock_value_const(
- const struct bt_packet *packet,
- const struct bt_clock_value **clock_value);
+ const bt_packet *packet,
+ const bt_clock_value **clock_value);
extern
enum bt_clock_value_status bt_packet_borrow_default_end_clock_valeu_const(
- const struct bt_packet *packet,
- const struct bt_clock_value **clock_value);
+ const bt_packet *packet,
+ const bt_clock_value **clock_value);
extern
enum bt_property_availability bt_packet_get_discarded_event_counter_snapshot(
- const struct bt_packet *packet, uint64_t *value);
+ const bt_packet *packet, uint64_t *value);
extern
enum bt_property_availability bt_packet_get_packet_counter_snapshot(
- const struct bt_packet *packet, uint64_t *value);
+ const bt_packet *packet, uint64_t *value);
-extern void bt_packet_get_ref(const struct bt_packet *packet);
+extern void bt_packet_get_ref(const bt_packet *packet);
-extern void bt_packet_put_ref(const struct bt_packet *packet);
+extern void bt_packet_put_ref(const bt_packet *packet);
#define BT_PACKET_PUT_REF_AND_RESET(_var) \
do { \
* http://www.efficios.com/ctf
*/
+/* For bt_stream_class, bt_packet_context_field, bt_field */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_stream_class;
-struct bt_packet_context_field;
-struct bt_field;
-
extern
-struct bt_packet_context_field *bt_packet_context_field_create(
- struct bt_stream_class *stream_class);
+bt_packet_context_field *bt_packet_context_field_create(
+ bt_stream_class *stream_class);
extern
-struct bt_field *bt_packet_context_field_borrow_field(
- struct bt_packet_context_field *field);
+bt_field *bt_packet_context_field_borrow_field(
+ bt_packet_context_field *field);
extern
void bt_packet_context_field_release(
- struct bt_packet_context_field *field);
+ bt_packet_context_field *field);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
+/* For bt_trace_class, bt_packet_header_field, bt_field */
+#include <babeltrace/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_trace_class;
-struct bt_packet_header_field;
-struct bt_field;
-
extern
-struct bt_packet_header_field *bt_packet_header_field_create(
- struct bt_trace_class *trace_class);
+bt_packet_header_field *bt_packet_header_field_create(
+ bt_trace_class *trace_class);
extern
-struct bt_field *bt_packet_header_field_borrow_field(
- struct bt_packet_header_field *field);
+bt_field *bt_packet_header_field_borrow_field(
+ bt_packet_header_field *field);
extern
void bt_packet_header_field_release(
- struct bt_packet_header_field *field);
+ bt_packet_header_field *field);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
+/* For bt_packet, bt_packet_header_field, bt_packet_context_field, bt_stream */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_packet;
-struct bt_packet_header_field;
-struct bt_packet_context_field;
-struct bt_stream;
-
-extern struct bt_packet *bt_packet_create(struct bt_stream *stream);
+extern bt_packet *bt_packet_create(bt_stream *stream);
-extern struct bt_stream *bt_packet_borrow_stream(struct bt_packet *packet);
+extern bt_stream *bt_packet_borrow_stream(bt_packet *packet);
extern
-struct bt_field *bt_packet_borrow_header_field(struct bt_packet *packet);
+bt_field *bt_packet_borrow_header_field(bt_packet *packet);
extern
-int bt_packet_move_header_field(struct bt_packet *packet,
- struct bt_packet_header_field *header);
+int bt_packet_move_header_field(bt_packet *packet,
+ bt_packet_header_field *header);
extern
-struct bt_field *bt_packet_borrow_context_field(struct bt_packet *packet);
+bt_field *bt_packet_borrow_context_field(bt_packet *packet);
extern
-int bt_packet_move_context_field(struct bt_packet *packet,
- struct bt_packet_context_field *context);
+int bt_packet_move_context_field(bt_packet *packet,
+ bt_packet_context_field *context);
extern
-void bt_packet_set_default_beginning_clock_value(struct bt_packet *packet,
+void bt_packet_set_default_beginning_clock_value(bt_packet *packet,
uint64_t value_cycles);
extern
-void bt_packet_set_default_end_clock_value(struct bt_packet *packet,
+void bt_packet_set_default_end_clock_value(bt_packet *packet,
uint64_t value_cycles);
extern
-void bt_packet_set_discarded_event_counter_snapshot(struct bt_packet *packet,
+void bt_packet_set_discarded_event_counter_snapshot(bt_packet *packet,
uint64_t value);
extern
-void bt_packet_set_packet_counter_snapshot(struct bt_packet *packet,
+void bt_packet_set_packet_counter_snapshot(bt_packet *packet,
uint64_t value);
#ifdef __cplusplus
#include <stdint.h>
-/* For bt_bool */
+/*
+ * For bt_bool, bt_trace_class, bt_stream_class, bt_event_class,
+ * bt_stream_class, bt_event_header_field, bt_packet_context_field
+ */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_trace_class;
-struct bt_stream_class;
-struct bt_event_class;
-struct bt_stream_class;
-struct bt_event_header_field;
-struct bt_packet_context_field;
-
-extern const struct bt_trace_class *bt_stream_class_borrow_trace_class_const(
- const struct bt_stream_class *stream_class);
+extern const bt_trace_class *bt_stream_class_borrow_trace_class_const(
+ const bt_stream_class *stream_class);
extern const char *bt_stream_class_get_name(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_assigns_automatic_event_class_id(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_assigns_automatic_stream_id(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern uint64_t bt_stream_class_get_id(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_stream_class_borrow_packet_context_field_class_const(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_stream_class_borrow_event_header_field_class_const(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_stream_class_borrow_event_common_context_field_class_const(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern uint64_t bt_stream_class_get_event_class_count(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
-extern const struct bt_event_class *
+extern const bt_event_class *
bt_stream_class_borrow_event_class_by_index_const(
- const struct bt_stream_class *stream_class, uint64_t index);
+ const bt_stream_class *stream_class, uint64_t index);
-extern const struct bt_event_class *
+extern const bt_event_class *
bt_stream_class_borrow_event_class_by_id_const(
- const struct bt_stream_class *stream_class, uint64_t id);
+ const bt_stream_class *stream_class, uint64_t id);
-extern const struct bt_clock_class *
+extern const bt_clock_class *
bt_stream_class_borrow_default_clock_class_const(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_default_clock_is_always_known(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_packets_have_discarded_event_counter_snapshot(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_packets_have_packet_counter_snapshot(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_packets_have_default_beginning_clock_value(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
extern bt_bool bt_stream_class_packets_have_default_end_clock_value(
- const struct bt_stream_class *stream_class);
+ const bt_stream_class *stream_class);
-extern void bt_stream_class_get_ref(const struct bt_stream_class *stream_class);
+extern void bt_stream_class_get_ref(const bt_stream_class *stream_class);
-extern void bt_stream_class_put_ref(const struct bt_stream_class *stream_class);
+extern void bt_stream_class_put_ref(const bt_stream_class *stream_class);
#define BT_STREAM_CLASS_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
-/* For bt_bool */
+/*
+ * For bt_bool, bt_trace_class, bt_stream_class, bt_event_class,
+ * bt_clock_class
+ */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_trace_class;
-struct bt_stream_class;
-struct bt_event_class;
-struct bt_clock_class;
-
-extern struct bt_stream_class *bt_stream_class_create(
- struct bt_trace_class *trace_class);
+extern bt_stream_class *bt_stream_class_create(
+ bt_trace_class *trace_class);
-extern struct bt_stream_class *bt_stream_class_create_with_id(
- struct bt_trace_class *trace_class, uint64_t id);
+extern bt_stream_class *bt_stream_class_create_with_id(
+ bt_trace_class *trace_class, uint64_t id);
-extern struct bt_trace_class *bt_stream_class_borrow_trace_class(
- struct bt_stream_class *stream_class);
+extern bt_trace_class *bt_stream_class_borrow_trace_class(
+ bt_stream_class *stream_class);
-extern int bt_stream_class_set_name(struct bt_stream_class *stream_class,
+extern int bt_stream_class_set_name(bt_stream_class *stream_class,
const char *name);
extern void bt_stream_class_set_assigns_automatic_event_class_id(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
extern void bt_stream_class_set_assigns_automatic_stream_id(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
extern int bt_stream_class_set_packet_context_field_class(
- struct bt_stream_class *stream_class,
- struct bt_field_class *field_class);
+ bt_stream_class *stream_class,
+ bt_field_class *field_class);
extern int bt_stream_class_set_event_header_field_class(
- struct bt_stream_class *stream_class,
- struct bt_field_class *field_class);
+ bt_stream_class *stream_class,
+ bt_field_class *field_class);
extern int
bt_stream_class_set_event_common_context_field_class(
- struct bt_stream_class *stream_class,
- struct bt_field_class *field_class);
+ bt_stream_class *stream_class,
+ bt_field_class *field_class);
-extern struct bt_event_class *
+extern bt_event_class *
bt_stream_class_borrow_event_class_by_index(
- struct bt_stream_class *stream_class, uint64_t index);
+ bt_stream_class *stream_class, uint64_t index);
-extern struct bt_event_class *
+extern bt_event_class *
bt_stream_class_borrow_event_class_by_id(
- struct bt_stream_class *stream_class, uint64_t id);
+ bt_stream_class *stream_class, uint64_t id);
-extern struct bt_clock_class *bt_stream_class_borrow_default_clock_class(
- struct bt_stream_class *stream_class);
+extern bt_clock_class *bt_stream_class_borrow_default_clock_class(
+ bt_stream_class *stream_class);
extern int bt_stream_class_set_default_clock_class(
- struct bt_stream_class *stream_class,
- struct bt_clock_class *clock_class);
+ bt_stream_class *stream_class,
+ bt_clock_class *clock_class);
extern void
bt_stream_class_set_packets_have_discarded_event_counter_snapshot(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
extern void
bt_stream_class_set_packets_have_packet_counter_snapshot(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
extern void
bt_stream_class_set_packets_have_default_beginning_clock_value(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
extern void
bt_stream_class_set_packets_have_default_end_clock_value(
- struct bt_stream_class *stream_class, bt_bool value);
+ bt_stream_class *stream_class, bt_bool value);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
+/* For bt_trace, bt_stream, bt_stream_class */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_trace;
-struct bt_stream;
-struct bt_stream_class;
-
-extern const struct bt_stream_class *bt_stream_borrow_class_const(
- const struct bt_stream *stream);
+extern const bt_stream_class *bt_stream_borrow_class_const(
+ const bt_stream *stream);
-extern const struct bt_trace *bt_stream_borrow_trace_const(
- const struct bt_stream *stream);
+extern const bt_trace *bt_stream_borrow_trace_const(
+ const bt_stream *stream);
-extern const char *bt_stream_get_name(const struct bt_stream *stream);
+extern const char *bt_stream_get_name(const bt_stream *stream);
-extern uint64_t bt_stream_get_id(const struct bt_stream *stream);
+extern uint64_t bt_stream_get_id(const bt_stream *stream);
-extern void bt_stream_get_ref(const struct bt_stream *stream);
+extern void bt_stream_get_ref(const bt_stream *stream);
-extern void bt_stream_put_ref(const struct bt_stream *stream);
+extern void bt_stream_put_ref(const bt_stream *stream);
#define BT_STREAM_PUT_REF_AND_RESET(_var) \
do { \
* http://www.efficios.com/ctf
*/
+/* For bt_trace, bt_stream, bt_stream_class */
+#include <babeltrace/types.h>
+
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_trace;
-struct bt_stream;
-struct bt_stream_class;
-
-extern struct bt_stream *bt_stream_create(struct bt_stream_class *stream_class,
- struct bt_trace *trace);
+extern bt_stream *bt_stream_create(bt_stream_class *stream_class,
+ bt_trace *trace);
-extern struct bt_stream *bt_stream_create_with_id(
- struct bt_stream_class *stream_class,
- struct bt_trace *trace, uint64_t id);
+extern bt_stream *bt_stream_create_with_id(
+ bt_stream_class *stream_class,
+ bt_trace *trace, uint64_t id);
-extern struct bt_trace *bt_stream_borrow_trace(struct bt_stream *stream);
+extern bt_trace *bt_stream_borrow_trace(bt_stream *stream);
-extern struct bt_stream_class *bt_stream_borrow_class(struct bt_stream *stream);
+extern bt_stream_class *bt_stream_borrow_class(bt_stream *stream);
-extern int bt_stream_set_name(struct bt_stream *stream, const char *name);
+extern int bt_stream_set_name(bt_stream *stream, const char *name);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
-/* For bt_bool, bt_uuid */
+/*
+ * For bt_bool, bt_uuid, bt_trace_class, bt_stream_class,
+ * bt_field_class, bt_value
+ */
#include <babeltrace/types.h>
#include <stdint.h>
extern "C" {
#endif
-struct bt_trace_class;
-struct bt_stream_class;
-struct bt_field_class;
-struct bt_value;
-
extern bt_bool bt_trace_class_assigns_automatic_stream_class_id(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
extern const char *bt_trace_class_get_name(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
extern bt_uuid bt_trace_class_get_uuid(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
extern uint64_t bt_trace_class_get_environment_entry_count(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
extern void bt_trace_class_borrow_environment_entry_by_index_const(
- const struct bt_trace_class *trace_class, uint64_t index,
- const char **name, const struct bt_value **value);
+ const bt_trace_class *trace_class, uint64_t index,
+ const char **name, const bt_value **value);
-extern const struct bt_value *
+extern const bt_value *
bt_trace_class_borrow_environment_entry_value_by_name_const(
- const struct bt_trace_class *trace_class, const char *name);
+ const bt_trace_class *trace_class, const char *name);
-extern const struct bt_field_class *
+extern const bt_field_class *
bt_trace_class_borrow_packet_header_field_class_const(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
extern uint64_t bt_trace_class_get_stream_class_count(
- const struct bt_trace_class *trace_class);
+ const bt_trace_class *trace_class);
-extern const struct bt_stream_class *
+extern const bt_stream_class *
bt_trace_class_borrow_stream_class_by_index_const(
- const struct bt_trace_class *trace_class, uint64_t index);
+ const bt_trace_class *trace_class, uint64_t index);
-extern const struct bt_stream_class *bt_trace_class_borrow_stream_class_by_id_const(
- const struct bt_trace_class *trace_class, uint64_t id);
+extern const bt_stream_class *bt_trace_class_borrow_stream_class_by_id_const(
+ const bt_trace_class *trace_class, uint64_t id);
-extern void bt_trace_class_get_ref(const struct bt_trace_class *trace_class);
+extern void bt_trace_class_get_ref(const bt_trace_class *trace_class);
-extern void bt_trace_class_put_ref(const struct bt_trace_class *trace_class);
+extern void bt_trace_class_put_ref(const bt_trace_class *trace_class);
#define BT_TRACE_CLASS_PUT_REF_AND_RESET(_var) \
do { \
* http://www.efficios.com/ctf
*/
-/* For bt_bool, bt_uuid */
+/* For bt_bool, bt_uuid, bt_trace_class, bt_stream_class, bt_field_class */
#include <babeltrace/types.h>
#include <stdint.h>
extern "C" {
#endif
-struct bt_trace_class;
-struct bt_stream_class;
-struct bt_field_class;
-
-extern struct bt_trace_class *bt_trace_class_create(void);
+extern bt_trace_class *bt_trace_class_create(void);
extern void bt_trace_class_set_assigns_automatic_stream_class_id(
- struct bt_trace_class *trace_class, bt_bool value);
+ bt_trace_class *trace_class, bt_bool value);
-extern int bt_trace_class_set_name(struct bt_trace_class *trace_class,
+extern int bt_trace_class_set_name(bt_trace_class *trace_class,
const char *name);
-extern void bt_trace_class_set_uuid(struct bt_trace_class *trace_class,
+extern void bt_trace_class_set_uuid(bt_trace_class *trace_class,
bt_uuid uuid);
extern int bt_trace_class_set_environment_entry_integer(
- struct bt_trace_class *trace_class,
+ bt_trace_class *trace_class,
const char *name, int64_t value);
extern int bt_trace_class_set_environment_entry_string(
- struct bt_trace_class *trace_class,
+ bt_trace_class *trace_class,
const char *name, const char *value);
extern int bt_trace_class_set_packet_header_field_class(
- struct bt_trace_class *trace_class,
- struct bt_field_class *packet_header_field_class);
+ bt_trace_class *trace_class,
+ bt_field_class *packet_header_field_class);
-extern struct bt_stream_class *bt_trace_class_borrow_stream_class_by_index(
- struct bt_trace_class *trace_class, uint64_t index);
+extern bt_stream_class *bt_trace_class_borrow_stream_class_by_index(
+ bt_trace_class *trace_class, uint64_t index);
-extern struct bt_stream_class *bt_trace_class_borrow_stream_class_by_id(
- struct bt_trace_class *trace_class, uint64_t id);
+extern bt_stream_class *bt_trace_class_borrow_stream_class_by_id(
+ bt_trace_class *trace_class, uint64_t id);
#ifdef __cplusplus
}
* http://www.efficios.com/ctf
*/
-/* For bt_bool, bt_uuid */
+/*
+ * For bt_bool, bt_uuid, bt_trace, bt_stream, bt_stream_class,
+ * bt_field_class, bt_value
+ */
#include <babeltrace/types.h>
#include <stdint.h>
extern "C" {
#endif
-struct bt_trace;
-struct bt_stream;
-struct bt_stream_class;
-struct bt_field_class;
-struct bt_value;
-
-typedef void (* bt_trace_is_static_listener_func)(const struct bt_trace *trace,
+typedef void (* bt_trace_is_static_listener_func)(const bt_trace *trace,
void *data);
-typedef void (* bt_trace_listener_removed_func)(const struct bt_trace *trace,
+typedef void (* bt_trace_listener_removed_func)(const bt_trace *trace,
void *data);
-extern const struct bt_trace_class *bt_trace_borrow_class_const(
- const struct bt_trace *trace);
+extern const bt_trace_class *bt_trace_borrow_class_const(
+ const bt_trace *trace);
-extern const char *bt_trace_get_name(const struct bt_trace *trace);
+extern const char *bt_trace_get_name(const bt_trace *trace);
-extern uint64_t bt_trace_get_stream_count(const struct bt_trace *trace);
+extern uint64_t bt_trace_get_stream_count(const bt_trace *trace);
-extern const struct bt_stream *bt_trace_borrow_stream_by_index_const(
- const struct bt_trace *trace, uint64_t index);
+extern const bt_stream *bt_trace_borrow_stream_by_index_const(
+ const bt_trace *trace, uint64_t index);
-extern const struct bt_stream *bt_trace_borrow_stream_by_id_const(
- const struct bt_trace *trace, uint64_t id);
+extern const bt_stream *bt_trace_borrow_stream_by_id_const(
+ const bt_trace *trace, uint64_t id);
-extern bt_bool bt_trace_is_static(const struct bt_trace *trace);
+extern bt_bool bt_trace_is_static(const bt_trace *trace);
-extern int bt_trace_add_is_static_listener(const struct bt_trace *trace,
+extern int 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 int bt_trace_remove_is_static_listener(const struct bt_trace *trace,
+extern int bt_trace_remove_is_static_listener(const bt_trace *trace,
uint64_t listener_id);
-extern void bt_trace_get_ref(const struct bt_trace *trace);
+extern void bt_trace_get_ref(const bt_trace *trace);
-extern void bt_trace_put_ref(const struct bt_trace *trace);
+extern void bt_trace_put_ref(const bt_trace *trace);
#define BT_TRACE_PUT_REF_AND_RESET(_var) \
do { \
* http://www.efficios.com/ctf
*/
-/* For bt_bool */
+/* For bt_bool, bt_trace, bt_trace_class, bt_stream */
#include <babeltrace/types.h>
#include <stdint.h>
extern "C" {
#endif
-struct bt_trace;
-struct bt_trace_class;
-struct bt_stream;
+extern bt_trace_class *bt_trace_borrow_class(bt_trace *trace);
-extern struct bt_trace_class *bt_trace_borrow_class(struct bt_trace *trace);
+extern bt_trace *bt_trace_create(bt_trace_class *trace_class);
-extern struct bt_trace *bt_trace_create(struct bt_trace_class *trace_class);
+extern int bt_trace_set_name(bt_trace *trace, const char *name);
-extern int bt_trace_set_name(struct bt_trace *trace, const char *name);
-
-extern struct bt_stream *bt_trace_borrow_stream_by_index(struct bt_trace *trace,
+extern bt_stream *bt_trace_borrow_stream_by_index(bt_trace *trace,
uint64_t index);
-extern struct bt_stream *bt_trace_borrow_stream_by_id(struct bt_trace *trace,
+extern bt_stream *bt_trace_borrow_stream_by_id(bt_trace *trace,
uint64_t id);
-extern int bt_trace_make_static(struct bt_trace *trace);
+extern int bt_trace_make_static(bt_trace *trace);
#ifdef __cplusplus
}
typedef const uint8_t *bt_uuid;
+typedef struct bt_clock_class bt_clock_class;
+typedef struct bt_clock_value bt_clock_value;
+typedef struct bt_component bt_component;
+typedef struct bt_component_class bt_component_class;
+typedef struct bt_component_class_filter bt_component_class_filter;
+typedef struct bt_component_class_sink bt_component_class_sink;
+typedef struct bt_component_class_source bt_component_class_source;
+typedef struct bt_component_filter bt_component_filter;
+typedef struct bt_component_graph bt_component_graph;
+typedef struct bt_component_sink bt_component_sink;
+typedef struct bt_component_source bt_component_source;
+typedef struct bt_connection bt_connection;
+typedef struct bt_event bt_event;
+typedef struct bt_event_class bt_event_class;
+typedef struct bt_event_header_field bt_event_header_field;
+typedef struct bt_field bt_field;
+typedef struct bt_field_class bt_field_class;
+typedef struct bt_field_class_signed_enumeration_mapping_ranges bt_field_class_signed_enumeration_mapping_ranges;
+typedef struct bt_field_class_unsigned_enumeration_mapping_ranges bt_field_class_unsigned_enumeration_mapping_ranges;
+typedef struct bt_field_path bt_field_path;
+typedef struct bt_graph bt_graph;
+typedef struct bt_notification bt_notification;
+typedef struct bt_notification_iterator bt_notification_iterator;
+typedef struct bt_object bt_object;
+typedef struct bt_packet bt_packet;
+typedef struct bt_packet_context_field bt_packet_context_field;
+typedef struct bt_packet_header_field bt_packet_header_field;
+typedef struct bt_plugin bt_plugin;
+typedef struct bt_plugin_set bt_plugin_set;
+typedef struct bt_plugin_so_shared_lib_handle bt_plugin_so_shared_lib_handle;
+typedef struct bt_port bt_port;
+typedef struct bt_port_input bt_port_input;
+typedef struct bt_port_output bt_port_output;
+typedef struct bt_port_output_notification_iterator bt_port_output_notification_iterator;
+typedef struct bt_query_executor bt_query_executor;
+typedef struct bt_self_component bt_self_component;
+typedef struct bt_self_component_class_filter bt_self_component_class_filter;
+typedef struct bt_self_component_class_sink bt_self_component_class_sink;
+typedef struct bt_self_component_class_source bt_self_component_class_source;
+typedef struct bt_self_component_filter bt_self_component_filter;
+typedef struct bt_self_component_port bt_self_component_port;
+typedef struct bt_self_component_port_input bt_self_component_port_input;
+typedef struct bt_self_component_port_input_notification_iterator bt_self_component_port_input_notification_iterator;
+typedef struct bt_self_component_port_output bt_self_component_port_output;
+typedef struct bt_self_component_sink bt_self_component_sink;
+typedef struct bt_self_component_source bt_self_component_source;
+typedef struct bt_self_notification_iterator bt_self_notification_iterator;
+typedef struct bt_self_port_input bt_self_port_input;
+typedef struct bt_self_port_output bt_self_port_output;
+typedef struct bt_self_port bt_self_port;
+typedef struct bt_stream bt_stream;
+typedef struct bt_stream_class bt_stream_class;
+typedef struct bt_trace bt_trace;
+typedef struct bt_trace_class bt_trace_class;
+typedef struct bt_value bt_value;
+
+typedef const char * const *bt_field_class_enumeration_mapping_label_array;
+typedef const struct bt_notification **bt_notification_array_const;
+
/** @} */
#ifdef __cplusplus
#include <stdint.h>
#include <stddef.h>
-/* For bt_bool */
+/* For bt_bool, bt_value */
#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_value;
-
enum bt_value_status {
/// Operation canceled.
BT_VALUE_STATUS_CANCELED = 125,
BT_VALUE_TYPE_MAP = 6,
};
-extern enum bt_value_type bt_value_get_type(const struct bt_value *object);
+extern enum bt_value_type bt_value_get_type(const bt_value *object);
static inline
-bt_bool bt_value_is_null(const struct bt_value *object)
+bt_bool bt_value_is_null(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_NULL;
}
static inline
-bt_bool bt_value_is_bool(const struct bt_value *object)
+bt_bool bt_value_is_bool(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_BOOL;
}
static inline
-bt_bool bt_value_is_integer(const struct bt_value *object)
+bt_bool bt_value_is_integer(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_INTEGER;
}
static inline
-bt_bool bt_value_is_real(const struct bt_value *object)
+bt_bool bt_value_is_real(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_REAL;
}
static inline
-bt_bool bt_value_is_string(const struct bt_value *object)
+bt_bool bt_value_is_string(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_STRING;
}
static inline
-bt_bool bt_value_is_array(const struct bt_value *object)
+bt_bool bt_value_is_array(const bt_value *object)
{
return bt_value_get_type(object) == BT_VALUE_TYPE_ARRAY;
}
static inline
-bt_bool bt_value_is_map(const struct bt_value *object)
+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 struct bt_value *object,
- struct bt_value **copy);
+extern enum bt_value_status bt_value_copy(const bt_value *object,
+ bt_value **copy);
-extern bt_bool bt_value_compare(const struct bt_value *object_a,
- const struct bt_value *object_b);
+extern bt_bool bt_value_compare(const bt_value *object_a,
+ const bt_value *object_b);
-extern bt_bool bt_value_bool_get(const struct bt_value *bool_obj);
+extern bt_bool bt_value_bool_get(const bt_value *bool_obj);
-extern int64_t bt_value_integer_get(const struct bt_value *integer_obj);
+extern int64_t bt_value_integer_get(const bt_value *integer_obj);
-extern double bt_value_real_get(const struct bt_value *real_obj);
+extern double bt_value_real_get(const bt_value *real_obj);
-extern const char *bt_value_string_get(const struct bt_value *string_obj);
+extern const char *bt_value_string_get(const bt_value *string_obj);
-extern uint64_t bt_value_array_get_size(const struct bt_value *array_obj);
+extern uint64_t bt_value_array_get_size(const bt_value *array_obj);
static inline
-bt_bool bt_value_array_is_empty(const struct bt_value *array_obj)
+bt_bool bt_value_array_is_empty(const bt_value *array_obj)
{
return bt_value_array_get_size(array_obj) == 0;
}
-extern const struct bt_value *bt_value_array_borrow_element_by_index_const(
- const struct bt_value *array_obj, uint64_t index);
+extern const bt_value *bt_value_array_borrow_element_by_index_const(
+ const bt_value *array_obj, uint64_t index);
-extern uint64_t bt_value_map_get_size(const struct bt_value *map_obj);
+extern uint64_t bt_value_map_get_size(const bt_value *map_obj);
static inline
-bt_bool bt_value_map_is_empty(const struct bt_value *map_obj)
+bt_bool bt_value_map_is_empty(const bt_value *map_obj)
{
return bt_value_map_get_size(map_obj) == 0;
}
-extern const struct bt_value *bt_value_map_borrow_entry_value_const(
- const struct bt_value *map_obj, const char *key);
+extern const bt_value *bt_value_map_borrow_entry_value_const(
+ const bt_value *map_obj, const char *key);
typedef bt_bool (* bt_value_map_foreach_entry_const_func)(const char *key,
- const struct bt_value *object, void *data);
+ const bt_value *object, void *data);
extern enum bt_value_status bt_value_map_foreach_entry_const(
- const struct bt_value *map_obj,
+ const bt_value *map_obj,
bt_value_map_foreach_entry_const_func func, void *data);
-extern bt_bool bt_value_map_has_entry(const struct bt_value *map_obj,
+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(
- const struct bt_value *base_map_obj,
- const struct bt_value *extension_map_obj,
- struct bt_value **extended_map_obj);
+ const bt_value *base_map_obj,
+ const bt_value *extension_map_obj,
+ bt_value **extended_map_obj);
-extern void bt_value_get_ref(const struct bt_value *value);
+extern void bt_value_get_ref(const bt_value *value);
-extern void bt_value_put_ref(const struct bt_value *value);
+extern void bt_value_put_ref(const bt_value *value);
#define BT_VALUE_PUT_REF_AND_RESET(_var) \
do { \
#include <stdint.h>
#include <stddef.h>
-/* For bt_bool */
+/* For bt_bool, bt_value */
#include <babeltrace/types.h>
/* For enum bt_value_status, enum bt_value_type */
extern "C" {
#endif
-struct bt_value;
+extern bt_value *bt_value_null;
-extern struct bt_value *bt_value_null;
+extern bt_value *bt_value_bool_create(void);
-extern struct bt_value *bt_value_bool_create(void);
+extern bt_value *bt_value_bool_create_init(bt_bool val);
-extern struct bt_value *bt_value_bool_create_init(bt_bool val);
+extern void bt_value_bool_set(bt_value *bool_obj, bt_bool val);
-extern void bt_value_bool_set(struct bt_value *bool_obj, bt_bool val);
+extern bt_value *bt_value_integer_create(void);
-extern struct bt_value *bt_value_integer_create(void);
-
-extern struct bt_value *bt_value_integer_create_init(
+extern bt_value *bt_value_integer_create_init(
int64_t val);
-extern void bt_value_integer_set(struct bt_value *integer_obj, int64_t val);
+extern void bt_value_integer_set(bt_value *integer_obj, int64_t val);
-extern struct bt_value *bt_value_real_create(void);
+extern bt_value *bt_value_real_create(void);
-extern struct bt_value *bt_value_real_create_init(double val);
+extern bt_value *bt_value_real_create_init(double val);
-extern void bt_value_real_set(struct bt_value *real_obj, double val);
+extern void bt_value_real_set(bt_value *real_obj, double val);
-extern struct bt_value *bt_value_string_create(void);
+extern bt_value *bt_value_string_create(void);
-extern struct bt_value *bt_value_string_create_init(const char *val);
+extern bt_value *bt_value_string_create_init(const char *val);
-extern enum bt_value_status bt_value_string_set(struct bt_value *string_obj,
+extern enum bt_value_status bt_value_string_set(bt_value *string_obj,
const char *val);
-extern struct bt_value *bt_value_array_create(void);
+extern bt_value *bt_value_array_create(void);
-extern struct bt_value *bt_value_array_borrow_element_by_index(
- struct bt_value *array_obj, uint64_t index);
+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(
- struct bt_value *array_obj,
- struct bt_value *element_obj);
+ bt_value *array_obj,
+ bt_value *element_obj);
extern enum bt_value_status bt_value_array_append_bool_element(
- struct bt_value *array_obj, bt_bool val);
+ bt_value *array_obj, bt_bool val);
extern enum bt_value_status bt_value_array_append_integer_element(
- struct bt_value *array_obj, int64_t val);
+ bt_value *array_obj, int64_t val);
extern enum bt_value_status bt_value_array_append_real_element(
- struct bt_value *array_obj, double val);
+ bt_value *array_obj, double val);
extern enum bt_value_status bt_value_array_append_string_element(
- struct bt_value *array_obj, const char *val);
+ bt_value *array_obj, const char *val);
extern enum bt_value_status bt_value_array_append_empty_array_element(
- struct bt_value *array_obj);
+ bt_value *array_obj);
extern enum bt_value_status bt_value_array_append_empty_map_element(
- struct bt_value *array_obj);
+ bt_value *array_obj);
extern enum bt_value_status bt_value_array_set_element_by_index(
- struct bt_value *array_obj, uint64_t index,
- struct bt_value *element_obj);
+ bt_value *array_obj, uint64_t index,
+ bt_value *element_obj);
-extern struct bt_value *bt_value_map_create(void);
+extern bt_value *bt_value_map_create(void);
-extern struct bt_value *bt_value_map_borrow_entry_value(
- struct bt_value *map_obj, const char *key);
+extern bt_value *bt_value_map_borrow_entry_value(
+ bt_value *map_obj, const char *key);
typedef bt_bool (* bt_value_map_foreach_entry_func)(const char *key,
- struct bt_value *object, void *data);
+ bt_value *object, void *data);
extern enum bt_value_status bt_value_map_foreach_entry(
- struct bt_value *map_obj,
+ bt_value *map_obj,
bt_value_map_foreach_entry_func func, void *data);
extern enum bt_value_status bt_value_map_insert_entry(
- struct bt_value *map_obj, const char *key,
- struct bt_value *element_obj);
+ bt_value *map_obj, const char *key,
+ bt_value *element_obj);
extern enum bt_value_status bt_value_map_insert_bool_entry(
- struct bt_value *map_obj, const char *key, bt_bool val);
+ bt_value *map_obj, const char *key, bt_bool val);
extern enum bt_value_status bt_value_map_insert_integer_entry(
- struct bt_value *map_obj, const char *key, int64_t val);
+ bt_value *map_obj, const char *key, int64_t val);
extern enum bt_value_status bt_value_map_insert_real_entry(
- struct bt_value *map_obj, const char *key, double val);
+ bt_value *map_obj, const char *key, double val);
extern enum bt_value_status bt_value_map_insert_string_entry(
- struct bt_value *map_obj, const char *key,
+ bt_value *map_obj, const char *key,
const char *val);
extern enum bt_value_status bt_value_map_insert_empty_array_entry(
- struct bt_value *map_obj, const char *key);
+ bt_value *map_obj, const char *key);
extern enum bt_value_status bt_value_map_insert_empty_map_entry(
- struct bt_value *map_obj, const char *key);
+ bt_value *map_obj, const char *key);
#ifdef __cplusplus
}
void ctf_visitor_generate_ir_destroy(struct ctf_visitor_generate_ir *visitor);
BT_HIDDEN
-struct bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
+bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
struct ctf_visitor_generate_ir *visitor);
BT_HIDDEN
#include "ctf-meta-visitors.h"
static inline
-struct bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
+bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec);
static inline
void ctf_field_class_int_set_props(struct ctf_field_class_int *fc,
- struct bt_field_class *ir_fc)
+ bt_field_class *ir_fc)
{
bt_field_class_integer_set_field_value_range(ir_fc,
fc->base.size);
}
static inline
-struct bt_field_class *ctf_field_class_int_to_ir(
+bt_field_class *ctf_field_class_int_to_ir(
struct ctf_field_class_int *fc)
{
- struct bt_field_class *ir_fc;
+ bt_field_class *ir_fc;
if (fc->is_signed) {
ir_fc = bt_field_class_signed_integer_create();
}
static inline
-struct bt_field_class *ctf_field_class_enum_to_ir(
+bt_field_class *ctf_field_class_enum_to_ir(
struct ctf_field_class_enum *fc)
{
int ret;
- struct bt_field_class *ir_fc;
+ bt_field_class *ir_fc;
uint64_t i;
if (fc->base.is_signed) {
}
static inline
-struct bt_field_class *ctf_field_class_float_to_ir(
+bt_field_class *ctf_field_class_float_to_ir(
struct ctf_field_class_float *fc)
{
- struct bt_field_class *ir_fc;
+ bt_field_class *ir_fc;
ir_fc = bt_field_class_real_create();
BT_ASSERT(ir_fc);
}
static inline
-struct bt_field_class *ctf_field_class_string_to_ir(
+bt_field_class *ctf_field_class_string_to_ir(
struct ctf_field_class_string *fc)
{
- struct bt_field_class *ir_fc =
+ bt_field_class *ir_fc =
bt_field_class_string_create();
BT_ASSERT(ir_fc);
}
static inline
-struct bt_field_class *ctf_field_class_struct_to_ir(
+bt_field_class *ctf_field_class_struct_to_ir(
struct ctf_field_class_struct *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
int ret;
- struct bt_field_class *ir_fc =
+ bt_field_class *ir_fc =
bt_field_class_structure_create();
uint64_t i;
for (i = 0; i < fc->members->len; i++) {
struct ctf_named_field_class *named_fc =
ctf_field_class_struct_borrow_member_by_index(fc, i);
- struct bt_field_class *member_ir_fc;
+ bt_field_class *member_ir_fc;
if (!named_fc->fc->in_ir) {
continue;
}
static inline
-struct bt_field_class *borrow_ir_ft_from_field_path(
+bt_field_class *borrow_ir_ft_from_field_path(
struct ctf_field_path *field_path,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
- struct bt_field_class *ir_fc = NULL;
+ bt_field_class *ir_fc = NULL;
struct ctf_field_class *fc = ctf_field_path_borrow_field_class(
field_path, tc, sc, ec);
}
static inline
-struct bt_field_class *ctf_field_class_variant_to_ir(
+bt_field_class *ctf_field_class_variant_to_ir(
struct ctf_field_class_variant *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
int ret;
- struct bt_field_class *ir_fc =
+ bt_field_class *ir_fc =
bt_field_class_variant_create();
uint64_t i;
for (i = 0; i < fc->options->len; i++) {
struct ctf_named_field_class *named_fc =
ctf_field_class_variant_borrow_option_by_index(fc, i);
- struct bt_field_class *option_ir_fc;
+ bt_field_class *option_ir_fc;
BT_ASSERT(named_fc->fc->in_ir);
option_ir_fc = ctf_field_class_to_ir(named_fc->fc, tc, sc, ec);
}
static inline
-struct bt_field_class *ctf_field_class_array_to_ir(
+bt_field_class *ctf_field_class_array_to_ir(
struct ctf_field_class_array *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
- struct bt_field_class *ir_fc;
- struct bt_field_class *elem_ir_fc;
+ bt_field_class *ir_fc;
+ bt_field_class *elem_ir_fc;
if (fc->base.is_text) {
ir_fc = bt_field_class_string_create();
}
static inline
-struct bt_field_class *ctf_field_class_sequence_to_ir(
+bt_field_class *ctf_field_class_sequence_to_ir(
struct ctf_field_class_sequence *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
int ret;
- struct bt_field_class *ir_fc;
- struct bt_field_class *elem_ir_fc;
+ bt_field_class *ir_fc;
+ bt_field_class *elem_ir_fc;
if (fc->base.is_text) {
ir_fc = bt_field_class_string_create();
}
static inline
-struct bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
+bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
- struct bt_field_class *ir_fc = NULL;
+ bt_field_class *ir_fc = NULL;
BT_ASSERT(fc);
BT_ASSERT(fc->in_ir);
}
static inline
-struct bt_field_class *scope_ctf_field_class_to_ir(struct ctf_field_class *fc,
+bt_field_class *scope_ctf_field_class_to_ir(struct ctf_field_class *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
- struct bt_field_class *ir_fc = NULL;
+ bt_field_class *ir_fc = NULL;
if (!fc) {
goto end;
}
static inline
-struct bt_event_class *ctf_event_class_to_ir(struct ctf_event_class *ec,
- struct bt_stream_class *ir_sc, struct ctf_trace_class *tc,
+bt_event_class *ctf_event_class_to_ir(struct ctf_event_class *ec,
+ bt_stream_class *ir_sc, struct ctf_trace_class *tc,
struct ctf_stream_class *sc)
{
int ret;
- struct bt_event_class *ir_ec = NULL;
+ bt_event_class *ir_ec = NULL;
if (ec->is_translated) {
ir_ec = bt_stream_class_borrow_event_class_by_id(
bt_event_class_put_ref(ir_ec);
if (ec->spec_context_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
ec->spec_context_fc, tc, sc, ec);
if (ir_fc) {
}
if (ec->payload_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
ec->payload_fc, tc, sc, ec);
if (ir_fc) {
static inline
-struct bt_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *sc,
- struct bt_trace_class *ir_tc, struct ctf_trace_class *tc)
+bt_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *sc,
+ bt_trace_class *ir_tc, struct ctf_trace_class *tc)
{
int ret;
- struct bt_stream_class *ir_sc = NULL;
+ bt_stream_class *ir_sc = NULL;
struct ctf_field_class_int *int_fc;
if (sc->is_translated) {
bt_stream_class_put_ref(ir_sc);
if (sc->packet_context_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
sc->packet_context_fc, tc, sc, NULL);
if (ir_fc) {
}
if (sc->event_header_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
sc->event_header_fc, tc, sc, NULL);
if (ir_fc) {
}
if (sc->event_common_context_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
sc->event_common_context_fc, tc, sc, NULL);
if (ir_fc) {
}
static inline
-int ctf_trace_class_to_ir(struct bt_trace_class *ir_tc,
+int ctf_trace_class_to_ir(bt_trace_class *ir_tc,
struct ctf_trace_class *tc)
{
int ret = 0;
}
if (tc->packet_header_fc) {
- struct bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
tc->packet_header_fc, tc, NULL, NULL);
if (ir_fc) {
}
BT_HIDDEN
-int ctf_trace_class_translate(struct bt_trace_class *ir_tc,
+int ctf_trace_class_translate(bt_trace_class *ir_tc,
struct ctf_trace_class *tc)
{
int ret = 0;
for (i = 0; i < tc->stream_classes->len; i++) {
uint64_t j;
struct ctf_stream_class *sc = tc->stream_classes->pdata[i];
- struct bt_stream_class *ir_sc;
+ bt_stream_class *ir_sc;
ir_sc = ctf_stream_class_to_ir(sc, ir_tc, tc);
if (!ir_sc) {
for (j = 0; j < sc->event_classes->len; j++) {
struct ctf_event_class *ec = sc->event_classes->pdata[j];
- struct bt_event_class *ir_ec;
+ bt_event_class *ir_ec;
ir_ec = ctf_event_class_to_ir(ec, ir_sc, tc, sc);
if (!ir_ec) {
static inline
int find_mapped_clock_class(struct ctf_field_class *fc,
- struct bt_clock_class **clock_class)
+ bt_clock_class **clock_class)
{
int ret = 0;
uint64_t i;
struct ctf_stream_class *stream_class)
{
int ret = 0;
- struct bt_clock_class *clock_class =
+ bt_clock_class *clock_class =
stream_class->default_clock_class;
uint64_t i;
{
uint64_t i;
int ret = 0;
- struct bt_clock_class *clock_class = NULL;
+ bt_clock_class *clock_class = NULL;
ret = find_mapped_clock_class(ctf_tc->packet_header_fc,
&clock_class);
int ctf_trace_class_resolve_field_classes(struct ctf_trace_class *tc);
BT_HIDDEN
-int ctf_trace_class_translate(struct bt_trace_class *ir_tc,
+int ctf_trace_class_translate(bt_trace_class *ir_tc,
struct ctf_trace_class *tc);
BT_HIDDEN
bool in_ir;
/* Weak, set during translation. NULL if `in_ir` is false below. */
- struct bt_field_class *ir_fc;
+ bt_field_class *ir_fc;
};
struct ctf_field_class_bit_array {
int64_t storing_index;
/* Owned by this */
- struct bt_clock_class *mapped_clock_class;
+ bt_clock_class *mapped_clock_class;
};
struct ctf_range {
struct ctf_field_class *payload_fc;
/* Weak, set during translation */
- struct bt_event_class *ir_ec;
+ bt_event_class *ir_ec;
};
struct ctf_stream_class {
GHashTable *event_classes_by_id;
/* Owned by this */
- struct bt_clock_class *default_clock_class;
+ bt_clock_class *default_clock_class;
/* Weak, set during translation */
- struct bt_stream_class *ir_sc;
+ bt_stream_class *ir_sc;
};
enum ctf_trace_class_env_entry_type {
uint64_t stored_value_count;
- /* Array of `struct bt_clock_class *` (owned by this) */
+ /* Array of `bt_clock_class *` (owned by this) */
GPtrArray *clock_classes;
/* Array of `struct ctf_stream_class *` */
bool is_translated;
/* Weak, set during translation */
- struct bt_trace_class *ir_tc;
+ bt_trace_class *ir_tc;
};
static inline
}
static inline
-struct bt_clock_class *ctf_trace_class_borrow_clock_class_by_name(
+bt_clock_class *ctf_trace_class_borrow_clock_class_by_name(
struct ctf_trace_class *tc, const char *name)
{
uint64_t i;
- struct bt_clock_class *ret_cc = NULL;
+ bt_clock_class *ret_cc = NULL;
BT_ASSERT(tc);
BT_ASSERT(name);
for (i = 0; i < tc->clock_classes->len; i++) {
- struct bt_clock_class *cc = tc->clock_classes->pdata[i];
+ bt_clock_class *cc = tc->clock_classes->pdata[i];
const char *cc_name = bt_clock_class_get_name(cc);
BT_ASSERT(cc_name);
}
BT_HIDDEN
-struct bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(
+bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(
struct ctf_metadata_decoder *mdec)
{
return ctf_visitor_generate_ir_get_ir_trace_class(mdec->visitor);
#include <stdint.h>
#include <stdbool.h>
-struct bt_trace;
+#include <babeltrace/babeltrace.h>
/* A CTF metadata decoder object */
struct ctf_metadata_decoder;
struct ctf_metadata_decoder *metadata_decoder, FILE *fp);
BT_HIDDEN
-struct bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(
+bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(
struct ctf_metadata_decoder *mdec);
BT_HIDDEN
*/
struct ctx {
/* Trace IR trace class being filled (owned by this) */
- struct bt_trace_class *trace_class;
+ bt_trace_class *trace_class;
/* CTF meta trace being filled (owned by this) */
struct ctf_trace_class *ctf_tc;
int signedness = 0;
struct ctf_node *expression;
uint64_t alignment = 0, size = 0;
- struct bt_clock_class *mapped_clock_class = NULL;
+ 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_DECIMAL;
int auto_map_field_to_trace_clock_class(struct ctx *ctx,
struct ctf_field_class *fc)
{
- struct bt_clock_class *clock_class_to_map_to = NULL;
+ bt_clock_class *clock_class_to_map_to = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
int ret = 0;
uint64_t clock_class_count;
static
int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
- struct bt_clock_class *clock, int *set, int64_t *offset_seconds,
+ bt_clock_class *clock, int *set, int64_t *offset_seconds,
uint64_t *offset_cycles)
{
int ret = 0;
static
void apply_clock_class_offset(struct ctx *ctx,
- struct bt_clock_class *clock)
+ bt_clock_class *clock)
{
uint64_t freq;
int64_t offset_s_to_apply = ctx->decoder_config.clock_class_offset_s;
{
int ret = 0;
int set = 0;
- struct bt_clock_class *clock;
+ bt_clock_class *clock;
struct ctf_node *entry_node;
struct bt_list_head *decl_list = &clock_node->u.clock.declaration_list;
const char *clock_class_name;
}
BT_HIDDEN
-struct bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
+bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
struct ctf_visitor_generate_ir *visitor)
{
struct ctx *ctx = (void *) visitor;
*
* Field is borrowed.
*/
- struct bt_field *base;
+ bt_field *base;
/* Index of next field to set */
size_t index;
struct stack *stack;
/* Current notification iterator to create notifications (weak) */
- struct bt_self_notification_iterator *notif_iter;
+ bt_self_notification_iterator *notif_iter;
/*
* Current dynamic scope field pointer.
* This is set by read_dscope_begin_state() and contains the
* value of one of the pointers in `dscopes` below.
*/
- struct bt_field *cur_dscope_field;
+ bt_field *cur_dscope_field;
/*
* True if we're done filling a string field from a text
} meta;
/* Current packet header field wrapper (NULL if not created yet) */
- struct bt_packet_header_field *packet_header_field;
+ bt_packet_header_field *packet_header_field;
/* Current packet header field wrapper (NULL if not created yet) */
- struct bt_packet_context_field *packet_context_field;
+ bt_packet_context_field *packet_context_field;
/* Current event header field (NULL if not created yet) */
- struct bt_event_header_field *event_header_field;
+ bt_event_header_field *event_header_field;
/* Current packet (NULL if not created yet) */
- struct bt_packet *packet;
+ bt_packet *packet;
/* Current stream (NULL if not set yet) */
- struct bt_stream *stream;
+ bt_stream *stream;
/* Current event (NULL if not created yet) */
- struct bt_event *event;
+ bt_event *event;
/* Current event notification (NULL if not created yet) */
- struct bt_notification *event_notif;
+ bt_notification *event_notif;
/* Database of current dynamic scopes */
struct {
- struct bt_field *trace_packet_header;
- struct bt_field *stream_packet_context;
- struct bt_field *event_header;
- struct bt_field *event_common_context;
- struct bt_field *event_spec_context;
- struct bt_field *event_payload;
+ bt_field *trace_packet_header;
+ bt_field *stream_packet_context;
+ bt_field *event_header;
+ bt_field *event_common_context;
+ bt_field *event_spec_context;
+ bt_field *event_payload;
} dscopes;
/* Current state */
}
static
-void stack_push(struct stack *stack, struct bt_field *base)
+void stack_push(struct stack *stack, bt_field *base)
{
struct stack_entry *entry;
struct bt_notif_iter *notit,
struct ctf_field_class *dscope_fc,
enum state done_state, enum state continue_state,
- struct bt_field *dscope_field)
+ bt_field *dscope_field)
{
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
enum bt_bfcr_status bfcr_status;
enum bt_notif_iter_status set_current_stream(struct bt_notif_iter *notit)
{
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
- struct bt_stream *stream = NULL;
+ bt_stream *stream = NULL;
BT_LOGV("Calling user function (get stream): notit-addr=%p, "
"stream-class-addr=%p, stream-class-id=%" PRId64,
enum bt_notif_iter_status set_current_packet(struct bt_notif_iter *notit)
{
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
- struct bt_packet *packet = NULL;
+ bt_packet *packet = NULL;
BT_LOGV("Creating packet for packet notification: "
"notit-addr=%p", notit);
struct bt_notif_iter *notit)
{
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
- struct bt_notification *notif = NULL;
+ bt_notification *notif = NULL;
BT_ASSERT(notit->meta.ec);
BT_ASSERT(notit->packet);
}
static
-struct bt_field *borrow_next_field(struct bt_notif_iter *notit)
+bt_field *borrow_next_field(struct bt_notif_iter *notit)
{
- struct bt_field *next_field = NULL;
- struct bt_field *base_field;
- const struct bt_field_class *base_fc;
+ bt_field *next_field = NULL;
+ bt_field *base_field;
+ const bt_field_class *base_fc;
size_t index;
BT_ASSERT(!stack_empty(notit->stack));
{
struct bt_notif_iter *notit = data;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- struct bt_field *field = NULL;
+ bt_field *field = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
BT_LOGV("Unsigned integer function called from BFCR: "
int ret;
struct bt_notif_iter *notit = data;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- struct bt_field *string_field = NULL;
+ bt_field *string_field = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
char str[2] = {'\0', '\0'};
struct ctf_field_class *fc, void *data)
{
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- struct bt_field *field = NULL;
+ bt_field *field = NULL;
struct bt_notif_iter *notit = data;
struct ctf_field_class_int *int_fc = (void *) fc;
struct ctf_field_class *fc, void *data)
{
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- struct bt_field *field = NULL;
+ bt_field *field = NULL;
struct bt_notif_iter *notit = data;
BT_LOGV("Floating point number function called from BFCR: "
enum bt_bfcr_status bfcr_string_begin_cb(
struct ctf_field_class *fc, void *data)
{
- struct bt_field *field = NULL;
+ bt_field *field = NULL;
struct bt_notif_iter *notit = data;
int ret;
size_t len, struct ctf_field_class *fc, void *data)
{
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- struct bt_field *field = NULL;
+ bt_field *field = NULL;
struct bt_notif_iter *notit = data;
int ret;
struct ctf_field_class *fc, void *data)
{
struct bt_notif_iter *notit = data;
- struct bt_field *field;
+ bt_field *field;
BT_LOGV("Compound (beginning) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
static
int64_t bfcr_get_sequence_length_cb(struct ctf_field_class *fc, void *data)
{
- struct bt_field *seq_field;
+ bt_field *seq_field;
struct bt_notif_iter *notit = data;
struct ctf_field_class_sequence *seq_fc = (void *) fc;
int64_t length = -1;
var_fc, (uint64_t) option_index);
if (selected_option->fc->in_ir) {
- struct bt_field *var_field = stack_top(notit->stack)->base;
+ bt_field *var_field = stack_top(notit->stack)->base;
ret = bt_field_variant_select_option_field(
var_field, option_index);
static
void set_event_default_clock_value(struct bt_notif_iter *notit)
{
- struct bt_event *event =
+ bt_event *event =
bt_notification_event_borrow_event(
notit->event_notif);
- struct bt_stream_class *sc = notit->meta.sc->ir_sc;
+ bt_stream_class *sc = notit->meta.sc->ir_sc;
BT_ASSERT(event);
static
void notify_new_stream(struct bt_notif_iter *notit,
- struct bt_notification **notification)
+ bt_notification **notification)
{
enum bt_notif_iter_status status;
- struct bt_notification *ret = NULL;
+ bt_notification *ret = NULL;
status = set_current_stream(notit);
if (status != BT_NOTIF_ITER_STATUS_OK) {
static
void notify_end_of_stream(struct bt_notif_iter *notit,
- struct bt_notification **notification)
+ bt_notification **notification)
{
- struct bt_notification *ret;
+ bt_notification *ret;
if (!notit->stream) {
BT_LOGE("Cannot create stream for stream notification: "
static
void notify_new_packet(struct bt_notif_iter *notit,
- struct bt_notification **notification)
+ bt_notification **notification)
{
int ret;
enum bt_notif_iter_status status;
- struct bt_notification *notif = NULL;
- const struct bt_stream_class *sc;
+ bt_notification *notif = NULL;
+ const bt_stream_class *sc;
status = set_current_packet(notit);
if (status != BT_NOTIF_ITER_STATUS_OK) {
static
void notify_end_of_packet(struct bt_notif_iter *notit,
- struct bt_notification **notification)
+ bt_notification **notification)
{
- struct bt_notification *notif;
+ bt_notification *notif;
if (!notit->packet) {
return;
enum bt_notif_iter_status bt_notif_iter_get_next_notification(
struct bt_notif_iter *notit,
- struct bt_self_notification_iterator *notif_iter,
- struct bt_notification **notification)
+ bt_self_notification_iterator *notif_iter,
+ bt_notification **notification)
{
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
BT_HIDDEN
enum bt_notif_iter_status bt_notif_iter_borrow_packet_header_context_fields(
struct bt_notif_iter *notit,
- struct bt_field **packet_header_field,
- struct bt_field **packet_context_field)
+ bt_field **packet_header_field,
+ bt_field **packet_context_field)
{
int ret;
enum bt_notif_iter_status status = BT_NOTIF_ITER_STATUS_OK;
* @returns Stream instance (weak reference) or
* \c NULL on error
*/
- struct bt_stream * (* borrow_stream)(
- struct bt_stream_class *stream_class,
+ bt_stream * (* borrow_stream)(
+ bt_stream_class *stream_class,
int64_t stream_id, void *data);
};
BT_HIDDEN
enum bt_notif_iter_status bt_notif_iter_get_next_notification(
struct bt_notif_iter *notit,
- struct bt_self_notification_iterator *notif_iter,
- struct bt_notification **notification);
+ bt_self_notification_iterator *notif_iter,
+ bt_notification **notification);
/**
* Returns the first packet header and context fields. This function
BT_HIDDEN
enum bt_notif_iter_status bt_notif_iter_borrow_packet_header_context_fields(
struct bt_notif_iter *notit,
- struct bt_field **packet_header_field,
- struct bt_field **packet_context_field);
+ bt_field **packet_header_field,
+ bt_field **packet_context_field);
struct bt_notif_iter_packet_properties {
uint64_t exp_packet_total_size;
#include "writer.h"
static
-void unref_stream_class(const struct bt_stream_class *writer_stream_class)
+void unref_stream_class(const bt_stream_class *writer_stream_class)
{
bt_stream_class_put_ref(writer_stream_class);
}
static
-void unref_stream(const struct bt_stream_class *writer_stream)
+void unref_stream(const bt_stream_class *writer_stream)
{
bt_stream_class_put_ref(writer_stream);
}
gboolean empty_streams_ht(gpointer key, gpointer value, gpointer user_data)
{
int ret;
- const struct bt_stream *writer_stream = value;
+ const bt_stream *writer_stream = value;
ret = bt_stream_flush(writer_stream);
if (ret) {
}
static
-void trace_is_static_listener(const struct bt_trace *trace, void *data)
+void trace_is_static_listener(const bt_trace *trace, void *data)
{
struct fs_writer *fs_writer = data;
int trace_completed = 1;
}
static
-const struct bt_stream_class *insert_new_stream_class(
+const bt_stream_class *insert_new_stream_class(
struct writer_component *writer_component,
struct fs_writer *fs_writer,
- const struct bt_stream_class *stream_class)
+ const bt_stream_class *stream_class)
{
- const struct bt_stream_class *writer_stream_class = NULL;
- const struct bt_trace *trace = NULL, *writer_trace = NULL;
+ 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;
static
enum fs_writer_stream_state *insert_new_stream_state(
struct writer_component *writer_component,
- struct fs_writer *fs_writer, const struct bt_stream *stream)
+ struct fs_writer *fs_writer, const bt_stream *stream)
{
enum fs_writer_stream_state *v = NULL;
static
int make_trace_path(struct writer_component *writer_component,
- const struct bt_trace *trace, char *trace_path)
+ const bt_trace *trace, char *trace_path)
{
int ret;
const char *trace_name;
static
struct fs_writer *insert_new_writer(
struct writer_component *writer_component,
- const struct bt_trace *trace)
+ const bt_trace *trace)
{
struct bt_ctf_writer *ctf_writer = NULL;
- const struct bt_trace *writer_trace = NULL;
+ const bt_trace *writer_trace = NULL;
char trace_path[PATH_MAX];
enum bt_component_status ret;
- const struct bt_stream *stream = NULL;
+ const bt_stream *stream = NULL;
struct fs_writer *fs_writer = NULL;
int nr_stream, i;
static
struct fs_writer *get_fs_writer(struct writer_component *writer_component,
- const struct bt_stream_class *stream_class)
+ const bt_stream_class *stream_class)
{
- const struct bt_trace *trace = NULL;
+ const bt_trace *trace = NULL;
struct fs_writer *fs_writer;
trace = bt_stream_class_get_trace(stream_class);
static
struct fs_writer *get_fs_writer_from_stream(
struct writer_component *writer_component,
- const struct bt_stream *stream)
+ const bt_stream *stream)
{
- const struct bt_stream_class *stream_class = NULL;
+ const bt_stream_class *stream_class = NULL;
struct fs_writer *fs_writer;
stream_class = bt_stream_get_class(stream);
}
static
-const struct bt_stream_class *lookup_stream_class(
+const bt_stream_class *lookup_stream_class(
struct writer_component *writer_component,
- const struct bt_stream_class *stream_class)
+ const bt_stream_class *stream_class)
{
struct fs_writer *fs_writer = get_fs_writer(
writer_component, stream_class);
BT_ASSERT(fs_writer);
- return (const struct bt_stream_class *) g_hash_table_lookup(
+ return (const bt_stream_class *) g_hash_table_lookup(
fs_writer->stream_class_map, (gpointer) stream_class);
}
static
-const struct bt_stream *lookup_stream(struct writer_component *writer_component,
- const struct bt_stream *stream)
+const bt_stream *lookup_stream(struct writer_component *writer_component,
+ const bt_stream *stream)
{
struct fs_writer *fs_writer = get_fs_writer_from_stream(
writer_component, stream);
BT_ASSERT(fs_writer);
- return (const struct bt_stream *) g_hash_table_lookup(
+ return (const bt_stream *) g_hash_table_lookup(
fs_writer->stream_map, (gpointer) stream);
}
static
-const struct bt_stream *insert_new_stream(
+const bt_stream *insert_new_stream(
struct writer_component *writer_component,
struct fs_writer *fs_writer,
- const struct bt_stream_class *stream_class,
- const struct bt_stream *stream)
+ const bt_stream_class *stream_class,
+ const bt_stream *stream)
{
- const struct bt_stream *writer_stream = NULL;
- const struct bt_stream_class *writer_stream_class = NULL;
+ const bt_stream *writer_stream = NULL;
+ const bt_stream_class *writer_stream_class = NULL;
struct bt_ctf_writer *ctf_writer = bt_object_get_ref(fs_writer->writer);
writer_stream_class = lookup_stream_class(writer_component,
}
static
-const struct bt_event_class *get_event_class(struct writer_component *writer_component,
- const struct bt_stream_class *writer_stream_class,
- const struct bt_event_class *event_class)
+const bt_event_class *get_event_class(struct writer_component *writer_component,
+ const bt_stream_class *writer_stream_class,
+ const bt_event_class *event_class)
{
return bt_stream_class_get_event_class_by_id(writer_stream_class,
bt_event_class_get_id(event_class));
}
static
-const struct bt_stream *get_writer_stream(
+const bt_stream *get_writer_stream(
struct writer_component *writer_component,
- const struct bt_packet *packet, const struct bt_stream *stream)
+ const bt_packet *packet, const bt_stream *stream)
{
- const struct bt_stream *writer_stream = NULL;
+ const bt_stream *writer_stream = NULL;
writer_stream = lookup_stream(writer_component, stream);
if (!writer_stream) {
BT_HIDDEN
enum bt_component_status writer_stream_begin(
struct writer_component *writer_component,
- const struct bt_stream *stream)
+ const bt_stream *stream)
{
- const struct bt_stream_class *stream_class = NULL;
+ const bt_stream_class *stream_class = NULL;
struct fs_writer *fs_writer;
- const struct bt_stream *writer_stream = NULL;
+ const bt_stream *writer_stream = NULL;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
enum fs_writer_stream_state *state;
BT_HIDDEN
enum bt_component_status writer_stream_end(
struct writer_component *writer_component,
- const struct bt_stream *stream)
+ const bt_stream *stream)
{
- const struct bt_stream_class *stream_class = NULL;
+ const bt_stream_class *stream_class = NULL;
struct fs_writer *fs_writer;
- const struct bt_trace *trace = NULL;
+ const bt_trace *trace = NULL;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
enum fs_writer_stream_state *state;
BT_HIDDEN
enum bt_component_status writer_new_packet(
struct writer_component *writer_component,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_stream *stream = NULL, *writer_stream = NULL;
+ const bt_stream *stream = NULL, *writer_stream = NULL;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
int int_ret;
BT_HIDDEN
enum bt_component_status writer_close_packet(
struct writer_component *writer_component,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_stream *stream = NULL, *writer_stream = NULL;
+ const bt_stream *stream = NULL, *writer_stream = NULL;
enum bt_component_status ret;
stream = bt_packet_get_stream(packet);
BT_HIDDEN
enum bt_component_status writer_output_event(
struct writer_component *writer_component,
- const struct bt_event *event)
+ const bt_event *event)
{
enum bt_component_status ret;
- const struct bt_event_class *event_class = NULL, *writer_event_class = NULL;
- const struct bt_stream *stream = NULL, *writer_stream = NULL;
- const struct bt_stream_class *stream_class = NULL, *writer_stream_class = NULL;
- const struct bt_event *writer_event = NULL;
+ 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;
+ const bt_event *writer_event = NULL;
int int_ret;
- const struct bt_trace *writer_trace = NULL;
+ const bt_trace *writer_trace = NULL;
event_class = bt_event_get_class(event);
BT_ASSERT(event_class);
}
BT_HIDDEN
-void writer_component_finalize(struct bt_self_component *component)
+void writer_component_finalize(bt_self_component *component)
{
struct writer_component *writer_component = (struct writer_component *)
bt_self_component_get_user_data(component);
static
enum bt_component_status handle_notification(
struct writer_component *writer_component,
- const struct bt_notification *notification)
+ const bt_notification *notification)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
switch (bt_notification_get_type(notification)) {
case BT_NOTIFICATION_TYPE_PACKET_BEGINNING:
{
- const struct bt_packet *packet =
+ const bt_packet *packet =
bt_notification_packet_beginning_get_packet(notification);
if (!packet) {
}
case BT_NOTIFICATION_TYPE_PACKET_END:
{
- const struct bt_packet *packet =
+ const bt_packet *packet =
bt_notification_packet_end_get_packet(notification);
if (!packet) {
}
case BT_NOTIFICATION_TYPE_EVENT:
{
- const struct bt_event *event = bt_notification_event_get_event(
+ const bt_event *event = bt_notification_event_get_event(
notification);
if (!event) {
}
case BT_NOTIFICATION_TYPE_STREAM_BEGINNING:
{
- const struct bt_stream *stream =
+ const bt_stream *stream =
bt_notification_stream_beginning_get_stream(notification);
if (!stream) {
}
case BT_NOTIFICATION_TYPE_STREAM_END:
{
- const struct bt_stream *stream =
+ const bt_stream *stream =
bt_notification_stream_end_get_stream(notification);
if (!stream) {
BT_HIDDEN
void writer_component_port_connected(
- struct bt_self_component *component,
+ bt_self_component *component,
struct bt_private_port *self_port,
- const struct bt_port *other_port)
+ const bt_port *other_port)
{
struct bt_private_connection *connection;
struct writer_component *writer;
}
BT_HIDDEN
-enum bt_component_status writer_run(struct bt_self_component *component)
+enum bt_component_status writer_run(bt_self_component *component)
{
enum bt_component_status ret;
- const struct bt_notification *notification = NULL;
- struct bt_notification_iterator *it;
+ const bt_notification *notification = NULL;
+ bt_notification_iterator *it;
struct writer_component *writer_component =
bt_self_component_get_user_data(component);
enum bt_notification_iterator_status it_ret;
static
enum bt_component_status apply_one_bool(const char *key,
- struct bt_value *params,
+ bt_value *params,
bool *option,
bool *found)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
enum bt_value_status status;
bt_bool bool_val;
BT_HIDDEN
enum bt_component_status writer_component_init(
- struct bt_self_component *component, struct bt_value *params,
+ bt_self_component *component, bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
enum bt_value_status value_ret;
struct writer_component *writer_component = create_writer_component();
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
const char *path;
if (!writer_component) {
GString *trace_name_base;
/* For the directory name suffix. */
int trace_id;
- /* Map between struct bt_trace and struct fs_writer. */
+ /* Map between bt_trace and struct fs_writer. */
GHashTable *trace_map;
FILE *err;
- struct bt_notification_iterator *input_iterator;
+ bt_notification_iterator *input_iterator;
bool error;
bool single_trace;
unsigned int nr_traces;
struct fs_writer {
struct bt_ctf_writer *writer;
- const struct bt_trace *trace;
- const struct bt_trace *writer_trace;
+ const bt_trace *trace;
+ const bt_trace *writer_trace;
struct writer_component *writer_component;
int static_listener_id;
int trace_static;
struct fs_writer *fs_writer);
BT_HIDDEN
enum bt_component_status writer_output_event(struct writer_component *writer,
- const struct bt_event *event);
+ const bt_event *event);
BT_HIDDEN
enum bt_component_status writer_new_packet(struct writer_component *writer,
- const struct bt_packet *packet);
+ const bt_packet *packet);
BT_HIDDEN
enum bt_component_status writer_close_packet(struct writer_component *writer,
- const struct bt_packet *packet);
+ const bt_packet *packet);
BT_HIDDEN
enum bt_component_status writer_stream_begin(struct writer_component *writer,
- const struct bt_stream *stream);
+ const bt_stream *stream);
BT_HIDDEN
enum bt_component_status writer_stream_end(struct writer_component *writer,
- const struct bt_stream *stream);
+ const bt_stream *stream);
BT_HIDDEN
enum bt_component_status writer_component_init(
- struct bt_self_component *component, struct bt_value *params,
+ bt_self_component *component, bt_value *params,
void *init_method_data);
BT_HIDDEN
-enum bt_component_status writer_run(struct bt_self_component *component);
+enum bt_component_status writer_run(bt_self_component *component);
BT_HIDDEN
void writer_component_port_connected(
- struct bt_self_component *component,
+ bt_self_component *component,
struct bt_private_port *self_port,
- const struct bt_port *other_port);
+ const bt_port *other_port);
BT_HIDDEN
-void writer_component_finalize(struct bt_self_component *component);
+void writer_component_finalize(bt_self_component *component);
#endif /* BABELTRACE_PLUGIN_WRITER_H */
}
static
-struct bt_stream *medop_borrow_stream(
- struct bt_stream_class *stream_class, int64_t stream_id,
+bt_stream *medop_borrow_stream(
+ bt_stream_class *stream_class, int64_t stream_id,
void *data)
{
struct ctf_fs_ds_file *ds_file = data;
- struct bt_stream_class *ds_file_stream_class;
- struct bt_stream *stream = NULL;
+ bt_stream_class *ds_file_stream_class;
+ bt_stream *stream = NULL;
ds_file_stream_class = bt_stream_borrow_class(
ds_file->stream);
}
static
-int convert_cycles_to_ns(struct bt_clock_class *clock_class,
+int convert_cycles_to_ns(bt_clock_class *clock_class,
uint64_t cycles, int64_t *ns)
{
return bt_clock_class_cycles_to_ns_from_origin(clock_class, cycles,
BT_HIDDEN
struct ctf_fs_ds_file *ctf_fs_ds_file_create(
struct ctf_fs_trace *ctf_fs_trace,
- struct bt_self_notification_iterator *pc_notif_iter,
+ bt_self_notification_iterator *pc_notif_iter,
struct bt_notif_iter *notif_iter,
- struct bt_stream *stream, const char *path)
+ bt_stream *stream, const char *path)
{
int ret;
const size_t page_size = bt_common_get_page_size();
BT_HIDDEN
enum bt_notification_iterator_status ctf_fs_ds_file_next(
struct ctf_fs_ds_file *ds_file,
- struct bt_notification **notif)
+ bt_notification **notif)
{
enum bt_notif_iter_status notif_iter_status;
enum bt_notification_iterator_status status;
BT_HIDDEN
int ctf_fs_ds_file_borrow_packet_header_context_fields(
struct ctf_fs_ds_file *ds_file,
- struct bt_field **packet_header_field,
- struct bt_field **packet_context_field)
+ bt_field **packet_header_field,
+ bt_field **packet_context_field)
{
enum bt_notif_iter_status notif_iter_status;
int ret = 0;
struct ctf_fs_metadata *metadata;
/* Weak */
- struct bt_self_notification_iterator *pc_notif_iter;
+ bt_self_notification_iterator *pc_notif_iter;
/* Owned by this */
struct ctf_fs_file *file;
/* Owned by this */
- struct bt_stream *stream;
+ bt_stream *stream;
/* Weak */
struct bt_notif_iter *notif_iter;
BT_HIDDEN
struct ctf_fs_ds_file *ctf_fs_ds_file_create(
struct ctf_fs_trace *ctf_fs_trace,
- struct bt_self_notification_iterator *pc_notif_iter,
+ bt_self_notification_iterator *pc_notif_iter,
struct bt_notif_iter *notif_iter,
- struct bt_stream *stream, const char *path);
+ bt_stream *stream, const char *path);
BT_HIDDEN
int ctf_fs_ds_file_borrow_packet_header_context_fields(
struct ctf_fs_ds_file *ds_file,
- struct bt_field **packet_header_field,
- struct bt_field **packet_context_field);
+ bt_field **packet_header_field,
+ bt_field **packet_context_field);
BT_HIDDEN
void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream);
BT_HIDDEN
enum bt_notification_iterator_status ctf_fs_ds_file_next(
struct ctf_fs_ds_file *ds_file,
- struct bt_notification **notif);
+ bt_notification **notif);
BT_HIDDEN
struct ctf_fs_ds_index *ctf_fs_ds_file_build_index(
static
enum bt_self_notification_iterator_status ctf_fs_iterator_next_one(
struct ctf_fs_notif_iter_data *notif_iter_data,
- const struct bt_notification **notif)
+ const bt_notification **notif)
{
enum bt_self_notification_iterator_status status;
- struct bt_notification *priv_notif;
+ bt_notification *priv_notif;
int ret;
BT_ASSERT(notif_iter_data->ds_file);
BT_HIDDEN
enum bt_self_notification_iterator_status ctf_fs_iterator_next(
- struct bt_self_notification_iterator *iterator,
+ bt_self_notification_iterator *iterator,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
return status;
}
-void ctf_fs_iterator_finalize(struct bt_self_notification_iterator *it)
+void ctf_fs_iterator_finalize(bt_self_notification_iterator *it)
{
ctf_fs_notif_iter_data_destroy(
bt_self_notification_iterator_get_data(it));
}
enum bt_self_notification_iterator_status ctf_fs_iterator_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port)
{
struct ctf_fs_port_data *port_data;
struct ctf_fs_notif_iter_data *notif_iter_data = NULL;
ctf_fs_trace_destroy(trace);
}
-void ctf_fs_finalize(struct bt_self_component_source *component)
+void ctf_fs_finalize(bt_self_component_source *component)
{
ctf_fs_destroy(bt_self_component_get_data(
bt_self_component_source_as_self_component(component)));
static
struct ctf_fs_ds_file_group *ctf_fs_ds_file_group_create(
struct ctf_fs_trace *ctf_fs_trace,
- struct bt_stream_class *stream_class,
+ bt_stream_class *stream_class,
uint64_t stream_instance_id)
{
struct ctf_fs_ds_file_group *ds_file_group;
int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace,
const char *path)
{
- struct bt_stream_class *stream_class = NULL;
+ bt_stream_class *stream_class = NULL;
int64_t stream_instance_id = -1;
int64_t begin_ns = -1;
struct ctf_fs_ds_file_group *ds_file_group = NULL;
}
static
-int set_trace_name(struct bt_trace *trace, const char *name_suffix)
+int set_trace_name(bt_trace *trace, const char *name_suffix)
{
int ret = 0;
- const struct bt_trace_class *tc = bt_trace_borrow_class_const(trace);
- const struct bt_value *val;
+ const bt_trace_class *tc = bt_trace_borrow_class_const(trace);
+ const bt_value *val;
GString *name;
name = g_string_new(NULL);
static
struct ctf_fs_component *ctf_fs_create(
- struct bt_self_component_source *self_comp,
- const struct bt_value *params)
+ bt_self_component_source *self_comp,
+ const bt_value *params)
{
struct ctf_fs_component *ctf_fs;
- const struct bt_value *value = NULL;
+ const bt_value *value = NULL;
const char *path_param;
ctf_fs = g_new0(struct ctf_fs_component, 1);
BT_HIDDEN
enum bt_self_component_status ctf_fs_init(
- struct bt_self_component_source *self_comp,
- const struct bt_value *params, UNUSED_VAR void *init_method_data)
+ 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_HIDDEN
enum bt_query_status ctf_fs_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_query_executor *query_exec,
- const char *object, const struct bt_value *params,
- const struct bt_value **result)
+ 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;
struct ctf_metadata_decoder *decoder;
/* Owned by this */
- struct bt_trace_class *trace_class;
+ bt_trace_class *trace_class;
/* Weak (owned by `decoder` above) */
struct ctf_trace_class *tc;
struct ctf_fs_component {
/* Weak, guaranteed to exist */
- struct bt_self_component_source *self_comp;
+ bt_self_component_source *self_comp;
/* Array of struct ctf_fs_port_data *, owned by this */
GPtrArray *port_data;
struct ctf_fs_metadata *metadata;
/* Owned by this */
- struct bt_trace *trace;
+ bt_trace *trace;
/* Array of struct ctf_fs_ds_file_group *, owned by this */
GPtrArray *ds_file_groups;
GPtrArray *ds_file_infos;
/* Owned by this */
- struct bt_stream_class *stream_class;
+ bt_stream_class *stream_class;
/* Owned by this */
- struct bt_stream *stream;
+ bt_stream *stream;
/* Stream (instance) ID; -1ULL means none */
uint64_t stream_id;
struct ctf_fs_notif_iter_data {
/* Weak */
- struct bt_self_notification_iterator *pc_notif_iter;
+ bt_self_notification_iterator *pc_notif_iter;
/* Weak, belongs to ctf_fs_trace */
struct ctf_fs_ds_file_group *ds_file_group;
BT_HIDDEN
enum bt_self_component_status ctf_fs_init(
- struct bt_self_component_source *source,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_source *source,
+ const bt_value *params, void *init_method_data);
BT_HIDDEN
-void ctf_fs_finalize(struct bt_self_component_source *component);
+void ctf_fs_finalize(bt_self_component_source *component);
BT_HIDDEN
enum bt_query_status ctf_fs_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_query_executor *query_exec,
- const char *object, const struct bt_value *params,
- const struct bt_value **result);
+ bt_self_component_class_source *comp_class,
+ const bt_query_executor *query_exec,
+ const char *object, const bt_value *params,
+ const bt_value **result);
BT_HIDDEN
struct ctf_fs_trace *ctf_fs_trace_create(const char *path, const char *name,
BT_HIDDEN
enum bt_self_notification_iterator_status ctf_fs_iterator_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port);
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port);
BT_HIDDEN
-void ctf_fs_iterator_finalize(struct bt_self_notification_iterator *it);
+void ctf_fs_iterator_finalize(bt_self_notification_iterator *it);
BT_HIDDEN
enum bt_self_notification_iterator_status ctf_fs_iterator_next(
- struct bt_self_notification_iterator *iterator,
+ bt_self_notification_iterator *iterator,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count);
BT_HIDDEN
enum bt_query_status metadata_info_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_value *params,
- const struct bt_value **user_result)
+ 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;
- struct bt_value *result = NULL;
- const struct bt_value *path_value = NULL;
+ bt_value *result = NULL;
+ const bt_value *path_value = NULL;
char *metadata_text = NULL;
FILE *metadata_fp = NULL;
GString *g_metadata_text = NULL;
}
static
-int add_range(struct bt_value *info, struct range *range,
+int add_range(bt_value *info, struct range *range,
const char *range_name)
{
int ret = 0;
enum bt_value_status status;
- struct bt_value *range_map = NULL;
+ bt_value *range_map = NULL;
if (!range->set) {
/* Not an error. */
}
static
-int add_stream_ids(struct bt_value *info, const struct bt_stream *stream)
+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;
- const struct bt_stream_class *stream_class = NULL;
+ const bt_stream_class *stream_class = NULL;
stream_instance_id = bt_stream_get_id(stream);
if (stream_instance_id != -1) {
static
int populate_stream_info(struct ctf_fs_ds_file_group *group,
- struct bt_value *group_info, struct range *stream_range)
+ bt_value *group_info, struct range *stream_range)
{
int ret = 0;
size_t file_idx;
enum bt_value_status status;
- struct bt_value *file_paths;
+ bt_value *file_paths;
stream_range->begin_ns = INT64_MAX;
stream_range->end_ns = 0;
static
int populate_trace_info(const char *trace_path, const char *trace_name,
- struct bt_value *trace_info)
+ bt_value *trace_info)
{
int ret = 0;
size_t group_idx;
struct ctf_fs_trace *trace = NULL;
enum bt_value_status status;
- struct bt_value *file_groups;
+ bt_value *file_groups;
struct range trace_range = {
.begin_ns = INT64_MAX,
.end_ns = 0,
/* Find range of all stream groups, and of the trace. */
for (group_idx = 0; group_idx < trace->ds_file_groups->len;
group_idx++) {
- struct bt_value *group_info;
+ bt_value *group_info;
struct range group_range = { .set = false };
struct ctf_fs_ds_file_group *group = g_ptr_array_index(
trace->ds_file_groups, group_idx);
BT_HIDDEN
enum bt_query_status trace_info_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_value *params,
- const struct bt_value **user_result)
+ 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;
- struct bt_value *result = NULL;
- const struct bt_value *path_value = NULL;
+ bt_value *result = NULL;
+ const bt_value *path_value = NULL;
int ret = 0;
const char *path = NULL;
GList *trace_paths = NULL;
GString *trace_path = tp_node->data;
GString *trace_name = tn_node->data;
enum bt_value_status status;
- struct bt_value *trace_info;
+ bt_value *trace_info;
trace_info = bt_value_map_create();
if (!trace_info) {
BT_HIDDEN
enum bt_query_status metadata_info_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_value *params, const struct bt_value **result);
+ bt_self_component_class_source *comp_class,
+ const bt_value *params, const bt_value **result);
BT_HIDDEN
enum bt_query_status trace_info_query(
- struct bt_self_component_class_source *comp_class,
- const struct bt_value *params, const struct bt_value **result);
+ bt_self_component_class_source *comp_class,
+ const bt_value *params, const bt_value **result);
#endif /* BABELTRACE_PLUGIN_CTF_FS_QUERY_H */
}
static
-const struct bt_stream *medop_get_stream(
- const struct bt_stream_class *stream_class,
+const bt_stream *medop_get_stream(
+ const bt_stream_class *stream_class,
uint64_t stream_id, void *data)
{
struct lttng_live_stream_iterator *lttng_live_stream = data;
struct lttng_live_stream_iterator {
struct lttng_live_stream_iterator_generic p;
- const struct bt_stream *stream;
+ const bt_stream *stream;
struct lttng_live_trace *trace;
struct bt_private_port *port; /* weak ref. */
enum lttng_live_stream_state state;
uint64_t current_packet_end_timestamp;
- const struct bt_notification *packet_end_notif_queue;
+ const bt_notification *packet_end_notif_queue;
uint8_t *buf;
size_t buflen;
};
struct lttng_live_trace {
- struct bt_object obj;
+ bt_object obj;
/* Node of trace list within the session. */
struct bt_list_head node;
uint64_t id; /* ctf trace ID within the session. */
- const struct bt_trace *trace;
+ const bt_trace *trace;
struct lttng_live_metadata *metadata;
- struct bt_clock_class_priority_map *cc_prio_map;
+ bt_clock_class_priority_map *cc_prio_map;
/* List of struct lttng_live_stream_iterator */
struct bt_list_head streams;
* A component instance is an iterator on a single session.
*/
struct lttng_live_component {
- struct bt_object obj;
- struct bt_self_component *private_component; /* weak */
+ bt_object obj;
+ bt_self_component *private_component; /* weak */
struct bt_live_viewer_connection *viewer_connection;
/* List of struct lttng_live_session */
struct bt_private_port *no_stream_port; /* weak */
struct lttng_live_no_stream_iterator *no_stream_iter;
- struct bt_component *downstream_component;
+ bt_component *downstream_component;
};
enum bt_lttng_live_iterator_status {
BT_LTTNG_LIVE_ITERATOR_STATUS_UNSUPPORTED = -4,
};
-enum bt_component_status lttng_live_component_init(struct bt_self_component *source,
- struct bt_value *params, void *init_method_data);
+enum bt_component_status lttng_live_component_init(bt_self_component *source,
+ bt_value *params, void *init_method_data);
-struct bt_component_class_query_method_return lttng_live_query(
- const struct bt_component_class *comp_class,
- const struct bt_query_executor *query_exec,
- const char *object, struct bt_value *params);
+bt_component_class_query_method_return lttng_live_query(
+ const bt_component_class *comp_class,
+ const bt_query_executor *query_exec,
+ const char *object, bt_value *params);
-void lttng_live_component_finalize(struct bt_self_component *component);
+void lttng_live_component_finalize(bt_self_component *component);
-struct bt_notification_iterator_next_method_return lttng_live_iterator_next(
- struct bt_self_notification_iterator *iterator);
+bt_notification_iterator_next_method_return lttng_live_iterator_next(
+ bt_self_notification_iterator *iterator);
enum bt_component_status lttng_live_accept_port_connection(
- struct bt_self_component *private_component,
+ bt_self_component *private_component,
struct bt_private_port *self_private_port,
- const struct bt_port *other_port);
+ const bt_port *other_port);
enum bt_notification_iterator_status lttng_live_iterator_init(
- struct bt_self_notification_iterator *it,
+ bt_self_notification_iterator *it,
struct bt_private_port *port);
-void lttng_live_iterator_finalize(struct bt_self_notification_iterator *it);
+void lttng_live_iterator_finalize(bt_self_notification_iterator *it);
int lttng_live_create_viewer_session(struct lttng_live_component *lttng_live);
int lttng_live_attach_session(struct lttng_live_session *session);
static
void print_stream_state(struct lttng_live_stream_iterator *stream)
{
- const struct bt_port *port;
+ const bt_port *port;
port = bt_port_from_private(stream->port);
print_dbg("stream %s state %s last_inact_ts %" PRId64 " cur_inact_ts %" PRId64,
BT_HIDDEN
bt_bool lttng_live_is_canceled(struct lttng_live_component *lttng_live)
{
- struct bt_component *component;
- const struct bt_graph *graph;
+ bt_component *component;
+ const bt_graph *graph;
bt_bool ret;
if (!lttng_live) {
int lttng_live_remove_port(struct lttng_live_component *lttng_live,
struct bt_private_port *port)
{
- struct bt_component *component;
+ bt_component *component;
int64_t nr_ports;
int ret;
}
static
-void lttng_live_destroy_trace(struct bt_object *obj)
+void lttng_live_destroy_trace(bt_object *obj)
{
struct lttng_live_trace *trace = container_of(obj, struct lttng_live_trace, obj);
}
BT_HIDDEN
-void lttng_live_iterator_finalize(struct bt_self_notification_iterator *it)
+void lttng_live_iterator_finalize(bt_self_notification_iterator *it)
{
struct lttng_live_stream_iterator_generic *s =
bt_self_notification_iterator_get_user_data(it);
enum bt_lttng_live_iterator_status emit_inactivity_notification(
struct lttng_live_component *lttng_live,
struct lttng_live_stream_iterator *lttng_live_stream,
- const struct bt_notification **notification,
+ const bt_notification **notification,
uint64_t timestamp)
{
enum bt_lttng_live_iterator_status ret =
BT_LTTNG_LIVE_ITERATOR_STATUS_OK;
struct lttng_live_trace *trace;
- const struct bt_clock_class *clock_class = NULL;
- struct bt_clock_value *clock_value = NULL;
- const struct bt_notification *notif = NULL;
+ const bt_clock_class *clock_class = NULL;
+ bt_clock_value *clock_value = NULL;
+ const bt_notification *notif = NULL;
int retval;
trace = lttng_live_stream->trace;
enum 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 struct bt_notification **notification)
+ const bt_notification **notification)
{
enum bt_lttng_live_iterator_status ret =
BT_LTTNG_LIVE_ITERATOR_STATUS_OK;
- const struct bt_clock_class *clock_class = NULL;
- struct bt_clock_value *clock_value = NULL;
+ const bt_clock_class *clock_class = NULL;
+ bt_clock_value *clock_value = NULL;
if (lttng_live_stream->state != LTTNG_LIVE_STREAM_QUIESCENT) {
return BT_LTTNG_LIVE_ITERATOR_STATUS_OK;
enum 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 struct bt_notification **notification)
+ const bt_notification **notification)
{
enum bt_lttng_live_iterator_status ret =
BT_LTTNG_LIVE_ITERATOR_STATUS_OK;
* When disconnected from relayd: try to re-connect endlessly.
*/
static
-struct bt_notification_iterator_next_method_return lttng_live_iterator_next_stream(
- struct bt_self_notification_iterator *iterator,
+bt_notification_iterator_next_method_return lttng_live_iterator_next_stream(
+ bt_self_notification_iterator *iterator,
struct lttng_live_stream_iterator *stream_iter)
{
enum bt_lttng_live_iterator_status status;
- struct bt_notification_iterator_next_method_return next_return;
+ bt_notification_iterator_next_method_return next_return;
struct lttng_live_component *lttng_live;
lttng_live = stream_iter->trace->session->lttng_live;
}
static
-struct bt_notification_iterator_next_method_return lttng_live_iterator_next_no_stream(
- struct bt_self_notification_iterator *iterator,
+bt_notification_iterator_next_method_return lttng_live_iterator_next_no_stream(
+ bt_self_notification_iterator *iterator,
struct lttng_live_no_stream_iterator *no_stream_iter)
{
enum bt_lttng_live_iterator_status status;
- struct bt_notification_iterator_next_method_return next_return;
+ bt_notification_iterator_next_method_return next_return;
struct lttng_live_component *lttng_live;
lttng_live = no_stream_iter->lttng_live;
}
BT_HIDDEN
-struct bt_notification_iterator_next_method_return lttng_live_iterator_next(
- struct bt_self_notification_iterator *iterator)
+bt_notification_iterator_next_method_return lttng_live_iterator_next(
+ bt_self_notification_iterator *iterator)
{
struct lttng_live_stream_iterator_generic *s =
bt_self_notification_iterator_get_user_data(iterator);
- struct bt_notification_iterator_next_method_return next_return;
+ bt_notification_iterator_next_method_return next_return;
switch (s->type) {
case LIVE_STREAM_TYPE_NO_STREAM:
BT_HIDDEN
enum bt_notification_iterator_status lttng_live_iterator_init(
- struct bt_self_notification_iterator *it,
+ bt_self_notification_iterator *it,
struct bt_private_port *port)
{
enum bt_notification_iterator_status ret =
}
static
-struct bt_component_class_query_method_return lttng_live_query_list_sessions(
- const struct bt_component_class *comp_class,
- const struct bt_query_executor *query_exec,
- struct bt_value *params)
+bt_component_class_query_method_return lttng_live_query_list_sessions(
+ const bt_component_class *comp_class,
+ const bt_query_executor *query_exec,
+ bt_value *params)
{
- struct bt_component_class_query_method_return query_ret = {
+ bt_component_class_query_method_return query_ret = {
.result = NULL,
.status = BT_QUERY_STATUS_OK,
};
- struct bt_value *url_value = NULL;
+ bt_value *url_value = NULL;
const char *url;
struct bt_live_viewer_connection *viewer_connection = NULL;
}
BT_HIDDEN
-struct bt_component_class_query_method_return lttng_live_query(
- const struct bt_component_class *comp_class,
- const struct bt_query_executor *query_exec,
- const char *object, struct bt_value *params)
+bt_component_class_query_method_return lttng_live_query(
+ const bt_component_class *comp_class,
+ const bt_query_executor *query_exec,
+ const char *object, bt_value *params)
{
- struct bt_component_class_query_method_return ret = {
+ bt_component_class_query_method_return ret = {
.result = NULL,
.status = BT_QUERY_STATUS_OK,
};
}
BT_HIDDEN
-void lttng_live_component_finalize(struct bt_self_component *component)
+void lttng_live_component_finalize(bt_self_component *component)
{
void *data = bt_self_component_get_user_data(component);
}
static
-struct lttng_live_component *lttng_live_component_create(struct bt_value *params,
- struct bt_self_component *private_component)
+struct lttng_live_component *lttng_live_component_create(bt_value *params,
+ bt_self_component *private_component)
{
struct lttng_live_component *lttng_live;
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
const char *url;
enum bt_value_status ret;
BT_HIDDEN
enum bt_component_status lttng_live_component_init(
- struct bt_self_component *private_component,
- struct bt_value *params, void *init_method_data)
+ 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_HIDDEN
enum bt_component_status lttng_live_accept_port_connection(
- struct bt_self_component *private_component,
+ bt_self_component *private_component,
struct bt_private_port *self_private_port,
- const struct bt_port *other_port)
+ const bt_port *other_port)
{
struct lttng_live_component *lttng_live =
bt_self_component_get_user_data(private_component);
- struct bt_component *other_component;
+ bt_component *other_component;
enum bt_component_status status = BT_COMPONENT_STATUS_OK;
- const struct bt_port *self_port = bt_port_from_private(self_private_port);
+ const bt_port *self_port = bt_port_from_private(self_private_port);
other_component = bt_port_get_component(other_port);
bt_component_put_ref(other_component); /* weak */
BT_ASSERT(count >= 0);
for (i = 0; i < count; i++) {
- const struct bt_clock_class *clock_class =
+ const bt_clock_class *clock_class =
bt_trace_get_clock_class_by_index(trace->trace, i);
BT_ASSERT(clock_class);
}
}
-static void connection_release(struct bt_object *obj)
+static void connection_release(bt_object *obj)
{
struct bt_live_viewer_connection *conn =
container_of(obj, struct bt_live_viewer_connection, obj);
}
static
-enum bt_value_status list_update_session(struct bt_value *results,
+enum 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;
- struct bt_value *map = NULL;
- struct bt_value *hostname = NULL;
- struct bt_value *session_name = NULL;
- struct bt_value *btval = NULL;
+ bt_value *map = NULL;
+ bt_value *hostname = NULL;
+ bt_value *session_name = NULL;
+ bt_value *btval = NULL;
int i, len;
bool found = false;
}
static
-enum bt_value_status list_append_session(struct bt_value *results,
+enum 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;
- struct bt_value *map = NULL;
+ bt_value *map = NULL;
GString *url = NULL;
bool found = false;
*/
BT_HIDDEN
-struct bt_value *bt_live_viewer_connection_list_sessions(struct bt_live_viewer_connection *viewer_connection)
+bt_value *bt_live_viewer_connection_list_sessions(struct bt_live_viewer_connection *viewer_connection)
{
- struct bt_value *results = NULL;
+ bt_value *results = NULL;
struct lttng_viewer_cmd cmd;
struct lttng_viewer_list_sessions list;
uint32_t i, sessions_count;
struct lttng_live_component;
struct bt_live_viewer_connection {
- struct bt_object obj;
+ bt_object obj;
GString *url;
void bt_live_viewer_connection_destroy(struct bt_live_viewer_connection *conn);
-struct bt_value *bt_live_viewer_connection_list_sessions(struct bt_live_viewer_connection *viewer_connection);
+bt_value *bt_live_viewer_connection_list_sessions(struct bt_live_viewer_connection *viewer_connection);
#endif /* LTTNG_LIVE_VIEWER_CONNECTION_H */
#include "clock-field.h"
static
-int find_update_struct_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class);
+int find_update_struct_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class);
static
-int find_update_array_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class);
+int find_update_array_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class);
static
-int find_update_enum_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class);
+int find_update_enum_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class);
static
-int find_update_sequence_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class);
+int find_update_sequence_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class);
static
-int find_update_variant_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class);
+int find_update_variant_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class);
static
int copy_find_clock_int_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field);
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field);
static
int copy_find_clock_struct_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field);
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field);
static
int copy_find_clock_array_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field);
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field);
static
int copy_find_clock_sequence_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field);
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field);
static
-int copy_find_clock_variant_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- struct bt_field_type *type, const struct bt_field *copy_field);
+int copy_find_clock_variant_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ bt_field_type *type, const bt_field *copy_field);
static
-int copy_find_clock_enum_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- struct bt_field_type *type, const struct bt_field *copy_field);
+int copy_find_clock_enum_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ bt_field_type *type, const bt_field *copy_field);
static
-int update_header_clock_int_field_type(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int update_header_clock_int_field_type(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
- const struct bt_clock_class *clock = NULL;
+ const bt_clock_class *clock = NULL;
int ret;
clock = bt_field_type_integer_get_mapped_clock_class(type);
}
static
-int find_update_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int ret;
}
static
-int find_update_variant_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_variant_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int count, i, ret;
- struct bt_field_type *entry_type = NULL;
+ bt_field_type *entry_type = NULL;
count = bt_field_type_variant_get_field_count(type);
for (i = 0; i < count; i++) {
}
static
-int find_update_struct_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_struct_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int count, i, ret;
- struct bt_field_type *entry_type = NULL;
+ bt_field_type *entry_type = NULL;
count = bt_field_type_structure_get_field_count(type);
for (i = 0; i < count; i++) {
}
static
-int find_update_sequence_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_sequence_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int ret;
- struct bt_field_type *entry_type = NULL;
+ bt_field_type *entry_type = NULL;
entry_type = bt_field_type_sequence_get_element_type(type);
BT_ASSERT(entry_type);
}
static
-int find_update_array_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_array_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int ret = 0;
- struct bt_field_type *entry_type = NULL;
+ bt_field_type *entry_type = NULL;
entry_type = bt_field_type_array_get_element_type(type);
BT_ASSERT(entry_type);
}
static
-int find_update_enum_clock_fields(FILE *err, struct bt_field_type *type,
- const struct bt_clock_class *writer_clock_class)
+int find_update_enum_clock_fields(FILE *err, bt_field_type *type,
+ const bt_clock_class *writer_clock_class)
{
int ret;
- struct bt_field_type *entry_type = NULL;
+ bt_field_type *entry_type = NULL;
entry_type = bt_field_type_enumeration_get_container_type(type);
BT_ASSERT(entry_type);
}
BT_HIDDEN
-struct bt_field_type *override_header_type(FILE *err,
- struct bt_field_type *type,
- const struct bt_trace *writer_trace)
+bt_field_type *override_header_type(FILE *err,
+ bt_field_type *type,
+ const bt_trace *writer_trace)
{
- struct bt_field_type *new_type = NULL;
- const struct bt_clock_class *writer_clock_class = NULL;
+ bt_field_type *new_type = NULL;
+ const bt_clock_class *writer_clock_class = NULL;
int ret;
/* FIXME multi-clock? */
}
static
-int copy_float_field(FILE *err, const struct bt_field *field,
- struct bt_field_type *type,
- const struct bt_field *copy_field)
+int copy_float_field(FILE *err, const bt_field *field,
+ bt_field_type *type,
+ const bt_field *copy_field)
{
double value;
int ret;
}
static
-int copy_string_field(FILE *err, const struct bt_field *field,
- struct bt_field_type *type,
- const struct bt_field *copy_field)
+int copy_string_field(FILE *err, const bt_field *field,
+ bt_field_type *type,
+ const bt_field *copy_field)
{
const char *value;
int ret;
}
BT_HIDDEN
-int copy_override_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- const struct bt_field *copy_field)
+int copy_override_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ const bt_field *copy_field)
{
- struct bt_field_type *type = NULL;
+ bt_field_type *type = NULL;
int ret = 0;
type = bt_field_get_type(field);
}
static
-int copy_find_clock_enum_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- struct bt_field_type *type, const struct bt_field *copy_field)
+int copy_find_clock_enum_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ bt_field_type *type, const bt_field *copy_field)
{
int ret;
- const struct bt_field *container = NULL, *copy_container = NULL;
+ const bt_field *container = NULL, *copy_container = NULL;
container = bt_field_enumeration_get_container(field);
BT_ASSERT(container);
}
static
-int copy_find_clock_variant_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- struct bt_field_type *type, const struct bt_field *copy_field)
+int copy_find_clock_variant_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ bt_field_type *type, const bt_field *copy_field)
{
int ret;
- const struct bt_field *tag = NULL;
- const struct bt_field *variant_field = NULL, *copy_variant_field = NULL;
+ const bt_field *tag = NULL;
+ const bt_field *variant_field = NULL, *copy_variant_field = NULL;
tag = bt_field_variant_get_tag(field);
BT_ASSERT(tag);
static
int copy_find_clock_sequence_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field)
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field)
{
int ret;
uint64_t i, count;
- const struct bt_field *length_field = NULL;
- const struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ const bt_field *length_field = NULL;
+ const bt_field *entry_field = NULL, *entry_copy = NULL;
length_field = bt_field_sequence_get_length(field);
BT_ASSERT(length_field);
static
int copy_find_clock_array_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field)
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field)
{
int ret, count, i;
- const struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ const bt_field *entry_field = NULL, *entry_copy = NULL;
count = bt_field_type_array_get_length(type);
for (i = 0; i < count; i++) {
static
int copy_find_clock_struct_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field)
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field)
{
int count, i, ret;
- struct bt_field_type *entry_type = NULL;
- const struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ bt_field_type *entry_type = NULL;
+ const bt_field *entry_field = NULL, *entry_copy = NULL;
count = bt_field_type_structure_get_field_count(type);
for (i = 0; i < count; i++) {
}
static
-int set_int_value(FILE *err, const struct bt_field *field,
- const struct bt_field *copy_field,
- struct bt_field_type *type)
+int set_int_value(FILE *err, const bt_field *field,
+ const bt_field *copy_field,
+ bt_field_type *type)
{
uint64_t uvalue;
int64_t value;
return ret;
}
-const struct bt_clock_class *stream_class_get_clock_class(FILE *err,
- const struct bt_stream_class *stream_class)
+const bt_clock_class *stream_class_get_clock_class(FILE *err,
+ const bt_stream_class *stream_class)
{
- const struct bt_trace *trace = NULL;
- const struct bt_clock_class *clock_class = NULL;
+ const bt_trace *trace = NULL;
+ const bt_clock_class *clock_class = NULL;
trace = bt_stream_class_get_trace(stream_class);
BT_ASSERT(trace);
return clock_class;
}
-const struct bt_clock_class *event_get_clock_class(FILE *err, const struct bt_event *event)
+const bt_clock_class *event_get_clock_class(FILE *err, const bt_event *event)
{
- const struct bt_event_class *event_class = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_clock_class *clock_class = NULL;
+ const bt_event_class *event_class = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_clock_class *clock_class = NULL;
event_class = bt_event_get_class(event);
BT_ASSERT(event_class);
static
int copy_find_clock_int_field(FILE *err,
- const struct bt_event *event, const struct bt_event *writer_event,
- const struct bt_field *field, struct bt_field_type *type,
- const struct bt_field *copy_field)
+ const bt_event *event, const bt_event *writer_event,
+ const bt_field *field, bt_field_type *type,
+ const bt_field *copy_field)
{
- const struct bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
- struct bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
+ const bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
+ bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
uint64_t value;
int ret;
#endif
BT_HIDDEN
-struct bt_field_type *override_header_type(FILE *err,
- struct bt_field_type *type,
- const struct bt_trace *writer_trace);
+bt_field_type *override_header_type(FILE *err,
+ bt_field_type *type,
+ const bt_trace *writer_trace);
BT_HIDDEN
-int copy_override_field(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event, const struct bt_field *field,
- const struct bt_field *copy_field);
+int copy_override_field(FILE *err, const bt_event *event,
+ const bt_event *writer_event, const bt_field *field,
+ const bt_field *copy_field);
BT_HIDDEN
-const struct bt_clock_class *stream_class_get_clock_class(FILE *err,
- const struct bt_stream_class *stream_class);
+const bt_clock_class *stream_class_get_clock_class(FILE *err,
+ const bt_stream_class *stream_class);
BT_HIDDEN
-const struct bt_clock_class *event_get_clock_class(FILE *err,
- const struct bt_event *event);
+const bt_clock_class *event_get_clock_class(FILE *err,
+ const bt_event *event);
#ifdef __cplusplus
}
#include "clock-field.h"
BT_HIDDEN
-const struct bt_clock_class *ctf_copy_clock_class(FILE *err,
- const struct bt_clock_class *clock_class)
+const bt_clock_class *ctf_copy_clock_class(FILE *err,
+ const bt_clock_class *clock_class)
{
int64_t offset, offset_s;
int int_ret;
uint64_t u64_ret;
const char *name, *description;
- const struct bt_clock_class *writer_clock_class = NULL;
+ const bt_clock_class *writer_clock_class = NULL;
BT_ASSERT(err && clock_class);
BT_HIDDEN
enum bt_component_status ctf_copy_clock_classes(FILE *err,
- const struct bt_trace *writer_trace,
- const struct bt_stream_class *writer_stream_class,
- const struct bt_trace *trace)
+ const bt_trace *writer_trace,
+ const bt_stream_class *writer_stream_class,
+ const bt_trace *trace)
{
enum bt_component_status ret;
int int_ret, clock_class_count, i;
clock_class_count = bt_trace_get_clock_class_count(trace);
for (i = 0; i < clock_class_count; i++) {
- const struct bt_clock_class *writer_clock_class;
- const struct bt_clock_class *clock_class =
+ const bt_clock_class *writer_clock_class;
+ const bt_clock_class *clock_class =
bt_trace_get_clock_class_by_index(trace, i);
BT_ASSERT(clock_class);
}
static
-void replace_clock_classes(const struct bt_trace *trace_copy,
- struct bt_field_type *field_type)
+void replace_clock_classes(const bt_trace *trace_copy,
+ bt_field_type *field_type)
{
int ret;
switch (bt_field_type_get_type_id(field_type)) {
case BT_FIELD_TYPE_ID_INTEGER:
{
- const struct bt_clock_class *mapped_clock_class =
+ const bt_clock_class *mapped_clock_class =
bt_field_type_integer_get_mapped_clock_class(field_type);
- const struct bt_clock_class *clock_class_copy = NULL;
+ const bt_clock_class *clock_class_copy = NULL;
const char *name;
if (!mapped_clock_class) {
case BT_FIELD_TYPE_ID_ARRAY:
case BT_FIELD_TYPE_ID_SEQUENCE:
{
- struct bt_field_type *subtype = NULL;
+ bt_field_type *subtype = NULL;
switch (bt_field_type_get_type_id(field_type)) {
case BT_FIELD_TYPE_ID_ENUM:
for (i = 0; i < count; i++) {
const char *name;
- struct bt_field_type *member_type;
+ bt_field_type *member_type;
ret = bt_field_type_structure_get_field_by_index(
field_type, &name, &member_type, i);
for (i = 0; i < count; i++) {
const char *name;
- struct bt_field_type *member_type;
+ bt_field_type *member_type;
ret = bt_field_type_variant_get_field_by_index(
field_type, &name, &member_type, i);
}
BT_HIDDEN
-const struct bt_event_class *ctf_copy_event_class(FILE *err,
- const struct bt_trace *trace_copy,
- const struct bt_event_class *event_class)
+const bt_event_class *ctf_copy_event_class(FILE *err,
+ const bt_trace *trace_copy,
+ const bt_event_class *event_class)
{
- const struct bt_event_class *writer_event_class = NULL;
- struct bt_field_type *context = NULL, *payload_type = NULL;
+ const bt_event_class *writer_event_class = NULL;
+ bt_field_type *context = NULL, *payload_type = NULL;
const char *name;
int ret;
int64_t id;
payload_type = bt_event_class_get_payload_type(event_class);
if (payload_type) {
- struct bt_field_type *ft_copy =
+ bt_field_type *ft_copy =
bt_field_type_copy(payload_type);
if (!ft_copy) {
context = bt_event_class_get_context_type(event_class);
if (context) {
- struct bt_field_type *ft_copy =
+ bt_field_type *ft_copy =
bt_field_type_copy(context);
if (!ft_copy) {
BT_HIDDEN
enum bt_component_status ctf_copy_event_classes(FILE *err,
- const struct bt_stream_class *stream_class,
- const struct bt_stream_class *writer_stream_class)
+ const bt_stream_class *stream_class,
+ const bt_stream_class *writer_stream_class)
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
- const struct bt_event_class *event_class = NULL, *writer_event_class = NULL;
+ const bt_event_class *event_class = NULL, *writer_event_class = NULL;
int count, i;
- const struct bt_trace *writer_trace =
+ const bt_trace *writer_trace =
bt_stream_class_get_trace(writer_stream_class);
BT_ASSERT(writer_trace);
}
BT_HIDDEN
-const struct bt_stream_class *ctf_copy_stream_class(FILE *err,
- const struct bt_stream_class *stream_class,
- const struct bt_trace *writer_trace,
+const bt_stream_class *ctf_copy_stream_class(FILE *err,
+ const bt_stream_class *stream_class,
+ const bt_trace *writer_trace,
bool override_ts64)
{
- struct bt_field_type *type = NULL;
- struct bt_field_type *type_copy = NULL;
- const struct bt_stream_class *writer_stream_class = NULL;
+ bt_field_type *type = NULL;
+ bt_field_type *type_copy = NULL;
+ const bt_stream_class *writer_stream_class = NULL;
int ret_int;
const char *name = bt_stream_class_get_name(stream_class);
ret_int = bt_trace_get_clock_class_count(writer_trace);
BT_ASSERT(ret_int >= 0);
if (override_ts64 && ret_int > 0) {
- struct bt_field_type *new_event_header_type;
+ bt_field_type *new_event_header_type;
new_event_header_type = override_header_type(err, type_copy,
writer_trace);
}
BT_HIDDEN
-int ctf_stream_copy_packet_header(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream)
+int ctf_stream_copy_packet_header(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream)
{
- const struct bt_field *packet_header = NULL, *writer_packet_header = NULL;
+ const bt_field *packet_header = NULL, *writer_packet_header = NULL;
int ret = 0;
packet_header = bt_packet_get_header(packet);
}
BT_HIDDEN
-int ctf_packet_copy_header(FILE *err, const struct bt_packet *packet,
- const struct bt_packet *writer_packet)
+int ctf_packet_copy_header(FILE *err, const bt_packet *packet,
+ const bt_packet *writer_packet)
{
- const struct bt_field *packet_header = NULL, *writer_packet_header = NULL;
+ const bt_field *packet_header = NULL, *writer_packet_header = NULL;
int ret = 0;
packet_header = bt_packet_get_header(packet);
}
BT_HIDDEN
-int ctf_stream_copy_packet_context(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream)
+int ctf_stream_copy_packet_context(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream)
{
- const struct bt_field *packet_context = NULL, *writer_packet_context = NULL;
+ const bt_field *packet_context = NULL, *writer_packet_context = NULL;
int ret = 0;
packet_context = bt_packet_get_context(packet);
}
BT_HIDDEN
-int ctf_packet_copy_context(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream,
- const struct bt_packet *writer_packet)
+int ctf_packet_copy_context(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream,
+ const bt_packet *writer_packet)
{
- const struct bt_field *packet_context = NULL, *writer_packet_context = NULL;
+ const bt_field *packet_context = NULL, *writer_packet_context = NULL;
int ret = 0;
packet_context = bt_packet_get_context(packet);
}
BT_HIDDEN
-int ctf_copy_event_header(FILE *err, const struct bt_event *event,
- const struct bt_event_class *writer_event_class,
- const struct bt_event *writer_event,
- const struct bt_field *event_header)
+int ctf_copy_event_header(FILE *err, const bt_event *event,
+ const bt_event_class *writer_event_class,
+ const bt_event *writer_event,
+ const bt_field *event_header)
{
- const struct bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
- struct bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
+ const bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
+ bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
int ret;
- const struct bt_field *writer_event_header = NULL;
+ const bt_field *writer_event_header = NULL;
uint64_t value;
clock_class = event_get_clock_class(err, event);
}
static
-const struct bt_trace *event_class_get_trace(FILE *err,
- const struct bt_event_class *event_class)
+const bt_trace *event_class_get_trace(FILE *err,
+ const bt_event_class *event_class)
{
- const struct bt_trace *trace = NULL;
- const struct bt_stream_class *stream_class = NULL;
+ const bt_trace *trace = NULL;
+ const bt_stream_class *stream_class = NULL;
stream_class = bt_event_class_get_stream_class(event_class);
BT_ASSERT(stream_class);
}
BT_HIDDEN
-const struct bt_event *ctf_copy_event(FILE *err, const struct bt_event *event,
- const struct bt_event_class *writer_event_class,
+const bt_event *ctf_copy_event(FILE *err, const bt_event *event,
+ const bt_event_class *writer_event_class,
bool override_ts64)
{
- const struct bt_event *writer_event = NULL;
- const struct bt_field *field = NULL, *copy_field = NULL;
- const struct bt_trace *writer_trace = NULL;
+ const bt_event *writer_event = NULL;
+ const bt_field *field = NULL, *copy_field = NULL;
+ const bt_trace *writer_trace = NULL;
int ret;
writer_event = bt_event_create(writer_event_class);
}
BT_HIDDEN
-enum bt_component_status ctf_copy_trace(FILE *err, const struct bt_trace *trace,
- const struct bt_trace *writer_trace)
+enum 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;
int field_count, i, int_ret;
- struct bt_field_type *header_type = NULL;
+ bt_field_type *header_type = NULL;
enum bt_byte_order order;
const char *trace_name;
const unsigned char *trace_uuid;
for (i = 0; i < field_count; i++) {
int ret_int;
const char *name;
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
name = bt_trace_get_environment_field_name_by_index(
trace, i);
*
* Returns NULL on error.
*/
-const struct bt_clock_class *ctf_copy_clock_class(FILE *err,
- const struct bt_clock_class *clock_class);
+const bt_clock_class *ctf_copy_clock_class(FILE *err,
+ const bt_clock_class *clock_class);
/*
* Copy all the clock classes from the input trace and add them to the writer
*/
BT_HIDDEN
enum bt_component_status ctf_copy_clock_classes(FILE *err,
- const struct bt_trace *writer_trace,
- const struct bt_stream_class *writer_stream_class,
- const struct bt_trace *trace);
+ const bt_trace *writer_trace,
+ const bt_stream_class *writer_stream_class,
+ const bt_trace *trace);
/*
* Create a copy of the event class passed in parameter.
* Returns NULL on error.
*/
BT_HIDDEN
-const struct bt_event_class *ctf_copy_event_class(FILE *err,
- const struct bt_trace *trace_copy,
- const struct bt_event_class *event_class);
+const bt_event_class *ctf_copy_event_class(FILE *err,
+ const bt_trace *trace_copy,
+ const bt_event_class *event_class);
/*
* Copy all the event classes from the input stream class and add them to the
*/
BT_HIDDEN
enum bt_component_status ctf_copy_event_classes(FILE *err,
- const struct bt_stream_class *stream_class,
- const struct bt_stream_class *writer_stream_class);
+ const bt_stream_class *stream_class,
+ const bt_stream_class *writer_stream_class);
/*
* Create a copy of the stream class passed in parameter.
* Returns NULL or error.
*/
BT_HIDDEN
-const struct bt_stream_class *ctf_copy_stream_class(FILE *err,
- const struct bt_stream_class *stream_class,
- const struct bt_trace *writer_trace,
+const bt_stream_class *ctf_copy_stream_class(FILE *err,
+ const bt_stream_class *stream_class,
+ const bt_trace *writer_trace,
bool override_ts64);
/*
*/
BT_HIDDEN
enum bt_component_status ctf_copy_packet_context_field(FILE *err,
- const struct bt_field *field, const char *field_name,
- const struct bt_field *writer_packet_context,
- struct bt_field_type *writer_packet_context_type);
+ const bt_field *field, const char *field_name,
+ const bt_field *writer_packet_context,
+ bt_field_type *writer_packet_context_type);
/*
* Returns 0 on success or -1 on error.
*/
BT_HIDDEN
-int ctf_stream_copy_packet_header(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream);
+int ctf_stream_copy_packet_header(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream);
/*
* Copy the packet_header from the packet passed in parameter and assign it
* Returns 0 on success or -1 on error.
*/
BT_HIDDEN
-int ctf_packet_copy_header(FILE *err, const struct bt_packet *packet,
- const struct bt_packet *writer_packet);
+int ctf_packet_copy_header(FILE *err, const bt_packet *packet,
+ const bt_packet *writer_packet);
/*
* Copy all the field values of the packet context from the packet passed in
* Returns 0 on success or -1 on error.
*/
BT_HIDDEN
-int ctf_stream_copy_packet_context(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream);
+int ctf_stream_copy_packet_context(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream);
/*
* Copy all the field values of the packet context from the packet passed in
* Returns 0 on success or -1 on error.
*/
BT_HIDDEN
-int ctf_packet_copy_context(FILE *err, const struct bt_packet *packet,
- const struct bt_stream *writer_stream,
- const struct bt_packet *writer_packet);
+int ctf_packet_copy_context(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream,
+ const bt_packet *writer_packet);
/*
* Create and return a copy of the event passed in parameter. The caller has to
* Returns NULL on error.
*/
BT_HIDDEN
-const struct bt_event *ctf_copy_event(FILE *err, const struct bt_event *event,
- const struct bt_event_class *writer_event_class,
+const bt_event *ctf_copy_event(FILE *err, const bt_event *event,
+ const bt_event_class *writer_event_class,
bool override_ts64);
/*
* Returns 0 on success, -1 on error.
*/
BT_HIDDEN
-int ctf_copy_event_header(FILE *err, const struct bt_event *event,
- const struct bt_event_class *writer_event_class,
- const struct bt_event *writer_event,
- const struct bt_field *event_header);
+int ctf_copy_event_header(FILE *err, const bt_event *event,
+ const bt_event_class *writer_event_class,
+ const bt_event *writer_event,
+ const bt_field *event_header);
/*
* Copy the environment and the packet header from the input trace to the
* error.
*/
BT_HIDDEN
-enum bt_component_status ctf_copy_trace(FILE *err, const struct bt_trace *trace,
- const struct bt_trace *writer_trace);
+enum bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace,
+ const bt_trace *writer_trace);
#ifdef __cplusplus
}
#include "debug-info.h"
static
-const struct bt_stream *insert_new_stream(
+const bt_stream *insert_new_stream(
struct debug_info_iterator *debug_it,
- const struct bt_stream *stream,
+ const bt_stream *stream,
struct debug_info_trace *di_trace);
static
-void unref_stream(const struct bt_stream *stream)
+void unref_stream(const bt_stream *stream)
{
bt_stream_put_ref(stream);
}
static
-void unref_packet(const struct bt_packet *packet)
+void unref_packet(const bt_packet *packet)
{
bt_packet_put_ref(packet);
}
static
-void unref_stream_class(const struct bt_stream_class *stream_class)
+void unref_stream_class(const bt_stream_class *stream_class)
{
bt_stream_class_put_ref(stream_class);
}
}
static
-const struct bt_field *get_payload_field(FILE *err,
- const struct bt_event *event, const char *field_name)
+const bt_field *get_payload_field(FILE *err,
+ const bt_event *event, const char *field_name)
{
- const struct bt_field *field = NULL, *payload = NULL;
- const struct bt_field_class *payload_class = NULL;
+ const bt_field *field = NULL, *payload = NULL;
+ const bt_field_class *payload_class = NULL;
payload = bt_event_get_payload(event, NULL);
BT_ASSERT(payload);
}
static
-const struct bt_field *get_stream_event_context_field(FILE *err,
- const struct bt_event *event, const char *field_name)
+const bt_field *get_stream_event_context_field(FILE *err,
+ const bt_event *event, const char *field_name)
{
- const struct bt_field *field = NULL, *sec = NULL;
- const struct bt_field_class *sec_class = NULL;
+ const bt_field *field = NULL, *sec = NULL;
+ const bt_field_class *sec_class = NULL;
sec = bt_event_get_stream_event_context(event);
if (!sec) {
BT_HIDDEN
int get_stream_event_context_unsigned_int_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint64_t *value)
{
int ret;
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
field = get_stream_event_context_field(err, event, field_name);
if (!field) {
}
BT_HIDDEN
-int get_stream_event_context_int_field_value(FILE *err, const struct bt_event *event,
+int get_stream_event_context_int_field_value(FILE *err, const bt_event *event,
const char *field_name, int64_t *value)
{
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
int ret;
field = get_stream_event_context_field(err, event, field_name);
BT_HIDDEN
int get_payload_unsigned_int_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint64_t *value)
{
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
int ret;
field = get_payload_field(err, event, field_name);
}
BT_HIDDEN
-int get_payload_int_field_value(FILE *err, const struct bt_event *event,
+int get_payload_int_field_value(FILE *err, const bt_event *event,
const char *field_name, int64_t *value)
{
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
int ret;
field = get_payload_field(err, event, field_name);
BT_HIDDEN
int get_payload_string_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
const char **value)
{
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
int ret;
/*
BT_HIDDEN
int get_payload_build_id_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint8_t **build_id, uint64_t *build_id_len)
{
- const struct bt_field *field = NULL, *seq_len = NULL;
- const struct bt_field_class *field_class = NULL;
- const struct bt_field *seq_field = NULL;
+ const bt_field *field = NULL, *seq_len = NULL;
+ const bt_field_class *field_class = NULL;
+ const bt_field *seq_field = NULL;
uint64_t i;
int ret;
static
struct debug_info *lookup_trace_debug_info(struct debug_info_iterator *debug_it,
- const struct bt_trace *writer_trace,
+ const bt_trace *writer_trace,
struct debug_info_trace *di_trace)
{
return (struct debug_info *) g_hash_table_lookup(
static
struct debug_info *insert_new_debug_info(struct debug_info_iterator *debug_it,
- const struct bt_trace *writer_trace,
+ const bt_trace *writer_trace,
struct debug_info_trace *di_trace)
{
struct debug_info *debug_info = NULL;
- struct bt_value *field = NULL;
+ bt_value *field = NULL;
const char *str_value;
enum bt_value_status ret;
static
struct debug_info *get_trace_debug_info(struct debug_info_iterator *debug_it,
- const struct bt_trace *writer_trace,
+ const bt_trace *writer_trace,
struct debug_info_trace *di_trace)
{
struct debug_info *debug_info;
static
struct debug_info_trace *lookup_trace(struct debug_info_iterator *debug_it,
- const struct bt_trace *trace)
+ const bt_trace *trace)
{
return (struct debug_info_trace *) g_hash_table_lookup(
debug_it->trace_map,
static
enum debug_info_stream_state *insert_new_stream_state(
struct debug_info_iterator *debug_it,
- struct debug_info_trace *di_trace, const struct bt_stream *stream)
+ struct debug_info_trace *di_trace, const bt_stream *stream)
{
enum debug_info_stream_state *v = NULL;
static
int sync_event_classes(struct debug_info_iterator *debug_it,
- const struct bt_stream *stream,
- const struct bt_stream *writer_stream)
+ const bt_stream *stream,
+ const bt_stream *writer_stream)
{
int int_ret;
- const struct bt_stream_class *stream_class = NULL,
+ const bt_stream_class *stream_class = NULL,
*writer_stream_class = NULL;
enum bt_component_status ret;
}
static
-void trace_is_static_listener(const struct bt_trace *trace, void *data)
+void trace_is_static_listener(const bt_trace *trace, void *data)
{
struct debug_info_trace *di_trace = data;
int trace_completed = 1, ret, nr_stream, i;
- const struct bt_stream *stream = NULL, *writer_stream = NULL;
- const struct bt_trace *writer_trace = di_trace->writer_trace;
+ const bt_stream *stream = NULL, *writer_stream = NULL;
+ const bt_trace *writer_trace = di_trace->writer_trace;
/*
* When the trace becomes static, make sure that we have all
static
struct debug_info_trace *insert_new_trace(struct debug_info_iterator *debug_it,
- const struct bt_stream *stream) {
- const struct bt_trace *writer_trace = NULL;
+ const bt_stream *stream) {
+ const bt_trace *writer_trace = NULL;
struct debug_info_trace *di_trace = NULL;
- const struct bt_trace *trace = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_stream *writer_stream = NULL;
+ const bt_trace *trace = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_stream *writer_stream = NULL;
int ret, nr_stream, i;
writer_trace = bt_trace_create();
}
static
-const struct bt_packet *lookup_packet(struct debug_info_iterator *debug_it,
- const struct bt_packet *packet,
+const bt_packet *lookup_packet(struct debug_info_iterator *debug_it,
+ const bt_packet *packet,
struct debug_info_trace *di_trace)
{
- return (const struct bt_packet *) g_hash_table_lookup(
+ return (const bt_packet *) g_hash_table_lookup(
di_trace->packet_map,
(gpointer) packet);
}
static
-const struct bt_packet *insert_new_packet(struct debug_info_iterator *debug_it,
- const struct bt_packet *packet,
- const struct bt_stream *writer_stream,
+const bt_packet *insert_new_packet(struct debug_info_iterator *debug_it,
+ const bt_packet *packet,
+ const bt_stream *writer_stream,
struct debug_info_trace *di_trace)
{
- const struct bt_packet *writer_packet;
+ const bt_packet *writer_packet;
int ret;
writer_packet = bt_packet_create(writer_stream);
static
int add_debug_info_fields(FILE *err,
- const struct bt_field_class *writer_event_context_class,
+ const bt_field_class *writer_event_context_class,
struct debug_info_component *component)
{
- const struct bt_field_class *ip_field = NULL, *debug_field_class = NULL,
+ const bt_field_class *ip_field = NULL, *debug_field_class = NULL,
*bin_field_class = NULL, *func_field_class = NULL,
*src_field_class = NULL;
int ret = 0;
static
int create_debug_info_event_context_class(FILE *err,
- const struct bt_field_class *event_context_class,
- const struct bt_field_class *writer_event_context_class,
+ const bt_field_class *event_context_class,
+ const bt_field_class *writer_event_context_class,
struct debug_info_component *component)
{
int ret, nr_fields, i;
nr_fields = bt_field_class_structure_get_field_count(event_context_class);
for (i = 0; i < nr_fields; i++) {
- const struct bt_field_class *field_class = NULL;
+ const bt_field_class *field_class = NULL;
const char *field_name;
if (bt_field_class_structure_get_field_by_index(event_context_class,
}
static
-const struct bt_stream_class *copy_stream_class_debug_info(FILE *err,
- const struct bt_stream_class *stream_class,
- const struct bt_trace *writer_trace,
+const bt_stream_class *copy_stream_class_debug_info(FILE *err,
+ const bt_stream_class *stream_class,
+ const bt_trace *writer_trace,
struct debug_info_component *component)
{
- const struct bt_field_class *cls = NULL;
- const struct bt_stream_class *writer_stream_class = NULL;
- const struct bt_field_class *writer_event_context_class = NULL;
+ const bt_field_class *cls = NULL;
+ const bt_stream_class *writer_stream_class = NULL;
+ const bt_field_class *writer_event_context_class = NULL;
int ret_int;
const char *name = bt_stream_class_get_name(stream_class);
* to update the integers mapping to a clock.
*/
static
-int add_clock_classes(FILE *err, const struct bt_trace *writer_trace,
- const struct bt_stream_class *writer_stream_class,
- const struct bt_trace *trace)
+int add_clock_classes(FILE *err, const bt_trace *writer_trace,
+ const bt_stream_class *writer_stream_class,
+ const bt_trace *trace)
{
int ret, clock_class_count, i;
clock_class_count = bt_trace_get_clock_class_count(trace);
for (i = 0; i < clock_class_count; i++) {
- const struct bt_clock_class *clock_class =
+ const bt_clock_class *clock_class =
bt_trace_get_clock_class_by_index(trace, i);
- const struct bt_clock_class *existing_clock_class = NULL;
+ const bt_clock_class *existing_clock_class = NULL;
BT_ASSERT(clock_class);
}
static
-const struct bt_stream_class *insert_new_stream_class(
+const bt_stream_class *insert_new_stream_class(
struct debug_info_iterator *debug_it,
- const struct bt_stream_class *stream_class)
+ const bt_stream_class *stream_class)
{
- const struct bt_stream_class *writer_stream_class = NULL;
- const struct bt_trace *trace, *writer_trace = NULL;
+ 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;
int int_ret;
}
static
-const struct bt_stream *insert_new_stream(
+const bt_stream *insert_new_stream(
struct debug_info_iterator *debug_it,
- const struct bt_stream *stream,
+ const bt_stream *stream,
struct debug_info_trace *di_trace)
{
- const struct bt_stream *writer_stream = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_stream_class *writer_stream_class = NULL;
+ const bt_stream *writer_stream = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_stream_class *writer_stream_class = NULL;
int64_t id;
stream_class = bt_stream_get_class(stream);
}
static
-const struct bt_stream *lookup_stream(struct debug_info_iterator *debug_it,
- const struct bt_stream *stream,
+const bt_stream *lookup_stream(struct debug_info_iterator *debug_it,
+ const bt_stream *stream,
struct debug_info_trace *di_trace)
{
- return (const struct bt_stream *) g_hash_table_lookup(
+ return (const bt_stream *) g_hash_table_lookup(
di_trace->stream_map, (gpointer) stream);
}
static
-const struct bt_event_class *get_event_class(struct debug_info_iterator *debug_it,
- const struct bt_stream_class *writer_stream_class,
- const struct bt_event_class *event_class)
+const bt_event_class *get_event_class(struct debug_info_iterator *debug_it,
+ const bt_stream_class *writer_stream_class,
+ const bt_event_class *event_class)
{
return bt_stream_class_get_event_class_by_id(writer_stream_class,
bt_event_class_get_id(event_class));
static
struct debug_info_trace *lookup_di_trace_from_stream(
struct debug_info_iterator *debug_it,
- const struct bt_stream *stream)
+ const bt_stream *stream)
{
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_trace *trace = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_trace *trace = NULL;
struct debug_info_trace *di_trace = NULL;
stream_class = bt_stream_get_class(stream);
}
static
-const struct bt_stream *get_writer_stream(
+const bt_stream *get_writer_stream(
struct debug_info_iterator *debug_it,
- const struct bt_packet *packet, const struct bt_stream *stream)
+ const bt_packet *packet, const bt_stream *stream)
{
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_stream *writer_stream = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_stream *writer_stream = NULL;
struct debug_info_trace *di_trace = NULL;
stream_class = bt_stream_get_class(stream);
}
BT_HIDDEN
-const struct bt_packet *debug_info_new_packet(
+const bt_packet *debug_info_new_packet(
struct debug_info_iterator *debug_it,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_stream *stream = NULL, *writer_stream = NULL;
- const struct bt_packet *writer_packet = NULL;
- const struct bt_field *packet_context = NULL;
+ const bt_stream *stream = NULL, *writer_stream = NULL;
+ const bt_packet *writer_packet = NULL;
+ const bt_field *packet_context = NULL;
struct debug_info_trace *di_trace;
int int_ret;
}
BT_HIDDEN
-const struct bt_packet *debug_info_close_packet(
+const bt_packet *debug_info_close_packet(
struct debug_info_iterator *debug_it,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_packet *writer_packet = NULL;
- const struct bt_stream *stream = NULL;
+ const bt_packet *writer_packet = NULL;
+ const bt_stream *stream = NULL;
struct debug_info_trace *di_trace;
stream = bt_packet_get_stream(packet);
}
BT_HIDDEN
-const struct bt_stream *debug_info_stream_begin(
+const bt_stream *debug_info_stream_begin(
struct debug_info_iterator *debug_it,
- const struct bt_stream *stream)
+ const bt_stream *stream)
{
- const struct bt_stream *writer_stream = NULL;
+ const bt_stream *writer_stream = NULL;
enum debug_info_stream_state *state;
struct debug_info_trace *di_trace = NULL;
}
BT_HIDDEN
-const struct bt_stream *debug_info_stream_end(struct debug_info_iterator *debug_it,
- const struct bt_stream *stream)
+const bt_stream *debug_info_stream_end(struct debug_info_iterator *debug_it,
+ const bt_stream *stream)
{
- const struct bt_stream *writer_stream = NULL;
+ const bt_stream *writer_stream = NULL;
struct debug_info_trace *di_trace = NULL;
enum debug_info_stream_state *state;
static
struct debug_info_source *lookup_debug_info(FILE *err,
- const struct bt_event *event,
+ const bt_event *event,
struct debug_info *debug_info)
{
int64_t vpid;
}
static
-int set_debug_info_field(FILE *err, const struct bt_field *debug_field,
+int set_debug_info_field(FILE *err, const bt_field *debug_field,
struct debug_info_source *dbg_info_src,
struct debug_info_component *component)
{
int i, nr_fields, ret = 0;
- const struct bt_field_class *debug_field_class = NULL;
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field_class *debug_field_class = NULL;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;
debug_field_class = bt_field_get_class(debug_field);
BT_ASSERT(debug_field_class);
static
int copy_set_debug_info_stream_event_context(FILE *err,
- const struct bt_field *event_context,
- const struct bt_event *event,
- const struct bt_event *writer_event,
+ const bt_field *event_context,
+ const bt_event *event,
+ const bt_event *writer_event,
struct debug_info *debug_info,
struct debug_info_component *component)
{
- const struct bt_field_class *writer_event_context_class = NULL,
+ const bt_field_class *writer_event_context_class = NULL,
*event_context_class = NULL;
- const struct bt_field *writer_event_context = NULL;
- const struct bt_field *field = NULL, *copy_field = NULL, *debug_field = NULL;
- const struct bt_field_class *field_class = NULL;
+ const bt_field *writer_event_context = NULL;
+ const bt_field *field = NULL, *copy_field = NULL, *debug_field = NULL;
+ const bt_field_class *field_class = NULL;
struct debug_info_source *dbg_info_src;
int ret, nr_fields, i;
}
static
-const struct bt_clock_class *stream_class_get_clock_class(FILE *err,
- const struct bt_stream_class *stream_class)
+const bt_clock_class *stream_class_get_clock_class(FILE *err,
+ const bt_stream_class *stream_class)
{
- const struct bt_trace *trace = NULL;
- const struct bt_clock_class *clock_class = NULL;
+ const bt_trace *trace = NULL;
+ const bt_clock_class *clock_class = NULL;
trace = bt_stream_class_get_trace(stream_class);
BT_ASSERT(trace);
}
static
-const struct bt_clock_class *event_get_clock_class(FILE *err, const struct bt_event *event)
+const bt_clock_class *event_get_clock_class(FILE *err, const bt_event *event)
{
- const struct bt_event_class *event_class = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_clock_class *clock_class = NULL;
+ const bt_event_class *event_class = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_clock_class *clock_class = NULL;
event_class = bt_event_get_class(event);
BT_ASSERT(event_class);
}
static
-int set_event_clock_value(FILE *err, const struct bt_event *event,
- const struct bt_event *writer_event)
+int set_event_clock_value(FILE *err, const bt_event *event,
+ const bt_event *writer_event)
{
- const struct bt_clock_class *clock_class = NULL;
- struct bt_clock_value *clock_value = NULL;
+ const bt_clock_class *clock_class = NULL;
+ bt_clock_value *clock_value = NULL;
int ret = 0;
clock_class = event_get_clock_class(err, event);
}
static
-const struct bt_event *debug_info_copy_event(FILE *err, const struct bt_event *event,
- const struct bt_event_class *writer_event_class,
+const bt_event *debug_info_copy_event(FILE *err, const bt_event *event,
+ const bt_event_class *writer_event_class,
struct debug_info *debug_info,
struct debug_info_component *component)
{
- const struct bt_event *writer_event = NULL;
- const struct bt_field *field = NULL, *copy_field = NULL;
+ const bt_event *writer_event = NULL;
+ const bt_field *field = NULL, *copy_field = NULL;
int ret;
writer_event = bt_event_create(writer_event_class);
}
BT_HIDDEN
-const struct bt_event *debug_info_output_event(
+const bt_event *debug_info_output_event(
struct debug_info_iterator *debug_it,
- const struct bt_event *event)
+ const bt_event *event)
{
- const struct bt_event_class *event_class = NULL, *writer_event_class = NULL;
- const struct bt_stream_class *stream_class = NULL, *writer_stream_class = NULL;
- const struct bt_event *writer_event = NULL;
- const struct bt_packet *packet = NULL, *writer_packet = NULL;
- const struct bt_trace *writer_trace = NULL;
- const struct bt_stream *stream = NULL;
+ const bt_event_class *event_class = NULL, *writer_event_class = NULL;
+ const bt_stream_class *stream_class = NULL, *writer_stream_class = NULL;
+ const bt_event *writer_event = NULL;
+ const bt_packet *packet = NULL, *writer_packet = NULL;
+ const bt_trace *writer_trace = NULL;
+ const bt_stream *stream = NULL;
struct debug_info_trace *di_trace;
struct debug_info *debug_info;
int int_ret;
#include <babeltrace/babeltrace.h>
BT_HIDDEN
-const struct bt_event *debug_info_output_event(struct debug_info_iterator *debug_it,
- const struct bt_event *event);
+const bt_event *debug_info_output_event(struct debug_info_iterator *debug_it,
+ const bt_event *event);
BT_HIDDEN
-const struct bt_packet *debug_info_new_packet(struct debug_info_iterator *debug_it,
- const struct bt_packet *packet);
+const bt_packet *debug_info_new_packet(struct debug_info_iterator *debug_it,
+ const bt_packet *packet);
BT_HIDDEN
-const struct bt_packet *debug_info_close_packet(struct debug_info_iterator *debug_it,
- const struct bt_packet *packet);
+const bt_packet *debug_info_close_packet(struct debug_info_iterator *debug_it,
+ const bt_packet *packet);
BT_HIDDEN
-const struct bt_stream *debug_info_stream_begin(
+const bt_stream *debug_info_stream_begin(
struct debug_info_iterator *debug_it,
- const struct bt_stream *stream);
+ const bt_stream *stream);
BT_HIDDEN
-const struct bt_stream *debug_info_stream_end(struct debug_info_iterator *debug_it,
- const struct bt_stream *stream);
+const bt_stream *debug_info_stream_end(struct debug_info_iterator *debug_it,
+ const bt_stream *stream);
BT_HIDDEN
int get_stream_event_context_unsigned_int_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint64_t *value);
BT_HIDDEN
-int get_stream_event_context_int_field_value(FILE *err, const struct bt_event *event,
+int get_stream_event_context_int_field_value(FILE *err, const bt_event *event,
const char *field_name, int64_t *value);
BT_HIDDEN
int get_payload_unsigned_int_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint64_t *value);
BT_HIDDEN
-int get_payload_int_field_value(FILE *err, const struct bt_event *event,
+int get_payload_int_field_value(FILE *err, const bt_event *event,
const char *field_name, int64_t *value);
BT_HIDDEN
int get_payload_string_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
const char **value);
BT_HIDDEN
int get_payload_build_id_field_value(FILE *err,
- const struct bt_event *event, const char *field_name,
+ const bt_event *event, const char *field_name,
uint8_t **build_id, uint64_t *build_id_len);
#endif /* BABELTRACE_PLUGIN_TRIMMER_COPY_H */
static
void handle_statedump_build_id_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
struct proc_debug_info_sources *proc_dbg_info_src;
struct bin_info *bin = NULL;
static
void handle_statedump_debug_link_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
struct proc_debug_info_sources *proc_dbg_info_src;
struct bin_info *bin = NULL;
static
void handle_bin_info_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event, bool has_pic_field)
+ const bt_event *event, bool has_pic_field)
{
struct proc_debug_info_sources *proc_dbg_info_src;
struct bin_info *bin;
static inline
void handle_statedump_bin_info_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
handle_bin_info_event(err, debug_info, event, true);
}
static inline
void handle_lib_load_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
handle_bin_info_event(err, debug_info, event, false);
}
static inline
void handle_lib_unload_event(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
struct proc_debug_info_sources *proc_dbg_info_src;
uint64_t baddr;
static
void handle_statedump_start(FILE *err, struct debug_info *debug_info,
- const struct bt_event *event)
+ const bt_event *event)
{
struct proc_debug_info_sources *proc_dbg_info_src;
int64_t vpid;
}
BT_HIDDEN
-void debug_info_handle_event(FILE *err, const struct bt_event *event,
+void debug_info_handle_event(FILE *err, const bt_event *event,
struct debug_info *debug_info)
{
- const struct bt_event_class *event_class;
+ const bt_event_class *event_class;
const char *event_name;
GQuark q_event_name;
struct debug_info_iterator {
struct debug_info_component *debug_info_component;
- /* Map between struct bt_trace and struct bt_writer. */
+ /* Map between bt_trace and struct bt_writer. */
GHashTable *trace_map;
/* Input iterators associated with this output iterator. */
GPtrArray *input_iterator_group;
- const struct bt_notification *current_notification;
- struct bt_notification_iterator *input_iterator;
+ const bt_notification *current_notification;
+ bt_notification_iterator *input_iterator;
FILE *err;
};
struct debug_info_trace {
- const struct bt_trace *trace;
- const struct bt_trace *writer_trace;
+ const bt_trace *trace;
+ const bt_trace *writer_trace;
struct debug_info_component *debug_info_component;
struct debug_info_iterator *debug_it;
int static_listener_id;
int64_t vpid, uint64_t ip);
BT_HIDDEN
-void debug_info_handle_event(FILE *err, const struct bt_event *event,
+void debug_info_handle_event(FILE *err, const bt_event *event,
struct debug_info *debug_info);
BT_HIDDEN
}
static
-void destroy_debug_info_component(struct bt_self_component *component)
+void destroy_debug_info_component(bt_self_component *component)
{
void *data = bt_self_component_get_user_data(component);
destroy_debug_info_data(data);
}
static
-void debug_info_iterator_destroy(struct bt_self_notification_iterator *it)
+void debug_info_iterator_destroy(bt_self_notification_iterator *it)
{
struct debug_info_iterator *it_data;
}
static
-const struct bt_notification *handle_notification(FILE *err,
+const bt_notification *handle_notification(FILE *err,
struct debug_info_iterator *debug_it,
- const struct bt_notification *notification)
+ const bt_notification *notification)
{
- const struct bt_notification *new_notification = NULL;
+ const bt_notification *new_notification = NULL;
switch (bt_notification_get_type(notification)) {
case BT_NOTIFICATION_TYPE_PACKET_BEGINNING:
{
- const struct bt_packet *packet =
+ const bt_packet *packet =
bt_notification_packet_beginning_get_packet(notification);
- const struct bt_packet *writer_packet;
+ const bt_packet *writer_packet;
if (!packet) {
goto end;
}
case BT_NOTIFICATION_TYPE_PACKET_END:
{
- const struct bt_packet *packet =
+ const bt_packet *packet =
bt_notification_packet_end_get_packet(notification);
- const struct bt_packet *writer_packet;
+ const bt_packet *writer_packet;
if (!packet) {
goto end;
}
case BT_NOTIFICATION_TYPE_EVENT:
{
- const struct bt_event *event = bt_notification_event_get_event(
+ const bt_event *event = bt_notification_event_get_event(
notification);
- const struct bt_event *writer_event;
- struct bt_clock_class_priority_map *cc_prio_map =
+ const bt_event *writer_event;
+ bt_clock_class_priority_map *cc_prio_map =
bt_notification_event_get_clock_class_priority_map(
notification);
}
case BT_NOTIFICATION_TYPE_STREAM_BEGINNING:
{
- const struct bt_stream *stream =
+ const bt_stream *stream =
bt_notification_stream_beginning_get_stream(notification);
- const struct bt_stream *writer_stream;
+ const bt_stream *writer_stream;
if (!stream) {
goto end;
}
case BT_NOTIFICATION_TYPE_STREAM_END:
{
- const struct bt_stream *stream =
+ const bt_stream *stream =
bt_notification_stream_end_get_stream(notification);
- const struct bt_stream *writer_stream;
+ const bt_stream *writer_stream;
if (!stream) {
goto end;
}
static
-struct bt_notification_iterator_next_method_return debug_info_iterator_next(
- struct bt_self_notification_iterator *iterator)
+bt_notification_iterator_next_method_return debug_info_iterator_next(
+ bt_self_notification_iterator *iterator)
{
struct debug_info_iterator *debug_it = NULL;
- struct bt_self_component *component = NULL;
+ bt_self_component *component = NULL;
struct debug_info_component *debug_info = NULL;
- struct bt_notification_iterator *source_it = NULL;
- const struct bt_notification *notification;
- struct bt_notification_iterator_next_method_return ret = {
+ bt_notification_iterator *source_it = NULL;
+ const bt_notification *notification;
+ bt_notification_iterator_next_method_return ret = {
.status = BT_NOTIFICATION_ITERATOR_STATUS_OK,
.notification = NULL,
};
static
enum bt_notification_iterator_status debug_info_iterator_init(
- struct bt_self_notification_iterator *iterator,
+ bt_self_notification_iterator *iterator,
struct bt_private_port *port)
{
enum bt_notification_iterator_status ret =
enum bt_notification_iterator_status it_ret;
enum bt_connection_status conn_status;
struct bt_private_connection *connection = NULL;
- struct bt_self_component *component =
+ bt_self_component *component =
bt_self_notification_iterator_get_private_component(iterator);
struct debug_info_iterator *it_data = g_new0(struct debug_info_iterator, 1);
struct bt_private_port *input_port;
static
enum bt_component_status init_from_params(
struct debug_info_component *debug_info_component,
- struct bt_value *params)
+ bt_value *params)
{
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
BT_ASSERT(params);
}
enum bt_component_status debug_info_component_init(
- struct bt_self_component *component, struct bt_value *params,
+ bt_self_component *component, bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
struct dmesg_notif_iter {
struct dmesg_component *dmesg_comp;
- struct bt_self_notification_iterator *pc_notif_iter; /* Weak */
+ bt_self_notification_iterator *pc_notif_iter; /* Weak */
char *linebuf;
size_t linebuf_len;
FILE *fp;
- struct bt_notification *tmp_event_notif;
+ bt_notification *tmp_event_notif;
enum {
STATE_EMIT_STREAM_BEGINNING,
bt_bool no_timestamp;
} params;
- struct bt_trace_class *trace_class;
- struct bt_stream_class *stream_class;
- struct bt_event_class *event_class;
- struct bt_trace *trace;
- struct bt_stream *stream;
- struct bt_packet *packet;
- struct bt_clock_class *clock_class;
+ bt_trace_class *trace_class;
+ bt_stream_class *stream_class;
+ bt_event_class *event_class;
+ bt_trace *trace;
+ bt_stream *stream;
+ bt_packet *packet;
+ bt_clock_class *clock_class;
};
static
-struct bt_field_class *create_event_payload_fc(void)
+bt_field_class *create_event_payload_fc(void)
{
- struct bt_field_class *root_fc = NULL;
- struct bt_field_class *fc = NULL;
+ bt_field_class *root_fc = NULL;
+ bt_field_class *fc = NULL;
int ret;
root_fc = bt_field_class_structure_create();
static
int create_meta(struct dmesg_component *dmesg_comp, bool has_ts)
{
- struct bt_field_class *fc = NULL;
+ bt_field_class *fc = NULL;
int ret = 0;
dmesg_comp->trace_class = bt_trace_class_create();
static
int handle_params(struct dmesg_component *dmesg_comp,
- const struct bt_value *params)
+ const bt_value *params)
{
- const struct bt_value *no_timestamp = NULL;
- const struct bt_value *path = NULL;
+ const bt_value *no_timestamp = NULL;
+ const bt_value *path = NULL;
const char *path_str;
int ret = 0;
static
enum bt_self_component_status create_port(
- struct bt_self_component_source *self_comp)
+ bt_self_component_source *self_comp)
{
return bt_self_component_source_add_output_port(self_comp,
"out", NULL, NULL);
BT_HIDDEN
enum bt_self_component_status dmesg_init(
- struct bt_self_component_source *self_comp,
- struct bt_value *params, void *init_method_data)
+ 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);
}
BT_HIDDEN
-void dmesg_finalize(struct bt_self_component_source *self_comp)
+void dmesg_finalize(bt_self_component_source *self_comp)
{
destroy_dmesg_component(bt_self_component_get_data(
bt_self_component_source_as_self_component(self_comp)));
}
static
-struct bt_notification *create_init_event_notif_from_line(
+bt_notification *create_init_event_notif_from_line(
struct dmesg_notif_iter *notif_iter,
const char *line, const char **new_start)
{
- struct bt_event *event;
- struct bt_notification *notif = NULL;
+ bt_event *event;
+ bt_notification *notif = NULL;
bool has_timestamp = false;
unsigned long sec, usec, msec;
unsigned int year, mon, mday, hour, min;
static
int fill_event_payload_from_line(const char *line,
- struct bt_event *event)
+ bt_event *event)
{
- struct bt_field *ep_field = NULL;
- struct bt_field *str_field = NULL;
+ bt_field *ep_field = NULL;
+ bt_field *str_field = NULL;
size_t len;
int ret;
}
static
-struct bt_notification *create_notif_from_line(
+bt_notification *create_notif_from_line(
struct dmesg_notif_iter *dmesg_notif_iter, const char *line)
{
- struct bt_event *event = NULL;
- struct bt_notification *notif = NULL;
+ bt_event *event = NULL;
+ bt_notification *notif = NULL;
const char *new_start;
int ret;
BT_HIDDEN
enum bt_self_notification_iterator_status dmesg_notif_iter_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port)
{
struct dmesg_component *dmesg_comp;
struct dmesg_notif_iter *dmesg_notif_iter =
BT_HIDDEN
void dmesg_notif_iter_finalize(
- struct bt_self_notification_iterator *priv_notif_iter)
+ bt_self_notification_iterator *priv_notif_iter)
{
destroy_dmesg_notif_iter(bt_self_notification_iterator_get_data(
priv_notif_iter));
static
enum bt_self_notification_iterator_status dmesg_notif_iter_next_one(
struct dmesg_notif_iter *dmesg_notif_iter,
- struct bt_notification **notif)
+ bt_notification **notif)
{
ssize_t len;
struct dmesg_component *dmesg_comp;
BT_HIDDEN
enum bt_self_notification_iterator_status dmesg_notif_iter_next(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
while (i < capacity &&
status == BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK) {
- struct bt_notification *priv_notif = NULL;
+ bt_notification *priv_notif = NULL;
status = dmesg_notif_iter_next_one(dmesg_notif_iter,
&priv_notif);
BT_HIDDEN
enum bt_self_component_status dmesg_init(
- struct bt_self_component_source *self_comp,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_source *self_comp,
+ const bt_value *params, void *init_method_data);
BT_HIDDEN
-void dmesg_finalize(struct bt_self_component_source *self_comp);
+void dmesg_finalize(bt_self_component_source *self_comp);
BT_HIDDEN
enum bt_self_notification_iterator_status dmesg_notif_iter_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port);
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port);
BT_HIDDEN
void dmesg_notif_iter_finalize(
- struct bt_self_notification_iterator *self_notif_iter);
+ bt_self_notification_iterator *self_notif_iter);
BT_HIDDEN
enum bt_self_notification_iterator_status dmesg_notif_iter_next(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count);
}
BT_HIDDEN
-void pretty_finalize(struct bt_self_component_sink *comp)
+void pretty_finalize(bt_self_component_sink *comp)
{
destroy_pretty_data(
bt_self_component_get_data(
static
enum bt_self_component_status handle_notification(
struct pretty_component *pretty,
- const struct bt_notification *notification)
+ const bt_notification *notification)
{
enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
BT_HIDDEN
enum bt_self_component_status pretty_port_connected(
- struct bt_self_component_sink *comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port)
+ 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;
struct pretty_component *pretty;
BT_HIDDEN
enum bt_self_component_status pretty_consume(
- struct bt_self_component_sink *comp)
+ bt_self_component_sink *comp)
{
enum bt_self_component_status ret;
bt_notification_array_const notifs;
- struct bt_self_component_port_input_notification_iterator *it;
+ bt_self_component_port_input_notification_iterator *it;
struct pretty_component *pretty = bt_self_component_get_data(
bt_self_component_sink_as_self_component(comp));
enum bt_notification_iterator_status it_ret;
}
static
-int add_params_to_map(struct bt_value *plugin_opt_map)
+int add_params_to_map(bt_value *plugin_opt_map)
{
int ret = 0;
unsigned int i;
}
static
-bt_bool check_param_exists(const char *key, const struct bt_value *object,
+bt_bool check_param_exists(const char *key, const bt_value *object,
void *data)
{
struct pretty_component *pretty = data;
}
static
-void apply_one_string(const char *key, const struct bt_value *params, char **option)
+void apply_one_string(const char *key, const bt_value *params, char **option)
{
- const struct bt_value *value = NULL;
+ const bt_value *value = NULL;
const char *str;
value = bt_value_map_borrow_entry_value_const(params, key);
}
static
-void apply_one_bool(const char *key, const struct bt_value *params, bool *option,
+void apply_one_bool(const char *key, const bt_value *params, bool *option,
bool *found)
{
- const struct bt_value *value = NULL;
+ const bt_value *value = NULL;
bt_bool bool_val;
value = bt_value_map_borrow_entry_value_const(params, key);
}
static
-int apply_params(struct pretty_component *pretty, const struct bt_value *params)
+int apply_params(struct pretty_component *pretty, const bt_value *params)
{
int ret = 0;
enum bt_value_status status;
/* Known parameters. */
pretty->options.color = PRETTY_COLOR_OPT_AUTO;
if (bt_value_map_has_entry(params, "color")) {
- const struct bt_value *color_value;
+ const bt_value *color_value;
const char *color;
color_value = bt_value_map_borrow_entry_value_const(params,
BT_HIDDEN
enum bt_self_component_status pretty_init(
- struct bt_self_component_sink *comp,
- const struct bt_value *params,
+ bt_self_component_sink *comp,
+ const bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_self_component_status ret;
struct pretty_component {
struct pretty_options options;
- struct bt_self_component_port_input_notification_iterator *iterator;
+ bt_self_component_port_input_notification_iterator *iterator;
FILE *out, *err;
int depth; /* nesting, used for tabulation alignment. */
bool start_line;
GString *string;
GString *tmp_string;
- struct bt_value *plugin_opt_map; /* Temporary parameter map. */
+ bt_value *plugin_opt_map; /* Temporary parameter map. */
bool use_colors;
uint64_t last_cycles_timestamp;
BT_HIDDEN
enum bt_self_component_status pretty_init(
- struct bt_self_component_sink *component,
- const struct bt_value *params,
+ bt_self_component_sink *component,
+ const bt_value *params,
void *init_method_data);
BT_HIDDEN
enum bt_self_component_status pretty_consume(
- struct bt_self_component_sink *component);
+ bt_self_component_sink *component);
BT_HIDDEN
enum bt_self_component_status pretty_port_connected(
- struct bt_self_component_sink *component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ bt_self_component_sink *component,
+ bt_self_component_port_input *self_port,
+ const bt_port_output *other_port);
BT_HIDDEN
-void pretty_finalize(struct bt_self_component_sink *component);
+void pretty_finalize(bt_self_component_sink *component);
BT_HIDDEN
int pretty_print_event(struct pretty_component *pretty,
- const struct bt_notification *event_notif);
+ const bt_notification *event_notif);
BT_HIDDEN
int pretty_print_packet(struct pretty_component *pretty,
- const struct bt_notification *packet_beginning_notif);
+ const bt_notification *packet_beginning_notif);
#endif /* BABELTRACE_PLUGIN_TEXT_PRETTY_PRETTY_H */
static
int print_field(struct pretty_component *pretty,
- const struct bt_field *field, bool print_names,
+ const bt_field *field, bool print_names,
GQuark *filters_fields, int filter_array_len);
static
static
void print_timestamp_cycles(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
- const struct bt_clock_value *clock_value;
+ const bt_clock_value *clock_value;
uint64_t cycles;
enum bt_clock_value_status cv_status;
static
void print_timestamp_wall(struct pretty_component *pretty,
- const struct bt_clock_value *clock_value)
+ const bt_clock_value *clock_value)
{
int ret;
int64_t ts_nsec = 0; /* add configurable offset */
static
int print_event_timestamp(struct pretty_component *pretty,
- const struct bt_event *event, bool *start_line)
+ const bt_event *event, bool *start_line)
{
bool print_names = pretty->options.print_header_field_names;
int ret = 0;
- const struct bt_stream *stream = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_clock_value *clock_value = NULL;
+ const bt_stream *stream = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_clock_value *clock_value = NULL;
enum bt_clock_value_status cv_status;
stream = bt_event_borrow_stream_const(event);
static
int print_event_header(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
bool print_names = pretty->options.print_header_field_names;
int ret = 0;
- const struct bt_event_class *event_class = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_trace_class *trace_class = NULL;
- const struct bt_packet *packet = NULL;
- const struct bt_stream *stream = NULL;
- const struct bt_trace *trace = NULL;
+ const bt_event_class *event_class = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_trace_class *trace_class = NULL;
+ const bt_packet *packet = NULL;
+ const bt_stream *stream = NULL;
+ const bt_trace *trace = NULL;
int dom_print = 0;
enum bt_property_availability prop_avail;
}
}
if (pretty->options.print_trace_hostname_field) {
- const struct bt_value *hostname_str;
+ const bt_value *hostname_str;
hostname_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
trace_class, "hostname");
}
}
if (pretty->options.print_trace_domain_field) {
- const struct bt_value *domain_str;
+ const bt_value *domain_str;
domain_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
trace_class, "domain");
}
}
if (pretty->options.print_trace_procname_field) {
- const struct bt_value *procname_str;
+ const bt_value *procname_str;
procname_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
trace_class, "procname");
}
}
if (pretty->options.print_trace_vpid_field) {
- const struct bt_value *vpid_value;
+ const bt_value *vpid_value;
vpid_value = bt_trace_class_borrow_environment_entry_value_by_name_const(
trace_class, "vpid");
static
int print_integer(struct pretty_component *pretty,
- const struct bt_field *field)
+ const bt_field *field)
{
int ret = 0;
enum bt_field_class_integer_preferred_display_base base;
- const struct bt_field_class *int_fc;
+ const bt_field_class *int_fc;
union {
uint64_t u;
int64_t s;
static
int print_enum(struct pretty_component *pretty,
- const struct bt_field *field)
+ const bt_field *field)
{
int ret = 0;
- const struct bt_field_class *enumeration_field_class = NULL;
+ const bt_field_class *enumeration_field_class = NULL;
bt_field_class_enumeration_mapping_label_array label_array;
uint64_t label_count;
uint64_t i;
static
int print_struct_field(struct pretty_component *pretty,
- const struct bt_field *_struct,
- const struct bt_field_class *struct_class,
+ const bt_field *_struct,
+ const bt_field_class *struct_class,
uint64_t i, bool print_names, uint64_t *nr_printed_fields,
GQuark *filter_fields, int filter_array_len)
{
int ret = 0;
const char *field_name;
- const struct bt_field *field = NULL;
- const struct bt_field_class *field_class = NULL;;
+ const bt_field *field = NULL;
+ const bt_field_class *field_class = NULL;;
field = bt_field_structure_borrow_member_field_by_index_const(_struct, i);
if (!field) {
static
int print_struct(struct pretty_component *pretty,
- const struct bt_field *_struct, bool print_names,
+ const bt_field *_struct, bool print_names,
GQuark *filter_fields, int filter_array_len)
{
int ret = 0;
- const struct bt_field_class *struct_class = NULL;
+ const bt_field_class *struct_class = NULL;
uint64_t nr_fields, i, nr_printed_fields;
struct_class = bt_field_borrow_class_const(_struct);
static
int print_array_field(struct pretty_component *pretty,
- const struct bt_field *array, uint64_t i, bool print_names)
+ const bt_field *array, uint64_t i, bool print_names)
{
- const struct bt_field *field = NULL;
+ const bt_field *field = NULL;
if (i != 0) {
g_string_append(pretty->string, ", ");
static
int print_array(struct pretty_component *pretty,
- const struct bt_field *array, bool print_names)
+ const bt_field *array, bool print_names)
{
int ret = 0;
- const struct bt_field_class *array_class = NULL;
+ const bt_field_class *array_class = NULL;
uint64_t len;
uint64_t i;
static
int print_sequence_field(struct pretty_component *pretty,
- const struct bt_field *seq, uint64_t i, bool print_names)
+ const bt_field *seq, uint64_t i, bool print_names)
{
- const struct bt_field *field = NULL;
+ const bt_field *field = NULL;
if (i != 0) {
g_string_append(pretty->string, ", ");
static
int print_sequence(struct pretty_component *pretty,
- const struct bt_field *seq, bool print_names)
+ const bt_field *seq, bool print_names)
{
int ret = 0;
uint64_t len;
static
int print_variant(struct pretty_component *pretty,
- const struct bt_field *variant, bool print_names)
+ const bt_field *variant, bool print_names)
{
int ret = 0;
- const struct bt_field *field = NULL;
+ const bt_field *field = NULL;
field = bt_field_variant_borrow_selected_option_field_const(variant);
BT_ASSERT(field);
static
int print_field(struct pretty_component *pretty,
- const struct bt_field *field, bool print_names,
+ const bt_field *field, bool print_names,
GQuark *filter_fields, int filter_array_len)
{
enum bt_field_class_type class_id;
static
int print_stream_packet_context(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
int ret = 0;
- const struct bt_packet *packet = NULL;
- const struct bt_field *main_field = NULL;
+ const bt_packet *packet = NULL;
+ const bt_field *main_field = NULL;
packet = bt_event_borrow_packet_const(event);
if (!packet) {
static
int print_event_header_raw(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
int ret = 0;
- const struct bt_field *main_field = NULL;
+ const bt_field *main_field = NULL;
main_field = bt_event_borrow_header_field_const(event);
if (!main_field) {
static
int print_stream_event_context(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
int ret = 0;
- const struct bt_field *main_field = NULL;
+ const bt_field *main_field = NULL;
main_field = bt_event_borrow_common_context_field_const(event);
if (!main_field) {
static
int print_event_context(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
int ret = 0;
- const struct bt_field *main_field = NULL;
+ const bt_field *main_field = NULL;
main_field = bt_event_borrow_specific_context_field_const(event);
if (!main_field) {
static
int print_event_payload(struct pretty_component *pretty,
- const struct bt_event *event)
+ const bt_event *event)
{
int ret = 0;
- const struct bt_field *main_field = NULL;
+ const bt_field *main_field = NULL;
main_field = bt_event_borrow_payload_field_const(event);
if (!main_field) {
BT_HIDDEN
int pretty_print_event(struct pretty_component *pretty,
- const struct bt_notification *event_notif)
+ const bt_notification *event_notif)
{
int ret;
- const struct bt_event *event =
+ const bt_event *event =
bt_notification_event_borrow_event_const(event_notif);
BT_ASSERT(event);
static
int print_discarded_elements_msg(
- struct pretty_component *pretty, const struct bt_packet *packet,
+ struct pretty_component *pretty, const bt_packet *packet,
uint64_t count, const char *elem_type)
{
#if 0
int ret = 0;
- const struct bt_stream *stream = NULL;
- const struct bt_stream_class *stream_class = NULL;
- const struct bt_trace *trace = NULL;
+ const bt_stream *stream = NULL;
+ const bt_stream_class *stream_class = NULL;
+ const bt_trace *trace = NULL;
const char *stream_name;
const char *trace_name;
const unsigned char *trace_uuid;
int64_t stream_class_id;
int64_t stream_id;
- struct bt_clock_value *begin_clock_value = NULL;
- struct bt_clock_value *end_clock_value = NULL;
+ bt_clock_value *begin_clock_value = NULL;
+ bt_clock_value *end_clock_value = NULL;
/* Stream name */
BT_ASSERT(packet);
BT_HIDDEN
int pretty_print_packet(struct pretty_component *pretty,
- const struct bt_notification *packet_beginning_notif)
+ const bt_notification *packet_beginning_notif)
{
#if 0
- const struct bt_packet *packet = bt_notification_packet_beginning_borrow_packet_const(
+ const bt_packet *packet = bt_notification_packet_beginning_borrow_packet_const(
packet_beginning_notif);
uint64_t count;
int status = 0;
}
BT_HIDDEN
-void counter_finalize(struct bt_self_component_sink *comp)
+void counter_finalize(bt_self_component_sink *comp)
{
struct counter *counter;
BT_HIDDEN
enum bt_self_component_status counter_init(
- struct bt_self_component_sink *component,
- const struct bt_value *params,
+ bt_self_component_sink *component,
+ const bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_self_component_status ret;
struct counter *counter = g_new0(struct counter, 1);
- const struct bt_value *step = NULL;
- const struct bt_value *hide_zero = NULL;
+ const bt_value *step = NULL;
+ const bt_value *hide_zero = NULL;
if (!counter) {
ret = BT_SELF_COMPONENT_STATUS_NOMEM;
BT_HIDDEN
enum bt_self_component_status counter_port_connected(
- struct bt_self_component_sink *comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port)
+ 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;
struct counter *counter;
- struct bt_self_component_port_input_notification_iterator *iterator;
+ bt_self_component_port_input_notification_iterator *iterator;
counter = bt_self_component_get_data(
bt_self_component_sink_as_self_component(comp));
BT_HIDDEN
enum bt_self_component_status counter_consume(
- struct bt_self_component_sink *comp)
+ bt_self_component_sink *comp)
{
enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
struct counter *counter;
uint64_t i;
for (i = 0; i < notif_count; i++) {
- const struct bt_notification *notif = notifs[i];
+ const bt_notification *notif = notifs[i];
BT_ASSERT(notif);
switch (bt_notification_get_type(notif)) {
#include <stdint.h>
struct counter {
- struct bt_self_component_port_input_notification_iterator *notif_iter;
+ bt_self_component_port_input_notification_iterator *notif_iter;
struct {
uint64_t event;
uint64_t stream_begin;
BT_HIDDEN
enum bt_self_component_status counter_init(
- struct bt_self_component_sink *component,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_sink *component,
+ const bt_value *params, void *init_method_data);
BT_HIDDEN
-void counter_finalize(struct bt_self_component_sink *component);
+void counter_finalize(bt_self_component_sink *component);
BT_HIDDEN
enum bt_self_component_status counter_port_connected(
- struct bt_self_component_sink *component,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ 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(struct bt_self_component_sink *component);
+enum bt_self_component_status counter_consume(bt_self_component_sink *component);
#endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_H */
}
BT_HIDDEN
-void dummy_finalize(struct bt_self_component_sink *comp)
+void dummy_finalize(bt_self_component_sink *comp)
{
struct dummy *dummy;
BT_HIDDEN
enum bt_self_component_status dummy_init(
- struct bt_self_component_sink *component,
- const struct bt_value *params,
+ bt_self_component_sink *component,
+ const bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_self_component_status ret;
BT_HIDDEN
enum bt_self_component_status dummy_port_connected(
- struct bt_self_component_sink *comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port)
+ 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;
struct dummy *dummy;
- struct bt_self_component_port_input_notification_iterator *iterator;
+ bt_self_component_port_input_notification_iterator *iterator;
dummy = bt_self_component_get_data(
bt_self_component_sink_as_self_component(comp));
BT_HIDDEN
enum bt_self_component_status dummy_consume(
- struct bt_self_component_sink *component)
+ bt_self_component_sink *component)
{
enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
bt_notification_array_const notifs;
#include <stdbool.h>
struct dummy {
- struct bt_self_component_port_input_notification_iterator *notif_iter;
+ bt_self_component_port_input_notification_iterator *notif_iter;
};
BT_HIDDEN
enum bt_self_component_status dummy_init(
- struct bt_self_component_sink *component,
- const struct bt_value *params, void *init_method_data);
+ bt_self_component_sink *component,
+ const bt_value *params, void *init_method_data);
BT_HIDDEN
-void dummy_finalize(struct bt_self_component_sink *component);
+void dummy_finalize(bt_self_component_sink *component);
BT_HIDDEN
enum bt_self_component_status dummy_port_connected(
- struct bt_self_component_sink *comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ 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(
- struct bt_self_component_sink *component);
+ bt_self_component_sink *component);
#endif /* BABELTRACE_PLUGINS_UTILS_DUMMY_H */
GPtrArray *muxer_notif_iters;
/* Weak ref */
- struct bt_self_component_filter *self_comp;
+ bt_self_component_filter *self_comp;
unsigned int next_port_num;
size_t available_input_ports;
struct muxer_upstream_notif_iter {
/* Owned by this, NULL if ended */
- struct bt_self_component_port_input_notification_iterator *notif_iter;
+ bt_self_component_port_input_notification_iterator *notif_iter;
- /* Contains `const struct bt_notification *`, owned by this */
+ /* Contains `const bt_notification *`, owned by this */
GQueue *notifs;
};
bt_self_component_port_input_notification_iterator_put_ref(muxer_upstream_notif_iter->notif_iter);
if (muxer_upstream_notif_iter->notifs) {
- const struct bt_notification *notif;
+ const bt_notification *notif;
while ((notif = g_queue_pop_head(
muxer_upstream_notif_iter->notifs))) {
static
struct muxer_upstream_notif_iter *muxer_notif_iter_add_upstream_notif_iter(
struct muxer_notif_iter *muxer_notif_iter,
- struct bt_self_component_port_input_notification_iterator *self_notif_iter)
+ bt_self_component_port_input_notification_iterator *self_notif_iter)
{
struct muxer_upstream_notif_iter *muxer_upstream_notif_iter =
g_new0(struct muxer_upstream_notif_iter, 1);
static
enum bt_self_component_status ensure_available_input_port(
- struct bt_self_component_filter *self_comp)
+ 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));
static
enum bt_self_component_status create_output_port(
- struct bt_self_component_filter *self_comp)
+ bt_self_component_filter *self_comp)
{
return bt_self_component_filter_add_output_port(
self_comp, "out", NULL, NULL);
}
static
-struct bt_value *get_default_params(void)
+bt_value *get_default_params(void)
{
- struct bt_value *params;
+ bt_value *params;
int ret;
params = bt_value_map_create();
static
int configure_muxer_comp(struct muxer_comp *muxer_comp,
- const struct bt_value *params)
+ const bt_value *params)
{
- struct bt_value *default_params = NULL;
- struct bt_value *real_params = NULL;
- const struct bt_value *assume_absolute_clock_classes = NULL;
+ bt_value *default_params = NULL;
+ bt_value *real_params = NULL;
+ const bt_value *assume_absolute_clock_classes = NULL;
int ret = 0;
bt_bool bool_val;
BT_HIDDEN
enum bt_self_component_status muxer_init(
- struct bt_self_component_filter *self_comp,
- struct bt_value *params, void *init_data)
+ 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_HIDDEN
-void muxer_finalize(struct bt_self_component_filter *self_comp)
+void muxer_finalize(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));
}
static
-struct bt_self_component_port_input_notification_iterator *
+bt_self_component_port_input_notification_iterator *
create_notif_iter_on_input_port(
- struct bt_self_component_port_input *self_port, int *ret)
+ bt_self_component_port_input *self_port, int *ret)
{
- const struct bt_port *port = bt_self_component_port_as_port(
+ const bt_port *port = bt_self_component_port_as_port(
bt_self_component_port_input_as_self_component_port(
self_port));
- struct bt_self_component_port_input_notification_iterator *notif_iter =
+ bt_self_component_port_input_notification_iterator *notif_iter =
NULL;
BT_ASSERT(ret);
*/
while (true) {
GList *node = muxer_notif_iter->newly_connected_self_ports;
- struct bt_self_component_port_input *self_port;
- const struct bt_port *port;
- struct bt_self_component_port_input_notification_iterator *
+ bt_self_component_port_input *self_port;
+ const bt_port *port;
+ bt_self_component_port_input_notification_iterator *
upstream_notif_iter = NULL;
struct muxer_upstream_notif_iter *muxer_upstream_notif_iter;
static
int get_notif_ts_ns(struct muxer_comp *muxer_comp,
struct muxer_notif_iter *muxer_notif_iter,
- const struct bt_notification *notif, int64_t last_returned_ts_ns,
+ const bt_notification *notif, int64_t last_returned_ts_ns,
int64_t *ts_ns)
{
- const struct bt_clock_class *clock_class = NULL;
- const struct bt_clock_value *clock_value = NULL;
- const struct bt_event *event = NULL;
+ const bt_clock_class *clock_class = NULL;
+ const bt_clock_value *clock_value = NULL;
+ const bt_event *event = NULL;
int ret = 0;
const unsigned char *cc_uuid;
const char *cc_name;
*muxer_upstream_notif_iter = NULL;
for (i = 0; i < muxer_notif_iter->muxer_upstream_notif_iters->len; i++) {
- const struct bt_notification *notif;
+ const bt_notification *notif;
struct muxer_upstream_notif_iter *cur_muxer_upstream_notif_iter =
g_ptr_array_index(muxer_notif_iter->muxer_upstream_notif_iters, i);
int64_t notif_ts_ns;
enum bt_notification_iterator_status muxer_notif_iter_do_next_one(
struct muxer_comp *muxer_comp,
struct muxer_notif_iter *muxer_notif_iter,
- const struct bt_notification **notif)
+ const bt_notification **notif)
{
enum bt_notification_iterator_status status =
BT_NOTIFICATION_ITERATOR_STATUS_OK;
}
for (i = 0; i < count; i++) {
- struct bt_self_component_port_input *self_port =
+ bt_self_component_port_input *self_port =
bt_self_component_filter_borrow_input_port_by_index(
muxer_comp->self_comp, i);
- const struct bt_port *port;
+ const bt_port *port;
BT_ASSERT(self_port);
port = bt_self_component_port_as_port(
BT_HIDDEN
enum bt_self_notification_iterator_status muxer_notif_iter_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_filter *self_comp,
- struct bt_self_component_port_output *port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_filter *self_comp,
+ bt_self_component_port_output *port)
{
struct muxer_comp *muxer_comp = NULL;
struct muxer_notif_iter *muxer_notif_iter = NULL;
BT_HIDDEN
void muxer_notif_iter_finalize(
- struct bt_self_notification_iterator *self_notif_iter)
+ bt_self_notification_iterator *self_notif_iter)
{
struct muxer_notif_iter *muxer_notif_iter =
bt_self_notification_iterator_get_data(self_notif_iter);
- struct bt_self_component *self_comp = NULL;
+ bt_self_component *self_comp = NULL;
struct muxer_comp *muxer_comp = NULL;
self_comp = bt_self_notification_iterator_borrow_component(
BT_HIDDEN
enum bt_notification_iterator_status muxer_notif_iter_next(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
enum bt_notification_iterator_status status;
struct muxer_notif_iter *muxer_notif_iter =
bt_self_notification_iterator_get_data(self_notif_iter);
- struct bt_self_component *self_comp = NULL;
+ bt_self_component *self_comp = NULL;
struct muxer_comp *muxer_comp = NULL;
BT_ASSERT(muxer_notif_iter);
BT_HIDDEN
enum bt_self_component_status muxer_input_port_connected(
- struct bt_self_component_filter *self_comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port)
+ 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;
- const struct bt_port *port = bt_self_component_port_as_port(
+ const bt_port *port = bt_self_component_port_as_port(
bt_self_component_port_input_as_self_component_port(
self_port));
struct muxer_comp *muxer_comp =
BT_HIDDEN
void muxer_input_port_disconnected(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_input *self_port)
+ bt_self_component_filter *self_component,
+ bt_self_component_port_input *self_port)
{
struct muxer_comp *muxer_comp =
bt_self_component_get_data(
bt_self_component_filter_as_self_component(
self_component));
- const struct bt_port *port =
+ const bt_port *port =
bt_self_component_port_as_port(
bt_self_component_port_input_as_self_component_port(
self_port));
BT_HIDDEN
enum bt_self_component_status muxer_init(
- struct bt_self_component_filter *self_comp,
- const struct bt_value *params, void *init_data);
+ bt_self_component_filter *self_comp,
+ const bt_value *params, void *init_data);
BT_HIDDEN
-void muxer_finalize(struct bt_self_component_filter *self_comp);
+void muxer_finalize(bt_self_component_filter *self_comp);
BT_HIDDEN
enum bt_self_notification_iterator_status muxer_notif_iter_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_filter *self_comp,
- struct bt_self_component_port_output *self_port);
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_filter *self_comp,
+ bt_self_component_port_output *self_port);
BT_HIDDEN
void muxer_notif_iter_finalize(
- struct bt_self_notification_iterator *self_notif_iter);
+ bt_self_notification_iterator *self_notif_iter);
BT_HIDDEN
enum bt_self_notification_iterator_status muxer_notif_iter_next(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count);
BT_HIDDEN
enum bt_self_component_status muxer_input_port_connected(
- struct bt_self_component_filter *comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port);
+ bt_self_component_filter *comp,
+ bt_self_component_port_input *self_port,
+ const bt_port_output *other_port);
BT_HIDDEN
void muxer_input_port_disconnected(
- struct bt_self_component_filter *self_component,
- struct bt_self_component_port_input *self_port);
+ bt_self_component_filter *self_component,
+ bt_self_component_port_input *self_port);
#endif /* BABELTRACE_PLUGINS_UTILS_MUXER_H */
#include "iterator.h"
static
-const struct bt_packet *lookup_packet(struct trimmer_iterator *trim_it,
- const struct bt_packet *packet)
+const bt_packet *lookup_packet(struct trimmer_iterator *trim_it,
+ const bt_packet *packet)
{
- return (const struct bt_packet *) g_hash_table_lookup(
+ return (const bt_packet *) g_hash_table_lookup(
trim_it->packet_map,
(gpointer) packet);
}
static
-const struct bt_packet *insert_new_packet(struct trimmer_iterator *trim_it,
- const struct bt_packet *packet,
- const struct bt_stream *stream)
+const bt_packet *insert_new_packet(struct trimmer_iterator *trim_it,
+ const bt_packet *packet,
+ const bt_stream *stream)
{
- const struct bt_packet *writer_packet = NULL;
+ const bt_packet *writer_packet = NULL;
int ret;
BT_LOGD_STR("Inserting a new packet.");
BT_HIDDEN
enum bt_component_status update_packet_context_field(FILE *err,
- const struct bt_packet *writer_packet,
+ const bt_packet *writer_packet,
const char *name, int64_t value)
{
enum bt_component_status ret;
- const struct bt_field *packet_context = NULL, *writer_packet_context = NULL;
- const struct bt_field_class *struct_class = NULL, *field_class = NULL;
- const struct bt_field *field = NULL, *writer_field = NULL;
+ 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;
int nr_fields, i, int_ret;
BT_LOGD("Updating packet context field: name=%s", name);
}
BT_HIDDEN
-const struct bt_packet *trimmer_new_packet(
+const bt_packet *trimmer_new_packet(
struct trimmer_iterator *trim_it,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_stream *stream = NULL;
- const struct bt_packet *writer_packet = NULL;
+ const bt_stream *stream = NULL;
+ const bt_packet *writer_packet = NULL;
int int_ret;
stream = bt_packet_get_stream(packet);
}
BT_HIDDEN
-const struct bt_packet *trimmer_close_packet(
+const bt_packet *trimmer_close_packet(
struct trimmer_iterator *trim_it,
- const struct bt_packet *packet)
+ const bt_packet *packet)
{
- const struct bt_packet *writer_packet = NULL;
+ const bt_packet *writer_packet = NULL;
writer_packet = lookup_packet(trim_it, packet);
if (!writer_packet) {
}
BT_HIDDEN
-const struct bt_event *trimmer_output_event(
+const bt_event *trimmer_output_event(
struct trimmer_iterator *trim_it,
- const struct bt_event *event)
+ const bt_event *event)
{
- const struct bt_event_class *event_class = NULL;
- const struct bt_event *writer_event = NULL;
- const struct bt_packet *packet = NULL, *writer_packet = NULL;
+ const bt_event_class *event_class = NULL;
+ const bt_event *writer_event = NULL;
+ const bt_packet *packet = NULL, *writer_packet = NULL;
const char *event_name;
int int_ret;
#include <babeltrace/babeltrace.h>
BT_HIDDEN
-const struct bt_event *trimmer_output_event(struct trimmer_iterator *trim_it,
- const struct bt_event *event);
+const bt_event *trimmer_output_event(struct trimmer_iterator *trim_it,
+ const bt_event *event);
BT_HIDDEN
-const struct bt_packet *trimmer_new_packet(struct trimmer_iterator *trim_it,
- const struct bt_packet *packet);
+const bt_packet *trimmer_new_packet(struct trimmer_iterator *trim_it,
+ const bt_packet *packet);
BT_HIDDEN
-const struct bt_packet *trimmer_close_packet(struct trimmer_iterator *trim_it,
- const struct bt_packet *packet);
+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,
- const struct bt_packet *writer_packet,
+ const bt_packet *writer_packet,
const char *name, int64_t value);
#endif /* BABELTRACE_PLUGIN_TRIMMER_COPY_H */
static
gboolean close_packets(gpointer key, gpointer value, gpointer user_data)
{
- const struct bt_packet *writer_packet = value;
+ const bt_packet *writer_packet = value;
bt_packet_put_ref(writer_packet);
return TRUE;
}
BT_HIDDEN
-void trimmer_iterator_finalize(struct bt_self_notification_iterator *it)
+void trimmer_iterator_finalize(bt_self_notification_iterator *it)
{
struct trimmer_iterator *trim_it;
BT_HIDDEN
enum bt_notification_iterator_status trimmer_iterator_init(
- struct bt_self_notification_iterator *iterator,
+ bt_self_notification_iterator *iterator,
struct bt_private_port *port)
{
enum bt_notification_iterator_status ret =
enum bt_connection_status conn_status;
struct bt_private_port *input_port = NULL;
struct bt_private_connection *connection = NULL;
- struct bt_self_component *component =
+ bt_self_component *component =
bt_self_notification_iterator_get_private_component(iterator);
struct trimmer_iterator *it_data = g_new0(struct trimmer_iterator, 1);
}
static
-const struct bt_notification *evaluate_event_notification(
- const struct bt_notification *notification,
+const bt_notification *evaluate_event_notification(
+ const bt_notification *notification,
struct trimmer_iterator *trim_it,
struct trimmer_bound *begin, struct trimmer_bound *end,
bool *_event_in_range, bool *finished)
{
int64_t ts;
int clock_ret;
- const struct bt_event *event = NULL, *writer_event;
+ const bt_event *event = NULL, *writer_event;
bool in_range = true;
- const struct bt_clock_class *clock_class = NULL;
- const struct bt_trace *trace = NULL;
- const struct bt_stream *stream = NULL;
- const struct bt_stream_class *stream_class = NULL;
- struct bt_clock_value *clock_value = NULL;
+ const bt_clock_class *clock_class = NULL;
+ const bt_trace *trace = NULL;
+ const bt_stream *stream = NULL;
+ const bt_stream_class *stream_class = NULL;
+ bt_clock_value *clock_value = NULL;
bool lazy_update = false;
- const struct bt_notification *new_notification = NULL;
- struct bt_clock_class_priority_map *cc_prio_map;
+ const bt_notification *new_notification = NULL;
+ bt_clock_class_priority_map *cc_prio_map;
event = bt_notification_event_get_event(notification);
BT_ASSERT(event);
}
static
-int ns_from_integer_field(const struct bt_field *integer, int64_t *ns)
+int ns_from_integer_field(const bt_field *integer, int64_t *ns)
{
int ret = 0;
int is_signed;
uint64_t raw_clock_value;
- const struct bt_field_class *integer_class = NULL;
- const struct bt_clock_class *clock_class = NULL;
- struct bt_clock_value *clock_value = NULL;
+ const bt_field_class *integer_class = NULL;
+ const bt_clock_class *clock_class = NULL;
+ bt_clock_value *clock_value = NULL;
integer_class = bt_field_get_class(integer);
BT_ASSERT(integer_class);
* timestamp minus the offset.
*/
static
-int64_t get_raw_timestamp(const struct bt_packet *writer_packet,
+int64_t get_raw_timestamp(const bt_packet *writer_packet,
int64_t timestamp)
{
- const struct bt_clock_class *writer_clock_class;
+ const bt_clock_class *writer_clock_class;
int64_t sec_offset, cycles_offset, ns;
- const struct bt_trace *writer_trace;
- const struct bt_stream *writer_stream;
- const struct bt_stream_class *writer_stream_class;
+ const bt_trace *writer_trace;
+ const bt_stream *writer_stream;
+ const bt_stream_class *writer_stream_class;
int ret;
uint64_t freq;
}
static
-const struct bt_notification *evaluate_packet_notification(
- const struct bt_notification *notification,
+const bt_notification *evaluate_packet_notification(
+ const bt_notification *notification,
struct trimmer_iterator *trim_it,
struct trimmer_bound *begin, struct trimmer_bound *end,
bool *_packet_in_range, bool *finished)
{
int64_t begin_ns, pkt_begin_ns, end_ns, pkt_end_ns;
bool in_range = true;
- const struct bt_packet *packet = NULL, *writer_packet = NULL;
- const struct bt_field *packet_context = NULL,
+ const bt_packet *packet = NULL, *writer_packet = NULL;
+ const bt_field *packet_context = NULL,
*timestamp_begin = NULL,
*timestamp_end = NULL;
- const struct bt_notification *new_notification = NULL;
+ const bt_notification *new_notification = NULL;
enum bt_component_status ret;
bool lazy_update = false;
}
static
-const struct bt_notification *evaluate_stream_notification(
- const struct bt_notification *notification,
+const bt_notification *evaluate_stream_notification(
+ const bt_notification *notification,
struct trimmer_iterator *trim_it)
{
- const struct bt_stream *stream;
+ const bt_stream *stream;
stream = bt_notification_stream_end_get_stream(notification);
BT_ASSERT(stream);
/* Return true if the notification should be forwarded. */
static
enum bt_notification_iterator_status evaluate_notification(
- const struct bt_notification **notification,
+ const bt_notification **notification,
struct trimmer_iterator *trim_it,
struct trimmer_bound *begin, struct trimmer_bound *end,
bool *in_range)
{
enum bt_notification_type type;
- const struct bt_notification *new_notification = NULL;
+ const bt_notification *new_notification = NULL;
bool finished = false;
*in_range = true;
}
BT_HIDDEN
-struct bt_notification_iterator_next_method_return trimmer_iterator_next(
- struct bt_self_notification_iterator *iterator)
+bt_notification_iterator_next_method_return trimmer_iterator_next(
+ bt_self_notification_iterator *iterator)
{
struct trimmer_iterator *trim_it = NULL;
- struct bt_self_component *component = NULL;
+ bt_self_component *component = NULL;
struct trimmer *trimmer = NULL;
- struct bt_notification_iterator *source_it = NULL;
- struct bt_notification_iterator_next_method_return ret = {
+ bt_notification_iterator *source_it = NULL;
+ bt_notification_iterator_next_method_return ret = {
.status = BT_NOTIFICATION_ITERATOR_STATUS_OK,
.notification = NULL,
};
struct trimmer_iterator {
/* Input iterator associated with this output iterator. */
- struct bt_notification_iterator *input_iterator;
- const struct bt_notification *current_notification;
+ bt_notification_iterator *input_iterator;
+ const bt_notification *current_notification;
FILE *err;
/* Map between reader and writer packets. */
GHashTable *packet_map;
BT_HIDDEN
enum bt_notification_iterator_status trimmer_iterator_init(
- struct bt_self_notification_iterator *iterator,
+ bt_self_notification_iterator *iterator,
struct bt_private_port *port);
BT_HIDDEN
-void trimmer_iterator_finalize(struct bt_self_notification_iterator *it);
+void trimmer_iterator_finalize(bt_self_notification_iterator *it);
BT_HIDDEN
-struct bt_notification_iterator_next_method_return trimmer_iterator_next(
- struct bt_self_notification_iterator *iterator);
+bt_notification_iterator_next_method_return trimmer_iterator_next(
+ bt_self_notification_iterator *iterator);
#endif /* BABELTRACE_PLUGIN_TRIMMER_ITERATOR_H */
return g_new0(struct trimmer, 1);
}
-void finalize_trimmer(struct bt_self_component *component)
+void finalize_trimmer(bt_self_component *component)
{
void *data = bt_self_component_get_user_data(component);
* ss
*/
static
-int timestamp_from_param(const char *param_name, struct bt_value *param,
+int timestamp_from_param(const char *param_name, bt_value *param,
struct trimmer *trimmer, struct trimmer_bound *result_bound,
bt_bool gmt)
{
static
enum bt_component_status init_from_params(struct trimmer *trimmer,
- struct bt_value *params)
+ bt_value *params)
{
- struct bt_value *value = NULL;
+ bt_value *value = NULL;
bt_bool gmt = BT_FALSE;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
}
enum bt_component_status trimmer_component_init(
- struct bt_self_component *component, struct bt_value *params,
+ bt_self_component *component, bt_value *params,
UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
};
enum bt_component_status trimmer_component_init(
- struct bt_self_component *component,
- struct bt_value *params, void *init_method_data);
+ bt_self_component *component,
+ bt_value *params, void *init_method_data);
-void finalize_trimmer(struct bt_self_component *component);
+void finalize_trimmer(bt_self_component *component);
#endif /* BABELTRACE_PLUGINS_UTILS_TRIMMER_H */
}
static
-const struct bt_plugin *bt_plugin_from_python_plugin_info(PyObject *plugin_info)
+const bt_plugin *bt_plugin_from_python_plugin_info(PyObject *plugin_info)
{
- const struct bt_plugin *plugin = NULL;
+ const bt_plugin *plugin = NULL;
PyObject *py_name = NULL;
PyObject *py_author = NULL;
PyObject *py_description = NULL;
size_t i;
for (i = 0; i < PyList_Size(py_comp_class_addrs); i++) {
- struct bt_component_class *comp_class;
+ bt_component_class *comp_class;
PyObject *py_comp_class_addr;
py_comp_class_addr =
PyList_GetItem(py_comp_class_addrs, i);
BT_ASSERT(py_comp_class_addr);
if (PyLong_Check(py_comp_class_addr)) {
- comp_class = (struct bt_component_class *)
+ comp_class = (bt_component_class *)
PyLong_AsUnsignedLongLong(py_comp_class_addr);
} else {
BT_LOGW("Component class address is not an integer in Python plugin info object: "
}
G_MODULE_EXPORT
-struct bt_plugin_set *bt_plugin_python_create_all_from_file(const char *path)
+bt_plugin_set *bt_plugin_python_create_all_from_file(const char *path)
{
- struct bt_plugin_set *plugin_set = NULL;
- const struct bt_plugin *plugin = NULL;
+ bt_plugin_set *plugin_set = NULL;
+ const bt_plugin *plugin = NULL;
PyObject *py_plugin_info = NULL;
gchar *basename = NULL;
size_t path_len;
#include <stdlib.h>
#include <glib.h>
-static enum bt_plugin_status plugin_init(const struct bt_plugin *plugin)
+static enum bt_plugin_status plugin_init(const bt_plugin *plugin)
{
g_setenv("BT_TEST_PLUGIN_INIT_CALLED", "1", 1);
return BT_PLUGIN_STATUS_OK;
#include <babeltrace/assert-internal.h>
static enum bt_self_component_status sink_consume(
- struct bt_self_component_sink *self_comp)
+ bt_self_component_sink *self_comp)
{
return BT_SELF_COMPONENT_STATUS_OK;
}
static enum bt_self_notification_iterator_status src_dummy_iterator_init_method(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port)
{
return BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK;
}
static enum bt_self_notification_iterator_status flt_dummy_iterator_init_method(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_filter *self_comp,
- struct bt_self_component_port_output *self_port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_filter *self_comp,
+ bt_self_component_port_output *self_port)
{
return BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK;
}
static void dummy_iterator_finalize_method(
- struct bt_self_notification_iterator *self_notif_iter)
+ bt_self_notification_iterator *self_notif_iter)
{
}
static enum bt_self_notification_iterator_status dummy_iterator_next_method(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
}
static enum bt_query_status flt_query_method(
- struct bt_self_component_class_filter *component_class,
- const struct bt_query_executor *query_exec,
- const char *object, const struct bt_value *params,
- const struct bt_value **result)
+ bt_self_component_class_filter *component_class,
+ const bt_query_executor *query_exec,
+ const char *object, const bt_value *params,
+ const bt_value **result)
{
- struct bt_value *res = bt_value_array_create();
- struct bt_value *val;
+ bt_value *res = bt_value_array_create();
+ bt_value *val;
*result = res;
int iret;
struct test_event {
enum test_event_type type;
- const struct bt_stream *stream;
- const struct bt_packet *packet;
+ const bt_stream *stream;
+ const bt_packet *packet;
};
static bool debug = false;
static enum test current_test;
static GArray *test_events;
-static struct bt_graph *graph;
-static struct bt_stream_class *src_stream_class;
-static struct bt_event_class *src_event_class;
-static struct bt_stream *src_stream1;
-static struct bt_stream *src_stream2;
-static struct bt_packet *src_stream1_packet1;
-static struct bt_packet *src_stream1_packet2;
-static struct bt_packet *src_stream2_packet1;
-static struct bt_packet *src_stream2_packet2;
+static bt_graph *graph;
+static bt_stream_class *src_stream_class;
+static bt_event_class *src_event_class;
+static bt_stream *src_stream1;
+static bt_stream *src_stream2;
+static bt_packet *src_stream1_packet1;
+static bt_packet *src_stream1_packet2;
+static bt_packet *src_stream2_packet1;
+static bt_packet *src_stream2_packet2;
enum {
SEQ_END = -1,
};
struct sink_user_data {
- struct bt_self_component_port_input_notification_iterator *notif_iter;
+ bt_self_component_port_input_notification_iterator *notif_iter;
};
/*
static
void init_static_data(void)
{
- struct bt_trace_class *trace_class;
- struct bt_trace *trace;
+ bt_trace_class *trace_class;
+ bt_trace *trace;
/* Test events */
test_events = g_array_new(FALSE, TRUE, sizeof(struct test_event));
}
static
-void src_iter_finalize(struct bt_self_notification_iterator *self_notif_iter)
+void src_iter_finalize(bt_self_notification_iterator *self_notif_iter)
{
struct src_iter_user_data *user_data =
bt_self_notification_iterator_get_data(
static
enum bt_self_notification_iterator_status src_iter_init(
- struct bt_self_notification_iterator *self_notif_iter,
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_port)
+ bt_self_notification_iterator *self_notif_iter,
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_port)
{
struct src_iter_user_data *user_data =
g_new0(struct src_iter_user_data, 1);
}
static
-void src_iter_next_seq_one(struct bt_self_notification_iterator* notif_iter,
+void src_iter_next_seq_one(bt_self_notification_iterator* notif_iter,
struct src_iter_user_data *user_data,
- const struct bt_notification **notif)
+ const bt_notification **notif)
{
- struct bt_packet *event_packet = NULL;
+ bt_packet *event_packet = NULL;
switch (user_data->seq[user_data->at]) {
case SEQ_STREAM1_BEGIN:
static
enum bt_self_notification_iterator_status src_iter_next_seq(
- struct bt_self_notification_iterator *notif_iter,
+ bt_self_notification_iterator *notif_iter,
struct src_iter_user_data *user_data,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
static
enum bt_self_notification_iterator_status src_iter_next(
- struct bt_self_notification_iterator *self_notif_iter,
+ bt_self_notification_iterator *self_notif_iter,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
static
enum bt_self_component_status src_init(
- struct bt_self_component_source *self_comp,
- const struct bt_value *params, void *init_method_data)
+ bt_self_component_source *self_comp,
+ const bt_value *params, void *init_method_data)
{
int ret;
}
static
-void src_finalize(struct bt_self_component_source *self_comp)
+void src_finalize(bt_self_component_source *self_comp)
{
}
static
-void append_test_events_from_notification(const struct bt_notification *notification)
+void append_test_events_from_notification(const bt_notification *notification)
{
struct test_event test_event = { 0 };
switch (bt_notification_get_type(notification)) {
case BT_NOTIFICATION_TYPE_EVENT:
{
- const struct bt_event *event;
+ const bt_event *event;
test_event.type = TEST_EV_TYPE_NOTIF_EVENT;
event = bt_notification_event_borrow_event_const(notification);
static
enum bt_self_component_status sink_consume(
- struct bt_self_component_sink *self_comp)
+ bt_self_component_sink *self_comp)
{
enum bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
struct sink_user_data *user_data =
static
enum bt_self_component_status sink_port_connected(
- struct bt_self_component_sink *self_comp,
- struct bt_self_component_port_input *self_port,
- const struct bt_port_output *other_port)
+ bt_self_component_sink *self_comp,
+ bt_self_component_port_input *self_port,
+ const bt_port_output *other_port)
{
struct sink_user_data *user_data =
bt_self_component_get_data(
static
enum bt_self_component_status sink_init(
- struct bt_self_component_sink *self_comp,
- const struct bt_value *params, void *init_method_data)
+ bt_self_component_sink *self_comp,
+ const bt_value *params, void *init_method_data)
{
struct sink_user_data *user_data = g_new0(struct sink_user_data, 1);
int ret;
}
static
-void sink_finalize(struct bt_self_component_sink *self_comp)
+void sink_finalize(bt_self_component_sink *self_comp)
{
struct sink_user_data *user_data =
bt_self_component_get_data(
}
static
-void create_source_sink(struct bt_graph *graph,
- const struct bt_component_source **source,
- const struct bt_component_sink **sink)
+void create_source_sink(bt_graph *graph,
+ const bt_component_source **source,
+ const bt_component_sink **sink)
{
- struct bt_component_class_source *src_comp_class;
- struct bt_component_class_sink *sink_comp_class;
+ bt_component_class_source *src_comp_class;
+ bt_component_class_sink *sink_comp_class;
int ret;
/* Create source component */
void do_std_test(enum test test, const char *name,
const struct test_event *expected_test_events)
{
- const struct bt_component_source *src_comp;
- const struct bt_component_sink *sink_comp;
- const struct bt_port_output *upstream_port;
- const struct bt_port_input *downstream_port;
+ const bt_component_source *src_comp;
+ 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;
clear_test_events();
{ .type = TEST_EV_TYPE_END, },
{ .type = TEST_EV_TYPE_SENTINEL, },
};
- const struct bt_component_source *src_comp;
- struct bt_port_output_notification_iterator *notif_iter;
+ const bt_component_source *src_comp;
+ bt_port_output_notification_iterator *notif_iter;
enum bt_notification_iterator_status iter_status =
BT_NOTIFICATION_ITERATOR_STATUS_OK;
- const struct bt_port_output *upstream_port;
+ const bt_port_output *upstream_port;
clear_test_events();
current_test = TEST_OUTPUT_PORT_NOTIFICATION_ITERATOR;
void test_bool(void)
{
bt_bool value;
- struct bt_value *obj;
+ bt_value *obj;
obj = bt_value_bool_create();
ok(obj && bt_value_is_bool(obj),
void test_integer(void)
{
int64_t value;
- struct bt_value *obj;
+ bt_value *obj;
obj = bt_value_integer_create();
ok(obj && bt_value_is_integer(obj),
void test_real(void)
{
double value;
- struct bt_value *obj;
+ bt_value *obj;
obj = bt_value_real_create();
ok(obj && bt_value_is_real(obj),
void test_string(void)
{
const char *value;
- struct bt_value *obj;
+ bt_value *obj;
obj = bt_value_string_create();
ok(obj && bt_value_is_string(obj),
bt_bool bool_value;
int64_t int_value;
double real_value;
- struct bt_value *obj;
+ bt_value *obj;
const char *string_value;
- struct bt_value *array_obj;
+ bt_value *array_obj;
array_obj = bt_value_array_create();
ok(array_obj && bt_value_is_array(array_obj),
}
static
-bt_bool test_map_foreach_cb_count(const char *key, struct bt_value *object,
+bt_bool test_map_foreach_cb_count(const char *key, bt_value *object,
void *data)
{
int *count = data;
};
static
-bt_bool test_map_foreach_cb_check(const char *key, struct bt_value *object,
+bt_bool test_map_foreach_cb_check(const char *key, bt_value *object,
void *data)
{
struct map_foreach_checklist *checklist = data;
bt_bool bool_value;
int64_t int_value;
double real_value;
- struct bt_value *obj;
- struct bt_value *map_obj;
+ bt_value *obj;
+ bt_value *map_obj;
struct map_foreach_checklist checklist;
map_obj = bt_value_map_create();
static
void test_compare_bool(void)
{
- struct bt_value *bool1 =
+ bt_value *bool1 =
bt_value_bool_create_init(BT_FALSE);
- struct bt_value *bool2 =
+ bt_value *bool2 =
bt_value_bool_create_init(BT_TRUE);
- struct bt_value *bool3 =
+ bt_value *bool3 =
bt_value_bool_create_init(BT_FALSE);
BT_ASSERT(bool1 && bool2 && bool3);
static
void test_compare_integer(void)
{
- struct bt_value *int1 =
+ bt_value *int1 =
bt_value_integer_create_init(10);
- struct bt_value *int2 =
+ bt_value *int2 =
bt_value_integer_create_init(-23);
- struct bt_value *int3 =
+ bt_value *int3 =
bt_value_integer_create_init(10);
BT_ASSERT(int1 && int2 && int3);
static
void test_compare_real(void)
{
- struct bt_value *real1 =
+ bt_value *real1 =
bt_value_real_create_init(17.38);
- struct bt_value *real2 =
+ bt_value *real2 =
bt_value_real_create_init(-14.23);
- struct bt_value *real3 =
+ bt_value *real3 =
bt_value_real_create_init(17.38);
BT_ASSERT(real1 && real2 && real3);
static
void test_compare_string(void)
{
- struct bt_value *string1 =
+ bt_value *string1 =
bt_value_string_create_init("hello");
- struct bt_value *string2 =
+ bt_value *string2 =
bt_value_string_create_init("bt_value");
- struct bt_value *string3 =
+ bt_value *string3 =
bt_value_string_create_init("hello");
BT_ASSERT(string1 && string2 && string3);
static
void test_compare_array(void)
{
- struct bt_value *array1 = bt_value_array_create();
- struct bt_value *array2 = bt_value_array_create();
- struct bt_value *array3 = bt_value_array_create();
+ 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_ASSERT(array1 && array2 && array3);
static
void test_compare_map(void)
{
- struct bt_value *map1 = bt_value_map_create();
- struct bt_value *map2 = bt_value_map_create();
- struct bt_value *map3 = bt_value_map_create();
+ 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_ASSERT(map1 && map2 && map3);
* bt_value_compare() elsewhere, then the deep copy is a
* success.
*/
- struct bt_value *null_copy_obj;
- struct bt_value *bool_obj, *bool_copy_obj;
- struct bt_value *integer_obj, *integer_copy_obj;
- struct bt_value *real_obj, *real_copy_obj;
- struct bt_value *string_obj, *string_copy_obj;
- struct bt_value *array_obj, *array_copy_obj;
- struct bt_value *map_obj, *map_copy_obj;
+ bt_value *null_copy_obj;
+ bt_value *bool_obj, *bool_copy_obj;
+ bt_value *integer_obj, *integer_copy_obj;
+ bt_value *real_obj, *real_copy_obj;
+ 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;
bool_obj = bt_value_bool_create_init(BT_TRUE);
}
static
-bt_bool compare_map_elements(const struct bt_value *map_a, const struct bt_value *map_b,
+bt_bool compare_map_elements(const bt_value *map_a, const bt_value *map_b,
const char *key)
{
- const struct bt_value *elem_a = NULL;
- const struct bt_value *elem_b = NULL;
+ const bt_value *elem_a = NULL;
+ const bt_value *elem_b = NULL;
bt_bool equal;
elem_a = bt_value_map_borrow_entry_value_const(map_a, key);
static
void test_extend(void)
{
- struct bt_value *base_map = bt_value_map_create();
- struct bt_value *extension_map = bt_value_map_create();
- struct bt_value *extended_map = NULL;
- struct bt_value *array = bt_value_array_create();
+ bt_value *base_map = bt_value_map_create();
+ 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_ASSERT(base_map);
union {
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
- const struct bt_port *other_port;
+ const bt_component *comp;
+ const bt_port *self_port;
+ const bt_port *other_port;
} src_comp_accept_output_port_connection;
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
- const struct bt_port *other_port;
+ const bt_component *comp;
+ const bt_port *self_port;
+ const bt_port *other_port;
} sink_comp_accept_input_port_connection;
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
- const struct bt_port *other_port;
+ const bt_component *comp;
+ const bt_port *self_port;
+ const bt_port *other_port;
} src_comp_output_port_connected;
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
- const struct bt_port *other_port;
+ const bt_component *comp;
+ const bt_port *self_port;
+ const bt_port *other_port;
} sink_comp_input_port_connected;
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
+ const bt_component *comp;
+ const bt_port *self_port;
} src_comp_output_port_disconnected;
struct {
- const struct bt_component *comp;
- const struct bt_port *self_port;
+ const bt_component *comp;
+ const bt_port *self_port;
} sink_comp_input_port_disconnected;
struct {
- const struct bt_component *comp;
- const struct bt_port *port;
+ const bt_component *comp;
+ const bt_port *port;
} graph_src_output_port_added;
struct {
- const struct bt_component *comp;
- const struct bt_port *port;
+ const bt_component *comp;
+ const bt_port *port;
} graph_sink_input_port_added;
struct {
- const struct bt_component *comp;
- const struct bt_port *port;
+ const bt_component *comp;
+ const bt_port *port;
} graph_src_output_port_removed;
struct {
- const struct bt_component *comp;
- const struct bt_port *port;
+ const bt_component *comp;
+ const bt_port *port;
} graph_sink_input_port_removed;
struct {
- const struct bt_component *upstream_comp;
- const struct bt_component *downstream_comp;
- const struct bt_port *upstream_port;
- const struct bt_port *downstream_port;
+ const bt_component *upstream_comp;
+ const bt_component *downstream_comp;
+ const bt_port *upstream_port;
+ const bt_port *downstream_port;
} graph_src_sink_ports_connected;
struct {
- const struct bt_component *upstream_comp;
- const struct bt_component *downstream_comp;
- const struct bt_port *upstream_port;
- const struct bt_port *downstream_port;
+ const bt_component *upstream_comp;
+ const bt_component *downstream_comp;
+ const bt_port *upstream_port;
+ const bt_port *downstream_port;
} graph_src_sink_ports_disconnected;
} data;
};
static GArray *events;
-static struct bt_component_class_source *src_comp_class;
-static struct bt_component_class_sink *sink_comp_class;
+static bt_component_class_source *src_comp_class;
+static bt_component_class_sink *sink_comp_class;
static enum test current_test;
static
static
enum bt_self_notification_iterator_status src_iter_next(
- struct bt_self_notification_iterator *self_iterator,
+ bt_self_notification_iterator *self_iterator,
bt_notification_array_const notifs, uint64_t capacity,
uint64_t *count)
{
static
enum bt_self_component_status src_accept_output_port_connection(
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_comp_port,
- const struct bt_port_input *other_port)
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_comp_port,
+ const bt_port_input *other_port)
{
struct event event = {
.type = SRC_COMP_ACCEPT_OUTPUT_PORT_CONNECTION,
static
enum bt_self_component_status sink_accept_input_port_connection(
- struct bt_self_component_sink *self_comp,
- struct bt_self_component_port_input *self_comp_port,
- const struct bt_port_output *other_port)
+ bt_self_component_sink *self_comp,
+ bt_self_component_port_input *self_comp_port,
+ const bt_port_output *other_port)
{
struct event event = {
.type = SINK_COMP_ACCEPT_INPUT_PORT_CONNECTION,
static
enum bt_self_component_status src_output_port_connected(
- struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_comp_port,
- const struct bt_port_input *other_port)
+ bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_comp_port,
+ const bt_port_input *other_port)
{
int ret;
struct event event = {
static
enum bt_self_component_status sink_input_port_connected(
- struct bt_self_component_sink *self_comp,
- struct bt_self_component_port_input *self_comp_port,
- const struct bt_port_output *other_port)
+ bt_self_component_sink *self_comp,
+ bt_self_component_port_input *self_comp_port,
+ const bt_port_output *other_port)
{
struct event event = {
.type = SINK_COMP_INPUT_PORT_CONNECTED,
}
static
-void src_output_port_disconnected(struct bt_self_component_source *self_comp,
- struct bt_self_component_port_output *self_comp_port)
+void src_output_port_disconnected(bt_self_component_source *self_comp,
+ bt_self_component_port_output *self_comp_port)
{
int ret;
struct event event = {
}
static
-void sink_input_port_disconnected(struct bt_self_component_sink *self_comp,
- struct bt_self_component_port_input *self_comp_port)
+void sink_input_port_disconnected(bt_self_component_sink *self_comp,
+ bt_self_component_port_input *self_comp_port)
{
struct event event = {
.type = SINK_COMP_INPUT_PORT_DISCONNECTED,
static
enum bt_self_component_status src_init(
- struct bt_self_component_source *self_comp,
- const struct bt_value *params, void *init_method_data)
+ bt_self_component_source *self_comp,
+ const bt_value *params, void *init_method_data)
{
int ret;
static
enum bt_self_component_status sink_init(
- struct bt_self_component_sink *self_comp,
- const struct bt_value *params, void *init_method_data)
+ bt_self_component_sink *self_comp,
+ const bt_value *params, void *init_method_data)
{
int ret;
static
enum bt_self_component_status sink_consume(
- struct bt_self_component_sink *self_comp)
+ bt_self_component_sink *self_comp)
{
- struct bt_self_component_port_input *def_port;
+ bt_self_component_port_input *def_port;
int ret;
switch (current_test) {
}
static
-void graph_src_output_port_added(const struct bt_component_source *comp,
- const struct bt_port_output *port, void *data)
+void graph_src_output_port_added(const bt_component_source *comp,
+ const bt_port_output *port, void *data)
{
struct event event = {
.type = GRAPH_SRC_OUTPUT_PORT_ADDED,
}
static
-void graph_sink_input_port_added(const struct bt_component_sink *comp,
- const struct bt_port_input *port, void *data)
+void graph_sink_input_port_added(const bt_component_sink *comp,
+ const bt_port_input *port, void *data)
{
struct event event = {
.type = GRAPH_SINK_INPUT_PORT_ADDED,
}
static
-void graph_src_output_port_removed(const struct bt_component_source *comp,
- const struct bt_port_output *port, void *data)
+void graph_src_output_port_removed(const bt_component_source *comp,
+ const bt_port_output *port, void *data)
{
struct event event = {
.type = GRAPH_SRC_OUTPUT_PORT_REMOVED,
}
static
-void graph_sink_input_port_removed(const struct bt_component_sink *comp,
- const struct bt_port_input *port, void *data)
+void graph_sink_input_port_removed(const bt_component_sink *comp,
+ const bt_port_input *port, void *data)
{
struct event event = {
.type = GRAPH_SINK_INPUT_PORT_REMOVED,
}
static
-void graph_src_sink_ports_connected(const struct bt_component_source *upstream_comp,
- const struct bt_component_sink *downstream_comp,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port, void *data)
+void graph_src_sink_ports_connected(const bt_component_source *upstream_comp,
+ const bt_component_sink *downstream_comp,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port, void *data)
{
struct event event = {
.type = GRAPH_SRC_SINK_PORTS_CONNECTED,
}
static
-void graph_src_sink_ports_disconnected(const struct bt_component_source *upstream_comp,
- const struct bt_component_sink *downstream_comp,
- const struct bt_port_output *upstream_port,
- const struct bt_port_input *downstream_port, void *data)
+void graph_src_sink_ports_disconnected(const bt_component_source *upstream_comp,
+ const bt_component_sink *downstream_comp,
+ const bt_port_output *upstream_port,
+ const bt_port_input *downstream_port, void *data)
{
struct event event = {
.type = GRAPH_SRC_SINK_PORTS_DISCONNECTED,
}
static
-const struct bt_component_source *create_src(struct bt_graph *graph)
+const bt_component_source *create_src(bt_graph *graph)
{
- const struct bt_component_source *comp;
+ const bt_component_source *comp;
int ret;
ret = bt_graph_add_source_component(graph, src_comp_class,
}
static
-const struct bt_component_sink *create_sink(struct bt_graph *graph)
+const bt_component_sink *create_sink(bt_graph *graph)
{
- const struct bt_component_sink *comp;
+ const bt_component_sink *comp;
int ret;
ret = bt_graph_add_sink_component(graph, sink_comp_class,
}
static
-struct bt_graph *create_graph(void)
+bt_graph *create_graph(void)
{
- struct bt_graph *graph = bt_graph_create();
+ bt_graph *graph = bt_graph_create();
int ret;
BT_ASSERT(graph);
void test_sink_removes_port_in_consume_then_src_removes_disconnected_port(void)
{
int ret;
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsink_def_port;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsink_def_port;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
void test_sink_removes_port_in_consume(void)
{
int ret;
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsink_def_port;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsink_def_port;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
static
void test_src_adds_port_in_port_connected(void)
{
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_output *src_hello_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsrc_hello_port;
- const struct bt_port *gsink_def_port;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_output *src_hello_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsrc_hello_port;
+ const bt_port *gsink_def_port;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
static
void test_simple(void)
{
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsink_def_port;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsink_def_port;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
static
void test_src_port_connected_error(void)
{
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsink_def_port;
- const struct bt_connection *conn = NULL;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsink_def_port;
+ const bt_connection *conn = NULL;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
static
void test_sink_port_connected_error(void)
{
- const struct bt_component_source *src;
- const struct bt_component_sink *sink;
- const struct bt_component *gsrc;
- const struct bt_component *gsink;
- struct bt_graph *graph;
- const struct bt_port_output *src_def_port;
- const struct bt_port_input *sink_def_port;
- const struct bt_port *gsrc_def_port;
- const struct bt_port *gsink_def_port;
- const struct bt_connection *conn = NULL;
+ const bt_component_source *src;
+ const bt_component_sink *sink;
+ const bt_component *gsrc;
+ const bt_component *gsink;
+ bt_graph *graph;
+ const bt_port_output *src_def_port;
+ const bt_port_input *sink_def_port;
+ const bt_port *gsrc_def_port;
+ const bt_port *gsink_def_port;
+ const bt_connection *conn = NULL;
struct event event;
enum bt_graph_status status;
size_t src_accept_port_connection_pos;
static
void test_empty_graph(void)
{
- struct bt_graph *graph;
+ bt_graph *graph;
prepare_test(TEST_EMPTY_GRAPH, "empty graph");
graph = create_graph();
static void test_minimal(const char *plugin_dir)
{
- const struct bt_plugin_set *plugin_set;
- const struct bt_plugin *plugin;
+ const bt_plugin_set *plugin_set;
+ const bt_plugin *plugin;
char *minimal_path = get_test_plugin_path(plugin_dir, "minimal");
BT_ASSERT(minimal_path);
static void test_sfs(const char *plugin_dir)
{
- const struct bt_plugin_set *plugin_set;
- const struct bt_plugin *plugin;
- const struct bt_component_class_sink *sink_comp_class;
- const struct bt_component_class_source *source_comp_class;
- const struct bt_component_class_filter *filter_comp_class;
- const struct bt_component_sink *sink_component;
+ const bt_plugin_set *plugin_set;
+ const bt_plugin *plugin;
+ const bt_component_class_sink *sink_comp_class;
+ const bt_component_class_source *source_comp_class;
+ const bt_component_class_filter *filter_comp_class;
+ const bt_component_sink *sink_component;
char *sfs_path = get_test_plugin_path(plugin_dir, "sfs");
unsigned int major, minor, patch;
const char *extra;
- struct bt_value *params;
- const struct bt_value *results;
- const struct bt_value *object;
- const struct bt_value *res_params;
- struct bt_graph *graph;
+ bt_value *params;
+ const bt_value *results;
+ const bt_value *object;
+ const bt_value *res_params;
+ bt_graph *graph;
const char *object_str;
enum bt_graph_status graph_ret;
- struct bt_query_executor *query_exec = bt_query_executor_create();
+ bt_query_executor *query_exec = bt_query_executor_create();
int ret;
BT_ASSERT(query_exec);
static void test_create_all_from_dir(const char *plugin_dir)
{
- const struct bt_plugin_set *plugin_set;
+ const bt_plugin_set *plugin_set;
diag("create from all test below");
static void test_find(const char *plugin_dir)
{
int ret;
- const struct bt_plugin *plugin;
+ const bt_plugin *plugin;
char *plugin_path;
ok(!bt_plugin_find(NON_EXISTING_PATH),
#define NR_TESTS 37
struct user {
- struct bt_trace_class *tc;
- struct bt_stream_class *sc;
- struct bt_event_class *ec;
- struct bt_stream *stream;
- struct bt_event *event;
+ bt_trace_class *tc;
+ bt_stream_class *sc;
+ bt_event_class *ec;
+ bt_stream *stream;
+ bt_event *event;
};
struct writer_user {
* - uint16_t payload_16;
* - uint32_t payload_32;
*/
-static struct bt_field_class *create_integer_struct(void)
+static bt_field_class *create_integer_struct(void)
{
int ret;
- struct bt_field_class *structure = NULL;
- struct bt_field_class *ui8 = NULL, *ui16 = NULL, *ui32 = NULL;
+ bt_field_class *structure = NULL;
+ bt_field_class *ui8 = NULL, *ui16 = NULL, *ui32 = NULL;
structure = bt_field_class_structure_create();
BT_ASSERT(structure);
* - uint16_t payload_16;
* - uint32_t payload_32;
*/
-static struct bt_event_class *create_simple_event(
- struct bt_stream_class *sc, const char *name)
+static bt_event_class *create_simple_event(
+ bt_stream_class *sc, const char *name)
{
int ret;
- struct bt_event_class *event = NULL;
- struct bt_field_class *payload = NULL;
+ bt_event_class *event = NULL;
+ bt_field_class *payload = NULL;
BT_ASSERT(name);
event = bt_event_class_create(sc);
* - uint16_t payload_16;
* - uint32_t payload_32;
*/
-static struct bt_event_class *create_complex_event(
- struct bt_stream_class *sc,
+static bt_event_class *create_complex_event(
+ bt_stream_class *sc,
const char *name)
{
int ret;
- struct bt_event_class *event = NULL;
- struct bt_field_class *inner = NULL, *outer = NULL;
+ bt_event_class *event = NULL;
+ bt_field_class *inner = NULL, *outer = NULL;
BT_ASSERT(name);
event = bt_event_class_create(sc);
}
static void set_stream_class_field_classes(
- struct bt_stream_class *stream_class)
+ bt_stream_class *stream_class)
{
- struct bt_field_class *packet_context_type;
- struct bt_field_class *event_header_type;
- struct bt_field_class *fc;
+ bt_field_class *packet_context_type;
+ bt_field_class *event_header_type;
+ bt_field_class *fc;
int ret;
packet_context_type = bt_field_class_structure_create();
bt_field_class_put_ref(event_header_type);
}
-static void create_sc1(struct bt_trace_class *trace_class)
+static void create_sc1(bt_trace_class *trace_class)
{
int ret;
- struct bt_event_class *ec1 = NULL, *ec2 = NULL;
- struct bt_stream_class *sc1 = NULL, *ret_stream = NULL;
+ bt_event_class *ec1 = NULL, *ec2 = NULL;
+ bt_stream_class *sc1 = NULL, *ret_stream = NULL;
sc1 = bt_stream_class_create(trace_class);
BT_ASSERT(sc1);
BT_STREAM_CLASS_PUT_REF_AND_RESET(sc1);
}
-static void create_sc2(struct bt_trace_class *trace_class)
+static void create_sc2(bt_trace_class *trace_class)
{
int ret;
- struct bt_event_class *ec3 = NULL;
- struct bt_stream_class *sc2 = NULL, *ret_stream = NULL;
+ bt_event_class *ec3 = NULL;
+ bt_stream_class *sc2 = NULL, *ret_stream = NULL;
sc2 = bt_stream_class_create(trace_class);
BT_ASSERT(sc2);
BT_STREAM_CLASS_PUT_REF_AND_RESET(sc2);
}
-static void set_trace_packet_header(struct bt_trace_class *trace_class)
+static void set_trace_packet_header(bt_trace_class *trace_class)
{
- struct bt_field_class *packet_header_type;
- struct bt_field_class *fc;
+ bt_field_class *packet_header_type;
+ bt_field_class *fc;
int ret;
packet_header_type = bt_field_class_structure_create();
bt_field_class_put_ref(packet_header_type);
}
-static struct bt_trace_class *create_tc1(void)
+static bt_trace_class *create_tc1(void)
{
- struct bt_trace_class *tc1 = NULL;
+ bt_trace_class *tc1 = NULL;
tc1 = bt_trace_class_create();
BT_ASSERT(tc1);
return tc1;
}
-static void init_weak_refs(struct bt_trace_class *tc,
- struct bt_trace_class **tc1,
- struct bt_stream_class **sc1,
- struct bt_stream_class **sc2,
- struct bt_event_class **ec1,
- struct bt_event_class **ec2,
- struct bt_event_class **ec3)
+static void init_weak_refs(bt_trace_class *tc,
+ bt_trace_class **tc1,
+ bt_stream_class **sc1,
+ bt_stream_class **sc2,
+ bt_event_class **ec1,
+ bt_event_class **ec2,
+ bt_event_class **ec3)
{
*tc1 = tc;
*sc1 = bt_trace_class_borrow_stream_class_by_index(tc, 0);
* of expected reference counts without affecting them by taking
* "real" references to the objects.
*/
- struct bt_trace_class *tc1 = NULL, *weak_tc1 = NULL;
- struct bt_stream_class *weak_sc1 = NULL, *weak_sc2 = NULL;
- struct bt_event_class *weak_ec1 = NULL, *weak_ec2 = NULL,
+ bt_trace_class *tc1 = NULL, *weak_tc1 = NULL;
+ bt_stream_class *weak_sc1 = NULL, *weak_sc2 = NULL;
+ bt_event_class *weak_ec1 = NULL, *weak_ec2 = NULL,
*weak_ec3 = NULL;
struct user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };