|
|
|
@ -345,7 +345,7 @@ auto MapResult(const NoInterceptor*, Promise x, void*) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename Promise, typename Derived> |
|
|
|
|
auto MapResult(absl::Status (Derived::Call::* fn)(ServerMetadata&), Promise x, |
|
|
|
|
auto MapResult(absl::Status (Derived::Call::*fn)(ServerMetadata&), Promise x, |
|
|
|
|
FilterCallData<Derived>* call_data) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata); |
|
|
|
|
return OnCancel(Map(std::move(x), |
|
|
|
@ -366,7 +366,7 @@ auto MapResult(absl::Status (Derived::Call::* fn)(ServerMetadata&), Promise x, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename Promise, typename Derived> |
|
|
|
|
auto MapResult(void (Derived::Call::* fn)(ServerMetadata&), Promise x, |
|
|
|
|
auto MapResult(void (Derived::Call::*fn)(ServerMetadata&), Promise x, |
|
|
|
|
FilterCallData<Derived>* call_data) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata); |
|
|
|
|
return OnCancel(Map(std::move(x), |
|
|
|
@ -383,7 +383,7 @@ auto MapResult(void (Derived::Call::* fn)(ServerMetadata&), Promise x, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename Promise, typename Derived> |
|
|
|
|
auto MapResult(void (Derived::Call::* fn)(ServerMetadata&, Derived*), Promise x, |
|
|
|
|
auto MapResult(void (Derived::Call::*fn)(ServerMetadata&, Derived*), Promise x, |
|
|
|
|
FilterCallData<Derived>* call_data) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata); |
|
|
|
|
return OnCancel( |
|
|
|
@ -513,7 +513,7 @@ auto RunCall(Interceptor interceptor, CallArgs call_args, |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
void (Derived::Call::* fn)(const Message&), |
|
|
|
|
void (Derived::Call::*fn)(const Message&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs&) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -524,7 +524,7 @@ inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
ServerMetadataHandle (Derived::Call::* fn)(const Message&), |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs&) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -538,7 +538,7 @@ inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*), |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs&) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -553,7 +553,7 @@ inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*), |
|
|
|
|
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs&) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -564,8 +564,7 @@ inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline auto InterceptClientToServerMessageHandler( |
|
|
|
|
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle, |
|
|
|
|
Derived*), |
|
|
|
|
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs&) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnClientToServerMessage); |
|
|
|
|
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> { |
|
|
|
@ -609,7 +608,7 @@ inline void InterceptServerInitialMetadata(const NoInterceptor*, void*, |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerInitialMetadata( |
|
|
|
|
void (Derived::Call::* fn)(ServerMetadata&), |
|
|
|
|
void (Derived::Call::*fn)(ServerMetadata&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerInitialMetadata); |
|
|
|
|
call_args.server_initial_metadata->InterceptAndMap( |
|
|
|
@ -621,7 +620,7 @@ inline void InterceptServerInitialMetadata( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerInitialMetadata( |
|
|
|
|
absl::Status (Derived::Call::* fn)(ServerMetadata&), |
|
|
|
|
absl::Status (Derived::Call::*fn)(ServerMetadata&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerInitialMetadata); |
|
|
|
|
call_args.server_initial_metadata->InterceptAndMap( |
|
|
|
@ -638,7 +637,7 @@ inline void InterceptServerInitialMetadata( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerInitialMetadata( |
|
|
|
|
void (Derived::Call::* fn)(ServerMetadata&, Derived*), |
|
|
|
|
void (Derived::Call::*fn)(ServerMetadata&, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerInitialMetadata); |
|
|
|
|
call_args.server_initial_metadata->InterceptAndMap( |
|
|
|
@ -650,7 +649,7 @@ inline void InterceptServerInitialMetadata( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerInitialMetadata( |
|
|
|
|
absl::Status (Derived::Call::* fn)(ServerMetadata&, Derived*), |
|
|
|
|
absl::Status (Derived::Call::*fn)(ServerMetadata&, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerInitialMetadata); |
|
|
|
|
call_args.server_initial_metadata->InterceptAndMap( |
|
|
|
@ -671,7 +670,7 @@ inline void InterceptServerToClientMessage(const NoInterceptor*, void*, |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
void (Derived::Call::* fn)(const Message&), |
|
|
|
|
void (Derived::Call::*fn)(const Message&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_args.server_to_client_messages->InterceptAndMap( |
|
|
|
@ -683,7 +682,7 @@ inline void InterceptServerToClientMessage( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
ServerMetadataHandle (Derived::Call::* fn)(const Message&), |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_args.server_to_client_messages->InterceptAndMap( |
|
|
|
@ -698,7 +697,7 @@ inline void InterceptServerToClientMessage( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*), |
|
|
|
|
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_args.server_to_client_messages->InterceptAndMap( |
|
|
|
@ -714,7 +713,7 @@ inline void InterceptServerToClientMessage( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*), |
|
|
|
|
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_args.server_to_client_messages->InterceptAndMap( |
|
|
|
@ -726,8 +725,7 @@ inline void InterceptServerToClientMessage( |
|
|
|
|
|
|
|
|
|
template <typename Derived> |
|
|
|
|
inline void InterceptServerToClientMessage( |
|
|
|
|
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle, |
|
|
|
|
Derived*), |
|
|
|
|
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*), |
|
|
|
|
FilterCallData<Derived>* call_data, const CallArgs& call_args) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnServerToClientMessage); |
|
|
|
|
call_args.server_to_client_messages->InterceptAndMap( |
|
|
|
@ -744,7 +742,7 @@ inline void InterceptServerToClientMessage( |
|
|
|
|
inline void InterceptFinalize(const NoInterceptor*, void*, void*) {} |
|
|
|
|
|
|
|
|
|
template <class Call> |
|
|
|
|
inline void InterceptFinalize(void (Call::* fn)(const grpc_call_final_info*), |
|
|
|
|
inline void InterceptFinalize(void (Call::*fn)(const grpc_call_final_info*), |
|
|
|
|
void*, Call* call) { |
|
|
|
|
DCHECK(fn == &Call::OnFinalize); |
|
|
|
|
GetContext<CallFinalization>()->Add( |
|
|
|
@ -755,7 +753,7 @@ inline void InterceptFinalize(void (Call::* fn)(const grpc_call_final_info*), |
|
|
|
|
|
|
|
|
|
template <class Derived> |
|
|
|
|
inline void InterceptFinalize( |
|
|
|
|
void (Derived::Call::* fn)(const grpc_call_final_info*, Derived*), |
|
|
|
|
void (Derived::Call::*fn)(const grpc_call_final_info*, Derived*), |
|
|
|
|
Derived* channel, typename Derived::Call* call) { |
|
|
|
|
DCHECK(fn == &Derived::Call::OnFinalize); |
|
|
|
|
GetContext<CallFinalization>()->Add( |
|
|
|
|