From: Deokhyun Kim Date: Thu, 2 Aug 2018 08:05:09 +0000 (+0900) Subject: Add a new error code. X-Git-Tag: accepted/tizen/unified/20180821.090916^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fbb9893d1fb7bd9d7a2e1bbc1edb4800fb148f2;p=platform%2Fcore%2Fapi%2Fbluetooth.git Add a new error code. - BT_ERROR_AUTHORIZATION_REJECTED Change-Id: I0c9d2a13df93efb67a138b8538da6d16bcea2165 Signed-off-by: Deokhyun Kim --- diff --git a/include/bluetooth_type.h b/include/bluetooth_type.h index bb3e936..a2a08e5 100644 --- a/include/bluetooth_type.h +++ b/include/bluetooth_type.h @@ -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; /** diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 30e3341..9b5110b 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -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: