#include <vconf.h>
#include <bundle_internal.h>
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
#include <tethering.h>
+#endif
#include "bt-internal-types.h"
#include "bt-service-common.h"
#include "bt-service-device.h"
#include "bt-service-audio.h"
-#ifdef TIZEN_FEATURE_BT_DPM
+#ifdef TIZEN_DPM_ENABLE
#include "bt-service-dpm.h"
#endif
GVariant *reply_temp = NULL;
GVariant *tmp_value;
char pin_code[BLUETOOTH_PIN_CODE_MAX_LENGTH + 1];
-#ifdef TIZEN_FEATURE_BT_DPM
- int pairing_state = DPM_STATUS_ERROR;
-#endif
BT_DBG("+");
-#ifdef TIZEN_FEATURE_BT_DPM
- _bt_dpm_get_bluetooth_pairing_state(&pairing_state);
- if (pairing_state == DPM_RESTRICTED) {
+#ifdef TIZEN_DPM_ENABLE
+ if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) {
BT_ERR("Not allow to pair the device");
gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL);
__bt_agent_release_memory();
GVariant *reply = NULL;
GVariant *reply_temp = NULL;
GVariant *tmp_value;
-#ifdef TIZEN_FEATURE_BT_DPM
- int pairing_state = DPM_STATUS_ERROR;
-#endif
-
BT_DBG("+");
-#ifdef TIZEN_FEATURE_BT_DPM
- _bt_dpm_get_bluetooth_pairing_state(&pairing_state);
- if (pairing_state == DPM_RESTRICTED) {
+#ifdef TIZEN_DPM_ENABLE
+ if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) {
BT_ERR("Not allow to pair the device");
gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL);
__bt_agent_release_memory();
GVariant *reply_temp = NULL;
GVariant *reply = NULL;
GVariant *tmp_value;
-#ifdef TIZEN_FEATURE_BT_DPM
- int pairing_state = DPM_STATUS_ERROR;
-#endif
BT_DBG("+ passkey[%.6d]", passkey);
-#ifdef TIZEN_FEATURE_BT_DPM
- _bt_dpm_get_bluetooth_pairing_state(&pairing_state);
- if (pairing_state == DPM_RESTRICTED) {
+#ifdef TIZEN_DPM_ENABLE
+ if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) {
BT_ERR("Not allow to pair the device");
gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL);
__bt_agent_release_memory();
GVariant *reply = NULL;
GVariant *reply_temp = NULL;
GVariant *tmp_value;
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
bool enabled;
+ tethering_h tethering = NULL;
+#endif
int result = BLUETOOTH_ERROR_NONE;
int request_type = BT_AGENT_EVENT_AUTHORIZE_REQUEST;
- tethering_h tethering = NULL;
BT_DBG("+");
!strcasecmp(uuid, BNEP_UUID)) {
BT_DBG("Network connection request: %s", uuid);
- if (TIZEN_FEATURE_NETWORK_TETHERING_ENABLE) {
- if (nap_connected_device_count >=
- BT_PAN_MAX_CONNECTION) {
- BT_ERR("Max connection exceeded");
- goto fail;
- }
- int ret;
- ret = tethering_create(&tethering);
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
+ if (nap_connected_device_count >=
+ BT_PAN_MAX_CONNECTION) {
+ 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;
- }
+ if (ret != TETHERING_ERROR_NONE) {
+ BT_ERR("Fail to create tethering: %d", ret);
+ goto fail;
+ }
- enabled = tethering_is_enabled(tethering, TETHERING_TYPE_BT);
+ enabled = tethering_is_enabled(tethering, TETHERING_TYPE_BT);
- ret = tethering_destroy(tethering);
+ ret = tethering_destroy(tethering);
- if (ret != TETHERING_ERROR_NONE)
- BT_ERR("Fail to create tethering: %d", ret);
+ 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 (enabled != true) {
+ BT_ERR("BT tethering is not enabled");
+ goto fail;
}
+#endif
gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT,
NULL);
goto done;
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
fail:
gap_agent_reply_authorize(agent, GAP_AGENT_REJECT,
NULL);
goto done;
+#endif
}
reply_temp = __bt_service_getall(device, BT_DEVICE_INTERFACE);
goto done;
}
- /* TODO: MAP? see above */
if (_gap_agent_exist_osp_server(agent, BT_RFCOMM_SERVER,
(char *)uuid) == TRUE) {
request_type = BT_AGENT_EVENT_PBAP_REQUEST;
else if (!strcasecmp(uuid, MAP_UUID))
request_type = BT_AGENT_EVENT_MAP_REQUEST;
- /* TODO: MAP is already here */
if (trust) {
BT_INFO("Trusted device, so authorize\n");