-GQuark enum_uint_to_quark(const struct type_class_enum *enum_class, uint64_t v);
-GQuark enum_int_to_quark(const struct type_class_enum *enum_class, uint64_t v);
-uint64_t enum_quark_to_uint(const struct type_class_enum *enum_class,
- GQuark q);
-int64_t enum_quark_to_int(const struct type_class_enum *enum_class,
- GQuark q);
-void enum_signed_insert(struct type_class_enum *enum_class,
- int64_t v, GQuark q);
-void enum_unsigned_insert(struct type_class_enum *enum_class,
- uint64_t v, GQuark q);
-
-struct type_class_enum *enum_type_new(const char *name,
- size_t len, int byte_order,
- int signedness,
- size_t alignment);
-void enum_type_free(struct type_class_enum *enum_class);
-
-struct type_class_struct *struct_type_new(const char *name);
-void struct_type_free(struct type_class_struct *struct_class);
-void struct_type_add_field(struct type_class_struct *struct_class,
- const char *field_name,
- struct type_class *type_class);
+
+/*
+ * Returns a GArray of GQuark or NULL.
+ * Caller must release the GArray with g_array_unref().
+ */
+GArray *bt_enum_uint_to_quark_set(const struct declaration_enum *enum_declaration,
+ uint64_t v);
+
+/*
+ * Returns a GArray of GQuark or NULL.
+ * Caller must release the GArray with g_array_unref().
+ */
+GArray *bt_enum_int_to_quark_set(const struct declaration_enum *enum_declaration,
+ int64_t v);
+
+/*
+ * Returns a GArray of struct enum_range or NULL.
+ * Callers do _not_ own the returned GArray (and therefore _don't_ need to
+ * release it).
+ */
+GArray *bt_enum_quark_to_range_set(const struct declaration_enum *enum_declaration,
+ GQuark q);
+void bt_enum_signed_insert(struct declaration_enum *enum_declaration,
+ int64_t start, int64_t end, GQuark q);
+void bt_enum_unsigned_insert(struct declaration_enum *enum_declaration,
+ uint64_t start, uint64_t end, GQuark q);
+size_t bt_enum_get_nr_enumerators(struct declaration_enum *enum_declaration);
+
+struct declaration_enum *
+ bt_enum_declaration_new(struct declaration_integer *integer_declaration);
+
+struct declaration_string *
+ bt_string_declaration_new(enum ctf_string_encoding encoding);
+char *bt_get_string(const struct bt_definition *field);
+enum ctf_string_encoding bt_get_string_encoding(const struct bt_definition *field);
+
+double bt_get_float(const struct bt_definition *field);
+
+const struct bt_definition *bt_get_variant_field(struct bt_definition *definition);
+
+struct declaration_struct *
+ bt_struct_declaration_new(struct declaration_scope *parent_scope,
+ uint64_t min_align);
+void bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
+ const char *field_name,
+ struct bt_declaration *field_declaration);