| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test/emptystruct/llcpp/fidl.h> |
| |
| #include <memory> |
| |
| namespace fidl_test_emptystruct { |
| [[maybe_unused]] constexpr uint64_t kEmptyProtocol_Send_Ordinal = |
| 2183815705502904104lu; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolSendRequestTable; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolSendResponseTable; |
| |
| [[maybe_unused]] constexpr uint64_t kEmptyProtocol_Receive_Ordinal = |
| 5025214662316626400lu; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolReceiveRequestTable; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolReceiveEventTable; |
| |
| [[maybe_unused]] constexpr uint64_t kEmptyProtocol_SendAndReceive_Ordinal = |
| 6253929606062814577lu; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolSendAndReceiveRequestTable; |
| |
| extern "C" const fidl_type_t |
| fidl_test_emptystruct_EmptyProtocolSendAndReceiveResponseTable; |
| #ifdef __Fuchsia__ |
| } // namespace fidl_test_emptystruct |
| ::fidl::WireResult<::fidl_test_emptystruct::EmptyProtocol::Send>::WireResult( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> _client, |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| ::fidl::OwnedEncodedMessage< |
| ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol::Send>> |
| _request(zx_txid_t(0), e); |
| _request.GetOutgoingMessage().Write(_client); |
| status_ = _request.status(); |
| error_ = _request.error(); |
| } |
| namespace fidl_test_emptystruct { |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl_test_emptystruct |
| ::fidl::WireUnownedResult<::fidl_test_emptystruct::EmptyProtocol::Send>:: |
| WireUnownedResult( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> |
| _client, |
| uint8_t* _request_bytes, uint32_t _request_byte_capacity, |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| ::fidl::UnownedEncodedMessage< |
| ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol::Send>> |
| _request(_request_bytes, _request_byte_capacity, 0, e); |
| _request.GetOutgoingMessage().Write(_client); |
| status_ = _request.status(); |
| error_ = _request.error(); |
| } |
| namespace fidl_test_emptystruct { |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl_test_emptystruct |
| ::fidl::WireResult<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| WireResult(::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> |
| _client, |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| ::fidl::OwnedEncodedMessage<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>> |
| _request(zx_txid_t(0), e); |
| _request.GetOutgoingMessage() |
| .Call<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>>( |
| _client, bytes_.data(), bytes_.size()); |
| status_ = _request.status(); |
| error_ = _request.error(); |
| } |
| |
| ::fidl::WireResult<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| WireResult(::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> |
| _client, |
| const ::fidl_test_emptystruct::wire::Empty& e, |
| zx_time_t _deadline) { |
| ::fidl::OwnedEncodedMessage<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>> |
| _request(zx_txid_t(0), e); |
| _request.GetOutgoingMessage() |
| .Call<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>>( |
| _client, bytes_.data(), bytes_.size(), _deadline); |
| status_ = _request.status(); |
| error_ = _request.error(); |
| } |
| namespace fidl_test_emptystruct { |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace fidl_test_emptystruct |
| ::fidl::WireUnownedResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| WireUnownedResult( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> |
| _client, |
| uint8_t* _request_bytes, uint32_t _request_byte_capacity, |
| const ::fidl_test_emptystruct::wire::Empty& e, uint8_t* _response_bytes, |
| uint32_t _response_byte_capacity) |
| : bytes_(_response_bytes) { |
| ::fidl::UnownedEncodedMessage<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>> |
| _request(_request_bytes, _request_byte_capacity, 0, e); |
| _request.GetOutgoingMessage() |
| .Call<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>>( |
| _client, _response_bytes, _response_byte_capacity); |
| status_ = _request.status(); |
| error_ = _request.error(); |
| } |
| namespace fidl_test_emptystruct { |
| #endif // __Fuchsia__ |
| |
| } // namespace fidl_test_emptystruct |
| #ifdef __Fuchsia__ |
| ::fidl::Result |
| fidl::internal::WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>::Send( |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| if (auto _channel = ::fidl::internal::ClientBase::GetChannel()) { |
| auto _res = |
| ::fidl::WireResult<::fidl_test_emptystruct::EmptyProtocol::Send>( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol>( |
| _channel->handle()), |
| e); |
| return ::fidl::Result(_res.status(), _res.error()); |
| } |
| return ::fidl::Result(ZX_ERR_CANCELED, ::fidl::kErrorChannelUnbound); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::Result |
| fidl::internal::WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>::Send( |
| ::fidl::BufferSpan _request_buffer, |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| if (auto _channel = ::fidl::internal::ClientBase::GetChannel()) { |
| auto _res = |
| ::fidl::WireUnownedResult<::fidl_test_emptystruct::EmptyProtocol::Send>( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol>( |
| _channel->handle()), |
| _request_buffer.data, _request_buffer.capacity, e); |
| return ::fidl::Result(_res.status(), _res.error()); |
| } |
| return ::fidl::Result(ZX_ERR_CANCELED, ::fidl::kErrorChannelUnbound); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::WireResult<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive> |
| fidl::internal::WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceive_Sync(const ::fidl_test_emptystruct::wire::Empty& e) { |
| if (auto _channel = ::fidl::internal::ClientBase::GetChannel()) { |
| return ::fidl::WireResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol>( |
| _channel->handle()), |
| e); |
| } |
| return ::fidl::WireResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>( |
| ::fidl::Result(ZX_ERR_CANCELED, ::fidl::kErrorChannelUnbound)); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::WireUnownedResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive> |
| fidl::internal::WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceive_Sync(::fidl::BufferSpan _request_buffer, |
| const ::fidl_test_emptystruct::wire::Empty& e, |
| ::fidl::BufferSpan _response_buffer) { |
| if (auto _channel = ::fidl::internal::ClientBase::GetChannel()) { |
| return ::fidl::WireUnownedResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol>( |
| _channel->handle()), |
| _request_buffer.data, _request_buffer.capacity, e, |
| _response_buffer.data, _response_buffer.capacity); |
| } |
| return ::fidl::WireUnownedResult< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>( |
| ::fidl::Result(ZX_ERR_CANCELED, ::fidl::kErrorChannelUnbound)); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::WireResponseContext<::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>::WireResponseContext() |
| : ::fidl::internal::ResponseContext( |
| ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>::Type, |
| ::fidl_test_emptystruct::kEmptyProtocol_SendAndReceive_Ordinal) {} |
| |
| void ::fidl::WireResponseContext<::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>::OnReply(uint8_t* reply) { |
| OnReply(reinterpret_cast<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>*>(reply)); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::Result fidl::internal:: |
| WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>::SendAndReceive( |
| const ::fidl_test_emptystruct::wire::Empty& e, |
| ::fit::callback< |
| void(::fidl::WireResponse<::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>* response)> |
| _cb) { |
| class ResponseContext final |
| : public ::fidl::WireResponseContext< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive> { |
| public: |
| ResponseContext( |
| ::fit::callback< |
| void(::fidl::WireResponse<::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>* response)> |
| cb) |
| : cb_(std::move(cb)) {} |
| |
| void OnReply(::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>* |
| response) override { |
| cb_(response); |
| |
| delete this; |
| } |
| |
| void OnError() override { delete this; } |
| |
| private: |
| ::fit::callback<void( |
| ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>* response)> |
| cb_; |
| }; |
| |
| auto* _context = new ResponseContext(std::move(_cb)); |
| ::fidl::internal::ClientBase::PrepareAsyncTxn(_context); |
| ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| OwnedEncodedMessage _request(_context->Txid(), e); |
| return _request.GetOutgoingMessage().Write(this, _context); |
| } |
| |
| ::fidl::Result fidl::internal:: |
| WireClientImpl<::fidl_test_emptystruct::EmptyProtocol>::SendAndReceive( |
| ::fidl::BufferSpan _request_buffer, |
| const ::fidl_test_emptystruct::wire::Empty& e, |
| ::fidl::WireResponseContext< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>* _context) { |
| ::fidl::internal::ClientBase::PrepareAsyncTxn(_context); |
| |
| ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| UnownedEncodedMessage _request( |
| _request_buffer.data, _request_buffer.capacity, _context->Txid(), e); |
| return _request.GetOutgoingMessage().Write(this, _context); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| std::optional<::fidl::UnbindInfo> fidl::internal::WireClientImpl< |
| ::fidl_test_emptystruct::EmptyProtocol>::DispatchEvent(fidl_incoming_msg_t* |
| msg) { |
| if (event_handler_ != nullptr) { |
| fidl_message_header_t* hdr = |
| reinterpret_cast<fidl_message_header_t*>(msg->bytes); |
| switch (hdr->ordinal) { |
| case ::fidl_test_emptystruct::kEmptyProtocol_Receive_Ordinal: { |
| const char* error_message; |
| zx_status_t status = fidl_decode_etc( |
| ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>::Type, |
| msg->bytes, msg->num_bytes, msg->handles, msg->num_handles, |
| &error_message); |
| if (status != ZX_OK) { |
| return ::fidl::UnbindInfo{::fidl::UnbindInfo::kDecodeError, status}; |
| } |
| event_handler_->Receive( |
| reinterpret_cast<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>*>(msg->bytes)); |
| return std::nullopt; |
| } |
| default: |
| break; |
| } |
| } |
| FidlHandleInfoCloseMany(msg->handles, msg->num_handles); |
| return ::fidl::UnbindInfo{::fidl::UnbindInfo::kUnexpectedMessage, |
| ZX_ERR_NOT_SUPPORTED}; |
| } |
| #endif // __Fuchsia__ |
| |
| ::fidl::Result |
| fidl::WireSyncEventHandler<::fidl_test_emptystruct::EmptyProtocol>:: |
| HandleOneEvent( |
| ::fidl::UnownedClientEnd<::fidl_test_emptystruct::EmptyProtocol> |
| client_end) { |
| zx_status_t status = client_end.channel()->wait_one( |
| ZX_CHANNEL_READABLE | ZX_CHANNEL_PEER_CLOSED, ::zx::time::infinite(), |
| nullptr); |
| if (status != ZX_OK) { |
| return ::fidl::Result(status, ::fidl::kErrorWaitOneFailed); |
| } |
| constexpr uint32_t kHandleAllocSize = ([]() constexpr { |
| uint32_t x = 0; |
| if (::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>::MaxNumHandles >= |
| x) { |
| x = ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>::MaxNumHandles; |
| } |
| if (x > ZX_CHANNEL_MAX_MSG_HANDLES) { |
| x = ZX_CHANNEL_MAX_MSG_HANDLES; |
| } |
| return x; |
| })(); |
| ::fidl::internal::InlineMessageBuffer<24> read_storage; |
| uint8_t* read_bytes = read_storage.data(); |
| zx_handle_info_t read_handles[kHandleAllocSize]; |
| uint32_t actual_bytes; |
| uint32_t actual_handles; |
| status = client_end.channel()->read_etc( |
| ZX_CHANNEL_READ_MAY_DISCARD, read_bytes, read_handles, |
| read_storage.size(), kHandleAllocSize, &actual_bytes, &actual_handles); |
| if (status == ZX_ERR_BUFFER_TOO_SMALL) { |
| // Message size is unexpectedly larger than calculated. |
| // This can only be due to a newer version of the protocol defining a new |
| // event, whose size exceeds the maximum of known events in the current |
| // protocol. |
| return ::fidl::Result(Unknown(), nullptr); |
| } |
| if (status != ZX_OK) { |
| return ::fidl::Result(status, ::fidl::kErrorReadFailed); |
| } |
| if (actual_bytes < sizeof(fidl_message_header_t)) { |
| FidlHandleInfoCloseMany(read_handles, actual_handles); |
| return ::fidl::Result(ZX_ERR_INVALID_ARGS, ::fidl::kErrorInvalidHeader); |
| } |
| fidl_message_header_t* hdr = |
| reinterpret_cast<fidl_message_header_t*>(read_bytes); |
| status = fidl_validate_txn_header(hdr); |
| if (status != ZX_OK) { |
| FidlHandleInfoCloseMany(read_handles, actual_handles); |
| return ::fidl::Result(status, ::fidl::kErrorInvalidHeader); |
| } |
| switch (hdr->ordinal) { |
| case ::fidl_test_emptystruct::kEmptyProtocol_Receive_Ordinal: { |
| const char* error_message; |
| zx_status_t status = fidl_decode_etc( |
| ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>::Type, |
| read_bytes, actual_bytes, read_handles, actual_handles, |
| &error_message); |
| if (status != ZX_OK) { |
| return ::fidl::Result(status, error_message); |
| } |
| Receive( |
| reinterpret_cast<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>*>(read_bytes)); |
| return ::fidl::Result(ZX_OK, nullptr); |
| } |
| default: { |
| FidlHandleInfoCloseMany(read_handles, actual_handles); |
| return ::fidl::Result(Unknown(), nullptr); |
| } |
| } |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireServerDispatcher<::fidl_test_emptystruct::EmptyProtocol>::TryDispatch( |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>* impl, |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| static const ::fidl::internal::MethodEntry entries[] = { |
| { |
| ::fidl_test_emptystruct::kEmptyProtocol_Send_Ordinal, |
| ::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::Send>::Type, |
| [](void* interface, void* bytes, ::fidl::Transaction* txn) { |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendCompleter::Sync completer(txn); |
| reinterpret_cast< |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>*>( |
| interface) |
| ->Send( |
| reinterpret_cast<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::Send>*>(bytes), |
| completer); |
| }, |
| }, |
| { |
| ::fidl_test_emptystruct::kEmptyProtocol_SendAndReceive_Ordinal, |
| ::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>::Type, |
| [](void* interface, void* bytes, ::fidl::Transaction* txn) { |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceiveCompleter::Sync completer(txn); |
| reinterpret_cast< |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>*>( |
| interface) |
| ->SendAndReceive(reinterpret_cast<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>*>(bytes), |
| completer); |
| }, |
| }, |
| }; |
| return ::fidl::internal::TryDispatch( |
| impl, msg, txn, entries, |
| entries + sizeof(entries) / sizeof(::fidl::internal::MethodEntry)); |
| } |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireServerDispatcher<::fidl_test_emptystruct::EmptyProtocol>::Dispatch( |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>* impl, |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| ::fidl::DispatchResult dispatch_result = TryDispatch(impl, msg, txn); |
| if (dispatch_result == ::fidl::DispatchResult::kNotFound) { |
| FidlHandleInfoCloseMany(msg->handles, msg->num_handles); |
| txn->InternalError( |
| {::fidl::UnbindInfo::kUnexpectedMessage, ZX_ERR_NOT_SUPPORTED}); |
| } |
| return dispatch_result; |
| } |
| ::fidl::DispatchResult |
| fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>::dispatch_message( |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| return ::fidl::internal::WireServerDispatcher< |
| ::fidl_test_emptystruct::EmptyProtocol>::Dispatch(this, msg, txn); |
| } |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireDispatcher<::fidl_test_emptystruct::EmptyProtocol>::TryDispatch( |
| ::fidl::WireInterface<::fidl_test_emptystruct::EmptyProtocol>* impl, |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| static const ::fidl::internal::MethodEntry entries[] = { |
| { |
| ::fidl_test_emptystruct::kEmptyProtocol_Send_Ordinal, |
| ::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::Send>::Type, |
| [](void* interface, void* bytes, ::fidl::Transaction* txn) { |
| auto message = reinterpret_cast<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::Send>*>(bytes); |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendCompleter::Sync completer(txn); |
| reinterpret_cast< |
| ::fidl::WireInterface<::fidl_test_emptystruct::EmptyProtocol>*>( |
| interface) |
| ->Send(std::move(message->e), completer); |
| }, |
| }, |
| { |
| ::fidl_test_emptystruct::kEmptyProtocol_SendAndReceive_Ordinal, |
| ::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>::Type, |
| [](void* interface, void* bytes, ::fidl::Transaction* txn) { |
| auto message = reinterpret_cast<::fidl::WireRequest< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>*>( |
| bytes); |
| ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceiveCompleter::Sync completer(txn); |
| reinterpret_cast< |
| ::fidl::WireInterface<::fidl_test_emptystruct::EmptyProtocol>*>( |
| interface) |
| ->SendAndReceive(std::move(message->e), completer); |
| }, |
| }, |
| }; |
| return ::fidl::internal::TryDispatch( |
| impl, msg, txn, entries, |
| entries + sizeof(entries) / sizeof(::fidl::internal::MethodEntry)); |
| } |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireDispatcher<::fidl_test_emptystruct::EmptyProtocol>::Dispatch( |
| ::fidl::WireInterface<::fidl_test_emptystruct::EmptyProtocol>* impl, |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| ::fidl::DispatchResult dispatch_result = TryDispatch(impl, msg, txn); |
| if (dispatch_result == ::fidl::DispatchResult::kNotFound) { |
| FidlHandleInfoCloseMany(msg->handles, msg->num_handles); |
| txn->InternalError( |
| {::fidl::UnbindInfo::kUnexpectedMessage, ZX_ERR_NOT_SUPPORTED}); |
| } |
| return dispatch_result; |
| } |
| ::fidl::DispatchResult |
| fidl::WireInterface<::fidl_test_emptystruct::EmptyProtocol>::dispatch_message( |
| fidl_incoming_msg_t* msg, ::fidl::Transaction* txn) { |
| return ::fidl::internal::WireDispatcher< |
| ::fidl_test_emptystruct::EmptyProtocol>::Dispatch(this, msg, txn); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::Result fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceiveCompleterBase::Reply( |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| ::fidl::OwnedEncodedMessage<::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>> |
| _response{e}; |
| return ::fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceiveCompleterBase::SendReply(&_response.GetOutgoingMessage()); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| ::fidl::Result fidl::WireServer<::fidl_test_emptystruct::EmptyProtocol>:: |
| SendAndReceiveCompleterBase::Reply( |
| ::fidl::BufferSpan _backing_buffer, |
| const ::fidl_test_emptystruct::wire::Empty& e) { |
| ::fidl::WireResponse<::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>:: |
| UnownedEncodedMessage _response(_backing_buffer.data, |
| _backing_buffer.capacity, e); |
| return CompleterBase::SendReply(&_response.GetOutgoingMessage()); |
| } |
| #endif // __Fuchsia__ |
| |
| void ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol::Send>:: |
| _InitHeader(zx_txid_t _txid) { |
| fidl_init_txn_header(&_hdr, _txid, |
| ::fidl_test_emptystruct::kEmptyProtocol_Send_Ordinal); |
| } |
| |
| void ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::Receive>::_InitHeader() { |
| fidl_init_txn_header(&_hdr, 0, |
| ::fidl_test_emptystruct::kEmptyProtocol_Receive_Ordinal); |
| } |
| |
| void ::fidl::WireRequest<::fidl_test_emptystruct::EmptyProtocol:: |
| SendAndReceive>::_InitHeader(zx_txid_t _txid) { |
| fidl_init_txn_header( |
| &_hdr, _txid, |
| ::fidl_test_emptystruct::kEmptyProtocol_SendAndReceive_Ordinal); |
| } |
| |
| void ::fidl::WireResponse< |
| ::fidl_test_emptystruct::EmptyProtocol::SendAndReceive>::_InitHeader() { |
| fidl_init_txn_header( |
| &_hdr, 0, ::fidl_test_emptystruct::kEmptyProtocol_SendAndReceive_Ordinal); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| zx_status_t |
| fidl::WireEventSender<::fidl_test_emptystruct::EmptyProtocol>::Receive( |
| const ::fidl_test_emptystruct::wire::Empty& e) const { |
| ::fidl::OwnedEncodedMessage< |
| ::fidl::WireResponse<::fidl_test_emptystruct::EmptyProtocol::Receive>> |
| _response{e}; |
| _response.Write(server_end_); |
| return _response.status(); |
| } |
| |
| zx_status_t |
| fidl::WireEventSender<::fidl_test_emptystruct::EmptyProtocol>::Receive( |
| ::fidl::BufferSpan _buffer, |
| const ::fidl_test_emptystruct::wire::Empty& e) const { |
| ::fidl::UnownedEncodedMessage< |
| ::fidl::WireResponse<::fidl_test_emptystruct::EmptyProtocol::Receive>> |
| _response(_buffer.data, _buffer.capacity, e); |
| _response.Write(server_end_); |
| return _response.status(); |
| } |
| |
| #endif // __Fuchsia__ |