Bug 1033961: Asynchronous remote-service methods in Bluedroid (under bluetooth2/), r=btian

This commit is contained in:
Thomas Zimmermann 2014-07-09 09:38:49 +02:00
parent 110e090d93
commit 83272ecf5c
2 changed files with 25 additions and 9 deletions

View File

@ -656,17 +656,31 @@ BluetoothInterface::SetRemoteDeviceProperty(bt_bdaddr_t* aRemoteAddr,
/* Remote Services */
int
void
BluetoothInterface::GetRemoteServiceRecord(bt_bdaddr_t* aRemoteAddr,
bt_uuid_t* aUuid)
bt_uuid_t* aUuid,
BluetoothResultHandler* aRes)
{
return mInterface->get_remote_service_record(aRemoteAddr, aUuid);
int status = mInterface->get_remote_service_record(aRemoteAddr, aUuid);
if (aRes) {
DispatchBluetoothResult(aRes,
&BluetoothResultHandler::GetRemoteServiceRecord,
status);
}
}
int
BluetoothInterface::GetRemoteServices(bt_bdaddr_t* aRemoteAddr)
void
BluetoothInterface::GetRemoteServices(bt_bdaddr_t* aRemoteAddr,
BluetoothResultHandler* aRes)
{
return mInterface->get_remote_services(aRemoteAddr);
int status = mInterface->get_remote_services(aRemoteAddr);
if (aRes) {
DispatchBluetoothResult(aRes,
&BluetoothResultHandler::GetRemoteServices,
status);
}
}
/* Discovery */

View File

@ -258,9 +258,11 @@ public:
/* Remote Services */
int GetRemoteServiceRecord(bt_bdaddr_t* aRemoteAddr,
bt_uuid_t* aUuid);
int GetRemoteServices(bt_bdaddr_t* aRemoteAddr);
void GetRemoteServiceRecord(bt_bdaddr_t* aRemoteAddr,
bt_uuid_t* aUuid,
BluetoothResultHandler* aRes);
void GetRemoteServices(bt_bdaddr_t* aRemoteAddr,
BluetoothResultHandler* aRes);
/* Discovery */