CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-IF (TIZEN_WEARABLE OR TIZEN_PROFILE_IVI)
+IF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
ADD_SUBDIRECTORY(hf-agent)
-ELSE (TIZEN_WEARABLE OR TIZEN_PROFILE_IVI)
+ELSE (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
ADD_SUBDIRECTORY(map-agent)
ADD_SUBDIRECTORY(pb-agent)
-IF (TIZEN_BT_HFP_AG_ENABLE)
+IF (TIZEN_FEATURE_BT_HFP_AG)
ADD_SUBDIRECTORY(ag-agent)
-ENDIF (TIZEN_BT_HFP_AG_ENABLE)
-ENDIF (TIZEN_WEARABLE OR TIZEN_PROFILE_IVI)
+ENDIF (TIZEN_FEATURE_BT_HFP_AG)
+ENDIF (TIZEN_PROFILE_WEARABLE OR TIZEN_PROFILE_IVI)
static guint hf_bluez_id;
static guint hs_bluez_id;
static guint app_id;
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
static int media_sig_id = -1;
static int media_state_sig_id = -1;
static bt_ag_media_transport_state_t transport_state;
#define HSP_AG_UUID "00001112-0000-1000-8000-00805f9b34fb"
#define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
#define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb"
#endif
#define DEFAULT_ADAPTER_OBJECT_PATH "/org/bluez/hci0"
-#ifdef TIZEN_SUPPORT_LUNAR_DEVICE
+#ifdef TIZEN_FEATURE_BT_LUNAR_DEVICE
#define VCONF_KEY_BT_LUNAR_ENABLED "db/wms/bt_loop_device_hfp_connected"
#endif
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
#define CALL_APP_ID "org.tizen.call-ui"
#endif
#if defined(TIZEN_SUPPORT_DUAL_HF)
gboolean __bt_ag_agent_is_companion_device(const char *addr)
{
-#if defined(TIZEN_WEARABLE)
+#if defined(TIZEN_PROFILE_WEARABLE)
char *host_device_address = NULL;
host_device_address = vconf_get_str(VCONF_KEY_BT_HOST_BT_MAC_ADDR);
if (NULL == callapp_type)
return FALSE;
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
*callapp_type = BT_VOICE_CALL;
FN_END;
return TRUE;
if (NULL == condition)
return FALSE;
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
*condition = BT_MO_ONLY_UNLOCKED;
FN_END;
return TRUE;
#endif
}
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_TELEPHONY_ENABLED)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_TELEPHONY_ENABLED)
static gboolean __bt_ag_agent_launch_call_app(const char *number)
{
FN_START;
{
FN_START;
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
FN_END;
return __bt_ag_agent_launch_call_app(number);
#else
DBG("Value = %d", chld_value);
DBG("Sender = %s", sender);
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
/* Check if AG supports (i.e. ag_chld_str = "0,1,2") the requested CHLD;
if not return FALSE */
if (chld_value != 0 && chld_value != 1 && chld_value != 2)
FN_END;
}
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
static gboolean __bt_ag_agent_launch_voice_dial(gboolean activate)
{
FN_START;
uint32_t codec;
struct ag_codec *data = g_new0(struct ag_codec, 1);
-#ifdef TIZEN_KIRAN
+#ifdef TIZEN_FEATURE_BT_KIRAN_DEVICE
codec = BT_CVSD_CODEC_ID;
#else
if (hs->codec_info.remote_codecs & BT_MSBC_CODEC_MASK)
if (hs->state != HEADSET_STATE_CONNECTED)
return BT_HFP_AGENT_ERROR_NOT_CONNECTED;
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
_bt_ag_agent_check_transport_state();
#endif
_bt_hfp_set_property_value("SignalBarsChanged", signal_bar);
}
-#ifdef TIZEN_SUPPORT_LUNAR_DEVICE
+#ifdef TIZEN_FEATURE_BT_LUNAR_DEVICE
static void __bt_ag_agent_lunar_connection_status_cb(keynode_t *node)
{
gboolean status = vconf_keynode_get_bool(node);
if (0 != ret) {
ERR("Subsrciption to network failed err = [%d]\n", ret);
}
-#ifdef TIZEN_SUPPORT_LUNAR_DEVICE
+#ifdef TIZEN_FEATURE_BT_LUNAR_DEVICE
ret = vconf_notify_key_changed(VCONF_KEY_BT_LUNAR_ENABLED,
(void *)__bt_ag_agent_lunar_connection_status_cb, NULL);
if (0 != ret) {
if (name_owner_sig_id != -1)
g_dbus_connection_signal_unsubscribe(ag_dbus_conn,
name_owner_sig_id);
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
if (media_sig_id != -1)
g_dbus_connection_signal_unsubscribe(ag_dbus_conn,
media_sig_id);
}
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
void _bt_ag_agent_check_transport_state(void)
{
FN_START;
owner_sig_id = g_dbus_connection_signal_subscribe(ag_dbus_conn,
NULL, BT_MANAGER_INTERFACE, NULL, NULL, NULL, 0,
__bt_ag_agent_filter_cb, NULL, NULL);
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
media_sig_id = g_dbus_connection_signal_subscribe(ag_dbus_conn,
NULL, BT_PROPERTIES_INTERFACE, NULL, NULL,
NULL, 0, __bt_ag_agent_media_filter_cb,
BT_AG_FEATURE_REJECT_CALL |
BT_AG_FEATURE_ENHANCED_CALL_STATUS |
BT_AG_FEATURE_THREE_WAY_CALL |
-#ifndef TIZEN_KIRAN
+#ifndef TIZEN_FEATURE_BT_KIRAN_DEVICE
BT_AG_FEATURE_VOICE_RECOGNITION |
#endif
BT_AG_FEATURE_EXTENDED_ERROR_RESULT_CODES;
wbs_en = TRUE;
-#if defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_FEATURE_BT_HFP_AG)
hfp_ver = HFP_VERSION_1_6;
#else
hfp_ver = HFP_VERSION_1_5;
#define TELEPHONY_APP_INTERFACE "org.tizen.csd.Call.Instance"
#define BT_HEADSET_INTERFACE "org.bluez.Headset"
#define BT_ADAPTER_INTERFACE "org.bluez.Adapter1"
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
#define BT_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
#define BLUEZ_MEDIA_TRANSPORT_INTERFACE "org.bluez.MediaTransport1"
#define BLUEZ_MEDIA_ENDPOINT_INTERFACE "org.bluez.MediaEndpoint1"
BT_AGENT_NETWORK_REG_STATUS_REGISTERED_CSFB_ROAMING,
} bt_hfp_agent_reg_status_t;
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
typedef enum media_transport_state {
MEDIA_TRANSPORT_STATE_DISCONNECTED,
MEDIA_TRANSPORT_STATE_IDLE,
void _bt_ag_agent_get_revision_information(void *device);
bt_hfp_agent_error_t _bt_ag_agent_vendor_cmd(const gchar *cmd,
const gchar *path, const gchar *sender);
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
void _bt_ag_agent_check_transport_state(void);
#endif
"\"UTF-8\"", "\"IRA\""
};
-#if defined(TIZEN_WEARABLE) && defined(TIZEN_BT_HFP_AG_ENABLE)
+#if defined(TIZEN_PROFILE_WEARABLE) && defined(TIZEN_FEATURE_BT_HFP_AG)
static const char *ag_chld_str = "0,1,2";
#else
static const char *ag_chld_str = "0,1,2,3";
{
bt_ag_indicators_t *hf_ind = NULL;
int i;
-#ifdef TIZEN_MEDIA_ENHANCE
+#ifdef TIZEN_FEATURE_BT_MEDIA_ENHANCE
if (g_strcmp0(indicator_name,
HFP_AGENT_CALLSETUP_INDICATOR) == 0)
_bt_ag_agent_check_transport_state();
static int __bt_hfp_get_phonebook_count(const char *path, uint32_t *max_size,
uint32_t *used)
{
-#ifndef TIZEN_WEARABLE
+#ifndef TIZEN_PROFILE_WEARABLE
GDBusConnection *g_conn;
GDBusProxy *g_proxy;
GError *err = NULL;
static int __bt_hfp_get_phonebook_entries(int start_index, int end_index)
{
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
int count = 0;
#else
GDBusConnection *g_conn;
BT_HF_FEATURE_REMOTE_VOLUME_CONTROL |
BT_HF_FEATURE_ENHANCED_CALL_STATUS;
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
feature = feature | BT_HF_FEATURE_CODEC_NEGOTIATION;
#endif
return FALSE;
INFO("Gateway supported features are 0x%X", bt_hf_info->ag_features);
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
if (bt_hf_info->ag_features & BT_AG_FEATURE_CODEC_NEGOTIATION) {
ret = _hf_agent_codec_setup(bt_hf_info->remote_addr, BT_HF_CODEC_ID_MSBC);
if (ret != BT_HF_AGENT_ERROR_NONE)
BT_HF_FEATURE_ENHANCED_CALL_STATUS |
BT_HF_FEATURE_CODEC_NEGOTIATION;
-#ifdef TIZEN_WEARABLE
+#ifdef TIZEN_PROFILE_WEARABLE
hf_features = hf_features | BT_HF_FEATURE_CODEC_NEGOTIATION;
#endif
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
-#export CFLAGS="$CFLAGS -DTIZEN_MEDIA_ENHANCE"
-export CFLAGS="$CFLAGS -DTIZEN_BT_HFP_AG_ENABLE"
+#export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_MEDIA_ENHANCE"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HFP_AG"
%ifarch aarch64
echo arch64
%endif
%if "%{?profile}" == "wearable"
-export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
-export CFLAGS="$CFLAGS -DTIZEN_SUPPORT_LUNAR_DEVICE"
+export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_LUNAR_DEVICE"
%else
-export CFLAGS="$CFLAGS -DTIZEN_KIRAN"
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_KIRAN_DEVICE"
%endif
%if "%{?profile}" == "ivi"
export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
%endif
-export CFLAGS+=" -fpie -DPBAP_SIM_ENABLE -fvisibility=hidden "
-export CXXFLAGS+=" -fpie -DPBAP_SIM_ENABLE -fvisibility=hidden "
+export CFLAGS+=" -fpie -DTIZEN_FEATURE_BT_PBAP_SIM -fvisibility=hidden "
+export CXXFLAGS+=" -fpie -DTIZEN_FEATURE_BT_PBAP_SIM -fvisibility=hidden "
export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
cmake . -DCMAKE_INSTALL_PREFIX=/usr \
%if "%{?profile}" == "wearable"
- -DTIZEN_WEARABLE=1 \
+ -DTIZEN_PROFILE_WEARABLE=1 \
%else
- -DTIZEN_WEARABLE=0 \
+ -DTIZEN_PROFILE_WEARABLE=0 \
%endif
%if "%{?profile}" == "ivi"
-DTIZEN_PROFILE_IVI=1 \
%endif
- -DTIZEN_BT_HFP_AG_ENABLE=1
+ -DTIZEN_FEATURE_BT_HFP_AG=1
make VERBOSE=1
"/telecom/och",
"/telecom/mch",
"/telecom/cch",
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
"/SIM1/telecom/pb",
#endif
NULL
}
/* for owner */
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
if (pb_type == TELECOM_PB || pb_type == SIM_PB)
count++;
#else
contacts_record_destroy(record, TRUE);
break;
}
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
case SIM_PB:
if (handle == 0) {
str = _bluetooth_pb_vcard_contact_owner(agent->tel_number,
if (g_strcmp0(name, "\"MC\"") == 0)
return TELECOM_MCH;
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
if (g_strcmp0(name, "\"SM\"") == 0)
return SIM_PB;
#endif
case TELECOM_CCH:
query = __bluetooth_pb_query_phone_log_combined();
break;
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
case SIM_PB:
query = __bluetooth_pb_query_person(PBAP_ADDRESSBOOK_SIM);
break;
switch (pb_type) {
case TELECOM_PB:
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
case SIM_PB:
#endif
/* for owner */
if (pb_type == TELECOM_PB)
query = __bluetooth_pb_query_person(PBAP_ADDRESSBOOK_PHONE);
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
else if (pb_type == SIM_PB)
query = __bluetooth_pb_query_person(PBAP_ADDRESSBOOK_SIM);
#endif
query = __bluetooth_pb_query_phone_log_combined();
__bluetooth_pb_get_phone_log_list(agent, query, builder);
break;
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
case SIM_PB:
query = __bluetooth_pb_query_person(PBAP_ADDRESSBOOK_SIM);
__bluetooth_pb_get_contact_list(agent, query, builder);
__bluetooth_pb_get_phone_log_list_number(agent, query,
start_index, end_index, builder);
break;
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
case SIM_PB:
query = __bluetooth_pb_query_person(PBAP_ADDRESSBOOK_SIM);
__bluetooth_pb_get_contact_list_number(agent, query,
TELECOM_OCH,
TELECOM_MCH,
TELECOM_CCH,
-#ifdef PBAP_SIM_ENABLE
+#ifdef TIZEN_FEATURE_BT_PBAP_SIM
SIM_PB,
#endif
TELECOM_NONE