dev_addr += 4;
g_strlcpy(address, dev_addr, sizeof(address));
- while ((pos = strchr(address, '_')) != NULL) {
+ while ((pos = strchr(address, '_')) != NULL)
*pos = ':';
- }
g_strlcpy(device_address, address, BT_ADDRESS_STRING_SIZE);
}
ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
(void *)__bt_ag_agent_battery_status_cb, NULL);
- if (0 != ret) {
+ if (0 != ret)
ERR("Subsrciption to battery status failed err = [%d]\n", ret);
- }
ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_RSSI,
(void *)__bt_ag_agent_network_signal_status_cb, NULL);
- if (0 != ret) {
+ if (0 != ret)
ERR("Subsrciption to netowrk signal failed err = [%d]\n", ret);
- }
ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
(void *)__bt_ag_agent_network_register_status_cb, NULL);
- if (0 != ret) {
+ if (0 != ret)
ERR("Subsrciption to network failed err = [%d]\n", ret);
- }
+
#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 (0 != ret)
ERR("Subsrciption to lunar connection failed err = [%d]\n", ret);
- }
+
#endif
}
ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
(vconf_callback_fn)__bt_ag_agent_battery_status_cb);
- if (0 != ret) {
+ if (0 != ret)
ERR("vconf_ignore_key_changed failed\n");
- }
ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_RSSI,
(vconf_callback_fn)__bt_ag_agent_network_signal_status_cb);
- if (0 != ret) {
+ if (0 != ret)
ERR("vconf_ignore_key_changed failed\n");
- }
ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
(vconf_callback_fn)__bt_ag_agent_network_register_status_cb);
- if (0 != ret) {
+ if (0 != ret)
ERR("vconf_ignore_key_changed failed\n");
- }
}
static gboolean __bt_ag_agent_send_subscriber_number_changed(
return EXIT_FAILURE;
}
- if (pthread_detach(thread_id) < 0) {
+ if (pthread_detach(thread_id) < 0)
ERR("pthread_detach() is failed");
- }
g_main_loop_run(gmain_loop);
int len = strlen(buf);
DBG_SECURE("Buf %s", buf);
- if (len == 7) {
+ if (len == 7)
_bt_hfp_get_imsi_req(device);
- } else {
+ else
_bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
- }
return 0;
}
DBG_SECURE("buf %s", buf);
if (len < 7 || len > 9)
return -EINVAL;
- else if (len == 7) {
+ else if (len == 7)
_bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
- } else if (buf[7] == '=') {
+ else if (buf[7] == '=')
_bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
- } else if (buf[7] == '?') {
+ else if (buf[7] == '?')
_bt_hfp_get_creg_status_req(device);
- }
+
return 0;
}
int _bt_hfp_get_revision_info_rsp(void *t_device, char *revision,
int _bt_hfp_vendor_cmd(bt_ag_info_t *hs, const char *buf);
int _bt_hfp_send_vendor_cmd(bt_ag_info_t *hs,
const char *cmd);
-int _bt_vendor_cmd_response(void *t_device,
- bt_hfp_agent_error_t err);
\ No newline at end of file
+int _bt_vendor_cmd_response(void *t_device, bt_hfp_agent_error_t err);
__bt_hfp_modify_indicator("call",
INDICATOR_EVENT_CALL_INACTIVE);
- if (org_status == HFP_CALL_STATUS_HOLD) {
+ if (org_status == HFP_CALL_STATUS_HOLD)
__bt_hfp_modify_indicator("callheld", INDICATOR_EVENT_CALLHELD_NONE);
- }
if ((org_status == HFP_CALL_STATUS_MO_ALERTING) ||
(org_status == HFP_CALL_STATUS_COMING) ||
if (ret == TRUE)
_bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_NONE);
- else {
+ else
_bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE);
- }
}
void _bt_hfp_key_press_request(const char *t_key_press, void *t_device)
gboolean pending = FALSE;
GIOChannel *io_chan = bt_hf_info->io_chan;
- if (send_flag) {
+ if (send_flag)
pending = TRUE;
- }
+
__bt_hf_agent_add_queue(bt_hf_info->context, data, count, pending);
if (pending)
if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
DBG("BT device state is : 0x%X", bt_device_state);
bt_device_state |= VCONFKEY_BT_DEVICE_AG_CONNECTED;
- if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+ if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
ERR("vconf_set_int failed");
- }
} else {
ERR("vconf_get_int failed");
}
if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
DBG("BT device state is : 0x%X", bt_device_state);
bt_device_state |= VCONFKEY_BT_DEVICE_AG_CONNECTED;
- if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+
+ if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
ERR("vconf_set_int failed");
- }
} else {
ERR("vconf_get_int failed");
}
if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
DBG("BT device state is : 0x%X", bt_device_state);
bt_device_state ^= VCONFKEY_BT_DEVICE_AG_CONNECTED;
- if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+
+ if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
ERR("vconf_set_int failed");
- }
} else {
ERR("vconf_get_int failed");
}
map_folder = "OUTBOX";
} else if (!g_ascii_strncasecmp(alias, "[gmail]", strlen("[gmail]"))) {
DBG("GMAIL Folders");
- if (!g_ascii_strncasecmp(alias, "[Gmail]/Drafts", strlen("[Gmail]/Drafts"))) {
+ if (!g_ascii_strncasecmp(alias, "[Gmail]/Drafts", strlen("[Gmail]/Drafts")))
map_folder = "DRAFT";
- } else if (!g_ascii_strncasecmp(alias, "[Gmail]/Sent", strlen("[Gmail]/Sent"))) {
+ else if (!g_ascii_strncasecmp(alias, "[Gmail]/Sent", strlen("[Gmail]/Sent")))
map_folder = "SENT";
- } else if (!g_ascii_strncasecmp(alias, "[Gmail]/Trash", strlen("[Gmail]/Trash"))) {
+ else if (!g_ascii_strncasecmp(alias, "[Gmail]/Trash", strlen("[Gmail]/Trash")))
map_folder = "DELETED";
- }
}
DBG("Equivalent MAP Folder for Alias: %s", map_folder);
msg_struct_t addr_info = NULL;
ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_ID_INT, &msg_id);
- if (ret != MSG_SUCCESS) {
+ if (ret != MSG_SUCCESS)
ERR("Could not get Message ID");
- }
uid = _bt_add_id(msg_id, BT_MAP_ID_SMS);
#ifdef ARCH64
ret = msg_get_int_value(msg_struct_handle,
MSG_MESSAGE_DISPLAY_TIME_INT, (int *)&dptime);
- if (ret == MSG_SUCCESS) {
+ if (ret == MSG_SUCCESS)
_get_msg_timestamp(&dptime, msg_datetime);
- }
+
DBG("Got date time: %s", msg_datetime);
msg_info->datetime = g_strdup(msg_datetime);
ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_TYPE_INT,
&m_type);
- if (ret == MSG_SUCCESS) {
+ if (ret == MSG_SUCCESS)
DBG("m_type %d\n", m_type);
- }
msg_info->type = g_strdup("SMS_GSM");
}
}
- if (is_duplicated == FALSE) {
+ if (is_duplicated == FALSE)
contacts_svc_insert_contact(0, contact_record);
- }
} else {
ERR("Fail \n");
}
tapi_result = tel_get_sim_msisdn(agent->tapi_handle,
__bluetooth_pb_tel_callback, agent);
- if (tapi_result != TAPI_API_SUCCESS) {
+ if (tapi_result != TAPI_API_SUCCESS)
__bt_pb_dbus_init(agent);
- }
__bluetooth_pb_agent_timeout_add_seconds(agent);
stat_info.st_size = 0;
- if (0 > stat(filename, &stat_info)) {
+ if (0 > stat(filename, &stat_info))
ERR("fstat failed, file does not exist %s", filename);
- }
if (PBAP_THUMB_FILE_SIZE > stat_info.st_size) {
DBG_SECURE("File size small, so use thubnail %s\n", filename);
res = image_util_foreach_supported_jpeg_colorspace(
__bt_pbap_image_util_supported_jpeg_colorspace_cb, &img_info);
- if (res != IMAGE_UTIL_ERROR_NONE) {
+
+ if (res != IMAGE_UTIL_ERROR_NONE)
ERR("Image resizing is failed");
- }
+
FN_END;
}