-#ifndef BABELTRACE_CTF_IR_FIELD_PATH
-#define BABELTRACE_CTF_IR_FIELD_PATH
+#ifndef BABELTRACE_CTF_IR_FIELD_PATH_H
+#define BABELTRACE_CTF_IR_FIELD_PATH_H
/*
* BabelTrace - CTF IR: Field path
*
- * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
+ * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* http://www.efficios.com/ctf
*/
-#include <babeltrace/ctf-ir/event-types.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_ctf_field_path;
+struct bt_field_path;
-/*
- * bt_ctf_field_path_get_root_scope: get the root node of a field path.
- *
- * Get the field path's root node.
- *
- * @param field_path Field path.
- *
- * Returns the root node of a field path, or BT_CTF_SCOPE_UNKNOWN on error.
- */
-extern enum bt_ctf_scope bt_ctf_field_path_get_root_scope(
- const struct bt_ctf_field_path *field_path);
+enum bt_scope {
+ BT_SCOPE_PACKET_HEADER,
+ BT_SCOPE_PACKET_CONTEXT,
+ BT_SCOPE_EVENT_HEADER,
+ BT_SCOPE_EVENT_COMMON_CONTEXT,
+ BT_SCOPE_EVENT_SPECIFIC_CONTEXT,
+ BT_SCOPE_EVENT_PAYLOAD,
+};
-/*
- * bt_ctf_field_path_get_index_count: get the number of indexes of a field path.
- *
- * Get the number of indexes of a field path.
- *
- * @param field_path Field path.
- *
- * Returns the field path's index count, or a negative value on error.
- */
-extern int bt_ctf_field_path_get_index_count(
- const struct bt_ctf_field_path *field_path);
+extern enum bt_scope bt_field_path_get_root_scope(
+ struct bt_field_path *field_path);
-/*
- * bt_ctf_field_path_get_index: get the field path's index at a specific index.
- *
- * Get the field path's index at a specific index.
- *
- * @param field_path Field path.
- * @param index Index.
- *
- * Returns a field path index, or INT_MIN on error.
- */
-extern int bt_ctf_field_path_get_index(
- const struct bt_ctf_field_path *field_path,
- int index);
+extern uint64_t bt_field_path_get_index_count(
+ struct bt_field_path *field_path);
+
+extern uint64_t bt_field_path_get_index_by_index(
+ struct bt_field_path *field_path, uint64_t index);
#ifdef __cplusplus
}
#endif
-#endif /* BABELTRACE_CTF_IR_FIELD_PATH */
+#endif /* BABELTRACE_CTF_IR_FIELD_PATH_H */