/** * 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/ServiceAsyncClient.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 Service; class ServiceAsyncProcessor; class ServiceServiceInfoHolder : 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::Service> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "Service"; } static const char* __fbthrift_thrift_uri() { return "facebook.com/thrift/test/Service"; } typedef ::facebook::thrift::test::ServiceAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual ::facebook::thrift::test::MyI32_4873 sync_func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> /*arg1*/, std::unique_ptr<::std::string> /*arg2*/, std::unique_ptr<::facebook::thrift::test::Foo> /*arg3*/); [[deprecated("Use sync_func instead")]] virtual ::facebook::thrift::test::MyI32_4873 func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> /*arg1*/, std::unique_ptr<::std::string> /*arg2*/, std::unique_ptr<::facebook::thrift::test::Foo> /*arg3*/); virtual folly::Future<::facebook::thrift::test::MyI32_4873> future_func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> p_arg1, std::unique_ptr<::std::string> p_arg2, std::unique_ptr<::facebook::thrift::test::Foo> p_arg3); virtual folly::SemiFuture<::facebook::thrift::test::MyI32_4873> semifuture_func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> p_arg1, std::unique_ptr<::std::string> p_arg2, std::unique_ptr<::facebook::thrift::test::Foo> p_arg3); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task<::facebook::thrift::test::MyI32_4873> co_func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> p_arg1, std::unique_ptr<::std::string> p_arg2, std::unique_ptr<::facebook::thrift::test::Foo> p_arg3); virtual folly::coro::Task<::facebook::thrift::test::MyI32_4873> co_func(apache::thrift::RequestParams params, std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> p_arg1, std::unique_ptr<::std::string> p_arg2, std::unique_ptr<::facebook::thrift::test::Foo> p_arg3); #endif virtual void async_tm_func(std::unique_ptr> callback, std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> p_arg1, std::unique_ptr<::std::string> p_arg2, std::unique_ptr<::facebook::thrift::test::Foo> p_arg3); private: static ::facebook::thrift::test::ServiceServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_func{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace facebook::thrift::test { using ServiceSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace facebook::thrift::test namespace facebook::thrift::test { class ServiceSvNull : public ::apache::thrift::ServiceHandler { public: ::facebook::thrift::test::MyI32_4873 func(std::unique_ptr<::facebook::thrift::test::StringWithAdapter_7208> /*arg1*/, std::unique_ptr<::std::string> /*arg2*/, std::unique_ptr<::facebook::thrift::test::Foo> /*arg3*/) override; }; class ServiceAsyncProcessor : 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::Service>* 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 ServiceAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const ServiceAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_func(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_func(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_func(apache::thrift::ContextStack* ctx, ::facebook::thrift::test::MyI32_4873 const& _return); template static void throw_wrapped_func(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: ServiceAsyncProcessor(::apache::thrift::ServiceHandler<::facebook::thrift::test::Service>* iface) : iface_(iface) {} ~ServiceAsyncProcessor() override {} }; } // namespace facebook::thrift::test