Add E_USER_NOT_CONSENTED error
authorMyeongSeong Seo <ms49.seo@samsung.com>
Thu, 11 Apr 2013 10:22:12 +0000 (19:22 +0900)
committerMyeongSeong Seo <ms49.seo@samsung.com>
Thu, 11 Apr 2013 10:22:12 +0000 (19:22 +0900)
Change-Id: I4b47f558c055314931ba632e5c4decc7bfebdd82
Signed-off-by: MyeongSeong Seo <ms49.seo@samsung.com>
16 files changed:
inc/FNetHttpHttpAuthentication.h
inc/FNetHttpHttpCookieStorageManager.h
inc/FNetHttpHttpCredentials.h
inc/FNetHttpHttpSession.h
inc/FNetHttpHttpTransaction.h
inc/FNetSockSecureSocket.h
inc/FNetSockSocket.h
inc/FNetSockSocketUtility.h
src/http/FNetHttpHttpAuthentication.cpp
src/http/FNetHttpHttpCookieStorageManager.cpp
src/http/FNetHttpHttpCredentials.cpp
src/http/FNetHttpHttpSession.cpp
src/http/FNetHttpHttpTransaction.cpp
src/sockets/FNetSockSecureSocket.cpp
src/sockets/FNetSockSocket.cpp
src/sockets/FNetSockSocketUtility.cpp

index 3306b73..783957c 100755 (executable)
@@ -98,6 +98,7 @@ public:
         * @exception           E_OUT_OF_MEMORY     The memory is insufficient.
         * @exception           E_SYSTEM            A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks                     The specific error code can be accessed using the GetLastResult() method.
         */
        Tizen::Base::String* GetRealmN(void) const;
@@ -115,6 +116,7 @@ public:
         * @exception           E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception           E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks                     The specific error code can be accessed using the GetLastResult() method.
         */
        NetHttpAuthScheme GetAuthScheme(void) const;
@@ -135,6 +137,7 @@ public:
         * @exception           E_SYSTEM                                A system error has occurred.
         * @exception           E_AUTHENTICATION                The authentication has failed.
         * @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. @b Since: @b 2.1
         * @remarks                     This method is used to set the username and password for the given domain and the authentication
         *                                      scheme on the reception of the IHttpTransactionEventListener::OnTransactionHeaderCompleted() callback.
         *                                      The specific error code can be accessed using the GetLastResult() method.
index 12197f6..abafbe8 100755 (executable)
@@ -77,6 +77,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result RemoveCookies(const Tizen::Base::String& url);
 
@@ -93,6 +94,7 @@ public:
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result RemoveAllCookies();
 
index 9904551..1c30863 100755 (executable)
@@ -102,6 +102,7 @@ public:
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception   E_SYSTEM                        A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result SetName(const Tizen::Base::String& name);
 
@@ -118,6 +119,7 @@ public:
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception   E_SYSTEM                        A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result SetPassword(const Tizen::Base::String& password);
 
@@ -133,6 +135,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        Tizen::Base::String GetName(void) const;
@@ -149,6 +152,7 @@ public:
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        Tizen::Base::String GetPassword(void) const;
index bdf1338..6040fc1 100755 (executable)
@@ -181,6 +181,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @remarks             The corresponding event listener must also be added in the same thread. A single transaction can be opened in a session at a time. After closing an open transaction, another
         *                              transaction can be opened.
@@ -202,6 +203,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
        * @exception    E_SYSTEM                                A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              The specific error code can be accessed using the GetLastResult() method.
        * @remarks              The corresponding event listener must also be added in the same thread. A single transaction at a time can be opened in a session. After closing an open transaction, another
        *                               transaction can be opened.
@@ -226,6 +228,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                         The memory is insufficient.
         * @exception   E_SYSTEM                                        A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The canceled transaction is no longer considered active. Also, re-opening the transaction is not allowed.
         */
        result CancelTransaction(HttpTransaction& httpTransaction);
