Add E_USER_NOT_CONSENTED for new privacy policy.
authordukan.kim <dukan.kim@samsung.com>
Thu, 11 Apr 2013 11:45:29 +0000 (20:45 +0900)
committerdukan.kim <dukan.kim@samsung.com>
Thu, 11 Apr 2013 12:06:17 +0000 (21:06 +0900)
Change-Id: I9c5427a31684e82e366f1b3f0c6e0b95600e6e44
Signed-off-by: dukan.kim <dukan.kim@samsung.com>
14 files changed:
inc/FNetBtBluetoothHealth.h
inc/FNetBtBluetoothManager.h
inc/FNetBtBluetoothOppClient.h
inc/FNetBtBluetoothOppServer.h
inc/FNetBtBluetoothSppAcceptor.h
inc/FNetBtBluetoothSppInitiator.h
src/FNetBtBluetoothHealth.cpp [changed mode: 0644->0755]
src/FNetBtBluetoothManager.cpp [changed mode: 0644->0755]
src/FNetBtBluetoothOppClient.cpp [changed mode: 0644->0755]
src/FNetBtBluetoothOppServer.cpp [changed mode: 0644->0755]
src/FNetBtBluetoothSppAcceptor.cpp [changed mode: 0644->0755]
src/FNetBtBluetoothSppInitiator.cpp [changed mode: 0644->0755]
src/FNetBt_BluetoothManagerImpl.cpp
src/inc/FNetBt_BluetoothManagerImpl.h

index 60fc709..e2aac67 100755 (executable)
@@ -120,6 +120,7 @@ public:
         * @exception   E_SERVICE_UNAVAILABLE   The sink role with the specified data type is currently busy with another
         *                                      instance or application.
         * @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
         * @exception   E_OPERATION_FAILED      The method has failed.
         */
        result StartAsSink(int dataType);
@@ -139,6 +140,7 @@ public:
         *                                      operation. @n
         *                                      For example, the sink role is not started yet.
         * @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
         * @exception   E_OPERATION_FAILED      The method has failed.
         */
        result Stop(void);
@@ -160,6 +162,7 @@ public:
         *                                      For example, the sink role is not started yet.
         * @exception   E_DEVICE_BUSY           The pairing and connection process is in progress.
         * @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
         * @exception   E_OPERATION_FAILED      The method has failed.
         * @remarks     If the local device is not paired with the specified target device, the pairing process starts
         *              internally before the connect request is sent.
@@ -186,6 +189,7 @@ public:
         *                                      operation. @n
         *                                      For example, there is no connection with the specified channel ID.
         * @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
         * @exception   E_OPERATION_FAILED      The method has failed.
         */
        result Disconnect(int channelId);
@@ -209,6 +213,7 @@ public:
         *                                      For example, there is no connection with the specified channel ID.
         * @exception   E_INVALID_ARG           The input buffer has no data.
         * @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
         * @exception   E_OPERATION_FAILED      The operation has failed.
         * @see         IBluetoothHealthEventListener::OnHealthDataReceived()
         */
index eadec09..7f2d285 100755 (executable)
@@ -113,6 +113,7 @@ public:
         *                                      For example, %Bluetooth is already activated.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothManagerEventListener::OnBluetoothActivated()
         */
@@ -133,6 +134,7 @@ public:
         *                                      For example, the %Bluetooth is already deactivated.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothManagerEventListener::OnBluetoothDeactivated()
         */
@@ -298,6 +300,7 @@ public:
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG           The specified device name is an empty string.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @remarks     This method does not affect the system settings.
         */
@@ -320,6 +323,7 @@ public:
         *                                      is @c BT_DISC_MODE_TIME_LIMITED_DISCOVERABLE.
         * @exception   E_INVALID_OPERATION     %Bluetooth is not activated.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothManagerEventListener::OnBluetoothDiscoverableModeChanged()
         */
@@ -474,6 +478,7 @@ public:
         * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of this
         *                                      operation.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothDeviceEventListener::OnBluetoothDiscoveryStarted()
         * @see         IBluetoothDeviceEventListener::OnBluetoothRemoteDeviceFoundN()
