fake_fast_pair_handshake.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_QUICK_PAIR_FAST_PAIR_HANDSHAKE_FAKE_FAST_PAIR_HANDSHAKE_H_
  5. #define ASH_QUICK_PAIR_FAST_PAIR_HANDSHAKE_FAKE_FAST_PAIR_HANDSHAKE_H_
  6. #include <memory>
  7. #include "ash/quick_pair/fast_pair_handshake/fast_pair_handshake.h"
  8. #include "base/memory/scoped_refptr.h"
  9. namespace ash {
  10. namespace quick_pair {
  11. class FakeFastPairHandshake : public FastPairHandshake {
  12. public:
  13. FakeFastPairHandshake(
  14. scoped_refptr<device::BluetoothAdapter> adapter,
  15. scoped_refptr<Device> device,
  16. OnCompleteCallback on_complete,
  17. std::unique_ptr<FastPairDataEncryptor> data_encryptor = nullptr,
  18. std::unique_ptr<FastPairGattServiceClient> gatt_service_client = nullptr);
  19. FakeFastPairHandshake(const FakeFastPairHandshake&) = delete;
  20. FakeFastPairHandshake& operator=(const FakeFastPairHandshake&) = delete;
  21. ~FakeFastPairHandshake() override;
  22. void InvokeCallback(absl::optional<PairFailure> failure = absl::nullopt);
  23. };
  24. } // namespace quick_pair
  25. } // namespace ash
  26. #endif // ASH_QUICK_PAIR_FAST_PAIR_HANDSHAKE_FAKE_FAST_PAIR_HANDSHAKE_H_