Tizen Native API  3.0
Account Manager

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_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 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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
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 :
2.3
Parameters:
[in]accountThe account handle
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
otherwise false 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.
See also:
account_foreach_account_from_db()
account_query_account_by_account_id()
account_query_account_by_user_name()
account_query_account_by_package_name()
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 :
2.3
Parameters:
[in]keyThe user custom key
[in]valueThe user custom value of the specific key
[in]user_dataThe user data passed
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
account_query_capability_by_account_id() must be called.
See also:
account_query_capability_by_account_id()
typedef bool(* account_event_cb)(const char *event_type, int account_id, void *user_data)

Called once when an event occurs.

Since :
2.3
Parameters:
[in]event_typeThe account event type
[in]account_idThe account ID to update
[in]user_dataThe user data passed
Returns:
true to continue with the next iteration of the loop,
otherwise false 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 :
2.3
typedef bool(* account_label_cb)(char *app_id, char *label, char *locale, void *user_data)

Called once for each account label.

Since :
2.3
Parameters:
[in]app_idThe application ID
[in]labelThe name of the account depends on the specified locale
[in]localeThe 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_dataThe user data passed
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
account_type_get_label(), account_type_query_label_by_app_id() must be called.
See also:
account_type_get_label()
account_type_query_label_by_app_id()
typedef struct account_subscribe_s* account_subscribe_h

The structure type for the Account subscribe handle.

Since :
2.3
typedef bool(* account_type_cb)(account_type_h account_type, void *user_data)

Called once for each account provider in the database.

Since :
2.3
Parameters:
[in]account_typeThe account provider handle
[in]user_dataThe user data passed
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
account_type_foreach_account_type_from_db(), account_type_query_by_provider_feature() must be called.
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_provider_feature()
typedef struct account_type_s* account_type_h

The structure type for the Account provider handle.

Since :
2.3
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 :
2.3
Parameters:
[in]capability_typeThe capability type
[in]capability_stateThe capability state
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
account_query_capability_by_account_id() must be called.
See also:
account_query_capability_by_account_id()
typedef struct label_s* label_h

The structure type for the Account handle.

Since :
2.3
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 :
2.3
Parameters:
[in]app_idThe application ID
[in]keyThe user custom key
[in]user_dataThe user data passed
Returns:
true to continue with the next iteration of the loop,
otherwise false to break out of the loop
Precondition:
account_type_query_provider_feature_by_app_id(), account_type_get_provider_feature_all() must be called.
See also:
account_type_query_provider_feature_by_app_id()
account_type_get_provider_feature_all()

Enumeration Type Documentation

Enumeration for the account auth type.

Since :
2.3
Enumerator:
ACCOUNT_AUTH_TYPE_INVALID 

Auth type is invalid

ACCOUNT_AUTH_TYPE_XAUTH 

XAuth type

ACCOUNT_AUTH_TYPE_OAUTH 

OAuth type

ACCOUNT_AUTH_TYPE_CLIENT_LOGIN 

Client-Login type

Enumeration for the state of capability.

Since :
2.3
Enumerator:
ACCOUNT_CAPABILITY_STATE_INVALID 

Account capability is invalid

ACCOUNT_CAPABILITY_DISABLED 

Account capability is disabled

ACCOUNT_CAPABILITY_ENABLED 

Account capability is enabled

Enumerations of error codes for ACCOUNT APIs.

Since :
2.3
Enumerator:
ACCOUNT_ERROR_NONE 

Successful

ACCOUNT_ERROR_OUT_OF_MEMORY 

Out of memory

ACCOUNT_ERROR_INVALID_PARAMETER 

Invalid parameter

ACCOUNT_ERROR_DUPLICATED 

Same user name exists in your application

ACCOUNT_ERROR_NO_DATA 

Empty data

ACCOUNT_ERROR_RECORD_NOT_FOUND 

Related record does not exist

ACCOUNT_ERROR_DB_FAILED 

DB operation failed

ACCOUNT_ERROR_DB_NOT_OPENED 

DB is not connected

ACCOUNT_ERROR_QUERY_SYNTAX_ERROR 

DB query syntax error

ACCOUNT_ERROR_ITERATOR_END 

Iterator has reached the end

