binder_stream.h
Go to the documentation of this file.
1 // Copyright 2021 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_STREAM_H
16 #define GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_STREAM_H
17 
19 
21 
25  int tx_code;
27 };
28 
32  int tx_code;
34 };
35 
39  int tx_code;
41  int status;
42 };
43 
47 };
48 
49 // TODO(mingcl): Figure out if we want to use class instead of struct here
51  // server_data will be null for client, and for server it will be whatever
52  // passed in to the accept_stream_fn callback by client.
54  const void* /*server_data*/, grpc_core::Arena* arena,
55  int tx_code, bool is_client)
56  : t(t),
58  arena(arena),
61  is_closed(false) {
64  recv_message_args.gbs = this;
68  }
69 
72  if (destroy_stream_then_closure != nullptr) {
75  }
76  }
77 
78  int GetTxCode() const { return tx_code; }
79 
83  int tx_code;
84  const bool is_client;
85  bool is_closed;
86 
89 
90  // The reason why this stream is cancelled and closed.
92 
99 
102 
103  // We store these fields passed from op batch, in order to access them through
104  // grpc_binder_stream
113 
116 };
117 
118 #endif // GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_STREAM_H
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
grpc_binder_stream::recv_message
absl::optional< grpc_core::SliceBuffer > * recv_message
Definition: binder_stream.h:108
grpc_binder_stream::is_client
const bool is_client
Definition: binder_stream.h:84
RecvTrailingMetadataArgs::trailing_metadata
absl::StatusOr< grpc_binder::Metadata > trailing_metadata
Definition: binder_stream.h:40
false
#define false
Definition: setup_once.h:323
grpc_binder_stream::recv_trailing_metadata
grpc_metadata_batch * recv_trailing_metadata
Definition: binder_stream.h:111
grpc_binder_stream::trailing_metadata_available
bool * trailing_metadata_available
Definition: binder_stream.h:107
RecvTrailingMetadataArgs::status
int status
Definition: binder_stream.h:41
grpc_binder_stream::cancel_self_error
grpc_error_handle cancel_self_error
Definition: binder_stream.h:91
grpc_binder_stream::recv_message_ready
grpc_closure * recv_message_ready
Definition: binder_stream.h:109
RecvMessageArgs::gbt
grpc_binder_transport * gbt
Definition: binder_stream.h:31
RecvTrailingMetadataArgs
Definition: binder_stream.h:36
grpc_binder_stream::tx_code
int tx_code
Definition: binder_stream.h:83
RecvInitialMetadataArgs::gbs
grpc_binder_stream * gbs
Definition: binder_stream.h:23
grpc_binder_stream::recv_initial_metadata_args
RecvInitialMetadataArgs recv_initial_metadata_args
Definition: binder_stream.h:94
grpc_core::Arena
Definition: src/core/lib/resource_quota/arena.h:45
RegisterStreamArgs::gbt
grpc_binder_transport * gbt
Definition: binder_stream.h:46
grpc_binder_stream::GetTxCode
int GetTxCode() const
Definition: binder_stream.h:78
RecvTrailingMetadataArgs::gbs
grpc_binder_stream * gbs
Definition: binder_stream.h:37
DEBUG_LOCATION
#define DEBUG_LOCATION
Definition: debug_location.h:41
RecvInitialMetadataArgs::gbt
grpc_binder_transport * gbt
Definition: binder_stream.h:24
RegisterStreamArgs
Definition: binder_stream.h:44
grpc_binder_stream
Definition: binder_stream.h:50
grpc_binder_stream::recv_trailing_metadata_finished
grpc_closure * recv_trailing_metadata_finished
Definition: binder_stream.h:112
grpc_binder_stream::recv_message_args
RecvMessageArgs recv_message_args
Definition: binder_stream.h:96
grpc_binder_stream::call_failed_before_recv_message
bool * call_failed_before_recv_message
Definition: binder_stream.h:110
grpc_binder_transport
Definition: binder_transport.h:45
absl::optional< grpc_core::SliceBuffer >
grpc_binder_stream::register_stream_args
RegisterStreamArgs register_stream_args
Definition: binder_stream.h:101
RecvTrailingMetadataArgs::tx_code
int tx_code
Definition: binder_stream.h:39
RecvMessageArgs::message
absl::StatusOr< std::string > message
Definition: binder_stream.h:33
RecvMessageArgs::gbs
grpc_binder_stream * gbs
Definition: binder_stream.h:30
RecvInitialMetadataArgs
Definition: binder_stream.h:22
grpc_binder_stream::arena
grpc_core::Arena * arena
Definition: binder_stream.h:82
grpc_binder_stream::recv_trailing_metadata_closure
grpc_closure recv_trailing_metadata_closure
Definition: binder_stream.h:97
grpc_binder_stream::destroy_stream
grpc_closure destroy_stream
Definition: binder_stream.h:88
RecvMessageArgs::tx_code
int tx_code
Definition: binder_stream.h:32
RecvMessageArgs
Definition: binder_stream.h:29
grpc_binder_stream::recv_message_closure
grpc_closure recv_message_closure
Definition: binder_stream.h:95
grpc_binder_stream::recv_trailing_metadata_args
RecvTrailingMetadataArgs recv_trailing_metadata_args
Definition: binder_stream.h:98
grpc_binder_stream::is_closed
bool is_closed
Definition: binder_stream.h:85
grpc_binder_stream::recv_initial_metadata_ready
grpc_closure * recv_initial_metadata_ready
Definition: binder_stream.h:106
grpc_binder_stream::destroy_stream_then_closure
grpc_closure * destroy_stream_then_closure
Definition: binder_stream.h:87
grpc_binder_stream::trailing_metadata_sent
bool trailing_metadata_sent
Definition: binder_stream.h:114
GRPC_ERROR_UNREF
#define GRPC_ERROR_UNREF(err)
Definition: error.h:262
grpc_core::ExecCtx::Run
static void Run(const DebugLocation &location, grpc_closure *closure, grpc_error_handle error)
Definition: exec_ctx.cc:98
RegisterStreamArgs::gbs
grpc_binder_stream * gbs
Definition: binder_stream.h:45
grpc_binder_stream::recv_initial_metadata_closure
grpc_closure recv_initial_metadata_closure
Definition: binder_stream.h:93
grpc_binder_stream::recv_initial_metadata
grpc_metadata_batch * recv_initial_metadata
Definition: binder_stream.h:105
RecvInitialMetadataArgs::initial_metadata
absl::StatusOr< grpc_binder::Metadata > initial_metadata
Definition: binder_stream.h:26
grpc_binder_stream::need_to_call_trailing_metadata_callback
bool need_to_call_trailing_metadata_callback
Definition: binder_stream.h:115
grpc_binder_stream::grpc_binder_stream
grpc_binder_stream(grpc_binder_transport *t, grpc_stream_refcount *refcount, const void *, grpc_core::Arena *arena, int tx_code, bool is_client)
Definition: binder_stream.h:53
RecvInitialMetadataArgs::tx_code
int tx_code
Definition: binder_stream.h:25
RecvTrailingMetadataArgs::gbt
grpc_binder_transport * gbt
Definition: binder_stream.h:38
grpc_binder_stream::register_stream_closure
grpc_closure register_stream_closure
Definition: binder_stream.h:100
grpc_binder_stream::~grpc_binder_stream
~grpc_binder_stream()
Definition: binder_stream.h:70
absl::StatusOr< grpc_binder::Metadata >
grpc_error
Definition: error_internal.h:42
grpc_binder_stream::t
grpc_binder_transport * t
Definition: binder_stream.h:80
grpc_metadata_batch
Definition: metadata_batch.h:1259
grpc_binder_stream::refcount
grpc_stream_refcount * refcount
Definition: binder_stream.h:81
grpc_closure
Definition: closure.h:56
grpc_stream_refcount
Definition: transport.h:178
binder_transport.h
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:38