diff --git a/include/grpc/impl/codegen/compression_types.h b/include/grpc/impl/codegen/compression_types.h index 0daccd92f237e4021ddd652d0fa532667d101dc7..683ed3a4888e38181c4b1d9970e1e5985995fef1 100644 --- a/include/grpc/impl/codegen/compression_types.h +++ b/include/grpc/impl/codegen/compression_types.h @@ -42,9 +42,10 @@ extern "C" { /** To be used in channel arguments */ #define GRPC_COMPRESSION_ALGORITHM_ARG "grpc.compression_algorithm" +#define GRPC_COMPRESSION_LEVEL_ARG "grpc.compression_level" #define GRPC_COMPRESSION_ALGORITHM_STATE_ARG "grpc.compression_algorithm_state" -/* The various compression algorithms supported by GRPC */ +/* The various compression algorithms supported by gRPC */ typedef enum { GRPC_COMPRESS_NONE = 0, GRPC_COMPRESS_DEFLATE, @@ -53,6 +54,10 @@ typedef enum { GRPC_COMPRESS_ALGORITHMS_COUNT } grpc_compression_algorithm; +/** Compression levels allow a party with knowledge of its peer's accepted + * encodings to request compression in an abstract way. The level-algorithm + * mapping is performed internally and depends on the peer's supported + * compression algorithms. */ typedef enum { GRPC_COMPRESS_LEVEL_NONE = 0, GRPC_COMPRESS_LEVEL_LOW, @@ -62,8 +67,19 @@ typedef enum { } grpc_compression_level; typedef struct grpc_compression_options { - uint32_t enabled_algorithms_bitset; /**< All algs are enabled by default */ - grpc_compression_algorithm default_compression_algorithm; /**< for channel */ + /** All algs are enabled by default. This option corresponds to the channel + * argument key behind \a GRPC_COMPRESSION_ALGORITHM_STATE_ARG */ + uint32_t enabled_algorithms_bitset; + + /** The default channel compression algorithm. It'll be used in the absence of + * call specific settings. This option corresponds to the channel argument key + * behind \a GRPC_COMPRESSION_ALGORITHM_ARG */ + grpc_compression_algorithm default_compression_algorithm; + + /** The default channel compression level. It'll be used in the absence of + * call specific settings. This option corresponds to the channel argument key + * behind \a GRPC_COMPRESSION_ALGORITHM_ARG */ + grpc_compression_algorithm default_compression_level; } grpc_compression_options; #ifdef __cplusplus diff --git a/third_party/protobuf b/third_party/protobuf index a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03..d5fb408ddc281ffcadeb08699e65bb694656d0bd 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 +Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd