/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/adapter/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/adapter/gen-cpp2/AdapterServiceAsyncClient.h" #include "thrift/compiler/test/fixtures/adapter/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 facebook::thrift::test { class AdapterService; class AdapterServiceAsyncProcessor; class AdapterServiceServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; } // namespace facebook::thrift::test namespace apache::thrift { template <> class ServiceHandler<::facebook::thrift::test::AdapterService> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "AdapterService"; } static const char* __fbthrift_thrift_uri() { return "facebook.com/thrift/test/AdapterService"; } typedef ::facebook::thrift::test::AdapterServiceAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_count(::facebook::thrift::test::CountingStruct& /*_return*/); [[deprecated("Use sync_count instead")]] virtual void count(::facebook::thrift::test::CountingStruct& /*_return*/); virtual folly::Future> future_count(); virtual folly::SemiFuture> semifuture_count(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_count(); virtual folly::coro::Task> co_count(apache::thrift::RequestParams params); #endif virtual void async_tm_count(apache::thrift::HandlerCallbackPtr> callback); virtual void sync_adaptedTypes(::facebook::thrift::test::HeapAllocated& /*_return*/, std::unique_ptr<::facebook::thrift::test::HeapAllocated> /*arg*/); [[deprecated("Use sync_adaptedTypes instead")]] virtual void adaptedTypes(::facebook::thrift::test::HeapAllocated& /*_return*/, std::unique_ptr<::facebook::thrift::test::HeapAllocated> /*arg*/); virtual folly::Future> future_adaptedTypes(std::unique_ptr<::facebook::thrift::test::HeapAllocated> p_arg); virtual folly::SemiFuture> semifuture_adaptedTypes(std::unique_ptr<::facebook::thrift::test::HeapAllocated> p_arg); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_adaptedTypes(std::unique_ptr<::facebook::thrift::test::HeapAllocated> p_arg); virtual folly::coro::Task> co_adaptedTypes(apache::thrift::RequestParams params, std::unique_ptr<::facebook::thrift::test::HeapAllocated> p_arg); #endif virtual void async_tm_adaptedTypes(apache::thrift::HandlerCallbackPtr> callback, std::unique_ptr<::facebook::thrift::test::HeapAllocated> p_arg); private: static ::facebook::thrift::test::AdapterServiceServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_count{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_adaptedTypes{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace facebook::thrift::test { using AdapterServiceSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace facebook::thrift::test namespace facebook::thrift::test { class AdapterServiceSvNull : public ::apache::thrift::ServiceHandler { public: void count(::facebook::thrift::test::CountingStruct& /*_return*/) override; void adaptedTypes(::facebook::thrift::test::HeapAllocated& /*_return*/, std::unique_ptr<::facebook::thrift::test::HeapAllocated> /*arg*/) override; }; class AdapterServiceAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase { public: const char* getServiceName() override; void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override; using BaseAsyncProcessor = void; protected: ::apache::thrift::ServiceHandler<::facebook::thrift::test::AdapterService>* 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 AdapterServiceAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const AdapterServiceAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_count(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_count(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_count(apache::thrift::ContextStack* ctx, ::facebook::thrift::test::CountingStruct const& _return); template static void throw_wrapped_count(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_adaptedTypes(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_adaptedTypes(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_adaptedTypes(apache::thrift::ContextStack* ctx, ::facebook::thrift::test::HeapAllocated const& _return); template static void throw_wrapped_adaptedTypes(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: AdapterServiceAsyncProcessor(::apache::thrift::ServiceHandler<::facebook::thrift::test::AdapterService>* iface) : iface_(iface) {} ~AdapterServiceAsyncProcessor() override {} }; } // namespace facebook::thrift::test