blob: 9b43b414cf08f54e13f72ed663615f6e84659865 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen_cpp.
#pragma once
#include <fidl/test.protocolrequest/cpp/markers.h>
#include <fidl/test.protocolrequest/cpp/natural_types.h>
#include <fidl/test.protocolrequest/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/unknown_interaction_handler.h>
namespace fidl {
} // namespace fidl
template <>
struct ::fidl::internal::NaturalMethodTypes<::test_protocolrequest::Parent::GetChild> {
using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_protocolrequest::Parent::GetChild>>;
using ResultCallback =
::fit::callback<void(::fidl::Result<::test_protocolrequest::Parent::GetChild>&)>;
static constexpr bool HasApplicationError = false;
static constexpr bool HasTransportError = false;
static constexpr bool IsAbsentBody = false;
};
template <>
struct ::fidl::internal::NaturalMethodTypes<::test_protocolrequest::Parent::GetChildRequest> {
using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_protocolrequest::Parent::GetChildRequest>>;
using ResultCallback =
::fit::callback<void(::fidl::Result<::test_protocolrequest::Parent::GetChildRequest>&)>;
static constexpr bool HasApplicationError = false;
static constexpr bool HasTransportError = false;
static constexpr bool IsAbsentBody = false;
};
namespace test_protocolrequest {
__LOCAL extern "C" const fidl_type_t test_protocolrequest_ParentGetChildTopResponseTable;
__LOCAL extern "C" const fidl_type_t test_protocolrequest_ParentGetChildRequestTopResponseTable;
__LOCAL extern "C" const fidl_type_t test_protocolrequest_ParentTakeChildRequestTable;
__LOCAL extern "C" const fidl_type_t test_protocolrequest_ParentTakeChildRequestRequestTable;
#ifdef __Fuchsia__
} // namespace test_protocolrequest
template <>
class ::fidl::Response<::test_protocolrequest::Parent::GetChild> final : public ::test_protocolrequest::ParentGetChildTopResponse {
public:
using ::test_protocolrequest::ParentGetChildTopResponse::ParentGetChildTopResponse;
Response(::test_protocolrequest::ParentGetChildTopResponse v) : ParentGetChildTopResponse(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Response<::test_protocolrequest::Parent::GetChild>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_protocolrequest::ParentGetChildTopResponse;
};
namespace test_protocolrequest {} // namespace test_protocolrequest
template <>
class ::fidl::Result<::test_protocolrequest::Parent::GetChild> final : public ::fitx::result<::fidl::Error, ::test_protocolrequest::ParentGetChildTopResponse> {
public:
using ::fitx::result<::fidl::Error, ::test_protocolrequest::ParentGetChildTopResponse>::result;
protected:
Result() = default;
};
template <>
class ::fidl::Response<::test_protocolrequest::Parent::GetChildRequest> final : public ::test_protocolrequest::ParentGetChildRequestTopResponse {
public:
using ::test_protocolrequest::ParentGetChildRequestTopResponse::ParentGetChildRequestTopResponse;
Response(::test_protocolrequest::ParentGetChildRequestTopResponse v) : ParentGetChildRequestTopResponse(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Response<::test_protocolrequest::Parent::GetChildRequest>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_protocolrequest::ParentGetChildRequestTopResponse;
};
template <>
class ::fidl::Result<::test_protocolrequest::Parent::GetChildRequest> final : public ::fitx::result<::fidl::Error, ::test_protocolrequest::ParentGetChildRequestTopResponse> {
public:
using ::fitx::result<::fidl::Error, ::test_protocolrequest::ParentGetChildRequestTopResponse>::result;
protected:
Result() = default;
};
template <>
class ::fidl::internal::NaturalClientImpl<::test_protocolrequest::Parent> final : public ::fidl::internal::NaturalClientBase {
public:
using NaturalClientBase::NaturalClientBase;
::fidl::internal::NaturalThenable<::test_protocolrequest::Parent::GetChild> GetChild() const;
::fidl::internal::NaturalThenable<::test_protocolrequest::Parent::GetChildRequest> GetChildRequest() const;
::fitx::result<::fidl::Error> TakeChild(::fidl::Request<::test_protocolrequest::Parent::TakeChild> request) const;
::fitx::result<::fidl::Error> TakeChildRequest(::fidl::Request<::test_protocolrequest::Parent::TakeChildRequest> request) const;
};
namespace test_protocolrequest {
#endif // __Fuchsia__
} // namespace test_protocolrequest
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalSyncClientImpl<::test_protocolrequest::Parent> final
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_protocolrequest::Parent>> {
public:
::fidl::Result<::test_protocolrequest::Parent::GetChild> GetChild();
::fidl::Result<::test_protocolrequest::Parent::GetChildRequest> GetChildRequest();
::fitx::result<::fidl::Error> TakeChild(::fidl::Request<::test_protocolrequest::Parent::TakeChild> request);
::fitx::result<::fidl::Error> TakeChildRequest(::fidl::Request<::test_protocolrequest::Parent::TakeChildRequest> request);
private:
::fidl::UnownedClientEnd<::test_protocolrequest::Parent> _client_end() const {
return ::fidl::UnownedClientEnd<::test_protocolrequest::Parent>(
_transport().get<::fidl::internal::ChannelTransport>());
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Parent> : public ::fidl::internal::BaseEventHandlerInterface {
public:
NaturalEventHandlerInterface() = default;
virtual ~NaturalEventHandlerInterface() = default;
};
template <>
class ::fidl::AsyncEventHandler<::test_protocolrequest::Parent>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Parent>, public ::fidl::internal::AsyncEventHandler {
public:
AsyncEventHandler() = default;
};
template <>
class ::fidl::SyncEventHandler<::test_protocolrequest::Parent>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Parent>, 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_protocolrequest::Parent> client_end);
};
template <>
class ::fidl::internal::NaturalEventDispatcher<::test_protocolrequest::Parent> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Parent>> {
public:
explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Parent>* event_handler)
: IncomingEventDispatcher(event_handler) {}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalWeakEventSender<::test_protocolrequest::Parent> : public ::fidl::internal::WeakEventSenderBase {
public:
using WeakEventSenderBase::WeakEventSenderBase;
};
template <>
class ::fidl::internal::NaturalEventSender<::test_protocolrequest::Parent>
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_protocolrequest::Parent>> {
public:
using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::Request<::test_protocolrequest::Parent::GetChild> final {
public:
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Request<::test_protocolrequest::Parent::GetChild>> final {
public:
static constexpr bool kHasPayload = false;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::Request<::test_protocolrequest::Parent::GetChildRequest> final {
public:
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Request<::test_protocolrequest::Parent::GetChildRequest>> final {
public:
static constexpr bool kHasPayload = false;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::Request<::test_protocolrequest::Parent::TakeChild> final : public ::test_protocolrequest::ParentTakeChildRequest {
public:
using ::test_protocolrequest::ParentTakeChildRequest::ParentTakeChildRequest;
Request(::test_protocolrequest::ParentTakeChildRequest v) : ::test_protocolrequest::ParentTakeChildRequest(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Request<::test_protocolrequest::Parent::TakeChild>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_protocolrequest::ParentTakeChildRequest;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::Request<::test_protocolrequest::Parent::TakeChildRequest> final : public ::test_protocolrequest::ParentTakeChildRequestRequest {
public:
using ::test_protocolrequest::ParentTakeChildRequestRequest::ParentTakeChildRequestRequest;
Request(::test_protocolrequest::ParentTakeChildRequestRequest v) : ::test_protocolrequest::ParentTakeChildRequestRequest(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Request<::test_protocolrequest::Parent::TakeChildRequest>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_protocolrequest::ParentTakeChildRequestRequest;
};
#endif // __Fuchsia__
template <>
class ::fidl::internal::NaturalCompleterBase<::test_protocolrequest::Parent::GetChild> : public ::fidl::CompleterBase {
public:
void Reply(::fidl::Response<::test_protocolrequest::Parent::GetChild>&& response);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
template <>
class ::fidl::internal::NaturalCompleterBase<::test_protocolrequest::Parent::GetChildRequest> : public ::fidl::CompleterBase {
public:
void Reply(::fidl::Response<::test_protocolrequest::Parent::GetChildRequest>&& response);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
template <>
class ::fidl::Server<::test_protocolrequest::Parent> : public ::fidl::internal::IncomingMessageDispatcher {
public:
Server() = default;
virtual ~Server() = default;
// The FIDL protocol type that is implemented by this server.
using _EnclosingProtocol = ::test_protocolrequest::Parent;
using GetChildRequest = ::fidl::Request<::test_protocolrequest::Parent::GetChild>;
using GetChildCompleter = ::fidl::internal::NaturalCompleter<::test_protocolrequest::Parent::GetChild>;
virtual void GetChild(GetChildRequest& request, GetChildCompleter::Sync& completer) = 0;
using GetChildRequestRequest = ::fidl::Request<::test_protocolrequest::Parent::GetChildRequest>;
using GetChildRequestCompleter = ::fidl::internal::NaturalCompleter<::test_protocolrequest::Parent::GetChildRequest>;
virtual void GetChildRequest(GetChildRequestRequest& request, GetChildRequestCompleter::Sync& completer) = 0;
using TakeChildRequest = ::fidl::Request<::test_protocolrequest::Parent::TakeChild>;
using TakeChildCompleter = ::fidl::internal::NaturalCompleter<::test_protocolrequest::Parent::TakeChild>;
virtual void TakeChild(TakeChildRequest& request, TakeChildCompleter::Sync& completer) = 0;
using TakeChildRequestRequest = ::fidl::Request<::test_protocolrequest::Parent::TakeChildRequest>;
using TakeChildRequestCompleter = ::fidl::internal::NaturalCompleter<::test_protocolrequest::Parent::TakeChildRequest>;
virtual void TakeChildRequest(TakeChildRequestRequest& request, TakeChildRequestCompleter::Sync& completer) = 0;
private:
void dispatch_message(
::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn,
::fidl::internal::MessageStorageViewBase* storage_view) final;
};
#ifdef __Fuchsia__
template <>
struct ::fidl::internal::NaturalServerDispatcher<::test_protocolrequest::Parent> final {
NaturalServerDispatcher() = delete;
static void Dispatch(::fidl::Server<::test_protocolrequest::Parent>* impl, ::fidl::IncomingMessage&& msg,
internal::MessageStorageViewBase* storage_view,
::fidl::Transaction* txn);
private:
static const ::fidl::internal::MethodEntry entries_[];
static const ::fidl::internal::MethodEntry* entries_end_;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalClientImpl<::test_protocolrequest::Child> final : public ::fidl::internal::NaturalClientBase {
public:
using NaturalClientBase::NaturalClientBase;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalSyncClientImpl<::test_protocolrequest::Child> final
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_protocolrequest::Child>> {
public:
private:
::fidl::UnownedClientEnd<::test_protocolrequest::Child> _client_end() const {
return ::fidl::UnownedClientEnd<::test_protocolrequest::Child>(
_transport().get<::fidl::internal::ChannelTransport>());
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Child> : public ::fidl::internal::BaseEventHandlerInterface {
public:
NaturalEventHandlerInterface() = default;
virtual ~NaturalEventHandlerInterface() = default;
};
template <>
class ::fidl::AsyncEventHandler<::test_protocolrequest::Child>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Child>, public ::fidl::internal::AsyncEventHandler {
public:
AsyncEventHandler() = default;
};
template <>
class ::fidl::SyncEventHandler<::test_protocolrequest::Child>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Child>, 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_protocolrequest::Child> client_end);
};
template <>
class ::fidl::internal::NaturalEventDispatcher<::test_protocolrequest::Child> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Child>> {
public:
explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_protocolrequest::Child>* event_handler)
: IncomingEventDispatcher(event_handler) {}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalWeakEventSender<::test_protocolrequest::Child> : public ::fidl::internal::WeakEventSenderBase {
public:
using WeakEventSenderBase::WeakEventSenderBase;
};
template <>
class ::fidl::internal::NaturalEventSender<::test_protocolrequest::Child>
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_protocolrequest::Child>> {
public:
using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer;
};
#endif // __Fuchsia__
template <>
class ::fidl::Server<::test_protocolrequest::Child> : public ::fidl::internal::IncomingMessageDispatcher {
public:
Server() = default;
virtual ~Server() = default;
// The FIDL protocol type that is implemented by this server.
using _EnclosingProtocol = ::test_protocolrequest::Child;
private:
void dispatch_message(
::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn,
::fidl::internal::MessageStorageViewBase* storage_view) final;
};
#ifdef __Fuchsia__
template <>
struct ::fidl::internal::NaturalServerDispatcher<::test_protocolrequest::Child> final {
NaturalServerDispatcher() = delete;
static void Dispatch(::fidl::Server<::test_protocolrequest::Child>* impl, ::fidl::IncomingMessage&& msg,
internal::MessageStorageViewBase* storage_view,
::fidl::Transaction* txn);
private:
static const ::fidl::internal::MethodEntry entries_[];
static const ::fidl::internal::MethodEntry* entries_end_;
};
#endif // __Fuchsia__