/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/client-methods/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/client-methods/gen-cpp2/HeaderClientMethodsAnnotationOnFunctionAsyncClient.h" #include "thrift/compiler/test/fixtures/client-methods/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 HeaderClientMethodsAnnotationOnFunction; class HeaderClientMethodsAnnotationOnFunctionAsyncProcessor; class HeaderClientMethodsAnnotationOnFunctionServiceInfoHolder : 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::HeaderClientMethodsAnnotationOnFunction> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "HeaderClientMethodsAnnotationOnFunction"; } typedef ::cpp2::HeaderClientMethodsAnnotationOnFunctionAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; bool isThriftGenerated() const override final { return true; } private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_echo(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/); [[deprecated("Use sync_echo instead")]] virtual void echo(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/); virtual folly::Future> future_echo(std::unique_ptr<::cpp2::EchoRequest> p_request); virtual folly::SemiFuture> semifuture_echo(std::unique_ptr<::cpp2::EchoRequest> p_request); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_echo(std::unique_ptr<::cpp2::EchoRequest> p_request); virtual folly::coro::Task> co_echo(apache::thrift::RequestParams params, std::unique_ptr<::cpp2::EchoRequest> p_request); #endif virtual void async_tm_echo(apache::thrift::HandlerCallbackPtr> callback, std::unique_ptr<::cpp2::EchoRequest> p_request); virtual void sync_echo_2(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/); [[deprecated("Use sync_echo_2 instead")]] virtual void echo_2(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/); virtual folly::Future> future_echo_2(std::unique_ptr<::cpp2::EchoRequest> p_request); virtual folly::SemiFuture> semifuture_echo_2(std::unique_ptr<::cpp2::EchoRequest> p_request); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_echo_2(std::unique_ptr<::cpp2::EchoRequest> p_request); virtual folly::coro::Task> co_echo_2(apache::thrift::RequestParams params, std::unique_ptr<::cpp2::EchoRequest> p_request); #endif virtual void async_tm_echo_2(apache::thrift::HandlerCallbackPtr> callback, std::unique_ptr<::cpp2::EchoRequest> p_request); private: static ::cpp2::HeaderClientMethodsAnnotationOnFunctionServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_echo{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_echo_2{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace cpp2 { using HeaderClientMethodsAnnotationOnFunctionSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace cpp2 namespace cpp2 { class HeaderClientMethodsAnnotationOnFunctionSvNull : public ::apache::thrift::ServiceHandler { public: void echo(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/) override; void echo_2(::cpp2::EchoResponse& /*_return*/, std::unique_ptr<::cpp2::EchoRequest> /*request*/) override; }; class HeaderClientMethodsAnnotationOnFunctionAsyncProcessor : 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::HeaderClientMethodsAnnotationOnFunction>* 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 HeaderClientMethodsAnnotationOnFunctionAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const HeaderClientMethodsAnnotationOnFunctionAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_echo(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_echo(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_echo(apache::thrift::ContextStack* ctx, ::cpp2::EchoResponse const& _return); template static void throw_wrapped_echo(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_echo_2(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_echo_2(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_echo_2(apache::thrift::ContextStack* ctx, ::cpp2::EchoResponse const& _return); template static void throw_wrapped_echo_2(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: HeaderClientMethodsAnnotationOnFunctionAsyncProcessor(::apache::thrift::ServiceHandler<::cpp2::HeaderClientMethodsAnnotationOnFunction>* iface) : iface_(iface) {} ~HeaderClientMethodsAnnotationOnFunctionAsyncProcessor() override {} }; } // namespace cpp2