summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/account.h8
-rw-r--r--include/account_internal.h134
2 files changed, 129 insertions, 13 deletions
diff --git a/include/account.h b/include/account.h
index edbedc5..b503e25 100644
--- a/include/account.h
+++ b/include/account.h
@@ -1659,10 +1659,10 @@ int account_type_query_label_by_app_id(account_label_cb callback, const char* ap
* @brief Retrieves the account provider information with your application ID.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/account.read
- * @param[in] app_id The application ID to search
- * @param[out] account_type The account handle which is created by account_type_create()
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] app_id The application ID to search
+ * @param[in/out] account_type The account handle which has to be created by account_type_create() before calling this function and released by account_type_destroy() after calling this function.
*
* @return @c 0 on success,
* otherwise a negative error value
diff --git a/include/account_internal.h b/include/account_internal.h
index 1fc0524..cf81234 100644
--- a/include/account_internal.h
+++ b/include/account_internal.h
@@ -39,40 +39,43 @@ extern "C"
* @brief This file contains the Account API for account management.
*/
+
/**
* @internal
- * @brief Deletes an account from the account database by package name.
+ * @brief Updates the account details to the account database.
*
* @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/account.read \n
* %http://tizen.org/privilege/account.write
* @remarks This API need both privileges
- * @param[in] package_name The package name of account(s) to delete
+ * @param[in] account The account handle
+ * @param[in] account_id The account ID to update
*
* @return @c 0 on success,
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist
* @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
* @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
* @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
*
- * @see account_connect()
* @see account_insert_to_db()
* @see account_delete_from_db_by_id()
* @see account_delete_from_db_by_user_name()
- * @see account_update_to_db_by_id()
+ * @see account_delete_from_db_by_package_name()
* @see account_update_to_db_by_user_name()
*/
-int account_delete_from_db_by_package_name_offline(const char *package_name);
+int account_update_to_db_by_id_offline(account_h account, int account_id);
/**
* @internal
* @brief Updates the account details to the account database without checking provider's permission.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/account.read \n
* %http://tizen.org/privilege/account.write
@@ -91,9 +94,6 @@ int account_delete_from_db_by_package_name_offline(const char *package_name);
* @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
* @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
*
- * @pre This function requires an open connection to an account service by account_connect().
- *
- * @see account_connect()
* @see account_insert_to_db()
* @see account_delete_from_db_by_id()
* @see account_delete_from_db_by_user_name()
@@ -393,10 +393,126 @@ int account_unsubscribe_notification_ex(account_subscribe_h account_subscribe);
int account_get_total_count_from_db_ex(int *count);
/*offline apis*/
+
+/**
+ * @internal
+ * @brief Retrieves all accounts with the package name using only account library.
+ *
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] package_name The package name to search
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ *
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
+ *
+ * @see account_connect()
+ * @see account_foreach_account_from_db()
+ * @see account_query_account_by_account_id()
+ * @see account_query_account_by_user_name()
+ * @see account_query_account_by_capability()
+ */
+int account_query_account_by_package_name_offline(account_cb callback, const char *package_name, void *user_data);
+
+
+/**
+ * @internal
+ * @brief Deletes an account from the account database by package name using only account library.
+ *
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks This API need both privileges
+ * @param[in] package_name The package name of account(s) to delete
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ *
+ * @see account_connect()
+ * @see account_insert_to_db()
+ * @see account_delete_from_db_by_id()
+ * @see account_delete_from_db_by_user_name()
+ * @see account_update_to_db_by_id()
+ * @see account_update_to_db_by_user_name()
+ */
+int account_delete_from_db_by_package_name_offline(const char *package_name);
+
+/**
+ * @internal
+ * @brief Inserts the account provider details to the database using only account library.
+ *
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account_type The account handle which is created by account_type_create() \n
+ * @param[out] account_type_id The account provider ID to be assigned after inserting the account provider handle
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ *
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post account_disconnect() is recommended after insertion.
+ *
+ * @see account_connect()
+ * @see account_disconnect()
+ */
int account_type_insert_to_db_offline(account_type_h account_type, int* account_type_id);
+/**
+ * @internal
+ * @brief Deletes the account provider from the account database by application ID using only account library.
+ *
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] app_id The application ID of account provider to be deleted
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ *
+ * @pre This function requires an open connection to an account service by account_connect().
+ *
+ */
int account_type_delete_by_app_id_offline(const char* app_id);
+
+
+
/**
* @}
*/