@@ -248,6 +251,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result CloseTransaction(HttpTransaction& httpTransaction);
 
@@ -266,6 +270,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         */
        result CloseAllTransactions(void);
 
@@ -309,6 +314,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @remarks             The transactions in the state between Submitted and Cancelled (or Closed) are considered to be active transactions.
         */
@@ -327,6 +333,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @remarks             In NET_HTTP_SESSION_MODE_MULTIPLE_HOST mode, the platform does not limit the number of maximum HttpTransaction that %HttpSession can have. @n
         */
index e2b4492..2632628 100644 (file)
@@ -124,6 +124,7 @@ public:
         * @exception           E_UNKNOWN                               An unknown error has occurred.
         * @exception           E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks                     The appropriate request header and body must be set using HttpRequest before using this method.
         *                                      If the session is in a non-pipeline mode, be sure not to submit a transaction before the previous transaction is completed.
         * @see                         HttpHeader
@@ -144,6 +145,7 @@ public:
         * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation.
         * @exception   E_SYSTEM                                A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        HttpAuthentication* OpenAuthenticationInfoN(void);
index e40c529..9add2f5 100644 (file)
@@ -215,6 +215,7 @@ public:
         * @exception   E_INVALID_CONNECTION    The network connection is invalid.
         * @exception   E_FAILURE                               The method has failed due to an undefined error.
         * @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. @b Since: @b 2.1
         * @remarks      The @c netConnection parameter specifies a run-time network connection. @n
         *                              The @c addressFamily parameter specifies an address family. @n
         *                              The @c socketType parameter specifies the type of the secure socket. SSL only supports stream-based protocols. @n
@@ -259,6 +260,7 @@ public:
         * @exception   E_INVALID_CONNECTION    The network connection is invalid.
         * @exception   E_FAILURE                               The method has failed due to an undefined error.
         * @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. @b Since: @b 2.1
         * @remarks             The @c addressFamily parameter specifies an address family. @n
         *               The @c socketType parameter specifies the type of the secure socket. SSL only supports stream-based protocols. @n
         *               The @c protocol parameter specifies the protocol used by the secure socket. The SSL protocol is defined as NET_SOCKET_PROTOCOL_SSL. @n
@@ -291,6 +293,7 @@ public:
         * @exception    E_OUT_OF_MEMORY                                The memory is insufficient.
         * @exception   E_SYSTEM                                        A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks             If the %SecureSocket class is not initialized through one of the Construct() methods or this method is called more than once,
         *                              then this method returns E_INVALID_STATE.
         */
@@ -329,6 +332,7 @@ public:
         * @exception        E_OUT_OF_MEMORY                            The memory is insufficient.
         * @exception           E_SYSTEM                                        A system error has occurred.
         * @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. @b Since: @b 2.1
         *
         * @remarks             Starts connection to a remote peer including SSL handshaking.
         *                              After this method is called, ISecureSocketEventListener::OnSecureSocketConnected() is called. The data is sent to and received from the remote
@@ -493,6 +497,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              Use this method if a specific local endpoint should be used.
        *                               This method can be used on both the connectionless and connection-oriented protocols.
        *                               For connection-oriented sockets, this method need not be called
@@ -521,6 +526,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              This method causes a connection-oriented socket to listen for
        *                               the incoming connection attempts. The @c backlog parameter specifies
        *                               the number of incoming connections that can be queued for acceptance.
@@ -552,6 +558,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              Before calling this method, the Listen() method must be called first
        *                               to listen for and queue the incoming connection requests.
        *                               In the blocking mode, this method blocks until an incoming connection attempt
@@ -582,6 +589,7 @@ public:
         * @exception   E_OUT_OF_MEMORY                         The memory is insufficient.
         * @exception   E_SYSTEM                                        A system error has occurred.
         * @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. @b Since: @b 2.1
         * @remarks     This method manipulates the underlying device parameters of the secure socket descriptors. @n@n
         *              The NET_SOCKET_FIONBIO option is used for setting the non-blocking/blocking mode on a secure socket.
         *              Set the value to zero for enabling the blocking mode, or to a non-zero value for enabling the non-blocking mode.
