// third_party/blink/public/mojom/serial/serial.mojom-blink-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit

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

#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_SERIAL_SERIAL_MOJOM_BLINK_TEST_UTILS_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_SERIAL_SERIAL_MOJOM_BLINK_TEST_UTILS_H_

#include "third_party/blink/public/mojom/serial/serial.mojom-blink.h"
#include "third_party/blink/renderer/platform/platform_export.h"


namespace blink::mojom::blink {


class PLATFORM_EXPORT SerialServiceInterceptorForTesting : public SerialService {
  virtual SerialService* GetForwardingInterface() = 0;
  void SetClient(::mojo::PendingRemote<SerialServiceClient> client) override;
  void GetPorts(GetPortsCallback callback) override;
  void RequestPort(::blink::Vector<SerialPortFilterPtr> filters, const ::blink::Vector<::blink::String>& allowed_bluetooth_service_class_ids, RequestPortCallback callback) override;
  void OpenPort(const ::base::UnguessableToken& token, ::device::mojom::blink::SerialConnectionOptionsPtr options, ::mojo::PendingRemote<::device::mojom::blink::SerialPortClient> client, OpenPortCallback callback) override;
  void ForgetPort(const ::base::UnguessableToken& token, ForgetPortCallback callback) override;
};
class PLATFORM_EXPORT SerialServiceAsyncWaiter {
 public:
  explicit SerialServiceAsyncWaiter(SerialService* proxy);

  SerialServiceAsyncWaiter(const SerialServiceAsyncWaiter&) = delete;
  SerialServiceAsyncWaiter& operator=(const SerialServiceAsyncWaiter&) = delete;

  ~SerialServiceAsyncWaiter();
  void GetPorts(
      ::blink::Vector<SerialPortInfoPtr>* out_ports);
  ::blink::Vector<SerialPortInfoPtr> GetPorts();
  void RequestPort(
      ::blink::Vector<SerialPortFilterPtr> filters, const ::blink::Vector<::blink::String>& allowed_bluetooth_service_class_ids, SerialPortInfoPtr* out_port);
  SerialPortInfoPtr RequestPort(::blink::Vector<SerialPortFilterPtr> filters, const ::blink::Vector<::blink::String>& allowed_bluetooth_service_class_ids);
  void OpenPort(
      const ::base::UnguessableToken& token, ::device::mojom::blink::SerialConnectionOptionsPtr options, ::mojo::PendingRemote<::device::mojom::blink::SerialPortClient> client, ::mojo::PendingRemote<::device::mojom::blink::SerialPort>* out_port);
  ::mojo::PendingRemote<::device::mojom::blink::SerialPort> OpenPort(const ::base::UnguessableToken& token, ::device::mojom::blink::SerialConnectionOptionsPtr options, ::mojo::PendingRemote<::device::mojom::blink::SerialPortClient> client);
  void ForgetPort(
      const ::base::UnguessableToken& token);
  

 private:
  SerialService* const proxy_;
};


class PLATFORM_EXPORT SerialServiceClientInterceptorForTesting : public SerialServiceClient {
  virtual SerialServiceClient* GetForwardingInterface() = 0;
  void OnPortConnectedStateChanged(SerialPortInfoPtr port_info) override;
};
class PLATFORM_EXPORT SerialServiceClientAsyncWaiter {
 public:
  explicit SerialServiceClientAsyncWaiter(SerialServiceClient* proxy);

  SerialServiceClientAsyncWaiter(const SerialServiceClientAsyncWaiter&) = delete;
  SerialServiceClientAsyncWaiter& operator=(const SerialServiceClientAsyncWaiter&) = delete;

  ~SerialServiceClientAsyncWaiter();

 private:
  SerialServiceClient* const proxy_;
};




}  // blink::mojom::blink

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_SERIAL_SERIAL_MOJOM_BLINK_TEST_UTILS_H_