代码拉取完成,页面将自动刷新
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: hello.proto
#ifndef GRPC_hello_2eproto__INCLUDED
#define GRPC_hello_2eproto__INCLUDED
#include "hello.pb.h"
#include <functional>
#include <grpcpp/impl/codegen/async_generic_service.h>
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
#include <grpcpp/impl/codegen/client_callback.h>
#include <grpcpp/impl/codegen/client_context.h>
#include <grpcpp/impl/codegen/completion_queue.h>
#include <grpcpp/impl/codegen/message_allocator.h>
#include <grpcpp/impl/codegen/method_handler.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/impl/codegen/rpc_method.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/server_callback_handlers.h>
#include <grpcpp/impl/codegen/server_context.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/stub_options.h>
#include <grpcpp/impl/codegen/sync_stream.h>
namespace hello {
class HelloService final {
public:
static constexpr char const* service_full_name() {
return "hello.HelloService";
}
class StubInterface {
public:
virtual ~StubInterface() {}
std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>> hello(::grpc::ClientContext* context) {
return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>>(helloRaw(context));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>> Asynchello(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>>(AsynchelloRaw(context, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>> PrepareAsynchello(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>>(PrepareAsynchelloRaw(context, cq));
}
class async_interface {
public:
virtual ~async_interface() {}
virtual void hello(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::hello::HelloMsg,::hello::HelloMsg>* reactor) = 0;
};
typedef class async_interface experimental_async_interface;
virtual class async_interface* async() { return nullptr; }
class async_interface* experimental_async() { return async(); }
private:
virtual ::grpc::ClientReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>* helloRaw(::grpc::ClientContext* context) = 0;
virtual ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>* AsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
virtual ::grpc::ClientAsyncReaderWriterInterface< ::hello::HelloMsg, ::hello::HelloMsg>* PrepareAsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
};
class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
std::unique_ptr< ::grpc::ClientReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>> hello(::grpc::ClientContext* context) {
return std::unique_ptr< ::grpc::ClientReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>>(helloRaw(context));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>> Asynchello(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>>(AsynchelloRaw(context, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>> PrepareAsynchello(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>>(PrepareAsynchelloRaw(context, cq));
}
class async final :
public StubInterface::async_interface {
public:
void hello(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::hello::HelloMsg,::hello::HelloMsg>* reactor) override;
private:
friend class Stub;
explicit async(Stub* stub): stub_(stub) { }
Stub* stub() { return stub_; }
Stub* stub_;
};
class async* async() override { return &async_stub_; }
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
class async async_stub_{this};
::grpc::ClientReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* helloRaw(::grpc::ClientContext* context) override;
::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* AsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* PrepareAsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_hello_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
virtual ::grpc::Status hello(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* stream);
};
template <class BaseClass>
class WithAsyncMethod_hello : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithAsyncMethod_hello() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_hello() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status hello(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* /*stream*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void Requesthello(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_hello<Service > AsyncService;
template <class BaseClass>
class WithCallbackMethod_hello : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithCallbackMethod_hello() {
::grpc::Service::MarkMethodCallback(0,
new ::grpc::internal::CallbackBidiHandler< ::hello::HelloMsg, ::hello::HelloMsg>(
[this](
::grpc::CallbackServerContext* context) { return this->hello(context); }));
}
~WithCallbackMethod_hello() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status hello(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* /*stream*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerBidiReactor< ::hello::HelloMsg, ::hello::HelloMsg>* hello(
::grpc::CallbackServerContext* /*context*/)
{ return nullptr; }
};
typedef WithCallbackMethod_hello<Service > CallbackService;
typedef CallbackService ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_hello : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithGenericMethod_hello() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_hello() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status hello(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* /*stream*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithRawMethod_hello : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawMethod_hello() {
::grpc::Service::MarkMethodRaw(0);
}
~WithRawMethod_hello() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status hello(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* /*stream*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void Requesthello(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawCallbackMethod_hello : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawCallbackMethod_hello() {
::grpc::Service::MarkMethodRawCallback(0,
new ::grpc::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](
::grpc::CallbackServerContext* context) { return this->hello(context); }));
}
~WithRawCallbackMethod_hello() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status hello(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* /*stream*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* hello(
::grpc::CallbackServerContext* /*context*/)
{ return nullptr; }
};
typedef Service StreamedUnaryService;
typedef Service SplitStreamedService;
typedef Service StreamedService;
};
} // namespace hello
#endif // GRPC_hello_2eproto__INCLUDED
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。