* @privilege %http://tizen.org/privilege/account.read
*
* @return An error code
- * @param[in] pListener The event listener
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in] pListener The event listener
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
* @remarks The platform will not take the ownership of @c pListener after this call.
*/
result SetEventListener(IAccountEventListener* pListener);
* @privilege %http://tizen.org/privilege/account.read
*
* @return An account with the specified @c accountId
- * @param[in] accountId The account ID
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_INVALID_ARG The specified @c accountId is invalid.
- * @exception E_OBJ_NOT_FOUND The specified @c accountId is not found.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in] accountId The account ID
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The specified @c accountId is invalid.
+ * @exception E_OBJ_NOT_FOUND The specified @c accountId is not found.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Account GetAccount(AccountId accountId) const;
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @exception E_INVALID_ARG The specified @c accountProviderAppId is empty.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* @return A list of accounts, @n
* else an empty list if there is no account, or @c null if an exception occurs (@ref Account list)
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::Collection::IList* GetAllAccountsN(void) const;
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @exception E_INVALID_ARG The specified @c accountProviderAppId is empty.
* @exception E_OBJ_NOT_FOUND The specified @c accountProviderAppId is not found.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* @return A list of account providers, @n
* else an empty list if there is no account provider, or @c null if an exception occurs (@ref AccountProvider list)
- * @param[in] capability The predefined capability or the vendor-specific capability defined as the IRI format
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_INVALID_ARG The specified @c capability is empty.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in] capability The predefined capability or the vendor-specific capability defined as the IRI format
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The specified @c capability is empty.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::Collection::IList* GetAccountProvidersByCapabilityN(const Tizen::Base::String& capability) const;
*
* @return A list of account providers, @n
* else an empty list if there is no account provider, or @c null if an exception occurs (@ref AccountProvider list)
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::Collection::IList* GetAllAccountProvidersN(void) const;
* @privilege %http://tizen.org/privilege/account.write
*
* @return An error code
- * @param[in,out] account The account to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
- * - The user name is an empty string in the specified @c account. @n
- * - The account ID is not #INVALID_ACCOUNT_ID. @n
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The caller application does not belong to a package of an application that registers its own account provider. @n
- * - The account has already been added with the multiple accounts support set to @c false.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in,out] account The account to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
+ * - The user name is an empty string in the specified @c account. @n
+ * - The account ID is not #INVALID_ACCOUNT_ID. @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The caller application does not belong to a package of an application that registers its own account provider. @n
+ * - The account has already been added with the multiple accounts support set to @c false.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result AddAccount(Account& account);
* @privilege %http://tizen.org/privilege/account.write
*
* @return An error code
- * @param[in] accountId The account ID
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_INVALID_ARG The specified @c accountId is invalid.
- * @exception E_OBJ_NOT_FOUND The specified @c accountId does not exist.
- * @exception E_INVALID_OPERATION This operation is not allowed if the caller application does not belong to a package of an application that registers its own account provider.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in] accountId The account ID
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The specified @c accountId is invalid.
+ * @exception E_OBJ_NOT_FOUND The specified @c accountId does not exist.
+ * @exception E_INVALID_OPERATION This operation is not allowed if the caller application does not belong to a package of an application that registers its own account provider.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result RemoveAccount(AccountId accountId);
* @privilege %http://tizen.org/privilege/account.write
*
* @return An error code
- * @param[in] account The account to update
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
- * - The user name is an empty string in the specified @c account. @n
- * - The account ID is invalid. @n
- * @exception E_OBJ_NOT_FOUND The specified @c account does not exist.
- * @exception E_INVALID_OPERATION This operation is not allowed if the caller application does not belong to a package of an application that registers its own account provider.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @param[in] account The account to update
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
+ * - The user name is an empty string in the specified @c account. @n
+ * - The account ID is invalid. @n
+ * @exception E_OBJ_NOT_FOUND The specified @c account does not exist.
+ * @exception E_INVALID_OPERATION This operation is not allowed if the caller application does not belong to a package of an application that registers its own account provider.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result UpdateAccount(const Account& account);
result
AccountAccessor::SetEventListener(IAccountEventListener* pListener)
{
- SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAccountAccessorImpl->SetEventListener(pListener);
+ r = __pAccountAccessorImpl->SetEventListener(pListener);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
{
Account account(L"");
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, account, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, account, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
IList*
AccountAccessor::GetAccountsByAccountProviderN(const AppId& accountProviderAppId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
IList*
AccountAccessor::GetAllAccountsN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
{
AccountProvider accountProvider;
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, accountProvider, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, accountProvider, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
IList*
AccountAccessor::GetAccountProvidersByCapabilityN(const String& capability) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
IList*
AccountAccessor::GetAllAccountProvidersN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountAccessorImpl != null,
"Not yet constructed. Construct() should be called before use.");
result
AccountManager::AddAccount(Account& account)
{
- SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAccountManagerImpl->AddAccount(account);
+ r = __pAccountManagerImpl->AddAccount(account);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
result
AccountManager::RemoveAccount(AccountId accountId)
{
- SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAccountManagerImpl->RemoveAccount(accountId);
+ r = __pAccountManagerImpl->RemoveAccount(accountId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
result
AccountManager::UpdateAccount(const Account& account)
{
- SysTryReturnResult(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED
- , "The application does not have the privilege to call this method.");
+ result r = _AccessController::CheckUserPrivilege(_PRV_ACCOUNT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
+
SysAssertf(__pAccountManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAccountManagerImpl->UpdateAccount(account);
+ r = __pAccountManagerImpl->UpdateAccount(account);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;