diff options
author | Muxi Yan <mxyan@google.com> | 2017-09-14 09:42:56 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-09-25 11:42:46 -0700 |
commit | e6d888d0a086e0d208cad1849def4326f28670f0 (patch) | |
tree | 3eb7ce0db111ad850144ee34f4b34e8656b12cd8 /include/grpc/compression.h | |
parent | e29d497fa90506e9e09f2d66536052454acf3a6e (diff) |
Change C core surface API
Diffstat (limited to 'include/grpc/compression.h')
-rw-r--r-- | include/grpc/compression.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/include/grpc/compression.h b/include/grpc/compression.h index 3a8de4b7b8..5d1b541037 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -30,28 +30,25 @@ extern "C" { #endif +/** Return if an algorithm is message compression algorithm. */ +GRPCAPI int grpc_compression_algorithm_is_message( + grpc_compression_algorithm algorithm); + +/** Return if an algorithm is stream compression algorithm. */ +GRPCAPI int grpc_compression_algorithm_is_stream( + grpc_compression_algorithm algorithm); + /** Parses the \a slice as a grpc_compression_algorithm instance and updating \a * algorithm. Returns 1 upon success, 0 otherwise. */ GRPCAPI int grpc_compression_algorithm_parse( grpc_slice value, grpc_compression_algorithm *algorithm); -/** Parses the \a slice as a grpc_stream_compression_algorithm instance and - * updating \a algorithm. Returns 1 upon success, 0 otherwise. */ -int grpc_stream_compression_algorithm_parse( - grpc_slice name, grpc_stream_compression_algorithm *algorithm); - /** Updates \a name with the encoding name corresponding to a valid \a * algorithm. Note that \a name is statically allocated and must *not* be freed. * Returns 1 upon success, 0 otherwise. */ GRPCAPI int grpc_compression_algorithm_name( grpc_compression_algorithm algorithm, char **name); -/** Updates \a name with the encoding name corresponding to a valid \a - * algorithm. Note that \a name is statically allocated and must *not* be freed. - * Returns 1 upon success, 0 otherwise. */ -GRPCAPI int grpc_stream_compression_algorithm_name( - grpc_stream_compression_algorithm algorithm, char **name); - /** Returns the compression algorithm corresponding to \a level for the * compression algorithms encoded in the \a accepted_encodings bitset. * @@ -59,13 +56,6 @@ GRPCAPI int grpc_stream_compression_algorithm_name( GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level( grpc_compression_level level, uint32_t accepted_encodings); -/** Returns the stream compression algorithm corresponding to \a level for the - * compression algorithms encoded in the \a accepted_stream_encodings bitset. - * It abort()s for unknown levels. */ -GRPCAPI grpc_stream_compression_algorithm -grpc_stream_compression_algorithm_for_level(grpc_stream_compression_level level, - uint32_t accepted_stream_encodings); - GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts); /** Mark \a algorithm as enabled in \a opts. */ @@ -80,11 +70,6 @@ GRPCAPI void grpc_compression_options_disable_algorithm( GRPCAPI int grpc_compression_options_is_algorithm_enabled( const grpc_compression_options *opts, grpc_compression_algorithm algorithm); -/** Returns true if \a algorithm is marked as enabled in \a opts. */ -GRPCAPI int grpc_compression_options_is_stream_compression_algorithm_enabled( - const grpc_compression_options *opts, - grpc_stream_compression_algorithm algorithm); - #ifdef __cplusplus } #endif |