debug-info.debug-info: do not use global opt_* symbols anymore
[babeltrace.git] / plugins / debug-info / copy.c
index 6d27b95b1e2788c56b843d5249589709637c1c7b..2689a703a44aa978ea560d37cbbd7bea27092fed 100644 (file)
@@ -61,7 +61,7 @@ struct bt_ctf_field *get_payload_field(FILE *err,
                goto end;
        }
 
-       if (bt_ctf_field_type_get_type_id(sec_type) != BT_CTF_TYPE_ID_STRUCT) {
+       if (bt_ctf_field_type_get_type_id(sec_type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto end;
@@ -96,7 +96,7 @@ struct bt_ctf_field *get_stream_event_context_field(FILE *err,
                goto end;
        }
 
-       if (bt_ctf_field_type_get_type_id(sec_type) != BT_CTF_TYPE_ID_STRUCT) {
+       if (bt_ctf_field_type_get_type_id(sec_type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto end;
@@ -133,7 +133,7 @@ int get_stream_event_context_unsigned_int_field_value(FILE *err,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_INTEGER) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -176,7 +176,7 @@ int get_stream_event_context_int_field_value(FILE *err, struct bt_ctf_event *eve
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_INTEGER) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -222,7 +222,7 @@ int get_payload_unsigned_int_field_value(FILE *err,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_INTEGER) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -267,7 +267,7 @@ int get_payload_int_field_value(FILE *err, struct bt_ctf_event *event,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_INTEGER) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -313,7 +313,7 @@ int get_payload_string_field_value(FILE *err,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_STRING) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_STRING) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -364,7 +364,7 @@ int get_payload_build_id_field_value(FILE *err,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_TYPE_ID_SEQUENCE) {
+       if (bt_ctf_field_type_get_type_id(field_type) != BT_CTF_FIELD_TYPE_ID_SEQUENCE) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
                goto error;
@@ -479,7 +479,7 @@ struct debug_info *insert_new_debug_info(struct debug_info_iterator *debug_it,
        }
        BT_PUT(field);
 
-       debug_info = debug_info_create();
+       debug_info = debug_info_create(debug_it->debug_info_component);
        if (!debug_info) {
                fprintf(debug_it->err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
@@ -825,7 +825,7 @@ int add_clock_classes(FILE *err, struct bt_ctf_trace *writer_trace,
 
        for (i = 0; i < clock_class_count; i++) {
                struct bt_ctf_clock_class *clock_class =
-                       bt_ctf_trace_get_clock_class(trace, i);
+                       bt_ctf_trace_get_clock_class_by_index(trace, i);
 
                if (!clock_class) {
                        fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__,
@@ -981,8 +981,8 @@ struct bt_ctf_event_class *get_event_class(struct debug_info_iterator *debug_it,
                struct bt_ctf_stream_class *writer_stream_class,
                struct bt_ctf_event_class *event_class)
 {
-       return bt_ctf_stream_class_get_event_class_by_name(writer_stream_class,
-                       bt_ctf_event_class_get_name(event_class));
+       return bt_ctf_stream_class_get_event_class_by_id(writer_stream_class,
+                       bt_ctf_event_class_get_id(event_class));
 }
 
 static
@@ -1273,7 +1273,7 @@ int copy_set_debug_info_stream_event_context(FILE *err,
         * If it is not a structure, we did not modify it to add the debug info
         * fields, so just assign it as is.
         */
-       if (bt_ctf_field_type_get_type_id(writer_event_context_type) != BT_CTF_TYPE_ID_STRUCT) {
+       if (bt_ctf_field_type_get_type_id(writer_event_context_type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = bt_ctf_event_set_event_context(writer_event, event_context);
                goto end;
        }
@@ -1366,7 +1366,7 @@ struct bt_ctf_clock_class *stream_class_get_clock_class(FILE *err,
        }
 
        /* FIXME multi-clock? */
-       clock_class = bt_ctf_trace_get_clock_class(trace, 0);
+       clock_class = bt_ctf_trace_get_clock_class_by_index(trace, 0);
 
        bt_put(trace);
 
@@ -1457,7 +1457,7 @@ struct bt_ctf_event *debug_info_copy_event(FILE *err, struct bt_ctf_event *event
                struct debug_info_component *component)
 {
        struct bt_ctf_event *writer_event = NULL;
-       struct bt_ctf_field *field, *copy_field = NULL;
+       struct bt_ctf_field *field = NULL, *copy_field = NULL;
        int ret;
 
        writer_event = bt_ctf_event_create(writer_event_class);
@@ -1518,7 +1518,7 @@ struct bt_ctf_event *debug_info_copy_event(FILE *err, struct bt_ctf_event *event
        }
        BT_PUT(field);
 
-       field = bt_ctf_event_get_payload_field(event);
+       field = bt_ctf_event_get_event_payload(event);
        if (!field) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
@@ -1526,7 +1526,7 @@ struct bt_ctf_event *debug_info_copy_event(FILE *err, struct bt_ctf_event *event
        }
        copy_field = bt_ctf_field_copy(field);
        if (copy_field) {
-               ret = bt_ctf_event_set_payload_field(writer_event, copy_field);
+               ret = bt_ctf_event_set_event_payload(writer_event, copy_field);
                if (ret < 0) {
                        fprintf(err, "[error] %s in %s:%d\n", __func__,
                                        __FILE__, __LINE__);
@@ -1554,7 +1554,7 @@ struct bt_ctf_event *debug_info_output_event(
        struct bt_ctf_event_class *event_class = NULL, *writer_event_class = NULL;
        struct bt_ctf_stream_class *stream_class = NULL, *writer_stream_class = NULL;
        struct bt_ctf_event *writer_event = NULL;
-       struct bt_ctf_packet *packet, *writer_packet = NULL;
+       struct bt_ctf_packet *packet = NULL, *writer_packet = NULL;
        struct bt_ctf_trace *writer_trace = NULL;
        struct debug_info *debug_info;
        const char *event_name;
This page took 0.047025 seconds and 4 git commands to generate.