1 /**
2  * Autogenerated by Thrift for src/module.thrift
3  *
4  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5  *  @generated @nocommit
6  */
7 #pragma once
8 
9 #include <thrift/lib/cpp2/gen/service_h.h>
10 
11 #include "thrift/compiler/test/fixtures/basic-stack-arguments/gen-cpp2/MyServiceFastAsyncClient.h"
12 #include "thrift/compiler/test/fixtures/basic-stack-arguments/gen-cpp2/module_types.h"
13 
14 namespace folly {
15   class IOBuf;
16   class IOBufQueue;
17 }
18 namespace apache { namespace thrift {
19   class Cpp2RequestContext;
20   class BinaryProtocolReader;
21   class CompactProtocolReader;
22   namespace transport { class THeader; }
23 }}
24 
25 namespace cpp2 {
26 
27 class MyServiceFastSvAsyncIf {
28  public:
~MyServiceFastSvAsyncIf()29   virtual ~MyServiceFastSvAsyncIf() {}
30   virtual void async_eb_hasDataById(std::unique_ptr<apache::thrift::HandlerCallback<bool>> callback, ::std::int64_t p_id) = 0;
31   virtual void async_eb_getDataById(std::unique_ptr<apache::thrift::HandlerCallback<::std::string>> callback, ::std::int64_t p_id) = 0;
32   virtual void async_eb_putDataById(std::unique_ptr<apache::thrift::HandlerCallback<void>> callback, ::std::int64_t p_id, const ::std::string& p_data) = 0;
33   virtual void async_eb_lobDataById(std::unique_ptr<apache::thrift::HandlerCallbackBase> callback, ::std::int64_t p_id, const ::std::string& p_data) = 0;
34 };
35 
36 class MyServiceFastAsyncProcessor;
37 
38 class MyServiceFastSvIf : public MyServiceFastSvAsyncIf, public apache::thrift::ServerInterface {
39  public:
getGeneratedName()40   std::string_view getGeneratedName() const override { return "MyServiceFast"; }
41 
42   typedef MyServiceFastAsyncProcessor ProcessorType;
43   std::unique_ptr<apache::thrift::AsyncProcessor> getProcessor() override;
44   CreateMethodMetadataResult createMethodMetadata() override;
45 
46 
47   void async_eb_hasDataById(std::unique_ptr<apache::thrift::HandlerCallback<bool>> callback, ::std::int64_t p_id) override;
48   void async_eb_getDataById(std::unique_ptr<apache::thrift::HandlerCallback<::std::string>> callback, ::std::int64_t p_id) override;
49   void async_eb_putDataById(std::unique_ptr<apache::thrift::HandlerCallback<void>> callback, ::std::int64_t p_id, const ::std::string& p_data) override;
50   void async_eb_lobDataById(std::unique_ptr<apache::thrift::HandlerCallbackBase> callback, ::std::int64_t p_id, const ::std::string& p_data) override;
51  private:
52 };
53 
54 class MyServiceFastSvNull : public MyServiceFastSvIf {
55  public:
56 };
57 
58 class MyServiceFastAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessor {
59  public:
60   const char* getServiceName() override;
61   void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override;
62   using BaseAsyncProcessor = void;
63  protected:
64   MyServiceFastSvIf* iface_;
65  public:
66   // This is implemented in case the corresponding AsyncProcessorFactory did not implement createMethodMetadata.
67   // This can happen if the service is using a custom AsyncProcessorFactory but re-using the same AsyncProcessor.
68   void processSerializedCompressedRequest(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::protocol::PROTOCOL_TYPES protType, apache::thrift::Cpp2RequestContext* context, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) override;
69   // By default, this overload will be called for generated services
70   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;
71  public:
72   using ProcessFuncs = GeneratedAsyncProcessor::ProcessFuncs<MyServiceFastAsyncProcessor>;
73   using ProcessMap = GeneratedAsyncProcessor::ProcessMap<ProcessFuncs>;
74   static const MyServiceFastAsyncProcessor::ProcessMap& getOwnProcessMap();
75  private:
76   static const MyServiceFastAsyncProcessor::ProcessMap kOwnProcessMap_;
77  private:
78   template <typename ProtocolIn_, typename ProtocolOut_>
79   void setUpAndProcess_hasDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
80   template <typename ProtocolIn_, typename ProtocolOut_>
81   void process_hasDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx,folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
82   template <class ProtocolIn_, class ProtocolOut_>
83   static apache::thrift::SerializedResponse return_hasDataById(apache::thrift::ContextStack* ctx, bool const& _return);
84   template <class ProtocolIn_, class ProtocolOut_>
85   static void throw_wrapped_hasDataById(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx);
86   template <typename ProtocolIn_, typename ProtocolOut_>
87   void setUpAndProcess_getDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
88   template <typename ProtocolIn_, typename ProtocolOut_>
89   void process_getDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx,folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
90   template <class ProtocolIn_, class ProtocolOut_>
91   static apache::thrift::SerializedResponse return_getDataById(apache::thrift::ContextStack* ctx, ::std::string const& _return);
92   template <class ProtocolIn_, class ProtocolOut_>
93   static void throw_wrapped_getDataById(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx);
94   template <typename ProtocolIn_, typename ProtocolOut_>
95   void setUpAndProcess_putDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
96   template <typename ProtocolIn_, typename ProtocolOut_>
97   void process_putDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx,folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
98   template <class ProtocolIn_, class ProtocolOut_>
99   static apache::thrift::SerializedResponse return_putDataById(apache::thrift::ContextStack* ctx);
100   template <class ProtocolIn_, class ProtocolOut_>
101   static void throw_wrapped_putDataById(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx);
102   template <typename ProtocolIn_, typename ProtocolOut_>
103   void setUpAndProcess_lobDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
104   template <typename ProtocolIn_, typename ProtocolOut_>
105   void process_lobDataById(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx,folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
106  public:
MyServiceFastAsyncProcessor(MyServiceFastSvIf * iface)107   MyServiceFastAsyncProcessor(MyServiceFastSvIf* iface) :
108       iface_(iface) {}
~MyServiceFastAsyncProcessor()109   ~MyServiceFastAsyncProcessor() override {}
110 };
111 
112 } // cpp2
113