#include <dlog.h>
#include <string.h>
#include <dirent.h>
-#ifdef TIZEN_DPM_ENABLE
+#ifdef TIZEN_FEATURE_BT_DPM
#include "bt-service-dpm.h"
#endif
GDBusProxy *proxy;
GError *err = NULL;
- conn = _bt_gdbus_get_session_gconn();
+ conn = _bt_gdbus_get_system_gconn();
retv_if(conn == NULL, NULL);
proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
GDBusConnection *conn;
GDBusProxy *proxy;
GError *err = NULL;
- conn = _bt_gdbus_get_session_gconn();
+ conn = _bt_gdbus_get_system_gconn();
retv_if(conn == NULL, NULL);
proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
GVariant *param = NULL;
GError *err = NULL;
bt_session_info_t *session_info = NULL;
+#ifdef TIZEN_FEATURE_BT_DPM
+ int value = DPM_BT_ERROR;
+#endif
BT_DBG(" path [%s] \n", path);
agent_info.auth_info->transfer_path = g_strdup(path);
-#ifdef TIZEN_DPM_ENABLE
- if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_HANDSFREE_ONLY) {
+#ifdef TIZEN_FEATURE_BT_DPM
+ _bt_dpm_get_allow_bluetooth_mode(&value);
+ if (value == DPM_BT_HANDSFREE_ONLY) {
/* Free auth info in next function */
_bt_obex_server_reject_authorize();
return FALSE;
}
if (session_info->authorized == FALSE) {
- _bt_launch_system_popup(BT_AGENT_EVENT_EXCHANGE_REQUEST, device_name,
+ if (headed_plugin_info->plugin_headed_enabled)
+ headed_plugin_info->headed_plugin->bt_launch_system_popup(BT_AGENT_EVENT_EXCHANGE_REQUEST, device_name,
auth_info, NULL, NULL, BT_OBEX_SERVER_AGENT_PATH);
} else {
param = g_variant_new("(istss)", result,
- agent_info.auth_info->filename,
- agent_info.auth_info->file_size,
- agent_info.auth_info->address,
- agent_info.auth_info->device_name);
+ agent_info.auth_info->filename,
+ agent_info.auth_info->file_size,
+ agent_info.auth_info->address,
+ agent_info.auth_info->device_name);
_bt_send_event(BT_OPP_SERVER_EVENT,
- BLUETOOTH_EVENT_OBEX_SERVER_TRANSFER_AUTHORIZE, param);
+ BLUETOOTH_EVENT_OBEX_SERVER_TRANSFER_AUTHORIZE, param);
}
return TRUE;
GError *g_error = NULL;
/* Get the session bus. */
- g_conn = _bt_gdbus_get_session_gconn();
+ g_conn = _bt_gdbus_get_system_gconn();
retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
_bt_obex_agent_new(BT_OBEX_SERVER_AGENT_PATH);