Move `include/babeltrace2/ctf-writer` -> `include/babeltrace2-ctf-writer`
[babeltrace.git] / src / ctf-writer / fields.c
index b37b04299dddc9588fce120350d4da382e1310b8..2d3fc63c5c609fe8da298d2105b64fa400f4b770 100644 (file)
@@ -29,7 +29,7 @@
 #include <inttypes.h>
 #include <stdlib.h>
 
-#include <babeltrace2/ctf-writer/object.h>
+#include <babeltrace2-ctf-writer/object.h>
 
 #include "common/align.h"
 #include "common/assert.h"
@@ -564,16 +564,16 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_common_generic_is_set(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_common_generic_is_set(struct bt_ctf_field_common *field)
 {
        return field && field->payload_set;
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_common_structure_is_set_recursive(
+bt_ctf_bool bt_ctf_field_common_structure_is_set_recursive(
                struct bt_ctf_field_common *field)
 {
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        size_t i;
        struct bt_ctf_field_common_structure *structure = BT_CTF_FROM_COMMON(field);
 
@@ -592,10 +592,10 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common *field)
 {
        struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
 
        BT_ASSERT(field);
 
@@ -608,10 +608,10 @@ bt_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_common_array_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_common_array_is_set_recursive(struct bt_ctf_field_common *field)
 {
        size_t i;
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_common_array *array = BT_CTF_FROM_COMMON(field);
 
        BT_ASSERT(field);
@@ -628,10 +628,10 @@ end:
 }
 
 BT_HIDDEN
-bt_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common *field)
 {
        size_t i;
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_common_sequence *sequence = BT_CTF_FROM_COMMON(field);
 
        BT_ASSERT(field);
@@ -676,7 +676,7 @@ static
 int bt_ctf_field_enumeration_validate_recursive(struct bt_ctf_field_common *field);
 
 static
-bt_bool bt_ctf_field_enumeration_is_set_recursive(
+bt_ctf_bool bt_ctf_field_enumeration_is_set_recursive(
                struct bt_ctf_field_common *field);
 
 static
@@ -730,7 +730,7 @@ static
 int bt_ctf_field_variant_validate_recursive(struct bt_ctf_field_common *field);
 
 static
-bt_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field);
+bt_ctf_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field);
 
 static
 void bt_ctf_field_variant_reset_recursive(struct bt_ctf_field_common *field);
@@ -886,7 +886,7 @@ int bt_ctf_field_integer_serialize(struct bt_ctf_field_common *field,
        enum bt_ctf_byte_order byte_order;
 
        BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "Integer field");
-       BT_LOGV("Serializing CTF writer integer field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing CTF writer integer field: addr=%p, native-bo=%s",
                field,
                bt_ctf_byte_order_string(native_byte_order));
        byte_order = int_type->user_byte_order;
@@ -924,9 +924,9 @@ int bt_ctf_field_enumeration_serialize_recursive(
 {
        struct bt_ctf_field_enumeration *enumeration = (void *) field;
 
-       BT_LOGV("Serializing enumeration field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing enumeration field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string(native_byte_order));
-       BT_LOGV_STR("Serializing enumeration field's payload field.");
+       BT_LOGT_STR("Serializing enumeration field's payload field.");
        return bt_ctf_field_serialize_recursive(
                (void *) enumeration->container, ctfser, native_byte_order);
 }
@@ -943,7 +943,7 @@ int bt_ctf_field_floating_point_serialize(struct bt_ctf_field_common *field,
        enum bt_ctf_byte_order byte_order;
 
        BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "Floating point number field");
-       BT_LOGV("Serializing floating point number field: "
+       BT_LOGT("Serializing floating point number field: "
                "addr=%p, native-bo=%s", field,
                bt_ctf_byte_order_string(native_byte_order));
 
@@ -985,7 +985,7 @@ int bt_ctf_field_structure_serialize_recursive(struct bt_ctf_field_common *field
        int ret;
        struct bt_ctf_field_common_structure *structure = BT_CTF_FROM_COMMON(field);
 
-       BT_LOGV("Serializing structure field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing structure field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string(native_byte_order));
        ret = bt_ctfser_align_offset_in_current_packet(ctfser,
                field->type->alignment);
@@ -1000,7 +1000,7 @@ int bt_ctf_field_structure_serialize_recursive(struct bt_ctf_field_common *field
                        structure->fields, i);
                const char *field_name = NULL;
 
-               BT_LOGV("Serializing structure field's field: ser-offset=%" PRIu64 ", "
+               BT_LOGT("Serializing structure field's field: ser-offset=%" PRIu64 ", "
                        "field-addr=%p, index=%" PRIu64,
                        bt_ctfser_get_offset_in_current_packet_bits(ctfser),
                        member, i);
@@ -1042,9 +1042,9 @@ int bt_ctf_field_variant_serialize_recursive(struct bt_ctf_field_common *field,
 {
        struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
 
-       BT_LOGV("Serializing variant field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing variant field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string(native_byte_order));
-       BT_LOGV_STR("Serializing variant field's payload field.");
+       BT_LOGT_STR("Serializing variant field's payload field.");
        return bt_ctf_field_serialize_recursive(
                (void *) variant->current_field, ctfser, native_byte_order);
 }
@@ -1058,14 +1058,14 @@ int bt_ctf_field_array_serialize_recursive(struct bt_ctf_field_common *field,
        int ret = 0;
        struct bt_ctf_field_common_array *array = BT_CTF_FROM_COMMON(field);
 
-       BT_LOGV("Serializing array field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing array field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string(native_byte_order));
 
        for (i = 0; i < array->elements->len; i++) {
                struct bt_ctf_field_common *elem_field =
                        g_ptr_array_index(array->elements, i);
 
-               BT_LOGV("Serializing array field's element field: "
+               BT_LOGT("Serializing array field's element field: "
                        "ser-offset=%" PRIu64 ", field-addr=%p, index=%" PRId64,
                        bt_ctfser_get_offset_in_current_packet_bits(ctfser),
                        elem_field, i);
@@ -1092,14 +1092,14 @@ int bt_ctf_field_sequence_serialize_recursive(struct bt_ctf_field_common *field,
        int ret = 0;
        struct bt_ctf_field_common_sequence *sequence = BT_CTF_FROM_COMMON(field);
 
-       BT_LOGV("Serializing sequence field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing sequence field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string(native_byte_order));
 
        for (i = 0; i < sequence->elements->len; i++) {
                struct bt_ctf_field_common *elem_field =
                        g_ptr_array_index(sequence->elements, i);
 
-               BT_LOGV("Serializing sequence field's element field: "
+               BT_LOGT("Serializing sequence field's element field: "
                        "ser-offset=%" PRIu64 ", field-addr=%p, index=%" PRId64,
                        bt_ctfser_get_offset_in_current_packet_bits(ctfser),
                        elem_field, i);
@@ -1126,7 +1126,7 @@ int bt_ctf_field_string_serialize(struct bt_ctf_field_common *field,
        struct bt_ctf_field_common_string *string = BT_CTF_FROM_COMMON(field);
 
        BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "String field");
-       BT_LOGV("Serializing string field: addr=%p, native-bo=%s",
+       BT_LOGT("Serializing string field: addr=%p, native-bo=%s",
                field, bt_ctf_byte_order_string((int) native_byte_order));
        ret = bt_ctfser_write_string(ctfser, (const char *) string->buf->data);
        if (G_UNLIKELY(ret)) {
@@ -1235,7 +1235,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field,
        struct bt_ctf_field_type_common_variant *variant_ft;
        struct bt_ctf_field_type_common_enumeration *tag_ft;
        struct bt_ctf_field *current_field = NULL;
-       bt_bool is_signed;
+       bt_ctf_bool is_signed;
        uint64_t tag_uval;
        int ret;
 
@@ -1701,9 +1701,9 @@ int bt_ctf_field_enumeration_validate_recursive(struct bt_ctf_field_common *fiel
 }
 
 static
-bt_bool bt_ctf_field_enumeration_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_enumeration_is_set_recursive(struct bt_ctf_field_common *field)
 {
-       bt_bool is_set = BT_FALSE;
+       bt_ctf_bool is_set = BT_CTF_FALSE;
        struct bt_ctf_field_enumeration *enumeration = (void *) field;
 
        if (enumeration->container) {
@@ -1763,9 +1763,9 @@ end:
 }
 
 static
-bt_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field)
+bt_ctf_bool bt_ctf_field_variant_is_set_recursive(struct bt_ctf_field_common *field)
 {
-       bt_bool is_set;
+       bt_ctf_bool is_set;
        struct bt_ctf_field_variant *variant = (void *) field;
 
        if (variant->tag) {
@@ -1847,7 +1847,7 @@ int bt_ctf_field_structure_set_field_by_name(struct bt_ctf_field *field,
        if (!g_hash_table_lookup_extended(field_name_to_index,
                        GUINT_TO_POINTER(field_quark), NULL,
                        (gpointer *) &index)) {
-               BT_LOGV("Invalid parameter: no such field in structure field's type: "
+               BT_LOGT("Invalid parameter: no such field in structure field's type: "
                        "struct-field-addr=%p, struct-ft-addr=%p, "
                        "field-ft-addr=%p, name=\"%s\"",
                        field, common_field->type, common_value->type, name);
This page took 0.028546 seconds and 4 git commands to generate.