/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/fatal/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include #include "thrift/compiler/test/fixtures/fatal/gen-cpp2/service1AsyncClient.h" #include "thrift/compiler/test/fixtures/fatal/gen-cpp2/module_types.h" #include "thrift/compiler/test/fixtures/fatal/gen-cpp2/reflection_dep_B_types.h" #include "thrift/compiler/test/fixtures/fatal/gen-cpp2/reflection_dep_C_types.h" #include "thrift/test/fatal_custom_types.h" namespace folly { class IOBuf; class IOBufQueue; } namespace apache { namespace thrift { class Cpp2RequestContext; class BinaryProtocolReader; class CompactProtocolReader; namespace transport { class THeader; } }} namespace test_cpp2::cpp_reflection { class service1; class service1AsyncProcessor; class service1ServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; } // namespace test_cpp2::cpp_reflection namespace apache::thrift { template <> class ServiceHandler<::test_cpp2::cpp_reflection::service1> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "service1"; } typedef ::test_cpp2::cpp_reflection::service1AsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_method1(); [[deprecated("Use sync_method1 instead")]] virtual void method1(); virtual folly::Future future_method1(); virtual folly::SemiFuture semifuture_method1(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_method1(); virtual folly::coro::Task co_method1(apache::thrift::RequestParams params); #endif virtual void async_tm_method1(std::unique_ptr> callback); virtual void sync_method2(::std::int32_t /*x*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*y*/, double /*z*/); [[deprecated("Use sync_method2 instead")]] virtual void method2(::std::int32_t /*x*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*y*/, double /*z*/); virtual folly::Future future_method2(::std::int32_t p_x, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_y, double p_z); virtual folly::SemiFuture semifuture_method2(::std::int32_t p_x, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_y, double p_z); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_method2(::std::int32_t p_x, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_y, double p_z); virtual folly::coro::Task co_method2(apache::thrift::RequestParams params, ::std::int32_t p_x, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_y, double p_z); #endif virtual void async_tm_method2(std::unique_ptr> callback, ::std::int32_t p_x, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_y, double p_z); virtual ::std::int32_t sync_method3(); [[deprecated("Use sync_method3 instead")]] virtual ::std::int32_t method3(); virtual folly::Future<::std::int32_t> future_method3(); virtual folly::SemiFuture<::std::int32_t> semifuture_method3(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::std::int32_t> co_method3(); virtual folly::coro::Task<::std::int32_t> co_method3(apache::thrift::RequestParams params); #endif virtual void async_tm_method3(std::unique_ptr> callback); virtual ::std::int32_t sync_method4(::std::int32_t /*i*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*j*/, double /*k*/); [[deprecated("Use sync_method4 instead")]] virtual ::std::int32_t method4(::std::int32_t /*i*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*j*/, double /*k*/); virtual folly::Future<::std::int32_t> future_method4(::std::int32_t p_i, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_j, double p_k); virtual folly::SemiFuture<::std::int32_t> semifuture_method4(::std::int32_t p_i, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_j, double p_k); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::std::int32_t> co_method4(::std::int32_t p_i, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_j, double p_k); virtual folly::coro::Task<::std::int32_t> co_method4(apache::thrift::RequestParams params, ::std::int32_t p_i, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_j, double p_k); #endif virtual void async_tm_method4(std::unique_ptr> callback, ::std::int32_t p_i, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_j, double p_k); virtual void sync_method5(::test_cpp2::cpp_reflection::struct2& /*_return*/); [[deprecated("Use sync_method5 instead")]] virtual void method5(::test_cpp2::cpp_reflection::struct2& /*_return*/); virtual folly::Future> future_method5(); virtual folly::SemiFuture> semifuture_method5(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_method5(); virtual folly::coro::Task> co_method5(apache::thrift::RequestParams params); #endif virtual void async_tm_method5(std::unique_ptr>> callback); virtual void sync_method6(::test_cpp2::cpp_reflection::struct2& /*_return*/, ::std::int32_t /*l*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*m*/, double /*n*/); [[deprecated("Use sync_method6 instead")]] virtual void method6(::test_cpp2::cpp_reflection::struct2& /*_return*/, ::std::int32_t /*l*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*m*/, double /*n*/); virtual folly::Future> future_method6(::std::int32_t p_l, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_m, double p_n); virtual folly::SemiFuture> semifuture_method6(::std::int32_t p_l, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_m, double p_n); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_method6(::std::int32_t p_l, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_m, double p_n); virtual folly::coro::Task> co_method6(apache::thrift::RequestParams params, ::std::int32_t p_l, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_m, double p_n); #endif virtual void async_tm_method6(std::unique_ptr>> callback, ::std::int32_t p_l, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> p_m, double p_n); private: static ::test_cpp2::cpp_reflection::service1ServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_method1{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_method2{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_method3{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_method4{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_method5{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_method6{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace test_cpp2::cpp_reflection { using service1SvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace test_cpp2::cpp_reflection namespace test_cpp2::cpp_reflection { class service1SvNull : public ::apache::thrift::ServiceHandler { public: void method1() override; void method2(::std::int32_t /*x*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*y*/, double /*z*/) override; ::std::int32_t method3() override; ::std::int32_t method4(::std::int32_t /*i*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*j*/, double /*k*/) override; void method5(::test_cpp2::cpp_reflection::struct2& /*_return*/) override; void method6(::test_cpp2::cpp_reflection::struct2& /*_return*/, ::std::int32_t /*l*/, std::unique_ptr<::test_cpp2::cpp_reflection::struct1> /*m*/, double /*n*/) override; }; class service1AsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase { public: const char* getServiceName() override; void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override; using BaseAsyncProcessor = void; protected: ::apache::thrift::ServiceHandler<::test_cpp2::cpp_reflection::service1>* iface_; public: void processSerializedCompressedRequestWithMetadata(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata, apache::thrift::protocol::PROTOCOL_TYPES protType, apache::thrift::Cpp2RequestContext* context, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) override; void executeRequest(apache::thrift::ServerRequest&& serverRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata) override; public: using ProcessFuncs = GeneratedAsyncProcessorBase::ProcessFuncs; using ProcessMap = GeneratedAsyncProcessorBase::ProcessMap; static const service1AsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const service1AsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_method1(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method1(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method1(apache::thrift::ContextStack* ctx); template static void throw_wrapped_method1(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_method2(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method2(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method2(apache::thrift::ContextStack* ctx); template static void throw_wrapped_method2(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_method3(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method3(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method3(apache::thrift::ContextStack* ctx, ::std::int32_t const& _return); template static void throw_wrapped_method3(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_method4(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method4(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method4(apache::thrift::ContextStack* ctx, ::std::int32_t const& _return); template static void throw_wrapped_method4(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_method5(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method5(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method5(apache::thrift::ContextStack* ctx, ::test_cpp2::cpp_reflection::struct2 const& _return); template static void throw_wrapped_method5(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_method6(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_method6(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_method6(apache::thrift::ContextStack* ctx, ::test_cpp2::cpp_reflection::struct2 const& _return); template static void throw_wrapped_method6(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: service1AsyncProcessor(::apache::thrift::ServiceHandler<::test_cpp2::cpp_reflection::service1>* iface) : iface_(iface) {} ~service1AsyncProcessor() override {} }; } // namespace test_cpp2::cpp_reflection