Trailing metadata support.
Actually exposing it from the C API.
Also removing grpc_status, since it's mostly useless.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82180546
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 3b09d51..83f41fe 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -107,12 +107,6 @@
/* Maximum message length that the channel can receive */
#define GRPC_ARG_MAX_MESSAGE_LENGTH "grpc.max_message_length"
-/* Status of a completed call */
-typedef struct grpc_status {
- grpc_status_code code;
- char *details;
-} grpc_status;
-
/* Result of a grpc call. If the caller satisfies the prerequisites of a
particular operation, the grpc_call_error returned will be GRPC_CALL_OK.
Receiving any other value listed here is an indication of a bug in the
@@ -221,7 +215,12 @@
size_t count;
grpc_metadata *elements;
} client_metadata_read;
- grpc_status finished;
+ struct {
+ grpc_status_code status;
+ const char *details;
+ size_t metadata_count;
+ grpc_metadata *metadata_elements;
+ } finished;
struct {
const char *method;
const char *host;
@@ -391,7 +390,9 @@
Only callable on the server.
Produces a GRPC_FINISH_ACCEPTED event when the status is sent. */
grpc_call_error grpc_call_start_write_status(grpc_call *call,
- grpc_status status, void *tag);
+ grpc_status_code status_code,
+ const char *status_message,
+ void *tag);
/* No more messages to send.
REQUIRES: No other writes are pending on the call.