From 5cb385991083b154c5020d630754e7e79e861d89 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 7 Nov 2018 11:20:42 +0900 Subject: [PATCH] Fix issues detected by check header script Change-Id: I2a4c2222b5227caaddbccb41719e49f2837d8d6a Signed-off-by: Jihoon Kim --- client/autofill.c | 10 +- client/autofill_auth.c | 12 +- client/autofill_fill_request.c | 10 +- common/autofill_fill_response.c | 2 +- common/autofill_fill_response_group.c | 2 +- common/autofill_save_view_info.c | 2 +- common/autofill_view_info.c | 2 +- include/autofill.h | 136 +++---- include/autofill_common.h | 658 ++++++++++++---------------------- include/autofill_enum.h | 19 - include/autofill_private.h | 1 - include/autofill_service.h | 113 +++--- packaging/capi-ui-autofill.spec | 1 - service_lib/autofill_service.c | 39 +- 14 files changed, 404 insertions(+), 603 deletions(-) delete mode 100644 include/autofill_enum.h diff --git a/client/autofill.c b/client/autofill.c index 34c0be6..25a4b7d 100644 --- a/client/autofill.c +++ b/client/autofill.c @@ -36,10 +36,10 @@ rpc_port_proxy_AutofillAppPort_h rpc_h = NULL; static autofill_connection_status_changed_cb connection_callback = NULL; static void *connection_userdata = NULL; -extern Autofill_Fill_Response_Cb g_autofill_fill_response_cb; +extern autofill_fill_response_cb g_autofill_fill_response_cb; extern void *g_autofill_fill_response_data; -extern Autofill_Auth_Info_Cb g_autofill_auth_info_cb; +extern autofill_auth_info_cb g_autofill_auth_info_cb; extern void *g_autofill_auth_info_data; static bool fill_response_item_cb(rpc_port_autofill_response_item_h response_items, void *user_data) @@ -201,7 +201,7 @@ static void __on_rejected(rpc_port_proxy_AutofillAppPort_h h, void *user_data) } //LCOV_EXCL_STOP -EXPORT_API int autofill_initialize() +EXPORT_API int autofill_initialize(void) { LOGD("autofill initialize"); @@ -227,7 +227,7 @@ EXPORT_API int autofill_initialize() return ret; } -EXPORT_API int autofill_deinitialize() +EXPORT_API int autofill_deinitialize(void) { LOGD("autofill deinitialize"); @@ -279,7 +279,7 @@ EXPORT_API int autofill_connect(autofill_connection_status_changed_cb callback, return ret; } -EXPORT_API int autofill_disconnect() +EXPORT_API int autofill_disconnect(void) { LOGD("autofill disconnect"); diff --git a/client/autofill_auth.c b/client/autofill_auth.c index cdf9775..011da2b 100644 --- a/client/autofill_auth.c +++ b/client/autofill_auth.c @@ -30,7 +30,7 @@ extern rpc_port_proxy_AutofillAppPort_h rpc_h; #endif #define LOG_TAG "AUTOFILL" -Autofill_Auth_Info_Cb g_autofill_auth_info_cb = NULL; +autofill_auth_info_cb g_autofill_auth_info_cb = NULL; void *g_autofill_auth_info_data = NULL; // Request autofill auth info @@ -99,18 +99,18 @@ EXPORT_API int autofill_auth_info_request(autofill_view_info_h vi) return ret; } -EXPORT_API int autofill_auth_info_set_callback(Autofill_Auth_Info_Cb autofill_auth_info_cb, void *data) +EXPORT_API int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_data) { - g_autofill_auth_info_cb = autofill_auth_info_cb; - g_autofill_auth_info_data = data; + g_autofill_auth_info_cb = callback; + g_autofill_auth_info_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_auth_info_unset_callback() +EXPORT_API int autofill_auth_info_unset_callback(void) { g_autofill_auth_info_cb = NULL; g_autofill_auth_info_data = NULL; return AUTOFILL_ERROR_NONE; -} +} \ No newline at end of file diff --git a/client/autofill_fill_request.c b/client/autofill_fill_request.c index 25ac9b4..918c340 100644 --- a/client/autofill_fill_request.c +++ b/client/autofill_fill_request.c @@ -29,7 +29,7 @@ extern rpc_port_proxy_AutofillAppPort_h rpc_h; -Autofill_Fill_Response_Cb g_autofill_fill_response_cb = NULL; +autofill_fill_response_cb g_autofill_fill_response_cb = NULL; void *g_autofill_fill_response_data = NULL; EXPORT_API int autofill_fill_request(autofill_view_info_h vi) @@ -96,15 +96,15 @@ EXPORT_API int autofill_fill_request(autofill_view_info_h vi) return ret; } -EXPORT_API int autofill_fill_response_set_callback(Autofill_Fill_Response_Cb autofill_response_cb, void *data) +EXPORT_API int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void *user_data) { - g_autofill_fill_response_cb = autofill_response_cb; - g_autofill_fill_response_data = data; + g_autofill_fill_response_cb = callback; + g_autofill_fill_response_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_fill_response_unset_callback() +EXPORT_API int autofill_fill_response_unset_callback(void) { g_autofill_fill_response_cb = NULL; g_autofill_fill_response_data = NULL; diff --git a/common/autofill_fill_response.c b/common/autofill_fill_response.c index 8116897..314fad6 100644 --- a/common/autofill_fill_response.c +++ b/common/autofill_fill_response.c @@ -133,7 +133,7 @@ EXPORT_API int autofill_fill_response_add_group(autofill_fill_response_h h, auto } EXPORT_API int autofill_fill_response_foreach_groups(autofill_fill_response_h h, - bool (*callback)(autofill_fill_response_group_h item, void *user_data), void *user_data) + autofill_fill_response_group_cb callback, void *user_data) { if (!h || !callback) { return AUTOFILL_ERROR_INVALID_PARAMETER; diff --git a/common/autofill_fill_response_group.c b/common/autofill_fill_response_group.c index 924494b..68cef53 100644 --- a/common/autofill_fill_response_group.c +++ b/common/autofill_fill_response_group.c @@ -114,7 +114,7 @@ EXPORT_API int autofill_fill_response_group_add_item(autofill_fill_response_grou } EXPORT_API int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, - bool (*callback)(autofill_fill_response_item_h item, void *user_data), void *user_data) + autofill_fill_response_item_cb callback, void *user_data) { if (!h || !callback) { return AUTOFILL_ERROR_INVALID_PARAMETER; diff --git a/common/autofill_save_view_info.c b/common/autofill_save_view_info.c index 2ba92b8..b9f8532 100644 --- a/common/autofill_save_view_info.c +++ b/common/autofill_save_view_info.c @@ -139,7 +139,7 @@ EXPORT_API int autofill_save_view_info_add_item(const autofill_save_view_info_h } EXPORT_API int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, - bool (*callback)(autofill_save_item_h item, void *user_data), void *user_data) + autofill_save_item_cb callback, void *user_data) { if (!vi || !callback) { return AUTOFILL_ERROR_INVALID_PARAMETER; diff --git a/common/autofill_view_info.c b/common/autofill_view_info.c index 864d5b6..a24cdc6 100644 --- a/common/autofill_view_info.c +++ b/common/autofill_view_info.c @@ -137,7 +137,7 @@ EXPORT_API int autofill_view_info_add_item(const autofill_view_info_h vi, autofi } EXPORT_API int autofill_view_info_foreach_items(autofill_view_info_h vi, - bool (*callback)(autofill_item_h item, void *user_data), void *user_data) + autofill_item_cb callback, void *user_data) { if (!vi || !callback) { return AUTOFILL_ERROR_INVALID_PARAMETER; diff --git a/include/autofill.h b/include/autofill.h index 3b4647c..94c8ba3 100644 --- a/include/autofill.h +++ b/include/autofill.h @@ -22,8 +22,7 @@ * @brief This file contains autofill APIs and related enumeration. */ -#include "autofill_enum.h" -#include "autofill_common.h" +#include #ifdef __cplusplus extern "C" { @@ -45,86 +44,76 @@ typedef enum { } autofill_connection_status_e; /** -* @brief Called when the connection status is changed. -* @since_tizen 5.5 -* @param[in] status The connection status -* @param[in] user_data The user data passed from the callback function -* @see autofill_initialize() -* @see autofill_deinitialize() -*/ + * @brief Called when the connection status is changed. + * @since_tizen 5.5 + * @param[in] status The connection status + * @param[in] user_data The user data passed from the callback function + * @see autofill_initialize() + * @see autofill_deinitialize() + */ typedef void(*autofill_connection_status_changed_cb)(autofill_connection_status_e status, void* user_data); -typedef void (*Autofill_Fill_Response_Cb)(autofill_fill_response_h fill_response, void *data); +/** + * @brief Called when receiving autofill fill response data. + * @since_tizen 5.5 + * @remarks @a fill_response_h should not be freed and can be used only in the callback. + * @param[in] fill_response_h The autofill fill response handle + * @param[in] user_data The user data to be passed to the callback function + * @see autofill_fill_response_set_callback() + */ +typedef void (*autofill_fill_response_cb)(autofill_fill_response_h fill_response_h, void *user_data); -typedef void (*Autofill_Auth_Info_Cb)(autofill_auth_info_h auth_info, void *data); +/** + * @brief Called when receiving the authentication information. + * @since_tizen 5.5 + * @remarks @a auth_info should not be freed and can be used only in the callback. + * @param[in] auth_info The autofill authentication information handle + * @param[in] user_data The user data passed from the callback function + * @see autofill_fill_response_set_callback() + */ +typedef void (*autofill_auth_info_cb)(autofill_auth_info_h auth_info, void *user_data); -// initialize / deinitialize /** - * @brief Autofill initialize - * + * @brief Initializes autofill. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_initialize(); +int autofill_initialize(void); /** - * @brief Autofill deinitialize - * + * @brief Deinitializes autofill. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized */ -int autofill_deinitialize(); +int autofill_deinitialize(void); /** - * @brief Autofill connect - * + * @brief Connects to autofill daemon. * @since_tizen 5.5 - * - * @privlevel public - * - * @privilege %http://tizen.org/privilege/appmanager.launch \n - * %http://tizen.org/privilege/datasharing - * + * @param[in] callback The callback function to register + * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #AUTOFILL_ERROR_PERMISSION_DENIED Permission denied */ int autofill_connect(autofill_connection_status_changed_cb callback, void *user_data); /** - * @brief Autofill disconnect - * + * @brief Disconnects from autofill daemon. * @since_tizen 5.5 - * - * @privlevel public - * - * @privilege %http://tizen.org/privilege/appmanager.launch \n - * %http://tizen.org/privilege/datasharing - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized */ -int autofill_disconnect(); +int autofill_disconnect(void); -// auth /** - * @brief Request of authentication information - * + * @brief Requests of authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @param[in] vi The autofill view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -133,36 +122,27 @@ int autofill_disconnect(); int autofill_auth_info_request(autofill_view_info_h vi); /** - * @brief Register the callback to receive the authentication information - * + * @brief Registers the callback to receive the authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @param[in] callback The callback function to register + * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_auth_info_set_callback(Autofill_Auth_Info_Cb autofill_auth_info_cb, void *data); +int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_data); /** - * @brief Unregister the callback to receive the authentication information - * + * @brief Unregisters the callback to receive the authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_auth_info_unset_callback(); +int autofill_auth_info_unset_callback(void); /** - * @brief Send fill request to fill out each input form - * + * @brief Sends fill request to fill out each input form. * @since_tizen 5.5 - * - * @privlevel public - * + * @param[in] vi The autofill view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -170,38 +150,28 @@ int autofill_auth_info_unset_callback(); */ int autofill_fill_request(autofill_view_info_h vi); -// fill response /** - * @brief Register the callback to receive autofill fill response - * + * @brief Registers the callback to receive autofill fill response. * @since_tizen 5.5 - * - * @privlevel public - * + * @param[in] callback The callback function to register + * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_fill_response_set_callback(Autofill_Fill_Response_Cb autofill_response_cb, void *data); +int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void *user_data); /** - * @brief Register the callback to receive autofill fill response - * + * @brief Unregisters the callback to receive autofill fill response. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_fill_response_unset_callback(); +int autofill_fill_response_unset_callback(void); /** - * @brief Request to save Register the callback to receive autofill fill response - * + * @brief Sends the autofill save view info. * @since_tizen 5.5 - * - * @privlevel public - * + * @param[in] vi The autofill save view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter diff --git a/include/autofill_common.h b/include/autofill_common.h index 77b9f2c..d65dcc8 100644 --- a/include/autofill_common.h +++ b/include/autofill_common.h @@ -23,7 +23,6 @@ */ #include -#include "autofill_enum.h" #ifdef __cplusplus extern "C" { @@ -35,7 +34,7 @@ extern "C" { */ /** - * @brief Enumeration for autofill function error + * @brief Enumeration for autofill function error. * * @since_tizen 5.5 */ @@ -51,37 +50,142 @@ typedef enum { AUTOFILL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */ } autofill_error_e; +/** + * @brief Enumeration for autofill hint. + * + * @since_tizen 5.5 + */ +typedef enum +{ + AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, /**< Autofill hint for a credit card expiration date */ + AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, /**< Autofill hint for a credit card expiration day */ + AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, /**< Autofill hint for a credit card expiration month */ + AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, /**< Autofill hint for a credit card expiration year */ + AUTOFILL_HINT_CREDIT_CARD_NUMBER, /**< Autofill hint for a credit card number */ + AUTOFILL_HINT_EMAIL_ADDRESS, /**< Autofill hint for an email address */ + AUTOFILL_HINT_NAME, /**< Autofill hint for a user's real name */ + AUTOFILL_HINT_PHONE, /**< Autofill hint for a phone number */ + AUTOFILL_HINT_POSTAL_ADDRESS, /**< Autofill hint for a postal address */ + AUTOFILL_HINT_POSTAL_CODE, /**< Autofill hint for a postal code */ + AUTOFILL_HINT_ID /**< Autofill hint for a user's ID */ +} autofill_hint_e; + +/** + * @brief The autofill item handle. + * @since_tizen 5.5 + */ typedef struct autofill_item_s *autofill_item_h; + +/** + * @brief The autofill authentication information handle. + * @since_tizen 5.5 + */ typedef struct autofill_auth_info_s *autofill_auth_info_h; + +/** + * @brief The autofill view information handle. + * @since_tizen 5.5 + */ typedef struct autofill_view_info_s *autofill_view_info_h; + +/** + * @brief The autofill fill response handle. + * @since_tizen 5.5 + */ typedef struct autofill_fill_response_s *autofill_fill_response_h; + +/** + * @brief The autofill fill response group handle. + * @since_tizen 5.5 + */ typedef struct autofill_fill_response_group_s *autofill_fill_response_group_h; + +/** + * @brief The autofill fill response item handle. + * @since_tizen 5.5 + */ typedef struct autofill_response_item_s *autofill_fill_response_item_h; + +/** + * @brief The autofill save item handle. + * @since_tizen 5.5 + */ typedef struct autofill_save_item_s *autofill_save_item_h; + +/** + * @brief The autofill save view information handle. + * @since_tizen 5.5 + */ typedef struct autofill_save_view_info_s *autofill_save_view_info_h; /** - * @brief Create autofill item - * + * @brief Called for each autofill information in view info. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a item should not be freed and can be used only in the callback. + * @param[in] item The autofill item handle + * @param[in] user_data The user data to be passed to the callback function + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop + * @pre autofill_view_info_foreach_items() will invoke this callback. + * @see autofill_view_info_foreach_items() + */ +typedef bool (*autofill_item_cb)(autofill_item_h item, void *user_data); + +/** + * @brief Called for each autofill information in save view info. + * @since_tizen 5.5 + * @remarks @a item should not be freed and can be used only in the callback. + * @param[in] item The autofill item handle + * @param[in] user_data The user data to be passed to the callback function + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop + * @pre autofill_view_info_foreach_items() will invoke this callback. + * @see autofill_view_info_foreach_items() + */ +typedef bool (*autofill_save_item_cb)(autofill_save_item_h item, void *user_data); + +/** + * @brief Called for each autofill fill response group information in fill response. + * @since_tizen 5.5 + * @remarks @a item should not be freed and can be used only in the callback. + * @param[in] item The autofill fill response group handle + * @param[in] user_data The user data to be passed to the callback function + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop + * @pre autofill_fill_response_foreach_groups() will invoke this callback. + * @see autofill_fill_response_foreach_groups() + */ +typedef bool (*autofill_fill_response_group_cb)(autofill_fill_response_group_h item, void *user_data); + +/** + * @brief Called for each autofill fill response information in fill response group. + * @since_tizen 5.5 + * @remarks @a item should not be freed and can be used only in the callback. + * @param[in] item The autofill fill response item handle + * @param[in] user_data The user data to be passed to the callback function + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop + * @pre autofill_fill_response_group_foreach_items() will invoke this callback. + * @see autofill_view_info_foreach_items() + */ +typedef bool (*autofill_fill_response_item_cb)(autofill_fill_response_item_h item, void *user_data); + +/** + * @brief Creates autofill item. + * @since_tizen 5.5 + * @remarks If the function succeeds, @a it handle must be released with autofill_item_destroy(). * @param[out] it The autofill item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter * @retval #AUTOFILL_ERROR_OUT_OF_MEMORY Out of memory + * @see autofill_item_destroy() */ int autofill_item_create(autofill_item_h *it); /** - * @brief Destroy autofill item - * + * @brief Destroys autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -90,27 +194,20 @@ int autofill_item_create(autofill_item_h *it); int autofill_item_destroy(autofill_item_h it); /** - * @brief Clone autofill item - * + * @brief Clones autofill item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a clone handle must be released with autofill_item_destroy(). * @param[in] it The autofill item handle * @param[out] clone The autofill item handle to be cloned * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_item_clone(autofill_item_h h, autofill_item_h *clone); +int autofill_item_clone(autofill_item_h it, autofill_item_h *clone); /** - * @brief Set autofill hint (id (username), name, password, phone, credit card number, organization, so on) - * + * @brief Sets autofill hint (id (username), name, password, phone, credit card number, organization, so on) in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[in] hint The autofill hint * @return 0 on success, otherwise a negative error value @@ -120,12 +217,8 @@ int autofill_item_clone(autofill_item_h h, autofill_item_h *clone); int autofill_item_set_autofill_hint(autofill_item_h it, autofill_hint_e hint); /** - * @brief Get autofill hint - * + * @brief Gets autofill hint in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[out] hint The autofill hint * @return 0 on success, otherwise a negative error value @@ -135,12 +228,8 @@ int autofill_item_set_autofill_hint(autofill_item_h it, autofill_hint_e hint); int autofill_item_get_autofill_hint(autofill_item_h it, autofill_hint_e *hint); /** - * @brief Set autofill ID - * + * @brief Sets autofill ID in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[in] id The autofill ID * @return 0 on success, otherwise a negative error value @@ -150,12 +239,9 @@ int autofill_item_get_autofill_hint(autofill_item_h it, autofill_hint_e *hint); int autofill_item_set_id(autofill_item_h it, const char *id); /** - * @brief Set autofill ID - * + * @brief Gets autofill ID in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a id must be released using free(). * @param[in] it The autofill item handle * @param[out] id The autofill ID * @return 0 on success, otherwise a negative error value @@ -165,12 +251,8 @@ int autofill_item_set_id(autofill_item_h it, const char *id); int autofill_item_get_id(autofill_item_h it, char **id); /** - * @brief Set autofill Label - * + * @brief Sets autofill Label in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[in] label The autofill label * @return 0 on success, otherwise a negative error value @@ -180,12 +262,9 @@ int autofill_item_get_id(autofill_item_h it, char **id); int autofill_item_set_label(autofill_item_h it, const char *label); /** - * @brief Get autofill Label - * + * @brief Gets autofill Label in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a label must be released using free(). * @param[in] it The autofill item handle * @param[out] label The autofill label * @return 0 on success, otherwise a negative error value @@ -195,12 +274,8 @@ int autofill_item_set_label(autofill_item_h it, const char *label); int autofill_item_get_label(autofill_item_h it, char **label); /** - * @brief Set sensitive data - * + * @brief Sets sensitive data in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[in] sensitive The sensitive data or not * @return 0 on success, otherwise a negative error value @@ -210,12 +285,8 @@ int autofill_item_get_label(autofill_item_h it, char **label); int autofill_item_set_sensitive_data(autofill_item_h it, bool sensitive); /** - * @brief Get sensitive data - * + * @brief Gets sensitive data in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[out] sensitive The sensitive data or not * @return 0 on success, otherwise a negative error value @@ -225,12 +296,8 @@ int autofill_item_set_sensitive_data(autofill_item_h it, bool sensitive); int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensitive); /** - * @brief Set autofill value - * + * @brief Sets autofill value in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill item handle * @param[in] value The autofill value * @return 0 on success, otherwise a negative error value @@ -240,12 +307,9 @@ int autofill_item_get_sensitive_data(autofill_item_h it, bool *sensitive); int autofill_item_set_value(autofill_item_h it, const char *value); /** - * @brief Get autofill value - * + * @brief Gets autofill value in autofill item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a value must be released using free(). * @param[in] it The autofill item handle * @param[out] value The autofill value * @return 0 on success, otherwise a negative error value @@ -254,15 +318,10 @@ int autofill_item_set_value(autofill_item_h it, const char *value); */ int autofill_item_get_value(autofill_item_h it, char **value); -// auth info - /** - * @brief Create autofill auth info - * + * @brief Creates autofill authentication info. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a ai handle must be released with autofill_auth_info_destroy(). * @param[out] ai The autofill authentication information handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -272,12 +331,8 @@ int autofill_item_get_value(autofill_item_h it, char **value); int autofill_auth_info_create(autofill_auth_info_h *ai); /** - * @brief Destroy autofill view info - * + * @brief Destroys autofill authentication info. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -286,12 +341,8 @@ int autofill_auth_info_create(autofill_auth_info_h *ai); int autofill_auth_info_destroy(autofill_auth_info_h ai); /** - * @brief Set app id - * + * @brief Sets app id in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -301,12 +352,9 @@ int autofill_auth_info_destroy(autofill_auth_info_h ai); int autofill_auth_info_set_app_id(autofill_auth_info_h ai, const char *app_id); /** - * @brief Get app id - * + * @brief Gets app id in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a app_id must be released using free(). * @param[in] ai The autofill authentication information handle * @param[out] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -316,12 +364,8 @@ int autofill_auth_info_set_app_id(autofill_auth_info_h ai, const char *app_id); int autofill_auth_info_get_app_id(autofill_auth_info_h ai, char **app_id); /** - * @brief Set view id - * + * @brief Sets view id in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -331,12 +375,9 @@ int autofill_auth_info_get_app_id(autofill_auth_info_h ai, char **app_id); int autofill_auth_info_set_view_id(autofill_auth_info_h ai, const char *view_id); /** - * @brief Get view id - * + * @brief Gets view id in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a view_id must be released using free(). * @param[in] ai The autofill authentication information handle * @param[in] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -346,12 +387,8 @@ int autofill_auth_info_set_view_id(autofill_auth_info_h ai, const char *view_id) int autofill_auth_info_get_view_id(autofill_auth_info_h ai, char **view_id); /** - * @brief Set exist autofill data - * + * @brief Sets exist autofill data in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] exist_autofill_data The autofill data existence * @return 0 on success, otherwise a negative error value @@ -361,12 +398,8 @@ int autofill_auth_info_get_view_id(autofill_auth_info_h ai, char **view_id); int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exist_autofill_data); /** - * @brief Get exist autofill data - * + * @brief Gets exist autofill data in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[out] exist_autofill_data The autofill data existence * @return 0 on success, otherwise a negative error value @@ -376,12 +409,8 @@ int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exi int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *exist_autofill_data); /** - * @brief Set need authentication - * + * @brief Sets need authentication in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] need_authentication The authentication need * @return 0 on success, otherwise a negative error value @@ -391,12 +420,8 @@ int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *ex int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool need_authentication); /** - * @brief Get need authentication - * + * @brief Gets need authentication in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[out] need_authentication The authentication need * @return 0 on success, otherwise a negative error value @@ -406,12 +431,8 @@ int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool nee int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *need_authentication); /** - * @brief Set service name - * + * @brief Sets service name in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] service_name The autofill service name * @return 0 on success, otherwise a negative error value @@ -421,12 +442,9 @@ int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *ne int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *service_name); /** - * @brief Get service name - * + * @brief Gets service name in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a service_name must be released using free(). * @param[in] ai The autofill authentication information handle * @param[out] service_name The autofill service name * @return 0 on success, otherwise a negative error value @@ -436,14 +454,10 @@ int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *ser int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char **service_name); /** - * @brief Set service message - * + * @brief Sets service message in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle - * @param[in] service_name The autofill service message + * @param[in] service_message The autofill service message * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -451,14 +465,11 @@ int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char **service_ int autofill_auth_info_set_service_message(autofill_auth_info_h ai, const char *service_message); /** - * @brief Get service message - * + * @brief Gets service message in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a service_message must be released using free(). * @param[in] ai The autofill authentication information handle - * @param[out] service_name The autofill service message + * @param[out] service_message The autofill service message * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -466,12 +477,8 @@ int autofill_auth_info_set_service_message(autofill_auth_info_h ai, const char * int autofill_auth_info_get_service_message(autofill_auth_info_h ai, char **service_message); /** - * @brief Set service logo image path - * + * @brief Sets service logo image path in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] ai The autofill authentication information handle * @param[in] service_logo_image_path The autofill service logo image path * @return 0 on success, otherwise a negative error value @@ -481,12 +488,9 @@ int autofill_auth_info_get_service_message(autofill_auth_info_h ai, char **servi int autofill_auth_info_set_service_logo_image_path(autofill_auth_info_h ai, const char *service_logo_image_path); /** - * @brief Get service logo image path - * + * @brief Gets service logo image path in autofill authentication information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a service_logo_image_path must be released using free(). * @param[in] ai The autofill authentication information handle * @param[out] service_logo_image_path The autofill service logo image path * @return 0 on success, otherwise a negative error value @@ -495,14 +499,10 @@ int autofill_auth_info_set_service_logo_image_path(autofill_auth_info_h ai, cons */ int autofill_auth_info_get_service_logo_image_path(autofill_auth_info_h ai, char **service_logo_image_path); -// view info /** - * @brief Create autofill view info - * + * @brief Creates autofill view info. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a vi handle must be released with autofill_view_info_destroy(). * @param[out] vi The autofill view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -512,14 +512,9 @@ int autofill_auth_info_get_service_logo_image_path(autofill_auth_info_h ai, char int autofill_view_info_create(autofill_view_info_h *vi); /** - * @brief Destroy autofill view info - * + * @brief Destroys autofill view info. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle - * @param[in] app_id The app ID * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -527,12 +522,8 @@ int autofill_view_info_create(autofill_view_info_h *vi); int autofill_view_info_destroy(autofill_view_info_h vi); /** - * @brief Set app id - * + * @brief Sets app id in autofill view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -542,12 +533,9 @@ int autofill_view_info_destroy(autofill_view_info_h vi); int autofill_view_info_set_app_id(autofill_view_info_h vi, const char *app_id); /** - * @brief Get app id - * + * @brief Gets app id in autofill view information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a app_id must be released using free(). * @param[in] vi The autofill view info handle * @param[out] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -557,12 +545,8 @@ int autofill_view_info_set_app_id(autofill_view_info_h vi, const char *app_id); int autofill_view_info_get_app_id(const autofill_view_info_h vi, char **app_id); /** - * @brief Set view id - * + * @brief Sets view id in autofill view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -572,12 +556,9 @@ int autofill_view_info_get_app_id(const autofill_view_info_h vi, char **app_id); int autofill_view_info_set_view_id(autofill_view_info_h vi, const char *view_id); /** - * @brief Get view id - * + * @brief Gets view id in autofill view information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a view_id must be released using free(). * @param[in] vi The autofill view info handle * @param[out] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -587,12 +568,8 @@ int autofill_view_info_set_view_id(autofill_view_info_h vi, const char *view_id) int autofill_view_info_get_view_id(autofill_view_info_h vi, char **view_id); /** - * @brief Add autofill item - * + * @brief Adds autofill item in autofill view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] it The autofill item handle * @return 0 on success, otherwise a negative error value @@ -602,12 +579,8 @@ int autofill_view_info_get_view_id(autofill_view_info_h vi, char **view_id); int autofill_view_info_add_item(const autofill_view_info_h vi, autofill_item_h it); /** - * @brief Retrieve all items in view info - * + * @brief Retrieves all items in view info. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function @@ -615,16 +588,12 @@ int autofill_view_info_add_item(const autofill_view_info_h vi, autofill_item_h i * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_view_info_foreach_items(autofill_view_info_h vi, bool (*callback)(autofill_item_h item, void *user_data), void *user_data); +int autofill_view_info_foreach_items(autofill_view_info_h vi, autofill_item_cb callback, void *user_data); -// save view info /** - * @brief Create autofill save view - * + * @brief Creates autofill save view. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a vi handle must be released with autofill_save_view_info_destroy() * @param[out] vi The autofill view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -634,12 +603,8 @@ int autofill_view_info_foreach_items(autofill_view_info_h vi, bool (*callback)(a int autofill_save_view_info_create(autofill_save_view_info_h *vi); /** - * @brief Destroy autofill save view - * + * @brief Destroys autofill save view. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -648,12 +613,8 @@ int autofill_save_view_info_create(autofill_save_view_info_h *vi); int autofill_save_view_info_destroy(autofill_save_view_info_h vi); /** - * @brief Set app ID - * + * @brief Sets app ID in autofill save view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -663,12 +624,9 @@ int autofill_save_view_info_destroy(autofill_save_view_info_h vi); int autofill_save_view_info_set_app_id(autofill_save_view_info_h vi, const char *app_id); /** - * @brief Get app ID - * + * @brief Gets app ID in autofill save view information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a app_id must be released using free(). * @param[in] vi The autofill view info handle * @param[out] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -678,12 +636,8 @@ int autofill_save_view_info_set_app_id(autofill_save_view_info_h vi, const char int autofill_save_view_info_get_app_id(const autofill_save_view_info_h vi, char **app_id); /** - * @brief Set view ID - * + * @brief Sets view ID in autofill save view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -693,14 +647,11 @@ int autofill_save_view_info_get_app_id(const autofill_save_view_info_h vi, char int autofill_save_view_info_set_view_id(autofill_save_view_info_h vi, const char *view_id); /** - * @brief Get view ID - * + * @brief Gets view ID in autofill save view information. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a view_id must be released using free(). * @param[in] vi The autofill view info handle - * @param[out] app_id The view ID + * @param[out] view_id The view ID * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter @@ -708,12 +659,8 @@ int autofill_save_view_info_set_view_id(autofill_save_view_info_h vi, const char int autofill_save_view_info_get_view_id(autofill_save_view_info_h vi, char **view_id); /** - * @brief Add autofill save item - * + * @brief Adds autofill save item in autofill save view information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill save view info handle * @param[in] it The autofill save item handle * @return 0 on success, otherwise a negative error value @@ -723,12 +670,8 @@ int autofill_save_view_info_get_view_id(autofill_save_view_info_h vi, char **vie int autofill_save_view_info_add_item(const autofill_save_view_info_h vi, autofill_save_item_h it); /** - * @brief Retrieve all items in save view info - * + * @brief Retrieves all items in save view info. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] vi The autofill view info handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function @@ -736,16 +679,12 @@ int autofill_save_view_info_add_item(const autofill_save_view_info_h vi, autofil * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, bool (*callback)(autofill_save_item_h item, void *user_data), void *user_data); +int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, autofill_save_item_cb callback, void *user_data); -// fill response /** - * @brief Create autofill fill response - * + * @brief Creates autofill fill response. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a h handle must be released with autofill_fill_response_destroy(). * @param[out] h The autofill fill response handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -754,12 +693,8 @@ int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi, bool (*c int autofill_fill_response_create(autofill_fill_response_h *h); /** - * @brief Destroy autofill fill response - * + * @brief Destroys autofill fill response. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -768,12 +703,8 @@ int autofill_fill_response_create(autofill_fill_response_h *h); int autofill_fill_response_destroy(autofill_fill_response_h h); /** - * @brief Set app ID - * + * @brief Sets app ID. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @param[in] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -783,12 +714,9 @@ int autofill_fill_response_destroy(autofill_fill_response_h h); int autofill_fill_response_set_app_id(autofill_fill_response_h h, const char *app_id); /** - * @brief Get app ID - * + * @brief Gets app ID. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a app_id must be released using free(). * @param[in] h The autofill fill response handle * @param[out] app_id The app ID * @return 0 on success, otherwise a negative error value @@ -798,12 +726,8 @@ int autofill_fill_response_set_app_id(autofill_fill_response_h h, const char *ap int autofill_fill_response_get_app_id(autofill_fill_response_h h, char **app_id); /** - * @brief Set view ID - * + * @brief Sets view ID. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @param[in] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -813,12 +737,9 @@ int autofill_fill_response_get_app_id(autofill_fill_response_h h, char **app_id) int autofill_fill_response_set_view_id(autofill_fill_response_h h, const char *view_id); /** - * @brief Get view ID - * + * @brief Gets view ID. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a view_id must be released using free(). * @param[in] h The autofill fill response handle * @param[out] view_id The view ID * @return 0 on success, otherwise a negative error value @@ -828,12 +749,8 @@ int autofill_fill_response_set_view_id(autofill_fill_response_h h, const char *v int autofill_fill_response_get_view_id(autofill_fill_response_h h, char **view_id); /** - * @brief Add autofill fill response group - * + * @brief Adds autofill fill response group. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @param[in] it The autofill fill response group handle * @return 0 on success, otherwise a negative error value @@ -842,13 +759,10 @@ int autofill_fill_response_get_view_id(autofill_fill_response_h h, char **view_i */ int autofill_fill_response_add_group(autofill_fill_response_h h, autofill_fill_response_group_h it); + /** - * @brief Retrieve all groups of each fill response - * + * @brief Retrieves all groups of each fill response. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function @@ -856,15 +770,11 @@ int autofill_fill_response_add_group(autofill_fill_response_h h, autofill_fill_r * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_fill_response_foreach_groups(autofill_fill_response_h h, bool (*callback)(autofill_fill_response_group_h item, void *user_data), void *user_data); +int autofill_fill_response_foreach_groups(autofill_fill_response_h h, autofill_fill_response_group_cb callback, void *user_data); /** - * @brief Get the number of fill response group - * + * @brief Gets the number of fill response group. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @param[out] count The number of group * @return 0 on success, otherwise a negative error value @@ -874,12 +784,9 @@ int autofill_fill_response_foreach_groups(autofill_fill_response_h h, bool (*cal int autofill_fill_response_get_group_count(autofill_fill_response_h h, int *count); /** - * @brief Create autofill fill response group - * + * @brief Creates autofill fill response group. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a h handle must be released with autofill_fill_response_group_destroy(). * @param[out] h The autofill fill response group handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -889,12 +796,8 @@ int autofill_fill_response_get_group_count(autofill_fill_response_h h, int *coun int autofill_fill_response_group_create(autofill_fill_response_group_h *h); /** - * @brief Destroy autofill fill response group - * + * @brief Destroys autofill fill response group. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response group handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -903,12 +806,9 @@ int autofill_fill_response_group_create(autofill_fill_response_group_h *h); int autofill_fill_response_group_destroy(autofill_fill_response_group_h h); /** - * @brief Clone autofill fill response group - * + * @brief Clones autofill fill response group. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a clone handle must be released with autofill_fill_response_group_destroy(). * @param[in] h The autofill fill response group handle * @param[in] clone The autofill fill response group handle to be cloned * @return 0 on success, otherwise a negative error value @@ -918,12 +818,8 @@ int autofill_fill_response_group_destroy(autofill_fill_response_group_h h); int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofill_fill_response_group_h *clone); /** - * @brief Add autofill item - * + * @brief Adds autofill item in autofill fil response group. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response group handle * @param[in] it The autofill fill response item handle * @return 0 on success, otherwise a negative error value @@ -934,12 +830,8 @@ int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofil int autofill_fill_response_group_add_item(autofill_fill_response_group_h h, autofill_fill_response_item_h it); /** - * @brief Retrieve all fill response items of each group - * + * @brief Retrieves all fill response items of each group. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response group handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function @@ -947,16 +839,12 @@ int autofill_fill_response_group_add_item(autofill_fill_response_group_h h, auto * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, bool (*callback)(autofill_fill_response_item_h item, void *user_data), void *user_data); +int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, autofill_fill_response_item_cb callback, void *user_data); -// fill response item /** - * @brief Create autofill response item - * + * @brief Creates autofill response item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a it handle must be released with autofill_fill_response_item_destroy(). * @param[out] it The autofill fill response item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -966,12 +854,8 @@ int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h, int autofill_fill_response_item_create(autofill_fill_response_item_h *it); /** - * @brief Destroy autofill fill response item - * + * @brief Destroys autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill fill response item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -980,12 +864,10 @@ int autofill_fill_response_item_create(autofill_fill_response_item_h *it); int autofill_fill_response_item_destroy(autofill_fill_response_item_h it); /** - * @brief Clone autofill fill response item + * @brief Clones autofill fill response item. * * @since_tizen 5.5 * - * @privlevel public - * * @param[in] it The autofill fill response item handle * @param[in] clone The autofill fill response item handle to be cloned * @return 0 on success, otherwise a negative error value @@ -995,12 +877,8 @@ int autofill_fill_response_item_destroy(autofill_fill_response_item_h it); int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill_fill_response_item_h *clone); /** - * @brief Set autofill ID - * + * @brief Sets autofill ID in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill fill response item handle * @param[in] id The autofill fill response item ID * @return 0 on success, otherwise a negative error value @@ -1010,12 +888,9 @@ int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill int autofill_fill_response_item_set_id(autofill_fill_response_item_h it, const char *id); /** - * @brief Get autofill ID - * + * @brief Gets autofill ID in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a id must be released using free(). * @param[in] it The autofill fill response item handle * @param[out] id The autofill fill response item ID * @return 0 on success, otherwise a negative error value @@ -1025,12 +900,8 @@ int autofill_fill_response_item_set_id(autofill_fill_response_item_h it, const c int autofill_fill_response_item_get_id(autofill_fill_response_item_h it, char **id); /** - * @brief Set autofill value - * + * @brief Sets autofill value in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill fill response item handle * @param[in] value The autofill fill response item value * @return 0 on success, otherwise a negative error value @@ -1040,12 +911,9 @@ int autofill_fill_response_item_get_id(autofill_fill_response_item_h it, char ** int autofill_fill_response_item_set_value(autofill_fill_response_item_h it, const char *value); /** - * @brief Get autofill value - * + * @brief Gets autofill value in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a value must be released using free(). * @param[in] it The autofill fill response item handle * @param[out] value The autofill fill response item value * @return 0 on success, otherwise a negative error value @@ -1055,12 +923,8 @@ int autofill_fill_response_item_set_value(autofill_fill_response_item_h it, cons int autofill_fill_response_item_get_value(autofill_fill_response_item_h it, char **value); /** - * @brief Set presentation text - * + * @brief Sets presentation text in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill fill response item handle * @param[in] presentation_text The presentation text * @return 0 on success, otherwise a negative error value @@ -1070,28 +934,21 @@ int autofill_fill_response_item_get_value(autofill_fill_response_item_h it, char int autofill_fill_response_item_set_presentation_text(autofill_fill_response_item_h it, const char *presentation_text); /** - * @brief Get presentation text - * + * @brief Gets presentation text in autofill fill response item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a presentation_text must be released using free(). * @param[in] it The autofill fill response item handle * @param[out] presentation_text The presentation text * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_fill_response_item_get_presentation_text(autofill_fill_response_item_h it, char ** presentation_text); +int autofill_fill_response_item_get_presentation_text(autofill_fill_response_item_h it, char **presentation_text); -// save item /** - * @brief Create autofill save item - * + * @brief Creates autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks If the function succeeds, @a it handle must be released with autofill_save_item_destroy(). * @param[out] it The autofill save item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -1100,12 +957,8 @@ int autofill_fill_response_item_get_presentation_text(autofill_fill_response_ite int autofill_save_item_create(autofill_save_item_h *it); /** - * @brief Destroy autofill save item - * + * @brief Destroys autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -1114,27 +967,19 @@ int autofill_save_item_create(autofill_save_item_h *it); int autofill_save_item_destroy(autofill_save_item_h it); /** - * @brief Clone autofill item - * + * @brief Clones autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[in] clone The autofill save item handle to be cloned * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_save_item_clone(autofill_save_item_h h, autofill_save_item_h *clone); +int autofill_save_item_clone(autofill_save_item_h it, autofill_save_item_h *clone); /** - * @brief Set autofill hint (id(username), name, password, phone, credit card number, organization, so on) - * + * @brief Sets autofill hint (id(username), name, password, phone, credit card number, organization, so on) in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[in] hint The autofill hint * @return 0 on success, otherwise a negative error value @@ -1144,12 +989,8 @@ int autofill_save_item_clone(autofill_save_item_h h, autofill_save_item_h *clone int autofill_save_item_set_autofill_hint(autofill_save_item_h it, autofill_hint_e hint); /** - * @brief Get autofill hint - * + * @brief Gets autofill hint in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[out] hint The autofill hint * @return 0 on success, otherwise a negative error value @@ -1159,12 +1000,8 @@ int autofill_save_item_set_autofill_hint(autofill_save_item_h it, autofill_hint_ int autofill_save_item_get_autofill_hint(autofill_save_item_h it, autofill_hint_e *hint); /** - * @brief Set autofill ID - * + * @brief Sets autofill ID in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[in] id The autofill ID * @return 0 on success, otherwise a negative error value @@ -1174,12 +1011,9 @@ int autofill_save_item_get_autofill_hint(autofill_save_item_h it, autofill_hint_ int autofill_save_item_set_id(autofill_save_item_h it, const char *id); /** - * @brief Get autofill ID - * + * @brief Gets autofill ID in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a id must be released using free(). * @param[in] it The autofill save item handle * @param[out] id The autofill ID * @return 0 on success, otherwise a negative error value @@ -1189,12 +1023,8 @@ int autofill_save_item_set_id(autofill_save_item_h it, const char *id); int autofill_save_item_get_id(autofill_save_item_h it, char **id); /** - * @brief Set autofill label - * + * @brief Sets autofill label in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[out] label The autofill label * @return 0 on success, otherwise a negative error value @@ -1204,12 +1034,9 @@ int autofill_save_item_get_id(autofill_save_item_h it, char **id); int autofill_save_item_set_label(autofill_save_item_h it, const char *label); /** - * @brief Get autofill label - * + * @brief Gets autofill label in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a label must be released using free(). * @param[in] it The autofill save item handle * @param[out] label The autofill label * @return 0 on success, otherwise a negative error value @@ -1219,12 +1046,8 @@ int autofill_save_item_set_label(autofill_save_item_h it, const char *label); int autofill_save_item_get_label(autofill_save_item_h it, char **label); /** - * @brief Set sensitive data - * + * @brief Sets sensitive data in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[in] sensitive The sensitive data or not * @return 0 on success, otherwise a negative error value @@ -1234,12 +1057,8 @@ int autofill_save_item_get_label(autofill_save_item_h it, char **label); int autofill_save_item_set_sensitive_data(autofill_save_item_h it, bool sensitive); /** - * @brief Get sensitive data - * + * @brief Gets sensitive data in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[out] sensitive The sensitive data or not * @return 0 on success, otherwise a negative error value @@ -1249,12 +1068,8 @@ int autofill_save_item_set_sensitive_data(autofill_save_item_h it, bool sensitiv int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bool *sensitive); /** - * @brief Set autofill value - * + * @brief Sets autofill value in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] it The autofill save item handle * @param[in] value The autofill value * @return 0 on success, otherwise a negative error value @@ -1264,12 +1079,9 @@ int autofill_save_item_get_sensitive_data(autofill_save_item_h it, bool *sensiti int autofill_save_item_set_value(autofill_save_item_h it, const char *value); /** - * @brief Get autofill value - * + * @brief Gets autofill value in autofill save item. * @since_tizen 5.5 - * - * @privlevel public - * + * @remarks @a value must be released using free(). * @param[in] it The autofill save item handle * @param[out] value The autofill value * @return 0 on success, otherwise a negative error value diff --git a/include/autofill_enum.h b/include/autofill_enum.h deleted file mode 100644 index c80d98a..0000000 --- a/include/autofill_enum.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __TIZEN_UIX_AUTOFILL_ENUM_H__ -#define __TIZEN_UIX_AUTOFILL_ENUM_H__ - -typedef enum -{ - AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, /**< Autofill hint for a credit card expiration date */ - AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, /**< Autofill hint for a credit card expiration day */ - AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, /**< Autofill hint for a credit card expiration month */ - AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, /**< Autofill hint for a credit card expiration year */ - AUTOFILL_HINT_CREDIT_CARD_NUMBER, /**< Autofill hint for a credit card number */ - AUTOFILL_HINT_EMAIL_ADDRESS, /**< Autofill hint for an email address */ - AUTOFILL_HINT_NAME, /**< Autofill hint for a user's real name */ - AUTOFILL_HINT_PHONE, /**< Autofill hint for a phone number */ - AUTOFILL_HINT_POSTAL_ADDRESS, /**< Autofill hint for a postal address */ - AUTOFILL_HINT_POSTAL_CODE, /**< Autofill hint for a postal code */ - AUTOFILL_HINT_ID /**< Autofill hint for a user's ID */ -} autofill_hint_e; - -#endif diff --git a/include/autofill_private.h b/include/autofill_private.h index a552da0..435092a 100644 --- a/include/autofill_private.h +++ b/include/autofill_private.h @@ -18,7 +18,6 @@ #define __TIZEN_UIX_AUTOFILL_PRIVATE_H__ #include -#include "autofill_enum.h" struct autofill_view_info_s { char *app_id; // app ID diff --git a/include/autofill_service.h b/include/autofill_service.h index 09d1984..bbfe6aa 100644 --- a/include/autofill_service.h +++ b/include/autofill_service.h @@ -22,8 +22,7 @@ * @brief This file contains autofill APIs and related enumeration. */ -#include "autofill_enum.h" -#include "autofill_common.h" +#include #ifdef __cplusplus extern "C" { @@ -34,71 +33,74 @@ extern "C" { * @{ */ -//typedef autofill_client_s *autofill_client_h; - /** -* @brief Called when the connection status is changed. -* @since_tizen 5.5 -* @param[in] status The connection status -* @param[in] user_data The user data passed from the callback function -* @see autofill_initialize() -* @see autofill_deinitialize() -*/ -//typedef void(*autofill_service_connection_status_changed_cb)(autofill_service_connection_status_e status, void* user_data); - + * @brief Called when receiving authenticaton information request. + * @since_tizen 5.5 + * @remarks @a vi should not be freed and can be used only in the callback. + * @param[in] vi The autofill view info handle + * @param[in] user_data The user data passed from the callback function + * @see autofill_service_set_auth_info_request_cb() + */ typedef void (*autofill_service_auth_info_request_cb)(autofill_view_info_h vi, void *user_data); +/** + * @brief Called when receiving fill request. + * @since_tizen 5.5 + * @remarks @a vi should not be freed and can be used only in the callback. + * @param[in] vi The autofill view info handle + * @param[in] user_data The user data passed from the callback function + * @see autofill_service_set_auth_info_request_cb() + */ typedef void (*autofill_service_fill_request_cb)(autofill_view_info_h vi, void *user_data); +/** + * @brief Called when receiving commit request. + * @since_tizen 5.5 + * @remarks @a vi should not be freed and can be used only in the callback. + * @param[in] vi The autofill save view info handle + * @param[in] user_data The user data passed from the callback function + * @see autofill_service_set_commit_cb() + */ typedef void (*autofill_service_commit_cb)(autofill_save_view_info_h vi, void *user_data); -// initialize / deinitialize /** - * @brief Initialize autofill service library - * + * @brief Initializes autofill service library. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_service_initialize(); +int autofill_service_initialize(void); /** - * @brief Deinitialize autofill service library - * + * @brief Deinitializes autofill service library. * @since_tizen 5.5 - * - * @privlevel public - * * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_service_deinitialize(); +int autofill_service_deinitialize(void); -// auth /** - * @brief Register the callback to receive the request of authentication information - * + * @brief Sets the callback to receive the request of authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error + * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ int autofill_service_set_auth_info_request_cb(autofill_service_auth_info_request_cb callback, void *user_data); /** - * @brief Send the authentication information - * + * @brief Unsets the callback to receive the request of authentication information. + * @since_tizen 5.5 + * @return 0 on success, otherwise a negative error value + * @retval #AUTOFILL_ERROR_NONE No error + */ +int autofill_service_unset_auth_info_request_cb(void); + +/** + * @brief Sends the authentication information. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill authentication info handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -106,28 +108,28 @@ int autofill_service_set_auth_info_request_cb(autofill_service_auth_info_request */ int autofill_service_send_auth_info(autofill_auth_info_h h); -// fill request /** - * @brief Register the callback to receive the fill request - * + * @brief Sets the callback to receive the fill request. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error + * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ int autofill_service_set_fill_request_cb(autofill_service_fill_request_cb callback, void *user_data); /** - * @brief Send the fill response - * + * @brief Unsets the callback to receive the fill request. + * @since_tizen 5.5 + * @return 0 on success, otherwise a negative error value + * @retval #AUTOFILL_ERROR_NONE No error + */ +int autofill_service_unset_fill_request_cb(void); + +/** + * @brief Sends the fill response. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] h The autofill fill response handle * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error @@ -136,20 +138,25 @@ int autofill_service_set_fill_request_cb(autofill_service_fill_request_cb callba int autofill_service_send_fill_response(autofill_fill_response_h h); /** - * @brief Register the callback to receive the commit request - * + * @brief Sets the callback to receive the commit request. * @since_tizen 5.5 - * - * @privlevel public - * * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error + * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ int autofill_service_set_commit_cb(autofill_service_commit_cb callback, void *user_data); /** + * @brief Unsets the callback to receive the commit request. + * @since_tizen 5.5 + * @return 0 on success, otherwise a negative error value + * @retval #AUTOFILL_ERROR_NONE No error + */ +int autofill_service_unset_commit_cb(void); + +/** * @} */ diff --git a/packaging/capi-ui-autofill.spec b/packaging/capi-ui-autofill.spec index 51f7e32..2c5f59c 100644 --- a/packaging/capi-ui-autofill.spec +++ b/packaging/capi-ui-autofill.spec @@ -138,7 +138,6 @@ mkdir -p %{TZ_SYS_RO_APP}/org.tizen.autofill-daemon %files -n capi-ui-autofill-common-devel %{_includedir}/autofill_common*.h -%{_includedir}/autofill_enum.h %{_libdir}/pkgconfig/capi-ui-autofill-common.pc %{_libdir}/libcapi-ui-autofill-common.so diff --git a/service_lib/autofill_service.c b/service_lib/autofill_service.c index 7d41a96..94714d4 100644 --- a/service_lib/autofill_service.c +++ b/service_lib/autofill_service.c @@ -371,7 +371,7 @@ static void __message_unregister(rpc_port_stub_AutofillSvcPort_context_h context __destroy_client(client); } -EXPORT_API int autofill_service_initialize() +EXPORT_API int autofill_service_initialize(void) { LOGD("autofill service initialize"); @@ -396,7 +396,7 @@ EXPORT_API int autofill_service_initialize() return ret; } -EXPORT_API int autofill_service_deinitialize() +EXPORT_API int autofill_service_deinitialize(void) { LOGD("autofill service deinitialize"); @@ -411,12 +411,23 @@ EXPORT_API int autofill_service_deinitialize() EXPORT_API int autofill_service_set_auth_info_request_cb(autofill_service_auth_info_request_cb callback, void *user_data) { + if (!callback) + return AUTOFILL_ERROR_INVALID_PARAMETER; + g_autofill_service_auth_info_request_cb = callback; g_autofill_service_auth_info_request_data = user_data; return AUTOFILL_ERROR_NONE; } +EXPORT_API int autofill_service_unset_auth_info_request_cb() +{ + g_autofill_service_auth_info_request_cb = NULL; + g_autofill_service_auth_info_request_data = NULL; + + return AUTOFILL_ERROR_NONE; +} + EXPORT_API int autofill_service_send_auth_info(autofill_auth_info_h h) { bool exist_autofill_data; @@ -478,12 +489,23 @@ EXPORT_API int autofill_service_send_auth_info(autofill_auth_info_h h) // fill request EXPORT_API int autofill_service_set_fill_request_cb(autofill_service_fill_request_cb callback, void *user_data) { + if (!callback) + return AUTOFILL_ERROR_INVALID_PARAMETER; + g_autofill_service_fill_request_cb = callback; g_autofill_service_fill_request_data = user_data; return AUTOFILL_ERROR_NONE; } +EXPORT_API int autofill_service_unset_fill_request_cb() +{ + g_autofill_service_fill_request_cb = NULL; + g_autofill_service_fill_request_data = NULL; + + return AUTOFILL_ERROR_NONE; +} + bool __fill_response_item_cb(autofill_fill_response_item_h it, void * user_data) { char *id = NULL; @@ -570,8 +592,19 @@ EXPORT_API int autofill_service_send_fill_response(autofill_fill_response_h h) EXPORT_API int autofill_service_set_commit_cb(autofill_service_commit_cb callback, void *user_data) { + if (!callback) + return AUTOFILL_ERROR_INVALID_PARAMETER; + g_autofill_service_commit_cb = callback; g_autofill_service_commit_data = user_data; - return AUTOFILL_ERROR_NONE; + return AUTOFILL_ERROR_NONE; +} + +EXPORT_API int autofill_service_unset_commit_cb(void) +{ + g_autofill_service_commit_cb = NULL; + g_autofill_service_commit_data = NULL; + + return AUTOFILL_ERROR_NONE; } -- 2.7.4