Bug 1038645: Asynchronous Bluetooth Handsfree voice-recognition functions (under bluetooth2/), r=btian

This commit is contained in:
Thomas Zimmermann 2014-07-22 13:53:28 +02:00
parent 8d89f772f2
commit 051abd7a03
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 */