ACCOUNT_ERROR_NOTI_FAILED 

Notification failed

ACCOUNT_ERROR_PERMISSION_DENIED 

Permission denied

ACCOUNT_ERROR_XML_PARSE_FAILED 

XML parse failed

ACCOUNT_ERROR_XML_FILE_NOT_FOUND 

XML file does not exist

ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL 

Subscription failed

ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER 

Account provider is not registered

ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE 

Multiple accounts are not supported

ACCOUNT_ERROR_DATABASE_BUSY 

SQLite busy handler expired

ACCOUNT_ERROR_NOT_SUPPORTED 

Not supported (Since 3.0)

ACCOUNT_ERROR_OPERATION_FAIL 

Account Operation Failed

Enumeration for the state of account secrecy.

Since :
2.3
Enumerator:
ACCOUNT_SECRECY_INVALID 

Account secrecy is invalid

ACCOUNT_SECRECY_INVISIBLE 

Account is not visible

ACCOUNT_SECRECY_VISIBLE 

Account is visible

Enumeration for the account sync status.

Since :
2.3
Enumerator:
ACCOUNT_SYNC_INVALID 

Account sync is invalid

ACCOUNT_SYNC_NOT_SUPPORT 

Account sync not supported

ACCOUNT_SYNC_STATUS_OFF 

Account sync supported but all synchronization functionalities are off

ACCOUNT_SYNC_STATUS_IDLE 

Account sync support and sync status is idle

ACCOUNT_SYNC_STATUS_RUNNING 

Account sync support and sync status is running

ACCOUNT_SUPPORTS_SYNC 

NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR

ACCOUNT_NOT_SUPPORTS_SYNC 

NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR


Function Documentation

int account_connect ( void  )

Connects to the account database by readwrite mode.

Deprecated:
Deprecated since Tizen 2.4.
This API is not necessary to use since Tizen 2.4.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.wirte
Remarks:
This API need both privileges
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_DB_NOT_OPENEDDB is not connected
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
int account_connect_readonly ( void  )

Connects to the account database by readonly mode.

Deprecated:
Deprecated since Tizen 2.4.
This API is not necessary to use since Tizen 2.4.
Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_DB_NOT_OPENEDDB is not connected
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
int account_create ( account_h account)

Creates a handle to the account.

Since :
2.3
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]accountThe account handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
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_idThe account ID to delete
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDThe account owner is different from the caller or DB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_user_name()
account_delete_from_db_by_package_name()
account_update_to_db_by_id()
account_update_to_db_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.

Since :
2.3
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_nameThe package name of account(s) to delete
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_id()
account_delete_from_db_by_user_name()
account_update_to_db_by_id()
account_update_to_db_by_user_name()
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 :
2.3
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_nameThe user name of the account to delete
[in]package_nameThe package name of the account to delete
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_id()
account_delete_from_db_by_package_name()
account_update_to_db_by_id()
account_update_to_db_by_user_name()
int account_destroy ( account_h  account)

Destroys the account handle and releases all its resources.

Since :
2.3
Parameters:
[in]accountThe account handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_create()
int account_disconnect ( void  )

Disconnects from the account database.

Deprecated:
Deprecated since Tizen 2.4.
This API is not necessary to use since Tizen 2.4.
Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite busy handler exprired
int account_foreach_account_from_db ( account_cb  callback,
void *  user_data 
)

Retrieves all accounts details by invoking the given callback function iteratively.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_RECORD_NOT_FOUNDRelated record does not exist
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes account_cb().
See also:
account_query_account_by_account_id()
account_query_account_by_user_name()
account_query_account_by_package_name()
account_query_account_by_capability()
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 :
2.3
Remarks:
You must release access_token using free().
Parameters:
[in]accountThe account handle
[out]access_tokenThe access token
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut 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 :
2.3
Parameters:
[in]accountThe account handle
[out]account_idThe account ID
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
int account_get_auth_type ( account_h  account,
account_auth_type_e auth_type 
)

Gets the authentiacation type.

