diff options
author | Randeep Singh <randeep.s@samsung.com> | 2019-10-07 06:11:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2019-10-07 06:11:52 +0000 |
commit | 1544e387007d0f8858f2cfc9d691b220e4c69852 (patch) | |
tree | 1f4451e3876a70ece338bee70b1b1ee5ea800f7f | |
parent | f8ff42ff9e74e09ba59cbef372741ca2c156662e (diff) | |
parent | 916d5f1e8e7147f41dfd38d28ad7836bb23e3a7f (diff) | |
download | account-common-1544e387007d0f8858f2cfc9d691b220e4c69852.tar.gz account-common-1544e387007d0f8858f2cfc9d691b220e4c69852.tar.bz2 account-common-1544e387007d0f8858f2cfc9d691b220e4c69852.zip |
Merge "[NewAPI][Querying for deleted account information]" into tizentizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201026.184301submit/tizen_5.5_mobile_hotfix/20201026.185101submit/tizen_5.5/20191031.000002submit/tizen/20191007.061836accepted/tizen/unified/20191009.231656accepted/tizen/5.5/unified/wearable/hotfix/20201027.123945accepted/tizen/5.5/unified/mobile/hotfix/20201027.082033accepted/tizen/5.5/unified/20191031.031651tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixtizen_5.5accepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unified
-rw-r--r-- | common/account_mgr.xml | 1 | ||||
-rw-r--r-- | common/src/account_db_helper.c | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/common/account_mgr.xml b/common/account_mgr.xml index 0278c68..7410f94 100644 --- a/common/account_mgr.xml +++ b/common/account_mgr.xml @@ -46,6 +46,7 @@ <method name="account_query_account_by_account_id"> <arg type="i" name="account_db_id" direction="in" /> <arg type="i" name="uid" direction="in" /> + <arg type="b" name="query_del_acc" direction="in" /> <arg type="a{sv}" name="account_data" direction="out" /> </method> <method name="account_update_to_db_by_user_name"> diff --git a/common/src/account_db_helper.c b/common/src/account_db_helper.c index c0429b6..35f33c4 100644 --- a/common/src/account_db_helper.c +++ b/common/src/account_db_helper.c @@ -1183,7 +1183,7 @@ static bool _account_add_custom_to_account_cb(const char *key, const char *value } int _account_query_by_account_id(sqlite3 *account_db_handle, account_add_capability_cb capability_cb, - account_add_custom_cb custom_cb, int account_id, void *user_data, bool is_deleted) + account_add_custom_cb custom_cb, int account_id, void *user_data, bool query_del_acc) { _INFO("_account_query_by_account_id start"); @@ -1201,7 +1201,7 @@ int _account_query_by_account_id(sqlite3 *account_db_handle, account_add_capabil /*check in proper tables of Capability & Account_Custom*/ if (capability_cb != NULL) { - if (!is_deleted) { + if (!query_del_acc) { _INFO("account query capability by account-id - original capability table"); ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE account_id = %d", CAPABILITY_TABLE, account_id); } else { @@ -1210,7 +1210,7 @@ int _account_query_by_account_id(sqlite3 *account_db_handle, account_add_capabil } query_for_capability = true; } else if (custom_cb != NULL) { - if (!is_deleted) { + if (!query_del_acc) { _INFO("account query capability by account-id - original custom table"); ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AccountId = %d", ACCOUNT_CUSTOM_TABLE, account_id); } else { @@ -1289,22 +1289,22 @@ CATCH: return error_code; } -int _account_query_capability_by_account_id(sqlite3 *account_db_handle, account_add_capability_cb callback, int account_id, void *user_data, bool is_deleted) +int _account_query_capability_by_account_id(sqlite3 *account_db_handle, account_add_capability_cb callback, int account_id, void *user_data, bool query_del_acc) { int error_code = _ACCOUNT_ERROR_NONE; - error_code = _account_query_by_account_id(account_db_handle, callback, NULL, account_id, user_data, is_deleted); + error_code = _account_query_by_account_id(account_db_handle, callback, NULL, account_id, user_data, query_del_acc); ACCOUNT_RETURN_VAL((error_code == _ACCOUNT_ERROR_NONE), {}, error_code, ("_account_query_by_account_id failed for capability")); return error_code; } -int _account_query_custom_by_account_id(sqlite3 *account_db_handle, account_add_custom_cb callback, int account_id, void *user_data, bool is_deleted) +int _account_query_custom_by_account_id(sqlite3 *account_db_handle, account_add_custom_cb callback, int account_id, void *user_data, bool query_del_acc) { int error_code = _ACCOUNT_ERROR_NONE; - error_code = _account_query_by_account_id(account_db_handle, NULL, callback, account_id, user_data, is_deleted); + error_code = _account_query_by_account_id(account_db_handle, NULL, callback, account_id, user_data, query_del_acc); ACCOUNT_RETURN_VAL((error_code == _ACCOUNT_ERROR_NONE), {}, error_code, ("_account_query_by_account_id failed for custom")); |