From b1efde96b4e2b18196d5614967771afd3b8f6a01 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Fri, 16 Feb 2024 13:53:37 +0900 Subject: [PATCH] Remove conditional statements for Moible/Wearable profile Change-Id: I1268cdfefa62532f8cc3e4a1d1fcf6b51305b2c1 Signed-off-by: Changgyu Choi --- include/bundle.h | 52 +++++++++++++++++++++++------------------------ include/bundle_internal.h | 24 +++++++++++----------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/include/bundle.h b/include/bundle.h index 0c9d29e..ef0aacb 100644 --- a/include/bundle.h +++ b/include/bundle.h @@ -37,7 +37,7 @@ extern "C" { /** * @brief Enumeration for error codes of Bundle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum { BUNDLE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ @@ -51,14 +51,14 @@ typedef enum { /** * @brief The bundle handle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct _bundle_t bundle; /** * @brief The encoded data type. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @see bundle_encode() * @see bundle_decode() */ @@ -67,7 +67,7 @@ typedef unsigned char bundle_raw; /** * @brief Enumeration for key-value pair types. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum bundle_type_property { BUNDLE_TYPE_ARRAY = 0x0100, /**< Array type */ @@ -78,7 +78,7 @@ enum bundle_type_property { /** * @brief Enumeration for bundle types. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum bundle_type { BUNDLE_TYPE_NONE = -1, /**< None */ @@ -92,7 +92,7 @@ enum bundle_type { /** * @brief The key-value pair handle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @see bundle_iterator_t */ typedef struct keyval_t bundle_keyval_t; @@ -100,7 +100,7 @@ typedef struct keyval_t bundle_keyval_t; /** * @brief Called for every key-value pair. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] key The key of key-value pair * @param[in] type The type of bundle * @param[in] kv The handle of key-value pair @@ -112,7 +112,7 @@ typedef void (*bundle_iterator_t) (const char *key, const int type, const bundle /** * @brief Creates a bundle object. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @return The bundle object, * @c NULL - Failure @@ -131,7 +131,7 @@ bundle *bundle_create(void); /** * @brief Frees the given bundle object with key-value pairs in it. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object to be freed * @return The operation result * @retval #BUNDLE_ERROR_NONE Success @@ -150,7 +150,7 @@ int bundle_free(bundle *b); /** * @brief Adds a strings array type key-value pair into a given bundle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The key * @param[in] str_array The string type value; if @c NULL, an empty array is created; you can change an item with @@ -176,7 +176,7 @@ int bundle_add_str_array(bundle *b, const char *key, const char **str_array, con /** * @brief Deletes a key-value object with the given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The given key * @return The operation result @@ -199,7 +199,7 @@ int bundle_del(bundle *b, const char *key); /** * @brief Gets a string array from a given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You MUST NOT free or modify the returned string. \n * The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] b The bundle object @@ -233,7 +233,7 @@ const char **bundle_get_str_array(bundle *b, const char *key, int *len); /** * @brief Gets the number of bundle items. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @return The number of bundle items * @pre @a b must be a valid bundle object. @@ -254,7 +254,7 @@ int bundle_get_count(bundle *b); /** * @brief Gets the type of the value with a given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] b A bundle * @param[in] key A key in the bundle @@ -270,7 +270,7 @@ int bundle_get_type(bundle *b, const char *key); /** * @brief Duplicates a given bundle object. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * The returned value should be released using bundle_free(). * @param[in] b_from The bundle object to be duplicated @@ -296,7 +296,7 @@ bundle *bundle_dup(bundle *b_from); /** * @brief Iterates a callback function for each key-value pair in a given bundle. * @details Supports all types of values. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. \n * This function supports all types. * @param[in] b The bundle object @@ -351,7 +351,7 @@ void bundle_foreach(bundle *b, bundle_iterator_t iter, void *user_data); /** * @brief Gets the type of a key-value pair. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] kv A bundle_keyval_t object * @return The type of @a kv, @@ -366,7 +366,7 @@ int bundle_keyval_get_type(bundle_keyval_t *kv); /** * @brief Determines whether the type of a key-value pair is an array. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] kv A bundle_keyval_t object * @return The operation result @@ -382,7 +382,7 @@ int bundle_keyval_type_is_array(bundle_keyval_t *kv); /** * @brief Gets the value and size of the value from a key-value pair of basic type. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You must not free @a val. * @param[in] kv A bundle_keyval_t object * @param[out] val The value @@ -399,7 +399,7 @@ int bundle_keyval_get_basic_val(bundle_keyval_t *kv, void **val, size_t *size); /** * @brief Gets the value array, length of the array, and size of each array item. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] kv A bundle_keyval_t object * @param[out] array_val The array pointer of values * @param[out] array_len The length of @a array_val @@ -416,7 +416,7 @@ int bundle_keyval_get_array_val(bundle_keyval_t *kv, void ***array_val, unsigned /** * @brief Encodes a bundle to the bundle_raw format (uses base64 format). - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[out] r The returned bundle_raw data(byte data) * @a r MUST BE FREED by free(r) @@ -442,7 +442,7 @@ int bundle_encode(bundle *b, bundle_raw **r, int *len); /** * @brief Deserializes bundle_raw and gets the bundle object. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * The returned value should be released using bundle_free(). * @param[in] r The bundle_raw data to be converted to bundle object @@ -475,7 +475,7 @@ bundle *bundle_decode(const bundle_raw *r, const int len); /** * @brief Adds a string type key-value pair into a bundle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The key * @param[in] str The string type value @@ -500,7 +500,7 @@ int bundle_add_str(bundle *b, const char *key, const char *str); /** * @brief Adds a byte sequence type key-value pair into a bundle. * @details The bundle will contain a copy of the added byte sequence. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The key * @param[in] bytes The byte sequence @@ -529,7 +529,7 @@ int bundle_add_byte(bundle *b, const char *key, const void *bytes, const size_t /** * @brief Gets the string value with the given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You must not free str. * @param[in] b The bundle object * @param[in] key The key @@ -558,7 +558,7 @@ int bundle_get_str(bundle *b, const char *key, char **str); /** * @brief Gets the byte sequence with the given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You must not free @a bytes. * @param[in] b The bundle object * @param[in] key The key diff --git a/include/bundle_internal.h b/include/bundle_internal.h index 0fb5f68..b489adb 100644 --- a/include/bundle_internal.h +++ b/include/bundle_internal.h @@ -35,7 +35,7 @@ extern "C" { /** * @brief Called for every key-value pair. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks This type is obsolete. You must not use this type any more. * @see bundle_iterate() */ @@ -43,7 +43,7 @@ typedef void (*bundle_iterate_cb_t) (const char *key, const char *val, void *dat /** * @brief Adds a string type key-value pair into a given bundle. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The key * @param[in] val The value @@ -66,7 +66,7 @@ int bundle_add(bundle *b, const char *key, const char *val); /** * @brief Gets a value with a given key. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You MUST NOT free or modify the returned string! * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] b The bundle object @@ -93,7 +93,7 @@ const char *bundle_get_val(bundle *b, const char *key); /** * @brief Iterates a callback function for each key-value pairs in a given bundle. * @details (NOTE: Only BUNDLE_TYPE_STR type values come!) - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @remarks This function is obsolete and does not give values whose types are not BUNDLE_TYPE_STR. * @param[in] b The bundle object @@ -123,7 +123,7 @@ void bundle_iterate(bundle *b, bundle_iterate_cb_t callback, void *cb_data); /** * @brief Determines whether the type of a key-value pair is measurable. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] kv A bundle_keyval_t object * @return The operation result @@ -148,7 +148,7 @@ bundle_keyval_t *bundle_keyval_dup(const bundle_keyval_t *kv); /** * @brief Frees the encoded rawdata. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] r The rawdata * @return The operation result * @retval #BUNDLE_ERROR_NONE Success @@ -160,7 +160,7 @@ int bundle_free_encoded_rawdata(bundle_raw **r); /** * @brief Encodes a bundle to the bundle_raw format. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[out] r The returned bundle_raw data(byte data) * @a r MUST BE FREED by free(r) @@ -185,7 +185,7 @@ int bundle_encode_raw(bundle *b, bundle_raw **r, int *len); /** * @brief Deserializes bundle_raw and gets a bundle object. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] r The bundle_raw data to be converted to a bundle object * @param[in] len The size of @a r @@ -215,7 +215,7 @@ bundle *bundle_decode_raw(const bundle_raw *r, const int len); /** * @brief Exports bundle to @a argv. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] b The bundle object * @param[out] argv The pointer of the string array; \n @@ -252,7 +252,7 @@ int bundle_export_to_argv(bundle *b, char ***argv); /** * @brief Frees the exported @a argv. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks You must not use this API when you use global @a argv. * @param[in] argc The number of args, which is the return value of bundle_export_to_argv() * @param[in] argv The array from bundle_export_to_argv() @@ -282,7 +282,7 @@ int bundle_free_exported_argv(int argc, char ***argv); /** * @brief Imports a bundle from @a argv. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] argc The argument count * @param[in] argv The argument vector @@ -310,7 +310,7 @@ bundle *bundle_import_from_argv(int argc, char **argv); /** * @brief Sets a value of string array elements. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * @param[in] b The bundle object * @param[in] key The key * @param[in] idx The index of the array element to be changed -- 2.7.4