blob: 23a5b174509e39459729cb99db6b7acecf577057 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen_cpp.
#pragma once
#include <fidl/test.nullable/cpp/markers.h>
#include <fidl/test.nullable/cpp/natural_types.h>
#include <fidl/test.nullable/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_nullable::SimpleProtocol::Add> {
using Completer = fidl::Completer<::fidl::internal::NaturalCompleterBase<::test_nullable::SimpleProtocol::Add>>;
using ResultCallback =
::fit::callback<void(::fidl::Result<::test_nullable::SimpleProtocol::Add>&)>;
static constexpr bool HasApplicationError = false;
static constexpr bool HasTransportError = false;
static constexpr bool IsAbsentBody = false;
};
namespace test_nullable {
__LOCAL extern "C" const fidl_type_t test_nullable_SimpleProtocolAddRequestTable;
__LOCAL extern "C" const fidl_type_t test_nullable_SimpleProtocolAddTopResponseTable;
#ifdef __Fuchsia__
} // namespace test_nullable
template <>
class ::fidl::Response<::test_nullable::SimpleProtocol::Add> final : public ::test_nullable::SimpleProtocolAddTopResponse {
public:
using ::test_nullable::SimpleProtocolAddTopResponse::SimpleProtocolAddTopResponse;
Response(::test_nullable::SimpleProtocolAddTopResponse v) : SimpleProtocolAddTopResponse(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Response<::test_nullable::SimpleProtocol::Add>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_nullable::SimpleProtocolAddTopResponse;
};
namespace test_nullable {} // namespace test_nullable
template <>
class ::fidl::Result<::test_nullable::SimpleProtocol::Add> final : public ::fitx::result<::fidl::Error, ::test_nullable::SimpleProtocolAddTopResponse> {
public:
using ::fitx::result<::fidl::Error, ::test_nullable::SimpleProtocolAddTopResponse>::result;
protected:
Result() = default;
};
template <>
class ::fidl::internal::NaturalClientImpl<::test_nullable::SimpleProtocol> final : public ::fidl::internal::NaturalClientBase {
public:
using NaturalClientBase::NaturalClientBase;
::fidl::internal::NaturalThenable<::test_nullable::SimpleProtocol::Add> Add(::fidl::Request<::test_nullable::SimpleProtocol::Add> request) const;
};
namespace test_nullable {
#endif // __Fuchsia__
} // namespace test_nullable
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalSyncClientImpl<::test_nullable::SimpleProtocol> final
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalSyncClientImpl<::test_nullable::SimpleProtocol>> {
public:
::fidl::Result<::test_nullable::SimpleProtocol::Add> Add(::fidl::Request<::test_nullable::SimpleProtocol::Add> request);
private:
::fidl::UnownedClientEnd<::test_nullable::SimpleProtocol> _client_end() const {
return ::fidl::UnownedClientEnd<::test_nullable::SimpleProtocol>(
_transport().get<::fidl::internal::ChannelTransport>());
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalEventHandlerInterface<::test_nullable::SimpleProtocol> : public ::fidl::internal::BaseEventHandlerInterface {
public:
NaturalEventHandlerInterface() = default;
virtual ~NaturalEventHandlerInterface() = default;
};
template <>
class ::fidl::AsyncEventHandler<::test_nullable::SimpleProtocol>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_nullable::SimpleProtocol>, public ::fidl::internal::AsyncEventHandler {
public:
AsyncEventHandler() = default;
};
template <>
class ::fidl::SyncEventHandler<::test_nullable::SimpleProtocol>
: public ::fidl::internal::NaturalEventHandlerInterface<::test_nullable::SimpleProtocol>, 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_nullable::SimpleProtocol> client_end);
};
template <>
class ::fidl::internal::NaturalEventDispatcher<::test_nullable::SimpleProtocol> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::NaturalEventHandlerInterface<::test_nullable::SimpleProtocol>> {
public:
explicit NaturalEventDispatcher(::fidl::internal::NaturalEventHandlerInterface<::test_nullable::SimpleProtocol>* event_handler)
: IncomingEventDispatcher(event_handler) {}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::internal::NaturalWeakEventSender<::test_nullable::SimpleProtocol> : public ::fidl::internal::WeakEventSenderBase {
public:
using WeakEventSenderBase::WeakEventSenderBase;
};
template <>
class ::fidl::internal::NaturalEventSender<::test_nullable::SimpleProtocol>
: public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::NaturalEventSender<::test_nullable::SimpleProtocol>> {
public:
using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
template <>
class ::fidl::Request<::test_nullable::SimpleProtocol::Add> final : public ::test_nullable::SimpleProtocolAddRequest {
public:
using ::test_nullable::SimpleProtocolAddRequest::SimpleProtocolAddRequest;
Request(::test_nullable::SimpleProtocolAddRequest v) : ::test_nullable::SimpleProtocolAddRequest(std::move(v)) {}
};
template <>
struct ::fidl::internal::MessageTraits<::fidl::Request<::test_nullable::SimpleProtocol::Add>> final {
public:
static constexpr bool kHasPayload = true;
using Payload = ::test_nullable::SimpleProtocolAddRequest;
};
#endif // __Fuchsia__
template <>
class ::fidl::internal::NaturalCompleterBase<::test_nullable::SimpleProtocol::Add> : public ::fidl::CompleterBase {
public:
void Reply(::fidl::Response<::test_nullable::SimpleProtocol::Add>&& response);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
template <>
class ::fidl::Server<::test_nullable::SimpleProtocol> : public ::fidl::internal::IncomingMessageDispatcher {
public:
Server() = default;
virtual ~Server() = default;
// The FIDL protocol type that is implemented by this server.
using _EnclosingProtocol = ::test_nullable::SimpleProtocol;
using AddRequest = ::fidl::Request<::test_nullable::SimpleProtocol::Add>;
using AddCompleter = ::fidl::internal::NaturalCompleter<::test_nullable::SimpleProtocol::Add>;
virtual void Add(AddRequest& request, AddCompleter::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_nullable::SimpleProtocol> final {
NaturalServerDispatcher() = delete;
static void Dispatch(::fidl::Server<::test_nullable::SimpleProtocol>* 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__