chromium/device/fido/aoa/android_accessory_discovery.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef DEVICE_FIDO_AOA_ANDROID_ACCESSORY_DISCOVERY_H_
#define DEVICE_FIDO_AOA_ANDROID_ACCESSORY_DISCOVERY_H_

#include <array>
#include <memory>
#include <tuple>
#include <vector>

#include "base/component_export.h"
#include "base/containers/span.h"
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "device/fido/fido_device_discovery.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/public/mojom/usb_device.mojom.h"
#include "services/device/public/mojom/usb_manager.mojom.h"
#include "services/device/public/mojom/usb_manager_client.mojom.h"

namespace device {

// AndroidAccessoryDiscovery watches for USB devices that are inserted during
// its lifetime and tries sending AOA[1] commands to them in case they are a
// phone that can speak CTAP over the accessory protocol.
//
// [1] https://source.android.com/devices/accessories/aoa
class COMPONENT_EXPORT(DEVICE_FIDO) AndroidAccessoryDiscovery
    : public FidoDeviceDiscovery,
      device::mojom::UsbDeviceManagerClient {};

}  // namespace device

#endif  // DEVICE_FIDO_AOA_ANDROID_ACCESSORY_DISCOVERY_H_