From a145adac7496851d48292c2444b79e50a230f6bb Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 29 Nov 2018 17:29:02 +0900 Subject: [PATCH] Change API name Change-Id: Idba7235f9144a684672d4fda28e6be9486a72275 Signed-off-by: Jihoon Kim --- client/autofill.c | 22 +++++++------- client/autofill_auth.c | 10 +++---- client/autofill_fill_request.c | 10 +++---- include/autofill.h | 16 +++++----- include/autofill_service.h | 24 +++++++-------- server/main.c | 34 +++++++++++----------- service_lib/autofill_service.c | 66 +++++++++++++++++++++--------------------- tidl/autofill.tidl | 6 ++-- 8 files changed, 94 insertions(+), 94 deletions(-) diff --git a/client/autofill.c b/client/autofill.c index 9e3345a..f0964bb 100644 --- a/client/autofill.c +++ b/client/autofill.c @@ -37,10 +37,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_received_cb g_autofill_fill_response_received_cb; extern void *g_autofill_fill_response_data; -extern autofill_auth_info_cb g_autofill_auth_info_cb; +extern autofill_auth_info_received_cb g_autofill_auth_info_received_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) @@ -118,8 +118,8 @@ static void __fill_response_recv_cb(void *user_data, rpc_port_autofill_fill_resp rpc_port_autofill_fill_response_foreach_response_groups(response_h, fill_response_group_cb, rh); - if (g_autofill_fill_response_cb) - g_autofill_fill_response_cb(rh, g_autofill_fill_response_data); + if (g_autofill_fill_response_received_cb) + g_autofill_fill_response_received_cb(rh, g_autofill_fill_response_data); autofill_fill_response_destroy(rh); } @@ -164,8 +164,8 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_auth_info_h a if (service_message) free(service_message); - if (g_autofill_auth_info_cb) - g_autofill_auth_info_cb(ah, g_autofill_fill_response_data); + if (g_autofill_auth_info_received_cb) + g_autofill_auth_info_received_cb(ah, g_autofill_fill_response_data); autofill_auth_info_destroy(ah); } @@ -173,10 +173,10 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_auth_info_h a static void __on_connected(rpc_port_proxy_AutofillAppPort_h h, void *user_data) { LOGI("[__RPC_PORT__] connected"); - rpc_port_AutofillAppPort_autofill_fill_response_cb_h fill_response_cb = rpc_port_AutofillAppPort_autofill_fill_response_cb_create(__fill_response_recv_cb, false, NULL); - rpc_port_AutofillAppPort_autofill_auth_info_cb_h auth_info_cb = rpc_port_AutofillAppPort_autofill_auth_info_cb_create(__auth_info_recv_cb, false, NULL); + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_h fill_response_received_cb = rpc_port_AutofillAppPort_autofill_fill_response_received_cb_create(__fill_response_recv_cb, false, NULL); + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_h auth_info_received_cb = rpc_port_AutofillAppPort_autofill_auth_info_received_cb_create(__auth_info_recv_cb, false, NULL); - int r = rpc_port_proxy_AutofillAppPort_invoke_Register(h, auth_info_cb, fill_response_cb); + int r = rpc_port_proxy_AutofillAppPort_invoke_Register(h, auth_info_received_cb, fill_response_received_cb); if (r != 0) LOGD("Failed to invoke Register"); @@ -235,8 +235,8 @@ EXPORT_API int autofill_deinitialize(void) LOGD("autofill deinitialize"); connection_callback = NULL; - g_autofill_fill_response_cb = NULL; - g_autofill_auth_info_cb = NULL; + g_autofill_fill_response_received_cb = NULL; + g_autofill_auth_info_received_cb = NULL; if (rpc_h) { rpc_port_proxy_AutofillAppPort_destroy(rpc_h); diff --git a/client/autofill_auth.c b/client/autofill_auth.c index 6e64ffe..1d0e204 100644 --- a/client/autofill_auth.c +++ b/client/autofill_auth.c @@ -32,7 +32,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_received_cb g_autofill_auth_info_received_cb = NULL; void *g_autofill_auth_info_data = NULL; // Request autofill auth info @@ -107,22 +107,22 @@ EXPORT_API int autofill_auth_info_request(autofill_view_info_h vi) return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_data) +EXPORT_API int autofill_auth_info_set_received_cb(autofill_auth_info_received_cb callback, void *user_data) { if (!callback) { LOGW("parameter is NULL"); return AUTOFILL_ERROR_INVALID_PARAMETER; } - g_autofill_auth_info_cb = callback; + g_autofill_auth_info_received_cb = callback; g_autofill_auth_info_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_auth_info_unset_callback(void) +EXPORT_API int autofill_auth_info_unset_received_cb(void) { - g_autofill_auth_info_cb = NULL; + g_autofill_auth_info_received_cb = NULL; g_autofill_auth_info_data = NULL; return AUTOFILL_ERROR_NONE; diff --git a/client/autofill_fill_request.c b/client/autofill_fill_request.c index 1a9d289..e340679 100644 --- a/client/autofill_fill_request.c +++ b/client/autofill_fill_request.c @@ -31,7 +31,7 @@ extern rpc_port_proxy_AutofillAppPort_h rpc_h; -autofill_fill_response_cb g_autofill_fill_response_cb = NULL; +autofill_fill_response_received_cb g_autofill_fill_response_received_cb = NULL; void *g_autofill_fill_response_data = NULL; EXPORT_API int autofill_fill_request(autofill_view_info_h vi) @@ -103,22 +103,22 @@ EXPORT_API int autofill_fill_request(autofill_view_info_h vi) return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void *user_data) +EXPORT_API int autofill_fill_response_set_received_cb(autofill_fill_response_received_cb callback, void *user_data) { if (!callback) { LOGW("parameter is NULL"); return AUTOFILL_ERROR_INVALID_PARAMETER; } - g_autofill_fill_response_cb = callback; + g_autofill_fill_response_received_cb = callback; g_autofill_fill_response_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_fill_response_unset_callback(void) +EXPORT_API int autofill_fill_response_unset_received_cb(void) { - g_autofill_fill_response_cb = NULL; + g_autofill_fill_response_received_cb = NULL; g_autofill_fill_response_data = NULL; return AUTOFILL_ERROR_NONE; diff --git a/include/autofill.h b/include/autofill.h index 1fd278f..abfd656 100644 --- a/include/autofill.h +++ b/include/autofill.h @@ -58,9 +58,9 @@ typedef void(*autofill_connection_status_changed_cb)(autofill_connection_status_ * @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() + * @see autofill_fill_response_set_received_cb() */ -typedef void (*autofill_fill_response_cb)(autofill_fill_response_h fill_response_h, void *user_data); +typedef void (*autofill_fill_response_received_cb)(autofill_fill_response_h fill_response_h, void *user_data); /** * @brief Called when receiving the authentication information. @@ -68,9 +68,9 @@ typedef void (*autofill_fill_response_cb)(autofill_fill_response_h fill_response * @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() + * @see autofill_fill_response_set_received_cb() */ -typedef void (*autofill_auth_info_cb)(autofill_auth_info_h auth_info, void *user_data); +typedef void (*autofill_auth_info_received_cb)(autofill_auth_info_h auth_info, void *user_data); /** * @brief Initializes autofill. @@ -123,7 +123,7 @@ int autofill_auth_info_request(autofill_view_info_h vi); * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_data); +int autofill_auth_info_set_received_cb(autofill_auth_info_received_cb callback, void *user_data); /** * @brief Unsets the callback to receive the authentication information. @@ -131,7 +131,7 @@ int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_d * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_auth_info_unset_callback(void); +int autofill_auth_info_unset_received_cb(void); /** * @brief Sends fill request to fill out each input form. @@ -154,7 +154,7 @@ int autofill_fill_request(autofill_view_info_h vi); * @retval #AUTOFILL_ERROR_NONE No error * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter */ -int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void *user_data); +int autofill_fill_response_set_received_cb(autofill_fill_response_received_cb callback, void *user_data); /** * @brief Unsets the callback to receive autofill fill response. @@ -162,7 +162,7 @@ int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_fill_response_unset_callback(void); +int autofill_fill_response_unset_received_cb(void); /** * @brief Sends the autofill save view info. diff --git a/include/autofill_service.h b/include/autofill_service.h index 909c935..9fbc847 100644 --- a/include/autofill_service.h +++ b/include/autofill_service.h @@ -39,9 +39,9 @@ extern "C" { * @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() + * @see autofill_service_set_auth_info_requested_cb() */ -typedef void (*autofill_service_auth_info_request_cb)(autofill_view_info_h vi, void *user_data); +typedef void (*autofill_service_auth_info_requested_cb)(autofill_view_info_h vi, void *user_data); /** * @brief Called when receiving fill request. @@ -49,9 +49,9 @@ typedef void (*autofill_service_auth_info_request_cb)(autofill_view_info_h vi, v * @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() + * @see autofill_service_set_auth_info_requested_cb() */ -typedef void (*autofill_service_fill_request_cb)(autofill_view_info_h vi, void *user_data); +typedef void (*autofill_service_fill_requested_cb)(autofill_view_info_h vi, void *user_data); /** * @brief Called when receiving commit request. @@ -59,9 +59,9 @@ typedef void (*autofill_service_fill_request_cb)(autofill_view_info_h vi, void * * @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() + * @see autofill_service_set_commited_cb() */ -typedef void (*autofill_service_commit_cb)(autofill_save_view_info_h vi, void *user_data); +typedef void (*autofill_service_commited_cb)(autofill_save_view_info_h vi, void *user_data); /** * @brief Initializes autofill service library. @@ -88,7 +88,7 @@ int autofill_service_deinitialize(void); * @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); +int autofill_service_set_auth_info_requested_cb(autofill_service_auth_info_requested_cb callback, void *user_data); /** * @brief Unsets the callback to receive the request of authentication information. @@ -96,7 +96,7 @@ int autofill_service_set_auth_info_request_cb(autofill_service_auth_info_request * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_service_unset_auth_info_request_cb(void); +int autofill_service_unset_auth_info_requested_cb(void); /** * @brief Sends the authentication information. @@ -117,7 +117,7 @@ int autofill_service_send_auth_info(autofill_auth_info_h h); * @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); +int autofill_service_set_fill_requested_cb(autofill_service_fill_requested_cb callback, void *user_data); /** * @brief Unsets the callback to receive the fill request. @@ -125,7 +125,7 @@ int autofill_service_set_fill_request_cb(autofill_service_fill_request_cb callba * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_service_unset_fill_request_cb(void); +int autofill_service_unset_fill_requested_cb(void); /** * @brief Sends the fill response. @@ -146,7 +146,7 @@ int autofill_service_send_fill_response(autofill_fill_response_h h); * @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); +int autofill_service_set_commited_cb(autofill_service_commited_cb callback, void *user_data); /** * @brief Unsets the callback to receive the commit request. @@ -154,7 +154,7 @@ int autofill_service_set_commit_cb(autofill_service_commit_cb callback, void *us * @return 0 on success, otherwise a negative error value * @retval #AUTOFILL_ERROR_NONE No error */ -int autofill_service_unset_commit_cb(void); +int autofill_service_unset_commited_cb(void); /** * @} diff --git a/server/main.c b/server/main.c index 3dd468e..6c9e316 100644 --- a/server/main.c +++ b/server/main.c @@ -36,8 +36,8 @@ static rpc_port_proxy_AutofillSvcPort_h rpc_h = NULL; typedef struct { char *app_id; - rpc_port_AutofillAppPort_autofill_auth_info_cb_h auth_info_cb; - rpc_port_AutofillAppPort_autofill_fill_response_cb_h fill_response_cb; + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_h auth_info_cb; + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_h fill_response_received_cb; } autofill_client_s; static GList *__client_list = NULL; @@ -68,8 +68,8 @@ get_autofill_client(const char *app_id) } static autofill_client_s *__create_client(const char *app_id, - rpc_port_AutofillAppPort_autofill_auth_info_cb_h auth_info_cb, - rpc_port_AutofillAppPort_autofill_fill_response_cb_h fill_response_cb) + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_h auth_info_cb, + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_h fill_response_received_cb) { LOGD(""); autofill_client_s *handle; @@ -87,7 +87,7 @@ static autofill_client_s *__create_client(const char *app_id, return NULL; } - rpc_port_AutofillAppPort_autofill_auth_info_cb_clone(auth_info_cb, &handle->auth_info_cb); + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_clone(auth_info_cb, &handle->auth_info_cb); if (!handle->auth_info_cb) { LOGE("Out of memory"); free(handle->app_id); @@ -95,12 +95,12 @@ static autofill_client_s *__create_client(const char *app_id, return NULL; } - rpc_port_AutofillAppPort_autofill_fill_response_cb_clone(fill_response_cb, &handle->fill_response_cb); + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_clone(fill_response_received_cb, &handle->fill_response_received_cb); - if (!handle->fill_response_cb) { + if (!handle->fill_response_received_cb) { LOGE("Out of memory"); free(handle->app_id); - rpc_port_AutofillAppPort_autofill_auth_info_cb_destroy(handle->auth_info_cb); + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_destroy(handle->auth_info_cb); free(handle); return NULL; } @@ -117,10 +117,10 @@ static void __destroy_client(gpointer data) return; if (handle->auth_info_cb) - rpc_port_AutofillAppPort_autofill_auth_info_cb_destroy(handle->auth_info_cb); + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_destroy(handle->auth_info_cb); - if (handle->fill_response_cb) - rpc_port_AutofillAppPort_autofill_fill_response_cb_destroy(handle->fill_response_cb); + if (handle->fill_response_received_cb) + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_destroy(handle->fill_response_received_cb); if (handle->app_id) free(handle->app_id); @@ -173,7 +173,7 @@ static void __message_terminate(rpc_port_stub_AutofillAppPort_context_h context, __remove_client(context); } -static int __message_register(rpc_port_stub_AutofillAppPort_context_h context, rpc_port_AutofillAppPort_autofill_auth_info_cb_h auth_info_cb, rpc_port_AutofillAppPort_autofill_fill_response_cb_h fill_response_cb, void *user_data) +static int __message_register(rpc_port_stub_AutofillAppPort_context_h context, rpc_port_AutofillAppPort_autofill_auth_info_received_cb_h auth_info_cb, rpc_port_AutofillAppPort_autofill_fill_response_received_cb_h fill_response_received_cb, void *user_data) { LOGD(""); char *sender = NULL; @@ -185,7 +185,7 @@ static int __message_register(rpc_port_stub_AutofillAppPort_context_h context, r LOGD("sender(%s)", sender); - client = __create_client(sender, auth_info_cb, fill_response_cb); + client = __create_client(sender, auth_info_cb, fill_response_received_cb); free(sender); if (!client) @@ -477,7 +477,7 @@ static void __fill_response_recv_cb(void *user_data, rpc_port_autofill_svc_fill_ autofill_client_s *sender_client = get_autofill_client(app_id); if (sender_client) - rpc_port_AutofillAppPort_autofill_fill_response_cb_invoke(sender_client->fill_response_cb, fill_response_h); + rpc_port_AutofillAppPort_autofill_fill_response_received_cb_invoke(sender_client->fill_response_received_cb, fill_response_h); rpc_port_autofill_fill_response_destroy(fill_response_h); @@ -520,7 +520,7 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_svc_auth_info autofill_client_s *sender_client = get_autofill_client(app_id); if (sender_client) - rpc_port_AutofillAppPort_autofill_auth_info_cb_invoke(sender_client->auth_info_cb, auth_info_h); + rpc_port_AutofillAppPort_autofill_auth_info_received_cb_invoke(sender_client->auth_info_cb, auth_info_h); rpc_port_autofill_auth_info_destroy(auth_info_h); @@ -544,10 +544,10 @@ static void __on_connected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data) { LOGI("[__RPC_PORT__] connected"); - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_cb_h = rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_create(__fill_response_recv_cb, false, NULL); + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_received_cb_h = rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_create(__fill_response_recv_cb, false, NULL); rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h auth_info_cb_h = rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_create(__auth_info_recv_cb, false, NULL); - int r = rpc_port_proxy_AutofillSvcPort_invoke_Register(h, auth_info_cb_h, fill_response_cb_h); + int r = rpc_port_proxy_AutofillSvcPort_invoke_Register(h, auth_info_cb_h, fill_response_received_cb_h); if (r != 0) LOGD("Failed to invoke Register"); } diff --git a/service_lib/autofill_service.c b/service_lib/autofill_service.c index f39d132..bd597cd 100644 --- a/service_lib/autofill_service.c +++ b/service_lib/autofill_service.c @@ -33,23 +33,23 @@ #endif #define LOG_TAG "AUTOFILL_SERVICE" -static autofill_service_fill_request_cb g_autofill_service_fill_request_cb; +static autofill_service_fill_requested_cb g_autofill_service_fill_requested_cb; static void *g_autofill_service_fill_request_data = NULL; -static autofill_service_auth_info_request_cb g_autofill_service_auth_info_request_cb; +static autofill_service_auth_info_requested_cb g_autofill_service_auth_info_requested_cb; static void *g_autofill_service_auth_info_request_data = NULL; -static autofill_service_commit_cb g_autofill_service_commit_cb; +static autofill_service_commited_cb g_autofill_service_commited_cb; static void *g_autofill_service_commit_data = NULL; rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h g_auth_info_cb; -rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h g_fill_response_cb; +rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h g_fill_response_received_cb; typedef struct { char *app_id; rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h auth_info_cb; - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_cb; + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_received_cb; } autofill_svc_s; static GList *__client_list = NULL; @@ -173,8 +173,8 @@ static void __auth_info_request_cb(rpc_port_stub_AutofillSvcPort_context_h conte rpc_port_autofill_svc_view_info_foreach_items(vi, __autofill_item_cb, view_info); - if (g_autofill_service_auth_info_request_cb) - g_autofill_service_auth_info_request_cb(view_info, g_autofill_service_auth_info_request_data); + if (g_autofill_service_auth_info_requested_cb) + g_autofill_service_auth_info_requested_cb(view_info, g_autofill_service_auth_info_request_data); autofill_view_info_destroy(view_info); @@ -202,8 +202,8 @@ static void __autofill_fill_request_cb(rpc_port_stub_AutofillSvcPort_context_h c rpc_port_autofill_svc_view_info_foreach_items(vi, __autofill_item_cb, view_info); - if (g_autofill_service_fill_request_cb) - g_autofill_service_fill_request_cb(view_info, g_autofill_service_auth_info_request_data); + if (g_autofill_service_fill_requested_cb) + g_autofill_service_fill_requested_cb(view_info, g_autofill_service_auth_info_request_data); autofill_view_info_destroy(view_info); @@ -228,8 +228,8 @@ static void __autofill_commit_cb(rpc_port_stub_AutofillSvcPort_context_h context rpc_port_autofill_svc_save_view_info_foreach_items(vi, __save_item_cb, view_info); - if (g_autofill_service_commit_cb) - g_autofill_service_commit_cb(view_info, g_autofill_service_commit_data); + if (g_autofill_service_commited_cb) + g_autofill_service_commited_cb(view_info, g_autofill_service_commit_data); autofill_save_view_info_destroy(view_info); @@ -241,7 +241,7 @@ static void __autofill_commit_cb(rpc_port_stub_AutofillSvcPort_context_h context static autofill_svc_s *__create_client(const char *app_id, rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h auth_info_cb, - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_cb) + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_received_cb) { LOGD(""); autofill_svc_s *handle; @@ -267,9 +267,9 @@ static autofill_svc_s *__create_client(const char *app_id, return NULL; } - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_clone(fill_response_cb, &handle->fill_response_cb); + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_clone(fill_response_received_cb, &handle->fill_response_received_cb); - if (!handle->fill_response_cb) { + if (!handle->fill_response_received_cb) { LOGE("Out of memory"); free(handle->app_id); rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_destroy(handle->auth_info_cb); @@ -291,8 +291,8 @@ static void __destroy_client(gpointer data) if (handle->auth_info_cb) rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_destroy(handle->auth_info_cb); - if (handle->fill_response_cb) - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_destroy(handle->fill_response_cb); + if (handle->fill_response_received_cb) + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_destroy(handle->fill_response_received_cb); if (handle->app_id) free(handle->app_id); @@ -328,7 +328,7 @@ static void __message_terminate(rpc_port_stub_AutofillSvcPort_context_h context, free(sender); } -static int __message_register(rpc_port_stub_AutofillSvcPort_context_h context, rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h auth_info_cb, rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_cb, void *user_data) +static int __message_register(rpc_port_stub_AutofillSvcPort_context_h context, rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_h auth_info_cb, rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_h fill_response_received_cb, void *user_data) { LOGD(""); char *sender = NULL; @@ -340,16 +340,16 @@ static int __message_register(rpc_port_stub_AutofillSvcPort_context_h context, r LOGD("sender(%s)", sender); autofill_svc_s *client; - client = __create_client(sender, auth_info_cb, fill_response_cb); + client = __create_client(sender, auth_info_cb, fill_response_received_cb); free(sender); if (!client) return -1; rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_clone(auth_info_cb, &g_auth_info_cb); - rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_clone(fill_response_cb, &g_fill_response_cb); + rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_clone(fill_response_received_cb, &g_fill_response_received_cb); - LOGD("auth info : %p, fill response : %p", g_auth_info_cb, g_fill_response_cb); + LOGD("auth info : %p, fill response : %p", g_auth_info_cb, g_fill_response_received_cb); __client_list = g_list_append(__client_list, client); @@ -411,20 +411,20 @@ EXPORT_API int autofill_service_deinitialize(void) return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_service_set_auth_info_request_cb(autofill_service_auth_info_request_cb callback, void *user_data) +EXPORT_API int autofill_service_set_auth_info_requested_cb(autofill_service_auth_info_requested_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_requested_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() +EXPORT_API int autofill_service_unset_auth_info_requested_cb() { - g_autofill_service_auth_info_request_cb = NULL; + g_autofill_service_auth_info_requested_cb = NULL; g_autofill_service_auth_info_request_data = NULL; return AUTOFILL_ERROR_NONE; @@ -490,20 +490,20 @@ 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) +EXPORT_API int autofill_service_set_fill_requested_cb(autofill_service_fill_requested_cb callback, void *user_data) { if (!callback) return AUTOFILL_ERROR_INVALID_PARAMETER; - g_autofill_service_fill_request_cb = callback; + g_autofill_service_fill_requested_cb = callback; g_autofill_service_fill_request_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_service_unset_fill_request_cb() +EXPORT_API int autofill_service_unset_fill_requested_cb() { - g_autofill_service_fill_request_cb = NULL; + g_autofill_service_fill_requested_cb = NULL; g_autofill_service_fill_request_data = NULL; return AUTOFILL_ERROR_NONE; @@ -587,27 +587,27 @@ EXPORT_API int autofill_service_send_fill_response(autofill_fill_response_h h) rpc_port_autofill_svc_response_group_destroy(res_group_h); } - ret = rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_invoke(g_fill_response_cb, fill_response_h); + ret = rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_invoke(g_fill_response_received_cb, fill_response_h); rpc_port_autofill_svc_fill_response_destroy(fill_response_h); return ret; } -EXPORT_API int autofill_service_set_commit_cb(autofill_service_commit_cb callback, void *user_data) +EXPORT_API int autofill_service_set_commited_cb(autofill_service_commited_cb callback, void *user_data) { if (!callback) return AUTOFILL_ERROR_INVALID_PARAMETER; - g_autofill_service_commit_cb = callback; + g_autofill_service_commited_cb = callback; g_autofill_service_commit_data = user_data; return AUTOFILL_ERROR_NONE; } -EXPORT_API int autofill_service_unset_commit_cb(void) +EXPORT_API int autofill_service_unset_commited_cb(void) { - g_autofill_service_commit_cb = NULL; + g_autofill_service_commited_cb = NULL; g_autofill_service_commit_data = NULL; return AUTOFILL_ERROR_NONE; diff --git a/tidl/autofill.tidl b/tidl/autofill.tidl index 201802a..536c7f4 100644 --- a/tidl/autofill.tidl +++ b/tidl/autofill.tidl @@ -50,9 +50,9 @@ struct autofill_fill_response { } interface AutofillAppPort { - void autofill_auth_info_cb(autofill_auth_info auth_info) delegate; - void autofill_fill_response_cb(autofill_fill_response response) delegate; - int Register(autofill_auth_info_cb auth_info_cb, autofill_fill_response_cb fill_response_cb); + void autofill_auth_info_received_cb(autofill_auth_info auth_info) delegate; + void autofill_fill_response_received_cb(autofill_fill_response response) delegate; + int Register(autofill_auth_info_received_cb auth_info_cb, autofill_fill_response_received_cb fill_response_cb); void Unregister() async; int request_auth_info(autofill_view_info vi); -- 2.7.4