@@ -495,6 +500,7 @@ public:
         *                                      operation. @n
         *                                      For example, the discovery has not started as yet.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothDeviceEventListener::OnBluetoothDiscoveryDone()
         */
@@ -516,6 +522,7 @@ public:
         *                                      For example, the discovery is in progress.
         * @exception   E_NOT_PAIRED            The input device is not found in the paired device list.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @remarks     The target remote device should be a paired device.
         * @see         IBluetoothDeviceEventListener::OnBluetoothServiceListReceived()
@@ -537,6 +544,7 @@ public:
         *                                      For example, the %Bluetooth is not activated.
         * @exception   E_DEVICE_BUSY           The device cannot be approached because other operation is in progress.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @remarks     IBluetoothDeviceEventListener::OnBluetoothPaired() is called if the pairing is successful, @n
         *              IBluetoothDeviceEventListener::OnBluetoothPairingFailed() if the pairing has failed.
@@ -557,6 +565,7 @@ public:
         *                                      For example, the pairing process is not in progress.
         * @exception   E_IN_PROGRESS           The termination of the pairing process is in progress.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @remarks     If the canceling of the pairing process is successful, @n
         *              IBluetoothDeviceEventListener::OnBluetoothPairingFailed() is called with @c E_OPERATION_CANCELED.
@@ -582,6 +591,7 @@ public:
         *                                      list is in progress.
         * @exception   E_NOT_PAIRED            The input device is not found in the paired device list.
         * @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
         * @exception   E_SYSTEM                A system error has occurred.
         * @see         IBluetoothDeviceEventListener::OnBluetoothUnpaired()
         */
index f49d6fe..7ab92ff 100755 (executable)
@@ -115,6 +115,7 @@ public:
         *                                          For example, %Bluetooth is not activated.
         * @exception   E_IN_PROGRESS               The push process is in progress.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE       The OPP service is unavailable.
         * @exception   E_INACCESSIBLE_PATH         The specified @c filePath is inaccessible.
         * @exception   E_REMOTE_DEVICE_NOT_FOUND   The input device is not found. @n
@@ -145,6 +146,7 @@ public:
         *                                      operation. @n
         *                                      For example, the push request is not sent or accepted by a remote device.
         * @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
         * @exception   E_FAILURE               The method has failed.
         */
        result CancelPush(void);
index 8563389..ec3fed0 100755 (executable)
@@ -109,6 +109,7 @@ public:
         *                                      For example, the service is not started yet or a push request is not
         *                                      received from a remote device.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothOppClientEventListener::OnOppPushResponded()
         */
@@ -131,6 +132,7 @@ public:
         *                                      For example, the service is not started yet or a push request is not
         *                                      received from a remote device.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothOppClientEventListener::OnOppPushResponded()
         */
@@ -180,6 +182,7 @@ public:
         *                                      For example, %Bluetooth is not activated.
         * @exception   E_IN_PROGRESS           The service has already started.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE   The OPP service is unavailable.
         * @exception   E_INACCESSIBLE_PATH     The specified @c dstPath is inaccessible.
         * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified
@@ -205,6 +208,7 @@ public:
         *                                      operation. @n
         *                                      For example, the service is not started as yet.
         * @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
         * @exception   E_IN_PROGRESS           The stop process is in progress.
         * @exception   E_FAILURE               The method has failed.
         */
@@ -227,6 +231,7 @@ public:
         *                                      operation. @n
         *                                      For example, the file transfer is not in progress.
         * @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
         * @exception   E_OPERATION_FAILED      The operation has failed.
         */
        result StopTransfer(void);
index 16154bb..a8b8049 100755 (executable)
@@ -110,6 +110,7 @@ public:
         *                                      For example, the service is not started yet or the connection request is
         *                                      not yet received from a remote device.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppInitiatorEventListener::OnSppConnectionResponded()
         */
@@ -132,6 +133,7 @@ public:
         *                                      For example, the service is not started yet or the connection request is
         *                                      not yet received from a remote device.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppInitiatorEventListener::OnSppConnectionResponded()
         */
@@ -152,6 +154,7 @@ public:
         * @exception   E_IN_PROGRESS           The service has already started.
         * @exception   E_ALREADY_CONNECTED     The connection with an SPP initiator has already been established.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE   The SPP service with the specified UUId is unavailable.
         * @exception   E_FAILURE               The method has failed.
         */
@@ -174,6 +177,7 @@ public:
         * @exception   E_IN_PROGRESS           The service has already started.
         * @exception   E_ALREADY_CONNECTED     The connection with an SPP initiator has already been established.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE   The SPP service with the specified UUId is unavailable.
         * @exception   E_FAILURE               The method has failed.
         */
@@ -196,6 +200,7 @@ public:
         *                                      operation. @n
         *                                      For example, the service is not started yet.
         * @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
         * @exception   E_FAILURE               The method has failed.
         */
        result StopService(void);
@@ -217,6 +222,7 @@ public:
         *                                      For example, the service is not started yet or a connection with a remote
         *                                      device is not established.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppAcceptorEventListener::OnSppDisconnected()
         * @see         IBluetoothSppInitiatorEventListener::OnSppDisconnected()
@@ -244,6 +250,7 @@ public:
         * @exception   E_INVALID_ARG           The specified @c buffer is empty.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppInitiatorEventListener::OnSppDataReceived()
         */
index 9bc7e44..2a8f6d0 100755 (executable)
@@ -110,6 +110,7 @@ public:
         * @exception   E_IN_PROGRESS               The connection process is in progress.
         * @exception   E_ALREADY_CONNECTED         The connection with an SPP acceptor has already been established.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE       The SPP connection is unavailable.
         * @exception   E_REMOTE_DEVICE_NOT_FOUND   The input device is not found. @n
         *                                          This exception is currently not in use.
@@ -139,6 +140,7 @@ public:
         * @exception   E_IN_PROGRESS               The connection process is in progress.
         * @exception   E_ALREADY_CONNECTED         The connection with an SPP acceptor has already been established.
         * @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
         * @exception   E_SERVICE_UNAVAILABLE       The SPP connection is unavailable.
         * @exception   E_REMOTE_DEVICE_NOT_FOUND   The input device is not found. @n
         *                                          This exception is currently not in use.
@@ -170,6 +172,7 @@ public:
         *                                      For example, the connection request is not sent or a connection with a
         *                                      remote device is not established yet.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppAcceptorEventListener::OnSppDisconnected()
         */
@@ -196,6 +199,7 @@ public:
         * @exception   E_INVALID_ARG           The argument has no data.
         * @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
         * @exception   E_FAILURE               The method has failed.
         * @see         IBluetoothSppAcceptorEventListener::OnSppDataReceived()
         */
