aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-01-27 10:18:09 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-01-27 10:18:09 -0800
commit6437bd5037518953b159ae5321cd72eaaeb4ed03 (patch)
tree6df55f3880b5c6a4fb77bf737cb834467a24fae6 /include
parent103481ec8a7d93e0b120c639aa0c879e5e0aff88 (diff)
parent1159dcf5bc98460e0408cb30609dd1dafa8d31a4 (diff)
Merge github.com:google/grpc into javascript
Diffstat (limited to 'include')
-rw-r--r--include/grpc/grpc.h11
-rw-r--r--include/grpc/support/string.h77
2 files changed, 4 insertions, 84 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index f03f61d84e..6c8b168532 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -158,6 +158,7 @@ typedef struct grpc_byte_buffer grpc_byte_buffer;
/* Sample helpers to obtain byte buffers (these will certainly move place */
grpc_byte_buffer *grpc_byte_buffer_create(gpr_slice *slices, size_t nslices);
+grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb);
size_t grpc_byte_buffer_length(grpc_byte_buffer *bb);
void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
@@ -313,18 +314,14 @@ grpc_call_error grpc_call_add_metadata(grpc_call *call, grpc_metadata *metadata,
flags is a bit-field combination of the write flags defined above.
REQUIRES: Can be called at most once per call.
Can only be called on the client.
- Produces a GRPC_INVOKE_ACCEPTED event with invoke_accepted_tag when the
- call has been invoked (meaning bytes can start flowing to the wire).
Produces a GRPC_CLIENT_METADATA_READ event with metadata_read_tag when
the servers initial metadata has been read.
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_start_invoke(grpc_call *call,
- grpc_completion_queue *cq,
- void *invoke_accepted_tag,
- void *metadata_read_tag,
- void *finished_tag, gpr_uint32 flags);
+grpc_call_error grpc_call_invoke(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.
diff --git a/include/grpc/support/string.h b/include/grpc/support/string.h
deleted file mode 100644
index 68e7452a7f..0000000000
--- a/include/grpc/support/string.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *
- * Copyright 2014, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef __GRPC_SUPPORT_STRING_H__
-#define __GRPC_SUPPORT_STRING_H__
-
-#include <stddef.h>
-
-#include <grpc/support/port_platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* String utility functions */
-
-/* Returns a copy of src that can be passed to gpr_free().
- If allocation fails or if src is NULL, returns NULL. */
-char *gpr_strdup(const char *src);
-
-/* flag to include plaintext after a hexdump */
-#define GPR_HEXDUMP_PLAINTEXT 0x00000001
-
-/* Converts array buf, of length len, into a hexadecimal dump. Result should
- be freed with gpr_free() */
-char *gpr_hexdump(const char *buf, size_t len, gpr_uint32 flags);
-
-/* Parses an array of bytes into an integer (base 10). Returns 1 on success,
- 0 on failure. */
-int gpr_parse_bytes_to_uint32(const char *data, size_t length,
- gpr_uint32 *result);
-
-/* printf to a newly-allocated string. The set of supported formats may vary
- between platforms.
-
- On success, returns the number of bytes printed (excluding the final '\0'),
- and *strp points to a string which must later be destroyed with gpr_free().
-
- On error, returns -1 and sets *strp to NULL. If the format string is bad,
- the result is undefined. */
-int gpr_asprintf(char **strp, const char *format, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GRPC_SUPPORT_STRING_H__ */