summaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
diff options
context:
space:
mode:
authorheretic <[email protected]>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h')
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h114
1 files changed, 57 insertions, 57 deletions
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
index d97b7250251..c04c1b217c1 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
@@ -19,8 +19,8 @@
#ifndef GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H
#define GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H
-#include <grpc/impl/codegen/port_platform.h>
-
+#include <grpc/impl/codegen/port_platform.h>
+
#include <grpc/impl/codegen/grpc_types.h>
#include <grpcpp/impl/codegen/byte_buffer.h>
#include <grpcpp/impl/codegen/call.h>
@@ -29,14 +29,14 @@
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/interceptor_common.h>
#include <grpcpp/impl/codegen/rpc_service_method.h>
-#include <grpcpp/impl/codegen/server_context.h>
+#include <grpcpp/impl/codegen/server_context.h>
-namespace grpc {
+namespace grpc {
-class AsyncGenericService;
+class AsyncGenericService;
class Channel;
class CompletionQueue;
-class GenericServerContext;
+class GenericServerContext;
class ServerCompletionQueue;
class ServerCredentials;
class Service;
@@ -50,15 +50,15 @@ namespace internal {
class ServerAsyncStreamingInterface;
} // namespace internal
-#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
namespace experimental {
-#endif
+#endif
class CallbackGenericService;
-#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
-} // namespace experimental
-#endif
-
-namespace experimental {
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+} // namespace experimental
+#endif
+
+namespace experimental {
class ServerInterceptorFactoryInterface;
} // namespace experimental
@@ -124,20 +124,20 @@ class ServerInterface : public internal::CallHook {
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
- virtual bool RegisterService(const TString* host, Service* service) = 0;
+ virtual bool RegisterService(const TString* host, Service* service) = 0;
/// Register a generic service. This call does not take ownership of the
/// service. The service must exist for the lifetime of the Server instance.
virtual void RegisterAsyncGenericService(AsyncGenericService* service) = 0;
-#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
- /// Register a callback generic service. This call does not take ownership of
- /// the service. The service must exist for the lifetime of the Server
- /// instance. May not be abstract since this is a post-1.0 API addition.
-
- virtual void RegisterCallbackGenericService(CallbackGenericService*
- /*service*/) {}
-#else
+#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
+ /// Register a callback generic service. This call does not take ownership of
+ /// the service. The service must exist for the lifetime of the Server
+ /// instance. May not be abstract since this is a post-1.0 API addition.
+
+ virtual void RegisterCallbackGenericService(CallbackGenericService*
+ /*service*/) {}
+#else
/// NOTE: class experimental_registration_interface is not part of the public
/// API of this class
/// TODO(vjpai): Move these contents to public API when no longer experimental
@@ -156,7 +156,7 @@ class ServerInterface : public internal::CallHook {
virtual experimental_registration_interface* experimental_registration() {
return nullptr;
}
-#endif
+#endif
/// Tries to bind \a server to the given \a addr.
///
@@ -169,8 +169,8 @@ class ServerInterface : public internal::CallHook {
/// \return bound port number on success, 0 on failure.
///
/// \warning It's an error to call this method on an already started server.
- virtual int AddListeningPort(const TString& addr,
- ServerCredentials* creds) = 0;
+ virtual int AddListeningPort(const TString& addr,
+ ServerCredentials* creds) = 0;
/// Start the server.
///
@@ -178,7 +178,7 @@ class ServerInterface : public internal::CallHook {
/// caller is required to keep all completion queues live until the server is
/// destroyed.
/// \param num_cqs How many completion queues does \a cqs hold.
- virtual void Start(::grpc::ServerCompletionQueue** cqs, size_t num_cqs) = 0;
+ virtual void Start(::grpc::ServerCompletionQueue** cqs, size_t num_cqs) = 0;
virtual void ShutdownInternal(gpr_timespec deadline) = 0;
@@ -191,11 +191,11 @@ class ServerInterface : public internal::CallHook {
class BaseAsyncRequest : public internal::CompletionQueueTag {
public:
- BaseAsyncRequest(ServerInterface* server, ::grpc::ServerContext* context,
+ BaseAsyncRequest(ServerInterface* server, ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq, void* tag,
- bool delete_on_finalize);
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq, void* tag,
+ bool delete_on_finalize);
virtual ~BaseAsyncRequest();
bool FinalizeResult(void** tag, bool* status) override;
@@ -205,10 +205,10 @@ class ServerInterface : public internal::CallHook {
protected:
ServerInterface* const server_;
- ::grpc::ServerContext* const context_;
+ ::grpc::ServerContext* const context_;
internal::ServerAsyncStreamingInterface* const stream_;
- ::grpc::CompletionQueue* const call_cq_;
- ::grpc::ServerCompletionQueue* const notification_cq_;
+ ::grpc::CompletionQueue* const call_cq_;
+ ::grpc::ServerCompletionQueue* const notification_cq_;
void* const tag_;
const bool delete_on_finalize_;
grpc_call* call_;
@@ -221,10 +221,10 @@ class ServerInterface : public internal::CallHook {
class RegisteredAsyncRequest : public BaseAsyncRequest {
public:
RegisteredAsyncRequest(ServerInterface* server,
- ::grpc::ServerContext* context,
+ ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag, const char* name,
internal::RpcMethod::RpcType type);
@@ -242,7 +242,7 @@ class ServerInterface : public internal::CallHook {
protected:
void IssueRequest(void* registered_method, grpc_byte_buffer** payload,
- ::grpc::ServerCompletionQueue* notification_cq);
+ ::grpc::ServerCompletionQueue* notification_cq);
const char* name_;
const internal::RpcMethod::RpcType type_;
};
@@ -251,10 +251,10 @@ class ServerInterface : public internal::CallHook {
public:
NoPayloadAsyncRequest(internal::RpcServiceMethod* registered_method,
ServerInterface* server,
- ::grpc::ServerContext* context,
+ ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag)
: RegisteredAsyncRequest(
server, context, stream, call_cq, notification_cq, tag,
@@ -269,10 +269,10 @@ class ServerInterface : public internal::CallHook {
class PayloadAsyncRequest final : public RegisteredAsyncRequest {
public:
PayloadAsyncRequest(internal::RpcServiceMethod* registered_method,
- ServerInterface* server, ::grpc::ServerContext* context,
+ ServerInterface* server, ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag, Message* request)
: RegisteredAsyncRequest(
server, context, stream, call_cq, notification_cq, tag,
@@ -327,8 +327,8 @@ class ServerInterface : public internal::CallHook {
public:
GenericAsyncRequest(ServerInterface* server, GenericServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag, bool delete_on_finalize);
bool FinalizeResult(void** tag, bool* status) override;
@@ -339,10 +339,10 @@ class ServerInterface : public internal::CallHook {
template <class Message>
void RequestAsyncCall(internal::RpcServiceMethod* method,
- ::grpc::ServerContext* context,
+ ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag, Message* message) {
GPR_CODEGEN_ASSERT(method);
new PayloadAsyncRequest<Message>(method, this, context, stream, call_cq,
@@ -350,21 +350,21 @@ class ServerInterface : public internal::CallHook {
}
void RequestAsyncCall(internal::RpcServiceMethod* method,
- ::grpc::ServerContext* context,
+ ::grpc::ServerContext* context,
internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
void* tag) {
GPR_CODEGEN_ASSERT(method);
new NoPayloadAsyncRequest(method, this, context, stream, call_cq,
notification_cq, tag);
}
- void RequestAsyncGenericCall(GenericServerContext* context,
- internal::ServerAsyncStreamingInterface* stream,
- ::grpc::CompletionQueue* call_cq,
- ::grpc::ServerCompletionQueue* notification_cq,
- void* tag) {
+ void RequestAsyncGenericCall(GenericServerContext* context,
+ internal::ServerAsyncStreamingInterface* stream,
+ ::grpc::CompletionQueue* call_cq,
+ ::grpc::ServerCompletionQueue* notification_cq,
+ void* tag) {
new GenericAsyncRequest(this, context, stream, call_cq, notification_cq,
tag, true);
}
@@ -389,7 +389,7 @@ class ServerInterface : public internal::CallHook {
// Returns nullptr (rather than being pure) since this is a post-1.0 method
// and adding a new pure method to an interface would be a breaking change
// (even though this is private and non-API)
- virtual ::grpc::CompletionQueue* CallbackCQ() { return nullptr; }
+ virtual ::grpc::CompletionQueue* CallbackCQ() { return nullptr; }
};
} // namespace grpc