blob: de209dd2cdd6b6f19a28e28c682e974c6294bdd2 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.inheritance/cpp/markers.h>
#include <fidl/test.inheritance/cpp/natural_types.h>
#include <fidl/test.inheritance/cpp/wire_messaging.h>
#include <lib/fidl/cpp/channel.h>
#include <lib/fidl/cpp/client.h>
#include <lib/fidl/cpp/internal/thenable.h>
#include <lib/fidl/cpp/natural_types.h>
#include <lib/fidl/cpp/unified_messaging.h>
#include <lib/fidl/cpp/wire/unknown_interaction_handler.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace fidl {
} // namespace fidl
template <>
struct ::fidl::internal::NaturalMethodTypes<::test_inheritance::Super::Foo> {
using Request = ::test_inheritance::SuperFooRequest;
using Response = ::test_inheritance::SuperFooResponse;
using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_inheritance::Super::Foo>>;
using ResultCallback =
::fit::callback<void(::fidl::Result<::test_inheritance::Super::Foo>&)>;
};
#ifdef __Fuchsia__
template <>
class ::fidl::Response<::test_inheritance::Super::Foo> final : public ::test_inheritance::SuperFooResponse {
public:
using ::test_inheritance::SuperFooResponse::SuperFooResponse;
Response(::test_inheritance::SuperFooResponse v) : SuperFooResponse(std::move(v)) {}
};
template <>
class ::fidl::Result<::test_inheritance::Super::Foo> final : public ::fit::result<::fidl::Error, ::test_inheritance::SuperFooResponse> {
public:
using ::fit::result<::fidl::Error, ::test_inheritance::SuperFooResponse>::result;
protected:
Result() = default;
};
template <>
class ::fidl::internal::NaturalClientImpl<::test_inheritance::Super> final : public ::fidl::internal::NaturalClientBase {
public:
using NaturalClientBase::NaturalClientBase;
::fidl::internal::NaturalThenable<::test_inheritance::Super::Foo> Foo(const ::fidl::Request<::test_inheritance::Super::Foo>& request) const;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalSyncClientImpl<::test_inheritance::Super> final
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_inheritance::Super>> {
public:
::fidl::Result<::test_inheritance::Super::Foo> Foo(const ::fidl::Request<::test_inheritance::Super::Foo>& request);
private:
::fidl::UnownedClientEnd<::test_inheritance::Super> _client_end() const {
return ::fidl::UnownedClientEnd<::test_inheritance::Super>(
_transport().get<::fidl::internal::ChannelTransport>());
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Super> : public ::fidl::internal::BaseEventHandlerInterface {
public:
NaturalEventHandlerInterface() = default;
virtual ~NaturalEventHandlerInterface() = default;
};
template <>
class ::fidl::AsyncEventHandler<::test_inheritance::Super>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Super>, public ::fidl::internal::AsyncEventHandler {
public:
AsyncEventHandler() = default;
};
template <>
class ::fidl::SyncEventHandler<::test_inheritance::Super>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Super>, public ::fidl::internal::SyncEventHandler {
public:
SyncEventHandler() = default;
// Handle all possible events defined in this protocol.
// Blocks to consume exactly one message from the channel, then call the corresponding virtual
// method.
::fidl::Status HandleOneEvent(
::fidl::UnownedClientEnd<::test_inheritance::Super> client_end);
};
template <>
class ::fidl::internal::NaturalEventDispatcher<::test_inheritance::Super> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Super>> {
public:
explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Super>* event_handler)
: IncomingEventDispatcher(event_handler) {}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalWeakEventSender<::test_inheritance::Super> : public ::fidl::internal::WeakEventSenderBase {
public:
using WeakEventSenderBase::WeakEventSenderBase;
};
template <>
class ::fidl::internal::NaturalEventSender<::test_inheritance::Super>
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_inheritance::Super>> {
public:
using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer;
};
#endif // __Fuchsia__
template <>
class ::fidl::internal::NaturalCompleterBase<::test_inheritance::Super::Foo> : public ::fidl::CompleterBase {
public:
void Reply(const ::fidl::Response<::test_inheritance::Super::Foo>& response);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
template <>
class ::fidl::Server<::test_inheritance::Super> : public ::fidl::internal::IncomingMessageDispatcher {
public:
Server() = default;
virtual ~Server() = default;
// The FIDL protocol type that is implemented by this server.
using _EnclosingProtocol = ::test_inheritance::Super;
using Handler = fidl::ProtocolHandler<::test_inheritance::Super>;
using FooRequest = ::fidl::Request<::test_inheritance::Super::Foo>;
using FooCompleter = ::fidl::internal::NaturalCompleter<::test_inheritance::Super::Foo>;
virtual void Foo(FooRequest& request,
FooCompleter::Sync& completer) = 0;
// |bind_handler| returns a handler that binds incoming connections to this
// server implementation.
//
// The returned handler borrows the server instance.
// The server must outlive the provided |dispatcher|. Only after
// the dispatcher is shutdown will it be safe to destroy the servers.
// The server should not be moved.
Handler bind_handler(async_dispatcher_t* dispatcher) {
return [impl = this, dispatcher = dispatcher](::fidl::ServerEnd<::test_inheritance::Super> request) {
(void)::fidl::BindServer(dispatcher, std::move(request), impl);
};
}
private:
void dispatch_message(
::fidl::IncomingHeaderAndMessage&& msg, ::fidl::Transaction* txn,
::fidl::internal::MessageStorageViewBase* storage_view) final;
};
#ifdef __Fuchsia__
template <>
struct ::fidl::internal::NaturalServerDispatcher<::test_inheritance::Super> final {
NaturalServerDispatcher() = delete;
static void Dispatch(::fidl::Server<::test_inheritance::Super>* impl, ::fidl::IncomingHeaderAndMessage&& msg,
internal::MessageStorageViewBase* storage_view,
::fidl::Transaction* txn);
private:
static const ::fidl::internal::MethodEntry entries_[];
static const ::fidl::internal::MethodEntry* entries_end_;
static constexpr const ::fidl::internal::UnknownMethodHandlerEntry& unknown_method_handler_entry_ =
::fidl::internal::UnknownMethodHandlerEntry::kClosedProtocolHandlerEntry;
};
#endif // __Fuchsia__
template <>
struct ::fidl::internal::NaturalMethodTypes<::test_inheritance::Sub::Foo> {
using Request = ::test_inheritance::SuperFooRequest;
using Response = ::test_inheritance::SuperFooResponse;
using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_inheritance::Sub::Foo>>;
using ResultCallback =
::fit::callback<void(::fidl::Result<::test_inheritance::Sub::Foo>&)>;
};
#ifdef __Fuchsia__
template <>
class ::fidl::Response<::test_inheritance::Sub::Foo> final : public ::test_inheritance::SuperFooResponse {
public:
using ::test_inheritance::SuperFooResponse::SuperFooResponse;
Response(::test_inheritance::SuperFooResponse v) : SuperFooResponse(std::move(v)) {}
};
template <>
class ::fidl::Result<::test_inheritance::Sub::Foo> final : public ::fit::result<::fidl::Error, ::test_inheritance::SuperFooResponse> {
public:
using ::fit::result<::fidl::Error, ::test_inheritance::SuperFooResponse>::result;
protected:
Result() = default;
};
template <>
class ::fidl::internal::NaturalClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::NaturalClientBase {
public:
using NaturalClientBase::NaturalClientBase;
::fidl::internal::NaturalThenable<::test_inheritance::Sub::Foo> Foo(const ::fidl::Request<::test_inheritance::Sub::Foo>& request) const;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalSyncClientImpl<::test_inheritance::Sub> final
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_inheritance::Sub>> {
public:
::fidl::Result<::test_inheritance::Sub::Foo> Foo(const ::fidl::Request<::test_inheritance::Sub::Foo>& request);
private:
::fidl::UnownedClientEnd<::test_inheritance::Sub> _client_end() const {
return ::fidl::UnownedClientEnd<::test_inheritance::Sub>(
_transport().get<::fidl::internal::ChannelTransport>());
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Sub> : public ::fidl::internal::BaseEventHandlerInterface {
public:
NaturalEventHandlerInterface() = default;
virtual ~NaturalEventHandlerInterface() = default;
};
template <>
class ::fidl::AsyncEventHandler<::test_inheritance::Sub>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Sub>, public ::fidl::internal::AsyncEventHandler {
public:
AsyncEventHandler() = default;
};
template <>
class ::fidl::SyncEventHandler<::test_inheritance::Sub>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Sub>, public ::fidl::internal::SyncEventHandler {
public:
SyncEventHandler() = default;
// Handle all possible events defined in this protocol.
// Blocks to consume exactly one message from the channel, then call the corresponding virtual
// method.
::fidl::Status HandleOneEvent(
::fidl::UnownedClientEnd<::test_inheritance::Sub> client_end);
};
template <>
class ::fidl::internal::NaturalEventDispatcher<::test_inheritance::Sub> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Sub>> {
public:
explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_inheritance::Sub>* event_handler)
: IncomingEventDispatcher(event_handler) {}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalWeakEventSender<::test_inheritance::Sub> : public ::fidl::internal::WeakEventSenderBase {
public:
using WeakEventSenderBase::WeakEventSenderBase;
};
template <>
class ::fidl::internal::NaturalEventSender<::test_inheritance::Sub>
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_inheritance::Sub>> {
public:
using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer;
};
#endif // __Fuchsia__
template <>
class ::fidl::internal::NaturalCompleterBase<::test_inheritance::Sub::Foo> : public ::fidl::CompleterBase {
public:
void Reply(const ::fidl::Response<::test_inheritance::Sub::Foo>& response);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
template <>
class ::fidl::Server<::test_inheritance::Sub> : public ::fidl::internal::IncomingMessageDispatcher {
public:
Server() = default;
virtual ~Server() = default;
// The FIDL protocol type that is implemented by this server.
using _EnclosingProtocol = ::test_inheritance::Sub;
using Handler = fidl::ProtocolHandler<::test_inheritance::Sub>;
using FooRequest = ::fidl::Request<::test_inheritance::Sub::Foo>;
using FooCompleter = ::fidl::internal::NaturalCompleter<::test_inheritance::Sub::Foo>;
virtual void Foo(FooRequest& request,
FooCompleter::Sync& completer) = 0;
// |bind_handler| returns a handler that binds incoming connections to this
// server implementation.
//
// The returned handler borrows the server instance.
// The server must outlive the provided |dispatcher|. Only after
// the dispatcher is shutdown will it be safe to destroy the servers.
// The server should not be moved.
Handler bind_handler(async_dispatcher_t* dispatcher) {
return [impl = this, dispatcher = dispatcher](::fidl::ServerEnd<::test_inheritance::Sub> request) {
(void)::fidl::BindServer(dispatcher, std::move(request), impl);
};
}
private:
void dispatch_message(
::fidl::IncomingHeaderAndMessage&& msg, ::fidl::Transaction* txn,
::fidl::internal::MessageStorageViewBase* storage_view) final;
};
#ifdef __Fuchsia__
template <>
struct ::fidl::internal::NaturalServerDispatcher<::test_inheritance::Sub> final {
NaturalServerDispatcher() = delete;
static void Dispatch(::fidl::Server<::test_inheritance::Sub>* impl, ::fidl::IncomingHeaderAndMessage&& msg,
internal::MessageStorageViewBase* storage_view,
::fidl::Transaction* txn);
private:
static const ::fidl::internal::MethodEntry entries_[];
static const ::fidl::internal::MethodEntry* entries_end_;
static constexpr const ::fidl::internal::UnknownMethodHandlerEntry& unknown_method_handler_entry_ =
::fidl::internal::UnknownMethodHandlerEntry::kClosedProtocolHandlerEntry;
};
#endif // __Fuchsia__
#pragma clang diagnostic pop