#include <dlog.h>
#include <string.h>
#include <dirent.h>
-#ifdef TIZEN_MDM_ENABLE
-#include <bt-service-mdm.h>
+#ifdef TIZEN_DPM_ENABLE
+#include "bt-service-dpm.h"
#endif
+
#include <vconf.h>
#include <gio/gio.h>
retv_if(conn == NULL, NULL);
proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
- NULL,BT_OBEX_SERVICE_NAME,
+ NULL, BT_OBEX_SERVICE_NAME,
transfer_path,
BT_PROPERTIES_INTERFACE,
NULL, &err);
char *device_name = NULL;
int result = BLUETOOTH_ERROR_NONE;
GDBusProxy *transfer_properties_proxy;
- char * bdaddress = NULL;
+ char *bdaddress = NULL;
GVariant *ret;
GVariantIter *iter;
GVariant *param = NULL;
return FALSE;
}
-#ifdef TIZEN_MDM_ENABLE
- mdm_bt_allow_t mode = MDM_BT_ALLOWED;
-#endif
-
__bt_free_auth_info(agent_info.auth_info);
agent_info.auth_info = g_malloc(sizeof(bt_auth_info_t));
agent_info.auth_info->transfer_path = g_strdup(path);
+#ifdef TIZEN_DPM_ENABLE
+ if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_HANDSFREE_ONLY) {
+ /* Free auth info in next function */
+ _bt_obex_server_reject_authorize();
+ return FALSE;
+ }
+#endif
+
if (iter) {
const gchar *key;
GVariant *val;
gsize len = 0;
while (g_variant_iter_loop(iter, "{sv}", &key, &val)) {
if (g_strcmp0(key, "Name") == 0) {
- agent_info.auth_info->filename = g_variant_dup_string(val,&len);
+ agent_info.auth_info->filename = g_variant_dup_string(val, &len);
} else if (g_strcmp0(key, "Address") == 0) {
bdaddress = g_variant_dup_string(val, &len);
} else if (g_strcmp0(key, "Size") == 0) {
snprintf(file_path, sizeof(file_path), "%s", filename);
g_dbus_method_invocation_return_value(agent_info.auth_info->reply_context,
- g_variant_new("(s)",&file_path));
+ g_variant_new("(s)", &file_path));
agent_info.auth_info->reply_context = NULL;
agent_info.auth_info->file_path = g_strdup(file_path);