Handle the obex agent using tizen OPP feature 74/237074/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 25 Jun 2020 00:45:29 +0000 (09:45 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 25 Jun 2020 00:46:58 +0000 (09:46 +0900)
Change-Id: Ifcb5a53d0e69a8f673d3fca0a63ffcdd374e572b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c
include/bt-internal-types.h

index 6566463..d2bbebd 100644 (file)
@@ -469,13 +469,13 @@ static  void __bt_manager_event_filter(GDBusConnection *connection,
                g_variant_get(parameters, "(&o@a{sa{sv}})", &obj_path, &value);
 
                if (strcasecmp(obj_path, BT_BLUEZ_HCI_PATH) == 0)
-                       if (TIZEN_FEATURE_BT_USB_DONGLE) {
+                       if (TIZEN_FEATURE_OPP_SUPPORTED) {
                                if (_bt_register_obex_server() != BLUETOOTH_ERROR_NONE)
                                        BT_ERR("Fail to init obex server");
                        }
                g_variant_unref(value);
        } else if (strcasecmp(signal_name, "InterfacesRemoved") == 0) {
-                       if (TIZEN_FEATURE_BT_USB_DONGLE) {
+                       if (TIZEN_FEATURE_OPP_SUPPORTED) {
                                if (_bt_unregister_obex_server() != BLUETOOTH_ERROR_NONE)
                                        BT_ERR("Fail to unregister obex server");
                        }
index 0ae85f4..fdcc113 100644 (file)
@@ -714,6 +714,7 @@ typedef struct {
 #define FILEPATH_ARCH_64 "/usr/lib64"
 
 #define BT_FEATURE_COMMON "http://tizen.org/feature/network.bluetooth"
+#define BT_FEATURE_OPP "http://tizen.org/feature/network.bluetooth.opp"
 
 struct bluetooth_headed_plugin_t {
        int (*bt_launch_dpmpopup) (char *mode);
@@ -867,6 +868,7 @@ static inline bool get_tizen_feature_supported(char *feature)
 #define TIZEN_FEATURE_BT_USB_DONGLE ((get_tizen_model()) == _MODEL_COMMON && (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)
+#define TIZEN_FEATURE_OPP_SUPPORTED (get_tizen_feature_supported(BT_FEATURE_OPP) == true)
 
 #ifdef __cplusplus
 }