#include <stdbool.h>
#include <stddef.h>
#include <babeltrace/ref.h>
+#include <babeltrace/babeltrace-internal.h>
#ifdef __cplusplus
extern "C" {
* null value object (of type #BT_VALUE_TYPE_NULL), whereas \c NULL
* means an error of some sort.
*/
-extern struct bt_value *bt_value_null;
+BT_HIDDEN
+struct bt_value *bt_value_null;
/**
* User function type for bt_value_map_foreach().
*
* @see bt_value_is_frozen()
*/
-extern enum bt_value_status bt_value_freeze(struct bt_value *object);
+BT_HIDDEN
+enum bt_value_status bt_value_freeze(struct bt_value *object);
/**
* Checks whether \p object is frozen or not.
*
* @see bt_value_freeze()
*/
-extern bool bt_value_is_frozen(const struct bt_value *object);
+BT_HIDDEN
+bool bt_value_is_frozen(const struct bt_value *object);
/**
* Returns the type of \p object.
* @see bt_value_is_array()
* @see bt_value_is_map()
*/
-extern enum bt_value_type bt_value_get_type(const struct bt_value *object);
+BT_HIDDEN
+enum bt_value_type bt_value_get_type(const struct bt_value *object);
/**
* Checks whether \p object is a null value object. The only valid null
* @see bt_value_bool_create_init() (creates an initialized
* boolean value object)
*/
-extern struct bt_value *bt_value_bool_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_bool_create(void);
/**
* Creates a boolean value object with its initial raw value set to
* @param val Initial raw value
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_bool_create_init(bool val);
+BT_HIDDEN
+struct bt_value *bt_value_bool_create_init(bool val);
/**
* Creates an integer value object. The created integer value object's
* @see bt_value_integer_create_init() (creates an initialized
* integer value object)
*/
-extern struct bt_value *bt_value_integer_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_integer_create(void);
/**
* Creates an integer value object with its initial raw value set to
* @param val Initial raw value
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_integer_create_init(int64_t val);
+BT_HIDDEN
+struct bt_value *bt_value_integer_create_init(int64_t val);
/**
* Creates a floating point number value object. The created floating
* @see bt_value_float_create_init() (creates an initialized floating
* point number value object)
*/
-extern struct bt_value *bt_value_float_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_float_create(void);
/**
* Creates a floating point number value object with its initial raw
* @param val Initial raw value
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_float_create_init(double val);
+BT_HIDDEN
+struct bt_value *bt_value_float_create_init(double val);
/**
* Creates a string value object. The string value object is initially
* @see bt_value_string_create_init() (creates an initialized
* string value object)
*/
-extern struct bt_value *bt_value_string_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_string_create(void);
/**
* Creates a string value object with its initial raw value set to
* @param val Initial raw value (copied on success)
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_string_create_init(const char *val);
+BT_HIDDEN
+struct bt_value *bt_value_string_create_init(const char *val);
/**
* Creates an empty array value object.
*
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_array_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_array_create(void);
/**
* Creates an empty map value object.
*
* @returns Created value object on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_map_create(void);
+BT_HIDDEN
+struct bt_value *bt_value_map_create(void);
/**
* Gets the boolean raw value of the boolean value object \p bool_obj.
*
* @see bt_value_bool_set()
*/
-extern enum bt_value_status bt_value_bool_get(
+BT_HIDDEN
+enum bt_value_status bt_value_bool_get(
const struct bt_value *bool_obj, bool *val);
/**
*
* @see bt_value_bool_get()
*/
-extern enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj,
+BT_HIDDEN
+enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj,
bool val);
/**
*
* @see bt_value_integer_set()
*/
-extern enum bt_value_status bt_value_integer_get(
+BT_HIDDEN
+enum bt_value_status bt_value_integer_get(
const struct bt_value *integer_obj, int64_t *val);
/**
*
* @see bt_value_integer_get()
*/
-extern enum bt_value_status bt_value_integer_set(
+BT_HIDDEN
+enum bt_value_status bt_value_integer_set(
struct bt_value *integer_obj, int64_t val);
/**
*
* @see bt_value_float_set()
*/
-extern enum bt_value_status bt_value_float_get(
+BT_HIDDEN
+enum bt_value_status bt_value_float_get(
const struct bt_value *float_obj, double *val);
/**
*
* @see bt_value_float_get()
*/
-extern enum bt_value_status bt_value_float_set(
+BT_HIDDEN
+enum bt_value_status bt_value_float_set(
struct bt_value *float_obj, double val);
/**
*
* @see bt_value_string_set()
*/
-extern enum bt_value_status bt_value_string_get(
+BT_HIDDEN
+enum bt_value_status bt_value_string_get(
const struct bt_value *string_obj, const char **val);
/**
*
* @see bt_value_string_get()
*/
-extern enum bt_value_status bt_value_string_set(struct bt_value *string_obj,
+BT_HIDDEN
+enum bt_value_status bt_value_string_set(struct bt_value *string_obj,
const char *val);
/**
*
* @see bt_value_array_is_empty()
*/
-extern int bt_value_array_size(const struct bt_value *array_obj);
+BT_HIDDEN
+int bt_value_array_size(const struct bt_value *array_obj);
/**
* Returns \c true if the array value object \p array_obj is empty.
*
* @see bt_value_array_size()
*/
-extern bool bt_value_array_is_empty(const struct bt_value *array_obj);
+BT_HIDDEN
+bool bt_value_array_is_empty(const struct bt_value *array_obj);
/**
* Gets the value object of the array value object \p array_obj at the
* @returns Value object at index \p index on
* success, or \c NULL on error
*/
-extern struct bt_value *bt_value_array_get(const struct bt_value *array_obj,
+BT_HIDDEN
+struct bt_value *bt_value_array_get(const struct bt_value *array_obj,
size_t index);
/**
* @see bt_value_array_append_empty_array()
* @see bt_value_array_append_empty_map()
*/
-extern enum bt_value_status bt_value_array_append(struct bt_value *array_obj,
+BT_HIDDEN
+enum bt_value_status bt_value_array_append(struct bt_value *array_obj,
struct bt_value *element_obj);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_bool(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_bool(
struct bt_value *array_obj, bool val);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_integer(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_integer(
struct bt_value *array_obj, int64_t val);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_float(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_float(
struct bt_value *array_obj, double val);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_string(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_string(
struct bt_value *array_obj, const char *val);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_empty_array(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_empty_array(
struct bt_value *array_obj);
/**
*
* @see bt_value_array_append()
*/
-extern enum bt_value_status bt_value_array_append_empty_map(
+BT_HIDDEN
+enum bt_value_status bt_value_array_append_empty_map(
struct bt_value *array_obj);
/**
* \p array_obj
* @returns One of #bt_value_status values
*/
-extern enum bt_value_status bt_value_array_set(struct bt_value *array_obj,
+BT_HIDDEN
+enum bt_value_status bt_value_array_set(struct bt_value *array_obj,
size_t index, struct bt_value *element_obj);
/**
*
* @see bt_value_map_is_empty()
*/
-extern int bt_value_map_size(const struct bt_value *map_obj);
+BT_HIDDEN
+int bt_value_map_size(const struct bt_value *map_obj);
/**
* Returns \c true if the map value object \p map_obj is empty.
*
* @see bt_value_map_size()
*/
-extern bool bt_value_map_is_empty(const struct bt_value *map_obj);
+BT_HIDDEN
+bool bt_value_map_is_empty(const struct bt_value *map_obj);
/**
* Gets the value object associated with the key \p key within the
* @returns Value object associated with the key \p key
* on success, or \c NULL on error
*/
-extern struct bt_value *bt_value_map_get(const struct bt_value *map_obj,
+BT_HIDDEN
+struct bt_value *bt_value_map_get(const struct bt_value *map_obj,
const char *key);
/**
* returned if the loop was cancelled by the user
* function
*/
-extern enum bt_value_status bt_value_map_foreach(
+BT_HIDDEN
+enum bt_value_status bt_value_map_foreach(
const struct bt_value *map_obj, bt_value_map_foreach_cb cb,
void *data);
* or \c false if it doesn't have \p key or
* on error
*/
-extern bool bt_value_map_has_key(const struct bt_value *map_obj,
+BT_HIDDEN
+bool bt_value_map_has_key(const struct bt_value *map_obj,
const char *key);
/**
* @see bt_value_map_insert_empty_array()
* @see bt_value_map_insert_empty_map()
*/
-extern enum bt_value_status bt_value_map_insert(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert(
struct bt_value *map_obj, const char *key,
struct bt_value *element_obj);
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_bool(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_bool(
struct bt_value *map_obj, const char *key, bool val);
/**
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_integer(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_integer(
struct bt_value *map_obj, const char *key, int64_t val);
/**
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_float(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_float(
struct bt_value *map_obj, const char *key, double val);
/**
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_string(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_string(
struct bt_value *map_obj, const char *key, const char *val);
/**
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_empty_array(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_empty_array(
struct bt_value *map_obj, const char *key);
/**
*
* @see bt_value_map_insert()
*/
-extern enum bt_value_status bt_value_map_insert_empty_map(
+BT_HIDDEN
+enum bt_value_status bt_value_map_insert_empty_map(
struct bt_value *map_obj, const char *key);
/**
* @returns Deep copy of \p object on success, or \c NULL
* on error
*/
-extern struct bt_value *bt_value_copy(const struct bt_value *object);
+BT_HIDDEN
+struct bt_value *bt_value_copy(const struct bt_value *object);
/**
* Compares the value objects \p object_a and \p object_b and returns
* same content, or \c false if they differ or on
* error
*/
-extern bool bt_value_compare(const struct bt_value *object_a,
+BT_HIDDEN
+bool bt_value_compare(const struct bt_value *object_a,
const struct bt_value *object_b);
#ifdef __cplusplus