Values API: standardize function names
[babeltrace.git] / include / babeltrace / values.h
index b0544ec23937d46436eed21caeb86f972ab1754b..5139773c922fecc226d7c7fd4022e9fa39c8e025 100644 (file)
  */
 
 #include <stdint.h>
-#include <stdbool.h>
 #include <stddef.h>
+
+/* For bt_bool */
+#include <babeltrace/types.h>
+
+/* For bt_get() */
 #include <babeltrace/ref.h>
 
 #ifdef __cplusplus
@@ -59,8 +63,8 @@ functions documented here, you can create and modify:
 
 As with any Babeltrace object, value objects have
 <a href="https://en.wikipedia.org/wiki/Reference_counting">reference
-counts</a>. When you \link bt_value_array_append() append a value object
-to an array value object\endlink, or when you \link bt_value_map_insert()
+counts</a>. When you \link bt_value_array_append_element() append a value object
+to an array value object\endlink, or when you \link bt_value_map_insert_entry()
 insert a value object into a map value object\endlink, its reference
 count is incremented, as well as when you get a value object back from
 those objects. See \ref refs to learn more about the reference counting
@@ -72,14 +76,6 @@ values of #bt_value_status.
 You can create a deep copy of any value object with bt_value_copy(). You
 can compare two value objects with bt_value_compare().
 
-You can \em freeze a value object with bt_value_freeze(). You can get
-the raw value of a frozen value object, but you cannot modify it.
-Reference counting still works on frozen value objects. You can copy
-a frozen value object: the returned copy is not frozen. You can also
-compare a frozen value object to another value object (frozen or not).
-Freezing a value object is typically used to make it immutable after
-it's built by its initial owner.
-
 The following matrix shows some categorized value object functions
 to use for each value object type:
 
@@ -136,14 +132,14 @@ to use for each value object type:
     <td>bt_value_array_create()
     <td>bt_value_is_array()
     <td>bt_value_array_get()
-    <td>bt_value_array_append()<br>
-        bt_value_array_append_bool()<br>
-        bt_value_array_append_integer()<br>
-        bt_value_array_append_float()<br>
-        bt_value_array_append_string()<br>
-        bt_value_array_append_empty_array()<br>
-        bt_value_array_append_empty_map()<br>
-        bt_value_array_set()
+    <td>bt_value_array_append_element()<br>
+        bt_value_array_append_bool_element()<br>
+        bt_value_array_append_integer_element()<br>
+        bt_value_array_append_element_float()<br>
+        bt_value_array_append_string_element()<br>
+        bt_value_array_append_empty_array_element()<br>
+        bt_value_array_append_empty_map_element()<br>
+        bt_value_array_set_element_by_index()
   </tr>
   <tr>
     <th>Map
@@ -151,14 +147,14 @@ to use for each value object type:
         bt_value_map_extend()
     <td>bt_value_is_map()
     <td>bt_value_map_get()<br>
-        bt_value_map_foreach()
-    <td>bt_value_map_insert()<br>
-        bt_value_map_insert_bool()<br>
-        bt_value_map_insert_integer()<br>
-        bt_value_map_insert_float()<br>
-        bt_value_map_insert_string()<br>
-        bt_value_map_insert_empty_array()<br>
-        bt_value_map_insert_empty_map()
+        bt_value_map_foreach_entry()
+    <td>bt_value_map_insert_entry()<br>
+        bt_value_map_insert_bool_entry()<br>
+        bt_value_map_insert_integer_entry()<br>
+        bt_value_map_insert_float_entry()<br>
+        bt_value_map_insert_string_entry()<br>
+        bt_value_map_insert_empty_array_entry()<br>
+        bt_value_map_insert_empty_map_entry()
   </tr>
 </table>
 
