Add not supported error exception 17/138917/1
authorJooseok Song <seogii.song@samsung.com>
Fri, 14 Jul 2017 08:05:40 +0000 (17:05 +0900)
committerJooseok Song <seogii.song@samsung.com>
Fri, 14 Jul 2017 08:05:40 +0000 (17:05 +0900)
Change-Id: I936a873bce9cbfc8da5f51525892955b81a70fe3

include/account-error.h
packaging/libaccount-service.spec
src/CMakeLists.txt
src/account.c

index 7698b5e..8954dc6 100644 (file)
@@ -61,6 +61,8 @@ typedef enum {
        ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER = TIZEN_ERROR_ACCOUNT | 0x0d, /**< Account provider is not registered */
        ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE = TIZEN_ERROR_ACCOUNT | 0x0e, /**< Multiple accounts are not supported */
        ACCOUNT_ERROR_DATABASE_BUSY = TIZEN_ERROR_ACCOUNT | 0x10, /**< SQLite busy handler expired */
+       ACCOUNT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported (Since 3.0) */
+       ACCOUNT_ERROR_OPERATION_FAIL = TIZEN_ERROR_ACCOUNT | 0x12, /**< Account Operation Failed */
 } account_error_e;
 
 /**
index feabc35..fa06c5b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libaccount-service
 Summary:    Account DB library
-Version:    0.4.15
+Version:    0.4.16
 Release:    1
 Group:      Social & Content/API
 License:    Apache-2.0
@@ -9,6 +9,7 @@ Source0:    libaccount-service-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires: pkgconfig(glib-2.0) >= 2.26
 BuildRequires:  pkgconfig(gio-unix-2.0)
index b0f42d1..f4a7fc0 100644 (file)
@@ -18,6 +18,7 @@ pkg_check_modules(clientpkgs REQUIRED
                glib-2.0
                gio-unix-2.0
                capi-base-common
+               capi-system-info
                vconf
                account-common
                db-util
index aeb8783..e5200be 100644 (file)
@@ -230,6 +230,8 @@ ACCOUNT_API int account_disconnect(void)
 
 ACCOUNT_API int account_insert_to_db(account_h account, int *account_db_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("1. account_insert_to_db start");
 
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
@@ -268,6 +270,8 @@ CATCH:
 
 ACCOUNT_API int account_delete_from_db_by_id(int account_db_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("1. account_delete_from_db_by_id starting [%d]", account_db_id);
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -312,6 +316,8 @@ ACCOUNT_API int account_delete_from_db_by_id(int account_db_id)
 
 ACCOUNT_API int account_delete_from_db_by_user_name(char *user_name, char *package_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        int error_code = ACCOUNT_ERROR_NONE;
        _INFO("account_delete_from_db_by_user_name start");
 
@@ -364,6 +370,8 @@ ACCOUNT_API int account_delete_from_db_by_user_name(char *user_name, char *packa
 
 int _account_delete_from_db_by_package_name(const char *package_name, bool permission)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("_account_delete_from_db_by_package_name starting permission opions = %d", permission);
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -413,12 +421,16 @@ int _account_delete_from_db_by_package_name(const char *package_name, bool permi
 
 ACCOUNT_API int account_delete_from_db_by_package_name(const char *package_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_delete_from_db_by_package_name starting with permission");
        return _account_delete_from_db_by_package_name(package_name, true);
 }
 
 ACCOUNT_API int account_update_to_db_by_id(account_h account, int account_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("1. account_update_to_db_by_id start");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -465,6 +477,8 @@ ACCOUNT_API int account_update_to_db_by_id(account_h account, int account_id)
 
 ACCOUNT_API int account_update_to_db_by_id_ex(account_h account, int account_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        int ret = -1;
        ret = account_update_to_db_by_id(account, account_id);
 
@@ -473,6 +487,8 @@ ACCOUNT_API int account_update_to_db_by_id_ex(account_h account, int account_id)
 
 ACCOUNT_INTERNAL_API int account_update_to_db_by_id_without_permission(account_h account, int account_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_update_to_db_by_id_without_permission start");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -538,6 +554,8 @@ ACCOUNT_INTERNAL_API int account_update_to_db_by_id_without_permission(account_h
 
 ACCOUNT_API int account_update_to_db_by_user_name(account_h account, const char *user_name, const char *package_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_update_to_db_by_user_name starting");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -583,6 +601,8 @@ ACCOUNT_API int account_update_to_db_by_user_name(account_h account, const char
 
 ACCOUNT_API int account_create(account_h *account)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_create start");
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account is NULL.\n", __FUNCTION__, __LINE__);
@@ -616,6 +636,8 @@ ACCOUNT_API int account_create(account_h *account)
 
 ACCOUNT_API int account_destroy(account_h account)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_destroy start");
        account_s *data = (account_s *)account;
 
@@ -629,6 +651,8 @@ ACCOUNT_API int account_destroy(account_h account)
 
 ACCOUNT_API int account_set_user_name(account_h account, const char *user_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -653,6 +677,8 @@ ACCOUNT_API int account_set_user_name(account_h account, const char *user_name)
 
 ACCOUNT_API int account_set_display_name(account_h account, const char *display_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -677,6 +703,8 @@ ACCOUNT_API int account_set_display_name(account_h account, const char *display_
 
 ACCOUNT_API int account_set_email_address(account_h account, const char *email_address)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -701,6 +729,8 @@ ACCOUNT_API int account_set_email_address(account_h account, const char *email_a
 
 ACCOUNT_API int account_set_icon_path(account_h account, const char *icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -725,6 +755,8 @@ ACCOUNT_API int account_set_icon_path(account_h account, const char *icon_path)
 
 ACCOUNT_API int account_set_source(account_h account, const char *source)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -748,6 +780,8 @@ ACCOUNT_API int account_set_source(account_h account, const char *source)
 
 ACCOUNT_API int account_set_package_name(account_h account, const char *package_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -772,6 +806,8 @@ ACCOUNT_API int account_set_package_name(account_h account, const char *package_
 
 ACCOUNT_API int account_set_domain_name(account_h account, const char *domain_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -795,6 +831,8 @@ ACCOUNT_API int account_set_domain_name(account_h account, const char *domain_na
 
 ACCOUNT_API int account_set_access_token(account_h account, const char *access_token)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -819,6 +857,8 @@ ACCOUNT_API int account_set_access_token(account_h account, const char *access_t
 
 ACCOUNT_API int account_set_user_text(account_h account, int idx, const char *user_txt)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -847,6 +887,8 @@ ACCOUNT_API int account_set_user_text(account_h account, int idx, const char *us
 
 ACCOUNT_API int account_set_custom(account_h account, const char *key, const char *value)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account) {
                ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -935,6 +977,8 @@ ACCOUNT_API int account_set_custom(account_h account, const char *key, const cha
 
 ACCOUNT_API int account_set_auth_type(account_h account, const account_auth_type_e auth_type)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        if (((int)auth_type < 0) || (auth_type > ACCOUNT_AUTH_TYPE_CLIENT_LOGIN))
@@ -949,6 +993,8 @@ ACCOUNT_API int account_set_auth_type(account_h account, const account_auth_type
 
 ACCOUNT_API int account_set_secret(account_h account, const account_secrecy_state_e secret)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n",      __FUNCTION__, __LINE__));
 
        if (((int)secret < 0) || (secret > ACCOUNT_SECRECY_VISIBLE))
@@ -963,6 +1009,8 @@ ACCOUNT_API int account_set_secret(account_h account, const account_secrecy_stat
 
 ACCOUNT_API int account_set_sync_support(account_h account, const account_sync_state_e sync_support)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n",      __FUNCTION__, __LINE__));
 
        if (((int)sync_support < 0) || (sync_support > ACCOUNT_SUPPORTS_SYNC))
@@ -977,6 +1025,8 @@ ACCOUNT_API int account_set_sync_support(account_h account, const account_sync_s
 
 ACCOUNT_API int account_set_user_int(account_h account, int idx, const int user_int)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -992,6 +1042,8 @@ ACCOUNT_API int account_set_user_int(account_h account, int idx, const int user_
 
 ACCOUNT_API int account_set_capability(account_h account, const char *capability_type, account_capability_state_e capability_value)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("account handle is null"));
        ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type is null"));
        ACCOUNT_RETURN_VAL((strlen(capability_type) > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type is Empty"));
@@ -1041,6 +1093,8 @@ ACCOUNT_API int account_set_capability(account_h account, const char *capability
 
 ACCOUNT_API int account_get_user_name(account_h account, char **user_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1061,6 +1115,8 @@ ACCOUNT_API int account_get_user_name(account_h account, char **user_name)
 
 ACCOUNT_API int account_get_display_name(account_h account, char **display_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1083,6 +1139,8 @@ ACCOUNT_API int account_get_display_name(account_h account, char **display_name)
 
 ACCOUNT_API int account_get_email_address(account_h account, char **email_address)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1104,6 +1162,8 @@ ACCOUNT_API int account_get_email_address(account_h account, char **email_addres
 
 ACCOUNT_API int  account_get_icon_path(account_h account, char **icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1125,6 +1185,8 @@ ACCOUNT_API int  account_get_icon_path(account_h account, char **icon_path)
 
 ACCOUNT_API int account_get_source(account_h account, char **source)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1146,6 +1208,8 @@ ACCOUNT_API int account_get_source(account_h account, char **source)
 
 ACCOUNT_API int account_get_package_name(account_h account, char **package_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1168,6 +1232,8 @@ ACCOUNT_API int account_get_package_name(account_h account, char **package_name)
 
 ACCOUNT_API int account_get_domain_name(account_h account, char **domain_name)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1189,6 +1255,8 @@ ACCOUNT_API int account_get_domain_name(account_h account, char **domain_name)
 
 ACCOUNT_API int account_get_access_token(account_h account, char **access_token)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1210,6 +1278,8 @@ ACCOUNT_API int account_get_access_token(account_h account, char **access_token)
 
 ACCOUNT_API int account_get_user_text(account_h account, int user_text_index, char **text)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1233,6 +1303,8 @@ ACCOUNT_API int account_get_user_text(account_h account, int user_text_index, ch
 
 ACCOUNT_API int account_get_auth_type(account_h account, account_auth_type_e *auth_type)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1248,6 +1320,8 @@ ACCOUNT_API int account_get_auth_type(account_h account, account_auth_type_e *au
 
 ACCOUNT_API int account_get_secret(account_h account, account_secrecy_state_e *secret)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1263,6 +1337,8 @@ ACCOUNT_API int account_get_secret(account_h account, account_secrecy_state_e *s
 
 ACCOUNT_API int account_get_sync_support(account_h account, account_sync_state_e *sync_support)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1278,6 +1354,8 @@ ACCOUNT_API int account_get_sync_support(account_h account, account_sync_state_e
 
 ACCOUNT_API int account_get_account_id(account_h account, int *account_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1293,6 +1371,8 @@ ACCOUNT_API int account_get_account_id(account_h account, int *account_id)
 
 ACCOUNT_API int account_get_user_int(account_h account, int user_int_index, int *integer)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1310,6 +1390,8 @@ ACCOUNT_API int account_get_user_int(account_h account, int user_int_index, int
 
 ACCOUNT_API int account_get_capability(account_h account, const char *capability_type, account_capability_state_e *capability_value)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type is NULL"));
        ACCOUNT_RETURN_VAL((capability_value != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_value is NULL"));
@@ -1333,6 +1415,8 @@ ACCOUNT_API int account_get_capability(account_h account, const char *capability
 
 ACCOUNT_API int account_get_capability_all(account_h account, capability_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
 
@@ -1353,6 +1437,8 @@ ACCOUNT_API int account_get_capability_all(account_h account, capability_cb call
 
 ACCOUNT_API int account_get_custom(account_h account, const char *key, char **value)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((key != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO KEY TO REQUEST"));
        ACCOUNT_RETURN_VAL((value != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("VALUE POINTER IS NULL"));
@@ -1382,6 +1468,8 @@ ACCOUNT_API int account_get_custom(account_h account, const char *key, char **va
 
 ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
 
@@ -1404,6 +1492,8 @@ ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb call
 
 ACCOUNT_API int account_foreach_account_from_db(account_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_foreach_account_from_db start");
 
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT Callback IS NULL"));
@@ -1452,6 +1542,8 @@ ACCOUNT_API int account_foreach_account_from_db(account_cb callback, void *user_
 
 ACCOUNT_API int account_query_account_by_account_id(int account_db_id, account_h *account)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_account_by_account_id start [%d]", account_db_id);
 
        ACCOUNT_RETURN_VAL((account_db_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
@@ -1502,6 +1594,8 @@ ACCOUNT_API int account_query_account_by_account_id(int account_db_id, account_h
 
 ACCOUNT_API int account_query_account_by_user_name(account_cb callback, const char *user_name, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_account_by_user_name starting");
 
        ACCOUNT_RETURN_VAL((user_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("USER NAME IS NULL"));
@@ -1553,6 +1647,8 @@ ACCOUNT_API int account_query_account_by_user_name(account_cb callback, const ch
 
 ACCOUNT_API int account_query_account_by_package_name(account_cb callback, const char *package_name, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_account_by_package_name starting");
 
        ACCOUNT_RETURN_VAL((package_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("PACKAGE NAME IS NULL"));
@@ -1611,6 +1707,8 @@ ACCOUNT_API int account_query_account_by_package_name(account_cb callback, const
 
 ACCOUNT_API int account_query_account_by_capability(account_cb callback, const char *capability_type, account_capability_state_e capability_value, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_account_by_capability starting");
 
        ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
@@ -1667,6 +1765,8 @@ ACCOUNT_API int account_query_account_by_capability(account_cb callback, const c
 
 ACCOUNT_API int account_query_account_by_capability_type(account_cb callback, const char *capability_type, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_account_by_capability_type starting");
 
        ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
@@ -1718,6 +1818,8 @@ ACCOUNT_API int account_query_account_by_capability_type(account_cb callback, co
 
 ACCOUNT_API int account_query_capability_by_account_id(capability_cb callback, int account_id, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_query_capability_by_account_id starting");
 
        ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
@@ -1768,6 +1870,8 @@ ACCOUNT_API int account_query_capability_by_account_id(capability_cb callback, i
 
 static int _account_get_total_count(int *count, bool include_hidden)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_get_total_count_from_db starting");
 
        if (!count) {
@@ -1799,6 +1903,8 @@ static int _account_get_total_count(int *count, bool include_hidden)
 
 ACCOUNT_API int account_get_total_count_from_db(int *count)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_get_total_count_from_db starting");
 
        return _account_get_total_count(count, true);
@@ -1806,6 +1912,8 @@ ACCOUNT_API int account_get_total_count_from_db(int *count)
 
 ACCOUNT_INTERNAL_API int account_get_total_count_from_db_ex(int *count)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_get_total_count_from_db_ex starting");
 
        return _account_get_total_count(count, false);
@@ -1813,6 +1921,8 @@ ACCOUNT_INTERNAL_API int account_get_total_count_from_db_ex(int *count)
 
 ACCOUNT_API int account_update_sync_status_by_id(int account_db_id, const account_sync_state_e sync_status)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_update_sync_status_by_id starting");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -1842,6 +1952,8 @@ ACCOUNT_API int account_update_sync_status_by_id(int account_db_id, const accoun
 
 ACCOUNT_API int account_type_create(account_type_h *account_type)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type) {
                ACCOUNT_SLOGE("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -1871,6 +1983,8 @@ ACCOUNT_API int account_type_create(account_type_h *account_type)
 
 ACCOUNT_API int account_type_destroy(account_type_h account_type)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_destroy");
 
        account_type_s *data = (account_type_s *)account_type;
@@ -1887,6 +2001,8 @@ ACCOUNT_API int account_type_destroy(account_type_h account_type)
 
 ACCOUNT_INTERNAL_API int account_type_set_app_id(account_type_h account_type, const char *app_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type) {
                ACCOUNT_SLOGE("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -1911,6 +2027,8 @@ ACCOUNT_INTERNAL_API int account_type_set_app_id(account_type_h account_type, co
 
 ACCOUNT_INTERNAL_API int account_type_set_service_provider_id(account_type_h account_type, const char *service_provider_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1931,6 +2049,8 @@ ACCOUNT_INTERNAL_API int account_type_set_service_provider_id(account_type_h acc
 
 ACCOUNT_INTERNAL_API int account_type_set_icon_path(account_type_h account_type, const char *icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1951,6 +2071,8 @@ ACCOUNT_INTERNAL_API int account_type_set_icon_path(account_type_h account_type,
 
 ACCOUNT_INTERNAL_API int account_type_set_small_icon_path(account_type_h account_type, const char *small_icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -1971,6 +2093,8 @@ ACCOUNT_INTERNAL_API int account_type_set_small_icon_path(account_type_h account
 
 ACCOUNT_INTERNAL_API int account_type_set_multiple_account_support(account_type_h account_type, bool multiple_account_support)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        account_type_s *data = (account_type_s *)account_type;
@@ -1982,6 +2106,8 @@ ACCOUNT_INTERNAL_API int account_type_set_multiple_account_support(account_type_
 
 ACCOUNT_INTERNAL_API int account_type_set_label(account_type_h account_type, const char *label, const char *locale)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type) {
                ACCOUNT_SLOGE("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -2021,6 +2147,8 @@ ACCOUNT_INTERNAL_API int account_type_set_label(account_type_h account_type, con
 
 ACCOUNT_INTERNAL_API int account_type_set_provider_feature(account_type_h account_type, const char *provider_feature)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("account type handle is null"));
        ACCOUNT_RETURN_VAL((provider_feature != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("provider_feature is null"));
        ACCOUNT_RETURN_VAL((strlen(provider_feature) > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("provider_feature is Empty"));
@@ -2064,6 +2192,8 @@ ACCOUNT_INTERNAL_API int account_type_set_provider_feature(account_type_h accoun
 
 ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_cb callback, const char *app_id, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_provider_feature_by_app_id start");
 
        ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
@@ -2118,6 +2248,8 @@ ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_c
 
 ACCOUNT_API bool account_type_query_supported_feature(const char *app_id, const char *capability)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_supported_feature start");
 
        if (app_id == NULL || capability == NULL) {
@@ -2157,6 +2289,8 @@ ACCOUNT_API bool account_type_query_supported_feature(const char *app_id, const
 
 ACCOUNT_API int account_type_get_app_id(account_type_h account_type, char **app_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -2177,6 +2311,8 @@ ACCOUNT_API int account_type_get_app_id(account_type_h account_type, char **app_
 
 ACCOUNT_API int account_type_get_service_provider_id(account_type_h account_type, char **service_provider_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -2197,6 +2333,8 @@ ACCOUNT_API int account_type_get_service_provider_id(account_type_h account_type
 
 ACCOUNT_API int account_type_get_icon_path(account_type_h account_type, char **icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -2217,6 +2355,8 @@ ACCOUNT_API int account_type_get_icon_path(account_type_h account_type, char **i
 
 ACCOUNT_API int account_type_get_small_icon_path(account_type_h account_type, char **small_icon_path)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -2238,6 +2378,8 @@ ACCOUNT_API int account_type_get_small_icon_path(account_type_h account_type, ch
 
 ACCOUNT_API int account_type_get_multiple_account_support(account_type_h account_type, int *multiple_account_support)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_type)
                return ACCOUNT_ERROR_INVALID_PARAMETER;
 
@@ -2253,6 +2395,8 @@ ACCOUNT_API int account_type_get_multiple_account_support(account_type_h account
 
 ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_type, provider_feature_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
 
@@ -2275,6 +2419,8 @@ ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_typ
 
 ACCOUNT_API int account_type_get_label_by_locale(account_type_h account_type, const char *locale, char **label)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((label != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("INVALID PARAMETER"));
 
@@ -2342,6 +2488,8 @@ ACCOUNT_API int account_type_get_label_by_locale(account_type_h account_type, co
 
 ACCOUNT_API int account_type_get_label(account_type_h account_type, account_label_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
 
@@ -2364,6 +2512,8 @@ ACCOUNT_API int account_type_get_label(account_type_h account_type, account_labe
 
 ACCOUNT_INTERNAL_API int account_type_insert_to_db(account_type_h account_type, int *account_type_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_insert_to_db starting");
 
        ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT TYPE HANDLE IS NULL"));
@@ -2411,6 +2561,8 @@ ACCOUNT_INTERNAL_API int account_type_insert_to_db(account_type_h account_type,
 
 ACCOUNT_INTERNAL_API int account_type_update_to_db_by_app_id(const account_type_h account_type, const char *app_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_update_to_db_by_app_id starting");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -2443,6 +2595,8 @@ ACCOUNT_INTERNAL_API int account_type_update_to_db_by_app_id(const account_type_
 
 ACCOUNT_INTERNAL_API int account_type_delete_by_app_id(const char *app_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_delete_by_app_id starting");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -2477,6 +2631,8 @@ ACCOUNT_INTERNAL_API int account_type_delete_by_app_id(const char *app_id)
 
 ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb callback, const char *app_id, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_label_by_app_id starting");
 
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT Callback IS NULL"));
@@ -2523,6 +2679,8 @@ ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb callback, co
 
 ACCOUNT_API int account_type_query_by_app_id(const char *app_id, account_type_h *account_type)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_by_app_id starting");
 
        ACCOUNT_RETURN_VAL((app_id != 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
@@ -2569,6 +2727,8 @@ ACCOUNT_API int account_type_query_by_app_id(const char *app_id, account_type_h
 
 ACCOUNT_API int account_type_foreach_account_type_from_db(account_type_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_foreach_account_type_from_db starting");
 
        ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT Callback IS NULL"));
@@ -2619,6 +2779,8 @@ ACCOUNT_API int account_type_foreach_account_type_from_db(account_type_cb callba
 
 ACCOUNT_API int account_type_query_label_by_locale(const char *app_id, const char *locale, char **label)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_label_by_locale starting");
 
        ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO APP ID"));
@@ -2662,6 +2824,8 @@ ACCOUNT_API int account_type_query_label_by_locale(const char *app_id, const cha
 
 ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb callback, const char *key, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_by_provider_feature starting");
 
        ACCOUNT_RETURN_VAL((key != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
@@ -2713,6 +2877,8 @@ ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb callback,
 
 ACCOUNT_API int account_type_query_app_id_exist(const char *app_id)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        _INFO("account_type_query_app_id_exist starting");
        int error_code = ACCOUNT_ERROR_NONE;
 
@@ -2797,6 +2963,8 @@ static void _account_subscribe_vconf_callback(keynode_t *key, void *user_data)
 
 ACCOUNT_API int account_subscribe_create(account_subscribe_h *account_subscribe)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        if (!account_subscribe) {
                ACCOUNT_SLOGE("account is NULL.\n", __FUNCTION__, __LINE__);
                return ACCOUNT_ERROR_INVALID_PARAMETER;
@@ -2815,6 +2983,8 @@ ACCOUNT_API int account_subscribe_create(account_subscribe_h *account_subscribe)
 
 ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subscribe, account_event_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        account_subscribe_s *tmp = (account_subscribe_s *)account_subscribe;
@@ -2839,6 +3009,8 @@ ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subsc
 
 ACCOUNT_API int account_unsubscribe_notification(account_subscribe_h account_subscribe)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        account_subscribe_s *tmp = (account_subscribe_s *)account_subscribe;
@@ -2915,6 +3087,8 @@ static void _account_subscribe_vconf_callback_ex(keynode_t *key, void *user_data
 
 ACCOUNT_API int account_unsubscribe_notification_ex(account_subscribe_h account_subscribe)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        account_subscribe_s *tmp = (account_subscribe_s *)account_subscribe;
@@ -2932,6 +3106,8 @@ ACCOUNT_API int account_unsubscribe_notification_ex(account_subscribe_h account_
 
 ACCOUNT_API int account_subscribe_notification_ex(account_subscribe_h account_subscribe, account_event_cb callback, void *user_data)
 {
+       CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
        ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n",  __FUNCTION__, __LINE__));
 
        account_subscribe_s *tmp = (account_subscribe_s *)account_subscribe;