/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/basic-structured-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-structured-annotations/gen-cpp2/MyServiceAsyncClient.h" #include "thrift/compiler/test/fixtures/basic-structured-annotations/gen-cpp2/module_types.h" #include "thrift/compiler/test/fixtures/basic-structured-annotations/gen-cpp2/included_types.h" #include "thrift/compiler/test/fixtures/basic-structured-annotations/gen-cpp2/namespaced_types.h" namespace folly { class IOBuf; class IOBufQueue; } namespace apache { namespace thrift { class Cpp2RequestContext; class BinaryProtocolReader; class CompactProtocolReader; namespace transport { class THeader; } }} namespace test::fixtures::basic-structured-annotations { class MyService; class MyServiceAsyncProcessor; class MyServiceServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; } // namespace test::fixtures::basic-structured-annotations namespace apache::thrift { template <> class ServiceHandler<::test::fixtures::basic-structured-annotations::MyService> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "MyService"; } static const char* __fbthrift_thrift_uri() { return "test.dev/fixtures/basic-structured-annotations/MyService"; } typedef ::test::fixtures::basic-structured-annotations::MyServiceAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_first(::test::fixtures::basic-structured-annotations::annotated_inline_string& /*_return*/); [[deprecated("Use sync_first instead")]] virtual void first(::test::fixtures::basic-structured-annotations::annotated_inline_string& /*_return*/); virtual folly::Future> future_first(); virtual folly::SemiFuture> semifuture_first(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_first(); virtual folly::coro::Task> co_first(apache::thrift::RequestParams params); #endif virtual void async_tm_first(std::unique_ptr>> callback); virtual bool sync_second(::std::int64_t /*count*/); [[deprecated("Use sync_second instead")]] virtual bool second(::std::int64_t /*count*/); virtual folly::Future future_second(::std::int64_t p_count); virtual folly::SemiFuture semifuture_second(::std::int64_t p_count); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_second(::std::int64_t p_count); virtual folly::coro::Task co_second(apache::thrift::RequestParams params, ::std::int64_t p_count); #endif virtual void async_tm_second(std::unique_ptr> callback, ::std::int64_t p_count); private: static ::test::fixtures::basic-structured-annotations::MyServiceServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_first{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_second{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace test::fixtures::basic-structured-annotations { using MyServiceSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace test::fixtures::basic-structured-annotations namespace test::fixtures::basic-structured-annotations { class MyServiceSvNull : public ::apache::thrift::ServiceHandler { public: void first(::test::fixtures::basic-structured-annotations::annotated_inline_string& /*_return*/) override; bool second(::std::int64_t /*count*/) override; }; class MyServiceAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase { public: const char* getServiceName() override; void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override; using BaseAsyncProcessor = void; protected: ::apache::thrift::ServiceHandler<::test::fixtures::basic-structured-annotations::MyService>* 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 MyServiceAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const MyServiceAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_first(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_first(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_first(apache::thrift::ContextStack* ctx, ::test::fixtures::basic-structured-annotations::annotated_inline_string const& _return); template static void throw_wrapped_first(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_second(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_second(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_second(apache::thrift::ContextStack* ctx, bool const& _return); template static void throw_wrapped_second(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: MyServiceAsyncProcessor(::apache::thrift::ServiceHandler<::test::fixtures::basic-structured-annotations::MyService>* iface) : iface_(iface) {} ~MyServiceAsyncProcessor() override {} }; } // namespace test::fixtures::basic-structured-annotations