Since :
2.3
Parameters:
[in]accountThe account handle
[out]auth_typeThe authentiacation type
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]capability_typeThe capability type to get the capability value
[out]capability_valueThe capability value (on/off) of the specified capability_type
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_RECORD_NOT_FOUNDThere 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 :
2.3
Parameters:
[in]accountThe account handle
[in]callbackThe callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]keyThe key to retrieve custom text
[out]valueThe text of the given key
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_RECORD_NOT_FOUNDThere 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 :
2.3
Parameters:
[in]accountThe account handle
[in]callbackThe callback function to retrieve all custom text
The callback function gives the key and value.
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Remarks:
You must release display_name using free().
Parameters:
[in]accountThe account handle
[out]display_nameThe display name of the account
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_get_display_name()
int account_get_domain_name ( account_h  account,
char **  domain_name 
)

Gets the domain name.

Since :
2.3
Remarks:
You must release domain_name using free().
Parameters:
[in]accountThe account handle
[out]domain_nameThe domain name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_set_domain_name()
int account_get_email_address ( account_h  account,
char **  email_address 
)

Gets the email address.

Since :
2.3
Remarks:
You must release email_address using free().
Parameters:
[in]accountThe account handle
[out]email_addressThe email address
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_set_email_address()
int account_get_icon_path ( account_h  account,
char **  icon_path 
)

Gets the icon path.

Since :
2.3
Remarks:
You must release icon_path using free().
Parameters:
[in]accountThe account handle
[out]icon_pathThe icon path
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_set_icon_path()
int account_get_package_name ( account_h  account,
char **  package_name 
)

Gets the package name.

Since :
2.3
Remarks:
You must release package_name using free().
Parameters:
[in]accountThe account handle
[out]package_nameThe package name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_set_package_name()
int account_get_secret ( account_h  account,
account_secrecy_state_e secret 
)

Gets the secret.

Since :
2.3
Parameters:
[in]accountThe account handle
[out]secretThe secret
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_set_secret()
int account_get_source ( account_h  account,
char **  source 
)

Gets the source.

Since :
2.3
Remarks:
You must release user_text using free().
Parameters:
[in]accountThe account handle
[out]sourceThe source
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut 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 :
2.3
Parameters:
[in]accountThe account handle
[out]sync_supportThe sync support
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[out]countThe out parameter for count of all accounts
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
int account_get_user_int ( account_h  account,
int  user_int_index,
int *  user_integer 
)

Gets the user integer.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]user_int_indexThe index of the user integer (must be in range from 0 to 4)
[out]user_integerThe user integer
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Remarks:
You must release user_name using free().
Parameters:
[in]accountThe account handle
[out]user_nameThe user name of the account
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut 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 :
2.3
Remarks:
You must release user_text using free().
Parameters:
[in]accountThe account handle
[in]user_text_indexThe index of the user text (range: 0 ~ 4)
[out]user_textThe user text
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut 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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
Remarks:
This API need both privileges
Parameters:
[in]accountThe account handle
[out]account_db_idThe account ID to be assigned to an account
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_DUPLICATEDSame user name exists in your application
ACCOUNT_ERROR_NOT_ALLOW_MULTIPLETried to add an account in spite of multiple false accounts
ACCOUNT_ERROR_NOT_REGISTERED_PROVIDERTried to add an account though you did not register the account type in manifest
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_delete_from_db_by_id()
account_delete_from_db_by_user_name()
account_delete_from_db_by_package_name()
account_update_to_db_by_id()
account_update_to_db_by_user_name()
int account_query_account_by_account_id ( int  account_db_id,
account_h account 
)

Retrieve an account with the account ID.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]account_db_idThe account database ID to search
[out]accountThe 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_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_query_account_by_user_name()
account_query_account_by_package_name()
account_query_account_by_capability()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]capability_typeThe capability type to search
[in]capability_valueThe capability value to search
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes account_cb().
See also:
account_foreach_account_from_db()
account_query_account_by_account_id()
account_query_account_by_user_name()
account_query_account_by_package_name()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]capability_typeThe capability type to search
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes account_cb().
See also:
account_foreach_account_from_db()
account_query_account_by_account_id()
account_query_account_by_user_name()
account_query_account_by_package_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.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]package_nameThe package name to search
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes account_cb().
See also:
account_foreach_account_from_db()
account_query_account_by_account_id()
account_query_account_by_user_name()
account_query_account_by_capability()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]user_nameThe user name to search
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes account_cb().
See also:
account_foreach_account_from_db()
account_query_account_by_account_id()
account_query_account_by_package_name()
account_query_account_by_capability()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to invoke
[in]account_db_idThe account database ID to search
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
Postcondition:
This function invokes capability_cb().
See also:
account_get_capability()
account_set_capability()
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 :
2.3
Parameters:
[in]accountThe account handle
[in]access_tokenThe text string to set as the access token
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]auth_typeThe integer to be set as the authentiacation type
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]capability_typeThe capability type
[in]capability_stateThe capability state
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_capability()
int account_set_custom ( account_h  account,
const char *  key,
const char *  value 
)

