/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/basic-annotations/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/basic-annotations/gen-cpp2/FooBarBazServiceAsyncClient.h" #include "thrift/compiler/test/fixtures/basic-annotations/gen-cpp2/module_types.h" namespace folly { class IOBuf; class IOBufQueue; } namespace apache { namespace thrift { class Cpp2RequestContext; class BinaryProtocolReader; class CompactProtocolReader; namespace transport { class THeader; } }} namespace cpp2 { class FooBarBazService; class FooBarBazServiceAsyncProcessor; class FooBarBazServiceServiceInfoHolder : 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::FooBarBazService> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "FooBarBazService"; } typedef ::cpp2::FooBarBazServiceAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_foo(); [[deprecated("Use sync_foo instead")]] virtual void foo(); virtual folly::Future future_foo(); virtual folly::SemiFuture semifuture_foo(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_foo(); virtual folly::coro::Task co_foo(apache::thrift::RequestParams params); #endif virtual void async_tm_foo(std::unique_ptr> callback); virtual void sync_bar(); [[deprecated("Use sync_bar instead")]] virtual void bar(); virtual folly::Future future_bar(); virtual folly::SemiFuture semifuture_bar(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_bar(); virtual folly::coro::Task co_bar(apache::thrift::RequestParams params); #endif virtual void async_tm_bar(std::unique_ptr> callback); virtual void sync_baz(); [[deprecated("Use sync_baz instead")]] virtual void baz(); virtual folly::Future future_baz(); virtual folly::SemiFuture semifuture_baz(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_baz(); virtual folly::coro::Task co_baz(apache::thrift::RequestParams params); #endif virtual void async_tm_baz(std::unique_ptr> callback); private: static ::cpp2::FooBarBazServiceServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_foo{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_bar{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_baz{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace cpp2 { using FooBarBazServiceSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace cpp2 namespace cpp2 { class FooBarBazServiceSvNull : public ::apache::thrift::ServiceHandler { public: void foo() override; void bar() override; void baz() override; }; class FooBarBazServiceAsyncProcessor : 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::FooBarBazService>* 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 FooBarBazServiceAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const FooBarBazServiceAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_foo(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_foo(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_foo(apache::thrift::ContextStack* ctx); template static void throw_wrapped_foo(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_bar(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_bar(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_bar(apache::thrift::ContextStack* ctx); template static void throw_wrapped_bar(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_baz(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_baz(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_baz(apache::thrift::ContextStack* ctx); template static void throw_wrapped_baz(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: FooBarBazServiceAsyncProcessor(::apache::thrift::ServiceHandler<::cpp2::FooBarBazService>* iface) : iface_(iface) {} ~FooBarBazServiceAsyncProcessor() override {} }; } // namespace cpp2