Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc / deps / grpc / src / core / ext / filters / http / message_compress / message_compress_filter.h
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18
19 #ifndef GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H
20 #define GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H
21
22 #include <grpc/support/port_platform.h>
23
24 #include <grpc/impl/codegen/compression_types.h>
25
26 #include "src/core/lib/channel/channel_stack.h"
27
28 /** Compression filter for outgoing data.
29  *
30  * See <grpc/compression.h> for the available compression settings.
31  *
32  * Compression settings may come from:
33  *  - Channel configuration, as established at channel creation time.
34  *  - The metadata accompanying the outgoing data to be compressed. This is
35  *    taken as a request only. We may choose not to honor it. The metadata key
36  *    is given by \a GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY.
37  *
38  * Compression can be disabled for concrete messages (for instance in order to
39  * prevent CRIME/BEAST type attacks) by having the GRPC_WRITE_NO_COMPRESS set in
40  * the BEGIN_MESSAGE flags.
41  *
42  * The attempted compression mechanism is added to the resulting initial
43  * metadata under the'grpc-encoding' key.
44  *
45  * If compression is actually performed, BEGIN_MESSAGE's flag is modified to
46  * incorporate GRPC_WRITE_INTERNAL_COMPRESS. Otherwise, and regardless of the
47  * aforementioned 'grpc-encoding' metadata value, data will pass through
48  * uncompressed. */
49
50 extern const grpc_channel_filter grpc_message_compress_filter;
51
52 #endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H \
53         */