Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | // Generated by the gRPC C++ plugin. |
| 2 | // If you make any local change, they will be lost. |
| 3 | // source: monster_test |
| 4 | |
| 5 | #include "monster_test_generated.h" |
| 6 | #include "monster_test.grpc.fb.h" |
| 7 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 8 | #include <grpcpp/impl/codegen/async_stream.h> |
| 9 | #include <grpcpp/impl/codegen/async_unary_call.h> |
| 10 | #include <grpcpp/impl/codegen/channel_interface.h> |
| 11 | #include <grpcpp/impl/codegen/client_unary_call.h> |
| 12 | #include <grpcpp/impl/codegen/method_handler.h> |
| 13 | #include <grpcpp/impl/codegen/rpc_service_method.h> |
| 14 | #include <grpcpp/impl/codegen/service_type.h> |
| 15 | #include <grpcpp/impl/codegen/sync_stream.h> |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 16 | namespace MyGame { |
| 17 | namespace Example { |
| 18 | |
| 19 | static const char* MonsterStorage_method_names[] = { |
| 20 | "/MyGame.Example.MonsterStorage/Store", |
| 21 | "/MyGame.Example.MonsterStorage/Retrieve", |
| 22 | "/MyGame.Example.MonsterStorage/GetMaxHitPoint", |
| 23 | "/MyGame.Example.MonsterStorage/GetMinMaxHitPoints", |
| 24 | }; |
| 25 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 26 | std::unique_ptr< MonsterStorage::Stub> MonsterStorage::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& /*options*/) { |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 27 | std::unique_ptr< MonsterStorage::Stub> stub(new MonsterStorage::Stub(channel)); |
| 28 | return stub; |
| 29 | } |
| 30 | |
| 31 | MonsterStorage::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) |
| 32 | : channel_(channel) , rpcmethod_Store_(MonsterStorage_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) |
| 33 | , rpcmethod_Retrieve_(MonsterStorage_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) |
| 34 | , rpcmethod_GetMaxHitPoint_(MonsterStorage_method_names[2], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel) |
| 35 | , rpcmethod_GetMinMaxHitPoints_(MonsterStorage_method_names[3], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel) |
| 36 | {} |
| 37 | |
| 38 | ::grpc::Status MonsterStorage::Stub::Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) { |
| 39 | return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Store_, context, request, response); |
| 40 | } |
| 41 | |
| 42 | ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { |
| 43 | return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, true); |
| 44 | } |
| 45 | |
| 46 | ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { |
| 47 | return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, false); |
| 48 | } |
| 49 | |
| 50 | ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) { |
| 51 | return ::grpc::internal::ClientReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_Retrieve_, context, request); |
| 52 | } |
| 53 | |
| 54 | ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) { |
| 55 | return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, true, tag); |
| 56 | } |
| 57 | |
| 58 | ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) { |
| 59 | return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, false, nullptr); |
| 60 | } |
| 61 | |
| 62 | ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) { |
| 63 | return ::grpc::internal::ClientWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_GetMaxHitPoint_, context, response); |
| 64 | } |
| 65 | |
| 66 | ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) { |
| 67 | return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, true, tag); |
| 68 | } |
| 69 | |
| 70 | ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) { |
| 71 | return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, false, nullptr); |
| 72 | } |
| 73 | |
| 74 | ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::GetMinMaxHitPointsRaw(::grpc::ClientContext* context) { |
| 75 | return ::grpc::internal::ClientReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), rpcmethod_GetMinMaxHitPoints_, context); |
| 76 | } |
| 77 | |
| 78 | ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
| 79 | return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, true, tag); |
| 80 | } |
| 81 | |
| 82 | ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { |
| 83 | return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, false, nullptr); |
| 84 | } |
| 85 | |
| 86 | MonsterStorage::Service::Service() { |
| 87 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 88 | MonsterStorage_method_names[0], |
| 89 | ::grpc::internal::RpcMethod::NORMAL_RPC, |
| 90 | new ::grpc::internal::RpcMethodHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 91 | std::mem_fn(&MonsterStorage::Service::Store), this))); |
| 92 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 93 | MonsterStorage_method_names[1], |
| 94 | ::grpc::internal::RpcMethod::SERVER_STREAMING, |
| 95 | new ::grpc::internal::ServerStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>( |
| 96 | std::mem_fn(&MonsterStorage::Service::Retrieve), this))); |
| 97 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 98 | MonsterStorage_method_names[2], |
| 99 | ::grpc::internal::RpcMethod::CLIENT_STREAMING, |
| 100 | new ::grpc::internal::ClientStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 101 | std::mem_fn(&MonsterStorage::Service::GetMaxHitPoint), this))); |
| 102 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 103 | MonsterStorage_method_names[3], |
| 104 | ::grpc::internal::RpcMethod::BIDI_STREAMING, |
| 105 | new ::grpc::internal::BidiStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 106 | std::mem_fn(&MonsterStorage::Service::GetMinMaxHitPoints), this))); |
| 107 | } |
| 108 | |
| 109 | MonsterStorage::Service::~Service() { |
| 110 | } |
| 111 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 112 | ::grpc::Status MonsterStorage::Service::Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) { |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 113 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 114 | } |
| 115 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 116 | ::grpc::Status MonsterStorage::Service::Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) { |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 117 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 118 | } |
| 119 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 120 | ::grpc::Status MonsterStorage::Service::GetMaxHitPoint(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* /*reader*/, flatbuffers::grpc::Message<Stat>* /*response*/) { |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 121 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 122 | } |
| 123 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 124 | ::grpc::Status MonsterStorage::Service::GetMinMaxHitPoints(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* /*stream*/) { |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 125 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 126 | } |
| 127 | |
| 128 | |
| 129 | } // namespace MyGame |
| 130 | } // namespace Example |
| 131 | |