ADD_SUBDIRECTORY(bt-api)
-IF("$ENV{CFLAGS}" MATCHES "-DEMUL")
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_TEST_EMUL")
ADD_SUBDIRECTORY(bt-service-emul)
ELSE()
ADD_SUBDIRECTORY(bt-service)
return result;
}
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
gboolean __bluetooth_is_privileged_process(void)
{
FILE *fp = NULL;
BT_CHECK_ENABLED_ANY(return);
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
use_reserved_slot = __bluetooth_is_privileged_process();
#endif
BT_CHECK_ENABLED_ANY(return);
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
use_reserved_slot = __bluetooth_is_privileged_process();
#endif
if (length > BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX - 3)
return BLUETOOTH_ERROR_INVALID_PARAM;
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
use_reserved_slot = __bluetooth_is_privileged_process();
#endif
if (length > BLUETOOTH_SCAN_RESP_DATA_LENGTH_MAX)
return BLUETOOTH_ERROR_INVALID_PARAM;
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
use_reserved_slot = __bluetooth_is_privileged_process();
#endif
{
int value = VCONFKEY_BT_STATUS_OFF;
-#ifndef EMUL
+#ifndef TIZEN_TEST_EMUL
int ret;
ret = _bt_get_adapter_path(_bt_gdbus_get_system_gconn(), NULL);
BT_CHECK_PARAMETER(discoverable_mode_ptr, return);
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
int timeout = 0;
/* Requirement in OSP */
if (bluetooth_check_adapter() == BLUETOOTH_ADAPTER_DISABLED) {
const char *interface, const char *method,
GError **err, GVariant *parameters)
{
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
int timeout = 4000;
#else
int timeout = -1;
return BLUETOOTH_TELEPHONY_ERROR_NONE;
}
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
static void __bluetooth_telephony_init_headset_state(void)
{
GVariant *reply;
goto fail;
}
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
__bluetooth_telephony_init_headset_state();
#endif
g_variant_get(reply, "(b)", &status);
g_variant_unref(reply);
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
if (status == TRUE && telephony_info.headset_state != BLUETOOTH_STATE_PLAYING)
telephony_info.headset_state = BLUETOOTH_STATE_PLAYING;
#endif
gboolean _bt_core_is_flight_mode_enabled(void)
{
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
int isFlightMode = 0;
int ret = -1;
}
}
}
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
static void __bt_core_flight_mode_cb(keynode_t *node, void *data)
{
gboolean flight_mode = FALSE;
}
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifdef ENABLE_TIZEN_2_4
static void __bt_core_power_saving_mode_cb(keynode_t *node, void *data)
{
flight_mode = _bt_core_is_flight_mode_enabled();
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifndef ENABLE_TIZEN_2_4
if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_saving_mode) != 0)
BT_ERR("Fail to get the power_saving_mode status value");
void _bt_core_handle_flight_mode_noti(void)
{
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
int ret;
BT_DBG("+");
void _bt_core_handle_power_saving_mode_noti(void)
{
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
int ret = 0;
BT_DBG("+");
void _bt_core_unregister_vconf_handler(void)
{
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
(vconf_callback_fn)__bt_core_flight_mode_cb);
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifdef ENABLE_TIZEN_2_4
vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE,
(vconf_callback_fn)__bt_core_power_saving_mode_cb);
# install booting script
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf)
-IF (TIZEN_WEARABLE)
+IF (TIZEN_PROFILE_WEARABLE)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/wearable/stack_info DESTINATION /usr/etc/bluetooth/)
ELSE ()
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mobile/stack_info DESTINATION /usr/etc/bluetooth/)
-ENDIF (TIZEN_WEARABLE)
+ENDIF (TIZEN_PROFILE_WEARABLE)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf DESTINATION /etc/dbus-1/system.d)
visible_timer.event_id = 0;
visible_timer.timeout = 0;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
BT_ERR("Set vconf failed\n");
#endif
visible_timer.event_id = 0;
visible_timer.timeout = 0;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
BT_ERR("Set vconf failed\n");
#endif
visible_timer.timeout = timeout;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_set_int(BT_FILE_VISIBLE_TIME, timeout) != 0)
BT_ERR("Set vconf failed");
#endif
}
}
-#ifdef TIZEN_MOBILE
+#ifdef TIZEN_PROFILE_MOBILE
static void __bt_set_visible_mode(void)
{
int timeout = 0;
BT_DBG("+");
int result = BLUETOOTH_ERROR_NONE;
-#ifdef TIZEN_MOBILE
+#ifdef TIZEN_PROFILE_MOBILE
__bt_set_visible_mode();
#else
#ifdef TIZEN_TV
g_variant_new_int32(result));
}
-#if defined(TIZEN_BT_FLIGHTMODE_ENABLED) || (!defined(TIZEN_WEARABLE) && defined(ENABLE_TIZEN_2_4))
+#if defined(TIZEN_FEATURE_FLIGHTMODE_ENABLED) || (!defined(TIZEN_PROFILE_WEARABLE) && defined(ENABLE_TIZEN_2_4))
static void __bt_service_flight_ps_mode_cb(keynode_t *node, void *data)
{
gboolean flight_mode = FALSE;
{
BT_DBG("+");
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
if (vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb, NULL) < 0)
BT_ERR("Unable to register key handler");
BT_DBG("Telephony is disabled");
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifdef ENABLE_TIZEN_2_4
if (vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb, NULL) < 0)
{
BT_DBG("+");
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb);
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifdef ENABLE_TIZEN_2_4
vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb);
storage
)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_NETWORK_TETHERING_ENABLE")
+IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE")
SET(PKG_MODULES ${PKG_MODULES}
capi-network-tethering
)
# install booting script
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf)
-IF (TIZEN_WEARABLE)
+IF (TIZEN_PROFILE_WEARABLE)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/wearable/stack_info DESTINATION /usr/etc/bluetooth/)
ELSE ()
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mobile/stack_info DESTINATION /usr/etc/bluetooth/)
-ENDIF (TIZEN_WEARABLE)
+ENDIF (TIZEN_PROFILE_WEARABLE)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf DESTINATION /etc/dbus-1/system.d)
visible_timer.event_id = 0;
visible_timer.timeout = 0;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
BT_ERR("Set vconf failed\n");
#endif
visible_timer.event_id = 0;
visible_timer.timeout = 0;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
BT_ERR("Set vconf failed\n");
#endif
visible_timer.timeout = timeout;
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#ifdef TIZEN_DPM_ENABLE
if (_bt_dpm_get_bluetooth_limited_discoverable_state() != DPM_RESTRICTED) {
#endif
}
}
-#ifdef TIZEN_MOBILE
+#ifdef TIZEN_PROFILE_MOBILE
static void __bt_set_visible_mode(void)
{
int timeout = 0;
return BLUETOOTH_ERROR_INTERNAL;
}
-#ifdef TIZEN_MOBILE
+#ifdef TIZEN_PROFILE_MOBILE
__bt_set_visible_mode();
#else
#ifdef TIZEN_TV
return BLUETOOTH_ERROR_NONE;
}
-#if defined(TIZEN_BT_FLIGHTMODE_ENABLED) || (!defined(TIZEN_WEARABLE))
+#if defined(TIZEN_FEATURE_FLIGHTMODE_ENABLED) || (!defined(TIZEN_PROFILE_WEARABLE))
static void __bt_service_flight_ps_mode_cb(keynode_t *node, void *data)
{
gboolean flight_mode = FALSE;
{
BT_DBG("+");
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
if (vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb, NULL) < 0)
BT_ERR("Unable to register key handler");
BT_DBG("Telephony is disabled");
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
if (vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb, NULL) < 0)
BT_ERR("Unable to register key handler");
{
BT_DBG("+");
-#ifdef TIZEN_BT_FLIGHTMODE_ENABLED
+#ifdef TIZEN_FEATURE_FLIGHTMODE_ENABLED
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb);
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE,
(vconf_callback_fn)__bt_service_flight_ps_mode_cb);
#endif
#include <vconf.h>
#include <bundle_internal.h>
-#ifdef TIZEN_NETWORK_TETHERING_ENABLE
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
#include <tethering.h>
#endif
GVariant *reply = NULL;
GVariant *reply_temp = NULL;
GVariant *tmp_value;
-#ifdef TIZEN_NETWORK_TETHERING_ENABLE
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
bool enabled;
tethering_h tethering = NULL;
#endif
!strcasecmp(uuid, BNEP_UUID)) {
BT_DBG("Network connection request: %s", uuid);
-#ifdef TIZEN_NETWORK_TETHERING_ENABLE
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
if (nap_connected_device_count >=
BT_PAN_MAX_CONNECTION) {
BT_ERR("Max connection exceeded");
gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT,
NULL);
goto done;
-#ifdef TIZEN_NETWORK_TETHERING_ENABLE
+#ifdef TIZEN_FEATURE_NETWORK_TETHERING_ENABLE
fail:
gap_agent_reply_authorize(agent, GAP_AGENT_REJECT,
NULL);
#include "bt-service-headset-connection.h"
#ifdef TIZEN_SUPPORT_DUAL_HF
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
#define VCONF_KEY_BT_HOST_BT_MAC_ADDR "db/wms/host_bt_mac"
#endif
#endif
#ifdef TIZEN_SUPPORT_DUAL_HF
gboolean __bt_is_companion_device(const char *addr)
{
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
char *host_device_address = NULL;
host_device_address = vconf_get_str(VCONF_KEY_BT_HOST_BT_MAC_ADDR);
BT_DBG("-");
} */
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
static gboolean __bt_syspopup_timer_cb(gpointer user_data)
{
int ret;
result == BLUETOOTH_ERROR_AUTHENTICATION_FAILED ||
result == BLUETOOTH_ERROR_TIMEOUT ||
result == BLUETOOTH_ERROR_HOST_DOWN) {
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
int is_sw_running = 0;
if (vconf_get_int(VCONFKEY_SETUP_WIZARD_STATE, &is_sw_running))
#define BT_MAX_EVENT_STR_LENGTH 50
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
#endif
#define BT_DPM_SYSPOPUP "dpm-syspopup"
#endif
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
#define BT_FILE_VISIBLE_TIME "file/private/libug-setting-bluetooth-efl/visibility_time"
#endif
%define _servicedir starter.target.wants
%if "%{?profile}" == "mobile"
-export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
%if "%{?tizen_target_name}" == "TM1"
%define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
%else
%endif
%if "%{?profile}" == "wearable"
-export CFLAGS="$CFLAGS -DTIZEN_WEARABLE -DTIZEN_BT_FLIGHTMODE_ENABLED"
+export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
%define _servicefile packaging/bluetooth-frwk-wearable.service
%define _servicedir multi-user.target.wants
%endif
export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
%if "%{?_with_emulator}" == "1"
-export CFLAGS="$CFLAGS -DEMUL"
-export CXXFLAGS="$CXXFLAGS -DEMUL"
-export FFLAGS="$FFLAGS -DEMUL"
+export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
+export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
%endif
cmake . -DCMAKE_INSTALL_PREFIX=/usr \
%cmake \
%if "%{?profile}" == "wearable"
- -DTIZEN_WEARABLE=YES \
+ -DTIZEN_PROFILE_WEARABLE=YES \
%else
- -DTIZEN_WEARABLE=NO \
+ -DTIZEN_PROFILE_WEARABLE=NO \
%endif
%if "%{?profile}" == "common"
- -DTIZEN_WEARABLE=NO \
+ -DTIZEN_PROFILE_WEARABLE=NO \
%endif
%install