Sets the custom.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]keyThe user custom key for the specific value
[in]valueThe user custom value about the given key
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]display_nameThe text string to set as the display name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_display_name()
int account_set_domain_name ( account_h  account,
const char *  domain_name 
)

Sets the domain name.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]domain_nameThe text string to set as the domain name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_domain_name()
int account_set_email_address ( account_h  account,
const char *  email_address 
)

Sets the email address.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]email_addressThe text string to set as the email address
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_email_address()
int account_set_icon_path ( account_h  account,
const char *  icon_path 
)

Sets the icon path.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]icon_pathThe text string to set as the icon path
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_icon_path()
int account_set_package_name ( account_h  account,
const char *  package_name 
)

Sets the package name.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]package_nameThe text string to set as the package name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_email_address()
int account_set_secret ( account_h  account,
const account_secrecy_state_e  secret 
)

Sets the secret.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]secretThe secrecy to be set
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_get_secret()
int account_set_source ( account_h  account,
const char *  source 
)

Sets the source.

Since :
2.3
Parameters:
[in]accountThe account handle
[in]sourceThe text string to set as the source
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]sync_supportThe sync state to be set
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]user_int_indexThe index of the user integer (must be in range from 0 to 4)
[in]user_integerThe integer to set as the user integer
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]user_nameThe string to set as user name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Parameters:
[in]accountThe account handle
[in]user_text_indexThe index of the user text (must be in range from 0 to 4)
[in]user_textThe text string to set as the user text
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Remarks:
You must release account_subscribe handle using account_unsubscribe_notification().
Parameters:
[in]account_subscribeThe account subscription handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_unsubscribe_notification()
account_subscribe_notification()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]account_subscribeThe account subscription handle
[in]callbackThe 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_dataThe user_data that is delivered to callback
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAILSubscription fail
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
account_subscribe_create()
See also:
account_unsubscribe_notification()
account_subscribe_notification()
int account_type_create ( account_type_h account_type)

Creates a handle to the account provider.

Since :
2.3
Remarks:
You must release account_type handle using account_type_destroy().
Parameters:
[in]account_typeThe account provider handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
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_typeThe account provider handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid 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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe account provider information
You can get the account information through account_type_get_* with the carried account_type_handle.
[in]user_dataThe user data
It will be carried through your callback function.
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_type_create()
account_type_get_app_id()
account_type_get_service_provider_id()
account_type_get_icon_path()
account_type_get_small_icon_path()
account_type_get_multiple_account_support()
account_type_get_label()
account_type_destroy()
int account_type_get_app_id ( account_type_h  account_type,
char **  app_id 
)

Gets the application ID of an account provider.

Since :
2.3
Remarks:
You must release app_id using free().
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[out]app_idThe application ID of an account provider item
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
int account_type_get_icon_path ( account_type_h  account_type,
char **  icon_path 
)

Gets the icon path of an account provider.

Since :
2.3
Remarks:
You must release icon_path using free().
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[out]icon_pathThe icon path of the account provider item
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
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 :
2.3
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[in]callbackThe callback function carrying the label information
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
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 :
2.3
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[in]localeThe 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]labelThe label text given for the locale
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_RECORD_NOT_FOUNDNo label for the given locale
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
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 :
2.3
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db.
[out]multiple_account_supportThe flag indicating support for multiple accounts accounts
TRUE or FALSE.
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
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 :
2.3
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[in]callbackThe callback function that carries the capability name of the app ID
[in]user_dataThe 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_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
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 :
2.3
Remarks:
You must release service_provider_id using free().
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[out]service_provider_idThe service provider text ID of an account provider item
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
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 :
2.3
Remarks:
You must release small_icon_path using free().
Parameters:
[in]account_typeThe account provider handle
It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
[out]small_icon_pathThe small icon path of the account provider item
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_OUT_OF_MEMORYOut of memory
See also:
account_type_foreach_account_type_from_db()
account_type_query_by_app_id()
int account_type_query_app_id_exist ( const char *  app_id)

