Rename bt_ctf_type_id -> bt_ctf_field_type_id (and the enumerators)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 3 Apr 2017 21:48:51 +0000 (17:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:40 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
20 files changed:
include/babeltrace/ctf-ir/field-types-internal.h
include/babeltrace/ctf-ir/field-types.h
include/babeltrace/ctf-ir/fields.h
lib/ctf-ir/event-class.c
lib/ctf-ir/event.c
lib/ctf-ir/field-types.c
lib/ctf-ir/fields.c
lib/ctf-ir/resolve.c
lib/ctf-ir/stream-class.c
lib/ctf-ir/stream.c
lib/ctf-ir/trace.c
lib/ctf-ir/validation.c
plugins/ctf/common/btr/btr.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/debug-info/copy.c
plugins/libctfcopytrace/clock-fields.c
plugins/libctfcopytrace/ctfcopytrace.c
plugins/text/print.c
plugins/utils/trimmer/copy.c
tests/lib/test_ctf_writer.c

index dcb5b12ab3211963460b2b38752e86c8aaa9f3c2..129446bd9f20ffddc6ad1b29ddf218c62737c866 100644 (file)
@@ -42,7 +42,7 @@ typedef int (*type_serialize_func)(struct bt_ctf_field_type *,
 
 struct bt_ctf_field_type {
        struct bt_object base;
-       enum bt_ctf_type_id id;
+       enum bt_ctf_field_type_id id;
        unsigned int alignment;
        type_freeze_func freeze;
        type_serialize_func serialize;
index b7e305456dabe993b27fad7b011471d112b37ae4..74908cf1283d1eff2ef9606de56f7183ff9abd49 100644 (file)
@@ -97,49 +97,49 @@ The standard CTF field types are:
     <th>CTF IR field which you can create from this field type
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_INTEGER
+    <td>#BT_CTF_FIELD_TYPE_ID_INTEGER
     <td>\ref ctfirintfieldtype
     <td>\ref ctfirintfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_FLOAT
+    <td>#BT_CTF_FIELD_TYPE_ID_FLOAT
     <td>\ref ctfirfloatfieldtype
     <td>\ref ctfirfloatfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_ENUM
+    <td>#BT_CTF_FIELD_TYPE_ID_ENUM
     <td>\ref ctfirenumfieldtype
     <td>\ref ctfirenumfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_STRING
+    <td>#BT_CTF_FIELD_TYPE_ID_STRING
     <td>\ref ctfirstringfieldtype
     <td>\ref ctfirstringfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_STRUCT
+    <td>#BT_CTF_FIELD_TYPE_ID_STRUCT
     <td>\ref ctfirstructfieldtype
     <td>\ref ctfirstructfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_ARRAY
+    <td>#BT_CTF_FIELD_TYPE_ID_ARRAY
     <td>\ref ctfirarrayfieldtype
     <td>\ref ctfirarrayfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_SEQUENCE
+    <td>#BT_CTF_FIELD_TYPE_ID_SEQUENCE
     <td>\ref ctfirseqfieldtype
     <td>\ref ctfirseqfield
   </tr>
   <tr>
-    <td>#BT_CTF_TYPE_ID_VARIANT
+    <td>#BT_CTF_FIELD_TYPE_ID_VARIANT
     <td>\ref ctfirvarfieldtype
     <td>\ref ctfirvarfield
   </tr>
 </table>
 
 Each field type has its own <strong>type ID</strong> (see
-#bt_ctf_type_id). You get the type ID of a field type object
+#bt_ctf_field_type_id). You get the type ID of a field type object
 with bt_ctf_field_type_get_type_id().
 
 You can get a deep copy of a field type with bt_ctf_field_type_copy().
@@ -206,7 +206,7 @@ struct bt_ctf_field_type_enumeration_mapping_iterator;
 /*
  * Babeltrace 1.x enumerations that were also used in CTF writer's API.
  * They are left here for backward compatibility reasons, but
- * enum bt_ctf_type_id and enum bt_ctf_string_encoding should be used
+ * enum bt_ctf_field_type_id and enum bt_ctf_string_encoding should be used
  * in new code. Both new enumerations are compatible with their legacy
  * counterpart.
  */
@@ -275,37 +275,37 @@ enum bt_ctf_scope {
 /**
 @brief Type ID of a @ft.
 */
-enum bt_ctf_type_id {
+enum bt_ctf_field_type_id {
        /// Unknown, used for errors.
-       BT_CTF_TYPE_ID_UNKNOWN = CTF_TYPE_UNKNOWN,
+       BT_CTF_FIELD_TYPE_ID_UNKNOWN = CTF_TYPE_UNKNOWN,
 
        /// \ref ctfirintfieldtype
-       BT_CTF_TYPE_ID_INTEGER = CTF_TYPE_INTEGER,
+       BT_CTF_FIELD_TYPE_ID_INTEGER = CTF_TYPE_INTEGER,
 
        /// \ref ctfirfloatfieldtype
-       BT_CTF_TYPE_ID_FLOAT = CTF_TYPE_FLOAT,
+       BT_CTF_FIELD_TYPE_ID_FLOAT = CTF_TYPE_FLOAT,
 
        /// \ref ctfirenumfieldtype
-       BT_CTF_TYPE_ID_ENUM = CTF_TYPE_ENUM,
+       BT_CTF_FIELD_TYPE_ID_ENUM = CTF_TYPE_ENUM,
 
        /// \ref ctfirstringfieldtype
-       BT_CTF_TYPE_ID_STRING = CTF_TYPE_STRING,
+       BT_CTF_FIELD_TYPE_ID_STRING = CTF_TYPE_STRING,
 
        /// \ref ctfirstructfieldtype
-       BT_CTF_TYPE_ID_STRUCT = CTF_TYPE_STRUCT,
+       BT_CTF_FIELD_TYPE_ID_STRUCT = CTF_TYPE_STRUCT,
 
        /// @cond DOCUMENT
        BT_CTF_TYPE_ID_UNTAGGED_VARIANT = CTF_TYPE_UNTAGGED_VARIANT,
        /// @endcond
 
        /// \ref ctfirarrayfieldtype
-       BT_CTF_TYPE_ID_ARRAY = CTF_TYPE_ARRAY,
+       BT_CTF_FIELD_TYPE_ID_ARRAY = CTF_TYPE_ARRAY,
 
        /// \ref ctfirseqfieldtype
-       BT_CTF_TYPE_ID_SEQUENCE = CTF_TYPE_SEQUENCE,
+       BT_CTF_FIELD_TYPE_ID_SEQUENCE = CTF_TYPE_SEQUENCE,
 
        /// \ref ctfirvarfieldtype
-       BT_CTF_TYPE_ID_VARIANT = CTF_TYPE_VARIANT,
+       BT_CTF_FIELD_TYPE_ID_VARIANT = CTF_TYPE_VARIANT,
 
        /// Number of enumeration entries.
        BT_CTF_NR_TYPE_IDS = NR_CTF_TYPES,
@@ -316,12 +316,12 @@ enum bt_ctf_type_id {
 
 @param[in] field_type  Field type of which to get the type ID.
 @returns               Type ID of \p field_type,
-                       or #BT_CTF_TYPE_ID_UNKNOWN on error.
+                       or #BT_CTF_FIELD_TYPE_ID_UNKNOWN on error.
 
 @prenotnull{field_type}
 @postrefcountsame{field_type}
 
-@sa #bt_ctf_type_id: CTF IR field type ID.
+@sa #bt_ctf_field_type_id: CTF IR field type ID.
 @sa bt_ctf_field_type_is_integer(): Returns whether or not a given
        field type is a @intft.
 @sa bt_ctf_field_type_is_floating_point(): Returns whether or not a
@@ -339,7 +339,7 @@ enum bt_ctf_type_id {
 @sa bt_ctf_field_type_is_variant(): Returns whether or not a given
        field type is a @varft.
 */
-extern enum bt_ctf_type_id bt_ctf_field_type_get_type_id(
+extern enum bt_ctf_field_type_id bt_ctf_field_type_get_type_id(
                struct bt_ctf_field_type *field_type);
 
 /**
index 5120d9e41739f665335c4947311c8112a0b41a1f..8578b5185d151d11a3b9032e8891c981896b98b8 100644 (file)
@@ -93,7 +93,7 @@ name within a @structfield with bt_ctf_field_structure_set_field().
 
 You can get a reference to the @ft which was used to create a field with
 bt_ctf_field_get_type(). You can get the
-\link #bt_ctf_type_id type ID\endlink of this field type directly with
+\link #bt_ctf_field_type_id type ID\endlink of this field type directly with
 bt_ctf_field_get_type_id().
 
 You can get a deep copy of a field with bt_ctf_field_copy(). The field
@@ -187,12 +187,12 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type(
 @param[in] field       Field of which to get the type ID of its
                        parent field type..
 @returns               Type ID of the parent field type of \p field,
-                       or #BT_CTF_TYPE_ID_UNKNOWN on error.
+                       or #BT_CTF_FIELD_TYPE_ID_UNKNOWN on error.
 
 @prenotnull{field}
 @postrefcountsame{field}
 
-@sa #bt_ctf_type_id: CTF IR field type ID.
+@sa #bt_ctf_field_type_id: CTF IR field type ID.
 @sa bt_ctf_field_is_integer(): Returns whether or not a given field is a
        @intfield.
 @sa bt_ctf_field_is_floating_point(): Returns whether or not a given
@@ -210,7 +210,7 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type(
 @sa bt_ctf_field_is_variant(): Returns whether or not a given field is a
        @varfield.
 */
-extern enum bt_ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field);
+extern enum bt_ctf_field_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field);
 
 /*
  * bt_ctf_field_signed_integer_get_value: get a signed integer field's value
index 364448731e7daff31dbc998acad92cad4a10a5cd..6764d43855e8c18d1d5c97d13de6592b1ac44646 100644 (file)
@@ -365,7 +365,7 @@ int bt_ctf_event_class_set_payload_type(struct bt_ctf_event_class *event_class,
        }
 
        if (payload && bt_ctf_field_type_get_type_id(payload) !=
-                       BT_CTF_TYPE_ID_STRUCT) {
+                       BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -389,7 +389,7 @@ int bt_ctf_event_class_add_field(struct bt_ctf_event_class *event_class,
        }
 
        if (bt_ctf_field_type_get_type_id(event_class->fields) !=
-               BT_CTF_TYPE_ID_STRUCT) {
+               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -411,7 +411,7 @@ int bt_ctf_event_class_get_field_count(
        }
 
        if (bt_ctf_field_type_get_type_id(event_class->fields) !=
-               BT_CTF_TYPE_ID_STRUCT) {
+               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -433,7 +433,7 @@ int bt_ctf_event_class_get_field(struct bt_ctf_event_class *event_class,
        }
 
        if (bt_ctf_field_type_get_type_id(event_class->fields) !=
-               BT_CTF_TYPE_ID_STRUCT) {
+               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -455,7 +455,7 @@ struct bt_ctf_field_type *bt_ctf_event_class_get_field_by_name(
        }
 
        if (bt_ctf_field_type_get_type_id(event_class->fields) !=
-               BT_CTF_TYPE_ID_STRUCT) {
+               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                goto end;
        }
 
@@ -501,7 +501,7 @@ int bt_ctf_event_class_set_context_type(
        }
 
        if (context && bt_ctf_field_type_get_type_id(context) !=
-                       BT_CTF_TYPE_ID_STRUCT) {
+                       BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
index 80044dd9c318d2877810d1d65a5b084ea98428f1..6d878fd757c93c3fc8d170d21f6e3bdc118c6d63 100644 (file)
@@ -348,7 +348,7 @@ int bt_ctf_event_set_payload_field(struct bt_ctf_event *event,
        }
 
        if (bt_ctf_field_type_get_type_id(payload_type) !=
-                       BT_CTF_TYPE_ID_STRUCT) {
+                       BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
index aac430024a7c9f19951cd537ddf76fc11f49a9d5..6b02d4e33df02ab7ca0fa5dd17f3f115eacdddbb 100644 (file)
@@ -76,16 +76,16 @@ void bt_ctf_field_type_string_destroy(struct bt_ctf_field_type *);
 
 static
 void (* const type_destroy_funcs[])(struct bt_ctf_field_type *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_destroy,
-       [BT_CTF_TYPE_ID_ENUM] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_destroy,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] =
                bt_ctf_field_type_enumeration_destroy,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_type_floating_point_destroy,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_destroy,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_destroy,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_destroy,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_destroy,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_type_string_destroy,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_destroy,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_destroy,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_destroy,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_destroy,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_type_string_destroy,
 };
 
 static
@@ -105,14 +105,14 @@ void bt_ctf_field_type_sequence_freeze(struct bt_ctf_field_type *);
 
 static
 type_freeze_func const type_freeze_funcs[] = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_freeze,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_freeze,
-       [BT_CTF_TYPE_ID_FLOAT] = generic_field_type_freeze,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_freeze,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_freeze,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_freeze,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_freeze,
-       [BT_CTF_TYPE_ID_STRING] = generic_field_type_freeze,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_freeze,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_freeze,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = generic_field_type_freeze,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_freeze,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_freeze,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_freeze,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_freeze,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = generic_field_type_freeze,
 };
 
 static
@@ -142,17 +142,17 @@ int bt_ctf_field_type_string_serialize(struct bt_ctf_field_type *,
 
 static
 type_serialize_func const type_serialize_funcs[] = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_serialize,
-       [BT_CTF_TYPE_ID_ENUM] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_serialize,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] =
                bt_ctf_field_type_enumeration_serialize,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_type_floating_point_serialize,
-       [BT_CTF_TYPE_ID_STRUCT] =
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] =
                bt_ctf_field_type_structure_serialize,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_serialize,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_serialize,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_serialize,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_type_string_serialize,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_serialize,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_serialize,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_serialize,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_type_string_serialize,
 };
 
 static
@@ -180,17 +180,17 @@ void bt_ctf_field_type_sequence_set_byte_order(struct bt_ctf_field_type *,
 static
 void (* const set_byte_order_funcs[])(struct bt_ctf_field_type *,
                enum bt_ctf_byte_order) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_set_byte_order,
-       [BT_CTF_TYPE_ID_ENUM] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_set_byte_order,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] =
                bt_ctf_field_type_enumeration_set_byte_order,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_type_floating_point_set_byte_order,
-       [BT_CTF_TYPE_ID_STRUCT] =
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] =
                bt_ctf_field_type_structure_set_byte_order,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_set_byte_order,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_set_byte_order,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_set_byte_order,
-       [BT_CTF_TYPE_ID_STRING] = NULL,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_set_byte_order,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_set_byte_order,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_set_byte_order,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = NULL,
 };
 
 static
@@ -221,14 +221,14 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_copy(
 static
 struct bt_ctf_field_type *(* const type_copy_funcs[])(
                struct bt_ctf_field_type *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_copy,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_copy,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_type_floating_point_copy,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_copy,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_copy,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_copy,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_copy,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_type_string_copy,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_copy,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_copy,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_type_floating_point_copy,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_copy,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_copy,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_copy,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_copy,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_type_string_copy,
 };
 
 static
@@ -259,14 +259,14 @@ int bt_ctf_field_type_sequence_compare(struct bt_ctf_field_type *,
 static
 int (* const type_compare_funcs[])(struct bt_ctf_field_type *,
                struct bt_ctf_field_type *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_compare,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_compare,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_type_floating_point_compare,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_compare,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_compare,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_compare,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_compare,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_type_string_compare,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_compare,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_compare,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_type_floating_point_compare,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_compare,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_compare,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_compare,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_compare,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_type_string_compare,
 };
 
 static
@@ -284,14 +284,14 @@ int bt_ctf_field_type_sequence_validate(struct bt_ctf_field_type *);
 
 static
 int (* const type_validate_funcs[])(struct bt_ctf_field_type *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_validate,
-       [BT_CTF_TYPE_ID_FLOAT] = NULL,
-       [BT_CTF_TYPE_ID_STRING] = NULL,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_validate,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_validate,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_validate,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_type_array_validate,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_validate,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_type_integer_validate,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = NULL,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = NULL,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_type_enumeration_validate,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_type_structure_validate,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_type_variant_validate,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_type_array_validate,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_type_sequence_validate,
 };
 
 static
@@ -358,7 +358,7 @@ gint compare_enumeration_mappings_unsigned(struct enumeration_mapping **a,
 static
 void bt_ctf_field_type_init(struct bt_ctf_field_type *type, bool init_bo)
 {
-       assert(type && (type->id > BT_CTF_TYPE_ID_UNKNOWN) &&
+       assert(type && (type->id > BT_CTF_FIELD_TYPE_ID_UNKNOWN) &&
                (type->id < BT_CTF_NR_TYPE_IDS));
 
        bt_object_init(type, bt_ctf_field_type_destroy);
@@ -412,11 +412,11 @@ static
 void bt_ctf_field_type_destroy(struct bt_object *obj)
 {
        struct bt_ctf_field_type *type;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        type = container_of(obj, struct bt_ctf_field_type, base);
        type_id = type->id;
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN ||
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN ||
                type_id >= BT_CTF_NR_TYPE_IDS) {
                return;
        }
@@ -750,7 +750,7 @@ BT_HIDDEN
 int bt_ctf_field_type_validate(struct bt_ctf_field_type *type)
 {
        int ret = 0;
-       enum bt_ctf_type_id id = bt_ctf_field_type_get_type_id(type);
+       enum bt_ctf_field_type_id id = bt_ctf_field_type_get_type_id(type);
 
        if (!type) {
                ret = -1;
@@ -784,7 +784,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_integer_create(unsigned int size)
                return NULL;
        }
 
-       integer->parent.id = BT_CTF_TYPE_ID_INTEGER;
+       integer->parent.id = BT_CTF_FIELD_TYPE_ID_INTEGER;
        integer->size = size;
        integer->base = BT_CTF_INTEGER_BASE_DECIMAL;
        integer->encoding = BT_CTF_STRING_ENCODING_NONE;
@@ -797,7 +797,7 @@ int bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *type)
        int ret = 0;
        struct bt_ctf_field_type_integer *integer;
 
-       if (!type || type->id != BT_CTF_TYPE_ID_INTEGER) {
+       if (!type || type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -813,7 +813,7 @@ int bt_ctf_field_type_integer_get_signed(struct bt_ctf_field_type *type)
        int ret = 0;
        struct bt_ctf_field_type_integer *integer;
 
-       if (!type || type->id != BT_CTF_TYPE_ID_INTEGER) {
+       if (!type || type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -831,7 +831,7 @@ int bt_ctf_field_type_integer_set_signed(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_integer *integer;
 
        if (!type || type->frozen ||
-               type->id != BT_CTF_TYPE_ID_INTEGER) {
+               type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -849,7 +849,7 @@ int bt_ctf_field_type_integer_set_size(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_integer *integer;
 
        if (!type || type->frozen ||
-               type->id != BT_CTF_TYPE_ID_INTEGER ||
+               type->id != BT_CTF_FIELD_TYPE_ID_INTEGER ||
                !size || size > 64) {
                ret = -1;
                goto end;
@@ -867,7 +867,7 @@ enum bt_ctf_integer_base bt_ctf_field_type_integer_get_base(
        enum bt_ctf_integer_base ret = BT_CTF_INTEGER_BASE_UNKNOWN;
        struct bt_ctf_field_type_integer *integer;
 
-       if (!type || type->id != BT_CTF_TYPE_ID_INTEGER) {
+       if (!type || type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                goto end;
        }
 
@@ -883,7 +883,7 @@ int bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *type,
        int ret = 0;
 
        if (!type || type->frozen ||
-               type->id != BT_CTF_TYPE_ID_INTEGER) {
+               type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -912,7 +912,7 @@ enum bt_ctf_string_encoding bt_ctf_field_type_integer_get_encoding(
        enum bt_ctf_string_encoding ret = BT_CTF_STRING_ENCODING_UNKNOWN;
        struct bt_ctf_field_type_integer *integer;
 
-       if (!type || type->id != BT_CTF_TYPE_ID_INTEGER) {
+       if (!type || type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                goto end;
        }
 
@@ -929,7 +929,7 @@ int bt_ctf_field_type_integer_set_encoding(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_integer *integer;
 
        if (!type || type->frozen ||
-               (type->id != BT_CTF_TYPE_ID_INTEGER) ||
+               (type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) ||
                (encoding < BT_CTF_STRING_ENCODING_NONE) ||
                (encoding >= BT_CTF_STRING_ENCODING_UNKNOWN)) {
                ret = -1;
@@ -999,7 +999,7 @@ bt_ctf_field_type_enumeration_find_mappings_type(
        struct bt_ctf_field_type_enumeration *enumeration_type;
        struct bt_ctf_field_type_enumeration_mapping_iterator *iter = NULL;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ENUM)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ENUM)) {
                goto end;
        }
 
@@ -1278,7 +1278,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_create(
                goto error;
        }
 
-       if (integer_container_type->id != BT_CTF_TYPE_ID_INTEGER) {
+       if (integer_container_type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
                goto error;
        }
 
@@ -1287,7 +1287,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_create(
                goto error;
        }
 
-       enumeration->parent.id = BT_CTF_TYPE_ID_ENUM;
+       enumeration->parent.id = BT_CTF_FIELD_TYPE_ID_ENUM;
        bt_get(integer_container_type);
        enumeration->container = integer_container_type;
        enumeration->entries = g_ptr_array_new_with_free_func(
@@ -1309,7 +1309,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_get_container_type(
                goto end;
        }
 
-       if (type->id != BT_CTF_TYPE_ID_ENUM) {
+       if (type->id != BT_CTF_FIELD_TYPE_ID_ENUM) {
                goto end;
        }
 
@@ -1331,7 +1331,7 @@ int bt_ctf_field_type_enumeration_add_mapping(
        struct bt_ctf_field_type_enumeration *enumeration;
        char *escaped_string;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ENUM) ||
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ENUM) ||
                type->frozen ||
                (range_end < range_start)) {
                ret = -1;
@@ -1381,7 +1381,7 @@ int bt_ctf_field_type_enumeration_add_mapping_unsigned(
        struct bt_ctf_field_type_enumeration *enumeration;
        char *escaped_string;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ENUM) ||
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ENUM) ||
                type->frozen ||
                (range_end < range_start)) {
                ret = -1;
@@ -1427,7 +1427,7 @@ int bt_ctf_field_type_enumeration_get_mapping_count(
        int ret = 0;
        struct bt_ctf_field_type_enumeration *enumeration;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ENUM)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ENUM)) {
                ret = -1;
                goto end;
        }
@@ -1448,7 +1448,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_floating_point_create(void)
                goto end;
        }
 
-       floating_point->parent.id = BT_CTF_TYPE_ID_FLOAT;
+       floating_point->parent.id = BT_CTF_FIELD_TYPE_ID_FLOAT;
        floating_point->exp_dig = sizeof(float) * CHAR_BIT - FLT_MANT_DIG;
        floating_point->mant_dig = FLT_MANT_DIG;
        bt_ctf_field_type_init(&floating_point->parent, TRUE);
@@ -1462,7 +1462,7 @@ int bt_ctf_field_type_floating_point_get_exponent_digits(
        int ret = 0;
        struct bt_ctf_field_type_floating_point *floating_point;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_FLOAT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_FLOAT)) {
                ret = -1;
                goto end;
        }
@@ -1482,7 +1482,7 @@ int bt_ctf_field_type_floating_point_set_exponent_digits(
        struct bt_ctf_field_type_floating_point *floating_point;
 
        if (!type || type->frozen ||
-               (type->id != BT_CTF_TYPE_ID_FLOAT)) {
+               (type->id != BT_CTF_FIELD_TYPE_ID_FLOAT)) {
                ret = -1;
                goto end;
        }
@@ -1508,7 +1508,7 @@ int bt_ctf_field_type_floating_point_get_mantissa_digits(
        int ret = 0;
        struct bt_ctf_field_type_floating_point *floating_point;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_FLOAT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_FLOAT)) {
                ret = -1;
                goto end;
        }
@@ -1528,7 +1528,7 @@ int bt_ctf_field_type_floating_point_set_mantissa_digits(
        struct bt_ctf_field_type_floating_point *floating_point;
 
        if (!type || type->frozen ||
-               (type->id != BT_CTF_TYPE_ID_FLOAT)) {
+               (type->id != BT_CTF_FIELD_TYPE_ID_FLOAT)) {
                ret = -1;
                goto end;
        }
@@ -1557,7 +1557,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_structure_create(void)
                goto error;
        }
 
-       structure->parent.id = BT_CTF_TYPE_ID_STRUCT;
+       structure->parent.id = BT_CTF_FIELD_TYPE_ID_STRUCT;
        structure->fields = g_ptr_array_new_with_free_func(
                (GDestroyNotify)destroy_structure_field);
        structure->field_name_to_index = g_hash_table_new(NULL, NULL);
@@ -1580,7 +1580,7 @@ int bt_ctf_field_type_structure_add_field(struct bt_ctf_field_type *type,
         */
        if (!type || !field_type || type->frozen ||
                bt_ctf_validate_identifier(field_name) ||
-               (type->id != BT_CTF_TYPE_ID_STRUCT) ||
+               (type->id != BT_CTF_FIELD_TYPE_ID_STRUCT) ||
                type == field_type) {
                ret = -1;
                goto end;
@@ -1603,7 +1603,7 @@ int bt_ctf_field_type_structure_get_field_count(
        int ret = 0;
        struct bt_ctf_field_type_structure *structure;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_STRUCT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_STRUCT)) {
                ret = -1;
                goto end;
        }
@@ -1624,7 +1624,7 @@ int bt_ctf_field_type_structure_get_field(struct bt_ctf_field_type *type,
        int ret = 0;
 
        if (!type || index < 0 ||
-                       (type->id != BT_CTF_TYPE_ID_STRUCT)) {
+                       (type->id != BT_CTF_FIELD_TYPE_ID_STRUCT)) {
                ret = -1;
                goto end;
        }
@@ -1695,7 +1695,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_create(
                goto error;
        }
 
-       variant->parent.id = BT_CTF_TYPE_ID_VARIANT;
+       variant->parent.id = BT_CTF_FIELD_TYPE_ID_VARIANT;
        variant->tag_name = g_string_new(tag_name);
        variant->field_name_to_index = g_hash_table_new(NULL, NULL);
        variant->fields = g_ptr_array_new_with_free_func(
@@ -1720,7 +1720,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_get_tag_type(
        struct bt_ctf_field_type_variant *variant;
        struct bt_ctf_field_type *tag_type = NULL;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_VARIANT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT)) {
                goto end;
        }
 
@@ -1741,7 +1741,7 @@ const char *bt_ctf_field_type_variant_get_tag_name(
        struct bt_ctf_field_type_variant *variant;
        const char *tag_name = NULL;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_VARIANT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT)) {
                goto end;
        }
 
@@ -1762,7 +1762,7 @@ int bt_ctf_field_type_variant_set_tag_name(
        struct bt_ctf_field_type_variant *variant;
 
        if (!type || type->frozen ||
-               (type->id != BT_CTF_TYPE_ID_VARIANT) ||
+               (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT) ||
                bt_ctf_validate_identifier(name)) {
                ret = -1;
                goto end;
@@ -1789,7 +1789,7 @@ int bt_ctf_field_type_variant_add_field(struct bt_ctf_field_type *type,
         */
        if (!type || !field_type || type->frozen ||
                bt_ctf_validate_identifier(field_name) ||
-               (type->id != BT_CTF_TYPE_ID_VARIANT) ||
+               (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT) ||
                type == field_type) {
                ret = -1;
                goto end;
@@ -1869,7 +1869,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_from_tag(
        struct bt_ctf_field_type *field_type = NULL;
        struct bt_ctf_field_type_enumeration_mapping_iterator *iter = NULL;
 
-       if (!type || !tag || type->id != BT_CTF_TYPE_ID_VARIANT) {
+       if (!type || !tag || type->id != BT_CTF_FIELD_TYPE_ID_VARIANT) {
                goto end;
        }
 
@@ -1896,7 +1896,7 @@ int bt_ctf_field_type_variant_get_field_count(struct bt_ctf_field_type *type)
        int ret = 0;
        struct bt_ctf_field_type_variant *variant;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_VARIANT)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT)) {
                ret = -1;
                goto end;
        }
@@ -1918,7 +1918,7 @@ int bt_ctf_field_type_variant_get_field(struct bt_ctf_field_type *type,
        int ret = 0;
 
        if (!type || index < 0 ||
-                       (type->id != BT_CTF_TYPE_ID_VARIANT)) {
+                       (type->id != BT_CTF_FIELD_TYPE_ID_VARIANT)) {
                ret = -1;
                goto end;
        }
@@ -1957,7 +1957,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_array_create(
                goto error;
        }
 
-       array->parent.id = BT_CTF_TYPE_ID_ARRAY;
+       array->parent.id = BT_CTF_FIELD_TYPE_ID_ARRAY;
        bt_get(element_type);
        array->element_type = element_type;
        array->length = length;
@@ -1973,7 +1973,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_array_get_element_type(
        struct bt_ctf_field_type *ret = NULL;
        struct bt_ctf_field_type_array *array;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ARRAY)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ARRAY)) {
                goto end;
        }
 
@@ -1992,7 +1992,7 @@ int bt_ctf_field_type_array_set_element_type(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_array *array;
 
        if (!type || !element_type ||
-                       (type->id != BT_CTF_TYPE_ID_ARRAY)) {
+                       (type->id != BT_CTF_FIELD_TYPE_ID_ARRAY)) {
                ret = -1;
                goto end;
        }
@@ -2015,7 +2015,7 @@ int64_t bt_ctf_field_type_array_get_length(struct bt_ctf_field_type *type)
        int64_t ret;
        struct bt_ctf_field_type_array *array;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_ARRAY)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_ARRAY)) {
                ret = -1;
                goto end;
        }
@@ -2041,7 +2041,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_sequence_create(
                goto error;
        }
 
-       sequence->parent.id = BT_CTF_TYPE_ID_SEQUENCE;
+       sequence->parent.id = BT_CTF_FIELD_TYPE_ID_SEQUENCE;
        bt_get(element_type);
        sequence->element_type = element_type;
        sequence->length_field_name = g_string_new(length_field_name);
@@ -2057,7 +2057,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_sequence_get_element_type(
        struct bt_ctf_field_type *ret = NULL;
        struct bt_ctf_field_type_sequence *sequence;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_SEQUENCE)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_SEQUENCE)) {
                goto end;
        }
 
@@ -2077,7 +2077,7 @@ int bt_ctf_field_type_sequence_set_element_type(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_sequence *sequence;
 
        if (!type || !element_type ||
-                       (type->id != BT_CTF_TYPE_ID_SEQUENCE)) {
+                       (type->id != BT_CTF_FIELD_TYPE_ID_SEQUENCE)) {
                ret = -1;
                goto end;
        }
@@ -2101,7 +2101,7 @@ const char *bt_ctf_field_type_sequence_get_length_field_name(
        const char *ret = NULL;
        struct bt_ctf_field_type_sequence *sequence;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_SEQUENCE)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_SEQUENCE)) {
                goto end;
        }
 
@@ -2121,7 +2121,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_create(void)
                return NULL;
        }
 
-       string->parent.id = BT_CTF_TYPE_ID_STRING;
+       string->parent.id = BT_CTF_FIELD_TYPE_ID_STRING;
        bt_ctf_field_type_init(&string->parent, TRUE);
        string->encoding = BT_CTF_STRING_ENCODING_UTF8;
        string->parent.alignment = CHAR_BIT;
@@ -2134,7 +2134,7 @@ enum bt_ctf_string_encoding bt_ctf_field_type_string_get_encoding(
        struct bt_ctf_field_type_string *string;
        enum bt_ctf_string_encoding ret = BT_CTF_STRING_ENCODING_UNKNOWN;
 
-       if (!type || (type->id != BT_CTF_TYPE_ID_STRING)) {
+       if (!type || (type->id != BT_CTF_FIELD_TYPE_ID_STRING)) {
                goto end;
        }
 
@@ -2151,7 +2151,7 @@ int bt_ctf_field_type_string_set_encoding(struct bt_ctf_field_type *type,
        int ret = 0;
        struct bt_ctf_field_type_string *string;
 
-       if (!type || type->id != BT_CTF_TYPE_ID_STRING ||
+       if (!type || type->id != BT_CTF_FIELD_TYPE_ID_STRING ||
                (encoding != BT_CTF_STRING_ENCODING_UTF8 &&
                encoding != BT_CTF_STRING_ENCODING_ASCII)) {
                ret = -1;
@@ -2167,7 +2167,7 @@ end:
 int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type)
 {
        int ret;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!type) {
                ret = -1;
@@ -2181,7 +2181,7 @@ int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type)
 
        type_id = bt_ctf_field_type_get_type_id(type);
        switch (type_id) {
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
        {
                struct bt_ctf_field_type *element =
                        bt_ctf_field_type_sequence_get_element_type(type);
@@ -2195,7 +2195,7 @@ int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type)
                bt_put(element);
                break;
        }
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
        {
                struct bt_ctf_field_type *element =
                        bt_ctf_field_type_array_get_element_type(type);
@@ -2209,7 +2209,7 @@ int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type)
                bt_put(element);
                break;
        }
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
        {
                int i, element_count;
 
@@ -2244,7 +2244,7 @@ int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type)
                ret = (int) type->alignment;
                break;
        }
-       case BT_CTF_TYPE_ID_UNKNOWN:
+       case BT_CTF_FIELD_TYPE_ID_UNKNOWN:
                ret = -1;
                break;
        default:
@@ -2265,7 +2265,7 @@ int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type,
                unsigned int alignment)
 {
        int ret = 0;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        /* Alignment must be a power of two */
        if (!type || type->frozen || !is_power_of_two(alignment)) {
@@ -2274,20 +2274,20 @@ int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type,
        }
 
        type_id = bt_ctf_field_type_get_type_id(type);
-       if (type_id == BT_CTF_TYPE_ID_UNKNOWN) {
+       if (type_id == BT_CTF_FIELD_TYPE_ID_UNKNOWN) {
                ret = -1;
                goto end;
        }
 
-       if (type->id == BT_CTF_TYPE_ID_STRING &&
+       if (type->id == BT_CTF_FIELD_TYPE_ID_STRING &&
                alignment != CHAR_BIT) {
                ret = -1;
                goto end;
        }
 
-       if (type_id == BT_CTF_TYPE_ID_VARIANT ||
-               type_id == BT_CTF_TYPE_ID_SEQUENCE ||
-               type_id == BT_CTF_TYPE_ID_ARRAY) {
+       if (type_id == BT_CTF_FIELD_TYPE_ID_VARIANT ||
+               type_id == BT_CTF_FIELD_TYPE_ID_SEQUENCE ||
+               type_id == BT_CTF_FIELD_TYPE_ID_ARRAY) {
                /* Setting an alignment on these types makes no sense */
                ret = -1;
                goto end;
@@ -2309,21 +2309,21 @@ enum bt_ctf_byte_order bt_ctf_field_type_get_byte_order(
        }
 
        switch (type->id) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
        {
                struct bt_ctf_field_type_integer *integer = container_of(
                        type, struct bt_ctf_field_type_integer, parent);
                ret = integer->user_byte_order;
                break;
        }
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
        {
                struct bt_ctf_field_type_enumeration *enum_ft = container_of(
                        type, struct bt_ctf_field_type_enumeration, parent);
                ret = bt_ctf_field_type_get_byte_order(enum_ft->container);
                break;
        }
-       case BT_CTF_TYPE_ID_FLOAT:
+       case BT_CTF_FIELD_TYPE_ID_FLOAT:
        {
                struct bt_ctf_field_type_floating_point *floating_point =
                        container_of(type,
@@ -2370,11 +2370,11 @@ end:
        return ret;
 }
 
-enum bt_ctf_type_id bt_ctf_field_type_get_type_id(
+enum bt_ctf_field_type_id bt_ctf_field_type_get_type_id(
                struct bt_ctf_field_type *type)
 {
        if (!type) {
-               return BT_CTF_TYPE_ID_UNKNOWN;
+               return BT_CTF_FIELD_TYPE_ID_UNKNOWN;
        }
 
        return type->id;
@@ -2382,42 +2382,42 @@ enum bt_ctf_type_id bt_ctf_field_type_get_type_id(
 
 int bt_ctf_field_type_is_integer(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_INTEGER;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_INTEGER;
 }
 
 int bt_ctf_field_type_is_floating_point(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_FLOAT;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_FLOAT;
 }
 
 int bt_ctf_field_type_is_enumeration(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_ENUM;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_ENUM;
 }
 
 int bt_ctf_field_type_is_string(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_STRING;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_STRING;
 }
 
 int bt_ctf_field_type_is_structure(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_STRUCT;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_STRUCT;
 }
 
 int bt_ctf_field_type_is_array(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_ARRAY;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_ARRAY;
 }
 
 int bt_ctf_field_type_is_sequence(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_SEQUENCE;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_SEQUENCE;
 }
 
 int bt_ctf_field_type_is_variant(struct bt_ctf_field_type *type)
 {
-       return bt_ctf_field_type_get_type_id(type) == BT_CTF_TYPE_ID_VARIANT;
+       return bt_ctf_field_type_get_type_id(type) == BT_CTF_FIELD_TYPE_ID_VARIANT;
 }
 
 void bt_ctf_field_type_get(struct bt_ctf_field_type *type)
@@ -2556,7 +2556,7 @@ int bt_ctf_field_type_structure_get_field_name_index(
        struct bt_ctf_field_type_structure *structure;
 
        if (!type || !name ||
-               bt_ctf_field_type_get_type_id(type) != BT_CTF_TYPE_ID_STRUCT) {
+               bt_ctf_field_type_get_type_id(type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -2587,7 +2587,7 @@ int bt_ctf_field_type_structure_set_field_index(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_structure *structure;
 
        if (!type || !field ||
-               bt_ctf_field_type_get_type_id(type) != BT_CTF_TYPE_ID_STRUCT) {
+               bt_ctf_field_type_get_type_id(type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -2618,7 +2618,7 @@ int bt_ctf_field_type_variant_get_field_name_index(
        struct bt_ctf_field_type_variant *variant;
 
        if (!type || !name ||
-               bt_ctf_field_type_get_type_id(type) != BT_CTF_TYPE_ID_VARIANT) {
+               bt_ctf_field_type_get_type_id(type) != BT_CTF_FIELD_TYPE_ID_VARIANT) {
                ret = -1;
                goto end;
        }
@@ -2650,7 +2650,7 @@ int bt_ctf_field_type_sequence_set_length_field_path(
        struct bt_ctf_field_type_sequence *sequence;
 
        if (!type || bt_ctf_field_type_get_type_id(type) !=
-                       BT_CTF_TYPE_ID_SEQUENCE) {
+                       BT_CTF_FIELD_TYPE_ID_SEQUENCE) {
                ret = -1;
                goto end;
        }
@@ -2671,7 +2671,7 @@ int bt_ctf_field_type_variant_set_tag_field_path(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_variant *variant;
 
        if (!type || bt_ctf_field_type_get_type_id(type) !=
-                       BT_CTF_TYPE_ID_VARIANT) {
+                       BT_CTF_FIELD_TYPE_ID_VARIANT) {
                ret = -1;
                goto end;
        }
@@ -2693,7 +2693,7 @@ int bt_ctf_field_type_variant_set_tag_field_type(struct bt_ctf_field_type *type,
 
        if (!type || !tag ||
                        bt_ctf_field_type_get_type_id(tag) !=
-                       BT_CTF_TYPE_ID_ENUM) {
+                       BT_CTF_FIELD_TYPE_ID_ENUM) {
                ret = -1;
                goto end;
        }
@@ -2718,7 +2718,7 @@ int bt_ctf_field_type_variant_set_field_index(struct bt_ctf_field_type *type,
        struct bt_ctf_field_type_variant *variant;
 
        if (!type || !field ||
-               bt_ctf_field_type_get_type_id(type) != BT_CTF_TYPE_ID_VARIANT) {
+               bt_ctf_field_type_get_type_id(type) != BT_CTF_FIELD_TYPE_ID_VARIANT) {
                ret = -1;
                goto end;
        }
@@ -4076,7 +4076,7 @@ int bt_ctf_field_type_compare(struct bt_ctf_field_type *type_a,
                goto end;
        }
 
-       if (type_a->id == BT_CTF_TYPE_ID_UNKNOWN) {
+       if (type_a->id == BT_CTF_FIELD_TYPE_ID_UNKNOWN) {
                /* Both have unknown type IDs */
                goto end;
        }
@@ -4091,7 +4091,7 @@ BT_HIDDEN
 int bt_ctf_field_type_get_field_count(struct bt_ctf_field_type *field_type)
 {
        int field_count = -1;
-       enum bt_ctf_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
+       enum bt_ctf_field_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
 
        switch (type_id) {
        case CTF_TYPE_STRUCT:
@@ -4122,7 +4122,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_get_field_at_index(
                struct bt_ctf_field_type *field_type, int index)
 {
        struct bt_ctf_field_type *field = NULL;
-       enum bt_ctf_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
+       enum bt_ctf_field_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
 
        switch (type_id) {
        case CTF_TYPE_STRUCT:
@@ -4157,7 +4157,7 @@ int bt_ctf_field_type_get_field_index(struct bt_ctf_field_type *field_type,
                const char *name)
 {
        int field_index = -1;
-       enum bt_ctf_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
+       enum bt_ctf_field_type_id type_id = bt_ctf_field_type_get_type_id(field_type);
 
        switch (type_id) {
        case CTF_TYPE_STRUCT:
index 48dce5669a7090facd0aee08eb75d30e442fb2fc..ace87de33722c026fae1372993127e5352bba10c 100644 (file)
@@ -182,109 +182,109 @@ int increase_packet_size(struct bt_ctf_stream_pos *pos);
 static
 struct bt_ctf_field *(* const field_create_funcs[])(
                struct bt_ctf_field_type *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_integer_create,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_create,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_integer_create,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_create,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_floating_point_create,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_create,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_create,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_create,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_create,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_string_create,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_create,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_create,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_create,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_create,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_string_create,
 };
 
 static
 void (* const field_destroy_funcs[])(struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_integer_destroy,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_destroy,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_integer_destroy,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_destroy,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_floating_point_destroy,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_destroy,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_destroy,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_destroy,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_destroy,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_string_destroy,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_destroy,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_destroy,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_destroy,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_destroy,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_string_destroy,
 };
 
 static
 int (* const field_validate_funcs[])(struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_generic_validate,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_validate,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_generic_validate,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_validate,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_validate,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_validate,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_validate,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_generic_validate,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_generic_validate,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_validate,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_generic_validate,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_validate,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_validate,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_validate,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_validate,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_generic_validate,
 };
 
 static
 int (* const field_reset_funcs[])(struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_generic_reset,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_reset,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_generic_reset,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_reset,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_reset,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_reset,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_reset,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_string_reset,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_generic_reset,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_reset,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_generic_reset,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_reset,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_reset,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_reset,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_reset,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_string_reset,
 };
 
 static
 int (* const field_serialize_funcs[])(struct bt_ctf_field *,
                struct bt_ctf_stream_pos *, enum bt_ctf_byte_order) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_integer_serialize,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_serialize,
-       [BT_CTF_TYPE_ID_FLOAT] =
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_integer_serialize,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_serialize,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] =
                bt_ctf_field_floating_point_serialize,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_serialize,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_serialize,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_serialize,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_serialize,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_string_serialize,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_serialize,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_serialize,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_serialize,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_serialize,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_string_serialize,
 };
 
 static
 int (* const field_copy_funcs[])(struct bt_ctf_field *,
                struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_integer_copy,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_copy,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_floating_point_copy,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_copy,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_copy,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_copy,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_copy,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_string_copy,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_integer_copy,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_copy,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_floating_point_copy,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_copy,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_copy,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_copy,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_copy,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_string_copy,
 };
 
 static
 void (* const field_freeze_funcs[])(struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = generic_field_freeze,
-       [BT_CTF_TYPE_ID_FLOAT] = generic_field_freeze,
-       [BT_CTF_TYPE_ID_STRING] = generic_field_freeze,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_freeze,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_freeze,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_freeze,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_freeze,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_freeze,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = generic_field_freeze,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = generic_field_freeze,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = generic_field_freeze,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_freeze,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_freeze,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_freeze,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_freeze,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_freeze,
 };
 
 static
 bool (* const field_is_set_funcs[])(struct bt_ctf_field *) = {
-       [BT_CTF_TYPE_ID_INTEGER] = bt_ctf_field_generic_is_set,
-       [BT_CTF_TYPE_ID_ENUM] = bt_ctf_field_enumeration_is_set,
-       [BT_CTF_TYPE_ID_FLOAT] = bt_ctf_field_generic_is_set,
-       [BT_CTF_TYPE_ID_STRUCT] = bt_ctf_field_structure_is_set,
-       [BT_CTF_TYPE_ID_VARIANT] = bt_ctf_field_variant_is_set,
-       [BT_CTF_TYPE_ID_ARRAY] = bt_ctf_field_array_is_set,
-       [BT_CTF_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_is_set,
-       [BT_CTF_TYPE_ID_STRING] = bt_ctf_field_generic_is_set,
+       [BT_CTF_FIELD_TYPE_ID_INTEGER] = bt_ctf_field_generic_is_set,
+       [BT_CTF_FIELD_TYPE_ID_ENUM] = bt_ctf_field_enumeration_is_set,
+       [BT_CTF_FIELD_TYPE_ID_FLOAT] = bt_ctf_field_generic_is_set,
+       [BT_CTF_FIELD_TYPE_ID_STRUCT] = bt_ctf_field_structure_is_set,
+       [BT_CTF_FIELD_TYPE_ID_VARIANT] = bt_ctf_field_variant_is_set,
+       [BT_CTF_FIELD_TYPE_ID_ARRAY] = bt_ctf_field_array_is_set,
+       [BT_CTF_FIELD_TYPE_ID_SEQUENCE] = bt_ctf_field_sequence_is_set,
+       [BT_CTF_FIELD_TYPE_ID_STRING] = bt_ctf_field_generic_is_set,
 };
 
 struct bt_ctf_field *bt_ctf_field_create(struct bt_ctf_field_type *type)
 {
        struct bt_ctf_field *field = NULL;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
        int ret;
 
        if (!type) {
@@ -292,7 +292,7 @@ struct bt_ctf_field *bt_ctf_field_create(struct bt_ctf_field_type *type)
        }
 
        type_id = bt_ctf_field_type_get_type_id(type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN ||
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN ||
                        type_id >= BT_CTF_NR_TYPE_IDS) {
                goto error;
        }
@@ -343,9 +343,9 @@ end:
        return ret;
 }
 
-enum bt_ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field)
+enum bt_ctf_field_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field)
 {
-       enum bt_ctf_type_id ret = BT_CTF_TYPE_ID_UNKNOWN;
+       enum bt_ctf_field_type_id ret = BT_CTF_FIELD_TYPE_ID_UNKNOWN;
 
        if (!field) {
                goto end;
@@ -358,42 +358,42 @@ end:
 
 int bt_ctf_field_is_integer(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_INTEGER;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_INTEGER;
 }
 
 int bt_ctf_field_is_floating_point(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_FLOAT;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_FLOAT;
 }
 
 int bt_ctf_field_is_enumeration(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_ENUM;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_ENUM;
 }
 
 int bt_ctf_field_is_string(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_STRING;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_STRING;
 }
 
 int bt_ctf_field_is_structure(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_STRUCT;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_STRUCT;
 }
 
 int bt_ctf_field_is_array(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_ARRAY;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_ARRAY;
 }
 
 int bt_ctf_field_is_sequence(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_SEQUENCE;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_SEQUENCE;
 }
 
 int bt_ctf_field_is_variant(struct bt_ctf_field *field)
 {
-       return bt_ctf_field_get_type_id(field) == BT_CTF_TYPE_ID_VARIANT;
+       return bt_ctf_field_get_type_id(field) == BT_CTF_FIELD_TYPE_ID_VARIANT;
 }
 
 struct bt_ctf_field *bt_ctf_field_sequence_get_length(
@@ -407,7 +407,7 @@ struct bt_ctf_field *bt_ctf_field_sequence_get_length(
        }
 
        if (bt_ctf_field_type_get_type_id(field->type) !=
-               BT_CTF_TYPE_ID_SEQUENCE) {
+               BT_CTF_FIELD_TYPE_ID_SEQUENCE) {
                goto end;
        }
 
@@ -432,7 +432,7 @@ int bt_ctf_field_sequence_set_length(struct bt_ctf_field *field,
                goto end;
        }
        if (bt_ctf_field_type_get_type_id(length_field->type) !=
-               BT_CTF_TYPE_ID_INTEGER) {
+               BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -480,7 +480,7 @@ struct bt_ctf_field *bt_ctf_field_structure_get_field(
 
        if (!field || !name ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRUCT) {
+                       BT_CTF_FIELD_TYPE_ID_STRUCT) {
                goto error;
        }
 
@@ -531,7 +531,7 @@ struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index(
 
        if (!field ||
                bt_ctf_field_type_get_type_id(field->type) !=
-               BT_CTF_TYPE_ID_STRUCT) {
+               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                goto end;
        }
 
@@ -587,7 +587,7 @@ int bt_ctf_field_structure_set_field(struct bt_ctf_field *field,
 
        if (!field || !name || !value || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRUCT) {
+                       BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
@@ -629,7 +629,7 @@ struct bt_ctf_field *bt_ctf_field_array_get_field(struct bt_ctf_field *field,
        struct bt_ctf_field_array *array;
 
        if (!field || bt_ctf_field_type_get_type_id(field->type) !=
-               BT_CTF_TYPE_ID_ARRAY) {
+               BT_CTF_FIELD_TYPE_ID_ARRAY) {
                goto end;
        }
 
@@ -669,7 +669,7 @@ struct bt_ctf_field *bt_ctf_field_sequence_get_field(struct bt_ctf_field *field,
        struct bt_ctf_field_sequence *sequence;
 
        if (!field || bt_ctf_field_type_get_type_id(field->type) !=
-               BT_CTF_TYPE_ID_SEQUENCE) {
+               BT_CTF_FIELD_TYPE_ID_SEQUENCE) {
                goto end;
        }
 
@@ -714,9 +714,9 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field,
 
        if (!field || !tag_field ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_VARIANT ||
+                       BT_CTF_FIELD_TYPE_ID_VARIANT ||
                bt_ctf_field_type_get_type_id(tag_field->type) !=
-                       BT_CTF_TYPE_ID_ENUM) {
+                       BT_CTF_FIELD_TYPE_ID_ENUM) {
                goto end;
        }
 
@@ -797,7 +797,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_current_field(
 
        if (!variant_field ||
                bt_ctf_field_type_get_type_id(variant_field->type) !=
-                       BT_CTF_TYPE_ID_VARIANT) {
+                       BT_CTF_FIELD_TYPE_ID_VARIANT) {
                goto end;
        }
 
@@ -822,7 +822,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_tag(
 
        if (!variant_field ||
                        bt_ctf_field_type_get_type_id(variant_field->type) !=
-                       BT_CTF_TYPE_ID_VARIANT) {
+                       BT_CTF_FIELD_TYPE_ID_VARIANT) {
                goto end;
        }
 
@@ -842,7 +842,7 @@ struct bt_ctf_field *bt_ctf_field_enumeration_get_container(
        struct bt_ctf_field_enumeration *enumeration;
 
        if (!field || bt_ctf_field_type_get_type_id(field->type) !=
-               BT_CTF_TYPE_ID_ENUM) {
+               BT_CTF_FIELD_TYPE_ID_ENUM) {
                goto end;
        }
 
@@ -928,7 +928,7 @@ int bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *field,
 
        if (!field || !value || !field->payload_set ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_INTEGER) {
+                       BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -958,7 +958,7 @@ int bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *field,
 
        if (!field || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_INTEGER) {
+                       BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -994,7 +994,7 @@ int bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *field,
 
        if (!field || !value || !field->payload_set ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_INTEGER) {
+                       BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -1024,7 +1024,7 @@ int bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *field,
 
        if (!field || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_INTEGER) {
+                       BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -1058,7 +1058,7 @@ int bt_ctf_field_floating_point_get_value(struct bt_ctf_field *field,
 
        if (!field || !value || !field->payload_set ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_FLOAT) {
+                       BT_CTF_FIELD_TYPE_ID_FLOAT) {
                ret = -1;
                goto end;
        }
@@ -1078,7 +1078,7 @@ int bt_ctf_field_floating_point_set_value(struct bt_ctf_field *field,
 
        if (!field || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_FLOAT) {
+                       BT_CTF_FIELD_TYPE_ID_FLOAT) {
                ret = -1;
                goto end;
        }
@@ -1097,7 +1097,7 @@ const char *bt_ctf_field_string_get_value(struct bt_ctf_field *field)
 
        if (!field || !field->payload_set ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRING) {
+                       BT_CTF_FIELD_TYPE_ID_STRING) {
                goto end;
        }
 
@@ -1116,7 +1116,7 @@ int bt_ctf_field_string_set_value(struct bt_ctf_field *field,
 
        if (!field || !value || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRING) {
+                       BT_CTF_FIELD_TYPE_ID_STRING) {
                ret = -1;
                goto end;
        }
@@ -1141,7 +1141,7 @@ int bt_ctf_field_string_append(struct bt_ctf_field *field,
 
        if (!field || !value || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRING) {
+                       BT_CTF_FIELD_TYPE_ID_STRING) {
                ret = -1;
                goto end;
        }
@@ -1170,7 +1170,7 @@ int bt_ctf_field_string_append_len(struct bt_ctf_field *field,
 
        if (!field || !value || field->frozen ||
                bt_ctf_field_type_get_type_id(field->type) !=
-                       BT_CTF_TYPE_ID_STRING) {
+                       BT_CTF_FIELD_TYPE_ID_STRING) {
                ret = -1;
                goto end;
        }
@@ -1203,7 +1203,7 @@ BT_HIDDEN
 int bt_ctf_field_validate(struct bt_ctf_field *field)
 {
        int ret = 0;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field) {
                ret = -1;
@@ -1211,7 +1211,7 @@ int bt_ctf_field_validate(struct bt_ctf_field *field)
        }
 
        type_id = bt_ctf_field_type_get_type_id(field->type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
                ret = -1;
                goto end;
        }
@@ -1225,7 +1225,7 @@ BT_HIDDEN
 int bt_ctf_field_reset(struct bt_ctf_field *field)
 {
        int ret = 0;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field) {
                ret = -1;
@@ -1233,7 +1233,7 @@ int bt_ctf_field_reset(struct bt_ctf_field *field)
        }
 
        type_id = bt_ctf_field_type_get_type_id(field->type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
                ret = -1;
                goto end;
        }
@@ -1249,7 +1249,7 @@ int bt_ctf_field_serialize(struct bt_ctf_field *field,
                enum bt_ctf_byte_order native_byte_order)
 {
        int ret = 0;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field || !pos) {
                ret = -1;
@@ -1257,7 +1257,7 @@ int bt_ctf_field_serialize(struct bt_ctf_field *field,
        }
 
        type_id = bt_ctf_field_type_get_type_id(field->type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
                ret = -1;
                goto end;
        }
@@ -1272,14 +1272,14 @@ BT_HIDDEN
 bool bt_ctf_field_is_set(struct bt_ctf_field *field)
 {
        bool is_set = false;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field) {
                goto end;
        }
 
        type_id = bt_ctf_field_type_get_type_id(field->type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
                goto end;
        }
 
@@ -1292,14 +1292,14 @@ struct bt_ctf_field *bt_ctf_field_copy(struct bt_ctf_field *field)
 {
        int ret;
        struct bt_ctf_field *copy = NULL;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field) {
                goto end;
        }
 
        type_id = bt_ctf_field_type_get_type_id(field->type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN || type_id >= BT_CTF_NR_TYPE_IDS) {
                goto end;
        }
 
@@ -1428,12 +1428,12 @@ void bt_ctf_field_destroy(struct bt_object *obj)
 {
        struct bt_ctf_field *field;
        struct bt_ctf_field_type *type;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        field = container_of(obj, struct bt_ctf_field, base);
        type = field->type;
        type_id = bt_ctf_field_type_get_type_id(type);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN ||
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN ||
                type_id >= BT_CTF_NR_TYPE_IDS) {
                return;
        }
@@ -2405,14 +2405,14 @@ void bt_ctf_field_sequence_freeze(struct bt_ctf_field *field)
 BT_HIDDEN
 void bt_ctf_field_freeze(struct bt_ctf_field *field)
 {
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        if (!field) {
                goto end;
        }
 
        type_id = bt_ctf_field_get_type_id(field);
-       if (type_id <= BT_CTF_TYPE_ID_UNKNOWN ||
+       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN ||
                        type_id >= BT_CTF_NR_TYPE_IDS) {
                goto end;
        }
index 41dd6c5dc36d5700fff7593e46b59a9c6597c66b..f72652ef0c59e486f722f86afb65d1c24e6bb357 100644 (file)
@@ -394,7 +394,7 @@ int ptokens_to_field_path(GList *ptokens, struct bt_ctf_field_path *field_path,
                int child_index;
                struct bt_ctf_field_type *child_type;
                const char *field_name = ptoken_get_string(cur_ptoken);
-               enum bt_ctf_type_id type_id =
+               enum bt_ctf_field_type_id type_id =
                        bt_ctf_field_type_get_type_id(type);
 
                /* Find to which index corresponds the current path token */
index fbf81942946bfe34a1062901302060d73b5b4909..776ced90a0cd945a2de2fc42b65d0f8b1e45e84f 100644 (file)
@@ -585,7 +585,7 @@ int bt_ctf_stream_class_set_packet_context_type(
 
        if (packet_context_type &&
                        bt_ctf_field_type_get_type_id(packet_context_type) !=
-                               BT_CTF_TYPE_ID_STRUCT) {
+                               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                /* A packet context must be a structure. */
                ret = -1;
                goto end;
@@ -626,7 +626,7 @@ int bt_ctf_stream_class_set_event_header_type(
 
        if (event_header_type &&
                        bt_ctf_field_type_get_type_id(event_header_type) !=
-                               BT_CTF_TYPE_ID_STRUCT) {
+                               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                /* An event header must be a structure. */
                ret = -1;
                goto end;
@@ -666,7 +666,7 @@ int bt_ctf_stream_class_set_event_context_type(
 
        if (event_context_type &&
                        bt_ctf_field_type_get_type_id(event_context_type) !=
-                               BT_CTF_TYPE_ID_STRUCT) {
+                               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                /* A packet context must be a structure. */
                ret = -1;
                goto end;
index 39d490c38bb695a11a5e8fb4fb01c7c0f064f409..a06cbbbf64a7844e0878ff533137290ea409c040 100644 (file)
@@ -66,7 +66,7 @@ int set_integer_field_value(struct bt_ctf_field* field, uint64_t value)
        assert(field_type);
 
        if (bt_ctf_field_type_get_type_id(field_type) !=
-                       BT_CTF_TYPE_ID_INTEGER) {
+                       BT_CTF_FIELD_TYPE_ID_INTEGER) {
                /* Not an integer and the value is unset, error. */
                ret = -1;
                goto end;
@@ -112,7 +112,7 @@ int set_packet_header_magic(struct bt_ctf_stream *stream)
        assert(magic_field_type);
 
        if (bt_ctf_field_type_get_type_id(magic_field_type) !=
-               BT_CTF_TYPE_ID_INTEGER) {
+               BT_CTF_FIELD_TYPE_ID_INTEGER) {
                /* Magic field is not an integer. Not an error, skip. */
                goto end;
        }
@@ -163,7 +163,7 @@ int set_packet_header_uuid(struct bt_ctf_stream *stream)
        uuid_field_type = bt_ctf_field_get_type(uuid_field);
        assert(uuid_field_type);
        if (bt_ctf_field_type_get_type_id(uuid_field_type) !=
-               BT_CTF_TYPE_ID_ARRAY) {
+               BT_CTF_FIELD_TYPE_ID_ARRAY) {
                /* UUID field is not an array. Not an error, skip. */
                goto end;
        }
@@ -180,7 +180,7 @@ int set_packet_header_uuid(struct bt_ctf_stream *stream)
                uuid_field_type);
        assert(element_field_type);
        if (bt_ctf_field_type_get_type_id(element_field_type) !=
-               BT_CTF_TYPE_ID_INTEGER) {
+               BT_CTF_FIELD_TYPE_ID_INTEGER) {
                /* UUID array elements are not integers. Not an error, skip */
                goto end;
        }
@@ -236,7 +236,7 @@ int set_packet_header_stream_id(struct bt_ctf_stream *stream)
        stream_id_field_type = bt_ctf_field_get_type(stream_id_field);
        assert(stream_id_field_type);
        if (bt_ctf_field_type_get_type_id(stream_id_field_type) !=
-               BT_CTF_TYPE_ID_INTEGER) {
+               BT_CTF_FIELD_TYPE_ID_INTEGER) {
                /* stream_id field is not an integer. Not an error, skip. */
                goto end;
        }
@@ -841,7 +841,7 @@ int get_event_header_timestamp(struct bt_ctf_field *event_header, uint64_t *time
        timestamp_field_type = bt_ctf_field_get_type(timestamp_field);
        assert(timestamp_field_type);
        if (bt_ctf_field_type_get_type_id(timestamp_field_type) !=
-               BT_CTF_TYPE_ID_INTEGER) {
+               BT_CTF_FIELD_TYPE_ID_INTEGER) {
                ret = -1;
                goto end;
        }
@@ -1158,7 +1158,7 @@ int _set_structure_field_integer(struct bt_ctf_field *structure, char *name,
 
        field_type = bt_ctf_field_get_type(integer);
        assert(field_type);
-       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) {
                /*
                 * The user most likely meant for us to populate this field
                 * automatically. However, we can only do this if the field
index c16686a086b4ff9728c51b50f5561d6e5064fb0b..90432dbac36273de8e896f428aa5e614f79bb6a7 100644 (file)
@@ -1046,7 +1046,7 @@ int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace,
        /* packet_header_type must be a structure. */
        if (packet_header_type &&
                        bt_ctf_field_type_get_type_id(packet_header_type) !=
-                               BT_CTF_TYPE_ID_STRUCT) {
+                               BT_CTF_FIELD_TYPE_ID_STRUCT) {
                ret = -1;
                goto end;
        }
index dc2a3a931cc0ba91714c828ae573cfbf7038b534..ea29c530f48748d0d69a49593958402a68752810 100644 (file)
@@ -190,15 +190,15 @@ static
 int field_type_contains_sequence_or_variant_ft(struct bt_ctf_field_type *type)
 {
        int ret = 0;
-       enum bt_ctf_type_id type_id = bt_ctf_field_type_get_type_id(type);
+       enum bt_ctf_field_type_id type_id = bt_ctf_field_type_get_type_id(type);
 
        switch (type_id) {
-       case BT_CTF_TYPE_ID_SEQUENCE:
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                ret = 1;
                goto end;
-       case BT_CTF_TYPE_ID_ARRAY:
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
        {
                int i;
                int field_count = bt_ctf_field_type_get_field_count(type);
index a74867933fa28d7108fa4b9a80d3593065e853e3..e7762a3dd08af0ae08510f17ad41ebf62728c611 100644 (file)
@@ -206,18 +206,18 @@ int64_t get_compound_field_type_length(struct bt_ctf_btr *btr,
        int64_t length;
 
        switch (bt_ctf_field_type_get_type_id(field_type)) {
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
                length = (int64_t) bt_ctf_field_type_structure_get_field_count(
                        field_type);
                break;
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                /* Variant field types always "contain" a single type */
                length = 1;
                break;
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
                length = bt_ctf_field_type_array_get_length(field_type);
                break;
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
                length = btr->user.cbs.query.get_sequence_length(field_type,
                        btr->user.data);
                break;
@@ -373,10 +373,10 @@ int get_basic_field_type_size(struct bt_ctf_btr *btr,
        int size;
 
        switch (bt_ctf_field_type_get_type_id(field_type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                size = bt_ctf_field_type_integer_get_size(field_type);
                break;
-       case BT_CTF_TYPE_ID_FLOAT:
+       case BT_CTF_FIELD_TYPE_ID_FLOAT:
        {
                int exp_dig, mant_dig;
 
@@ -394,7 +394,7 @@ int get_basic_field_type_size(struct bt_ctf_btr *btr,
                size = exp_dig + mant_dig;
                break;
        }
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
        {
                struct bt_ctf_field_type *int_type;
 
@@ -986,16 +986,16 @@ enum bt_ctf_btr_status read_basic_begin_state(struct bt_ctf_btr *btr)
        assert(btr->cur_basic_field_type);
 
        switch (bt_ctf_field_type_get_type_id(btr->cur_basic_field_type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                status = read_basic_int_type_and_call_begin(btr);
                break;
-       case BT_CTF_TYPE_ID_FLOAT:
+       case BT_CTF_FIELD_TYPE_ID_FLOAT:
                status = read_basic_float_type_and_call_begin(btr);
                break;
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                status = read_basic_enum_type_and_call_begin(btr);
                break;
-       case BT_CTF_TYPE_ID_STRING:
+       case BT_CTF_FIELD_TYPE_ID_STRING:
                status = read_basic_string_type_and_call(btr, true);
                break;
        default:
@@ -1013,16 +1013,16 @@ enum bt_ctf_btr_status read_basic_continue_state(struct bt_ctf_btr *btr)
        assert(btr->cur_basic_field_type);
 
        switch (bt_ctf_field_type_get_type_id(btr->cur_basic_field_type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                status = read_basic_int_type_and_call_continue(btr);
                break;
-       case BT_CTF_TYPE_ID_FLOAT:
+       case BT_CTF_FIELD_TYPE_ID_FLOAT:
                status = read_basic_float_type_and_call_continue(btr);
                break;
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                status = read_basic_enum_type_and_call_continue(btr);
                break;
-       case BT_CTF_TYPE_ID_STRING:
+       case BT_CTF_FIELD_TYPE_ID_STRING:
                status = read_basic_string_type_and_call(btr, false);
                break;
        default:
@@ -1103,10 +1103,10 @@ end:
 static inline
 bool is_compound_type(struct bt_ctf_field_type *field_type)
 {
-       enum bt_ctf_type_id id = bt_ctf_field_type_get_type_id(field_type);
+       enum bt_ctf_field_type_id id = bt_ctf_field_type_get_type_id(field_type);
 
-       return id == BT_CTF_TYPE_ID_STRUCT || id == BT_CTF_TYPE_ID_ARRAY ||
-               id == BT_CTF_TYPE_ID_SEQUENCE || id == BT_CTF_TYPE_ID_VARIANT;
+       return id == BT_CTF_FIELD_TYPE_ID_STRUCT || id == BT_CTF_FIELD_TYPE_ID_ARRAY ||
+               id == BT_CTF_FIELD_TYPE_ID_SEQUENCE || id == BT_CTF_FIELD_TYPE_ID_VARIANT;
 }
 
 static inline
@@ -1148,7 +1148,7 @@ enum bt_ctf_btr_status next_field_state(struct bt_ctf_btr *btr)
 
        /* Get next field's type */
        switch (bt_ctf_field_type_get_type_id(top->base_type)) {
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
                ret = bt_ctf_field_type_structure_get_field(
                        top->base_type, NULL, &next_field_type,
                        top->index);
@@ -1156,17 +1156,17 @@ enum bt_ctf_btr_status next_field_state(struct bt_ctf_btr *btr)
                        next_field_type = NULL;
                }
                break;
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
                next_field_type =
                        bt_ctf_field_type_array_get_element_type(
                                top->base_type);
                break;
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
                next_field_type =
                        bt_ctf_field_type_sequence_get_element_type(
                                top->base_type);
                break;
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                /* Variant types are dynamic: query the user, he should know! */
                next_field_type =
                        btr->user.cbs.query.get_variant_type(
index 319575df8ff73759b60c5de8d3280933c80ca8f2..5b27899c90da191712c6cfb1c493fa1e85849a71 100644 (file)
@@ -601,14 +601,14 @@ static inline
 bool is_struct_type(struct bt_ctf_field_type *field_type)
 {
        return bt_ctf_field_type_get_type_id(field_type) ==
-                       BT_CTF_TYPE_ID_STRUCT;
+                       BT_CTF_FIELD_TYPE_ID_STRUCT;
 }
 
 static inline
 bool is_variant_type(struct bt_ctf_field_type *field_type)
 {
        return bt_ctf_field_type_get_type_id(field_type) ==
-                       BT_CTF_TYPE_ID_VARIANT;
+                       BT_CTF_FIELD_TYPE_ID_VARIANT;
 }
 
 static
@@ -1412,17 +1412,17 @@ struct bt_ctf_field *get_next_field(struct bt_ctf_notif_iter *notit)
        }
 
        switch (bt_ctf_field_type_get_type_id(base_type)) {
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
                next_field = bt_ctf_field_structure_get_field_by_index(
                        base_field, index);
                break;
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
                next_field = bt_ctf_field_array_get_field(base_field, index);
                break;
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
                next_field = bt_ctf_field_sequence_get_field(base_field, index);
                break;
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                next_field = bt_ctf_field_variant_get_current_field(base_field);
                break;
        default:
@@ -1555,12 +1555,12 @@ enum bt_ctf_btr_status btr_unsigned_int_common(uint64_t value,
        }
 
        switch(bt_ctf_field_type_get_type_id(type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                /* Integer field is created field */
                BT_MOVE(int_field, field);
                bt_get(type);
                break;
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                int_field = bt_ctf_field_enumeration_get_container(field);
                type = bt_ctf_field_get_type(int_field);
                break;
@@ -1650,12 +1650,12 @@ enum bt_ctf_btr_status btr_signed_int_cb(int64_t value,
        }
 
        switch(bt_ctf_field_type_get_type_id(type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                /* Integer field is created field */
                BT_MOVE(int_field, field);
                bt_get(type);
                break;
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                int_field = bt_ctf_field_enumeration_get_container(field);
                type = bt_ctf_field_get_type(int_field);
                break;
index 892d879972dc8fcb45bb1627cbe5e4a69da624aa..6c392602117a729cdf149f9190a9314ac0ce4b04 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;
@@ -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;
        }
index 7400f1cebb6461d66aae5fbaf65f91851294455b..68fb5b759c24bd3ad36e93d3aa63fb08881fb7b2 100644 (file)
@@ -124,23 +124,23 @@ int find_update_clock_fields(FILE *err, struct bt_ctf_field_type *type,
        int ret;
 
        switch (bt_ctf_field_type_get_type_id(type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                return update_header_clock_int_field_type(err, type,
                                writer_clock_class);
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
                return find_update_struct_clock_fields(err, type,
                                writer_clock_class);
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
                return find_update_array_clock_fields(err, type,
                                writer_clock_class);
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
                return find_update_sequence_clock_fields(err, type,
                                writer_clock_class);
        case BT_CTF_TYPE_ID_UNTAGGED_VARIANT:
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                return find_update_variant_clock_fields(err, type,
                                writer_clock_class);
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                return find_update_enum_clock_fields(err, type,
                                writer_clock_class);
                break;
@@ -343,7 +343,7 @@ struct bt_ctf_field_type *override_header_type(FILE *err,
                goto error;
        }
 
-       if (bt_ctf_field_type_get_type_id(new_type) != BT_CTF_TYPE_ID_STRUCT) {
+       if (bt_ctf_field_type_get_type_id(new_type) != BT_CTF_FIELD_TYPE_ID_STRUCT) {
                fprintf(err, "[error] Unexpected header field type\n");
                goto error;
        }
@@ -440,39 +440,39 @@ int copy_override_field(FILE *err, struct bt_ctf_event *event,
        }
 
        switch (bt_ctf_field_type_get_type_id(type)) {
-       case BT_CTF_TYPE_ID_INTEGER:
+       case BT_CTF_FIELD_TYPE_ID_INTEGER:
                ret = copy_find_clock_int_field(err, event, writer_event,
                                field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_STRUCT:
+       case BT_CTF_FIELD_TYPE_ID_STRUCT:
                ret = copy_find_clock_struct_field(err, event, writer_event,
                                field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_FLOAT:
+       case BT_CTF_FIELD_TYPE_ID_FLOAT:
                ret = copy_float_field(err, field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_ENUM:
+       case BT_CTF_FIELD_TYPE_ID_ENUM:
                ret = copy_find_clock_enum_field(err, event, writer_event,
                                field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_STRING:
+       case BT_CTF_FIELD_TYPE_ID_STRING:
                ret = copy_string_field(err, field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_ARRAY:
+       case BT_CTF_FIELD_TYPE_ID_ARRAY:
                ret = copy_find_clock_array_field(err, event, writer_event,
                                field, type, copy_field);
                break;
-       case BT_CTF_TYPE_ID_SEQUENCE:
+       case BT_CTF_FIELD_TYPE_ID_SEQUENCE:
                ret = copy_find_clock_sequence_field(err, event, writer_event,
                                field, type, copy_field);
                break;
        case BT_CTF_TYPE_ID_UNTAGGED_VARIANT:
-       case BT_CTF_TYPE_ID_VARIANT:
+       case BT_CTF_FIELD_TYPE_ID_VARIANT:
                ret = copy_find_clock_variant_field(err, event, writer_event,
                                field, type, copy_field);
                break;
        /* No default, we want to catch missing field types. */
-       case BT_CTF_TYPE_ID_UNKNOWN:
+       case BT_CTF_FIELD_TYPE_ID_UNKNOWN:
        case BT_CTF_NR_TYPE_IDS:
                break;
        }
index 39c394bdc761b2398f920367cee927f36b19d420..ee983651fb0b7c7f3ab26bef5acc21475f0cc87a 100644 (file)
@@ -475,7 +475,7 @@ enum bt_component_status ctf_copy_packet_context_field(FILE *err,
        /*
         * Only support for integers for now.
         */
-       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] Unsupported packet context field type\n");
                ret = BT_COMPONENT_STATUS_ERROR;
                goto error;
@@ -593,7 +593,7 @@ struct bt_ctf_field *ctf_copy_packet_context(FILE *err,
                        continue;
                }
 
-               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] Unexpected packet context field type\n");
                        goto error;
                }
index a1298583b32cbcec414ad7a11b4f08a3c5293869..c155e6fff6e0d4d2e000979016f00e615f074115 100644 (file)
@@ -1003,7 +1003,7 @@ enum bt_component_status print_array(struct text_component *text,
 {
        enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
        struct bt_ctf_field_type *array_type = NULL, *field_type = NULL;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
        int64_t len;
        uint64_t i;
        bool is_string = false;
@@ -1024,7 +1024,7 @@ enum bt_component_status print_array(struct text_component *text,
                goto end;
        }
        type_id = bt_ctf_field_type_get_type_id(field_type);
-       if (type_id == BT_CTF_TYPE_ID_INTEGER) {
+       if (type_id == BT_CTF_FIELD_TYPE_ID_INTEGER) {
                enum bt_ctf_string_encoding encoding;
 
                encoding = bt_ctf_field_type_integer_get_encoding(field_type);
@@ -1115,7 +1115,7 @@ enum bt_component_status print_sequence(struct text_component *text,
        enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
        struct bt_ctf_field_type *seq_type = NULL, *field_type = NULL;
        struct bt_ctf_field *length_field = NULL;
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
        uint64_t len;
        uint64_t i;
        bool is_string = false;
@@ -1140,7 +1140,7 @@ enum bt_component_status print_sequence(struct text_component *text,
                goto end;
        }
        type_id = bt_ctf_field_type_get_type_id(field_type);
-       if (type_id == BT_CTF_TYPE_ID_INTEGER) {
+       if (type_id == BT_CTF_FIELD_TYPE_ID_INTEGER) {
                enum bt_ctf_string_encoding encoding;
 
                encoding = bt_ctf_field_type_integer_get_encoding(field_type);
@@ -1261,7 +1261,7 @@ enum bt_component_status print_field(struct text_component *text,
                struct bt_ctf_field *field, bool print_names,
                GQuark *filter_fields, int filter_array_len)
 {
-       enum bt_ctf_type_id type_id;
+       enum bt_ctf_field_type_id type_id;
 
        type_id = bt_ctf_field_get_type_id(field);
        switch (type_id) {
index c485448ec46ffa7e3e209a2266b5ee3f7ebd364e..9d0d814171e5b6054d0a31098a241e4c854a8cc9 100644 (file)
@@ -121,7 +121,7 @@ enum bt_component_status update_packet_context_field(FILE *err,
                        BT_PUT(field);
                        continue;
                }
-               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] Unexpected packet context field type\n");
                        goto error;
                }
index d139b4ffba0fbbd4d60ce73928b9eb081da7e8de..eca6a3108e9ec55d46bee0d3b25be1dca36fa57c 100644 (file)
@@ -1800,10 +1800,10 @@ void type_field_tests()
                "bt_ctf_field_type_get_byte_order handles NULL correctly");
 
        ok(bt_ctf_field_type_get_type_id(NULL) ==
-               BT_CTF_TYPE_ID_UNKNOWN,
+               BT_CTF_FIELD_TYPE_ID_UNKNOWN,
                "bt_ctf_field_type_get_type_id handles NULL correctly");
        ok(bt_ctf_field_type_get_type_id(uint_12_type) ==
-               BT_CTF_TYPE_ID_INTEGER,
+               BT_CTF_FIELD_TYPE_ID_INTEGER,
                "bt_ctf_field_type_get_type_id returns a correct value with an integer type");
 
        ok(bt_ctf_field_type_integer_get_base(NULL) ==
@@ -1840,7 +1840,7 @@ void type_field_tests()
                bt_ctf_field_type_sequence_create(int_16_type, "seq_len");
        ok(sequence_type, "Create a sequence of int16_t type");
        ok(bt_ctf_field_type_get_type_id(sequence_type) ==
-               BT_CTF_TYPE_ID_SEQUENCE,
+               BT_CTF_FIELD_TYPE_ID_SEQUENCE,
                "bt_ctf_field_type_get_type_id returns a correct value with a sequence type");
 
        ok(bt_ctf_field_type_sequence_get_length_field_name(NULL) == NULL,
@@ -1878,7 +1878,7 @@ void type_field_tests()
 
        structure_seq_type = bt_ctf_field_type_structure_create();
        ok(bt_ctf_field_type_get_type_id(structure_seq_type) ==
-               BT_CTF_TYPE_ID_STRUCT,
+               BT_CTF_FIELD_TYPE_ID_STRUCT,
                "bt_ctf_field_type_get_type_id returns a correct value with a structure type");
        ok(structure_seq_type, "Create a structure type");
        ok(bt_ctf_field_type_structure_add_field(structure_seq_type,
@@ -3166,7 +3166,7 @@ int main(int argc, char **argv)
                stream_class);
        ok(ret_field_type,
                "bt_ctf_stream_class_get_event_header_type returns an event header type");
-       ok(bt_ctf_field_type_get_type_id(ret_field_type) == BT_CTF_TYPE_ID_STRUCT,
+       ok(bt_ctf_field_type_get_type_id(ret_field_type) == BT_CTF_FIELD_TYPE_ID_STRUCT,
                "Default event header type is a structure");
        event_header_field_type =
                bt_ctf_field_type_structure_get_field_type_by_name(
@@ -3174,7 +3174,7 @@ int main(int argc, char **argv)
        ok(event_header_field_type,
                "Default event header type contains an \"id\" field");
        ok(bt_ctf_field_type_get_type_id(
-               event_header_field_type) == BT_CTF_TYPE_ID_INTEGER,
+               event_header_field_type) == BT_CTF_FIELD_TYPE_ID_INTEGER,
                "Default event header \"id\" field is an integer");
        bt_put(event_header_field_type);
        event_header_field_type =
@@ -3183,7 +3183,7 @@ int main(int argc, char **argv)
        ok(event_header_field_type,
                "Default event header type contains a \"timestamp\" field");
        ok(bt_ctf_field_type_get_type_id(
-               event_header_field_type) == BT_CTF_TYPE_ID_INTEGER,
+               event_header_field_type) == BT_CTF_FIELD_TYPE_ID_INTEGER,
                "Default event header \"timestamp\" field is an integer");
        bt_put(event_header_field_type);
        bt_put(ret_field_type);
@@ -3194,7 +3194,7 @@ int main(int argc, char **argv)
        packet_header_type = bt_ctf_trace_get_packet_header_type(trace);
        ok(packet_header_type,
                "bt_ctf_trace_get_packet_header_type returns a packet header");
-       ok(bt_ctf_field_type_get_type_id(packet_header_type) == BT_CTF_TYPE_ID_STRUCT,
+       ok(bt_ctf_field_type_get_type_id(packet_header_type) == BT_CTF_FIELD_TYPE_ID_STRUCT,
                "bt_ctf_trace_get_packet_header_type returns a packet header of type struct");
        ret_field_type = bt_ctf_field_type_structure_get_field_type_by_name(
                packet_header_type, "magic");
@@ -3226,7 +3226,7 @@ int main(int argc, char **argv)
        packet_context_type = bt_ctf_stream_class_get_packet_context_type(stream_class);
        ok(packet_context_type,
                "bt_ctf_stream_class_get_packet_context_type returns a packet context type.");
-       ok(bt_ctf_field_type_get_type_id(packet_context_type) == BT_CTF_TYPE_ID_STRUCT,
+       ok(bt_ctf_field_type_get_type_id(packet_context_type) == BT_CTF_FIELD_TYPE_ID_STRUCT,
                "Packet context is a structure");
 
        ok(bt_ctf_stream_class_set_packet_context_type(NULL, packet_context_type),
This page took 0.076448 seconds and 4 git commands to generate.