Remove some package dependencies for the headless image
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-opp-client.c
index b6aabf9..d749aea 100644 (file)
@@ -18,7 +18,6 @@
 #include <glib.h>
 #include <dlog.h>
 #include <string.h>
-#include <mime_type.h>
 #include <glib.h>
 #include <gio/gio.h>
 
@@ -574,7 +573,7 @@ void _bt_sending_files(void)
        GError *err = NULL;
        GDBusConnection *g_conn;
        GDBusProxy *client_proxy;
-       gchar *mime_type = NULL;
+       char *mime_type = NULL;
 
        if (sending_info == NULL)
                return;
@@ -589,7 +588,9 @@ void _bt_sending_files(void)
                                                BT_OBEX_OBJECT_PUSH_INTERFACE,
                                                NULL, &err);
                ret_if(client_proxy == NULL);
-               if (mime_type_get_mime_type(sending_info->file_name_array[file_offset], &mime_type) == MIME_TYPE_ERROR_NONE) {
+               if (headed_plugin_info->plugin_headed_enabled) {
+                       if (headed_plugin_info->headed_plugin->bt_get_mime_type(sending_info->file_name_array[file_offset],
+                                       &mime_type) == BLUETOOTH_ERROR_NONE) {
                                BT_DBG("MLME type = %s", mime_type);
 
                                /* For IOPT compliance, change "text/x-iMelody" to "audio/imelody"
@@ -603,6 +604,7 @@ void _bt_sending_files(void)
                                        strncpy(mime_type, "text/x-vcard", BT_MIME_TYPE_MAX_LEN);
                                        BT_DBG("over writing mime type to  = %s", mime_type);
                                }
+                       }
                }
 
                BT_DBG("Calling SendFile");