index cc3ff65..b675554 100644 (file)
@@ -98,6 +98,7 @@ public:
        * @exception    E_INVALID_CONNECTION            The network connection is invalid.
        * @exception    E_FAILURE                                       The method has failed.
        * @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. @b Since: @b 2.1
        * @remarks      The @c netConnection parameter specifies a run-time network connection. @n
        *                               The @c addressFamily parameter specifies an address family. @n
        *                               The @c socketType parameter specifies the type of the socket. @n
@@ -148,6 +149,7 @@ public:
        * @exception    E_INVALID_CONNECTION            The network connection is invalid.
        * @exception    E_FAILURE                                       The method has failed.
        * @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. @b Since: @b 2.1
        * @remarks              The @c addressFamily parameter specifies an address family. @n
        *                               The @c socketType parameter specifies the type of the socket. @n
        *                               The @c protocol parameter specifies the protocol used by the socket. @n
@@ -188,6 +190,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              If the %Socket class is not initialized through one of the Construct() methods, or this method is called more than once,
        *                               then this method returns E_INVALID_STATE.
        */
@@ -225,6 +228,7 @@ public:
        * @exception        E_OUT_OF_MEMORY                             The memory is insufficient.
        * @exception            E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks                      If the socket is a connectionless socket (that is, of the type NET_SOCKET_TYPE_DATAGRAM), this method fails.
        *                                       After this method is called, ISocketEventListener::OnSocketConnected() is called. the data can be sent to and received from the remote device using Send() and Receive() respectively.
        *                                       If a connection-oriented protocol is used and Bind() is not called before calling this method, the underlying service provider
@@ -597,6 +601,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              Use this method if a specific local endpoint should be used.
        *                               This method can be used on both the connectionless and connection-oriented protocols.
        *                               For connection-oriented sockets, this method need not be called
@@ -625,6 +630,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              This method causes a connection-oriented socket to listen for
        *                               the incoming connection attempts. The @c backlog parameter specifies
        *                               the number of incoming connections that can be queued for acceptance.
@@ -654,6 +660,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              Before calling this method, the Listen() method must be called first
        *                               to listen for and queue the incoming connection requests.
        *                               In the blocking mode, this method blocks until an incoming connection attempt
@@ -684,6 +691,7 @@ public:
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              This method manipulates the underlying device parameters of the socket descriptors. @n@n
        *                               The NET_SOCKET_FIONBIO option is used for setting the non-blocking/blocking mode on a socket.
        *                               Set the value to zero for enabling the blocking mode, or to a non-zero value for enabling the non-blocking mode.
index 3fbccb5..5a59dd2 100644 (file)
@@ -98,6 +98,7 @@ public:
        * @exception        E_OUT_OF_MEMORY                             The memory is insufficient.
        * @exception            E_SYSTEM                                        A system error has occurred.
        * @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. @b Since: @b 2.1
        * @remarks              This method determines the status of one or more
        *               Socket instances. There must be at least one socket in an Tizen::Base::Collection::IList
        *               before this method is used.
index 0d7f735..9d6e0f3 100644 (file)
@@ -55,8 +55,8 @@ HttpAuthentication::GetRealmN(void) const
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        String* pRealm = __pHttpAuthenticationImpl->GetRealmN();
        if (IsFailed(r))
@@ -78,8 +78,8 @@ HttpAuthentication::GetAuthScheme(void) const
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, NET_HTTP_AUTH_NONE, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, NET_HTTP_AUTH_NONE, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        NetHttpAuthScheme scheme = __pHttpAuthenticationImpl->GetAuthScheme();
        r = GetLastResult();
@@ -94,8 +94,8 @@ HttpAuthentication::SetCredentials(HttpCredentials& credentials)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        HttpTransaction* pTransaction = __pHttpAuthenticationImpl->SetCredentials(credentials);
        r = GetLastResult();
