Bug 1029389: Asynchronous Bluetooth Handsfree voice-recognition functions, r=shuang

This commit is contained in:
Thomas Zimmermann 2014-07-15 10:56:54 +02:00
parent cda269a96c
commit 5e870632d3
2 changed files with 20 additions and 8 deletions

View File

@ -694,16 +694,28 @@ BluetoothHandsfreeInterface::DisconnectAudio(
/* Voice Recognition */
bt_status_t
BluetoothHandsfreeInterface::StartVoiceRecognition()
void
BluetoothHandsfreeInterface::StartVoiceRecognition(
BluetoothHandsfreeResultHandler* aRes)
{
return mInterface->start_voice_recognition();
bt_status_t status = mInterface->start_voice_recognition();
if (aRes) {
DispatchBluetoothHandsfreeResult(
aRes, &BluetoothHandsfreeResultHandler::StartVoiceRecognition, status);
}
}
bt_status_t
BluetoothHandsfreeInterface::StopVoiceRecognition()
void
BluetoothHandsfreeInterface::StopVoiceRecognition(
BluetoothHandsfreeResultHandler* aRes)
{
return mInterface->stop_voice_recognition();
bt_status_t status = mInterface->stop_voice_recognition();
if (aRes) {
DispatchBluetoothHandsfreeResult(
aRes, &BluetoothHandsfreeResultHandler::StopVoiceRecognition, status);
}
}
/* Volume */

View File

@ -129,8 +129,8 @@ public:
/* Voice Recognition */
bt_status_t StartVoiceRecognition();
bt_status_t StopVoiceRecognition();
void StartVoiceRecognition(BluetoothHandsfreeResultHandler* aRes);
void StopVoiceRecognition(BluetoothHandsfreeResultHandler* aRes);
/* Volume */