diff options
author | Craig Tiller <ctiller@google.com> | 2015-02-02 10:16:30 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-02-02 15:39:31 -0800 |
commit | c4f0ebe63bbd4b7f9ca551fd6dcb0df026464623 (patch) | |
tree | 09b0da67e8386833fecec4135c370708cb5bafec /include | |
parent | d2bfa1a288f3eeccbee3275787d95128f2871017 (diff) |
Prepare for the new batch call API.
Rename all core API functions that are on their way to deprecation with
an _old tag across all wrappings.
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc/grpc.h | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index af52dd95f4..a9fae0df90 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -275,8 +275,9 @@ void grpc_completion_queue_destroy(grpc_completion_queue *cq); /* Create a call given a grpc_channel, in order to call 'method'. The request is not sent until grpc_call_invoke is called. All completions are sent to 'completion_queue'. */ -grpc_call *grpc_channel_create_call(grpc_channel *channel, const char *method, - const char *host, gpr_timespec deadline); +grpc_call *grpc_channel_create_call_old(grpc_channel *channel, + const char *method, const char *host, + gpr_timespec deadline); /* Create a client channel */ grpc_channel *grpc_channel_create(const char *target, @@ -307,8 +308,9 @@ void grpc_channel_destroy(grpc_channel *channel); REQUIRES: grpc_call_start_invoke/grpc_call_server_end_initial_metadata have not been called on this call. Produces no events. */ -grpc_call_error grpc_call_add_metadata(grpc_call *call, grpc_metadata *metadata, - gpr_uint32 flags); +grpc_call_error grpc_call_add_metadata_old(grpc_call *call, + grpc_metadata *metadata, + gpr_uint32 flags); /* Invoke the RPC. Starts sending metadata and request headers on the wire. flags is a bit-field combination of the write flags defined above. @@ -319,9 +321,9 @@ grpc_call_error grpc_call_add_metadata(grpc_call *call, grpc_metadata *metadata, Produces a GRPC_FINISHED event with finished_tag when the call has been completed (there may be other events for the call pending at this time) */ -grpc_call_error grpc_call_invoke(grpc_call *call, grpc_completion_queue *cq, - void *metadata_read_tag, void *finished_tag, - gpr_uint32 flags); +grpc_call_error grpc_call_invoke_old(grpc_call *call, grpc_completion_queue *cq, + void *metadata_read_tag, + void *finished_tag, gpr_uint32 flags); /* Accept an incoming RPC, binding a completion queue to it. To be called before sending or receiving messages. @@ -330,9 +332,9 @@ grpc_call_error grpc_call_invoke(grpc_call *call, grpc_completion_queue *cq, Produces a GRPC_FINISHED event with finished_tag when the call has been completed (there may be other events for the call pending at this time) */ -grpc_call_error grpc_call_server_accept(grpc_call *call, - grpc_completion_queue *cq, - void *finished_tag); +grpc_call_error grpc_call_server_accept_old(grpc_call *call, + grpc_completion_queue *cq, + void *finished_tag); /* Start sending metadata. To be called before sending messages. @@ -340,8 +342,8 @@ grpc_call_error grpc_call_server_accept(grpc_call *call, REQUIRES: Can be called at most once per call. Can only be called on the server. Must be called after grpc_call_server_accept */ -grpc_call_error grpc_call_server_end_initial_metadata(grpc_call *call, - gpr_uint32 flags); +grpc_call_error grpc_call_server_end_initial_metadata_old(grpc_call *call, + gpr_uint32 flags); /* Called by clients to cancel an RPC on the server. Can be called multiple times, from any thread. */ @@ -370,9 +372,9 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_call_server_end_of_initial_metadata must have been called successfully. Produces a GRPC_WRITE_ACCEPTED event. */ -grpc_call_error grpc_call_start_write(grpc_call *call, - grpc_byte_buffer *byte_buffer, void *tag, - gpr_uint32 flags); +grpc_call_error grpc_call_start_write_old(grpc_call *call, + grpc_byte_buffer *byte_buffer, + void *tag, gpr_uint32 flags); /* Queue a status for writing. REQUIRES: No other writes are pending on the call. @@ -380,17 +382,17 @@ grpc_call_error grpc_call_start_write(grpc_call *call, call prior to calling this. 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_code status_code, - const char *status_message, - void *tag); +grpc_call_error grpc_call_start_write_status_old(grpc_call *call, + 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. Only callable on the client. Produces a GRPC_FINISH_ACCEPTED event when all bytes for the call have passed outgoing flow control. */ -grpc_call_error grpc_call_writes_done(grpc_call *call, void *tag); +grpc_call_error grpc_call_writes_done_old(grpc_call *call, void *tag); /* Initiate a read on a call. Output event contains a byte buffer with the result of the read. @@ -402,7 +404,7 @@ grpc_call_error grpc_call_writes_done(grpc_call *call, void *tag); On the server: grpc_call_server_accept must be called before calling this. Produces a single GRPC_READ event. */ -grpc_call_error grpc_call_start_read(grpc_call *call, void *tag); +grpc_call_error grpc_call_start_read_old(grpc_call *call, void *tag); /* Destroy a call. */ void grpc_call_destroy(grpc_call *call); @@ -414,7 +416,8 @@ void grpc_call_destroy(grpc_call *call); tag_cancel. REQUIRES: Server must not have been shutdown. NOTE: calling this is the only way to obtain GRPC_SERVER_RPC_NEW events. */ -grpc_call_error grpc_server_request_call(grpc_server *server, void *tag_new); +grpc_call_error grpc_server_request_call_old(grpc_server *server, + void *tag_new); /* Create a server */ grpc_server *grpc_server_create(grpc_completion_queue *cq, |