Skip to content

Commit

Permalink
binder: rename gbs to stream and gbt to transport (grpc#35357)
Browse files Browse the repository at this point in the history
Per https://google.github.io/styleguide/cppguide.html#General_Naming_Rules
- Use "names that would be clear even to people on a different team".
- "Minimize the use of abbreviations ... (especially acronyms and initialisms)"
- "Do not worry about saving horizontal space"

Also supports rename of grpc_binder_stream and grpc_binder_transport in an upcoming PR.

Closes grpc#35357

COPYBARA_INTEGRATE_REVIEW=grpc#35357 from jdcormie:rename bef505c
PiperOrigin-RevId: 592578920
  • Loading branch information
jdcormie authored and copybara-github committed Dec 20, 2023
1 parent 7fd3277 commit 971c506
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 189 deletions.
28 changes: 14 additions & 14 deletions src/core/ext/transport/binder/transport/binder_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@
#include "src/core/ext/transport/binder/transport/binder_transport.h"

struct RecvInitialMetadataArgs {
grpc_binder_stream* gbs;
grpc_binder_transport* gbt;
grpc_binder_stream* stream;
grpc_binder_transport* transport;
int tx_code;
absl::StatusOr<grpc_binder::Metadata> initial_metadata;
};

struct RecvMessageArgs {
grpc_binder_stream* gbs;
grpc_binder_transport* gbt;
grpc_binder_stream* stream;
grpc_binder_transport* transport;
int tx_code;
absl::StatusOr<std::string> message;
};

struct RecvTrailingMetadataArgs {
grpc_binder_stream* gbs;
grpc_binder_transport* gbt;
grpc_binder_stream* stream;
grpc_binder_transport* transport;
int tx_code;
absl::StatusOr<grpc_binder::Metadata> trailing_metadata;
int status;
};

struct RegisterStreamArgs {
grpc_binder_stream* gbs;
grpc_binder_transport* gbt;
grpc_binder_stream* stream;
grpc_binder_transport* transport;
};

// TODO(mingcl): Figure out if we want to use class instead of struct here
Expand All @@ -59,12 +59,12 @@ struct grpc_binder_stream {
tx_code(tx_code),
is_client(is_client),
is_closed(false) {
recv_initial_metadata_args.gbs = this;
recv_initial_metadata_args.gbt = t;
recv_message_args.gbs = this;
recv_message_args.gbt = t;
recv_trailing_metadata_args.gbs = this;
recv_trailing_metadata_args.gbt = t;
recv_initial_metadata_args.stream = this;
recv_initial_metadata_args.transport = t;
recv_message_args.stream = this;
recv_message_args.transport = t;
recv_trailing_metadata_args.stream = this;
recv_trailing_metadata_args.transport = t;
}

~grpc_binder_stream() {
Expand Down
Loading

0 comments on commit 971c506

Please sign in to comment.