aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/impl/codegen/compression_types.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-05-18 20:25:57 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-05-18 20:25:57 -0700
commitac0944701ab93d6746f81a2a9ab38ee411e663d8 (patch)
tree95af27fc2cd5cb4f893d60ea8bc2aa2e1fe62498 /include/grpc/impl/codegen/compression_types.h
parentddefbb82270d97d8b87cac4959993ae61e204d1c (diff)
parent824f83758d80717f910c2cf973ff41fd98f8d81e (diff)
Merge branch 'compression_incoming_checks' into compression_md_level_bis
Diffstat (limited to 'include/grpc/impl/codegen/compression_types.h')
-rw-r--r--include/grpc/impl/codegen/compression_types.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/compression_types.h b/include/grpc/impl/codegen/compression_types.h
index 19c2cefcf4..9065d1edd0 100644
--- a/include/grpc/impl/codegen/compression_types.h
+++ b/include/grpc/impl/codegen/compression_types.h
@@ -74,6 +74,32 @@ typedef enum {
GRPC_COMPRESS_LEVEL_COUNT
} grpc_compression_level;
+typedef struct grpc_compression_options {
+ /** All algs are enabled by default. This option corresponds to the channel
+ * argument key behind \a GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET
+ */
+ uint32_t enabled_algorithms_bitset;
+
+ /** 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_CHANNEL_DEFAULT_LEVEL. If present, takes
+ * precedence over \a default_algorithm.
+ * TODO(dgq): currently only available for server channels. */
+ struct {
+ bool is_set;
+ grpc_compression_level level;
+ } default_level;
+
+ /** 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_CHANNEL_DEFAULT_ALGORITHM. */
+ struct {
+ bool is_set;
+ grpc_compression_algorithm algorithm;
+ } default_algorithm;
+
+} grpc_compression_options;
+
#ifdef __cplusplus
}
#endif