/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/interactions/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/interactions/gen-cpp2/InteractWithSharedAsyncClient.h" #include "thrift/compiler/test/fixtures/interactions/gen-cpp2/module_types.h" #include "thrift/compiler/test/fixtures/interactions/gen-cpp2/shared_types.h" #include #include namespace folly { class IOBuf; class IOBufQueue; } namespace apache { namespace thrift { class Cpp2RequestContext; class BinaryProtocolReader; class CompactProtocolReader; namespace transport { class THeader; } }} namespace cpp2 { class InteractWithShared; class InteractWithSharedAsyncProcessor; class InteractWithSharedServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; } // namespace cpp2 namespace apache::thrift { template <> class ServiceHandler<::cpp2::InteractWithShared> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "InteractWithShared"; } typedef ::cpp2::InteractWithSharedAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; bool isThriftGenerated() const override final { return true; } private: std::optional> getServiceRequestInfoMap() const; public: class MyInteractionServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; class MyInteractionIf : public apache::thrift::Tile, public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "MyInteraction"; } typedef ::cpp2::InteractWithSharedAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override { std::terminate(); } CreateMethodMetadataResult createMethodMetadata() override { std::terminate(); } virtual ::std::int32_t sync_frobnicate(); [[deprecated("Use sync_frobnicate instead")]] virtual ::std::int32_t frobnicate(); virtual folly::SemiFuture<::std::int32_t> semifuture_frobnicate(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::std::int32_t> co_frobnicate(); virtual folly::coro::Task<::std::int32_t> co_frobnicate(apache::thrift::RequestParams params); #endif virtual void async_tm_frobnicate(apache::thrift::HandlerCallbackPtr<::std::int32_t> callback); virtual void sync_ping(); [[deprecated("Use sync_ping instead")]] virtual void ping(); virtual folly::SemiFuture semifuture_ping(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_ping(); virtual folly::coro::Task co_ping(apache::thrift::RequestParams params); #endif virtual void async_tm_ping(apache::thrift::HandlerCallbackBase::Ptr callback); virtual ::apache::thrift::ServerStream sync_truthify(); [[deprecated("Use sync_truthify instead")]] virtual ::apache::thrift::ServerStream truthify(); virtual folly::SemiFuture<::apache::thrift::ServerStream> semifuture_truthify(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::apache::thrift::ServerStream> co_truthify(); virtual folly::coro::Task<::apache::thrift::ServerStream> co_truthify(apache::thrift::RequestParams params); #endif virtual void async_tm_truthify(apache::thrift::HandlerCallbackPtr<::apache::thrift::ServerStream> callback); virtual ::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string> sync_encode(); [[deprecated("Use sync_encode instead")]] virtual ::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string> encode(); virtual folly::SemiFuture<::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string>> semifuture_encode(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string>> co_encode(); virtual folly::coro::Task<::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string>> co_encode(apache::thrift::RequestParams params); #endif virtual void async_tm_encode(apache::thrift::HandlerCallbackPtr<::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string>> callback); private: std::atomic __fbthrift_invocation_frobnicate{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_ping{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_truthify{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_encode{apache::thrift::detail::si::InvocationType::AsyncTm}; };class SharedInteractionServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; class SharedInteractionIf : public apache::thrift::Tile, public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "SharedInteraction"; } typedef ::cpp2::InteractWithSharedAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override { std::terminate(); } CreateMethodMetadataResult createMethodMetadata() override { std::terminate(); } virtual ::std::int32_t sync_init(); [[deprecated("Use sync_init instead")]] virtual ::std::int32_t init(); virtual folly::SemiFuture<::std::int32_t> semifuture_init(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::std::int32_t> co_init(); virtual folly::coro::Task<::std::int32_t> co_init(apache::thrift::RequestParams params); #endif virtual void async_tm_init(apache::thrift::HandlerCallbackPtr<::std::int32_t> callback); virtual void sync_do_something(::thrift::shared_interactions::DoSomethingResult& /*_return*/); [[deprecated("Use sync_do_something instead")]] virtual void do_something(::thrift::shared_interactions::DoSomethingResult& /*_return*/); virtual folly::SemiFuture> semifuture_do_something(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_do_something(); virtual folly::coro::Task> co_do_something(apache::thrift::RequestParams params); #endif virtual void async_tm_do_something(apache::thrift::HandlerCallbackPtr> callback); virtual void sync_tear_down(); [[deprecated("Use sync_tear_down instead")]] virtual void tear_down(); virtual folly::SemiFuture semifuture_tear_down(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_tear_down(); virtual folly::coro::Task co_tear_down(apache::thrift::RequestParams params); #endif virtual void async_tm_tear_down(apache::thrift::HandlerCallbackPtr callback); private: std::atomic __fbthrift_invocation_init{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_do_something{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_tear_down{apache::thrift::detail::si::InvocationType::AsyncTm}; }; virtual void sync_do_some_similar_things(::thrift::shared_interactions::DoSomethingResult& /*_return*/); [[deprecated("Use sync_do_some_similar_things instead")]] virtual void do_some_similar_things(::thrift::shared_interactions::DoSomethingResult& /*_return*/); virtual folly::Future> future_do_some_similar_things(); virtual folly::SemiFuture> semifuture_do_some_similar_things(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_do_some_similar_things(); virtual folly::coro::Task> co_do_some_similar_things(apache::thrift::RequestParams params); #endif virtual void async_tm_do_some_similar_things(apache::thrift::HandlerCallbackPtr> callback); virtual std::unique_ptr createMyInteraction(); virtual std::unique_ptr createshared.SharedInteraction(); private: static ::cpp2::InteractWithSharedServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_do_some_similar_things{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_createMyInteraction{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_createshared.SharedInteraction{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace cpp2 { using InteractWithSharedSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace cpp2 namespace cpp2 { class InteractWithSharedSvNull : public ::apache::thrift::ServiceHandler { public: void do_some_similar_things(::thrift::shared_interactions::DoSomethingResult& /*_return*/) override; }; class InteractWithSharedAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase { public: const char* getServiceName() override; void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override; using BaseAsyncProcessor = void; protected: ::apache::thrift::ServiceHandler<::cpp2::InteractWithShared>* 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; using InteractionConstructor = GeneratedAsyncProcessorBase::InteractionConstructor; using InteractionConstructorMap = GeneratedAsyncProcessorBase::InteractionConstructorMap; static const InteractWithSharedAsyncProcessor::ProcessMap& getOwnProcessMap(); static const InteractWithSharedAsyncProcessor::InteractionConstructorMap& getInteractionConstructorMap(); std::unique_ptr createInteractionImpl(const std::string& name) override; private: static const InteractWithSharedAsyncProcessor::ProcessMap kOwnProcessMap_; static const InteractWithSharedAsyncProcessor::InteractionConstructorMap interactionConstructorMap_; private: template void setUpAndProcess_do_some_similar_things(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_do_some_similar_things(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_do_some_similar_things(apache::thrift::ContextStack* ctx, ::thrift::shared_interactions::DoSomethingResult const& _return); template static void throw_wrapped_do_some_similar_things(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); std::unique_ptr createMyInteraction() { return iface_->createMyInteraction(); } std::unique_ptr createshared.SharedInteraction() { return iface_->createshared.SharedInteraction(); } template void setUpAndProcess_MyInteraction_frobnicate(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_MyInteraction_frobnicate(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_MyInteraction_frobnicate(apache::thrift::ContextStack* ctx, ::std::int32_t const& _return); template static void throw_wrapped_MyInteraction_frobnicate(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_MyInteraction_ping(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_MyInteraction_ping(apache::thrift::ServerRequest&& serverRequest); template void setUpAndProcess_MyInteraction_truthify(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_MyInteraction_truthify(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::ResponseAndServerStreamFactory return_MyInteraction_truthify(apache::thrift::ContextStack* ctx, folly::Executor::KeepAlive<> executor, ::apache::thrift::ServerStream&& _return); template static void throw_wrapped_MyInteraction_truthify(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_MyInteraction_encode(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_MyInteraction_encode(apache::thrift::ServerRequest&& serverRequest); template static std::pair return_MyInteraction_encode(apache::thrift::ContextStack* ctx, ::apache::thrift::ResponseAndSinkConsumer<::std::set<::std::int32_t>, ::std::string, ::std::string>&& _return, folly::Executor::KeepAlive<> executor); template static void throw_wrapped_MyInteraction_encode(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_SharedInteraction_init(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_SharedInteraction_init(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_SharedInteraction_init(apache::thrift::ContextStack* ctx, ::std::int32_t const& _return); template static void throw_wrapped_SharedInteraction_init(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_SharedInteraction_do_something(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_SharedInteraction_do_something(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_SharedInteraction_do_something(apache::thrift::ContextStack* ctx, ::thrift::shared_interactions::DoSomethingResult const& _return); template static void throw_wrapped_SharedInteraction_do_something(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_SharedInteraction_tear_down(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_SharedInteraction_tear_down(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_SharedInteraction_tear_down(apache::thrift::ContextStack* ctx); template static void throw_wrapped_SharedInteraction_tear_down(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: InteractWithSharedAsyncProcessor(::apache::thrift::ServiceHandler<::cpp2::InteractWithShared>* iface) : iface_(iface) {} ~InteractWithSharedAsyncProcessor() override {} }; } // namespace cpp2