ir: add bt_ctf_field_type_structure_get_field_name_index()
[babeltrace.git] / include / babeltrace / ctf-ir / event-types-internal.h
index 8d0477b5785ee76a56a54798c8cb33a7bd2b0128..a5057e207b5cab8583781814389e0156f0a0407d 100644 (file)
 #include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/ctf-writer/event-fields.h>
 #include <babeltrace/ctf-writer/writer.h>
-#include <babeltrace/ctf-writer/writer-internal.h>
+#include <babeltrace/ctf-ir/trace-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/types.h>
 #include <babeltrace/ctf/events.h>
 #include <glib.h>
 
-typedef void(*type_freeze_func)(struct bt_ctf_field_type *);
-typedef int(*type_serialize_func)(struct bt_ctf_field_type *,
+typedef void (*type_freeze_func)(struct bt_ctf_field_type *);
+typedef int (*type_serialize_func)(struct bt_ctf_field_type *,
                struct metadata_context *);
 
 struct bt_ctf_field_type {
@@ -56,6 +56,7 @@ struct bt_ctf_field_type {
 struct bt_ctf_field_type_integer {
        struct bt_ctf_field_type parent;
        struct declaration_integer declaration;
+       struct bt_ctf_clock *mapped_clock;
 };
 
 struct enumeration_mapping {
@@ -95,7 +96,7 @@ struct bt_ctf_field_type_structure {
        struct bt_ctf_field_type parent;
        GHashTable *field_name_to_index;
        GPtrArray *fields; /* Array of pointers to struct structure_field */
-       struct declaration_enum declaration;
+       struct declaration_struct declaration;
 };
 
 struct bt_ctf_field_type_variant {
@@ -154,4 +155,18 @@ const char *bt_ctf_field_type_enumeration_get_mapping_name_signed(
                struct bt_ctf_field_type_enumeration *enumeration_type,
                int64_t value);
 
+/* Override field type's byte order only if it is set to "native" */
+BT_HIDDEN
+void bt_ctf_field_type_set_native_byte_order(
+               struct bt_ctf_field_type *type, int byte_order);
+
+/* Deep copy a field type */
+BT_HIDDEN
+struct bt_ctf_field_type *bt_ctf_field_type_copy(
+               struct bt_ctf_field_type *type);
+
+
+BT_HIDDEN
+int bt_ctf_field_type_structure_get_field_name_index(
+               struct bt_ctf_field_type *structure, const char *name);
 #endif /* BABELTRACE_CTF_IR_EVENT_TYPES_INTERNAL_H */
This page took 0.024295 seconds and 4 git commands to generate.