| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.protocolrequest/cpp/natural_types.h> |
| #include <lib/fidl/cpp/hlcpp_conversion.h> |
| #include <lib/fidl/cpp/wire/service_handler.h> |
| #include <test/protocolrequest/cpp/fidl.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace fidl { |
| namespace internal { |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_protocolrequest::Child>> { |
| using HLCPPType = fidl::InterfaceHandle<::test::protocolrequest::Child>; |
| static inline fidl::InterfaceHandle<::test::protocolrequest::Child> Convert(fidl::ClientEnd<::test_protocolrequest::Child>&& c) { |
| return fidl::InterfaceHandle<::test::protocolrequest::Child>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_protocolrequest::Child>> { |
| using HLCPPType = fidl::InterfaceRequest<::test::protocolrequest::Child>; |
| static inline fidl::InterfaceRequest<::test::protocolrequest::Child> Convert(fidl::ServerEnd<::test_protocolrequest::Child>&& c) { |
| return fidl::InterfaceRequest<::test::protocolrequest::Child>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::protocolrequest::Child>> { |
| using NaturalType = fidl::ClientEnd<::test_protocolrequest::Child>; |
| static inline fidl::ClientEnd<::test_protocolrequest::Child> Convert(fidl::InterfaceHandle<::test::protocolrequest::Child>&& c) { |
| return fidl::ClientEnd<::test_protocolrequest::Child>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::protocolrequest::Child>> { |
| using NaturalType = fidl::ServerEnd<::test_protocolrequest::Child>; |
| static inline fidl::ServerEnd<::test_protocolrequest::Child> Convert(fidl::InterfaceRequest<::test::protocolrequest::Child>&& c) { |
| return fidl::ServerEnd<::test_protocolrequest::Child>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_protocolrequest::Child>> { |
| using HLCPPType = fidl::InterfaceRequestHandler<::test::protocolrequest::Child>; |
| static inline fidl::InterfaceRequestHandler<::test::protocolrequest::Child> Convert(fidl::ProtocolHandler<::test_protocolrequest::Child>&& c) { |
| return [c = std::move(c)](fidl::InterfaceRequest<::test::protocolrequest::Child> r) { |
| c(::fidl::HLCPPToNatural(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::protocolrequest::Child>> { |
| using NaturalType = fidl::ProtocolHandler<::test_protocolrequest::Child>; |
| static inline fidl::ProtocolHandler<::test_protocolrequest::Child> Convert(fidl::InterfaceRequestHandler<::test::protocolrequest::Child>&& c) { |
| return [c = std::move(c)](fidl::ServerEnd<::test_protocolrequest::Child> r) { |
| c(::fidl::NaturalToHLCPP(r)); |
| }; |
| } |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_protocolrequest::Parent>> { |
| using HLCPPType = fidl::InterfaceHandle<::test::protocolrequest::Parent>; |
| static inline fidl::InterfaceHandle<::test::protocolrequest::Parent> Convert(fidl::ClientEnd<::test_protocolrequest::Parent>&& c) { |
| return fidl::InterfaceHandle<::test::protocolrequest::Parent>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_protocolrequest::Parent>> { |
| using HLCPPType = fidl::InterfaceRequest<::test::protocolrequest::Parent>; |
| static inline fidl::InterfaceRequest<::test::protocolrequest::Parent> Convert(fidl::ServerEnd<::test_protocolrequest::Parent>&& c) { |
| return fidl::InterfaceRequest<::test::protocolrequest::Parent>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::protocolrequest::Parent>> { |
| using NaturalType = fidl::ClientEnd<::test_protocolrequest::Parent>; |
| static inline fidl::ClientEnd<::test_protocolrequest::Parent> Convert(fidl::InterfaceHandle<::test::protocolrequest::Parent>&& c) { |
| return fidl::ClientEnd<::test_protocolrequest::Parent>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::protocolrequest::Parent>> { |
| using NaturalType = fidl::ServerEnd<::test_protocolrequest::Parent>; |
| static inline fidl::ServerEnd<::test_protocolrequest::Parent> Convert(fidl::InterfaceRequest<::test::protocolrequest::Parent>&& c) { |
| return fidl::ServerEnd<::test_protocolrequest::Parent>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_protocolrequest::Parent>> { |
| using HLCPPType = fidl::InterfaceRequestHandler<::test::protocolrequest::Parent>; |
| static inline fidl::InterfaceRequestHandler<::test::protocolrequest::Parent> Convert(fidl::ProtocolHandler<::test_protocolrequest::Parent>&& c) { |
| return [c = std::move(c)](fidl::InterfaceRequest<::test::protocolrequest::Parent> r) { |
| c(::fidl::HLCPPToNatural(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::protocolrequest::Parent>> { |
| using NaturalType = fidl::ProtocolHandler<::test_protocolrequest::Parent>; |
| static inline fidl::ProtocolHandler<::test_protocolrequest::Parent> Convert(fidl::InterfaceRequestHandler<::test::protocolrequest::Parent>&& c) { |
| return [c = std::move(c)](fidl::ServerEnd<::test_protocolrequest::Parent> r) { |
| c(::fidl::NaturalToHLCPP(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<::test_protocolrequest::ParentGetChildResponse> { |
| using HLCPPType = ::test::protocolrequest::ParentGetChildResponse; |
| static inline ::test::protocolrequest::ParentGetChildResponse Convert(::test_protocolrequest::ParentGetChildResponse&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::protocolrequest::ParentGetChildResponse> { |
| using NaturalType = ::test_protocolrequest::ParentGetChildResponse; |
| static inline ::test_protocolrequest::ParentGetChildResponse Convert(::test::protocolrequest::ParentGetChildResponse&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_protocolrequest::ParentGetChildRequestResponse> { |
| using HLCPPType = ::test::protocolrequest::ParentGetChildRequestResponse; |
| static inline ::test::protocolrequest::ParentGetChildRequestResponse Convert(::test_protocolrequest::ParentGetChildRequestResponse&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::protocolrequest::ParentGetChildRequestResponse> { |
| using NaturalType = ::test_protocolrequest::ParentGetChildRequestResponse; |
| static inline ::test_protocolrequest::ParentGetChildRequestResponse Convert(::test::protocolrequest::ParentGetChildRequestResponse&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_protocolrequest::ParentTakeChildRequest> { |
| using HLCPPType = ::test::protocolrequest::ParentTakeChildRequest; |
| static inline ::test::protocolrequest::ParentTakeChildRequest Convert(::test_protocolrequest::ParentTakeChildRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::protocolrequest::ParentTakeChildRequest> { |
| using NaturalType = ::test_protocolrequest::ParentTakeChildRequest; |
| static inline ::test_protocolrequest::ParentTakeChildRequest Convert(::test::protocolrequest::ParentTakeChildRequest&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_protocolrequest::ParentTakeChildRequestRequest> { |
| using HLCPPType = ::test::protocolrequest::ParentTakeChildRequestRequest; |
| static inline ::test::protocolrequest::ParentTakeChildRequestRequest Convert(::test_protocolrequest::ParentTakeChildRequestRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::protocolrequest::ParentTakeChildRequestRequest> { |
| using NaturalType = ::test_protocolrequest::ParentTakeChildRequestRequest; |
| static inline ::test_protocolrequest::ParentTakeChildRequestRequest Convert(::test::protocolrequest::ParentTakeChildRequestRequest&&); |
| }; |
| |
| ::test::protocolrequest::ParentGetChildResponse NaturalToHLCPPTraits<::test_protocolrequest::ParentGetChildResponse>::Convert(::test_protocolrequest::ParentGetChildResponse&& value) { |
| ::test::protocolrequest::ParentGetChildResponse hlcpp; |
| hlcpp.c = ::fidl::NaturalToHLCPP(std::move(value.c())); |
| return hlcpp; |
| } |
| |
| ::test_protocolrequest::ParentGetChildResponse HLCPPToNaturalTraits<::test::protocolrequest::ParentGetChildResponse>::Convert(::test::protocolrequest::ParentGetChildResponse&& value) { |
| return ::test_protocolrequest::ParentGetChildResponse{{ |
| .c = ::fidl::HLCPPToNatural(std::move(value.c)), |
| }}; |
| } |
| ::test::protocolrequest::ParentGetChildRequestResponse NaturalToHLCPPTraits<::test_protocolrequest::ParentGetChildRequestResponse>::Convert(::test_protocolrequest::ParentGetChildRequestResponse&& value) { |
| ::test::protocolrequest::ParentGetChildRequestResponse hlcpp; |
| hlcpp.r = ::fidl::NaturalToHLCPP(std::move(value.r())); |
| return hlcpp; |
| } |
| |
| ::test_protocolrequest::ParentGetChildRequestResponse HLCPPToNaturalTraits<::test::protocolrequest::ParentGetChildRequestResponse>::Convert(::test::protocolrequest::ParentGetChildRequestResponse&& value) { |
| return ::test_protocolrequest::ParentGetChildRequestResponse{{ |
| .r = ::fidl::HLCPPToNatural(std::move(value.r)), |
| }}; |
| } |
| ::test::protocolrequest::ParentTakeChildRequest NaturalToHLCPPTraits<::test_protocolrequest::ParentTakeChildRequest>::Convert(::test_protocolrequest::ParentTakeChildRequest&& value) { |
| ::test::protocolrequest::ParentTakeChildRequest hlcpp; |
| hlcpp.c = ::fidl::NaturalToHLCPP(std::move(value.c())); |
| return hlcpp; |
| } |
| |
| ::test_protocolrequest::ParentTakeChildRequest HLCPPToNaturalTraits<::test::protocolrequest::ParentTakeChildRequest>::Convert(::test::protocolrequest::ParentTakeChildRequest&& value) { |
| return ::test_protocolrequest::ParentTakeChildRequest{{ |
| .c = ::fidl::HLCPPToNatural(std::move(value.c)), |
| }}; |
| } |
| ::test::protocolrequest::ParentTakeChildRequestRequest NaturalToHLCPPTraits<::test_protocolrequest::ParentTakeChildRequestRequest>::Convert(::test_protocolrequest::ParentTakeChildRequestRequest&& value) { |
| ::test::protocolrequest::ParentTakeChildRequestRequest hlcpp; |
| hlcpp.r = ::fidl::NaturalToHLCPP(std::move(value.r())); |
| return hlcpp; |
| } |
| |
| ::test_protocolrequest::ParentTakeChildRequestRequest HLCPPToNaturalTraits<::test::protocolrequest::ParentTakeChildRequestRequest>::Convert(::test::protocolrequest::ParentTakeChildRequestRequest&& value) { |
| return ::test_protocolrequest::ParentTakeChildRequestRequest{{ |
| .r = ::fidl::HLCPPToNatural(std::move(value.r)), |
| }}; |
| } |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace internal |
| } // namespace fidl |