Add a new error code. 78/185778/3
authorDeokhyun Kim <dukan.kim@samsung.com>
Thu, 2 Aug 2018 08:05:09 +0000 (17:05 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Fri, 10 Aug 2018 04:34:50 +0000 (04:34 +0000)
 - BT_ERROR_AUTHORIZATION_REJECTED

Change-Id: I0c9d2a13df93efb67a138b8538da6d16bcea2165
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
include/bluetooth_type.h
src/bluetooth-common.c

index bb3e936..a2a08e5 100644 (file)
@@ -105,6 +105,7 @@ typedef enum {
        BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED = TIZEN_ERROR_BLUETOOTH|0x010B, /**< Remote device is not connected */
        BT_ERROR_AGAIN = TIZEN_ERROR_BLUETOOTH|0x010C, /**< Resource temporarily unavailable */
        BT_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_BLUETOOTH|0x010D, /**< Service Not Found */
+       BT_ERROR_AUTHORIZATION_REJECTED = TIZEN_ERROR_BLUETOOTH|0x010E, /**< Authorization rejected (Since 5.0) */
 } bt_error_e;
 
 /**
index 30e3341..9b5110b 100644 (file)
@@ -223,15 +223,12 @@ int _bt_get_error_code(int origin_error)
                return BT_ERROR_QUOTA_EXCEEDED;
        case BLUETOOTH_ERROR_AUTHENTICATION_REJECTED:
                return BT_ERROR_AUTH_REJECTED;
+       case BLUETOOTH_ERROR_AUTHORIZATION_REJECTED:
+               return BT_ERROR_AUTHORIZATION_REJECTED;
        case BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION:
                return BT_ERROR_DEVICE_POLICY_RESTRICTION;
-/* Because BLUETOOTH_ERROR_NO_DATA is not defined in Tizen 3.0's bluetooth-api.h,
-   the build error is occured. We will include all patchsets for this in Tizen 4.0.
-   In tizen 3.0, we comment out this code for fixing build error.  */
-#if 0
        case BLUETOOTH_ERROR_NO_DATA:
                return BT_ERROR_NO_DATA;
-#endif
        case BLUETOOTH_ERROR_PARING_FAILED:
        case BLUETOOTH_ERROR_MAX_CONNECTION:
        case BLUETOOTH_ERROR_REGISTRATION_FAILED: