struct sigaction sa;
BT_INFO_C("### Starting the bt-service daemon");
+ if (!TIZEN_FEATURE_BT_SUPPORTED) {
+ BT_INFO_C("BT feature is not supported, terminate bt-service");
+ return 0;
+ }
+
memset(&sa, 0, sizeof(sa));
sa.sa_sigaction = __bt_sigterm_handler;
sa.sa_flags = SA_SIGINFO;
#define HEADED_PLUGIN_FILEPATH64 "/usr/lib64/bt-plugin-headed.so"
#define FILEPATH_ARCH_64 "/usr/lib64"
+#define BT_FEATURE_COMMON "http://tizen.org/feature/network.bluetooth"
+
struct bluetooth_headed_plugin_t {
int (*bt_launch_dpmpopup) (char *mode);
int (*bt_launch_system_popup)(int event_type,
/* Accessing system info */
int system_info_get_platform_string(const char *key, char **value);
+bool system_info_get_platform_bool(const char *key, bool *value);
void bluetooth_plugin_init();
void bluetooth_plugin_deinit();
return model;
}
+static inline bool get_tizen_feature_supported(char *feature)
+{
+ bool is_supported = false;
+
+ system_info_get_platform_bool(feature, &is_supported);
+
+ return is_supported ? true : false;
+}
+
#define TIZEN_PROFILE_WEARABLE (get_tizen_profile() == _PROFILE_WEARABLE)
#define TIZEN_PROFILE_IVI (get_tizen_profile() == _PROFILE_IVI)
#define TIZEN_PROFILE_TV (get_tizen_profile() == _PROFILE_TV)
#define TIZEN_FEATURE_FLIGHTMODE_ENABLED (get_tizen_profile() & (_PROFILE_MOBILE | _PROFILE_WEARABLE))
#define TIZEN_FEATURE_BT_USB_DONGLE (get_tizen_profile() & (_PROFILE_TV))
#define TIZEN_FEATURE_BLUEZ_SPEAKER_REFERENCE ((get_tizen_model()) == _MODEL_RPI3 && (get_tizen_profile()) == _PROFILE_COMMON)
+#define TIZEN_FEATURE_BT_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_COMMON) == true)
#ifdef __cplusplus
}