Fix issues detected in API review 89/193889/10
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 27 Nov 2018 06:53:42 +0000 (15:53 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 28 Nov 2018 06:48:31 +0000 (15:48 +0900)
Change-Id: Id3e6381ecd5b9cbd8bde44a9497a7fcce7f7afaa
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
18 files changed:
client/autofill.c
client/autofill_auth.c
client/autofill_fill_request.c
common/autofill_auth_info.c
common/autofill_fill_response.c
common/autofill_fill_response_group.c
common/autofill_fill_response_item.c
common/autofill_save_item.c
common/autofill_save_view_info.c
common/autofill_view_info.c
doc/autofill_client_doc.h [new file with mode: 0644]
doc/autofill_common_doc.h [new file with mode: 0644]
doc/autofill_doc.h
doc/autofill_service_doc.h
include/autofill.h
include/autofill_common.h
include/autofill_common_deprecated.h [deleted file]
include/autofill_service.h

index 73ae9f4..9e3345a 100644 (file)
@@ -238,7 +238,14 @@ EXPORT_API int autofill_deinitialize(void)
     g_autofill_fill_response_cb = NULL;
     g_autofill_auth_info_cb = NULL;
 
-    return autofill_disconnect();
+    if (rpc_h) {
+        rpc_port_proxy_AutofillAppPort_destroy(rpc_h);
+        rpc_h = NULL;
+    }
+    else
+        return AUTOFILL_ERROR_NOT_INITIALIZED;
+
+    return AUTOFILL_ERROR_NONE;
 }
 
 EXPORT_API int autofill_connect(autofill_connection_status_changed_cb callback, void *user_data)
@@ -261,40 +268,13 @@ EXPORT_API int autofill_connect(autofill_connection_status_changed_cb callback,
     connection_userdata = user_data;
 
     ret = rpc_port_proxy_AutofillAppPort_connect(rpc_h);
-    switch (ret) {
-        case RPC_PORT_ERROR_NONE:
-            ret = AUTOFILL_ERROR_NONE;
-            break;
-        case RPC_PORT_ERROR_IO_ERROR:
-            break;
-        case RPC_PORT_ERROR_PERMISSION_DENIED:
-            ret = AUTOFILL_ERROR_PERMISSION_DENIED;
-            break;
-        default:
-            ret = AUTOFILL_ERROR_IO_ERROR;
-            break;
-    }
-
-    if (ret != AUTOFILL_ERROR_NONE) {
+    if (ret != RPC_PORT_ERROR_NONE) {
         LOGW("Failed to connect rpc port. err = %d", ret);
-        return ret;
+        return AUTOFILL_ERROR_OPERATION_FAILED;
     }
-
-    return ret;
-}
-
-EXPORT_API int autofill_disconnect(void)
-{
-    LOGD("autofill disconnect");
-
-    if (rpc_h) {
-        rpc_port_proxy_AutofillAppPort_destroy(rpc_h);
-        rpc_h = NULL;
+    else {
+        return AUTOFILL_ERROR_NONE;
     }
-    else
-        return AUTOFILL_ERROR_NOT_INITIALIZED;
-
-    return AUTOFILL_ERROR_NONE;
 }
 
 EXPORT_API int autofill_commit(autofill_save_view_info_h vi)
@@ -364,5 +344,11 @@ EXPORT_API int autofill_commit(autofill_save_view_info_h vi)
 
     rpc_port_autofill_save_view_info_destroy(vih);
 
-    return ret;
+    if (ret != RPC_PORT_ERROR_NONE) {
+        LOGW("Failed to commit. rpc err = %d", ret);
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+    }
+    else {
+        return AUTOFILL_ERROR_NONE;
+    }
 }
index 1df3c70..4ffa270 100644 (file)
 #include <dlog.h>
 #include <unistd.h>
 #include <Eina.h>
+#include <rpc-port.h>
+#include <autofill.h>
 #include "autofill_private.h"
 #include "autofill_proxy.h"
-#include <autofill.h>
 
 extern rpc_port_proxy_AutofillAppPort_h rpc_h;
 
@@ -98,7 +99,12 @@ EXPORT_API int autofill_auth_info_request(autofill_view_info_h vi)
 
     rpc_port_autofill_view_info_destroy(vih);
 
-    return ret;
+    if (ret != RPC_PORT_ERROR_NONE) {
+        LOGW("Failed to send auth request. rpc err = %d", ret);
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+    }
+    else
+        return AUTOFILL_ERROR_NONE;
 }
 
 EXPORT_API int autofill_auth_info_set_callback(autofill_auth_info_cb callback, void *user_data)
