/*
- * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2000 - 2020 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
extern "C" {
# endif
-#define API __attribute__((visibility("default")))
-#define likely(x) __builtin_expect(x, 1)
-#define unlikely(x) __builtin_expect(x, 0)
-
/**
* @brief Enumeration for error codes of Bundle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
bundle_free(b); // Free the bundle
* @endcode
*/
-API bundle *bundle_create(void);
+bundle *bundle_create(void);
/**
bundle_free(b); // Free the bundle
* @endcode
*/
-API int bundle_free(bundle *b);
+int bundle_free(bundle *b);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_add_str_array(bundle *b, const char *key, const char **str_array, const int len);
+int bundle_add_str_array(bundle *b, const char *key, const char **str_array, const int len);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_del(bundle *b, const char *key);
+int bundle_del(bundle *b, const char *key);
/**
bundle_free(b);
* @endcode
*/
-API const char **bundle_get_str_array(bundle *b, const char *key, int *len);
+const char **bundle_get_str_array(bundle *b, const char *key, int *len);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_get_count(bundle *b);
+int bundle_get_count(bundle *b);
/**
* @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available
* @pre @a b must be a valid bundle object.
- * @see bundle_type_t
+ * @see bundle_type
*/
-API int bundle_get_type(bundle *b, const char *key);
+int bundle_get_type(bundle *b, const char *key);
/**
* @c NULL - Failure
* @exception #BUNDLE_ERROR_NONE Success
* @exception #BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter
- * @pre @a b must be a valid bundle object.
+ * @pre @a b_from must be a valid bundle object.
*
* @code
#include <bundle.h>
bundle_free(b_dup);
* @endcode
*/
-API bundle *bundle_dup(bundle *b_from);
+bundle *bundle_dup(bundle *b_from);
/**
}
* @endcode
*/
-API void bundle_foreach(bundle *b, bundle_iterator_t iter, void *user_data);
+void bundle_foreach(bundle *b, bundle_iterator_t iter, void *user_data);
/**
* @pre @a kv must be a valid bundle_keyval_t object.
* @see bundle_foreach()
*/
-API int bundle_keyval_get_type(bundle_keyval_t *kv);
+int bundle_keyval_get_type(bundle_keyval_t *kv);
/**
* @pre @a kv must be a valid bundle_keyval_t object.
* @see bundle_foreach()
*/
-API int bundle_keyval_type_is_array(bundle_keyval_t *kv);
+int bundle_keyval_type_is_array(bundle_keyval_t *kv);
/**
* @post @a val and @a size are set.
* @see bundle_foreach()
*/
-API int bundle_keyval_get_basic_val(bundle_keyval_t *kv, void **val, size_t *size);
+int bundle_keyval_get_basic_val(bundle_keyval_t *kv, void **val, size_t *size);
/**
* @post @a array_val, @a array_len, @a array_element_size are set.
* @see bundle_foreach()
*/
-API int bundle_keyval_get_array_val(bundle_keyval_t *kv, void ***array_val, unsigned int *array_len, size_t **array_element_size);
+int bundle_keyval_get_array_val(bundle_keyval_t *kv, void ***array_val, unsigned int *array_len, size_t **array_element_size);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_encode(bundle *b, bundle_raw **r, int *len);
+int bundle_encode(bundle *b, bundle_raw **r, int *len);
/**
bundle_free(b_dup);
* @endcode
*/
-API bundle *bundle_decode(const bundle_raw *r, const int len);
+bundle *bundle_decode(const bundle_raw *r, const int len);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_add_str(bundle *b, const char *key, const char *str);
+int bundle_add_str(bundle *b, const char *key, const char *str);
/**
bundle_free(b);
* @endcode
*/
-API int bundle_add_byte(bundle *b, const char *key, const void *bytes, const size_t size);
+int bundle_add_byte(bundle *b, const char *key, const void *bytes, const size_t size);
/**
v = NULL;
* @endcode
*/
-API int bundle_get_str(bundle *b, const char *key, char **str);
+int bundle_get_str(bundle *b, const char *key, char **str);
/**
bundle_free(b); // After freeing b, v and n become a dangling pointer
* @endcode
*/
-API int bundle_get_byte(bundle *b, const char *key, void **bytes, size_t *size);
+int bundle_get_byte(bundle *b, const char *key, void **bytes, size_t *size);
/**
* @brief Adds an 'array of byte sequences' type key-value pair into a bundle.
* @see bundle_get_byte_array()
* @see bundle_set_byte_array_element()
*/
-API int bundle_add_byte_array(bundle *b, const char *key, const unsigned int len);
+int bundle_add_byte_array(bundle *b, const char *key, const unsigned int len);
/**
* @brief Sets an element of an array of byte sequences.
* @see bundle_add_byte_array()
* @see bundle_get_byte_array()
*/
-API int bundle_set_byte_array_element(bundle *b, const char *key, const unsigned int idx, const void *bytes, const size_t size);
+int bundle_set_byte_array_element(bundle *b, const char *key, const unsigned int idx, const void *bytes, const size_t size);
/**
* @brief Gets the array of byte sequences with the given key.
* @see bundle_add_byte_array()
* @see bundle_set_byte_array_element()
*/
-API int bundle_get_byte_array(bundle *b, const char *key, void ***byte_array, unsigned int *len, unsigned int **array_element_size);
+int bundle_get_byte_array(bundle *b, const char *key, void ***byte_array, unsigned int *len, unsigned int **array_element_size);
#ifdef __cplusplus
}