Exemple #1
0
void
BluetoothGatt::HandleServicesDiscovered(const BluetoothValue& aValue)
{
  MOZ_ASSERT(aValue.type() == BluetoothValue::TArrayOfBluetoothGattServiceId);

  const InfallibleTArray<BluetoothGattServiceId>& serviceIds =
    aValue.get_ArrayOfBluetoothGattServiceId();

  for (uint32_t i = 0; i < serviceIds.Length(); i++) {
    mServices.AppendElement(new BluetoothGattService(
      GetParentObject(), mAppUuid, serviceIds[i]));
  }

  BluetoothGattBinding::ClearCachedServicesValue(this);
}