index 1b1bcb6..d71c2c7 100644 (file)
@@ -72,8 +72,8 @@ HttpCookieStorageManager::RemoveCookies(const Tizen::Base::String& url)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysLog(NID_NET_HTTP, "url : %ls", url.GetPointer());
 
@@ -89,8 +89,8 @@ HttpCookieStorageManager::RemoveAllCookies()
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pHttpCookieStorageManagerImpl->RemoveAllCookies();
        SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Propagating.");
index 646462c..03af65d 100644 (file)
@@ -79,8 +79,8 @@ HttpCredentials::GetName(void) const
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, L"", r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, L"", r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        return __userName;
 }
@@ -92,8 +92,8 @@ HttpCredentials::GetPassword(void) const
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, L"", r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, L"", r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        return __password;
 }
@@ -104,8 +104,8 @@ HttpCredentials::SetName(const String& userName)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysTryReturnResult(NID_NET_HTTP, userName.GetLength() > 0, E_INVALID_ARG,
                                 "Failed to set user name of the credentials.");
@@ -120,8 +120,8 @@ HttpCredentials::SetPassword(const String& password)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysTryReturnResult(NID_NET_HTTP, password.GetLength() > 0, E_INVALID_ARG,
                                 "Failed to set password of the credentials.");
index bee7daf..9a21a6a 100644 (file)
@@ -150,8 +150,8 @@ HttpSession::OpenTransactionN()
        HttpTransaction* pHttpTransaction = null;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        pHttpTransaction = __pHttpSessionImpl->OpenTransactionN();
        r = GetLastResult();
@@ -170,8 +170,8 @@ HttpSession::OpenTransactionN(const HttpAuthentication& auth)
        HttpTransaction* pHttpTransaction = null;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        pHttpTransaction = __pHttpSessionImpl->OpenTransactionN(auth);
        r = GetLastResult();
@@ -188,8 +188,8 @@ HttpSession::CloseAllTransactions(void)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pHttpSessionImpl->CloseAllTransactions();
        SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Propagating.");
@@ -205,8 +205,8 @@ HttpSession::CancelTransaction(HttpTransaction& httpTransaction)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pHttpSessionImpl->CancelTransaction(httpTransaction);
        SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Propagating.");
@@ -222,8 +222,8 @@ HttpSession::CloseTransaction(HttpTransaction& httpTransaction)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pHttpSessionImpl->CloseTransaction(httpTransaction);
        SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Propagating.");
@@ -240,8 +240,8 @@ HttpSession::GetActiveTransactionCount(void) const
        int activeTransactionCount = -1;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, -1, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        activeTransactionCount = __pHttpSessionImpl->GetActiveTransactionCount();
        r = GetLastResult();
@@ -259,8 +259,8 @@ HttpSession::GetMaxTransactionCount(void) const
        int maxTransactionCount = -1;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, -1, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        maxTransactionCount = __pHttpSessionImpl->GetMaxTransactionCount();
        r = GetLastResult();
index 15b17a3..c6f6144 100644 (file)
@@ -57,8 +57,8 @@ HttpTransaction::Submit(void)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pHttpTransactionImpl->Submit();
        SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Propagating.");
@@ -71,8 +71,8 @@ HttpTransaction::OpenAuthenticationInfoN(void)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_HTTP);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_HTTP, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        HttpAuthentication* pHttpAuthentication = __pHttpTransactionImpl->OpenAuthenticationInfoN();
        r = GetLastResult();
