* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
* @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
- * @see account_get_display_name()
+ * @see account_set_display_name()
*/
int account_get_display_name(account_h account, char **display_name);
*/
int account_foreach_account_from_db(account_cb callback, void *user_data);
-
/**
* @brief Retrieves an account with the account ID.
*
int account_query_account_by_account_id(int account_db_id, account_h *account);
/**
+ * @brief Retrieves deleted account with the account ID.
+ *
+ * @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @remarks The @a account should be released using account_destroy().
+ *
+ * @param[in] account_db_id The id of the account to find in the database
+ * @param[out] account The account handle
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ *
+ * @see account_query_account_by_account_id()
+ * @see account_query_account_by_user_name()
+ * @see account_query_account_by_package_name()
+ * @see account_query_account_by_capability()
+ */
+int account_query_deleted_account_info_by_account_id(int account_db_id, account_h *account);
+
+/**
* @brief Retrieves all accounts with the user name.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
*
- * @remarks When you get @a account_type_h using account_type_create(), you must release the handle using account_destroy() to avoid the memory leak.
+ * @remarks When you get @a account_type using account_type_create(), you must release the handle using account_destroy() to avoid the memory leak.
*
* @param[in] account_type The account provider handle
*
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
* @param[in] account_type The account provider handle \n
- * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db.
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
* @param[out] multiple_account_support The flag indicating support for multiple accounts accounts\n
* TRUE or FALSE.
*
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
- * @pre account_subscribe_create()
- *
* @see account_unsubscribe_notification()
* @see account_subscribe_notification()
*/
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/account.read \n
- * @remarks You must call @a account_unsubscribe_notification when you do not need to subscribe account event.
+ * @remarks You must call account_unsubscribe_notification() when you do not need to subscribe account event.
*
* @param[in] account_subscribe The account subscription handle
*
_INFO("2. Before account_manager_call_account_query_account_by_account_id_sync");
GVariant *account_serialized_old = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)getuid(), false, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
_INFO("2. Before account_manager_call_account_query_account_by_account_id_sync");
GVariant *account_serialized_old = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)getuid(), false, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
if (uid == 0)
uid = getuid();
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)uid, &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)uid, false, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
GVariant *account_serialized_old = NULL;
account_s *account_data = (account_s *)account;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_data->id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_data->id, (int)getuid(), false, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_query_account_by_account_id(int account_db_id, account_h *account)
+int _account_query_account_for_account_id(int account_db_id, account_h *account, bool query_del_acc)
{
CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
- _INFO("account_query_account_by_account_id start [%d]", account_db_id);
+ _INFO("_account_query_account_for_account_id start db_id [%d] del_acc [%d]", account_db_id, query_del_acc);
ACCOUNT_RETURN_VAL((account_db_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT POINTER IS NULL"));
uid = 5001;
GVariant *account_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)uid, &account_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)uid, query_del_acc, &account_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
*input = account_data;
- _INFO("account_query_account_by_account_id end");
+ _INFO("_account_query_account_for_account_id end");
return ACCOUNT_ERROR_NONE;
}
+ACCOUNT_API int account_query_account_by_account_id(int account_db_id, account_h *account)
+{
+ _INFO("account_query_account_by_account_id - account_db_id[%d]");
+
+ return _account_query_account_for_account_id(account_db_id, account, false);
+}
+
+ACCOUNT_API int account_query_deleted_account_info_by_account_id(int account_db_id, account_h *account)
+{
+ _INFO("account_query_deleted_account_info_by_account_id - account_db_id[%d]");
+
+ return _account_query_account_for_account_id(account_db_id, account, true);
+}
+
ACCOUNT_API int account_query_account_by_user_name(account_cb callback, const char *user_name, void *user_data)
{
CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);