Tizen Native API
5.0
|
The account APIs provide CRUD (Create, Read, Update, Delete) account management functionality.
#include <account.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:
This API is related with the following features:
Functions | |
int | account_connect (void) TIZEN_DEPRECATED_API |
Connects to the account database by readwrite mode. | |
int | account_connect_readonly (void) TIZEN_DEPRECATED_API |
Connects to the account database by readonly mode. | |
int | account_disconnect (void) TIZEN_DEPRECATED_API |
Disconnects from the account database. | |
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 2.4. | |
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 authentication type. | |
int | account_set_auth_type (account_h account, const account_auth_type_e auth_type) |
Sets the authentication 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) |
Retrieves 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 provider 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 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_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_NOTI_NAME_DELETE "delete" |
The delete notification type.
#define ACCOUNT_NOTI_NAME_INSERT "insert" |
The insert notification type.
#define ACCOUNT_NOTI_NAME_SYNC_UPDATE "sync_update" |
The sync_update notification type.
#define ACCOUNT_NOTI_NAME_UPDATE "update" |
The update notification type.
#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_CALENDAR "http://tizen.org/account/capability/calendar" |
This is calendar capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_CONTACT "http://tizen.org/account/capability/contact" |
This is contact capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_DOCUMENT "http://tizen.org/account/capability/document" |
This is document capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_EMAIL "http://tizen.org/account/capability/email" |
This is email capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_GAME "http://tizen.org/account/capability/game" |
This is game capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_MESSAGE "http://tizen.org/account/capability/message" |
This is message capability string.
#define ACCOUNT_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/account/capability/music" |
This is music 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.
typedef bool(* account_cb)(account_h account, void *user_data) |
Called once for each account from the database.
[in] | account | The account handle |
[in] | user_data | The user data passed from the foreach function |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef bool(* account_custom_cb)(char *key, char *value, void *user_data) |
Called once for each custom data of an account in the database.
[in] | key | The user custom key |
[in] | value | The user custom value of the specific key |
[in] | user_data | The user data passed |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef bool(* account_event_cb)(const char *event_type, int account_id, void *user_data) |
Called once when an event occurs.
[in] | event_type | The account event type |
[in] | account_id | The account ID to update |
[in] | user_data | The user data passed |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef struct account_s* account_h |
The structure type for the Account handle.
typedef bool(* account_label_cb)(char *app_id, char *label, char *locale, void *user_data) |
Called once for each account label.
[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 |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef struct account_subscribe_s* account_subscribe_h |
The structure type for the Account subscribe handle.
typedef bool(* account_type_cb)(account_type_h account_type, void *user_data) |
Called once for each account provider in the database.
[in] | account_type | The account provider handle |
[in] | user_data | The user data passed |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef struct account_type_s* account_type_h |
The structure type for the Account provider handle.
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.
[in] | capability_type | The capability type |
[in] | capability_state | The capability state |
[in] | user_data | The user data passed from the foreach function |
true
to continue with the next iteration of the loop, false
to break out of the looptypedef struct label_s* label_h |
The structure type for the Account handle.
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.
[in] | app_id | The application ID |
[in] | key | The user custom key |
[in] | user_data | The user data passed |
true
to continue with the next iteration of the loop, false
to break out of the loopenum account_auth_type_e |
enum account_error_e |
Enumerations of error codes for ACCOUNT APIs.
enum account_sync_state_e |
Enumeration for the account sync status.
int account_connect | ( | void | ) |
Connects to the account database by readwrite mode.
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_DB_NOT_OPENED | DB is not connected |
ACCOUNT_ERROR_PERMISSION_DENIED | DB Access fail by permission |
int account_connect_readonly | ( | void | ) |
Connects to the account database by readonly mode.
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_DB_NOT_OPENED | DB is not connected |
ACCOUNT_ERROR_PERMISSION_DENIED | DB Access fail by permission |
int account_create | ( | account_h * | account | ) |
Creates a handle to the account.
[in] | account | The account handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of Memory |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_delete_from_db_by_id | ( | int | account_db_id | ) |
Deletes an account from the account database by account DB ID.
[in] | account_db_id | The account ID to delete |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_delete_from_db_by_package_name | ( | const char * | package_name | ) |
Deletes an account from the account database by package name.
[in] | package_name | The package name of account(s) to delete |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_delete_from_db_by_user_name | ( | char * | user_name, |
char * | package_name | ||
) |
Deletes an account from the account database by user name.
[in] | user_name | The user name of the account to delete |
[in] | package_name | The package name of the account to delete |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_destroy | ( | account_h | account | ) |
Destroys the account handle and releases all its resources.
[in] | account | The account handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_disconnect | ( | void | ) |
Disconnects from the account database.
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_PERMISSION_DENIED | DB Access fail by permission |
ACCOUNT_ERROR_DATABASE_BUSY | SQLite busy handler expired |
int account_foreach_account_from_db | ( | account_cb | callback, |
void * | user_data | ||
) |
Retrieves all accounts details by invoking the given callback function iteratively.
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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).
[in] | account | The account handle |
[out] | access_token | The access token |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
Only account owner application can retrieve account password / access_token. For others this field will be null.
int account_get_account_id | ( | account_h | account, |
int * | account_id | ||
) |
Gets the ID of an account.
[in] | account | The account handle |
[out] | account_id | The account ID |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_auth_type | ( | account_h | account, |
account_auth_type_e * | auth_type | ||
) |
Gets the authentication type.
[in] | account | The account handle |
[out] | auth_type | The authentication type |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_capability | ( | account_h | account, |
const char * | capability_type, | ||
account_capability_state_e * | capability_value | ||
) |
Gets the capability detail of an account.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_RECORD_NOT_FOUND | There is no given capability_type in the account |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_capability_all | ( | account_h | account, |
capability_cb | callback, | ||
void * | user_data | ||
) |
Gets all the capabilities of an account.
[in] | account | The account handle |
[in] | callback | The callback function |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_custom | ( | account_h | account, |
const char * | key, | ||
char ** | value | ||
) |
Gets the user specific custom text of an account key.
[in] | account | The account handle |
[in] | key | The key to retrieve custom text |
[out] | value | The text of the given key |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_RECORD_NOT_FOUND | There is no given capability type in the account |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_custom_all | ( | account_h | account, |
account_custom_cb | callback, | ||
void * | user_data | ||
) |
Gets all the user custom texts of an account.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_display_name | ( | account_h | account, |
char ** | display_name | ||
) |
Gets the display name of an account.
[in] | account | The account handle |
[out] | display_name | The display name of the account |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_domain_name | ( | account_h | account, |
char ** | domain_name | ||
) |
Gets the domain name.
[in] | account | The account handle |
[out] | domain_name | The domain name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_email_address | ( | account_h | account, |
char ** | email_address | ||
) |
Gets the email address.
[in] | account | The account handle |
[out] | email_address | The email address |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_icon_path | ( | account_h | account, |
char ** | icon_path | ||
) |
Gets the icon path.
[in] | account | The account handle |
[out] | icon_path | The icon path |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_package_name | ( | account_h | account, |
char ** | package_name | ||
) |
Gets the package name.
[in] | account | The account handle |
[out] | package_name | The package name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_secret | ( | account_h | account, |
account_secrecy_state_e * | secret | ||
) |
Gets the secret.
[in] | account | The account handle |
[out] | secret | The secret |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_source | ( | account_h | account, |
char ** | source | ||
) |
Gets the source.
[in] | account | The account handle |
[out] | source | The source |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_sync_support | ( | account_h | account, |
account_sync_state_e * | sync_support | ||
) |
Gets the sync support.
[in] | account | The account handle |
[out] | sync_support | The sync support |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_total_count_from_db | ( | int * | count | ) |
Gets the count of accounts in the account database.
[out] | count | The out parameter for count of all accounts |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_user_int | ( | account_h | account, |
int | user_int_index, | ||
int * | user_integer | ||
) |
Gets the user integer.
[in] | account | The account handle |
[in] | user_int_index | The index of the user integer (must be in range from 0 to 4 ) |
[out] | user_integer | The user integer |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_user_name | ( | account_h | account, |
char ** | user_name | ||
) |
Gets the user name of an account.
[in] | account | The account handle |
[out] | user_name | The user name of the account |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_get_user_text | ( | account_h | account, |
int | user_text_index, | ||
char ** | user_text | ||
) |
Gets the user text.
[in] | account | The account handle |
[in] | user_text_index | The index of the user text (range: 0 ~ 4) |
[out] | user_text | The user text |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_insert_to_db | ( | account_h | account, |
int * | account_db_id | ||
) |
Inserts the account details to the account database.
[in] | account | The account handle |
[out] | account_db_id | The account ID to be assigned to an account |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_query_account_by_account_id | ( | int | account_db_id, |
account_h * | account | ||
) |
Retrieves an account with the account ID.
[in] | account_db_id | The account database ID to search |
[out] | account | The account handle |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_query_account_by_capability_type | ( | account_cb | callback, |
const char * | capability_type, | ||
void * | user_data | ||
) |
Retrieves all accounts with the capability type.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_query_account_by_package_name | ( | account_cb | callback, |
const char * | package_name, | ||
void * | user_data | ||
) |
Retrieves all accounts with the package name.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_query_account_by_user_name | ( | account_cb | callback, |
const char * | user_name, | ||
void * | user_data | ||
) |
Retrieves all accounts with the user name.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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).
[in] | account | The account handle |
[in] | access_token | The text string to set as the access token |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_auth_type | ( | account_h | account, |
const account_auth_type_e | auth_type | ||
) |
Sets the authentication type.
[in] | account | The account handle |
[in] | auth_type | The integer to be set as the authentication type |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_capability | ( | account_h | account, |
const char * | capability_type, | ||
account_capability_state_e | capability_state | ||
) |
Sets the capability.
[in] | account | The account handle |
[in] | capability_type | The capability type |
[in] | capability_state | The capability state |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_custom | ( | account_h | account, |
const char * | key, | ||
const char * | value | ||
) |
Sets the custom.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_display_name | ( | account_h | account, |
const char * | display_name | ||
) |
Sets the display name of an account.
[in] | account | The account handle |
[in] | display_name | The text string to set as the display name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_domain_name | ( | account_h | account, |
const char * | domain_name | ||
) |
Sets the domain name.
[in] | account | The account handle |
[in] | domain_name | The text string to set as the domain name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_email_address | ( | account_h | account, |
const char * | email_address | ||
) |
Sets the email address.
[in] | account | The account handle |
[in] | email_address | The text string to set as the email address |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_icon_path | ( | account_h | account, |
const char * | icon_path | ||
) |
Sets the icon path.
[in] | account | The account handle |
[in] | icon_path | The text string to set as the icon path |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_package_name | ( | account_h | account, |
const char * | package_name | ||
) |
Sets the package name.
[in] | account | The account handle |
[in] | package_name | The text string to set as the package name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_secret | ( | account_h | account, |
const account_secrecy_state_e | secret | ||
) |
Sets the secret.
[in] | account | The account handle |
[in] | secret | The secrecy to be set |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_source | ( | account_h | account, |
const char * | source | ||
) |
Sets the source.
[in] | account | The account handle |
[in] | source | The text string to set as the source |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_sync_support | ( | account_h | account, |
const account_sync_state_e | sync_support | ||
) |
Sets the sync support.
[in] | account | The account handle |
[in] | sync_support | The sync state to be set |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_user_int | ( | account_h | account, |
int | user_int_index, | ||
int | user_integer | ||
) |
Sets the user integer.
[in] | account | The account handle |
[in] | user_int_index | The index of the user integer (must be in range from 0 to 4 ) |
[in] | user_integer | The integer to set as the user integer |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_user_name | ( | account_h | account, |
const char * | user_name | ||
) |
Sets the user name of an account.
[in] | account | The account handle |
[in] | user_name | The string to set as user name |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_set_user_text | ( | account_h | account, |
int | user_text_index, | ||
const char * | user_text | ||
) |
Sets the user text.
[in] | account | The account handle |
[in] | user_text_index | The index of the user text (must be in range from 0 to 4 ) |
[in] | user_text | The text string to set as the user text |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_subscribe_create | ( | account_subscribe_h * | account_subscribe | ) |
Creates a handle for the account event subscription.
[in] | account_subscribe | The account subscription handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of Memory |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL | Subscription fail |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_create | ( | account_type_h * | account_type | ) |
Creates a handle to the account provider.
[in] | account_type | The account provider handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of Memory |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_destroy | ( | account_type_h | account_type | ) |
Destroys the account provider handle and releases all its resources.
[in] | account_type | The account provider handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_foreach_account_type_from_db | ( | account_type_cb | callback, |
void * | user_data | ||
) |
Retrieves all account provider information.
[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. |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_get_app_id | ( | account_type_h | account_type, |
char ** | app_id | ||
) |
Gets the application ID of an account provider.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_get_icon_path | ( | account_type_h | account_type, |
char ** | icon_path | ||
) |
Gets the icon path of an account provider.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_RECORD_NOT_FOUND | No label for the given locale |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_DB_FAILED | Database operation failed |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_OUT_OF_MEMORY | Out of memory |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_type_query_app_id_exist | ( | const char * | app_id | ) |
Checks whether the given app_id exists in the account provider DB.
[in] | app_id | The application ID to check |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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. |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
bool account_type_query_supported_feature | ( | const char * | app_id, |
const char * | capability | ||
) |
Checks whether the given application ID supports the capability.
[in] | app_id | The application ID |
[in] | capability | The capability For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact" |
TRUE
if the application supports the given capability, FALSE
if the application does not support the given capability @c | TRUE means the application supports the given capability |
@c | FALSE means the application does not support the given capability |
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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_unsubscribe_notification | ( | account_subscribe_h | account_subscribe | ) |
Destroys the account subscribe handle and releases all its resources.
[in] | account_subscribe | The account subscription handle |
0
on success, otherwise a negative error value ACCOUNT_ERROR_NONE | Successful |
ACCOUNT_ERROR_INVALID_PARAMETER | Invalid parameter |
ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL | Unsubscription failed |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[in] | account_db_id | The account ID for which sync status needs to be changed |
[in] | sync_status | The new sync status |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
int account_update_to_db_by_id | ( | account_h | account, |
int | account_id | ||
) |
Updates the account details to the account database.
[in] | account | The account handle |
[in] | account_id | The account ID to update |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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 2.4.
[in] | account | The account handle |
[in] | account_id | The account ID to update |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |
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.
[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 |
0
on success, otherwise a negative error value 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 |
ACCOUNT_ERROR_NOT_SUPPORTED | Not supported |