Skip to content
Snippets Groups Projects
Commit e644cfdd authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

better docstrings for compression_types.h

parent f11f2b1b
No related branches found
No related tags found
No related merge requests found
...@@ -42,9 +42,10 @@ extern "C" { ...@@ -42,9 +42,10 @@ extern "C" {
/** To be used in channel arguments */ /** To be used in channel arguments */
#define GRPC_COMPRESSION_ALGORITHM_ARG "grpc.compression_algorithm" #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" #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 { typedef enum {
GRPC_COMPRESS_NONE = 0, GRPC_COMPRESS_NONE = 0,
GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_DEFLATE,
...@@ -53,6 +54,10 @@ typedef enum { ...@@ -53,6 +54,10 @@ typedef enum {
GRPC_COMPRESS_ALGORITHMS_COUNT GRPC_COMPRESS_ALGORITHMS_COUNT
} grpc_compression_algorithm; } 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 { typedef enum {
GRPC_COMPRESS_LEVEL_NONE = 0, GRPC_COMPRESS_LEVEL_NONE = 0,
GRPC_COMPRESS_LEVEL_LOW, GRPC_COMPRESS_LEVEL_LOW,
...@@ -62,8 +67,19 @@ typedef enum { ...@@ -62,8 +67,19 @@ typedef enum {
} grpc_compression_level; } grpc_compression_level;
typedef struct grpc_compression_options { typedef struct grpc_compression_options {
uint32_t enabled_algorithms_bitset; /**< All algs are enabled by default */ /** All algs are enabled by default. This option corresponds to the channel
grpc_compression_algorithm default_compression_algorithm; /**< for 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; } grpc_compression_options;
#ifdef __cplusplus #ifdef __cplusplus
......
Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment