Tizen Native API
3.0
|
The account APIs provide CRUD (Create, Read, Update, Delete) account management functionality.
Required Header
#include <account.h>
Overview
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)
- Read an account or account provider with some filter
Functions | |
int | account_create (account_h *account) |
Creates a handle to the account. | |
int | account_destroy (account_h account) |
Destroys the account handle and releases all its resources. | |
int | account_insert_to_db (account_h account, int *account_db_id) |
Inserts the account details to the account database. | |
int | account_delete_from_db_by_id (int account_db_id) |
Deletes an account from the account database by account DB ID. | |
int | account_delete_from_db_by_user_name (char *user_name, char *package_name) |
Deletes an account from the account database by user name. | |
int | account_delete_from_db_by_package_name (const char *package_name) |
Deletes an account from the account database by package name. | |
int | account_update_to_db_by_id (account_h account, int account_id) |
Updates the account details to the account database. | |
int | account_update_to_db_by_id_ex (account_h account, int account_id) |
Updates the account details to the account database. The provider permission check has been added since tizen 3.0. | |
int | account_update_to_db_by_user_name (account_h account, const char *user_name, const char *package_name) |
Updates the account details to the account database. | |
int | account_get_account_id (account_h account, int *account_id) |
Gets the ID of an account. | |
int | account_get_user_name (account_h account, char **user_name) |
Gets the user name of an account. | |
int | account_set_user_name (account_h account, const char *user_name) |
Sets the user name of an account. | |
int | account_get_display_name (account_h account, char **display_name) |
Gets the display name of an account. | |
int | account_set_display_name (account_h account, const char *display_name) |
Sets the display name of an account. | |
int | account_get_capability (account_h account, const char *capability_type, account_capability_state_e *capability_value) |
Gets the capability detail of an account. | |
int | account_get_capability_all (account_h account, capability_cb callback, void *user_data) |
Gets all the capabilities of an account. | |
int | account_set_capability (account_h account, const char *capability_type, account_capability_state_e capability_state) |
Sets the capability. | |
int | account_get_icon_path (account_h account, char **icon_path) |
Gets the icon path. | |
int | account_set_icon_path (account_h account, const char *icon_path) |
Sets the icon path. | |
int | account_get_domain_name (account_h account, char **domain_name) |
Gets the domain name. | |
int | account_set_domain_name (account_h account, const char *domain_name) |
Sets the domain name. | |
int | account_get_email_address (account_h account, char **email_address) |
Gets the email address. | |
int | account_set_email_address (account_h account, const char *email_address) |
Sets the email address. | |
int | account_get_package_name (account_h account, char **package_name) |
Gets the package name. | |
int | account_set_package_name (account_h account, const char *package_name) |
Sets the package name. | |
int | account_get_access_token (account_h account, char **access_token) |
Gets the access token. Access token field is used to store account secrets (such as password or master token). | |
int | account_set_access_token (account_h account, const char *access_token) |
Sets the access token. Access token field is used to store account secrets (such as password or master token). | |
int | account_get_user_text (account_h account, int user_text_index, char **user_text) |
Gets the user text. | |
int | account_set_user_text (account_h account, int user_text_index, const char *user_text) |
Sets the user text. | |
int | account_get_user_int (account_h account, int user_int_index, int *user_integer) |
Gets the user integer. | |
int | account_set_user_int (account_h account, int user_int_index, int user_integer) |
Sets the user integer. | |
int | account_get_auth_type (account_h account, account_auth_type_e *auth_type) |
Gets the authentiacation type. | |
int | account_set_auth_type (account_h account, const account_auth_type_e auth_type) |
Sets the authentiacation type. | |
int | account_get_secret (account_h account, account_secrecy_state_e *secret) |
Gets the secret. | |
int | account_set_secret (account_h account, const account_secrecy_state_e secret) |
Sets the secret. | |
int | account_get_sync_support (account_h account, account_sync_state_e *sync_support) |
Gets the sync support. | |
int | account_set_sync_support (account_h account, const account_sync_state_e sync_support) |
Sets the sync support. | |
int | account_get_source (account_h account, char **source) |
Gets the source. | |
int | account_set_source (account_h account, const char *source) |
Sets the source. | |
int | account_set_custom (account_h account, const char *key, const char *value) |
Sets the custom. | |
int | account_get_custom (account_h account, const char *key, char **value) |
Gets the user specific custom text of an account key. | |
int | account_get_custom_all (account_h account, account_custom_cb callback, void *user_data) |
Gets all the user custom texts of an account. | |
int | account_foreach_account_from_db (account_cb callback, void *user_data) |
Retrieves all accounts details by invoking the given callback function iteratively. | |
int | account_query_account_by_account_id (int account_db_id, account_h *account) |
Retrieve an account with the account ID. | |
int | account_query_account_by_user_name (account_cb callback, const char *user_name, void *user_data) |
Retrieves all accounts with the user name. | |
int | account_query_account_by_package_name (account_cb callback, const char *package_name, void *user_data) |
Retrieves all accounts with the package name. | |
int | account_query_account_by_capability (account_cb callback, const char *capability_type, account_capability_state_e capability_value, void *user_data) |
Retrieves all accounts with the capability type and capability value. | |
int | account_query_account_by_capability_type (account_cb callback, const char *capability_type, void *user_data) |
Retrieves all accounts with the capability type. | |
int | account_query_capability_by_account_id (capability_cb callback, int account_db_id, void *user_data) |
Retrieves all capabilities with the account database ID. | |
int | account_get_total_count_from_db (int *count) |
Gets the count of accounts in the account database. | |
int | account_update_sync_status_by_id (int account_db_id, const account_sync_state_e sync_status) |
Updates the sync status of an account with the given account ID. | |
int | account_type_create (account_type_h *account_type) |
Creates a handle to the account provider. | |
int | account_type_destroy (account_type_h account_type) |
Destroys the account provider handle and releases all its resources. | |
int | account_type_query_provider_feature_by_app_id (provider_feature_cb callback, const char *app_id, void *user_data) |
Retrieves capability information with your application ID. | |
bool | account_type_query_supported_feature (const char *app_id, const char *capability) |
Checks whether the given application ID supports the capability. | |
int | account_type_get_app_id (account_type_h account_type, char **app_id) |
Gets the application ID of an account provider. | |
int | account_type_get_service_provider_id (account_type_h account_type, char **service_provider_id) |
Gets the service provider ID of an account provider. | |
int | account_type_get_icon_path (account_type_h account_type, char **icon_path) |
Gets the icon path of an account provider. | |
int | account_type_get_small_icon_path (account_type_h account_type, char **small_icon_path) |
Gets the small icon path of an account provider. | |
int | account_type_get_multiple_account_support (account_type_h account_type, int *multiple_account_support) |
Checks whether the given account provider supports multiple accounts. | |
int | account_type_get_provider_feature_all (account_type_h account_type, provider_feature_cb callback, void *user_data) |
Gets capability information with the given account provider handle. | |
int | account_type_get_label_by_locale (account_type_h account_type, const char *locale, char **label) |
Gets the specific label information detail of an account provider. | |
int | account_type_get_label (account_type_h account_type, account_label_cb callback, void *user_data) |
Gets the label information detail of an account provider. | |
int | account_type_query_label_by_app_id (account_label_cb callback, const char *app_id, void *user_data) |
Retrieves the label information with your application ID. | |
int | account_type_query_by_app_id (const char *app_id, account_type_h *account_type) |
Retrieves the account provider information with your application ID. | |
int | account_type_foreach_account_type_from_db (account_type_cb callback, void *user_data) |
Retrieves all account priovider information. | |
int | account_type_query_label_by_locale (const char *app_id, const char *locale, char **label) |
Retrieves the label information with the given application ID and locale. | |
int | account_type_query_by_provider_feature (account_type_cb callback, const char *key, void *user_data) |
Retrieves account provider information with the capability name. | |
int | account_type_query_app_id_exist (const char *app_id) |
Checks whether the given app_id exists in the account provider DB. | |
int | account_subscribe_create (account_subscribe_h *account_subscribe) |
Creates a handle for the account event subscription. | |
int | account_subscribe_notification (account_subscribe_h account_subscribe, account_event_cb callback, void *user_data) |
Starts to subscribe account event through the given callback function. | |
int | account_unsubscribe_notification (account_subscribe_h account_subscribe) |
Destroys the account subscribe handle and releases all its resources. | |
Typedefs | |
typedef struct account_s * | account_h |
The structure type for the Account handle. | |
typedef struct account_type_s * | account_type_h |
The structure type for the Account provider handle. | |
typedef struct label_s * | label_h |
The structure type for the Account handle. | |
typedef struct account_subscribe_s * | account_subscribe_h |
The structure type for the Account subscribe handle. | |
typedef bool(* | account_cb )(account_h account, void *user_data) |
Called once for each account from the database. | |
typedef bool(* | capability_cb )(const char *capability_type, account_capability_state_e capability_state, void *user_data) |
Called once for each capability of an account in the database. | |
typedef bool(* | account_custom_cb )(char *key, char *value, void *user_data) |
Called once for each custom data of an account in the database. | |
typedef bool(* | account_type_cb )(account_type_h account_type, void *user_data) |
Called once for each account provider in the database. | |
typedef bool(* | account_label_cb )(char *app_id, char *label, char *locale, void *user_data) |
Called once for each account label. | |
typedef bool(* | provider_feature_cb )(char *app_id, char *key, void *user_data) |
Called once for each capability of an account provider in the database. | |
typedef bool(* | account_event_cb )(const char *event_type, int account_id, void *user_data) |
Called once when an event occurs. | |
Defines | |
#define | ACCOUNT_NOTI_NAME_INSERT "insert" |
The insert notification type. | |
#define | ACCOUNT_NOTI_NAME_UPDATE "update" |
The update notification type. | |
#define | ACCOUNT_NOTI_NAME_DELETE "delete" |
The delete notification type. | |
#define | ACCOUNT_NOTI_NAME_SYNC_UPDATE "sync_update" |
The sync_update notification type. | |
#define | ACCOUNT_DATA_USERNAME "http://tizen.org/account/data/username" |
This is a key of app_control_h’s extra data. The value of the key is a user account name. | |
#define | ACCOUNT_DATA_ID "http://tizen.org/appcontrol/data/account/id" |
This is a key of app_control_h’s extra data. The value of the key is account DB ID of the user’s account information. | |
#define | ACCOUNT_OPERATION_SIGNIN "http://tizen.org/appcontrol/operation/account/add" |
This is an application launch operation name. | |
#define | ACCOUNT_OPERATION_VIEW "http://tizen.org/appcontrol/operation/account/configure" |
This is an application launch operation name. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_CONTACT "http://tizen.org/account/capability/contact" |
This is contact capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_CALENDAR "http://tizen.org/account/capability/calendar" |
This is calendar capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_EMAIL "http://tizen.org/account/capability/email" |
This is email capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_PHOTO "http://tizen.org/account/capability/photo" |
This is photo capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_VIDEO "http://tizen.org/account/capability/video" |
This is video capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/account/capability/music" |
This is music capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_DOCUMENT "http://tizen.org/account/capability/document" |
This is document capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_MESSAGE "http://tizen.org/account/capability/message" |
This is message capability string. | |
#define | ACCOUNT_SUPPORTS_CAPABILITY_GAME "http://tizen.org/account/capability/game" |
This is game capability string. |
Define Documentation
#define ACCOUNT_DATA_ID "http://tizen.org/appcontrol/data/account/id" |
This is a key of app_control_h’s extra data. The value of the key is account DB ID of the user’s account information.
- Since :
- 3.0
- Remarks:
- You can retrieve the value like this, app_control_get_extra_data(app_control, ACCOUNT_DATA_ID, &id).
This value will be sent with ACCOUNT_OPERATION_VIEW.
#define ACCOUNT_DATA_USERNAME "http://tizen.org/account/data/username" |
This is a key of app_control_h’s extra data. The value of the key is a user account name.
- Since :
- 3.0
- Remarks:
- You can retrieve the value like this, app_control_get_extra_data(app_control, ACCOUNT_DATA_USERNAME, &username).
This value will be sent with ACCOUNT_OPERATION_VIEW.
#define ACCOUNT_NOTI_NAME_DELETE "delete" |
The delete notification type.
- Since :
- 3.0
- Remarks:
- When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
- See also:
- account_subscribe_notification()
#define ACCOUNT_NOTI_NAME_INSERT "insert" |
The insert notification type.
- Since :
- 3.0
- Remarks:
- When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
- See also:
- account_subscribe_notification()
#define ACCOUNT_NOTI_NAME_SYNC_UPDATE "sync_update" |
The sync_update notification type.
- Since :
- 3.0
- Remarks:
- When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
- See also:
- account_subscribe_notification()
#define ACCOUNT_NOTI_NAME_UPDATE "update" |
The update notification type.
- Since :
- 3.0
- Remarks:
- When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
- See also:
- account_subscribe_notification()
#define ACCOUNT_OPERATION_SIGNIN "http://tizen.org/appcontrol/operation/account/add" |
This is an application launch operation name.
- Since :
- 3.0
- Remarks:
- This operation will be sent when a user selects your account in add account view.
#define ACCOUNT_OPERATION_VIEW "http://tizen.org/appcontrol/operation/account/configure" |
This is an application launch operation name.
- Since :
- 3.0
- Remarks:
- This operation will be sent when a user selects your account in account list view.
#define ACCOUNT_SUPPORTS_CAPABILITY_CALENDAR "http://tizen.org/account/capability/calendar" |
This is calendar capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has calendar information and calendar information is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_CONTACT "http://tizen.org/account/capability/contact" |
This is contact capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has contact information and contact information is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_DOCUMENT "http://tizen.org/account/capability/document" |
This is document capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has document and document is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_EMAIL "http://tizen.org/account/capability/email" |
This is email capability string.
- Since :
- 3.0
- Remarks:
- If your provider service have email service and email is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_GAME "http://tizen.org/account/capability/game" |
This is game capability string.
- Since :
- 3.0
- Remarks:
- This capability will be exploited to use game data.
#define ACCOUNT_SUPPORTS_CAPABILITY_MESSAGE "http://tizen.org/account/capability/message" |
This is message capability string.
- Since :
- 3.0
- Remarks:
- This capability will be exploited to use SMS, MMS.
#define ACCOUNT_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/account/capability/music" |
This is music capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has music and music is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_PHOTO "http://tizen.org/account/capability/photo" |
This is photo capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has photo and photo is provided another application, register this capability through manifest file.
#define ACCOUNT_SUPPORTS_CAPABILITY_VIDEO "http://tizen.org/account/capability/video" |
This is video capability string.
- Since :
- 3.0
- Remarks:
- If your provider service has video and video is provided another application, register this capability through manifest file.
Typedef Documentation
typedef bool(* account_cb)(account_h account, void *user_data) |
Called once for each account from the database.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_foreach_account_from_db(), account_query_account_by_account_id(), account_query_account_by_user_name() or account_query_account_by_package_name() must be called.
typedef bool(* account_custom_cb)(char *key, char *value, void *user_data) |
Called once for each custom data of an account in the database.
- Since :
- 3.0
- Parameters:
-
[in] key The user custom key [in] value The user custom value of the specific key [in] user_data The user data passed
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_query_capability_by_account_id() must be called.
typedef bool(* account_event_cb)(const char *event_type, int account_id, void *user_data) |
Called once when an event occurs.
- Since :
- 3.0
- Parameters:
-
[in] event_type The account event type [in] account_id The account ID to update [in] user_data The user data passed
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_subscribe_notification() must be called.
- See also:
- account_subscribe_notification()
typedef struct account_s* account_h |
The structure type for the Account handle.
- Since :
- 3.0
typedef bool(* account_label_cb)(char *app_id, char *label, char *locale, void *user_data) |
Called once for each account label.
- Since :
- 3.0
- Parameters:
-
[in] app_id The application ID [in] label The name of the account depends on the specified locale [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.
For example, "ko_KR" for Korean, "en_US" for American English.[in] user_data The user data passed
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_type_get_label(), account_type_query_label_by_app_id() must be called.
typedef struct account_subscribe_s* account_subscribe_h |
The structure type for the Account subscribe handle.
- Since :
- 3.0
typedef bool(* account_type_cb)(account_type_h account_type, void *user_data) |
Called once for each account provider in the database.
- Since :
- 3.0
- Parameters:
-
[in] account_type The account provider handle [in] user_data The user data passed
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_type_foreach_account_type_from_db(), account_type_query_by_provider_feature() must be called.
typedef struct account_type_s* account_type_h |
The structure type for the Account provider handle.
- Since :
- 3.0
typedef bool(* capability_cb)(const char *capability_type, account_capability_state_e capability_state, void *user_data) |
Called once for each capability of an account in the database.
- Since :
- 3.0
- Parameters:
-
[in] capability_type The capability type [in] capability_state The capability state [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_query_capability_by_account_id() must be called.
typedef struct label_s* label_h |
The structure type for the Account handle.
- Since :
- 3.0
typedef bool(* provider_feature_cb)(char *app_id, char *key, void *user_data) |
Called once for each capability of an account provider in the database.
- Since :
- 3.0
- Parameters:
-
[in] app_id The application ID [in] key The user custom key [in] user_data The user data passed
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- account_type_query_provider_feature_by_app_id(), account_type_get_provider_feature_all() must be called.
Enumeration Type Documentation
enum account_auth_type_e |
enum account_error_e |
Enumerations of error codes for ACCOUNT APIs.
- Since :
- 3.0
- Enumerator:
enum account_sync_state_e |
Enumeration for the account sync status.
- Since :
- 3.0
- Enumerator:
Function Documentation
int account_create | ( | account_h * | account | ) |
Creates a handle to the account.
- Since :
- 3.0
- Remarks:
- Release account using account_destroy().
- The created handle is not added to the account database until account_insert_to_db() is called.
- Parameters:
-
[in] account The account handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_destroy()
int account_delete_from_db_by_id | ( | int | account_db_id | ) |
Deletes an account from the account database by account DB ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can delete an account which was added by same package applications
- Parameters:
-
[in] account_db_id The account ID to delete
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED The account owner is different from the caller or DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_delete_from_db_by_package_name | ( | const char * | package_name | ) |
Deletes an account from the account database by package name.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can delete accounts which was added by same package applications
- Parameters:
-
[in] package_name The package name of account(s) to delete
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_delete_from_db_by_user_name | ( | char * | user_name, |
char * | package_name | ||
) |
Deletes an account from the account database by user name.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can delete accounts which were added by same package applications
- Parameters:
-
[in] user_name The user name of the account to delete [in] package_name The package name of the account to delete
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_destroy | ( | account_h | account | ) |
Destroys the account handle and releases all its resources.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_create()
int account_foreach_account_from_db | ( | account_cb | callback, |
void * | user_data | ||
) |
Retrieves all accounts details by invoking the given callback function iteratively.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes account_cb().
int account_get_access_token | ( | account_h | account, |
char ** | access_token | ||
) |
Gets the access token. Access token field is used to store account secrets (such as password or master token).
- Since :
- 3.0
- Remarks:
- You must release access_token using free().
- Parameters:
-
[in] account The account handle [out] access_token The access token
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- 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 also:
- account_set_access_token()
int account_get_account_id | ( | account_h | account, |
int * | account_id | ||
) |
Gets the ID of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [out] account_id The account ID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
int account_get_auth_type | ( | account_h | account, |
account_auth_type_e * | auth_type | ||
) |
Gets the authentiacation type.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [out] auth_type The authentiacation type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_auth_type()
int account_get_capability | ( | account_h | account, |
const char * | capability_type, | ||
account_capability_state_e * | capability_value | ||
) |
Gets the capability detail of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] capability_type The capability type to get the capability value [out] capability_value The capability value (on/off) of the specified capability_type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account
- See also:
- account_set_capability()
int account_get_capability_all | ( | account_h | account, |
capability_cb | callback, | ||
void * | user_data | ||
) |
Gets all the capabilities of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] callback The callback function [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_capability()
int account_get_custom | ( | account_h | account, |
const char * | key, | ||
char ** | value | ||
) |
Gets the user specific custom text of an account key.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] key The key to retrieve custom text [out] value The text of the given key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability type in the account
- See also:
- account_set_custom()
int account_get_custom_all | ( | account_h | account, |
account_custom_cb | callback, | ||
void * | user_data | ||
) |
Gets all the user custom texts of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] callback The callback function to retrieve all custom text
The callback function gives the key and value.[in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_custom()
int account_get_display_name | ( | account_h | account, |
char ** | display_name | ||
) |
Gets the display name of an account.
- Since :
- 3.0
- Remarks:
- You must release display_name using free().
- Parameters:
-
[in] account The account handle [out] display_name The display name of the account
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_get_display_name()
int account_get_domain_name | ( | account_h | account, |
char ** | domain_name | ||
) |
Gets the domain name.
- Since :
- 3.0
- Remarks:
- You must release domain_name using free().
- Parameters:
-
[in] account The account handle [out] domain_name The domain name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_domain_name()
int account_get_email_address | ( | account_h | account, |
char ** | email_address | ||
) |
Gets the email address.
- Since :
- 3.0
- Remarks:
- You must release email_address using free().
- Parameters:
-
[in] account The account handle [out] email_address The email address
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_email_address()
int account_get_icon_path | ( | account_h | account, |
char ** | icon_path | ||
) |
Gets the icon path.
- Since :
- 3.0
- Remarks:
- You must release icon_path using free().
- Parameters:
-
[in] account The account handle [out] icon_path The icon path
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_icon_path()
int account_get_package_name | ( | account_h | account, |
char ** | package_name | ||
) |
Gets the package name.
- Since :
- 3.0
- Remarks:
- You must release package_name using free().
- Parameters:
-
[in] account The account handle [out] package_name The package name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_package_name()
int account_get_secret | ( | account_h | account, |
account_secrecy_state_e * | secret | ||
) |
Gets the secret.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [out] secret The secret
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_secret()
int account_get_source | ( | account_h | account, |
char ** | source | ||
) |
Gets the source.
- Since :
- 3.0
- Remarks:
- You must release user_text using free().
- Parameters:
-
[in] account The account handle [out] source The source
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_source()
int account_get_sync_support | ( | account_h | account, |
account_sync_state_e * | sync_support | ||
) |
Gets the sync support.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [out] sync_support The sync support
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_sync_support()
int account_get_total_count_from_db | ( | int * | count | ) |
Gets the count of accounts in the account database.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[out] count The out parameter for count of all accounts
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_get_user_int | ( | account_h | account, |
int | user_int_index, | ||
int * | user_integer | ||
) |
Gets the user integer.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] user_int_index The index of the user integer (must be in range from 0
to4
)[out] user_integer The user integer
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_set_user_int()
int account_get_user_name | ( | account_h | account, |
char ** | user_name | ||
) |
Gets the user name of an account.
- Since :
- 3.0
- Remarks:
- You must release user_name using free().
- Parameters:
-
[in] account The account handle [out] user_name The user name of the account
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_user_name()
int account_get_user_text | ( | account_h | account, |
int | user_text_index, | ||
char ** | user_text | ||
) |
Gets the user text.
- Since :
- 3.0
- Remarks:
- You must release user_text using free().
- Parameters:
-
[in] account The account handle [in] user_text_index The index of the user text (range: 0 ~ 4) [out] user_text The user text
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- account_set_user_text()
int account_insert_to_db | ( | account_h | account, |
int * | account_db_id | ||
) |
Inserts the account details to the account database.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
- Parameters:
-
[in] account The account handle [out] account_db_id The account ID to be assigned to an account
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_DUPLICATED Same user name exists in your application ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE Tried to add an account in spite of multiple false accounts ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER Tried to add an account though you did not register the account type in manifest ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_query_account_by_account_id | ( | int | account_db_id, |
account_h * | account | ||
) |
Retrieve an account with the account ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] account_db_id The account database ID to search [out] account The account handle
Must be allocated by account_create() and freed after using by account_destroy().
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_query_account_by_capability | ( | account_cb | callback, |
const char * | capability_type, | ||
account_capability_state_e | capability_value, | ||
void * | user_data | ||
) |
Retrieves all accounts with the capability type and capability value.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] capability_type The capability type to search [in] capability_value The capability value to search [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes account_cb().
int account_query_account_by_capability_type | ( | account_cb | callback, |
const char * | capability_type, | ||
void * | user_data | ||
) |
Retrieves all accounts with the capability type.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] capability_type The capability type to search [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes account_cb().
int account_query_account_by_package_name | ( | account_cb | callback, |
const char * | package_name, | ||
void * | user_data | ||
) |
Retrieves all accounts with the package name.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] package_name The package name to search [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes account_cb().
int account_query_account_by_user_name | ( | account_cb | callback, |
const char * | user_name, | ||
void * | user_data | ||
) |
Retrieves all accounts with the user name.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] user_name The user name to search [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes account_cb().
int account_query_capability_by_account_id | ( | capability_cb | callback, |
int | account_db_id, | ||
void * | user_data | ||
) |
Retrieves all capabilities with the account database ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to invoke [in] account_db_id The account database ID to search [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- Postcondition:
- This function invokes capability_cb().
int account_set_access_token | ( | account_h | account, |
const char * | access_token | ||
) |
Sets the access token. Access token field is used to store account secrets (such as password or master token).
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] access_token The text string to set as the access token
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- Remarks:
- Only account owner application can retrieve account password / access_token. For others this field will be null.
- See also:
- account_get_access_token()
int account_set_auth_type | ( | account_h | account, |
const account_auth_type_e | auth_type | ||
) |
Sets the authentiacation type.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] auth_type The integer to be set as the authentiacation type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_auth_type()
int account_set_capability | ( | account_h | account, |
const char * | capability_type, | ||
account_capability_state_e | capability_state | ||
) |
Sets the capability.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] capability_type The capability type [in] capability_state The capability state
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_capability()
int account_set_custom | ( | account_h | account, |
const char * | key, | ||
const char * | value | ||
) |
Sets the custom.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] key The user custom key for the specific value [in] value The user custom value about the given key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_custom()
int account_set_display_name | ( | account_h | account, |
const char * | display_name | ||
) |
Sets the display name of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] display_name The text string to set as the display name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_display_name()
int account_set_domain_name | ( | account_h | account, |
const char * | domain_name | ||
) |
Sets the domain name.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] domain_name The text string to set as the domain name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_domain_name()
int account_set_email_address | ( | account_h | account, |
const char * | email_address | ||
) |
Sets the email address.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] email_address The text string to set as the email address
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_email_address()
int account_set_icon_path | ( | account_h | account, |
const char * | icon_path | ||
) |
Sets the icon path.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] icon_path The text string to set as the icon path
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_icon_path()
int account_set_package_name | ( | account_h | account, |
const char * | package_name | ||
) |
Sets the package name.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] package_name The text string to set as the package name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_email_address()
int account_set_secret | ( | account_h | account, |
const account_secrecy_state_e | secret | ||
) |
Sets the secret.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] secret The secrecy to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_secret()
int account_set_source | ( | account_h | account, |
const char * | source | ||
) |
Sets the source.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] source The text string to set as the source
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_source()
int account_set_sync_support | ( | account_h | account, |
const account_sync_state_e | sync_support | ||
) |
Sets the sync support.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] sync_support The sync state to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_sync_support()
int account_set_user_int | ( | account_h | account, |
int | user_int_index, | ||
int | user_integer | ||
) |
Sets the user integer.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] user_int_index The index of the user integer (must be in range from 0
to4
)[in] user_integer The integer to set as the user integer
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_user_int()
int account_set_user_name | ( | account_h | account, |
const char * | user_name | ||
) |
Sets the user name of an account.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] user_name The string to set as user name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_user_name()
int account_set_user_text | ( | account_h | account, |
int | user_text_index, | ||
const char * | user_text | ||
) |
Sets the user text.
- Since :
- 3.0
- Parameters:
-
[in] account The account handle [in] user_text_index The index of the user text (must be in range from 0
to4
)[in] user_text The text string to set as the user text
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_get_user_text()
int account_subscribe_create | ( | account_subscribe_h * | account_subscribe | ) |
Creates a handle for the account event subscription.
- Since :
- 3.0
- Remarks:
- You must release account_subscribe handle using account_unsubscribe_notification().
- Parameters:
-
[in] account_subscribe The account subscription handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
int account_subscribe_notification | ( | account_subscribe_h | account_subscribe, |
account_event_cb | callback, | ||
void * | user_data | ||
) |
Starts to subscribe account event through the given callback function.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] account_subscribe The account subscription handle [in] callback The callback function that is called when an account is removed and a data of account is updated from the account database
It will be called with event message and account ID.[in] user_data The user_data that is delivered to callback
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Subscription fail ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- account_subscribe_create()
int account_type_create | ( | account_type_h * | account_type | ) |
Creates a handle to the account provider.
- Since :
- 3.0
- Remarks:
- You must release account_type handle using account_type_destroy().
- Parameters:
-
[in] account_type The account provider handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_type_destroy()
int account_type_destroy | ( | account_type_h | account_type | ) |
Destroys the account provider handle and releases all its resources.
- Since :
- 3.0
- Remarks:
- When you get account_type_h using account_type_create(), you must release the handle using account_destroy() to avoid the memory leak.
- Parameters:
-
[in] account_type The account provider handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- account_type_create()
int account_type_foreach_account_type_from_db | ( | account_type_cb | callback, |
void * | user_data | ||
) |
Retrieves all account priovider information.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The account provider information
You can get the account information through account_type_get_* with the carried account_type_handle.[in] user_data The user data
It will be carried through your callback function.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_type_get_app_id | ( | account_type_h | account_type, |
char ** | app_id | ||
) |
Gets the application ID of an account provider.
- Since :
- 3.0
- Remarks:
- You must release app_id using free().
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[out] app_id The application ID of an account provider item
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
int account_type_get_icon_path | ( | account_type_h | account_type, |
char ** | icon_path | ||
) |
Gets the icon path of an account provider.
- Since :
- 3.0
- Remarks:
- You must release icon_path using free().
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[out] icon_path The icon path of the account provider item
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
int account_type_get_label | ( | account_type_h | account_type, |
account_label_cb | callback, | ||
void * | user_data | ||
) |
Gets the label information detail of an account provider.
- Since :
- 3.0
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[in] callback The callback function carrying the label information [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
int account_type_get_label_by_locale | ( | account_type_h | account_type, |
const char * | locale, | ||
char ** | label | ||
) |
Gets the specific label information detail of an account provider.
- Since :
- 3.0
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[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.
For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English.[out] label The label text given for the locale
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_RECORD_NOT_FOUND No label for the given locale ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
int account_type_get_multiple_account_support | ( | account_type_h | account_type, |
int * | multiple_account_support | ||
) |
Checks whether the given account provider supports multiple accounts.
- Since :
- 3.0
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db.[out] multiple_account_support The flag indicating support for multiple accounts accounts
TRUE or FALSE.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
int account_type_get_provider_feature_all | ( | account_type_h | account_type, |
provider_feature_cb | callback, | ||
void * | user_data | ||
) |
Gets capability information with the given account provider handle.
- Since :
- 3.0
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[in] callback The callback function that carries the capability name of the app ID [in] user_data The user data
If you have your private data to carry into callback function, then you can use it.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed
int account_type_get_service_provider_id | ( | account_type_h | account_type, |
char ** | service_provider_id | ||
) |
Gets the service provider ID of an account provider.
- Since :
- 3.0
- Remarks:
- You must release service_provider_id using free().
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[out] service_provider_id The service provider text ID of an account provider item
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
int account_type_get_small_icon_path | ( | account_type_h | account_type, |
char ** | small_icon_path | ||
) |
Gets the small icon path of an account provider.
- Since :
- 3.0
- Remarks:
- You must release small_icon_path using free().
- Parameters:
-
[in] account_type The account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().[out] small_icon_path The small icon path of the account provider item
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
int account_type_query_app_id_exist | ( | const char * | app_id | ) |
Checks whether the given app_id exists in the account provider DB.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] app_id The application ID to check
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found ACCOUNT_ERROR_INVALID_PARAMETER Invalid app ID ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
- See also:
- account_type_query_by_app_id()
int account_type_query_by_app_id | ( | const char * | app_id, |
account_type_h * | account_type | ||
) |
Retrieves the account provider information with your application ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] app_id The application ID to search [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.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_RECORD_NOT_FOUND Queried data does not exist ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_type_query_by_provider_feature | ( | account_type_cb | callback, |
const char * | key, | ||
void * | user_data | ||
) |
Retrieves account provider information with the capability name.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function to retrieve account provider information [in] key The capability value to search account provider
For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"[in] user_data If you have your private data to carry into callback function, then you can use it
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_type_query_label_by_app_id | ( | account_label_cb | callback, |
const char * | app_id, | ||
void * | user_data | ||
) |
Retrieves the label information with your application ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function that carries label_h for label information
label_h contains label info as parameter.[in] app_id The application ID to search [in] user_data The user data
If you have your private data to carry into callback function, then you can use it.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_type_query_label_by_locale | ( | const char * | app_id, |
const char * | locale, | ||
char ** | label | ||
) |
Retrieves the label information with the given application ID and locale.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] app_id The application ID [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.
For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English.[out] label The label text corresponding app_id and locale
It must be free text.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_type_query_provider_feature_by_app_id | ( | provider_feature_cb | callback, |
const char * | app_id, | ||
void * | user_data | ||
) |
Retrieves capability information with your application ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Parameters:
-
[in] callback The callback function carries the capability name of an app ID [in] app_id The application ID to search [in] user_data The user data
If you have your private data to carry into callback function, then you can use it.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
bool account_type_query_supported_feature | ( | const char * | app_id, |
const char * | capability | ||
) |
Checks whether the given application ID supports the capability.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Remarks:
- The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- Parameters:
-
[in] app_id The application ID [in] capability The capability
For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
- Returns:
TRUE
if the application supports the given capability,
otherwiseFALSE
if the application does not support the given capability
- Return values:
-
@c TRUE means the application supports the given capability @c FALSE means the application does not support the given capability
- Exceptions:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_unsubscribe_notification | ( | account_subscribe_h | account_subscribe | ) |
Destroys the account subscribe handle and releases all its resources.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
- Remarks:
- You must call account_unsubscribe_notification when you do not need to subscribe account event.
- Parameters:
-
[in] account_subscribe The account subscription handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Unsubscription failed
- See also:
- account_create()
int account_update_sync_status_by_id | ( | int | account_db_id, |
const account_sync_state_e | sync_status | ||
) |
Updates the sync status of an account with the given account ID.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can update an account which was added by same package applications
- Parameters:
-
[in] account_db_id The account ID for which sync status needs to be changed [in] sync_status The new sync status
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_update_to_db_by_id | ( | account_h | account, |
int | account_id | ||
) |
Updates the account details to the account database.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can update an account which was added by same package applications
- Parameters:
-
[in] account The account handle [in] account_id The account ID to update
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_update_to_db_by_id_ex | ( | account_h | account, |
int | account_id | ||
) |
Updates the account details to the account database. The provider permission check has been added since tizen 3.0.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can update an account which was added by same package applications
- Parameters:
-
[in] account The account handle [in] account_id The account ID to update
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened
int account_update_to_db_by_user_name | ( | account_h | account, |
const char * | user_name, | ||
const char * | package_name | ||
) |
Updates the account details to the account database.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
- Remarks:
- This API need both privileges
Only can update accounts which were added by same package applications
- Parameters:
-
[in] account The account handle [in] user_name The user name of the account to update [in] package_name The package name for the user name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
ACCOUNT_ERROR_NONE Successful ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter ACCOUNT_ERROR_DB_FAILED Database operation failed ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened