summaryrefslogtreecommitdiff
path: root/src/bluetooth-pan.c
diff options
context:
space:
mode:
authorDoHyun Pyun <dh79.pyun@samsung.com>2015-06-04 21:05:05 +0900
committerDoHyun Pyun <dh79.pyun@samsung.com>2015-06-04 21:33:09 +0900
commit9d2b962543a59a9964e00d05dc1e848695e3f5a1 (patch)
tree309fc893d27569b7c680433006e530287b95f1fe /src/bluetooth-pan.c
parent63f146253b13e8033383f162dc3f3cbc87d22f04 (diff)
downloadbluetooth-9d2b962543a59a9964e00d05dc1e848695e3f5a1.tar.gz
bluetooth-9d2b962543a59a9964e00d05dc1e848695e3f5a1.tar.bz2
bluetooth-9d2b962543a59a9964e00d05dc1e848695e3f5a1.zip
Change-Id: Ib32b4795e0d44e7ac4092a078b6567719205c34b Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Diffstat (limited to 'src/bluetooth-pan.c')
-rw-r--r--[-rwxr-xr-x]src/bluetooth-pan.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/bluetooth-pan.c b/src/bluetooth-pan.c
index 052d404..d177add 100755..100644
--- a/src/bluetooth-pan.c
+++ b/src/bluetooth-pan.c
@@ -24,12 +24,22 @@
#include "bluetooth.h"
#include "bluetooth_private.h"
-GList *sending_files;
+#ifdef TIZEN_PAN_DISABLE
+#define BT_CHECK_PAN_SUPPORT() \
+ { \
+ BT_CHECK_BT_SUPPORT(); \
+ LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \
+ return BT_ERROR_NOT_SUPPORTED; \
+ }
+#else
+#define BT_CHECK_PAN_SUPPORT()
+#endif
int bt_nap_activate(void)
{
int error = BT_ERROR_NONE;
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
error = bluetooth_network_activate_server();
error = _bt_get_error_code(error);
@@ -43,6 +53,7 @@ int bt_nap_deactivate(void)
{
int error = BT_ERROR_NONE;
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
error = bluetooth_network_deactivate_server();
error = _bt_get_error_code(error);
@@ -58,6 +69,7 @@ int bt_nap_disconnect_all(void)
{
int error = BT_ERROR_NONE;
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
error = bluetooth_network_deactivate_server();
error = _bt_get_error_code(error);
@@ -75,6 +87,7 @@ int bt_nap_disconnect(const char *remote_address)
int error = BT_ERROR_INVALID_PARAMETER;
bluetooth_device_address_t addr_hex = { {0,} };
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
_bt_convert_address_to_hex(&addr_hex, remote_address);
@@ -91,6 +104,7 @@ int bt_nap_set_connection_state_changed_cb(
bt_nap_connection_state_changed_cb callback,
void *user_data)
{
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_NAP_CONNECTION_STATE_CHANGED, callback, user_data);
@@ -108,6 +122,7 @@ int bt_panu_set_connection_state_changed_cb(
bt_panu_connection_state_changed_cb callback,
void *user_data)
{
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_PAN_CONNECTION_STATE_CHANGED, callback, user_data);
@@ -125,6 +140,7 @@ int bt_panu_connect(const char *remote_address, bt_panu_service_type_e type)
int error = BT_ERROR_INVALID_PARAMETER;
bluetooth_device_address_t addr_hex = { {0,} };
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
_bt_convert_address_to_hex(&addr_hex, remote_address);
@@ -145,6 +161,7 @@ int bt_panu_disconnect(const char *remote_address)
int error = BT_ERROR_INVALID_PARAMETER;
bluetooth_device_address_t addr_hex = { {0,} };
+ BT_CHECK_PAN_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
_bt_convert_address_to_hex(&addr_hex, remote_address);