index c97853e..1a83629 100644 (file)
@@ -52,8 +52,8 @@ SecureSocket::Construct(const NetConnection& netConnection, NetSocketAddressFami
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl == null,
                        "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
@@ -75,8 +75,8 @@ SecureSocket::Construct(NetSocketAddressFamily addressFamily, NetSocketType sock
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl == null,
                        "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
@@ -98,8 +98,8 @@ SecureSocket::Close(void)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -115,8 +115,8 @@ SecureSocket::Connect(const NetEndPoint& remoteEP)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -184,8 +184,8 @@ SecureSocket::Bind(const NetEndPoint& localEP)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -201,8 +201,8 @@ SecureSocket::Listen(int backLog)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -220,8 +220,8 @@ SecureSocket::AcceptN(void) const
        SecureSocket* pNewSocket = null;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, null, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -238,8 +238,8 @@ SecureSocket::Ioctl(NetSocketIoctlCmd cmd, unsigned long& pArg) const
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                                       "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSecureSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
index 0c1c14c..63c3bd6 100644 (file)
@@ -50,13 +50,13 @@ result
 Socket::Construct(const NetConnection& netConnection, NetSocketAddressFamily addressFamily, NetSocketType socketType,
                                  NetSocketProtocol protocol)
 {
-    SysAssertf(__pSocketImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+       SysAssertf(__pSocketImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
 
-    result r = E_SUCCESS;
+       result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        unique_ptr<_SocketImpl> pSocketImpl(new (std::nothrow) _SocketImpl(this));
        SysTryReturnResult(NID_NET_SOCK, pSocketImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -72,13 +72,13 @@ Socket::Construct(const NetConnection& netConnection, NetSocketAddressFamily add
 result
 Socket::Construct(NetSocketAddressFamily addressFamily, NetSocketType socketType, NetSocketProtocol protocol)
 {
-    SysAssertf(__pSocketImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+       SysAssertf(__pSocketImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
 
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        unique_ptr<_SocketImpl> pSocketImpl(new (std::nothrow) _SocketImpl(this));
        SysTryReturnResult(NID_NET_SOCK, pSocketImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -94,13 +94,13 @@ Socket::Construct(NetSocketAddressFamily addressFamily, NetSocketType socketType
 result
 Socket::Close(void)
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pSocketImpl->Close();
        SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "Propagating.");
@@ -111,13 +111,13 @@ Socket::Close(void)
 result
 Socket::Connect(const NetEndPoint& remoteEP)
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
-    result r = E_SUCCESS;
+       result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-    r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pSocketImpl->Connect(remoteEP);
        SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "Propagating.");
@@ -232,13 +232,13 @@ Socket::ReceiveFrom(void* pBuffer, int length, NetEndPoint& remoteEP, int& rcvdL
 result
 Socket::Bind(const NetEndPoint& localEP)
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-    r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pSocketImpl->Bind(localEP);
        SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "Propagating.");
@@ -249,13 +249,13 @@ Socket::Bind(const NetEndPoint& localEP)
 result
 Socket::Listen(int backLog)
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-    r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pSocketImpl->Listen(backLog);
        SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "Propagating.");
@@ -266,7 +266,7 @@ Socket::Listen(int backLog)
 Socket*
 Socket::AcceptN(void) const
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        ClearLastResult();
 
@@ -274,8 +274,8 @@ Socket::AcceptN(void) const
        Socket* pNewSocket = null;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-    r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-    SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED, E_OUT_OF_MEMORY);
+       SysTryReturn(NID_NET_SOCK, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
 
        pNewSocket = __pSocketImpl->AcceptN();
        r = GetLastResult();
@@ -287,13 +287,13 @@ Socket::AcceptN(void) const
 result
 Socket::Ioctl(NetSocketIoctlCmd cmd, unsigned long& pArg) const
 {
-    SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
+       SysAssertf(__pSocketImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-    r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        r = __pSocketImpl->Ioctl(cmd, pArg);
        SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "Propagating.");
index ea47197..c1d380f 100644 (file)
@@ -71,7 +71,8 @@ SocketUtility::Select(IList* checkRead, IList* checkWrite, IList* checkError, in
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_SOCKET);
-       SysTryReturnResult(NID_NET_SOCK, 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, E_OUT_OF_MEMORY);
+       SysTryReturnResult(NID_NET_SOCK, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pSocketUtilityImpl != null, "Not yet constructed. Construct() should be called before use.");