old mode 100644 (file)
new mode 100755 (executable)
index 24fa8e8..df10464
@@ -75,8 +75,8 @@ BluetoothHealth::StartAsSink(int dataType)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_HEALTH);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -91,8 +91,8 @@ BluetoothHealth::Stop(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_HEALTH);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -107,8 +107,8 @@ BluetoothHealth::ConnectToSource(const BluetoothDevice& remoteDevice)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_HEALTH);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -123,8 +123,8 @@ BluetoothHealth::Disconnect(int channelId)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_HEALTH);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -139,8 +139,8 @@ BluetoothHealth::SendData(int channelId, const Tizen::Base::ByteBuffer& buffer)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_HEALTH);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
old mode 100644 (file)
new mode 100755 (executable)
index e0bffbd..44ea9fc
@@ -82,8 +82,8 @@ BluetoothManager::Activate(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_ADMIN);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -97,8 +97,8 @@ BluetoothManager::Deactivate(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_ADMIN);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -185,8 +185,8 @@ BluetoothManager::SetLocalDeviceName(const Tizen::Base::String& deviceName)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_ADMIN);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -285,8 +285,8 @@ BluetoothManager::StartDiscovery(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -300,8 +300,8 @@ BluetoothManager::CancelDiscovery(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -315,8 +315,8 @@ BluetoothManager::RetrieveServiceList(const BluetoothDevice& pairedDevice)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -330,8 +330,8 @@ BluetoothManager::Pair(const BluetoothDevice& remoteDevice)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -345,8 +345,8 @@ BluetoothManager::CancelPair(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -360,8 +360,8 @@ BluetoothManager::Unpair(const BluetoothDevice& pairedDevice)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_GAP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
old mode 100644 (file)
new mode 100755 (executable)
index bd33dc0..e3b7edd
@@ -76,7 +76,8 @@ BluetoothOppClient::PushFile(const BluetoothDevice& remoteDevice, const Base::St
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -91,7 +92,8 @@ BluetoothOppClient::CancelPush(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
old mode 100644 (file)
new mode 100755 (executable)
index 6408760..d07a742
@@ -74,8 +74,8 @@ BluetoothOppServer::AcceptPush(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -90,8 +90,8 @@ BluetoothOppServer::RejectPush(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -124,8 +124,8 @@ BluetoothOppServer::StartService(const Tizen::Base::String& dstPath)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -140,8 +140,8 @@ BluetoothOppServer::StopService(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -156,8 +156,8 @@ BluetoothOppServer::StopTransfer(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_OPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
old mode 100644 (file)
new mode 100755 (executable)
index 658c6ca..4353786
@@ -75,7 +75,8 @@ BluetoothSppAcceptor::AcceptConnection(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -90,7 +91,8 @@ BluetoothSppAcceptor::RejectConnection()
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -112,7 +114,8 @@ BluetoothSppAcceptor::StartService(const Tizen::Base::UuId& serviceUuid)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -127,7 +130,8 @@ BluetoothSppAcceptor::StopService(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -142,7 +146,8 @@ BluetoothSppAcceptor::SendData(const Tizen::Base::ByteBuffer& buffer)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -157,7 +162,8 @@ BluetoothSppAcceptor::Disconnect(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
old mode 100644 (file)
new mode 100755 (executable)
index ecdf810..273417c
@@ -77,7 +77,8 @@ BluetoothSppInitiator::SendData(const Tizen::Base::ByteBuffer& buffer)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -99,7 +100,8 @@ BluetoothSppInitiator::Connect(const BluetoothDevice& remoteDevice, const Tizen:
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
@@ -114,7 +116,8 @@ BluetoothSppInitiator::Disconnect(void)
 
        // Privilege check
        r = _AccessController::CheckUserPrivilege(_PRV_BLUETOOTH_SPP);
-       SysTryReturnResult(NID_NET_BT, 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_BT, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // Check Construct
        SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use.");
index 01c3f24..05b42d5 100755 (executable)
@@ -396,8 +396,8 @@ _BluetoothManagerImpl::SetDiscoverableMode(BluetoothDiscoverableMode mode, int s
 
        // Sets the discoverable mode through osp-connectivity-service.
        r = __pIpcProxy->SetDiscoverableMode((int)mode, seconds);
-       SysTryReturnResult(NID_NET_BT, r != E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
-                               "The application does not have the privilege to call this method.");
+       SysTryReturnResult(NID_NET_BT, r != E_PRIVILEGE_DENIED && r != E_USER_NOT_CONSENTED, r,
+                               "The application is not permitted to call this method.");
        SysTryReturn(NID_NET_BT, r == E_SUCCESS, r, r,
                                "[%s] Setting the the discoverable mode through osp-connectivity-service has failed.", GetErrorMessage(r));
 
index aa78864..6602723 100755 (executable)
@@ -257,7 +257,7 @@ public:
         *
         * @visibility  partner-manufacturer
         * @privlevel   platform
-        * @privilege   http://tizen.org/privilege/bluetoothmanager
+        * @privilege   %http://tizen.org/privilege/bluetoothmanager
         *
         * @return      An error code
         * @param[in]   mode                        The new discoverable mode
@@ -267,6 +267,7 @@ public:
         *                                          @c mode is BT_DISC_MODE_TIME_LIMITED_DISCOVERABLE.
         * @exception   E_INVALID_OPERATION         %Bluetooth is not activated.
         * @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
         * @exception   E_SYSTEM                    A system error has occurred.
         * @see         IBluetoothManagerEventListener::OnBluetoothDiscoverableModeChanged()
         * @remarks     @c seconds is adopted only if the specified @c mode is BT_DISC_MODE_TIME_LIMITED_DISCOVERABLE.