g_free(field_path);
}
-BT_HIDDEN
struct bt_field_path *bt_field_path_create(void)
{
struct bt_field_path *field_path = NULL;
return field_path;
}
+BT_EXPORT
enum bt_field_path_scope bt_field_path_get_root_scope(
const struct bt_field_path *field_path)
{
return field_path->root;
}
+BT_EXPORT
uint64_t bt_field_path_get_item_count(const struct bt_field_path *field_path)
{
BT_ASSERT_PRE_DEV_FP_NON_NULL(field_path);
return (uint64_t) field_path->items->len;
}
+BT_EXPORT
const struct bt_field_path_item *bt_field_path_borrow_item_by_index_const(
const struct bt_field_path *field_path, uint64_t index)
{
return bt_field_path_borrow_item_by_index_inline(field_path, index);
}
+BT_EXPORT
enum bt_field_path_item_type bt_field_path_item_get_type(
const struct bt_field_path_item *field_path_item)
{
- BT_ASSERT_PRE_DEV_NON_NULL(field_path_item, "Field path item");
+ BT_ASSERT_PRE_DEV_NON_NULL("field-path-item", field_path_item,
+ "Field path item");
return field_path_item->type;
}
+BT_EXPORT
uint64_t bt_field_path_item_index_get_index(
const struct bt_field_path_item *field_path_item)
{
- BT_ASSERT_PRE_DEV_NON_NULL(field_path_item, "Field path item");
- BT_ASSERT_PRE_DEV(field_path_item->type == BT_FIELD_PATH_ITEM_TYPE_INDEX,
+ BT_ASSERT_PRE_DEV_NON_NULL("field-path-item", field_path_item,
+ "Field path item");
+ BT_ASSERT_PRE_DEV("is-index-field-path-item",
+ field_path_item->type == BT_FIELD_PATH_ITEM_TYPE_INDEX,
"Field path item is not an index field path item: "
"addr=%p, type=%s", field_path_item,
bt_field_path_item_type_string(field_path_item->type));
return field_path_item->index;
}
+BT_EXPORT
void bt_field_path_get_ref(const struct bt_field_path *field_path)
{
bt_object_get_ref(field_path);
}
+BT_EXPORT
void bt_field_path_put_ref(const struct bt_field_path *field_path)
{
bt_object_put_ref(field_path);