aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/include/grpcpp/impl/call.h
diff options
context:
space:
mode:
authorleonidlazarev <leonidlazarev@yandex-team.com>2023-06-02 15:07:38 +0300
committerleonidlazarev <leonidlazarev@yandex-team.com>2023-06-02 15:07:38 +0300
commit59e0045a61e61c2ac38878f2adc7ec91ca914cc1 (patch)
treeb6b64c51025630a7d40923d4aa7b7b882e1a8848 /contrib/libs/grpc/include/grpcpp/impl/call.h
parent7506c5c295065b4360d617393af34203f037946d (diff)
downloadydb-59e0045a61e61c2ac38878f2adc7ec91ca914cc1.tar.gz
feat grpc: update to grpc 1.50.2
update grpc to 1.50.2 update grpcio to 1.50.0 Удаленные патчи: 06-flow_control.patch - логика в upstream удалена 10-fix-crash-on-fork.patch - логика в upstream удалена 12-coverity-fix.patch - логика в upstream удалена 20-P2166-string-nullptr.patch - в upstream временный объект вместо nullptr PR29209-fix-heap-use-after-free.patch - решение есть в upstream Добавленные патчи: pr33085_fix_epoll1_engine_reinit.patch 21-windows_build.patch
Diffstat (limited to 'contrib/libs/grpc/include/grpcpp/impl/call.h')
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/call.h72
1 files changed, 71 insertions, 1 deletions
diff --git a/contrib/libs/grpc/include/grpcpp/impl/call.h b/contrib/libs/grpc/include/grpcpp/impl/call.h
index 97d8fdfc7c..2a119963f5 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/call.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/call.h
@@ -19,6 +19,76 @@
#ifndef GRPCPP_IMPL_CALL_H
#define GRPCPP_IMPL_CALL_H
-#include <grpcpp/impl/codegen/call.h> // IWYU pragma: export
+#include <grpc/impl/codegen/grpc_types.h>
+#include <grpcpp/impl/call_hook.h>
+
+namespace grpc {
+class CompletionQueue;
+namespace experimental {
+class ClientRpcInfo;
+class ServerRpcInfo;
+} // namespace experimental
+namespace internal {
+class CallHook;
+class CallOpSetInterface;
+
+/// Straightforward wrapping of the C call object
+class Call final {
+ public:
+ Call()
+ : call_hook_(nullptr),
+ cq_(nullptr),
+ call_(nullptr),
+ max_receive_message_size_(-1) {}
+ /** call is owned by the caller */
+ Call(grpc_call* call, CallHook* call_hook, grpc::CompletionQueue* cq)
+ : call_hook_(call_hook),
+ cq_(cq),
+ call_(call),
+ max_receive_message_size_(-1) {}
+
+ Call(grpc_call* call, CallHook* call_hook, grpc::CompletionQueue* cq,
+ experimental::ClientRpcInfo* rpc_info)
+ : call_hook_(call_hook),
+ cq_(cq),
+ call_(call),
+ max_receive_message_size_(-1),
+ client_rpc_info_(rpc_info) {}
+
+ Call(grpc_call* call, CallHook* call_hook, grpc::CompletionQueue* cq,
+ int max_receive_message_size, experimental::ServerRpcInfo* rpc_info)
+ : call_hook_(call_hook),
+ cq_(cq),
+ call_(call),
+ max_receive_message_size_(max_receive_message_size),
+ server_rpc_info_(rpc_info) {}
+
+ void PerformOps(CallOpSetInterface* ops) {
+ call_hook_->PerformOpsOnCall(ops, this);
+ }
+
+ grpc_call* call() const { return call_; }
+ grpc::CompletionQueue* cq() const { return cq_; }
+
+ int max_receive_message_size() const { return max_receive_message_size_; }
+
+ experimental::ClientRpcInfo* client_rpc_info() const {
+ return client_rpc_info_;
+ }
+
+ experimental::ServerRpcInfo* server_rpc_info() const {
+ return server_rpc_info_;
+ }
+
+ private:
+ CallHook* call_hook_;
+ grpc::CompletionQueue* cq_;
+ grpc_call* call_;
+ int max_receive_message_size_;
+ experimental::ClientRpcInfo* client_rpc_info_ = nullptr;
+ experimental::ServerRpcInfo* server_rpc_info_ = nullptr;
+};
+} // namespace internal
+} // namespace grpc
#endif // GRPCPP_IMPL_CALL_H