@@ -174,11 +170,8 @@ to use for each value object type:
 @brief Status codes.
 */
 enum bt_value_status {
-       /// Value object cannot be altered because it's frozen.
-       BT_VALUE_STATUS_FROZEN =        -4,
-
-       /// Operation cancelled.
-       BT_VALUE_STATUS_CANCELLED =     -3,
+       /// Operation canceled.
+       BT_VALUE_STATUS_CANCELED =      -3,
 
        /* -22 for compatibility with -EINVAL */
        /// Invalid argument.
@@ -229,20 +222,17 @@ extern struct bt_value *bt_value_null;
 @brief Value object type.
 */
 enum bt_value_type {
-       /// Unknown value object, used as an error code.
-       BT_VALUE_TYPE_UNKNOWN =         -1,
-
        /// Null value object.
        BT_VALUE_TYPE_NULL =            0,
 
-       /// Boolean value object (holds \c true or \c false).
+       /// Boolean value object (holds #BT_TRUE or #BT_FALSE).
        BT_VALUE_TYPE_BOOL =            1,
 
        /// Integer value object (holds a signed 64-bit integer raw value).
        BT_VALUE_TYPE_INTEGER =         2,
 
        /// Floating point number value object (holds a \c double raw value).
-       BT_VALUE_TYPE_FLOAT =           3,
+       BT_VALUE_TYPE_REAL =            3,
 
        /// String value object.
        BT_VALUE_TYPE_STRING =          4,
@@ -292,7 +282,7 @@ An alternative to calling this function is to directly compare the value
 object pointer to the \ref bt_value_null variable.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is the null value object.
+@returns               #BT_TRUE if \p object is the null value object.
 
 @prenotnull{object}
 @postrefcountsame{object}
@@ -300,7 +290,7 @@ object pointer to the \ref bt_value_null variable.
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_null(const struct bt_value *object)
+bt_bool bt_value_is_null(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_NULL;
 }
@@ -310,7 +300,7 @@ bool bt_value_is_null(const struct bt_value *object)
        value object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is a boolean value object.
+@returns               #BT_TRUE if \p object is a boolean value object.
 
 @prenotnull{object}
 @postrefcountsame{object}
@@ -318,7 +308,7 @@ bool bt_value_is_null(const struct bt_value *object)
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_bool(const struct bt_value *object)
+bt_bool bt_value_is_bool(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_BOOL;
 }
@@ -328,12 +318,12 @@ bool bt_value_is_bool(const struct bt_value *object)
        value object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is an integer value object.
+@returns               #BT_TRUE if \p object is an integer value object.
 
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_integer(const struct bt_value *object)
+bt_bool bt_value_is_integer(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_INTEGER;
 }
@@ -343,7 +333,7 @@ bool bt_value_is_integer(const struct bt_value *object)
        point number value object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is a floating point
+@returns               #BT_TRUE if \p object is a floating point
                        number value object.
 
 @prenotnull{object}
@@ -352,9 +342,9 @@ bool bt_value_is_integer(const struct bt_value *object)
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_float(const struct bt_value *object)
+bt_bool bt_value_is_real(const struct bt_value *object)
 {
-       return bt_value_get_type(object) == BT_VALUE_TYPE_FLOAT;
+       return bt_value_get_type(object) == BT_VALUE_TYPE_REAL;
 }
 
 /**
@@ -362,7 +352,7 @@ bool bt_value_is_float(const struct bt_value *object)
        value object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is a string value object.
+@returns               #BT_TRUE if \p object is a string value object.
 
 @prenotnull{object}
 @postrefcountsame{object}
@@ -370,7 +360,7 @@ bool bt_value_is_float(const struct bt_value *object)
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_string(const struct bt_value *object)
+bt_bool bt_value_is_string(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_STRING;
 }
@@ -380,7 +370,7 @@ bool bt_value_is_string(const struct bt_value *object)
        value object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is an array value object.
+@returns               #BT_TRUE if \p object is an array value object.
 
 @prenotnull{object}
 @postrefcountsame{object}
@@ -388,7 +378,7 @@ bool bt_value_is_string(const struct bt_value *object)
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_array(const struct bt_value *object)
+bt_bool bt_value_is_array(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_ARRAY;
 }
@@ -398,7 +388,7 @@ bool bt_value_is_array(const struct bt_value *object)
        object.
 
 @param[in] object      Value object to check.
-@returns               \c true if \p object is a map value object.
+@returns               #BT_TRUE if \p object is a map value object.
 
 @prenotnull{object}
 @postrefcountsame{object}
@@ -406,7 +396,7 @@ bool bt_value_is_array(const struct bt_value *object)
 @sa bt_value_get_type(): Returns the type of a given value object.
 */
 static inline
-bool bt_value_is_map(const struct bt_value *object)
+bt_bool bt_value_is_map(const struct bt_value *object)
 {
        return bt_value_get_type(object) == BT_VALUE_TYPE_MAP;
 }
@@ -418,46 +408,6 @@ bool bt_value_is_map(const struct bt_value *object)
 @{
 */
 
-/**
-@brief Recursively freezes the value object \p object.
-
-You cannot modify a frozen value object: it is considered immutable.
-Reference counting still works on a frozen value object, however: you
-can pass a frozen value object to bt_get() and bt_put().
-
-If \p object is an array value object or a map value object, this
-function also freezes all its children recursively.
-
-Freezing a value object is typically used to make it immutable after
-it's built by its initial owner.
-
-@param[in] object      Value object to freeze.
-@returns               Status code. If \p object
-                       is already frozen, however, #BT_VALUE_STATUS_OK
-                       is returned anyway (that is, this function never
-                       returns #BT_VALUE_STATUS_FROZEN).
-
-@prenotnull{object}
-@postrefcountsame{object}
-@post <strong>On success</strong>, \p object and all its children
-       are frozen.
-
-@sa bt_value_is_frozen(): Returns whether or not a value object is
-       frozen.
-*/
-extern enum bt_value_status bt_value_freeze(struct bt_value *object);
-
-/**
-@brief Returns whether or not the value object \p object is frozen.
-
-@param[in] object      Value object to check.
-@returns               \c true if \p object is frozen.
-
-@prenotnull{object}
-@postrefcountsame{object}
-*/
-extern bool bt_value_is_frozen(const struct bt_value *object);
-
 /**
 @brief Creates a \em deep copy of the value object \p object.
 
@@ -477,19 +427,19 @@ extern struct bt_value *bt_value_copy(const struct bt_value *object);
 
 /**
 @brief Recursively compares the value objects \p object_a and
-       \p object_b and returns \c true if they have the same
+       \p object_b and returns #BT_TRUE if they have the same
        \em content (raw values).
 
 @param[in] object_a    Value object A to compare to \p object_b.
 @param[in] object_b    Value object B to compare to \p object_a.
-@returns               \c true if \p object_a and \p object_b have the
-                       same \em content, or \c false if they differ
+@returns               #BT_TRUE if \p object_a and \p object_b have the
+                       same \em content, or #BT_FALSE if they differ
                        or on error.
 
 @postrefcountsame{object_a}
 @postrefcountsame{object_b}
 */
-extern bool bt_value_compare(const struct bt_value *object_a,
+extern bt_bool bt_value_compare(const struct bt_value *object_a,
                const struct bt_value *object_b);
 
 /** @} */
@@ -502,7 +452,7 @@ extern bool bt_value_compare(const struct bt_value *object_a,
 /**
 @brief Creates a default boolean value object.
 
-The created boolean value object's initial raw value is \c false.
+The created boolean value object's initial raw value is #BT_FALSE.
 
 @returns       Created boolean value object on success, or \c NULL
                on error.
@@ -526,7 +476,7 @@ extern struct bt_value *bt_value_bool_create(void);
 
 @sa bt_value_bool_create(): Creates a default boolean value object.
 */
-extern struct bt_value *bt_value_bool_create_init(bool val);
+extern struct bt_value *bt_value_bool_create_init(bt_bool val);
 
 /**
 @brief Returns the boolean raw value of the boolean value object
@@ -545,7 +495,7 @@ extern struct bt_value *bt_value_bool_create_init(bool val);
 @sa bt_value_bool_set(): Sets the raw value of a boolean value object.
 */
 extern enum bt_value_status bt_value_bool_get(
-               const struct bt_value *bool_obj, bool *val);
+               const struct bt_value *bool_obj, bt_bool *val);
 
 /**
 @brief Sets the boolean raw value of the boolean value object
@@ -565,7 +515,7 @@ extern enum bt_value_status bt_value_bool_get(
        value object.
 */
 extern enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj,
-               bool val);
+               bt_bool val);
 
 /** @} */
 
@@ -664,7 +614,7 @@ The created floating point number value object's initial raw value is 0.
 @sa bt_value_float_create_init(): Creates an initialized floating
        point number value object.
 */
-extern struct bt_value *bt_value_float_create(void);
+extern struct bt_value *bt_value_real_create(void);
 
 /**
 @brief Creates a floating point number value object with its initial raw
@@ -679,7 +629,7 @@ extern struct bt_value *bt_value_float_create(void);
 @sa bt_value_float_create(): Creates a default floating point number
        value object.
 */
-extern struct bt_value *bt_value_float_create_init(double val);
+extern struct bt_value *bt_value_real_create_init(double val);
 
 /**
 @brief Returns the floating point number raw value of the floating point
@@ -698,8 +648,8 @@ extern struct bt_value *bt_value_float_create_init(double val);
 @sa bt_value_float_set(): Sets the raw value of a given floating
        point number value object.
 */
-extern enum bt_value_status bt_value_float_get(
-               const struct bt_value *float_obj, double *val);
+extern enum bt_value_status bt_value_real_get(
+               const struct bt_value *real_obj, double *val);
 
 /**
 @brief Sets the floating point number raw value of the floating point
@@ -718,8 +668,8 @@ extern enum bt_value_status bt_value_float_get(
 @sa bt_value_float_get(): Returns the raw value of a floating point
        number value object.
 */
-extern enum bt_value_status bt_value_float_set(
-               struct bt_value *float_obj, double val);
+extern enum bt_value_status bt_value_real_set(
+               struct bt_value *real_obj, double val);
 
 /** @} */
 
@@ -843,43 +793,26 @@ extern struct bt_value *bt_value_array_create(void);
 @sa bt_value_array_is_empty(): Checks whether or not a given array
        value object is empty.
 */
-extern int64_t bt_value_array_size(const struct bt_value *array_obj);
+extern int64_t bt_value_array_get_size(const struct bt_value *array_obj);
 
 /**
 @brief Checks whether or not the array value object \p array_obj
        is empty.
 
 @param[in] array_obj   Array value object to check.
-@returns               \c true if \p array_obj is empty.
+@returns               #BT_TRUE if \p array_obj is empty.
 
 @prenotnull{array_obj}
 @pre \p array_obj is an array value object.
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_size(): Returns the size of a given array value
+@sa bt_value_array_get_size(): Returns the size of a given array value
        object.
 */
-extern bool bt_value_array_is_empty(const struct bt_value *array_obj);
+extern bt_bool bt_value_array_is_empty(const struct bt_value *array_obj);
 
-/**
-@brief Returns the value object contained in the array value object
-       \p array_obj at the index \p index.
-
-@param[in] array_obj   Array value object of which to get an element.
-@param[in] index       Index of value object to get.
-@returns               Value object at index \p index on
-                       success, or \c NULL on error.
-
-@prenotnull{array_obj}
-@pre \p array_obj is an array value object.
-@pre \p index is lesser than the size of \p array_obj (see
-       bt_value_array_size()).
-@post <strong>On success, if the returned value object is not
-       \ref bt_value_null</strong>, its reference count is incremented.
-@postrefcountsame{array_obj}
-*/
-extern struct bt_value *bt_value_array_get(const struct bt_value *array_obj,
-               uint64_t index);
+extern struct bt_value *bt_value_array_borrow_element_by_index(
+               const struct bt_value *array_obj, uint64_t index);
 
 /**
 @brief Appends the value object \p element_obj to the array value
@@ -898,21 +831,21 @@ extern struct bt_value *bt_value_array_get(const struct bt_value *array_obj,
        \ref bt_value_null</strong>, its reference count is incremented.
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append_bool(): Appends a boolean raw value to a
+@sa bt_value_array_append_bool_element(): Appends a boolean raw value to a
        given array value object.
-@sa bt_value_array_append_integer(): Appends an integer raw value
+@sa bt_value_array_append_integer_element(): Appends an integer raw value
        to a given array value object.
-@sa bt_value_array_append_float(): Appends a floating point number
+@sa bt_value_array_append_element_float(): Appends a floating point number
        raw value to a given array value object.
-@sa bt_value_array_append_string(): Appends a string raw value to a
+@sa bt_value_array_append_string_element(): Appends a string raw value to a
        given array value object.
-@sa bt_value_array_append_empty_array(): Appends an empty array value
+@sa bt_value_array_append_empty_array_element(): Appends an empty array value
        object to a given array value object.
-@sa bt_value_array_append_empty_map(): Appends an empty map value
+@sa bt_value_array_append_empty_map_element(): Appends an empty map value
        object to a given array value object.
 */
-extern enum bt_value_status bt_value_array_append(struct bt_value *array_obj,
-               struct bt_value *element_obj);
+extern enum bt_value_status bt_value_array_append_element(
+               struct bt_value *array_obj, struct bt_value *element_obj);
 
 /**
 @brief Appends the boolean raw value \p val to the array value object
@@ -930,11 +863,11 @@ value object before appending it.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_bool(
-               struct bt_value *array_obj, bool val);
+extern enum bt_value_status bt_value_array_append_bool_element(
+               struct bt_value *array_obj, bt_bool val);
 
 /**
 @brief Appends the integer raw value \p val to the array value object
@@ -952,10 +885,10 @@ value object before appending it.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_integer(
+extern enum bt_value_status bt_value_array_append_integer_element(
                struct bt_value *array_obj, int64_t val);
 
 /**
@@ -975,10 +908,10 @@ point number value object before appending it.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_float(
+extern enum bt_value_status bt_value_array_append_real_element(
                struct bt_value *array_obj, double val);
 
 /**
@@ -1001,10 +934,10 @@ On success, \p val is copied.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_string(
+extern enum bt_value_status bt_value_array_append_string_element(
                struct bt_value *array_obj, const char *val);
 
 /**
@@ -1023,10 +956,10 @@ object before appending it.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_empty_array(
+extern enum bt_value_status bt_value_array_append_empty_array_element(
                struct bt_value *array_obj);
 
 /**
@@ -1045,10 +978,10 @@ object before appending it.
 @prehot{array_obj}
 @postrefcountsame{array_obj}
 
-@sa bt_value_array_append(): Appends a value object to a given
+@sa bt_value_array_append_element(): Appends a value object to a given
        array value object.
 */
-extern enum bt_value_status bt_value_array_append_empty_map(
+extern enum bt_value_status bt_value_array_append_empty_map_element(
                struct bt_value *array_obj);
 
 /**
@@ -1067,7 +1000,7 @@ extern enum bt_value_status bt_value_array_append_empty_map(
 @prenotnull{element_obj}
 @pre \p array_obj is an array value object.
 @pre \p index is lesser than the size of \p array_obj (see
-       bt_value_array_size()).
+       bt_value_array_get_size()).
 @prehot{array_obj}
 @post <strong>On success, if the replaced value object is not
        \ref bt_value_null</strong>, its reference count is decremented.
@@ -1075,8 +1008,9 @@ extern enum bt_value_status bt_value_array_append_empty_map(
        \ref bt_value_null</strong>, its reference count is incremented.
 @postrefcountsame{array_obj}
 */
-extern enum bt_value_status bt_value_array_set(struct bt_value *array_obj,
-               uint64_t index, struct bt_value *element_obj);
+extern enum bt_value_status bt_value_array_set_element_by_index(
+               struct bt_value *array_obj, uint64_t index,
+               struct bt_value *element_obj);
 
 /** @} */
 
@@ -1111,61 +1045,45 @@ extern struct bt_value *bt_value_map_create(void);
 @sa bt_value_map_is_empty(): Checks whether or not a given map value
        object is empty.
 */
-extern int64_t bt_value_map_size(const struct bt_value *map_obj);
+extern int64_t bt_value_map_get_size(const struct bt_value *map_obj);
 
 /**
 @brief Checks whether or not the map value object \p map_obj is empty.
 
 @param[in] map_obj     Map value object to check.
-@returns               \c true if \p map_obj is empty.
+@returns               #BT_TRUE if \p map_obj is empty.
 
 @prenotnull{map_obj}
 @pre \p map_obj is a map value object.
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_size(): Returns the size of a given map value object.
+@sa bt_value_map_get_size(): Returns the size of a given map value object.
 */
-extern bool bt_value_map_is_empty(const struct bt_value *map_obj);
+extern bt_bool bt_value_map_is_empty(const struct bt_value *map_obj);
 
-/**
-@brief Returns the value object associated with the key \p key within
-       the map value object \p map_obj.
-
-@param[in] map_obj     Map value object of which to get an entry.
-@param[in] key         Key of the value object to get.
-@returns               Value object associated with the key \p key
-                       on success, or \c NULL on error.
-
-@prenotnull{map_obj}
-@prenotnull{key}
-@pre \p map_obj is a map value object.
-@postrefcountsame{map_obj}
-@post <strong>On success, if the returned value object is not
-       \ref bt_value_null</strong>, its reference count is incremented.
-*/
-extern struct bt_value *bt_value_map_get(const struct bt_value *map_obj,
-               const char *key);
+extern struct bt_value *bt_value_map_borrow_entry_value(
+               const struct bt_value *map_obj, const char *key);
 
 /**
-@brief User function type to use with bt_value_map_foreach().
+@brief User function type to use with bt_value_map_foreach_entry().
 
 \p object is a <em>weak reference</em>: you \em must pass it to bt_get()
 if you need to keep a reference after this function returns.
 
-This function \em must return \c true to continue the map value object
-traversal, or \c false to break it.
+This function \em must return #BT_TRUE to continue the map value object
+traversal, or #BT_FALSE to break it.
 
 @param[in] key         Key of map entry.
 @param[in] object      Value object of map entry (weak reference).
 @param[in] data                User data.
-@returns               \c true to continue the loop, or \c false to break it.
+@returns               #BT_TRUE to continue the loop, or #BT_FALSE to break it.
 
 @prenotnull{key}
 @prenotnull{object}
 @post The reference count of \p object is not lesser than what it is
        when the function is called.
 */
-typedef bool (* bt_value_map_foreach_cb)(const char *key,
+typedef bt_bool (* bt_value_map_foreach_entry_cb)(const char *key,
        struct bt_value *object, void *data);
 
 /**
@@ -1179,15 +1097,15 @@ reference after the user function returns.
 The key passed to the user function is only valid in the scope of
 this user function call.
 
-The user function \em must return \c true to continue the traversal of
-\p map_obj, or \c false to break it.
+The user function \em must return #BT_TRUE to continue the traversal of
+\p map_obj, or #BT_FALSE to break it.
 
 @param[in] map_obj     Map value object on which to iterate.
 @param[in] cb          User function to call back.
 @param[in] data                User data passed to the user function.
 @returns               Status code. More
-                       specifically, #BT_VALUE_STATUS_CANCELLED is
-                       returned if the loop was cancelled by the user
+                       specifically, #BT_VALUE_STATUS_CANCELED is
+                       returned if the loop was canceled by the user
                        function.
 
 @prenotnull{map_obj}
@@ -1195,9 +1113,9 @@ The user function \em must return \c true to continue the traversal of
 @pre \p map_obj is a map value object.
 @postrefcountsame{map_obj}
 */
-extern enum bt_value_status bt_value_map_foreach(
-               const struct bt_value *map_obj, bt_value_map_foreach_cb cb,
-               void *data);
+extern enum bt_value_status bt_value_map_foreach_entry(
+               const struct bt_value *map_obj,
+               bt_value_map_foreach_entry_cb cb, void *data);
 
 /**
 @brief Returns whether or not the map value object \p map_obj contains
@@ -1205,8 +1123,8 @@ extern enum bt_value_status bt_value_map_foreach(
 
 @param[in] map_obj     Map value object to check.
 @param[in] key         Key to check.
-@returns               \c true if \p map_obj has an entry mapped to the
-                       key \p key, or \c false if it does not or
+@returns               #BT_TRUE if \p map_obj has an entry mapped to the
+                       key \p key, or #BT_FALSE if it does not or
                        on error.
 
 @prenotnull{map_obj}
@@ -1214,7 +1132,7 @@ extern enum bt_value_status bt_value_map_foreach(
 @pre \p map_obj is a map value object.
 @postrefcountsame{map_obj}
 */
-extern bool bt_value_map_has_key(const struct bt_value *map_obj,
+extern bt_bool bt_value_map_has_entry(const struct bt_value *map_obj,
                const char *key);
 
 /**
@@ -1244,20 +1162,20 @@ On success, \p key is copied.
        \ref bt_value_null</strong>, its reference count is incremented.
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert_bool(): Inserts a boolean raw value into a
+@sa bt_value_map_insert_bool_entry(): Inserts a boolean raw value into a
        given map value object.
-@sa bt_value_map_insert_integer(): Inserts an integer raw value into
+@sa bt_value_map_insert_integer_entry(): Inserts an integer raw value into
        a given map value object.
-@sa bt_value_map_insert_float(): Inserts a floating point number raw
+@sa bt_value_map_insert_float_entry(): Inserts a floating point number raw
        value into a given map value object.
-@sa bt_value_map_insert_string(): Inserts a string raw value into a
+@sa bt_value_map_insert_string_entry(): Inserts a string raw value into a
        given map value object.
-@sa bt_value_map_insert_empty_array(): Inserts an empty array value
+@sa bt_value_map_insert_empty_array_entry(): Inserts an empty array value
        object into a given map value object.
-@sa bt_value_map_insert_empty_map(): Inserts an empty map value
+@sa bt_value_map_insert_empty_map_entry(): Inserts an empty map value
        object into a given map value object.
 */
-extern enum bt_value_status bt_value_map_insert(
+extern enum bt_value_status bt_value_map_insert_entry(
                struct bt_value *map_obj, const char *key,
                struct bt_value *element_obj);
 
@@ -1283,11 +1201,11 @@ On success, \p key is copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_bool(
-               struct bt_value *map_obj, const char *key, bool val);
+extern enum bt_value_status bt_value_map_insert_bool_entry(
+               struct bt_value *map_obj, const char *key, bt_bool val);
 
 /**
 @brief Inserts the integer raw value \p val mapped to the key \p key
@@ -1311,10 +1229,10 @@ On success, \p key is copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_integer(
+extern enum bt_value_status bt_value_map_insert_integer_entry(
                struct bt_value *map_obj, const char *key, int64_t val);
 
 /**
@@ -1339,10 +1257,10 @@ On success, \p key is copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_float(
+extern enum bt_value_status bt_value_map_insert_real_entry(
                struct bt_value *map_obj, const char *key, double val);
 
 /**
@@ -1368,10 +1286,10 @@ On success, \p val and \p key are copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_string(
+extern enum bt_value_status bt_value_map_insert_string_entry(
                struct bt_value *map_obj, const char *key, const char *val);
 
 /**
@@ -1395,10 +1313,10 @@ On success, \p key is copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_empty_array(
+extern enum bt_value_status bt_value_map_insert_empty_array_entry(
                struct bt_value *map_obj, const char *key);
 
 /**
@@ -1422,10 +1340,10 @@ On success, \p key is copied.
 @prehot{map_obj}
 @postrefcountsame{map_obj}
 
-@sa bt_value_map_insert(): Inserts a value object into a given map
+@sa bt_value_map_insert_entry(): Inserts a value object into a given map
        value object.
 */
-extern enum bt_value_status bt_value_map_insert_empty_map(
+extern enum bt_value_status bt_value_map_insert_empty_map_entry(
                struct bt_value *map_obj, const char *key);
 
 /**
This page took 0.037548 seconds and 4 git commands to generate.