Standardize *get_*() functions
[babeltrace.git] / include / babeltrace / ctf-ir / fields.h
index 5120d9e41739f665335c4947311c8112a0b41a1f..5a030b356e7d4454b32c7c0d892291c3016b3dc5 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <stdint.h>
 #include <stddef.h>
+#include <babeltrace/ctf-ir/field-types.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -93,7 +94,7 @@ name within a @structfield with bt_ctf_field_structure_set_field().
 
 You can get a reference to the @ft which was used to create a field with
 bt_ctf_field_get_type(). You can get the
-\link #bt_ctf_type_id type ID\endlink of this field type directly with
+\link #bt_ctf_field_type_id type ID\endlink of this field type directly with
 bt_ctf_field_get_type_id().
 
 You can get a deep copy of a field with bt_ctf_field_copy(). The field
@@ -187,12 +188,12 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type(
 @param[in] field       Field of which to get the type ID of its
                        parent field type..
 @returns               Type ID of the parent field type of \p field,
-                       or #BT_CTF_TYPE_ID_UNKNOWN on error.
+                       or #BT_CTF_FIELD_TYPE_ID_UNKNOWN on error.
 
 @prenotnull{field}
 @postrefcountsame{field}
 
-@sa #bt_ctf_type_id: CTF IR field type ID.
+@sa #bt_ctf_field_type_id: CTF IR field type ID.
 @sa bt_ctf_field_is_integer(): Returns whether or not a given field is a
        @intfield.
 @sa bt_ctf_field_is_floating_point(): Returns whether or not a given
@@ -210,7 +211,7 @@ extern struct bt_ctf_field_type *bt_ctf_field_get_type(
 @sa bt_ctf_field_is_variant(): Returns whether or not a given field is a
        @varfield.
 */
-extern enum bt_ctf_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field);
+extern enum bt_ctf_field_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field);
 
 /*
  * bt_ctf_field_signed_integer_get_value: get a signed integer field's value
@@ -862,9 +863,12 @@ exist.
 @sa bt_ctf_field_structure_set_field(): Sets the field of a given
        structure field.
 */
-extern struct bt_ctf_field *bt_ctf_field_structure_get_field(
+extern struct bt_ctf_field *bt_ctf_field_structure_get_field_by_name(
                struct bt_ctf_field *struct_field, const char *name);
 
+/* Pre-2.0 CTF writer compatibility */
+#define bt_ctf_field_structure_get_field bt_ctf_field_structure_get_field_by_name
+
 /**
 @brief  Returns the @field at index \p index in the @structfield
        \p struct_field.
@@ -889,7 +893,7 @@ extern struct bt_ctf_field *bt_ctf_field_structure_get_field(
        structure field.
 */
 extern struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index(
-               struct bt_ctf_field *struct_field, int index);
+               struct bt_ctf_field *struct_field, uint64_t index);
 
 /**
 @brief Sets the field of the @structfield \p struct_field named \p name
This page took 0.023807 seconds and 4 git commands to generate.