gio-2.0
gio-unix-2.0
alarm-service
- capi-content-mime-type
capi-network-connection
pkgmgr
cynara-client
cynara-creds-gdbus
eventsystem
storage
- capi-network-tethering
capi-system-info
)
#include <vconf.h>
#include <bundle_internal.h>
-#include <tethering.h>
-
#include "bt-internal-types.h"
#include "bt-service-common.h"
#include "bt-service-agent.h"
GVariant *reply = NULL;
GVariant *reply_temp = NULL;
GVariant *tmp_value;
- bool enabled;
int result = BLUETOOTH_ERROR_NONE;
int request_type = BT_AGENT_EVENT_AUTHORIZE_REQUEST;
- tethering_h tethering = NULL;
BT_DBG("+");
BT_ERR("Max connection exceeded");
goto fail;
}
- int ret;
- ret = tethering_create(&tethering);
-
- if (ret != TETHERING_ERROR_NONE) {
- BT_ERR("Fail to create tethering: %d", ret);
- goto fail;
- }
- enabled = tethering_is_enabled(tethering, TETHERING_TYPE_BT);
-
- ret = tethering_destroy(tethering);
-
- if (ret != TETHERING_ERROR_NONE)
- BT_ERR("Fail to create tethering: %d", ret);
-
- if (enabled != true) {
- BT_ERR("BT tethering is not enabled");
- goto fail;
+ if (headed_plugin_info->plugin_headed_enabled) {
+ if (headed_plugin_info->headed_plugin->bt_is_tethering_enabled() == FALSE) {
+ BT_ERR("BT tethering is not enabled");
+ goto fail;
+ }
}
}
#include <glib.h>
#include <dlog.h>
#include <string.h>
-#include <mime_type.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib.h>
#include <dlog.h>
#include <string.h>
-#include <mime_type.h>
#include <glib.h>
#include <gio/gio.h>
GError *err = NULL;
GDBusConnection *g_conn;
GDBusProxy *client_proxy;
- gchar *mime_type = NULL;
+ char *mime_type = NULL;
if (sending_info == NULL)
return;
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"
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");
const char *agent_path);
void (*bt_destroy_popup_all)(void);
gboolean (*bt_launch_unable_to_pairing_syspopup)(int result);
+ gboolean (*bt_is_tethering_enabled)(void);
+ int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
typedef struct {
void (*bt_destroy_popup_all)(void);
gboolean (*bt_launch_unable_to_pairing_syspopup)(int result);
+ gboolean (*bt_is_tethering_enabled)(void);
+ int (*bt_get_mime_type)(char *file_name, char **mime_type);
};
#ifdef TIZEN_FEATURE_BT_DPM
Name: bluetooth-frwk
Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
-Version: 0.2.157
+Version: 0.2.158
Release: 1
Group: Network & Connectivity/Bluetooth
License: Apache-2.0
eventsystem
syspopup-caller
capi-system-info
+ capi-network-tethering
+ capi-content-mime-type
)
FOREACH(flag ${pkgs_headed_CFLAGS})
#include <syspopup_caller.h>
#include <bundle.h>
#include <bundle_internal.h>
+#include <tethering.h>
+#include <mime_type.h>
#include "plugin.h"
#include "bluetooth-api.h"
}
+gboolean bt_is_tethering_enabled(void)
+{
+ BT_DBG("+");
+
+ tethering_h tethering = NULL;
+ bool enabled = FALSE;
+ int ret;
+
+ ret = tethering_create(&tethering);
+
+ if (ret != TETHERING_ERROR_NONE) {
+ BT_ERR("Fail to create tethering: %d", ret);
+ return FALSE;
+ }
+
+ enabled = tethering_is_enabled(tethering, TETHERING_TYPE_BT);
+
+ if (enabled != true)
+ BT_ERR("BT tethering is not enabled");
+
+ ret = tethering_destroy(tethering);
+
+ if (ret != TETHERING_ERROR_NONE)
+ BT_ERR("Fail to destroy tethering: %d", ret);
+
+ return (gboolean)enabled;
+}
+
+int bt_get_mime_type(char *file_name, char **mime_type)
+{
+ BT_DBG("+");
+
+ int ret = MIME_TYPE_ERROR_NONE;
+
+ if (file_name == NULL)
+ return BLUETOOTH_ERROR_INVALID_PARAM;
+
+ ret = mime_type_get_mime_type(file_name, (gchar **)mime_type);
+
+ if (ret != MIME_TYPE_ERROR_NONE) {
+ BT_ERR("Fail to get mime type: %d", ret);
+ return BLUETOOTH_ERROR_INTERNAL;
+ }
+
+ return BLUETOOTH_ERROR_NONE;
+}
+
void bt_destroy_popup_all(void)
{
syspopup_destroy_all();
#endif
bt_launch_system_popup,
bt_destroy_popup_all,
- bt_launch_unable_to_pairing_syspopup
+ bt_launch_unable_to_pairing_syspopup,
+ bt_is_tethering_enabled,
+ bt_get_mime_type
};
-
-
-
-
-
-
-
-
-
-
-
-