| // 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/wire_types.h> |
| #include <lib/fidl/cpp/wire/wire_messaging.h> |
| |
| #ifdef __Fuchsia__ |
| |
| #include <lib/fidl/cpp/wire/client.h> |
| #include <lib/fidl/cpp/wire/connect_service.h> |
| #include <lib/fidl/cpp/wire/server.h> |
| #include <lib/fidl/cpp/wire/service_handler.h> |
| #include <lib/fidl/cpp/wire/sync_call.h> |
| #include <lib/fidl/cpp/wire/unknown_interaction_handler.h> |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_inheritance { |
| |
| class Super; |
| |
| class Sub; |
| |
| } // namespace test_inheritance |
| |
| template <> |
| struct ::fidl::internal::WireOrdinal<::test_inheritance::Super::Foo> final { |
| static constexpr uint64_t value = 7540745593380780216lu; |
| }; |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::WireMethodTypes<::test_inheritance::Super::Foo> { |
| static constexpr bool HasRequestPayload = true; |
| using Request = ::test_inheritance::wire::SuperFooRequest; |
| using Response = ::test_inheritance::wire::SuperFooResponse; |
| |
| using Completer = fidl::Completer<::fidl::internal::WireCompleterBase<::test_inheritance::Super::Foo>>; |
| using Thenable = ::fidl::internal::WireThenableImpl< |
| ::test_inheritance::Super::Foo, |
| ::fidl::internal::OwnedEncodedMessage< |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, ::fidl::internal::ChannelTransport>>; |
| |
| using BufferThenable = ::fidl::internal::WireThenableImpl< |
| ::test_inheritance::Super::Foo, |
| ::fidl::internal::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, ::fidl::internal::ChannelTransport>>; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| namespace test_inheritance { |
| |
| } // namespace test_inheritance |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::ProtocolDetails<::test_inheritance::Super> { |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::WireServerDispatcher<::test_inheritance::Super> final { |
| WireServerDispatcher() = delete; |
| static ::fidl::DispatchResult TryDispatch(::fidl::WireServer<::test_inheritance::Super>* impl, ::fidl::IncomingHeaderAndMessage& msg, |
| internal::MessageStorageViewBase* storage_view, |
| ::fidl::Transaction* txn); |
| static void Dispatch(::fidl::WireServer<::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__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo> final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t header; |
| |
| ::test_inheritance::wire::SuperFooRequest body; |
| explicit TransactionalRequest(::fidl::StringView s) |
| : body(::test_inheritance::wire::SuperFooRequest{s}) { |
| _InitHeader(); |
| } |
| TransactionalRequest() { |
| _InitHeader(); |
| } |
| using ResponseType = ::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>; |
| |
| private: |
| void _InitHeader(); |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 16 + sizeof(fidl_message_header_t); |
| |
| static void Encode(internal::WireEncoder* encoder, ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| *position.As<fidl_message_header_t>() = value->header; |
| WireCodingTraits<::test_inheritance::wire::SuperFooRequest, WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, &value->body, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| WireCodingTraits<::test_inheritance::wire::SuperFooRequest, WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| struct ::fidl::WireResponse<::test_inheritance::Super::Foo> final : public ::test_inheritance::wire::SuperFooResponse { |
| explicit WireResponse(::test_inheritance::wire::SuperFooResponse base) : ::test_inheritance::wire::SuperFooResponse(std::move(base)) {} |
| explicit WireResponse(int64_t y) : ::test_inheritance::wire::SuperFooResponse{.y = std::move(y)} {} |
| WireResponse() = default; |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::WireResponse<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::WireResponse<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 8; |
| |
| static void Encode( |
| internal::WireEncoder* encoder, ::fidl::WireResponse<::test_inheritance::Super::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| fidl::internal::WireCodingTraits<::test_inheritance::wire::SuperFooResponse, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, value, position, recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| fidl::internal::WireCodingTraits<::test_inheritance::wire::SuperFooResponse, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position, recursion_depth); |
| } |
| }; |
| |
| template <> |
| struct ::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo> final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t header; |
| |
| ::fidl::WireResponse<::test_inheritance::Super::Foo> body; |
| explicit TransactionalResponse(int64_t y) |
| : body(::fidl::WireResponse<::test_inheritance::Super::Foo>(y)) { |
| _InitHeader(); |
| } |
| TransactionalResponse() { |
| _InitHeader(); |
| } |
| |
| private: |
| void _InitHeader(); |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 8 + sizeof(fidl_message_header_t); |
| |
| static void Encode(internal::WireEncoder* encoder, ::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| *position.As<fidl_message_header_t>() = value->header; |
| WireCodingTraits<::fidl::WireResponse<::test_inheritance::Super::Foo>, WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, &value->body, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| WireCodingTraits<::fidl::WireResponse<::test_inheritance::Super::Foo>, WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| }; |
| |
| namespace fidl { |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct IsFidlType<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlTransactionalMessage<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = FIDL_ALIGN(16 + sizeof(fidl_message_header_t)); |
| static constexpr uint32_t kMaxOutOfLine = 4294967295; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kRequest; |
| }; |
| |
| static_assert(sizeof(::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>) == TypeTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, header) == 0); |
| static_assert(offsetof(::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>, body) == sizeof(fidl_message_header_t)); |
| static_assert(sizeof(::test_inheritance::wire::SuperFooRequest) == TypeTraits<::test_inheritance::wire::SuperFooRequest>::kPrimarySize); |
| static_assert(offsetof(::test_inheritance::wire::SuperFooRequest, s) == 0); |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| struct IsFidlType<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlTransactionalMessage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlType<::fidl::WireResponse<::test_inheritance::Super::Foo>> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> { |
| static constexpr bool kHasServerToClientBody = true; |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = FIDL_ALIGN(8 + sizeof(fidl_message_header_t)); |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| |
| static_assert(sizeof(::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>) == TypeTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>, header) == 0); |
| static_assert(offsetof(::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>, body) == sizeof(fidl_message_header_t)); |
| template <> |
| struct TypeTraits<::fidl::WireResponse<::test_inheritance::Super::Foo>> { |
| static constexpr bool kHasServerToClientBody = true; |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 8; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| static_assert(sizeof(::fidl::WireResponse<::test_inheritance::Super::Foo>) == TypeTraits<::fidl::WireResponse<::test_inheritance::Super::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::WireResponse<::test_inheritance::Super::Foo>, y) == 0); |
| #ifdef __Fuchsia__ |
| } // namespace fidl |
| |
| template <> |
| struct ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> final |
| : public ::fidl::internal::ChannelHandleStorageBase<::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>>> { |
| static constexpr uint32_t kNumHandles = |
| fidl::internal::ClampedHandleCount<::fidl::WireResponse<::test_inheritance::Super::Foo>, fidl::MessageDirection::kReceiving>(); |
| |
| ::std::array<zx_handle_t, kNumHandles> handles_; |
| ::std::array<fidl_channel_handle_metadata_t, kNumHandles> handle_metadata_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> final |
| : public ::fidl::internal::ChannelMessageStorageBase<::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>>> { |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Super::Foo>> handles_storage_; |
| }; |
| template <> |
| struct ::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Super> final : public ::fidl::internal::ChannelHandleStorageBase<::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Super>> { |
| public: |
| static constexpr uint32_t kNumHandles = 0; |
| |
| ::std::array<zx_handle_t, kNumHandles> handles_; |
| ::std::array<fidl_channel_handle_metadata_t, kNumHandles> handle_metadata_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::IncomingEventsStorage<::test_inheritance::Super> final : public ::fidl::internal::ChannelMessageStorageBase<::fidl::internal::IncomingEventsStorage<::test_inheritance::Super>> { |
| public: |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Super> handles_storage_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::WireResultUnwrap<::test_inheritance::Super::Foo> { |
| using Type = ::fidl::WireResponse<::test_inheritance::Super::Foo>; |
| }; |
| |
| template <> |
| class [[nodiscard]] ::fidl::WireResult<::test_inheritance::Super::Foo> final : public ::fidl::BaseWireResult<::test_inheritance::Super::Foo> { |
| public: |
| WireResult( |
| ::fidl::UnownedClientEnd<::test_inheritance::Super> client, |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>* request); |
| |
| explicit WireResult(const ::fidl::Status& result) : ::fidl::BaseWireResult<::test_inheritance::Super::Foo>(result) {} |
| WireResult(WireResult&&) = delete; |
| WireResult(const WireResult&) = delete; |
| WireResult& operator=(WireResult&&) = delete; |
| WireResult& operator=(const WireResult&) = delete; |
| ~WireResult() = default; |
| |
| private: |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Super::Foo>> decoded_; |
| }; |
| |
| template <> |
| class [[nodiscard]] ::fidl::WireUnownedResult<::test_inheritance::Super::Foo> final : public ::fidl::BaseWireResult<::test_inheritance::Super::Foo> { |
| public: |
| explicit WireUnownedResult(::fidl::UnownedClientEnd<::test_inheritance::Super> client_end, ::fidl::internal::AnyBufferAllocator& allocator, ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo>* request); |
| explicit WireUnownedResult(::fidl::WireResponse<::test_inheritance::Super::Foo>* response) |
| : ::fidl::BaseWireResult<::test_inheritance::Super::Foo>(fidl::Status::Ok()), decoded_(response) { |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| |
| explicit WireUnownedResult( |
| ::fit::result<::fidl::Error, ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Super::Foo>>>&& decoded, |
| ::fidl::internal::MessageStorageViewBase* storage_view) : ::fidl::BaseWireResult<::test_inheritance::Super::Foo>(::fidl::internal::StatusFromResult(decoded)) { |
| if (decoded.is_ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| |
| explicit WireUnownedResult(const ::fidl::Status& result) : ::fidl::BaseWireResult<::test_inheritance::Super::Foo>(result) {} |
| WireUnownedResult(WireUnownedResult&&) = default; |
| WireUnownedResult(const WireUnownedResult&) = delete; |
| WireUnownedResult& operator=(WireUnownedResult&&) = default; |
| WireUnownedResult& operator=(const WireUnownedResult&) = delete; |
| ~WireUnownedResult() = default; |
| |
| private: |
| ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Super::Foo>> decoded_; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Super> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| WireEventHandlerInterface() = default; |
| virtual ~WireEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fidl::WireAsyncEventHandler<::test_inheritance::Super> |
| : public ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Super>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| WireAsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::WireSyncEventHandler<::test_inheritance::Super> |
| : public ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Super>, public ::fidl::internal::SyncEventHandler { |
| public: |
| WireSyncEventHandler() = 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::WireEventDispatcher<::test_inheritance::Super> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::WireEventHandlerInterface<::test_inheritance::Super>> { |
| public: |
| explicit WireEventDispatcher(::fidl::internal::WireEventHandlerInterface<::test_inheritance::Super>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned handle or a |
| // const reference to a |::fidl::ClientEnd<::test_inheritance::Super>|, |
| // avoiding setting up a client. |
| template <> |
| class ::fidl::internal::WireSyncClientImpl<::test_inheritance::Super> final : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::WireSyncClientImpl<::test_inheritance::Super>> { |
| public: |
| // Allocates 24 bytes of response buffer on the stack. Request is heap-allocated. |
| ::fidl::WireResult<::test_inheritance::Super::Foo> |
| Foo(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo> _request{s}; |
| return ::fidl::WireResult<::test_inheritance::Super::Foo>(_client_end(), &_request); |
| } |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_inheritance::Super> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_inheritance::Super>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| |
| template <> |
| class ::fidl::internal::WireSyncBufferClientImpl<::test_inheritance::Super> final : public ::fidl::internal::SyncEndpointBufferVeneer<::fidl::internal::WireSyncBufferClientImpl<::test_inheritance::Super>> { |
| public: |
| // Caller provides the backing storage for FIDL message via an argument to `.buffer()`. |
| ::fidl::WireUnownedResult<::test_inheritance::Super::Foo> |
| Foo(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Super::Foo> _request{s}; |
| return ::fidl::WireUnownedResult<::test_inheritance::Super::Foo>(_client_end(), _allocator(), &_request); |
| } |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_inheritance::Super> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_inheritance::Super>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| |
| template <> |
| class ::fidl::internal::WireCompleterImpl<::test_inheritance::Super::Foo> : public ::fidl::internal::CompleterImplBase<::test_inheritance::Super::Foo> { |
| public: |
| using CompleterImplBase::CompleterImplBase; |
| |
| void Reply(int64_t y); |
| |
| private: |
| void MakeReply(int64_t y); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireBufferCompleterImpl<::test_inheritance::Super::Foo> : public ::fidl::internal::BufferCompleterImplBase { |
| public: |
| using BufferCompleterImplBase::BufferCompleterImplBase; |
| |
| void Reply(int64_t y); |
| |
| private: |
| void MakeReply(int64_t y); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireCompleterBase<::test_inheritance::Super::Foo> : public ::fidl::CompleterBase, public ::fidl::internal::WireCompleterImpl<::test_inheritance::Super::Foo> { |
| public: |
| WireCompleterBase(::fidl::Transaction* transaction, bool owned, bool expects_reply) |
| : CompleterBase(transaction, owned, expects_reply), |
| WireCompleterImpl(this) {} |
| WireCompleterBase(WireCompleterBase&& other) noexcept |
| : CompleterBase(std::move(other)), WireCompleterImpl(this) {} |
| WireCompleterBase& operator=(WireCompleterBase&& other) noexcept { |
| CompleterBase::operator=(std::move(other)); |
| WireCompleterImpl::_set_core(this); |
| return *this; |
| } |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| // This interface uses typed channels (i.e. |::fidl::ClientEnd<::test_inheritance::Super>| |
| // and |::fidl::ServerEnd<::test_inheritance::Super>|). |
| template <> |
| class ::fidl::WireServer<::test_inheritance::Super> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| WireServer() = default; |
| virtual ~WireServer() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_inheritance::Super; |
| |
| using Handler = fidl::ProtocolHandler<::test_inheritance::Super>; |
| |
| using FooCompleter = ::fidl::internal::WireCompleter<::test_inheritance::Super::Foo>; |
| using FooRequestView = ::test_inheritance::wire::SuperFooRequest*; |
| |
| virtual void Foo( |
| ::test_inheritance::wire::SuperFooRequest* 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; |
| }; |
| namespace fidl { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace fidl |
| |
| template <> |
| struct ::fidl::internal::WireOrdinal<::test_inheritance::Sub::Foo> final { |
| static constexpr uint64_t value = 7540745593380780216lu; |
| }; |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::WireMethodTypes<::test_inheritance::Sub::Foo> { |
| static constexpr bool HasRequestPayload = true; |
| using Request = ::test_inheritance::wire::SuperFooRequest; |
| using Response = ::test_inheritance::wire::SuperFooResponse; |
| |
| using Completer = fidl::Completer<::fidl::internal::WireCompleterBase<::test_inheritance::Sub::Foo>>; |
| using Thenable = ::fidl::internal::WireThenableImpl< |
| ::test_inheritance::Sub::Foo, |
| ::fidl::internal::OwnedEncodedMessage< |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, ::fidl::internal::ChannelTransport>>; |
| |
| using BufferThenable = ::fidl::internal::WireThenableImpl< |
| ::test_inheritance::Sub::Foo, |
| ::fidl::internal::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, ::fidl::internal::ChannelTransport>>; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| namespace test_inheritance { |
| |
| } // namespace test_inheritance |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::ProtocolDetails<::test_inheritance::Sub> { |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct ::fidl::internal::WireServerDispatcher<::test_inheritance::Sub> final { |
| WireServerDispatcher() = delete; |
| static ::fidl::DispatchResult TryDispatch(::fidl::WireServer<::test_inheritance::Sub>* impl, ::fidl::IncomingHeaderAndMessage& msg, |
| internal::MessageStorageViewBase* storage_view, |
| ::fidl::Transaction* txn); |
| static void Dispatch(::fidl::WireServer<::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__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo> final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t header; |
| |
| ::test_inheritance::wire::SuperFooRequest body; |
| explicit TransactionalRequest(::fidl::StringView s) |
| : body(::test_inheritance::wire::SuperFooRequest{s}) { |
| _InitHeader(); |
| } |
| TransactionalRequest() { |
| _InitHeader(); |
| } |
| using ResponseType = ::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>; |
| |
| private: |
| void _InitHeader(); |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 16 + sizeof(fidl_message_header_t); |
| |
| static void Encode(internal::WireEncoder* encoder, ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| *position.As<fidl_message_header_t>() = value->header; |
| WireCodingTraits<::test_inheritance::wire::SuperFooRequest, WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, &value->body, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| WireCodingTraits<::test_inheritance::wire::SuperFooRequest, WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| struct ::fidl::WireResponse<::test_inheritance::Sub::Foo> final : public ::test_inheritance::wire::SuperFooResponse { |
| explicit WireResponse(::test_inheritance::wire::SuperFooResponse base) : ::test_inheritance::wire::SuperFooResponse(std::move(base)) {} |
| explicit WireResponse(int64_t y) : ::test_inheritance::wire::SuperFooResponse{.y = std::move(y)} {} |
| WireResponse() = default; |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::WireResponse<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::WireResponse<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 8; |
| |
| static void Encode( |
| internal::WireEncoder* encoder, ::fidl::WireResponse<::test_inheritance::Sub::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| fidl::internal::WireCodingTraits<::test_inheritance::wire::SuperFooResponse, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, value, position, recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| fidl::internal::WireCodingTraits<::test_inheritance::wire::SuperFooResponse, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position, recursion_depth); |
| } |
| }; |
| |
| template <> |
| struct ::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo> final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t header; |
| |
| ::fidl::WireResponse<::test_inheritance::Sub::Foo> body; |
| explicit TransactionalResponse(int64_t y) |
| : body(::fidl::WireResponse<::test_inheritance::Sub::Foo>(y)) { |
| _InitHeader(); |
| } |
| TransactionalResponse() { |
| _InitHeader(); |
| } |
| |
| private: |
| void _InitHeader(); |
| }; |
| |
| template <bool IsRecursive> |
| struct ::fidl::internal::WireCodingTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> |
| : public WireStructCodingTraitsBase<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>, ::fidl::internal::WireCodingConstraintEmpty, IsRecursive> { |
| static constexpr size_t kInlineSize = 8 + sizeof(fidl_message_header_t); |
| |
| static void Encode(internal::WireEncoder* encoder, ::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>* value, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| *position.As<fidl_message_header_t>() = value->header; |
| WireCodingTraits<::fidl::WireResponse<::test_inheritance::Sub::Foo>, WireCodingConstraintEmpty, IsRecursive>::Encode( |
| encoder, &value->body, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| static void Decode( |
| internal::WireDecoder* decoder, ::fidl::internal::WirePosition position, RecursionDepth<IsRecursive> recursion_depth) { |
| WireCodingTraits<::fidl::WireResponse<::test_inheritance::Sub::Foo>, WireCodingConstraintEmpty, IsRecursive>::Decode( |
| decoder, position + sizeof(fidl_message_header_t), recursion_depth); |
| } |
| }; |
| |
| namespace fidl { |
| |
| #ifdef __Fuchsia__ |
| template <> |
| struct IsFidlType<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlTransactionalMessage<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = FIDL_ALIGN(16 + sizeof(fidl_message_header_t)); |
| static constexpr uint32_t kMaxOutOfLine = 4294967295; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kRequest; |
| }; |
| |
| static_assert(sizeof(::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>) == TypeTraits<::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, header) == 0); |
| static_assert(offsetof(::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>, body) == sizeof(fidl_message_header_t)); |
| static_assert(sizeof(::test_inheritance::wire::SuperFooRequest) == TypeTraits<::test_inheritance::wire::SuperFooRequest>::kPrimarySize); |
| static_assert(offsetof(::test_inheritance::wire::SuperFooRequest, s) == 0); |
| |
| #endif // __Fuchsia__ |
| |
| template <> |
| struct IsFidlType<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlTransactionalMessage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> : public std::true_type {}; |
| template <> |
| struct IsFidlType<::fidl::WireResponse<::test_inheritance::Sub::Foo>> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> { |
| static constexpr bool kHasServerToClientBody = true; |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = FIDL_ALIGN(8 + sizeof(fidl_message_header_t)); |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| |
| static_assert(sizeof(::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>) == TypeTraits<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>, header) == 0); |
| static_assert(offsetof(::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>, body) == sizeof(fidl_message_header_t)); |
| template <> |
| struct TypeTraits<::fidl::WireResponse<::test_inheritance::Sub::Foo>> { |
| static constexpr bool kHasServerToClientBody = true; |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 8; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasFlexibleEnvelope = false; |
| static constexpr bool kHasPointer = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind kMessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| static_assert(sizeof(::fidl::WireResponse<::test_inheritance::Sub::Foo>) == TypeTraits<::fidl::WireResponse<::test_inheritance::Sub::Foo>>::kPrimarySize); |
| static_assert(offsetof(::fidl::WireResponse<::test_inheritance::Sub::Foo>, y) == 0); |
| #ifdef __Fuchsia__ |
| } // namespace fidl |
| |
| template <> |
| struct ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> final |
| : public ::fidl::internal::ChannelHandleStorageBase<::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>>> { |
| static constexpr uint32_t kNumHandles = |
| fidl::internal::ClampedHandleCount<::fidl::WireResponse<::test_inheritance::Sub::Foo>, fidl::MessageDirection::kReceiving>(); |
| |
| ::std::array<zx_handle_t, kNumHandles> handles_; |
| ::std::array<fidl_channel_handle_metadata_t, kNumHandles> handle_metadata_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> final |
| : public ::fidl::internal::ChannelMessageStorageBase<::fidl::internal::IncomingMessageStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>>> { |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::internal::IncomingMessageHandleStorage<::fidl::internal::TransactionalResponse<::test_inheritance::Sub::Foo>> handles_storage_; |
| }; |
| template <> |
| struct ::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Sub> final : public ::fidl::internal::ChannelHandleStorageBase<::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Sub>> { |
| public: |
| static constexpr uint32_t kNumHandles = 0; |
| |
| ::std::array<zx_handle_t, kNumHandles> handles_; |
| ::std::array<fidl_channel_handle_metadata_t, kNumHandles> handle_metadata_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::IncomingEventsStorage<::test_inheritance::Sub> final : public ::fidl::internal::ChannelMessageStorageBase<::fidl::internal::IncomingEventsStorage<::test_inheritance::Sub>> { |
| public: |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::internal::IncomingEventsHandleStorage<::test_inheritance::Sub> handles_storage_; |
| }; |
| |
| template <> |
| struct ::fidl::internal::WireResultUnwrap<::test_inheritance::Sub::Foo> { |
| using Type = ::fidl::WireResponse<::test_inheritance::Sub::Foo>; |
| }; |
| |
| template <> |
| class [[nodiscard]] ::fidl::WireResult<::test_inheritance::Sub::Foo> final : public ::fidl::BaseWireResult<::test_inheritance::Sub::Foo> { |
| public: |
| WireResult( |
| ::fidl::UnownedClientEnd<::test_inheritance::Sub> client, |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>* request); |
| |
| explicit WireResult(const ::fidl::Status& result) : ::fidl::BaseWireResult<::test_inheritance::Sub::Foo>(result) {} |
| WireResult(WireResult&&) = delete; |
| WireResult(const WireResult&) = delete; |
| WireResult& operator=(WireResult&&) = delete; |
| WireResult& operator=(const WireResult&) = delete; |
| ~WireResult() = default; |
| |
| private: |
| ::fidl::internal::InlineMessageBuffer<24> bytes_; |
| ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Sub::Foo>> decoded_; |
| }; |
| |
| template <> |
| class [[nodiscard]] ::fidl::WireUnownedResult<::test_inheritance::Sub::Foo> final : public ::fidl::BaseWireResult<::test_inheritance::Sub::Foo> { |
| public: |
| explicit WireUnownedResult(::fidl::UnownedClientEnd<::test_inheritance::Sub> client_end, ::fidl::internal::AnyBufferAllocator& allocator, ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo>* request); |
| explicit WireUnownedResult(::fidl::WireResponse<::test_inheritance::Sub::Foo>* response) |
| : ::fidl::BaseWireResult<::test_inheritance::Sub::Foo>(fidl::Status::Ok()), decoded_(response) { |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| |
| explicit WireUnownedResult( |
| ::fit::result<::fidl::Error, ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Sub::Foo>>>&& decoded, |
| ::fidl::internal::MessageStorageViewBase* storage_view) : ::fidl::BaseWireResult<::test_inheritance::Sub::Foo>(::fidl::internal::StatusFromResult(decoded)) { |
| if (decoded.is_ok()) { |
| decoded_ = std::move(decoded.value()); |
| ExtractValueFromDecoded(decoded_.pointer()); |
| } |
| } |
| |
| explicit WireUnownedResult(const ::fidl::Status& result) : ::fidl::BaseWireResult<::test_inheritance::Sub::Foo>(result) {} |
| WireUnownedResult(WireUnownedResult&&) = default; |
| WireUnownedResult(const WireUnownedResult&) = delete; |
| WireUnownedResult& operator=(WireUnownedResult&&) = default; |
| WireUnownedResult& operator=(const WireUnownedResult&) = delete; |
| ~WireUnownedResult() = default; |
| |
| private: |
| ::fidl::DecodedValue<::fidl::WireResponse<::test_inheritance::Sub::Foo>> decoded_; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Sub> : public ::fidl::internal::BaseEventHandlerInterface { |
| public: |
| WireEventHandlerInterface() = default; |
| virtual ~WireEventHandlerInterface() = default; |
| }; |
| |
| template <> |
| class ::fidl::WireAsyncEventHandler<::test_inheritance::Sub> |
| : public ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Sub>, public ::fidl::internal::AsyncEventHandler { |
| public: |
| WireAsyncEventHandler() = default; |
| }; |
| |
| template <> |
| class ::fidl::WireSyncEventHandler<::test_inheritance::Sub> |
| : public ::fidl::internal::WireEventHandlerInterface<::test_inheritance::Sub>, public ::fidl::internal::SyncEventHandler { |
| public: |
| WireSyncEventHandler() = 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::WireEventDispatcher<::test_inheritance::Sub> final : public ::fidl::internal::IncomingEventDispatcher<::fidl::internal::WireEventHandlerInterface<::test_inheritance::Sub>> { |
| public: |
| explicit WireEventDispatcher(::fidl::internal::WireEventHandlerInterface<::test_inheritance::Sub>* event_handler) |
| : IncomingEventDispatcher(event_handler) {} |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned handle or a |
| // const reference to a |::fidl::ClientEnd<::test_inheritance::Sub>|, |
| // avoiding setting up a client. |
| template <> |
| class ::fidl::internal::WireSyncClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::WireSyncClientImpl<::test_inheritance::Sub>> { |
| public: |
| // Allocates 24 bytes of response buffer on the stack. Request is heap-allocated. |
| ::fidl::WireResult<::test_inheritance::Sub::Foo> |
| Foo(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo> _request{s}; |
| return ::fidl::WireResult<::test_inheritance::Sub::Foo>(_client_end(), &_request); |
| } |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_inheritance::Sub> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_inheritance::Sub>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| |
| template <> |
| class ::fidl::internal::WireSyncBufferClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::SyncEndpointBufferVeneer<::fidl::internal::WireSyncBufferClientImpl<::test_inheritance::Sub>> { |
| public: |
| // Caller provides the backing storage for FIDL message via an argument to `.buffer()`. |
| ::fidl::WireUnownedResult<::test_inheritance::Sub::Foo> |
| Foo(::fidl::StringView s) { |
| ::fidl::internal::TransactionalRequest<::test_inheritance::Sub::Foo> _request{s}; |
| return ::fidl::WireUnownedResult<::test_inheritance::Sub::Foo>(_client_end(), _allocator(), &_request); |
| } |
| |
| private: |
| ::fidl::UnownedClientEnd<::test_inheritance::Sub> _client_end() const { |
| return ::fidl::UnownedClientEnd<::test_inheritance::Sub>( |
| _transport().get<::fidl::internal::ChannelTransport>()); |
| } |
| }; |
| |
| template <> |
| class ::fidl::internal::WireCompleterImpl<::test_inheritance::Sub::Foo> : public ::fidl::internal::CompleterImplBase<::test_inheritance::Sub::Foo> { |
| public: |
| using CompleterImplBase::CompleterImplBase; |
| |
| void Reply(int64_t y); |
| |
| private: |
| void MakeReply(int64_t y); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireBufferCompleterImpl<::test_inheritance::Sub::Foo> : public ::fidl::internal::BufferCompleterImplBase { |
| public: |
| using BufferCompleterImplBase::BufferCompleterImplBase; |
| |
| void Reply(int64_t y); |
| |
| private: |
| void MakeReply(int64_t y); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireCompleterBase<::test_inheritance::Sub::Foo> : public ::fidl::CompleterBase, public ::fidl::internal::WireCompleterImpl<::test_inheritance::Sub::Foo> { |
| public: |
| WireCompleterBase(::fidl::Transaction* transaction, bool owned, bool expects_reply) |
| : CompleterBase(transaction, owned, expects_reply), |
| WireCompleterImpl(this) {} |
| WireCompleterBase(WireCompleterBase&& other) noexcept |
| : CompleterBase(std::move(other)), WireCompleterImpl(this) {} |
| WireCompleterBase& operator=(WireCompleterBase&& other) noexcept { |
| CompleterBase::operator=(std::move(other)); |
| WireCompleterImpl::_set_core(this); |
| return *this; |
| } |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| // This interface uses typed channels (i.e. |::fidl::ClientEnd<::test_inheritance::Sub>| |
| // and |::fidl::ServerEnd<::test_inheritance::Sub>|). |
| template <> |
| class ::fidl::WireServer<::test_inheritance::Sub> : public ::fidl::internal::IncomingMessageDispatcher { |
| public: |
| WireServer() = default; |
| virtual ~WireServer() = default; |
| |
| // The FIDL protocol type that is implemented by this server. |
| using _EnclosingProtocol = ::test_inheritance::Sub; |
| |
| using Handler = fidl::ProtocolHandler<::test_inheritance::Sub>; |
| |
| using FooCompleter = ::fidl::internal::WireCompleter<::test_inheritance::Sub::Foo>; |
| using FooRequestView = ::test_inheritance::wire::SuperFooRequest*; |
| |
| virtual void Foo( |
| ::test_inheritance::wire::SuperFooRequest* 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; |
| }; |
| namespace fidl { |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Super> : public ::fidl::internal::ClientImplBase { |
| public: |
| using ClientImplBase::ClientImplBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakAsyncClientImpl<::test_inheritance::Super> final : public ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Super> { |
| public: |
| using WireWeakOnewayClientImpl::WireWeakOnewayClientImpl; |
| // The request and callback are allocated on the heap. |
| ::fidl::internal::WireThenable<::test_inheritance::Super::Foo> Foo(::fidl::StringView s); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_inheritance::Super> : public ::fidl::internal::BufferClientImplBase { |
| public: |
| using BufferClientImplBase::BufferClientImplBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakAsyncBufferClientImpl<::test_inheritance::Super> final : public ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_inheritance::Super> { |
| public: |
| using WireWeakOnewayBufferClientImpl::WireWeakOnewayBufferClientImpl; |
| |
| // Caller provides the backing storage for FIDL message. |
| ::fidl::internal::WireBufferThenable<::test_inheritance::Super::Foo> Foo(::fidl::StringView s); |
| }; |
| template <> |
| class ::fidl::internal::WireWeakSyncClientImpl<::test_inheritance::Super> final : public ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Super> { |
| public: |
| using WireWeakOnewayClientImpl::WireWeakOnewayClientImpl; |
| |
| // Allocates 24 bytes of response buffer on the stack. Request is heap-allocated. |
| ::fidl::WireResult<::test_inheritance::Super::Foo> Foo(::fidl::StringView s); |
| }; |
| namespace fidl { |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace fidl |
| |
| #ifdef __Fuchsia__ |
| template <> |
| class ::fidl::internal::WireWeakEventSender<::test_inheritance::Super> : public ::fidl::internal::WeakEventSenderBase { |
| public: |
| using WeakEventSenderBase::WeakEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakBufferEventSender<::test_inheritance::Super> : public ::fidl::internal::WeakBufferEventSenderBase { |
| public: |
| using WeakBufferEventSenderBase::WeakBufferEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireEventSender<::test_inheritance::Super> |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::WireEventSender<::test_inheritance::Super>> { |
| public: |
| using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireBufferEventSender<::test_inheritance::Super> |
| : public ::fidl::internal::SyncEndpointBufferVeneer<::fidl::internal::WireBufferEventSender<::test_inheritance::Super>> { |
| public: |
| using SyncEndpointBufferVeneer::SyncEndpointBufferVeneer; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Sub> : public ::fidl::internal::ClientImplBase { |
| public: |
| using ClientImplBase::ClientImplBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakAsyncClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Sub> { |
| public: |
| using WireWeakOnewayClientImpl::WireWeakOnewayClientImpl; |
| // The request and callback are allocated on the heap. |
| ::fidl::internal::WireThenable<::test_inheritance::Sub::Foo> Foo(::fidl::StringView s); |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_inheritance::Sub> : public ::fidl::internal::BufferClientImplBase { |
| public: |
| using BufferClientImplBase::BufferClientImplBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakAsyncBufferClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::WireWeakOnewayBufferClientImpl<::test_inheritance::Sub> { |
| public: |
| using WireWeakOnewayBufferClientImpl::WireWeakOnewayBufferClientImpl; |
| |
| // Caller provides the backing storage for FIDL message. |
| ::fidl::internal::WireBufferThenable<::test_inheritance::Sub::Foo> Foo(::fidl::StringView s); |
| }; |
| template <> |
| class ::fidl::internal::WireWeakSyncClientImpl<::test_inheritance::Sub> final : public ::fidl::internal::WireWeakOnewayClientImpl<::test_inheritance::Sub> { |
| public: |
| using WireWeakOnewayClientImpl::WireWeakOnewayClientImpl; |
| |
| // Allocates 24 bytes of response buffer on the stack. Request is heap-allocated. |
| ::fidl::WireResult<::test_inheritance::Sub::Foo> Foo(::fidl::StringView s); |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| template <> |
| class ::fidl::internal::WireWeakEventSender<::test_inheritance::Sub> : public ::fidl::internal::WeakEventSenderBase { |
| public: |
| using WeakEventSenderBase::WeakEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireWeakBufferEventSender<::test_inheritance::Sub> : public ::fidl::internal::WeakBufferEventSenderBase { |
| public: |
| using WeakBufferEventSenderBase::WeakBufferEventSenderBase; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireEventSender<::test_inheritance::Sub> |
| : public ::fidl::internal::SyncEndpointManagedVeneer<::fidl::internal::WireEventSender<::test_inheritance::Sub>> { |
| public: |
| using SyncEndpointManagedVeneer::SyncEndpointManagedVeneer; |
| }; |
| |
| template <> |
| class ::fidl::internal::WireBufferEventSender<::test_inheritance::Sub> |
| : public ::fidl::internal::SyncEndpointBufferVeneer<::fidl::internal::WireBufferEventSender<::test_inheritance::Sub>> { |
| public: |
| using SyncEndpointBufferVeneer::SyncEndpointBufferVeneer; |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |