- new_definition_scope(struct definition_scope *parent_scope,
- GQuark field_name);
-void set_dynamic_definition_scope(struct definition *definition,
- struct definition_scope *scope,
- const char *root_name);
-void free_definition_scope(struct definition_scope *scope);
-
-void declaration_ref(struct declaration *declaration);
-void declaration_unref(struct declaration *declaration);
-
-void definition_ref(struct definition *definition);
-void definition_unref(struct definition *definition);
-
-struct declaration_integer *integer_declaration_new(size_t len, int byte_order,
- int signedness, size_t alignment);
+ bt_new_definition_scope(struct definition_scope *parent_scope,
+ GQuark field_name, const char *root_name);
+void bt_free_definition_scope(struct definition_scope *scope);
+
+GQuark bt_new_definition_path(struct definition_scope *parent_scope,
+ GQuark field_name, const char *root_name);
+
+static inline
+int compare_definition_path(struct bt_definition *definition, GQuark path)
+{
+ return definition->path == path;
+}
+
+void bt_declaration_ref(struct bt_declaration *declaration);
+void bt_declaration_unref(struct bt_declaration *declaration);
+
+void bt_definition_ref(struct bt_definition *definition);
+void bt_definition_unref(struct bt_definition *definition);
+
+struct declaration_integer *bt_integer_declaration_new(size_t len, int byte_order,
+ int signedness, size_t alignment,
+ int base, enum ctf_string_encoding encoding,
+ struct ctf_clock *clock);
+uint64_t bt_get_unsigned_int(const struct bt_definition *field);
+int64_t bt_get_signed_int(const struct bt_definition *field);
+int bt_get_int_signedness(const struct bt_definition *field);
+int bt_get_int_byte_order(const struct bt_definition *field);
+int bt_get_int_base(const struct bt_definition *field);
+size_t bt_get_int_len(const struct bt_definition *field); /* in bits */
+enum ctf_string_encoding bt_get_int_encoding(const struct bt_definition *field);