hfp_hf.c (0b4debbf1d439732a156a3799e682514fbb75688) hfp_hf.c (e83c202541a02b09236bd4dc8c266a0bbc81f536)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 1765 unchanged lines hidden (view full) ---

1774 default:
1775 return ERROR_CODE_COMMAND_DISALLOWED;
1776 }
1777
1778 hfp_hf_run_for_context(hfp_connection);
1779 return ERROR_CODE_SUCCESS;
1780}
1781
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 1765 unchanged lines hidden (view full) ---

1774 default:
1775 return ERROR_CODE_COMMAND_DISALLOWED;
1776 }
1777
1778 hfp_hf_run_for_context(hfp_connection);
1779 return ERROR_CODE_SUCCESS;
1780}
1781
1782uint8_t hfp_hf_start_enhanced_voice_recognition_session(hci_con_handle_t acl_handle){
1782uint8_t hfp_hf_activate_enhanced_voice_recognition(hci_con_handle_t acl_handle){
1783 hfp_connection_t * hfp_connection = get_hfp_hf_connection_context_for_acl_handle(acl_handle);
1784 if (!hfp_connection) {
1785 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
1786 }
1787 if (hfp_connection->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED || hfp_connection->state > HFP_AUDIO_CONNECTION_ESTABLISHED){
1788 return ERROR_CODE_COMMAND_DISALLOWED;
1789 }
1790 if (!hfp_hf_enhanced_voice_recognition_supported(hfp_connection)){

--- 7 unchanged lines hidden (view full) ---

1798 default:
1799 return ERROR_CODE_COMMAND_DISALLOWED;
1800 }
1801
1802 hfp_hf_run_for_context(hfp_connection);
1803 return ERROR_CODE_SUCCESS;
1804}
1805
1783 hfp_connection_t * hfp_connection = get_hfp_hf_connection_context_for_acl_handle(acl_handle);
1784 if (!hfp_connection) {
1785 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
1786 }
1787 if (hfp_connection->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED || hfp_connection->state > HFP_AUDIO_CONNECTION_ESTABLISHED){
1788 return ERROR_CODE_COMMAND_DISALLOWED;
1789 }
1790 if (!hfp_hf_enhanced_voice_recognition_supported(hfp_connection)){

--- 7 unchanged lines hidden (view full) ---

1798 default:
1799 return ERROR_CODE_COMMAND_DISALLOWED;
1800 }
1801
1802 hfp_hf_run_for_context(hfp_connection);
1803 return ERROR_CODE_SUCCESS;
1804}
1805
1806uint8_t hfp_hf_stop_enhanced_voice_recognition_session(hci_con_handle_t acl_handle){
1806uint8_t hfp_hf_deactivate_enhanced_voice_recognition(hci_con_handle_t acl_handle){
1807 hfp_connection_t * hfp_connection = get_hfp_hf_connection_context_for_acl_handle(acl_handle);
1808 if (!hfp_connection) {
1809 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
1810 }
1811
1812 if (!hfp_hf_enhanced_voice_recognition_supported(hfp_connection)){
1813 return ERROR_CODE_COMMAND_DISALLOWED;
1814 }

--- 208 unchanged lines hidden ---
1807 hfp_connection_t * hfp_connection = get_hfp_hf_connection_context_for_acl_handle(acl_handle);
1808 if (!hfp_connection) {
1809 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
1810 }
1811
1812 if (!hfp_hf_enhanced_voice_recognition_supported(hfp_connection)){
1813 return ERROR_CODE_COMMAND_DISALLOWED;
1814 }

--- 208 unchanged lines hidden ---