} \
} while (0)
+#define BT_CHECK_SUPPORTED_FEATURES(feature_name1, feature_name2) \
+do { \
+ bool is_supported = false; \
+ if (!system_info_get_platform_bool(feature_name1, &is_supported)) { \
+ if (is_supported == true) { \
+ LOGE("[%s] SUPPORTED", __FUNCTION__); \
+ break; \
+ } \
+ } else { \
+ LOGE("[%s] Fail to get the system feature: [%s]", __FUNCTION__, feature_name1); \
+ } \
+ if (!system_info_get_platform_bool(feature_name2, &is_supported)) { \
+ if (is_supported == true) { \
+ LOGE("[%s] SUPPORTED", __FUNCTION__); \
+ break; \
+ } else {\
+ LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \
+ return BT_ERROR_NOT_SUPPORTED; \
+ } \
+ } else { \
+ LOGE("[%s] Fail to get the system feature: [%s]", __FUNCTION__, feature_name2); \
+ } \
+} while (0)
+
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
* @brief Enumerations of the authentication event types.
#define BT_CHECK_AUDIO_SUPPORT() \
{ \
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_AUDIO_CALL); \
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_AUDIO_MEDIA); \
-}
+ BT_CHECK_SUPPORTED_FEATURES(BT_FEATURE_AUDIO_CALL, BT_FEATURE_AUDIO_MEDIA); \
+ }
#define BT_CHECK_HFP_SUPPORT() \
{ \