X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ag-agent%2Fbluetooth-ag-manager.c;h=d68b8e37aa7b82dfe4d05b76dfa07b42cd9e3da7;hb=f11e80fcd87cefc0f7427f51fcaf18139b6f3d91;hp=5ba4477af8e2e3afca3236276f094d9d39903c90;hpb=f0fefa158b60e83d27bbfb3e83656639b946d16a;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git diff --git a/ag-agent/bluetooth-ag-manager.c b/ag-agent/bluetooth-ag-manager.c index 5ba4477..d68b8e3 100644 --- a/ag-agent/bluetooth-ag-manager.c +++ b/ag-agent/bluetooth-ag-manager.c @@ -154,6 +154,7 @@ static struct { .charset_id = 0 }; +/* LCOV_EXCL_START */ static gboolean __bt_hfp_check_for_callpath(const char *call_path, const char *call_sender) { @@ -214,6 +215,7 @@ static void __bt_hfp_free_call(struct telephony_call *t_call) g_free(t_call->call_sender); g_free(t_call); } +/* LCOV_EXCL_STOP */ static void __bt_hfp_reset_indicators(void) { @@ -326,6 +328,7 @@ void _bt_hfp_deinitialize_telephony_manager(void) _bt_hfp_deinitialize(); } +/* LCOV_EXCL_START */ bt_hfp_agent_error_t _bt_hfp_register_telephony_agent(gboolean register_flag, const char *path_to_register, const char *sender) @@ -436,6 +439,7 @@ static struct telephony_call *__bt_hfp_create_new_call( } return t_call; } +/* LCOV_EXCL_STOP */ gboolean _bt_hfp_is_call_exist(void) { @@ -453,18 +457,21 @@ static struct telephony_call *__bt_hfp_get_call_with_status(int call_status) GSList *temp_list = existing_call_list; if (existing_call_list != NULL) { + /* LCOV_EXCL_START */ while (temp_list != NULL) { struct telephony_call *t_call = temp_list->data; if (t_call->call_status == call_status) return t_call; temp_list = temp_list->next; } + /* LCOV_EXCL_STOP */ } DBG("Existing call list is NULL. So return NULL"); return NULL; } +/* LCOV_EXCL_START */ static bt_hfp_agent_error_t __bt_hfp_modify_indicator( const char *indicator_name, int update_value) @@ -1030,6 +1037,7 @@ int _bt_hfp_set_property_value(const char *property, int value) return ret; } +/* LCOV_EXCL_STOP */ int _bt_hfp_set_property_name(const char *property, const char *operator_name) { @@ -1054,6 +1062,7 @@ int _bt_hfp_set_property_name(const char *property, const char *operator_name) return ret; } +/* LCOV_EXCL_START */ static int __bt_hfp_answer_call(struct telephony_call *t_call) { if (t_call->call_id != 0 && t_call->call_path != NULL && @@ -1065,6 +1074,7 @@ static int __bt_hfp_answer_call(struct telephony_call *t_call) } return -1; } +/* LCOV_EXCL_STOP */ void _bt_hfp_answer_call_request(void *t_device) { @@ -1090,11 +1100,13 @@ void _bt_hfp_answer_call_request(void *t_device) return; } + /* LCOV_EXCL_START */ if (__bt_hfp_answer_call(t_call) < 0) _bt_answer_call_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE); else _bt_answer_call_response(t_device, HFP_STATE_MNGR_ERR_NONE); + /* LCOV_EXCL_STOP */ } @@ -1116,7 +1128,7 @@ void _bt_hfp_dial_number_request(const char *dial_number, void *t_device) if (error_code == BT_HFP_AGENT_ERROR_NONE) _bt_dial_number_response(t_device, - HFP_STATE_MNGR_ERR_NONE); + HFP_STATE_MNGR_ERR_NONE); /* LCOV_EXCL_LINE */ else _bt_dial_number_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE); @@ -1130,7 +1142,7 @@ void _bt_hfp_dial_number_request(const char *dial_number, void *t_device) return; } - _bt_dial_number_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE); + _bt_dial_number_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE); /* LCOV_EXCL_LINE */ } @@ -1145,6 +1157,7 @@ void _bt_hfp_update_event_request(int indicator, void *t_device) HFP_STATE_MNGR_ERR_NONE); } +/* LCOV_EXCL_START */ static int __bt_bt_hfp_reject_call(struct telephony_call *t_call) { gboolean ret; @@ -1190,6 +1203,7 @@ static int __bt_hfp_release_conference(void) } return 0; } +/* LCOV_EXCL_STOP */ void _bt_hfp_terminate_call_request(void *t_device) { @@ -1203,12 +1217,14 @@ void _bt_hfp_terminate_call_request(void *t_device) DBG("Find non-idle call"); GSList *temp_call_list = existing_call_list; while (temp_call_list != NULL) { + /* LCOV_EXCL_START */ t_call = temp_call_list->data; if (t_call->call_status == HFP_AGENT_CALL_IDLE) temp_call_list = temp_call_list->next; else break; + /* LCOV_EXCL_STOP */ } } @@ -1219,6 +1235,7 @@ void _bt_hfp_terminate_call_request(void *t_device) return; } + /* LCOV_EXCL_START */ if (__bt_hfp_get_call_with_status(HFP_CALL_STATUS_WAITING) != NULL) { int value = 1; t_error = _bt_ag_agent_threeway_call(value, t_call->call_path, @@ -1244,6 +1261,7 @@ void _bt_hfp_terminate_call_request(void *t_device) HFP_STATE_MNGR_ERR_AG_FAILURE); else _bt_terminate_call_response(t_device, HFP_STATE_MNGR_ERR_NONE); + /* LCOV_EXCL_STOP */ } void _bt_hfp_call_hold_request(const char *t_cmd, void *t_device) @@ -1269,6 +1287,7 @@ void _bt_hfp_call_hold_request(const char *t_cmd, void *t_device) } } + /* LCOV_EXCL_START */ while (t_sender_list != NULL) { sender_info = t_sender_list->data; if (sender_info == NULL) { @@ -1292,6 +1311,7 @@ void _bt_hfp_call_hold_request(const char *t_cmd, void *t_device) _bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_NONE); else _bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE); + /* LCOV_EXCL_STOP */ } void _bt_hfp_key_press_request(const char *t_key_press, void *t_device) @@ -1369,6 +1389,7 @@ void _bt_hfp_channel_dtmf_request(char t_tone, void *t_device) } } + /* LCOV_EXCL_START */ if (_bt_ag_agent_send_dtmf(tone_buffer, t_call->call_path, t_call->call_sender) != BT_HFP_AGENT_ERROR_NONE) { _bt_transmit_dtmf_response(t_device, @@ -1377,6 +1398,7 @@ void _bt_hfp_channel_dtmf_request(char t_tone, void *t_device) } _bt_transmit_dtmf_response(t_device, HFP_STATE_MNGR_ERR_NONE); + /* LCOV_EXCL_STOP */ } void _bt_hfp_vendor_cmd_request(const char *cmd, @@ -1388,6 +1410,7 @@ void _bt_hfp_vendor_cmd_request(const char *cmd, bt_hfp_agent_error_t error = BT_HFP_AGENT_ERROR_NONE; if (NULL != t_sender_list) { + /* LCOV_EXCL_START */ for (l = t_sender_list; l != NULL; l = l->next) { sender_info = l->data; error = _bt_ag_agent_vendor_cmd(cmd, @@ -1396,6 +1419,7 @@ void _bt_hfp_vendor_cmd_request(const char *cmd, if (error != BT_HFP_AGENT_ERROR_NONE) break; } + /* LCOV_EXCL_STOP */ } if (error != BT_HFP_AGENT_ERROR_NONE) @@ -1408,7 +1432,7 @@ void _bt_hfp_vendor_cmd_request(const char *cmd, void _bt_hfp_subscriber_number_request(void *t_device) { if (ag_subscriber_num != NULL) { - + /* LCOV_EXCL_START */ int t_number = AGENT_NUMBER_TYPE_TELEPHONY; if (ag_subscriber_num[0] == '+' || strncmp( @@ -1417,11 +1441,13 @@ void _bt_hfp_subscriber_number_request(void *t_device) _bt_subscriber_number_indicator(ag_subscriber_num, t_number, AGENT_SUBSCRIBER_SERVICE_VOICE); + /* LCOV_EXCL_STOP */ } _bt_subscriber_number_response(t_device, HFP_STATE_MNGR_ERR_NONE); } +/* LCOV_EXCL_START */ static int __bt_hfp_get_call_status(struct telephony_call *t_call) { switch (t_call->call_status) { @@ -1472,6 +1498,7 @@ static int __bt_hfp_get_call_status(struct telephony_call *t_call) return -1; } } +/* LCOV_EXCL_STOP */ void _bt_list_current_calls(void *t_device) { @@ -1482,6 +1509,7 @@ void _bt_list_current_calls(void *t_device) int index; while (t_call_list != NULL) { + /* LCOV_EXCL_START */ struct telephony_call *t_call = t_call_list->data; t_status = __bt_hfp_get_call_status(t_call); if (t_status >= 0) { @@ -1512,6 +1540,7 @@ void _bt_list_current_calls(void *t_device) t_number); } t_call_list = t_call_list->next; + /* LCOV_EXCL_STOP */ } _bt_list_current_calls_response(t_device, HFP_STATE_MNGR_ERR_NONE); } @@ -1527,6 +1556,7 @@ void _bt_hfp_release_all_calls_by_sender(const char *sender) DBG("sender [%s]", sender); while (temp_list != NULL) { + /* LCOV_EXCL_START */ struct telephony_call *t_call = temp_list->data; if (g_strcmp0(t_call->call_sender, sender) == 0) { @@ -1536,6 +1566,7 @@ void _bt_hfp_release_all_calls_by_sender(const char *sender) temp_list = next_list; } else temp_list = temp_list->next; + /* LCOV_EXCL_STOP */ } } @@ -1582,6 +1613,7 @@ void _bt_hfp_set_indicators(const char *t_command, void *t_device) while (hfp_ag_ind[i].indicator_desc != NULL && str != NULL) { str++; + /* LCOV_EXCL_START */ if ((g_strcmp0(hfp_ag_ind[i].indicator_desc, "call") != 0) && (g_strcmp0(hfp_ag_ind[i].indicator_desc, "callheld") != 0) && (g_strcmp0(hfp_ag_ind[i].indicator_desc, "callsetup") != 0)) { @@ -1597,6 +1629,7 @@ void _bt_hfp_set_indicators(const char *t_command, void *t_device) } str = strchr(str, delims); i++; + /* LCOV_EXCL_STOP */ } _bt_indicators_activation_response(t_device, HFP_STATE_MNGR_ERR_NONE); @@ -1642,6 +1675,7 @@ static int __bt_hfp_get_phonebook_count(const char *path, uint32_t *max_size, return -1; } + /* LCOV_EXCL_START */ ret = g_dbus_proxy_call_sync(g_proxy, "GetPhonebookSizeAt", g_variant_new("(s)", path), @@ -1684,6 +1718,7 @@ static int __bt_hfp_get_phonebook_count(const char *path, uint32_t *max_size, g_object_unref(g_conn); if (g_proxy) g_object_unref(g_proxy); + /* LCOV_EXCL_STOP */ #endif return 0; } @@ -1830,6 +1865,7 @@ static int __bt_hfp_get_phonebook_entries(int start_index, int end_index) return -1; } + /* LCOV_EXCL_START */ ret = g_dbus_proxy_call_sync(g_proxy, "GetPhonebookEntriesAt", g_variant_new("(sii)", agent_pb_store_list[ag_pb_info.path_id], @@ -1879,6 +1915,7 @@ static int __bt_hfp_get_phonebook_entries(int start_index, int end_index) g_object_unref(g_conn); if (g_proxy) g_object_unref(g_proxy); + /* LCOV_EXCL_STOP */ #endif return count; }