Add an E_USER_NOT_CONSENTED in DownloadManager::Start()
authorSunwook Bae <sunwook45.bae@samsung.com>
Thu, 11 Apr 2013 09:13:39 +0000 (18:13 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Thu, 11 Apr 2013 09:13:39 +0000 (18:13 +0900)
Change-Id: Iea17a58e478917bc03af296394c8c7172e7a0052
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
inc/FCntDownloadManager.h
src/FCntDownloadManager.cpp

index df974f3..5f6c37e 100644 (file)
@@ -139,6 +139,7 @@ public:
        * @exception    E_INVALID_ARG           The information of the download request is invalid.
        * @exception    E_ILLEGAL_ACCESS        Access to the path of the download request is denied due to insufficient permission.
        * @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.
        */
        result Start(const DownloadRequest& request, RequestId& reqId);
index b50a691..0dc3a5e 100644 (file)
@@ -78,8 +78,9 @@ DownloadManager::Start(const DownloadRequest& request, RequestId& reqId)
        SysAssertf(__pDownloadManagerImpl != null, "Not yet constructed. Construct() should be called before use.\n");
 
        result r = _AccessController::CheckUserPrivilege(_PRV_DOWNLOAD);
-       SysTryReturnResult(NID_CNT, r == E_SUCCESS, E_PRIVILEGE_DENIED,
-                       "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_CNT, r == E_SUCCESS, r,
+                       "The application is not permitted to call this method.");
 
        return __pDownloadManagerImpl->Start(request, reqId);
 }