* The account APIs is separated into two major sections:
* 1. Registering an account provider while an application is installed. This information will be used for the Add account screen.
* 2. Adding an account information when an application signs in successfully to share the account information to the Tizen system. This information will be shown in the Tizen settings account menu.
-
+ *
* The APIs of both of the sections consist of the following functionality:
* - Create an account or account provider
- * - Update an account or account provider(Only available for the creator)
- * - Delete an account or account provider(Only available for the creator)
+ * - Update an account or account provider (only available for the creator)
+ * - Delete an account or account provider (only available for the creator)
* - Read an account or account provider with some filter
+ *
+ * @section CAPI_ACCOUNT_MANAGER_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/account\n
+ * It is recommended to use features in your application for reliability. \n
+ * You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly. \n
+ * To ensure your application is running only on devices with specific features, please define the features in your manifest file using the manifest editor in the SDK.
+ * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/tizen-studio/native-tools/configuring-your-app/manifest-text-editor#feature"><b>feature element description</b></a>.
+ *
*/
#endif /* __ACCOUNT_MANAGER_DOC_H__ */
* The account APIs is separated into two major sections:
* 1. Registering an account provider while an application is installed. This information will be used for the Add account screen.
* 2. Adding an account information when an application signs in successfully to share the account information to the Tizen system. This information will be shown in the Tizen settings account menu.
-
+ *
* The APIs of both of the sections consist of the following functionality:
* - Create an account or account provider
- * - Update an account or account provider(Only available for the creator)
- * - Delete an account or account provider(Only available for the creator)
+ * - Update an account or account provider (only available for the creator)
+ * - Delete an account or account provider (only available for the creator)
* - Read an account or account provider with some filter
+ *
+ * @section CAPI_ACCOUNT_MANAGER_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/account\n
+ * It is recommended to use features in your application for reliability. \n
+ * You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly. \n
+ * To ensure your application is running only on devices with specific features, please define the features in your manifest file using the manifest editor in the SDK.
+ * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/tizen-studio/native-tools/configuring-your-app/manifest-text-editor#feature"><b>feature element description</b></a>.
*/
#endif /* __ACCOUNT_PRODUCT_H__ */
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 4.0) */
+ ACCOUNT_ERROR_OPERATION_FAIL = TIZEN_ERROR_INVALID_OPERATION, /**< Account operation failed (Since 4.0)*/
} account_error_e;
/**
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_destroy()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_create()
*/
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @retval #ACCOUNT_ERROR_PERMISSION_DENIED The account owner is different from the caller or 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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
*/
int account_get_account_id(account_h account, int *account_id);
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_user_name()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_user_name()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_display_name()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_display_name()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_capability()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_capability()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_capability()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_icon_path()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_icon_path()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_domain_name()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_domain_name()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_email_address()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_email_address()
*/
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_package_name()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_email_address()
*/
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
* @remarks You must release @a access_token using free().
+ * @remarks Access token field is used for storing account secret (password / master token etc)
*
* @param[in] account The account handle
* @param[out] access_token The access token
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
- * @remarks Access token field is used for storing account secret (password / master token etc)
* Only account owner application can retrieve account password / access_token. For others this field will be null.
* @see account_set_access_token()
*/
* @brief Sets the access token. Access token field is used to store account secrets (such as password or master token).
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
+ * @remarks Only account owner application can retrieve account password / access_token. For others this field will be null.
+ *
* @param[in] account The account handle
* @param[in] access_token The text string to set as the access token
*
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @remarks Only account owner application can retrieve account password / access_token. For others this field will be null.
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
* @see account_get_access_token()
*/
int account_set_access_token(account_h account, const char *access_token);
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_user_text()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_user_text()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_user_int()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_user_int()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_auth_type()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_auth_type()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_secret()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_secret()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_sync_support()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_sync_support()
*/
* @brief Gets the source.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
- * @remarks You must release @a user_text using free().
+ * @remarks You must release @a source using free().
*
* @param[in] account The account handle
* @param[out] source The source
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_source()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_source()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_get_custom()
*/
* @brief Gets the user specific custom text of an account key.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
+ * @remarks You must release @a value using free().
+ *
* @param[in] account The account handle
* @param[in] key The key to retrieve custom text
* @param[out] value The text of the given key
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability type in the account
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_custom()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_set_custom()
*/
* @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist
* @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy
* @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
/**
- * @brief Retrieve an account with the account ID.
+ * @brief Retrieves an account with the account ID.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/account.read
+ * @remarks You must allocate @a account using account_create() and release using account_destroy().
+ *
* @param[in] account_db_id The account database ID to search
* @param[out] account The account handle \n
- * Must be allocated by account_create() and freed after using by account_destroy().
*
* @return @c 0 on success,
* otherwise a negative error value
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_destroy()
*/
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_create()
*/
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @brief Gets the specific label information detail of an account provider.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif
+ * @remarks You must release @a label using free().
+ *
* @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().
* @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND No label for the given locale
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* otherwise a negative error value
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @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
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n
* But the account_connect() is not required to use this function since tizen 2.4.
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_unsubscribe_notification()
* @see account_subscribe_notification()
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Subscription fail
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @pre account_subscribe_create()
*
* @retval #ACCOUNT_ERROR_NONE Successful
* @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Unsubscription failed
+ * @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported
*
* @see account_create()
*/
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
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)
glib-2.0
gio-unix-2.0
capi-base-common
+ capi-system-info
vconf
account-common
db-util
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"));
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;
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");
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;
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;
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);
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;
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;
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__);
ACCOUNT_API int account_destroy(account_h account)
{
+ CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
_INFO("account_destroy start");
account_s *data = (account_s *)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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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))
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))
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))
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;
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"));
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;
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;
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;
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;
ACCOUNT_API int account_get_source(account_h account, char **source)
{
+ CHECK_ACCOUNT_SUPPORTED(ACCOUNT_FEATURE);
+
if (!account)
return ACCOUNT_ERROR_INVALID_PARAMETER;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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"));
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) {
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);
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);
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;
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;
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;
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;
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;
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;
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;
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;
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;
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"));
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"));
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) {
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;
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;
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;
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;
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;
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"));
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"));
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"));
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"));
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;
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;
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"));
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"));
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"));
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"));
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"));
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;
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;
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;
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;
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;
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;