Checks whether the given app_id exists in the account provider DB.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]app_idThe application ID to check
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_RECORD_NOT_FOUNDRecord not found
ACCOUNT_ERROR_INVALID_PARAMETERInvalid app ID
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]app_idThe application ID to search
[in,out]account_typeThe 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_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_RECORD_NOT_FOUNDQueried data does not exist
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_type_create()
account_type_get_app_id()
account_type_get_service_provider_id()
account_type_get_icon_path()
account_type_get_small_icon_path()
account_type_get_multiple_account_support()
account_type_get_label()
account_type_destroy()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function to retrieve account provider information
[in]keyThe capability value to search account provider
For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
[in]user_dataIf 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_NONESuccessful
ACCOUNT_ERROR_RECORD_NOT_FOUNDRecord not found
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function that carries label_h for label information
label_h contains label info as parameter.
[in]app_idThe application ID to search
[in]user_dataThe 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_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_type_query_by_app_id()
account_type_foreach_account_type_from_db()
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]app_idThe application ID
[in]localeThe 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]labelThe 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_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
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 :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/account.read
Parameters:
[in]callbackThe callback function carries the capability name of an app ID
[in]app_idThe application ID to search
[in]user_dataThe 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_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
bool account_type_query_supported_feature ( const char *  app_id,
const char *  capability 
)

Checks whether the given application ID supports the capability.

Since :
2.3
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_idThe application ID
[in]capabilityThe capability
For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
Returns:
TRUE if the application supports the given capability,
otherwise FALSE if the application does not support the given capability
Return values:
@cTRUE means the application supports the given capability
@cFALSE means the application does not support the given capability
Exceptions:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_RECORD_NOT_FOUNDRelated record does not exist
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.

Destroys the account subscribe handle and releases all its resources.

Since :
2.3
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_subscribeThe account subscription handle
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAILUnsubscription 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 :
2.3
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_idThe account ID for which sync status needs to be changed
[in]sync_statusThe new sync status
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
int account_update_to_db_by_id ( account_h  account,
int  account_id 
)

Updates the account details to the account database.

Since :
2.3
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]accountThe account handle
[in]account_idThe account ID to update
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_RECORD_NOT_FOUNDThe account to update does not exist
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_id()
account_delete_from_db_by_user_name()
account_delete_from_db_by_package_name()
account_update_to_db_by_user_name()
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.

Since :
2.3
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]accountThe account handle
[in]account_idThe account ID to update
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_OUT_OF_MEMORYOut of Memory
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_RECORD_NOT_FOUNDThe account to update does not exist
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_id()
account_delete_from_db_by_user_name()
account_delete_from_db_by_package_name()
account_update_to_db_by_user_name()
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 :
2.3
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]accountThe account handle
[in]user_nameThe user name of the account to update
[in]package_nameThe package name for the user name
Returns:
0 on success, otherwise a negative error value
Return values:
ACCOUNT_ERROR_NONESuccessful
ACCOUNT_ERROR_INVALID_PARAMETERInvalid parameter
ACCOUNT_ERROR_DB_FAILEDDatabase operation failed
ACCOUNT_ERROR_RECORD_NOT_FOUNDThe account to update does not exist
ACCOUNT_ERROR_PERMISSION_DENIEDDB Access fail by permission
ACCOUNT_ERROR_DATABASE_BUSYSQLite handler is busy
ACCOUNT_ERROR_DB_NOT_OPENEDAccount database did not opened
Precondition:
This function requires an open connection to an account service by account_connect() on tizen 2.3.
But the account_connect() is not required to use this function since tizen 2.4.
See also:
account_insert_to_db()
account_delete_from_db_by_id()
account_delete_from_db_by_user_name()
account_delete_from_db_by_package_name()
account_update_to_db_by_id()