blob: 6d9244a94d79195821b1ed8a52457f1333bc3ede [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.service/cpp/natural_types.h>
#include <lib/fidl/cpp/hlcpp_conversion.h>
#include <lib/fidl/cpp/wire/service_handler.h>
#include <test/service/cpp/fidl.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace fidl {
namespace internal {
template <>
struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_service::FirstProtocol>> {
using HLCPPType = fidl::InterfaceHandle<::test::service::FirstProtocol>;
static inline fidl::InterfaceHandle<::test::service::FirstProtocol> Convert(fidl::ClientEnd<::test_service::FirstProtocol>&& c) {
return fidl::InterfaceHandle<::test::service::FirstProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_service::FirstProtocol>> {
using HLCPPType = fidl::InterfaceRequest<::test::service::FirstProtocol>;
static inline fidl::InterfaceRequest<::test::service::FirstProtocol> Convert(fidl::ServerEnd<::test_service::FirstProtocol>&& c) {
return fidl::InterfaceRequest<::test::service::FirstProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::service::FirstProtocol>> {
using NaturalType = fidl::ClientEnd<::test_service::FirstProtocol>;
static inline fidl::ClientEnd<::test_service::FirstProtocol> Convert(fidl::InterfaceHandle<::test::service::FirstProtocol>&& c) {
return fidl::ClientEnd<::test_service::FirstProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::service::FirstProtocol>> {
using NaturalType = fidl::ServerEnd<::test_service::FirstProtocol>;
static inline fidl::ServerEnd<::test_service::FirstProtocol> Convert(fidl::InterfaceRequest<::test::service::FirstProtocol>&& c) {
return fidl::ServerEnd<::test_service::FirstProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_service::FirstProtocol>> {
using HLCPPType = fidl::InterfaceRequestHandler<::test::service::FirstProtocol>;
static inline fidl::InterfaceRequestHandler<::test::service::FirstProtocol> Convert(fidl::ProtocolHandler<::test_service::FirstProtocol>&& c) {
return [c = std::move(c)](fidl::InterfaceRequest<::test::service::FirstProtocol> r) {
c(::fidl::HLCPPToNatural(r));
};
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::service::FirstProtocol>> {
using NaturalType = fidl::ProtocolHandler<::test_service::FirstProtocol>;
static inline fidl::ProtocolHandler<::test_service::FirstProtocol> Convert(fidl::InterfaceRequestHandler<::test::service::FirstProtocol>&& c) {
return [c = std::move(c)](fidl::ServerEnd<::test_service::FirstProtocol> r) {
c(::fidl::NaturalToHLCPP(r));
};
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_service::SecondProtocol>> {
using HLCPPType = fidl::InterfaceHandle<::test::service::SecondProtocol>;
static inline fidl::InterfaceHandle<::test::service::SecondProtocol> Convert(fidl::ClientEnd<::test_service::SecondProtocol>&& c) {
return fidl::InterfaceHandle<::test::service::SecondProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_service::SecondProtocol>> {
using HLCPPType = fidl::InterfaceRequest<::test::service::SecondProtocol>;
static inline fidl::InterfaceRequest<::test::service::SecondProtocol> Convert(fidl::ServerEnd<::test_service::SecondProtocol>&& c) {
return fidl::InterfaceRequest<::test::service::SecondProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::service::SecondProtocol>> {
using NaturalType = fidl::ClientEnd<::test_service::SecondProtocol>;
static inline fidl::ClientEnd<::test_service::SecondProtocol> Convert(fidl::InterfaceHandle<::test::service::SecondProtocol>&& c) {
return fidl::ClientEnd<::test_service::SecondProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::service::SecondProtocol>> {
using NaturalType = fidl::ServerEnd<::test_service::SecondProtocol>;
static inline fidl::ServerEnd<::test_service::SecondProtocol> Convert(fidl::InterfaceRequest<::test::service::SecondProtocol>&& c) {
return fidl::ServerEnd<::test_service::SecondProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_service::SecondProtocol>> {
using HLCPPType = fidl::InterfaceRequestHandler<::test::service::SecondProtocol>;
static inline fidl::InterfaceRequestHandler<::test::service::SecondProtocol> Convert(fidl::ProtocolHandler<::test_service::SecondProtocol>&& c) {
return [c = std::move(c)](fidl::InterfaceRequest<::test::service::SecondProtocol> r) {
c(::fidl::HLCPPToNatural(r));
};
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::service::SecondProtocol>> {
using NaturalType = fidl::ProtocolHandler<::test_service::SecondProtocol>;
static inline fidl::ProtocolHandler<::test_service::SecondProtocol> Convert(fidl::InterfaceRequestHandler<::test::service::SecondProtocol>&& c) {
return [c = std::move(c)](fidl::ServerEnd<::test_service::SecondProtocol> r) {
c(::fidl::NaturalToHLCPP(r));
};
}
};
#pragma clang diagnostic pop
} // namespace internal
} // namespace fidl