// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_FUCHSIA_TEST_INTERFACE_NATURAL_IMPL_H_ #define BASE_FUCHSIA_TEST_INTERFACE_NATURAL_IMPL_H_ #include #include #include #include #include namespace base { class TestInterfaceNaturalImpl : public fidl::Server { public: TestInterfaceNaturalImpl(); ~TestInterfaceNaturalImpl() override; // TestInterface implementation: void Add(AddRequest& request, AddCompleter::Sync& completer) override; fidl::ServerBindingGroup& bindings() { return bindings_; } private: fidl::ServerBindingGroup bindings_; }; // Connects and returns a client for `TestInterface` at the specified `name`. fidl::Client CreateTestInterfaceClient( fidl::UnownedClientEnd service_directory, const std::string& name = fidl::DiscoverableProtocolName); // Exercises the `TestInterface` channel identified by `client`, returning // `ZX_OK` on success. Any error-handler for `client` will be removed before // this function returns. zx_status_t VerifyTestInterface( fidl::Client& client); } // namespace base #endif // BASE_FUCHSIA_TEST_INTERFACE_NATURAL_IMPL_H_