| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.driverhandle/cpp/driver/wire_messaging.h> |
| |
| #include <memory> |
| |
| namespace test_driverhandle { |
| [[maybe_unused]] constexpr uint64_t kHandlesInProtocol_SendHandles_Ordinal = |
| 8904504160365833729lu; |
| |
| [[maybe_unused]] constexpr ::fidl::MessageDynamicFlags |
| kHandlesInProtocol_SendHandles_DynamicFlags = |
| ::fidl::MessageDynamicFlags::kStrictMethod; |
| |
| extern "C" const fidl_type_t |
| test_driverhandle_HandlesInProtocolSendHandlesRequestTable; |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_driverhandle |
| ::fdf::WireUnownedResult<::test_driverhandle::HandlesInProtocol::SendHandles>:: |
| WireUnownedResult( |
| ::fdf::UnownedClientEnd<::test_driverhandle::HandlesInProtocol> |
| client_end, |
| const ::fdf::Arena& arena, |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>* request) { |
| constexpr uint32_t buffer_size = ::fidl::MaxSizeInChannel< |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>, |
| ::fidl::MessageDirection::kSending>(); |
| uint8_t* buffer = static_cast<uint8_t*>(arena.Allocate(buffer_size)); |
| |
| ::fidl::unstable::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>, |
| fidl::internal::DriverTransport> |
| request_message(buffer, buffer_size, request); |
| auto& outgoing = request_message.GetOutgoingMessage(); |
| ::fidl::WriteOptions write_options = { |
| .outgoing_transport_context = |
| ::fidl::internal::OutgoingTransportContext::Create< |
| fidl::internal::DriverTransport>(arena.get()), |
| }; |
| outgoing.Write(client_end.handle(), std::move(write_options)); |
| ::fidl::Status::operator=(outgoing); |
| } |
| namespace test_driverhandle { |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| } // namespace test_driverhandle |
| ::fidl::Status fidl::internal::WireWeakOnewayClientImpl< |
| ::test_driverhandle::HandlesInProtocol>:: |
| SendHandles(::test_driverhandle::wire::T t) { |
| FIDL_INTERNAL_DISABLE_AUTO_VAR_INIT |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles> |
| _request_object{t}; |
| |
| constexpr uint32_t _buffer_size = |
| ::fidl::AsyncClientMethodBufferSizeInChannel< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>(); |
| uint8_t* _buffer = static_cast<uint8_t*>(arena_.Allocate(_buffer_size)); |
| |
| ::fidl::unstable::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>, |
| ::fidl::internal::DriverTransport> |
| _request_message(_buffer, _buffer_size, &_request_object); |
| fidl::WriteOptions _options = {}; |
| _options.outgoing_transport_context = |
| ::fidl::internal::OutgoingTransportContext::Create< |
| ::fidl::internal::DriverTransport>(arena_.get()); |
| return _client_base()->SendOneWay(_request_message.GetOutgoingMessage(), |
| std::move(_options)); |
| } |
| ::fidl::Status fidl::internal::WireWeakOnewayBufferClientImpl< |
| ::test_driverhandle::HandlesInProtocol>:: |
| SendHandles(::test_driverhandle::wire::T t) { |
| constexpr uint32_t _buffer_size = |
| ::fidl::AsyncClientMethodBufferSizeInChannel< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>(); |
| uint8_t* _buffer = static_cast<uint8_t*>(_arena().Allocate(_buffer_size)); |
| |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles> |
| _request{t}; |
| ::fidl::unstable::UnownedEncodedMessage< |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>, |
| ::fidl::internal::DriverTransport> |
| _request_message(_buffer, _buffer_size, &_request); |
| fidl::WriteOptions _options = {}; |
| _options.outgoing_transport_context = |
| ::fidl::internal::OutgoingTransportContext::Create< |
| ::fidl::internal::DriverTransport>(_arena().get()); |
| return _client_base()->SendOneWay(_request_message.GetOutgoingMessage(), |
| std::move(_options)); |
| } |
| namespace test_driverhandle { |
| #endif // __Fuchsia__ |
| |
| } // namespace test_driverhandle |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status |
| fidl::WireSyncEventHandler<::test_driverhandle::HandlesInProtocol>:: |
| HandleOneEvent( |
| ::fdf::UnownedClientEnd<::test_driverhandle::HandlesInProtocol> |
| client_end) { |
| ZX_PANIC("events not supported for transport 'Driver'"); |
| } |
| std::optional<::fidl::UnbindInfo> fidl::internal:: |
| WireEventDispatcher<::test_driverhandle::HandlesInProtocol>::DispatchEvent( |
| fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context) { |
| ZX_PANIC("events not supported for transport 'Driver'"); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::WireServerDispatcher< |
| ::test_driverhandle::HandlesInProtocol>::entries_[] = { |
| { |
| ::test_driverhandle::kHandlesInProtocol_SendHandles_Ordinal, |
| [](void* interface, ::fidl::IncomingMessage&& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn) { |
| ::fidl::unstable::DecodedMessage< |
| ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>> |
| decoded{std::move(msg)}; |
| if (unlikely(!decoded.ok())) { |
| return decoded.status(); |
| } |
| auto* primary = &decoded.PrimaryObject()->body; |
| ::fidl::internal::WireCompleter< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>::Sync |
| completer(txn); |
| fdf::Arena arena( |
| transport_context.release<::fidl::internal::DriverTransport>()); |
| reinterpret_cast< |
| ::fdf::WireServer<::test_driverhandle::HandlesInProtocol>*>( |
| interface) |
| ->SendHandles(primary, arena, completer); |
| return ZX_OK; |
| }, |
| }, |
| }; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::WireServerDispatcher< |
| ::test_driverhandle::HandlesInProtocol>::entries_end_ = &entries_[1]; |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireServerDispatcher<::test_driverhandle::HandlesInProtocol>::TryDispatch( |
| ::fdf::WireServer<::test_driverhandle::HandlesInProtocol>* impl, |
| ::fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn) { |
| return ::fidl::internal::TryDispatch(impl, msg, std::move(transport_context), |
| txn, entries_, entries_end_); |
| } |
| |
| void fidl::internal:: |
| WireServerDispatcher<::test_driverhandle::HandlesInProtocol>::Dispatch( |
| ::fdf::WireServer<::test_driverhandle::HandlesInProtocol>* impl, |
| ::fidl::IncomingMessage&& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, std::move(transport_context), txn, |
| entries_, entries_end_); |
| } |
| void fdf::WireServer<::test_driverhandle::HandlesInProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::IncomingTransportContext transport_context) { |
| ::fidl::internal::WireServerDispatcher< |
| ::test_driverhandle::HandlesInProtocol>::Dispatch(this, std::move(msg), |
| std::move( |
| transport_context), |
| txn); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| void ::fidl::internal::TransactionalRequest< |
| ::test_driverhandle::HandlesInProtocol::SendHandles>::_InitHeader() { |
| ::fidl::InitTxnHeader( |
| &header, 0, ::test_driverhandle::kHandlesInProtocol_SendHandles_Ordinal, |
| ::test_driverhandle::kHandlesInProtocol_SendHandles_DynamicFlags); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| ::fidl::Status |
| fidl::WireSyncEventHandler<::test_driverhandle::DriverProtocol>::HandleOneEvent( |
| ::fdf::UnownedClientEnd<::test_driverhandle::DriverProtocol> client_end) { |
| ZX_PANIC("events not supported for transport 'Driver'"); |
| } |
| std::optional<::fidl::UnbindInfo> fidl::internal:: |
| WireEventDispatcher<::test_driverhandle::DriverProtocol>::DispatchEvent( |
| fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context) { |
| ZX_PANIC("events not supported for transport 'Driver'"); |
| } |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| constexpr ::fidl::internal::MethodEntry fidl::internal::WireServerDispatcher< |
| ::test_driverhandle::DriverProtocol>::entries_[] = {}; |
| |
| const ::fidl::internal::MethodEntry* fidl::internal::WireServerDispatcher< |
| ::test_driverhandle::DriverProtocol>::entries_end_ = &entries_[0]; |
| |
| ::fidl::DispatchResult fidl::internal:: |
| WireServerDispatcher<::test_driverhandle::DriverProtocol>::TryDispatch( |
| ::fdf::WireServer<::test_driverhandle::DriverProtocol>* impl, |
| ::fidl::IncomingMessage& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn) { |
| return ::fidl::internal::TryDispatch(impl, msg, std::move(transport_context), |
| txn, entries_, entries_end_); |
| } |
| |
| void fidl::internal::WireServerDispatcher<::test_driverhandle::DriverProtocol>:: |
| Dispatch(::fdf::WireServer<::test_driverhandle::DriverProtocol>* impl, |
| ::fidl::IncomingMessage&& msg, |
| internal::IncomingTransportContext transport_context, |
| ::fidl::Transaction* txn) { |
| ::fidl::internal::Dispatch(impl, msg, std::move(transport_context), txn, |
| entries_, entries_end_); |
| } |
| void fdf::WireServer<::test_driverhandle::DriverProtocol>::dispatch_message( |
| ::fidl::IncomingMessage&& msg, ::fidl::Transaction* txn, |
| ::fidl::internal::IncomingTransportContext transport_context) { |
| ::fidl::internal::WireServerDispatcher<::test_driverhandle::DriverProtocol>:: |
| Dispatch(this, std::move(msg), std::move(transport_context), txn); |
| } |
| #endif // __Fuchsia__ |