index 913b8b0..5f124e2 100644 (file)
@@ -19,6 +19,7 @@
 #include <dlog.h>
 #include <unistd.h>
 #include <Eina.h>
+#include <rpc-port.h>
 #include <autofill.h>
 #include "autofill_private.h"
 #include "autofill_proxy.h"
@@ -94,7 +95,12 @@ EXPORT_API int autofill_fill_request(autofill_view_info_h vi)
 
     rpc_port_autofill_view_info_destroy(vih);
 
-    return ret;
+    if (ret != RPC_PORT_ERROR_NONE) {
+        LOGW("Failed to send fill request. rpc err = %d", ret);
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+    }
+    else
+        return AUTOFILL_ERROR_NONE;
 }
 
 EXPORT_API int autofill_fill_response_set_callback(autofill_fill_response_cb callback, void *user_data)
index 8604281..2649c20 100644 (file)
@@ -83,11 +83,6 @@ EXPORT_API int autofill_auth_info_destroy(autofill_auth_info_h ai)
     return AUTOFILL_ERROR_NONE;
 }
 
-EXPORT_API int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exist_autofill_data)
-{
-    return autofill_auth_info_set_autofill_data_present(ai, exist_autofill_data);
-}
-
 EXPORT_API int autofill_auth_info_set_autofill_data_present(autofill_auth_info_h ai, bool autofill_data_present)
 {
     if (!ai)
@@ -98,11 +93,6 @@ EXPORT_API int autofill_auth_info_set_autofill_data_present(autofill_auth_info_h
     return AUTOFILL_ERROR_NONE;
 }
 
-EXPORT_API int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *exist_autofill_data)
-{
-    return autofill_auth_info_get_autofill_data_present(ai, exist_autofill_data);
-}
-
 EXPORT_API int autofill_auth_info_get_autofill_data_present(autofill_auth_info_h ai, bool *autofill_data_present)
 {
     if (!ai || !autofill_data_present)
@@ -133,16 +123,6 @@ EXPORT_API int autofill_auth_info_get_authentication_needed(autofill_auth_info_h
     return AUTOFILL_ERROR_NONE;
 }
 
-EXPORT_API int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool authentication_needed)
-{
-    return autofill_auth_info_set_authentication_needed(ai, authentication_needed);
-}
-
-EXPORT_API int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *authentication_needed)
-{
-    return autofill_auth_info_get_authentication_needed(ai, authentication_needed);
-}
-
 EXPORT_API int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *service_name)
 {
     if (!ai || !service_name)
@@ -161,6 +141,9 @@ EXPORT_API int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char
     if (!ai || !service_name)
         return AUTOFILL_ERROR_INVALID_PARAMETER;
 
+    if (!ai->service_name)
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+
     *service_name = strdup(ai->service_name);
 
     return AUTOFILL_ERROR_NONE;
@@ -184,6 +167,9 @@ EXPORT_API int autofill_auth_info_get_service_message(autofill_auth_info_h ai, c
     if (!ai || !service_message)
         return AUTOFILL_ERROR_INVALID_PARAMETER;
 
+    if (!ai->service_message)
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+
     *service_message = strdup(ai->service_message);
 
     return AUTOFILL_ERROR_NONE;
@@ -207,6 +193,9 @@ EXPORT_API int autofill_auth_info_get_service_logo_image_path(autofill_auth_info
     if (!ai || !service_logo_image_path)
         return AUTOFILL_ERROR_INVALID_PARAMETER;
 
+    if (!ai->service_logo_image_path)
+        return AUTOFILL_ERROR_OPERATION_FAILED;
+
     *service_logo_image_path = strdup(ai->service_logo_image_path);
 
     return AUTOFILL_ERROR_NONE;
index 0ab3879..8639e34 100644 (file)
@@ -152,12 +152,6 @@ EXPORT_API int autofill_fill_response_foreach_group(autofill_fill_response_h h,
     return AUTOFILL_ERROR_NONE;
 }
 
-EXPORT_API int autofill_fill_response_foreach_groups(autofill_fill_response_h h,
-        autofill_fill_response_group_cb callback, void *user_data)
-{
-    return autofill_fill_response_foreach_group(h, callback, user_data);
-}
-
 EXPORT_API int autofill_fill_response_get_group_count(autofill_fill_response_h h, int *count)
 {
     if (!h || !count)
index d2baec4..7013cee 100644 (file)
@@ -58,7 +58,7 @@ EXPORT_API int autofill_fill_response_group_destroy(autofill_fill_response_group
 
 EXPORT_API int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofill_fill_response_group_h *clone)
 {
-    autofill_fill_response_group_h handle;
+    autofill_fill_response_group_h handle = NULL;
 
     if (!h || !clone) {
         LOGW("Invalid parameter");
@@ -68,7 +68,7 @@ EXPORT_API int autofill_fill_response_group_clone(autofill_fill_response_group_h
     autofill_fill_response_group_create(&handle);
     if (!handle) {
         LOGW("Failed to create autofill_item handle");
-        return AUTOFILL_ERROR_OPERATION_FAILED;
+        return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
     Eina_List *l;
@@ -131,10 +131,4 @@ EXPORT_API int autofill_fill_response_group_foreach_item(autofill_fill_response_
     }
 
     return AUTOFILL_ERROR_NONE;
-}
-
-EXPORT_API int autofill_fill_response_group_foreach_items(autofill_fill_response_group_h h,
-        autofill_fill_response_item_cb callback, void *user_data)
-{
-    return autofill_fill_response_group_foreach_item(h, callback, user_data);
-}
+}
\ No newline at end of file
index 52d8af8..e9088d4 100644 (file)
@@ -74,17 +74,21 @@ EXPORT_API int autofill_fill_response_item_destroy(autofill_fill_response_item_h
 
 EXPORT_API int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill_fill_response_item_h *clone)
 {
-    autofill_fill_response_item_h handle;
+    autofill_fill_response_item_h handle = NULL;
+    int ret;
 
     if (!it || !clone) {
         LOGW("Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
-    autofill_fill_response_item_create(&handle);
+    ret = autofill_fill_response_item_create(&handle);
+    if (ret == AUTOFILL_ERROR_OUT_OF_MEMORY)
+        return AUTOFILL_ERROR_OUT_OF_MEMORY;
+
     if (!handle) {
         LOGW("Failed to create autofill_item handle");
-        return AUTOFILL_ERROR_OPERATION_FAILED;
+        return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
     if (it->id) {
index a0404d3..4fa8e9c 100644 (file)
@@ -78,17 +78,21 @@ EXPORT_API int autofill_save_item_destroy(autofill_save_item_h it)
 
 EXPORT_API int autofill_save_item_clone(autofill_save_item_h it, autofill_save_item_h *clone)
 {
-    autofill_save_item_h handle;
+    autofill_save_item_h handle = NULL;
+    int ret;
 
     if (!it || !clone) {
         LOGW("Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
     }
 
-    autofill_save_item_create(&handle);
+    ret = autofill_save_item_create(&handle);
+    if (ret == AUTOFILL_ERROR_OUT_OF_MEMORY)
+        return AUTOFILL_ERROR_OUT_OF_MEMORY;
+
     if (!handle) {
         LOGW("Failed to create autofill_save_item handle");
-        return AUTOFILL_ERROR_OPERATION_FAILED;
+        return AUTOFILL_ERROR_OUT_OF_MEMORY;
     }
 
     if (it->id) {
index 50c6df3..30e4a74 100644 (file)
@@ -156,10 +156,4 @@ EXPORT_API int autofill_save_view_info_foreach_item(autofill_save_view_info_h vi
     }
 
     return AUTOFILL_ERROR_NONE;
-}
-
-EXPORT_API int autofill_save_view_info_foreach_items(autofill_save_view_info_h vi,
-        autofill_save_item_cb callback, void *user_data)
-{
-    return autofill_save_view_info_foreach_item(vi, callback, user_data);
-}
+}
\ No newline at end of file
index 4b8dcbb..1ba1d66 100644 (file)
@@ -154,10 +154,4 @@ EXPORT_API int autofill_view_info_foreach_item(autofill_view_info_h vi,
     }
 
     return AUTOFILL_ERROR_NONE;
-}
-
-EXPORT_API int autofill_view_info_foreach_items(autofill_view_info_h vi,
-        autofill_item_cb callback, void *user_data)
-{
-    return autofill_view_info_foreach_item(vi, callback, user_data);
-}
+}
\ No newline at end of file
diff --git a/doc/autofill_client_doc.h b/doc/autofill_client_doc.h
new file mode 100644 (file)
index 0000000..d323a8e
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_UIX_AUTOFILL_CLIENT_DOC_H__
+#define __TIZEN_UIX_AUTOFILL_CLIENT_DOC_H__
+
+
+/**
+ * @ingroup CAPI_UIX_AUTOFILL_MODULE
+ * @defgroup CAPI_UIX_AUTOFILL_CLIENT_MODULE Autofill client
+ * @brief The @ref CAPI_UIX_AUTOFILL_CLIENT_MODULE API provides the functions for sending data to the autofill service and receiving the commonly-entered data from the autofill service.
+ * @section CAPI_UIX_AUTOFILL_MODULE_CLIENT_HEADER Required Header
+ *
+ * \#include <autofill.h>
+ * @section CAPI_UIX_AUTOFILL_CLIENT_MODULE_OVERVIEW Overview
+ * Autofill is a feature that allows you to fill out commonly-entered information such as email, account and address in a text input field. email, account and address in a text input field.
+ * The @ref CAPI_UIX_AUTOFILL_CLIENT_MODULE API provides the functions for sending data to the autofill service and receiving the commonly-entered data from the autofill service.
+ */
+
+
+#endif /* __TIZEN_UIX_AUTOFILL_CLIENT_DOC_H__ */
diff --git a/doc/autofill_common_doc.h b/doc/autofill_common_doc.h
new file mode 100644 (file)
index 0000000..fd94dec
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_UIX_AUTOFILL_COMMON_DOC_H__
+#define __TIZEN_UIX_AUTOFILL_COMMON_DOC_H__
+
+
+/**
+ * @ingroup CAPI_UIX_AUTOFILL_MODULE
+ * @defgroup CAPI_UIX_AUTOFILL_COMMON_MODULE Autofill common
+ * @brief The @ref CAPI_UIX_AUTOFILL_COMMON_MODULE API provides the functions for manipulating autofill data.
+ * @section CAPI_UIX_AUTOFILL_COMMON_MODULE_HEADER Required Header
+ * \#include <autofill_common.h>
+ *
+ * @section CAPI_UIX_AUTOFILL_COMMON_MODULE_OVERVIEW Overview
+ * Autofill is a feature that allows you to fill out commonly-entered information such as email, account and address in a text input field. email, account and address in a text input field.
+ * @ref CAPI_UIX_AUTOFILL_COMMON_MODULE functions are responsible for storing or retrieving autofill data in each autofill data structure.
+ * The @ref CAPI_UIX_AUTOFILL_COMMON_MODULE functions can be used in an autofill client and an autofill service.
+ */
+
+
+#endif /* __TIZEN_UIX_AUTOFILL_COMMON_DOC_H__ */
index 86dfe27..940c2f5 100644 (file)
  * @ingroup CAPI_UIX_FRAMEWORK
  * @defgroup CAPI_UIX_AUTOFILL_MODULE Autofill
  * @brief The @ref CAPI_UIX_AUTOFILL_MODULE API provides the functions for supporting users to use autofill feature.
- * @section CAPI_UIX_AUTOFILL_MODULE_HEADER Required Header
- * \#include <autofill.h>
  *
  * @section CAPI_UIX_AUTOFILL_MODULE_OVERVIEW Overview
  * Autofill is a feature that allows you to fill out commonly-entered information such as email, account and address in a text input field. email, account and address in a text input field.
- * @ref CAPI_UIX_AUTOFILL_MODULE functions are responsible for sending data for supporting autofill to the autofill service and receiving the commonly-entered data from the autofill service.
  */
 
 
index bca2e62..36052d2 100644 (file)
 
 
 /**
- * @ingroup CAPI_UIX_FRAMEWORK
- * @defgroup CAPI_UIX_AUTOFILL_SERVICE_MODULE Autofill Service
- * @brief The @ref CAPI_UIX_AUTOFILL_SERVICE_MODULE API provides the functions to operate Autofill Service.
+ * @ingroup CAPI_UIX_AUTOFILL_MODULE
+ * @defgroup CAPI_UIX_AUTOFILL_SERVICE_MODULE Autofill service
+ * @brief The @ref CAPI_UIX_AUTOFILL_SERVICE_MODULE API provides the functions to operate Autofill service.
  * @section CAPI_UIX_AUTOFILL_SERVICE_MODULE_HEADER Required Header
  * \#include <autofill_service.h>
  *
  * @section CAPI_UIX_AUTOFILL_SERVICE_MODULE_OVERVIEW Overview
  * Autofill Service application is a service application to save the user input and provide the commonly-entered information.
- * Using the @ref CAPI_UIX_AUTOFILL_SERVICE_MODULE functions, Autofill Service developers can implement their own autofill service to serve the autofill information.
+ * Using the @ref CAPI_UIX_AUTOFILL_SERVICE_MODULE functions, Autofill service application developers can implement their own autofill service to serve the autofill information.
  */
 
 
index 94c8ba3..92f42e4 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 #endif
 
 /**
- * @addtogroup CAPI_UIX_AUTOFILL_MODULE
+ * @addtogroup CAPI_UIX_AUTOFILL_CLIENT_MODULE
  * @{
  */
 
@@ -48,8 +48,7 @@ typedef enum {
  * @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()
+ * @see autofill_connect()
  */
 typedef void(*autofill_connection_status_changed_cb)(autofill_connection_status_e status, void* user_data);
 
@@ -98,17 +97,10 @@ int autofill_deinitialize(void);
  * @return 0 on success, otherwise a negative error value
  * @retval #AUTOFILL_ERROR_NONE No error
  * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_connect(autofill_connection_status_changed_cb callback, void *user_data);
-
-/**
- * @brief Disconnects from autofill daemon.
- * @since_tizen 5.5
- * @return 0 on success, otherwise a negative error value
- * @retval #AUTOFILL_ERROR_NONE No error
  * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #AUTOFILL_ERROR_OPERATION_FAILED Operation failure
  */
-int autofill_disconnect(void);
+int autofill_connect(autofill_connection_status_changed_cb callback, void *user_data);
 
 /**
  * @brief Requests of authentication information.
@@ -118,6 +110,7 @@ int autofill_disconnect(void);
  * @retval #AUTOFILL_ERROR_NONE No error
  * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #AUTOFILL_ERROR_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_request(autofill_view_info_h vi);
 
@@ -147,6 +140,7 @@ int autofill_auth_info_unset_callback(void);
  * @retval #AUTOFILL_ERROR_NONE No error
  * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #AUTOFILL_ERROR_OPERATION_FAILED Operation failure
  */
 int autofill_fill_request(autofill_view_info_h vi);
 
@@ -176,6 +170,7 @@ int autofill_fill_response_unset_callback(void);
  * @retval #AUTOFILL_ERROR_NONE No error
  * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #AUTOFILL_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #AUTOFILL_ERROR_OPERATION_FAILED Operation failure
  */
 int autofill_commit(autofill_save_view_info_h vi);
 
index eed61d6..66696f3 100644 (file)
@@ -33,10 +33,6 @@ extern "C" {
  * @{
  */
 
-#ifndef TIZEN_ERROR_AUTOFILL
-#define TIZEN_ERROR_AUTOFILL   -0x02FE10000
-#endif
-
 /**
  * @brief Enumeration for autofill function error.
  *
@@ -44,14 +40,10 @@ extern "C" {
  */
 typedef enum {
     AUTOFILL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
-    AUTOFILL_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O Error */
     AUTOFILL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
-    AUTOFILL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
-    AUTOFILL_ERROR_NOT_INITIALIZED = TIZEN_ERROR_ENDPOINT_NOT_CONNECTED, /**< Initialization is not set */
-    AUTOFILL_ERROR_NO_CALLBACK_FUNCTION = TIZEN_ERROR_IME | 0x0001, /**< Necessary callback function is not set */
-    AUTOFILL_ERROR_NOT_RUNNING = TIZEN_ERROR_IME | 0x0002, /**< IME main loop isn't started yet */
-    AUTOFILL_ERROR_OPERATION_FAILED = TIZEN_ERROR_IME | 0x0003, /**< Operation failed */
-    AUTOFILL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */
+    AUTOFILL_ERROR_NOT_INITIALIZED = TIZEN_ERROR_AUTOFILL | 0x0001, /**< Not initialized */
+    AUTOFILL_ERROR_OPERATION_FAILED = TIZEN_ERROR_AUTOFILL | 0x0002, /**< Operation failed */
+    AUTOFILL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
 } autofill_error_e;
 
 /**
@@ -251,6 +243,7 @@ int autofill_item_set_id(autofill_item_h it, const char *id);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_item_get_id(autofill_item_h it, char **id);
 
@@ -274,6 +267,7 @@ int autofill_item_set_label(autofill_item_h it, const char *label);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_item_get_label(autofill_item_h it, char **label);
 
@@ -319,6 +313,7 @@ int autofill_item_set_value(autofill_item_h it, const char *value);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_item_get_value(autofill_item_h it, char **value);
 
@@ -364,6 +359,7 @@ int autofill_auth_info_set_app_id(autofill_auth_info_h ai, const char *app_id);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_get_app_id(autofill_auth_info_h ai, char **app_id);
 
@@ -387,6 +383,7 @@ int autofill_auth_info_set_view_id(autofill_auth_info_h ai, const char *view_id)
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_get_view_id(autofill_auth_info_h ai, char **view_id);
 
@@ -454,6 +451,7 @@ int autofill_auth_info_set_service_name(autofill_auth_info_h ai, const char *ser
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_get_service_name(autofill_auth_info_h ai, char **service_name);
 
@@ -477,6 +475,7 @@ int autofill_auth_info_set_service_message(autofill_auth_info_h ai, const char *
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_get_service_message(autofill_auth_info_h ai, char **service_message);
 
@@ -500,6 +499,7 @@ int autofill_auth_info_set_service_logo_image_path(autofill_auth_info_h ai, cons
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_auth_info_get_service_logo_image_path(autofill_auth_info_h ai, char **service_logo_image_path);
 
@@ -545,6 +545,7 @@ int autofill_view_info_set_app_id(autofill_view_info_h vi, const char *app_id);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_view_info_get_app_id(autofill_view_info_h vi, char **app_id);
 
@@ -568,6 +569,7 @@ int autofill_view_info_set_view_id(autofill_view_info_h vi, const char *view_id)
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_view_info_get_view_id(autofill_view_info_h vi, char **view_id);
 
@@ -636,6 +638,7 @@ int autofill_save_view_info_set_app_id(autofill_save_view_info_h vi, const char
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_save_view_info_get_app_id(autofill_save_view_info_h vi, char **app_id);
 
@@ -659,6 +662,7 @@ int autofill_save_view_info_set_view_id(autofill_save_view_info_h vi, const char
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_save_view_info_get_view_id(autofill_save_view_info_h vi, char **view_id);
 
@@ -726,6 +730,7 @@ int autofill_fill_response_set_app_id(autofill_fill_response_h h, const char *ap
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_get_app_id(autofill_fill_response_h h, char **app_id);
 
@@ -749,6 +754,7 @@ int autofill_fill_response_set_view_id(autofill_fill_response_h h, const char *v
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_get_view_id(autofill_fill_response_h h, char **view_id);
 
@@ -817,6 +823,8 @@ int autofill_fill_response_group_destroy(autofill_fill_response_group_h h);
  * @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
+ * @retval #AUTOFILL_ERROR_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_group_clone(autofill_fill_response_group_h h, autofill_fill_response_group_h *clone);
 
@@ -876,6 +884,7 @@ int autofill_fill_response_item_destroy(autofill_fill_response_item_h it);
  * @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
  */
 int autofill_fill_response_item_clone(autofill_fill_response_item_h it, autofill_fill_response_item_h *clone);
 
@@ -899,6 +908,7 @@ int autofill_fill_response_item_set_id(autofill_fill_response_item_h it, const c
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_item_get_id(autofill_fill_response_item_h it, char **id);
 
@@ -922,6 +932,7 @@ int autofill_fill_response_item_set_value(autofill_fill_response_item_h it, cons
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_item_get_value(autofill_fill_response_item_h it, char **value);
 
@@ -945,6 +956,7 @@ int autofill_fill_response_item_set_presentation_text(autofill_fill_response_ite
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_fill_response_item_get_presentation_text(autofill_fill_response_item_h it, char **presentation_text);
 
@@ -977,6 +989,7 @@ int autofill_save_item_destroy(autofill_save_item_h it);
  * @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
  */
 int autofill_save_item_clone(autofill_save_item_h it, autofill_save_item_h *clone);
 
@@ -1022,6 +1035,7 @@ int autofill_save_item_set_id(autofill_save_item_h it, const char *id);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_save_item_get_id(autofill_save_item_h it, char **id);
 
@@ -1045,6 +1059,7 @@ int autofill_save_item_set_label(autofill_save_item_h it, const char *label);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_save_item_get_label(autofill_save_item_h it, char **label);
 
@@ -1090,11 +1105,10 @@ int autofill_save_item_set_value(autofill_save_item_h it, const char *value);
  * @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_OPERATION_FAILED Operation failure
  */
 int autofill_save_item_get_value(autofill_save_item_h it, char **value);
 
-#include <autofill_common_deprecated.h>
-
 /**
  * @}
  */
diff --git a/include/autofill_common_deprecated.h b/include/autofill_common_deprecated.h
deleted file mode 100644 (file)
index d6d145a..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_UIX_AUTOFILL_COMMON_DEPRECATED_H__
-#define __TIZEN_UIX_AUTOFILL_COMMON_DEPRECATED_H__
-
-/**
- * @file autofill_common_deprecated.h
- * @brief This file contains deprecated autofill common APIs and related enumeration.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @deprecated Use autofill_view_info_foreach_item()
- * @brief Retrieves all items in view info.
- * @since_tizen 5.5
- * @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
- * @return 0 on success, otherwise a negative error value
- * @retval #AUTOFILL_ERROR_NONE No error
- * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_view_info_foreach_items(autofill_view_info_h vi, autofill_item_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_save_view_info_foreach_item()
- * @brief Retrieves all items in save view info.
- * @since_tizen 5.5
- * @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
- * @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_view_info_foreach_items(autofill_save_view_info_h vi, autofill_save_item_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_fill_response_foreach_group()
- * @brief Retrieves all groups of each fill response.
- * @since_tizen 5.5
- * @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
- * @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_foreach_groups(autofill_fill_response_h h, autofill_fill_response_group_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_fill_response_group_foreach_item()
- * @brief Retrieves all fill response items of each group.
- * @since_tizen 5.5
- * @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
- * @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_group_foreach_items(autofill_fill_response_group_h h, autofill_fill_response_item_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_auth_info_set_autofill_data_present()
- * @brief Sets the exist autofill data in an autofill authentication information.
- * @since_tizen 5.5
- * @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
- * @retval #AUTOFILL_ERROR_NONE No error
- * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_auth_info_set_exist_autofill_data(autofill_auth_info_h ai, bool exist_autofill_data) TIZEN_DEPRECATED_API;
-
-/**
- * @brief Gets the exist autofill data in an autofill authentication information.
- * @since_tizen 5.5
- * @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
- * @retval #AUTOFILL_ERROR_NONE No error
- * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_auth_info_get_exist_autofill_data(autofill_auth_info_h ai, bool *exist_autofill_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_auth_info_set_authentication_needed()
- * @brief Sets the need authentication in an autofill authentication information.
- * @since_tizen 5.5
- * @param[in] ai The autofill authentication information handle
- * @param[in] need_authentication The authentication need
- * @return 0 on success, otherwise a negative error value
- * @retval #AUTOFILL_ERROR_NONE No error
- * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_auth_info_set_need_authentication(autofill_auth_info_h ai, bool need_authentication) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Use autofill_auth_info_get_authentication_needed()
- * @brief Gets the need authentication in an autofill authentication information.
- * @since_tizen 5.5
- * @param[in] ai The autofill authentication information handle
- * @param[out] need_authentication The authentication need
- * @return 0 on success, otherwise a negative error value
- * @retval #AUTOFILL_ERROR_NONE No error
- * @retval #AUTOFILL_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int autofill_auth_info_get_need_authentication(autofill_auth_info_h ai, bool *need_authentication) TIZEN_DEPRECATED_API;
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_UIX_AUTOFILL_COMMON_DEPRECATED_H__ */
index bbfe6aa..909c935 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  */
 
 /**
- * @brief Called when receiving authenticaton information request.
+ * @brief Called when receiving authentication 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