Home | History | Annotate | Download | only in transport
      1 /*
      2  * Copyright 2015 gRPC authors.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /*
     18  * WARNING: Auto-generated code.
     19  *
     20  * To make changes to this file, change
     21  * tools/codegen/core/gen_static_metadata.py, and then re-run it.
     22  *
     23  * See metadata.h for an explanation of the interface here, and metadata.cc for
     24  * an explanation of what's going on.
     25  */
     26 
     27 #ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
     28 #define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
     29 
     30 #include <grpc/support/port_platform.h>
     31 
     32 #include "src/core/lib/transport/metadata.h"
     33 
     34 #define GRPC_STATIC_MDSTR_COUNT 105
     35 extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
     36 /* ":path" */
     37 #define GRPC_MDSTR_PATH (grpc_static_slice_table[0])
     38 /* ":method" */
     39 #define GRPC_MDSTR_METHOD (grpc_static_slice_table[1])
     40 /* ":status" */
     41 #define GRPC_MDSTR_STATUS (grpc_static_slice_table[2])
     42 /* ":authority" */
     43 #define GRPC_MDSTR_AUTHORITY (grpc_static_slice_table[3])
     44 /* ":scheme" */
     45 #define GRPC_MDSTR_SCHEME (grpc_static_slice_table[4])
     46 /* "te" */
     47 #define GRPC_MDSTR_TE (grpc_static_slice_table[5])
     48 /* "grpc-message" */
     49 #define GRPC_MDSTR_GRPC_MESSAGE (grpc_static_slice_table[6])
     50 /* "grpc-status" */
     51 #define GRPC_MDSTR_GRPC_STATUS (grpc_static_slice_table[7])
     52 /* "grpc-payload-bin" */
     53 #define GRPC_MDSTR_GRPC_PAYLOAD_BIN (grpc_static_slice_table[8])
     54 /* "grpc-encoding" */
     55 #define GRPC_MDSTR_GRPC_ENCODING (grpc_static_slice_table[9])
     56 /* "grpc-accept-encoding" */
     57 #define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (grpc_static_slice_table[10])
     58 /* "grpc-server-stats-bin" */
     59 #define GRPC_MDSTR_GRPC_SERVER_STATS_BIN (grpc_static_slice_table[11])
     60 /* "grpc-tags-bin" */
     61 #define GRPC_MDSTR_GRPC_TAGS_BIN (grpc_static_slice_table[12])
     62 /* "grpc-trace-bin" */
     63 #define GRPC_MDSTR_GRPC_TRACE_BIN (grpc_static_slice_table[13])
     64 /* "content-type" */
     65 #define GRPC_MDSTR_CONTENT_TYPE (grpc_static_slice_table[14])
     66 /* "content-encoding" */
     67 #define GRPC_MDSTR_CONTENT_ENCODING (grpc_static_slice_table[15])
     68 /* "accept-encoding" */
     69 #define GRPC_MDSTR_ACCEPT_ENCODING (grpc_static_slice_table[16])
     70 /* "grpc-internal-encoding-request" */
     71 #define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (grpc_static_slice_table[17])
     72 /* "grpc-internal-stream-encoding-request" */
     73 #define GRPC_MDSTR_GRPC_INTERNAL_STREAM_ENCODING_REQUEST \
     74   (grpc_static_slice_table[18])
     75 /* "user-agent" */
     76 #define GRPC_MDSTR_USER_AGENT (grpc_static_slice_table[19])
     77 /* "host" */
     78 #define GRPC_MDSTR_HOST (grpc_static_slice_table[20])
     79 /* "lb-token" */
     80 #define GRPC_MDSTR_LB_TOKEN (grpc_static_slice_table[21])
     81 /* "grpc-previous-rpc-attempts" */
     82 #define GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS (grpc_static_slice_table[22])
     83 /* "grpc-retry-pushback-ms" */
     84 #define GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS (grpc_static_slice_table[23])
     85 /* "grpc-timeout" */
     86 #define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table[24])
     87 /* "1" */
     88 #define GRPC_MDSTR_1 (grpc_static_slice_table[25])
     89 /* "2" */
     90 #define GRPC_MDSTR_2 (grpc_static_slice_table[26])
     91 /* "3" */
     92 #define GRPC_MDSTR_3 (grpc_static_slice_table[27])
     93 /* "4" */
     94 #define GRPC_MDSTR_4 (grpc_static_slice_table[28])
     95 /* "" */
     96 #define GRPC_MDSTR_EMPTY (grpc_static_slice_table[29])
     97 /* "grpc.wait_for_ready" */
     98 #define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table[30])
     99 /* "grpc.timeout" */
    100 #define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table[31])
    101 /* "grpc.max_request_message_bytes" */
    102 #define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \
    103   (grpc_static_slice_table[32])
    104 /* "grpc.max_response_message_bytes" */
    105 #define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \
    106   (grpc_static_slice_table[33])
    107 /* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */
    108 #define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \
    109   (grpc_static_slice_table[34])
    110 /* "deflate" */
    111 #define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[35])
    112 /* "gzip" */
    113 #define GRPC_MDSTR_GZIP (grpc_static_slice_table[36])
    114 /* "stream/gzip" */
    115 #define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[37])
    116 /* "0" */
    117 #define GRPC_MDSTR_0 (grpc_static_slice_table[38])
    118 /* "identity" */
    119 #define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[39])
    120 /* "trailers" */
    121 #define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[40])
    122 /* "application/grpc" */
    123 #define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[41])
    124 /* "POST" */
    125 #define GRPC_MDSTR_POST (grpc_static_slice_table[42])
    126 /* "200" */
    127 #define GRPC_MDSTR_200 (grpc_static_slice_table[43])
    128 /* "404" */
    129 #define GRPC_MDSTR_404 (grpc_static_slice_table[44])
    130 /* "http" */
    131 #define GRPC_MDSTR_HTTP (grpc_static_slice_table[45])
    132 /* "https" */
    133 #define GRPC_MDSTR_HTTPS (grpc_static_slice_table[46])
    134 /* "grpc" */
    135 #define GRPC_MDSTR_GRPC (grpc_static_slice_table[47])
    136 /* "GET" */
    137 #define GRPC_MDSTR_GET (grpc_static_slice_table[48])
    138 /* "PUT" */
    139 #define GRPC_MDSTR_PUT (grpc_static_slice_table[49])
    140 /* "/" */
    141 #define GRPC_MDSTR_SLASH (grpc_static_slice_table[50])
    142 /* "/index.html" */
    143 #define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[51])
    144 /* "204" */
    145 #define GRPC_MDSTR_204 (grpc_static_slice_table[52])
    146 /* "206" */
    147 #define GRPC_MDSTR_206 (grpc_static_slice_table[53])
    148 /* "304" */
    149 #define GRPC_MDSTR_304 (grpc_static_slice_table[54])
    150 /* "400" */
    151 #define GRPC_MDSTR_400 (grpc_static_slice_table[55])
    152 /* "500" */
    153 #define GRPC_MDSTR_500 (grpc_static_slice_table[56])
    154 /* "accept-charset" */
    155 #define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[57])
    156 /* "gzip, deflate" */
    157 #define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[58])
    158 /* "accept-language" */
    159 #define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[59])
    160 /* "accept-ranges" */
    161 #define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[60])
    162 /* "accept" */
    163 #define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[61])
    164 /* "access-control-allow-origin" */
    165 #define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[62])
    166 /* "age" */
    167 #define GRPC_MDSTR_AGE (grpc_static_slice_table[63])
    168 /* "allow" */
    169 #define GRPC_MDSTR_ALLOW (grpc_static_slice_table[64])
    170 /* "authorization" */
    171 #define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[65])
    172 /* "cache-control" */
    173 #define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[66])
    174 /* "content-disposition" */
    175 #define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[67])
    176 /* "content-language" */
    177 #define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[68])
    178 /* "content-length" */
    179 #define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[69])
    180 /* "content-location" */
    181 #define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[70])
    182 /* "content-range" */
    183 #define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[71])
    184 /* "cookie" */
    185 #define GRPC_MDSTR_COOKIE (grpc_static_slice_table[72])
    186 /* "date" */
    187 #define GRPC_MDSTR_DATE (grpc_static_slice_table[73])
    188 /* "etag" */
    189 #define GRPC_MDSTR_ETAG (grpc_static_slice_table[74])
    190 /* "expect" */
    191 #define GRPC_MDSTR_EXPECT (grpc_static_slice_table[75])
    192 /* "expires" */
    193 #define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[76])
    194 /* "from" */
    195 #define GRPC_MDSTR_FROM (grpc_static_slice_table[77])
    196 /* "if-match" */
    197 #define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[78])
    198 /* "if-modified-since" */
    199 #define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[79])
    200 /* "if-none-match" */
    201 #define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[80])
    202 /* "if-range" */
    203 #define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[81])
    204 /* "if-unmodified-since" */
    205 #define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[82])
    206 /* "last-modified" */
    207 #define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[83])
    208 /* "lb-cost-bin" */
    209 #define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[84])
    210 /* "link" */
    211 #define GRPC_MDSTR_LINK (grpc_static_slice_table[85])
    212 /* "location" */
    213 #define GRPC_MDSTR_LOCATION (grpc_static_slice_table[86])
    214 /* "max-forwards" */
    215 #define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[87])
    216 /* "proxy-authenticate" */
    217 #define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[88])
    218 /* "proxy-authorization" */
    219 #define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[89])
    220 /* "range" */
    221 #define GRPC_MDSTR_RANGE (grpc_static_slice_table[90])
    222 /* "referer" */
    223 #define GRPC_MDSTR_REFERER (grpc_static_slice_table[91])
    224 /* "refresh" */
    225 #define GRPC_MDSTR_REFRESH (grpc_static_slice_table[92])
    226 /* "retry-after" */
    227 #define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[93])
    228 /* "server" */
    229 #define GRPC_MDSTR_SERVER (grpc_static_slice_table[94])
    230 /* "set-cookie" */
    231 #define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[95])
    232 /* "strict-transport-security" */
    233 #define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[96])
    234 /* "transfer-encoding" */
    235 #define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[97])
    236 /* "vary" */
    237 #define GRPC_MDSTR_VARY (grpc_static_slice_table[98])
    238 /* "via" */
    239 #define GRPC_MDSTR_VIA (grpc_static_slice_table[99])
    240 /* "www-authenticate" */
    241 #define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[100])
    242 /* "identity,deflate" */
    243 #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[101])
    244 /* "identity,gzip" */
    245 #define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[102])
    246 /* "deflate,gzip" */
    247 #define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[103])
    248 /* "identity,deflate,gzip" */
    249 #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
    250   (grpc_static_slice_table[104])
    251 
    252 extern const grpc_slice_refcount_vtable grpc_static_metadata_vtable;
    253 extern grpc_slice_refcount
    254     grpc_static_metadata_refcounts[GRPC_STATIC_MDSTR_COUNT];
    255 #define GRPC_IS_STATIC_METADATA_STRING(slice) \
    256   ((slice).refcount != NULL &&                \
    257    (slice).refcount->vtable == &grpc_static_metadata_vtable)
    258 
    259 #define GRPC_STATIC_METADATA_INDEX(static_slice) \
    260   ((int)((static_slice).refcount - grpc_static_metadata_refcounts))
    261 
    262 #define GRPC_STATIC_MDELEM_COUNT 86
    263 extern grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
    264 extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
    265 /* "grpc-status": "0" */
    266 #define GRPC_MDELEM_GRPC_STATUS_0 \
    267   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0], GRPC_MDELEM_STORAGE_STATIC))
    268 /* "grpc-status": "1" */
    269 #define GRPC_MDELEM_GRPC_STATUS_1 \
    270   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1], GRPC_MDELEM_STORAGE_STATIC))
    271 /* "grpc-status": "2" */
    272 #define GRPC_MDELEM_GRPC_STATUS_2 \
    273   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2], GRPC_MDELEM_STORAGE_STATIC))
    274 /* "grpc-encoding": "identity" */
    275 #define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \
    276   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3], GRPC_MDELEM_STORAGE_STATIC))
    277 /* "grpc-encoding": "gzip" */
    278 #define GRPC_MDELEM_GRPC_ENCODING_GZIP \
    279   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4], GRPC_MDELEM_STORAGE_STATIC))
    280 /* "grpc-encoding": "deflate" */
    281 #define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \
    282   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5], GRPC_MDELEM_STORAGE_STATIC))
    283 /* "te": "trailers" */
    284 #define GRPC_MDELEM_TE_TRAILERS \
    285   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6], GRPC_MDELEM_STORAGE_STATIC))
    286 /* "content-type": "application/grpc" */
    287 #define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \
    288   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7], GRPC_MDELEM_STORAGE_STATIC))
    289 /* ":method": "POST" */
    290 #define GRPC_MDELEM_METHOD_POST \
    291   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8], GRPC_MDELEM_STORAGE_STATIC))
    292 /* ":status": "200" */
    293 #define GRPC_MDELEM_STATUS_200 \
    294   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9], GRPC_MDELEM_STORAGE_STATIC))
    295 /* ":status": "404" */
    296 #define GRPC_MDELEM_STATUS_404 \
    297   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10], GRPC_MDELEM_STORAGE_STATIC))
    298 /* ":scheme": "http" */
    299 #define GRPC_MDELEM_SCHEME_HTTP \
    300   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11], GRPC_MDELEM_STORAGE_STATIC))
    301 /* ":scheme": "https" */
    302 #define GRPC_MDELEM_SCHEME_HTTPS \
    303   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12], GRPC_MDELEM_STORAGE_STATIC))
    304 /* ":scheme": "grpc" */
    305 #define GRPC_MDELEM_SCHEME_GRPC \
    306   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13], GRPC_MDELEM_STORAGE_STATIC))
    307 /* ":authority": "" */
    308 #define GRPC_MDELEM_AUTHORITY_EMPTY \
    309   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14], GRPC_MDELEM_STORAGE_STATIC))
    310 /* ":method": "GET" */
    311 #define GRPC_MDELEM_METHOD_GET \
    312   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15], GRPC_MDELEM_STORAGE_STATIC))
    313 /* ":method": "PUT" */
    314 #define GRPC_MDELEM_METHOD_PUT \
    315   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16], GRPC_MDELEM_STORAGE_STATIC))
    316 /* ":path": "/" */
    317 #define GRPC_MDELEM_PATH_SLASH \
    318   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17], GRPC_MDELEM_STORAGE_STATIC))
    319 /* ":path": "/index.html" */
    320 #define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \
    321   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18], GRPC_MDELEM_STORAGE_STATIC))
    322 /* ":status": "204" */
    323 #define GRPC_MDELEM_STATUS_204 \
    324   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19], GRPC_MDELEM_STORAGE_STATIC))
    325 /* ":status": "206" */
    326 #define GRPC_MDELEM_STATUS_206 \
    327   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20], GRPC_MDELEM_STORAGE_STATIC))
    328 /* ":status": "304" */
    329 #define GRPC_MDELEM_STATUS_304 \
    330   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21], GRPC_MDELEM_STORAGE_STATIC))
    331 /* ":status": "400" */
    332 #define GRPC_MDELEM_STATUS_400 \
    333   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22], GRPC_MDELEM_STORAGE_STATIC))
    334 /* ":status": "500" */
    335 #define GRPC_MDELEM_STATUS_500 \
    336   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23], GRPC_MDELEM_STORAGE_STATIC))
    337 /* "accept-charset": "" */
    338 #define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \
    339   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24], GRPC_MDELEM_STORAGE_STATIC))
    340 /* "accept-encoding": "" */
    341 #define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \
    342   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25], GRPC_MDELEM_STORAGE_STATIC))
    343 /* "accept-encoding": "gzip, deflate" */
    344 #define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \
    345   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26], GRPC_MDELEM_STORAGE_STATIC))
    346 /* "accept-language": "" */
    347 #define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY \
    348   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27], GRPC_MDELEM_STORAGE_STATIC))
    349 /* "accept-ranges": "" */
    350 #define GRPC_MDELEM_ACCEPT_RANGES_EMPTY \
    351   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28], GRPC_MDELEM_STORAGE_STATIC))
    352 /* "accept": "" */
    353 #define GRPC_MDELEM_ACCEPT_EMPTY \
    354   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29], GRPC_MDELEM_STORAGE_STATIC))
    355 /* "access-control-allow-origin": "" */
    356 #define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \
    357   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30], GRPC_MDELEM_STORAGE_STATIC))
    358 /* "age": "" */
    359 #define GRPC_MDELEM_AGE_EMPTY \
    360   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31], GRPC_MDELEM_STORAGE_STATIC))
    361 /* "allow": "" */
    362 #define GRPC_MDELEM_ALLOW_EMPTY \
    363   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32], GRPC_MDELEM_STORAGE_STATIC))
    364 /* "authorization": "" */
    365 #define GRPC_MDELEM_AUTHORIZATION_EMPTY \
    366   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33], GRPC_MDELEM_STORAGE_STATIC))
    367 /* "cache-control": "" */
    368 #define GRPC_MDELEM_CACHE_CONTROL_EMPTY \
    369   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34], GRPC_MDELEM_STORAGE_STATIC))
    370 /* "content-disposition": "" */
    371 #define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY \
    372   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35], GRPC_MDELEM_STORAGE_STATIC))
    373 /* "content-encoding": "identity" */
    374 #define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY \
    375   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36], GRPC_MDELEM_STORAGE_STATIC))
    376 /* "content-encoding": "gzip" */
    377 #define GRPC_MDELEM_CONTENT_ENCODING_GZIP \
    378   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37], GRPC_MDELEM_STORAGE_STATIC))
    379 /* "content-encoding": "" */
    380 #define GRPC_MDELEM_CONTENT_ENCODING_EMPTY \
    381   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38], GRPC_MDELEM_STORAGE_STATIC))
    382 /* "content-language": "" */
    383 #define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY \
    384   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39], GRPC_MDELEM_STORAGE_STATIC))
    385 /* "content-length": "" */
    386 #define GRPC_MDELEM_CONTENT_LENGTH_EMPTY \
    387   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40], GRPC_MDELEM_STORAGE_STATIC))
    388 /* "content-location": "" */
    389 #define GRPC_MDELEM_CONTENT_LOCATION_EMPTY \
    390   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41], GRPC_MDELEM_STORAGE_STATIC))
    391 /* "content-range": "" */
    392 #define GRPC_MDELEM_CONTENT_RANGE_EMPTY \
    393   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42], GRPC_MDELEM_STORAGE_STATIC))
    394 /* "content-type": "" */
    395 #define GRPC_MDELEM_CONTENT_TYPE_EMPTY \
    396   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43], GRPC_MDELEM_STORAGE_STATIC))
    397 /* "cookie": "" */
    398 #define GRPC_MDELEM_COOKIE_EMPTY \
    399   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44], GRPC_MDELEM_STORAGE_STATIC))
    400 /* "date": "" */
    401 #define GRPC_MDELEM_DATE_EMPTY \
    402   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45], GRPC_MDELEM_STORAGE_STATIC))
    403 /* "etag": "" */
    404 #define GRPC_MDELEM_ETAG_EMPTY \
    405   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46], GRPC_MDELEM_STORAGE_STATIC))
    406 /* "expect": "" */
    407 #define GRPC_MDELEM_EXPECT_EMPTY \
    408   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47], GRPC_MDELEM_STORAGE_STATIC))
    409 /* "expires": "" */
    410 #define GRPC_MDELEM_EXPIRES_EMPTY \
    411   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48], GRPC_MDELEM_STORAGE_STATIC))
    412 /* "from": "" */
    413 #define GRPC_MDELEM_FROM_EMPTY \
    414   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49], GRPC_MDELEM_STORAGE_STATIC))
    415 /* "host": "" */
    416 #define GRPC_MDELEM_HOST_EMPTY \
    417   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50], GRPC_MDELEM_STORAGE_STATIC))
    418 /* "if-match": "" */
    419 #define GRPC_MDELEM_IF_MATCH_EMPTY \
    420   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51], GRPC_MDELEM_STORAGE_STATIC))
    421 /* "if-modified-since": "" */
    422 #define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY \
    423   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52], GRPC_MDELEM_STORAGE_STATIC))
    424 /* "if-none-match": "" */
    425 #define GRPC_MDELEM_IF_NONE_MATCH_EMPTY \
    426   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53], GRPC_MDELEM_STORAGE_STATIC))
    427 /* "if-range": "" */
    428 #define GRPC_MDELEM_IF_RANGE_EMPTY \
    429   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54], GRPC_MDELEM_STORAGE_STATIC))
    430 /* "if-unmodified-since": "" */
    431 #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY \
    432   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55], GRPC_MDELEM_STORAGE_STATIC))
    433 /* "last-modified": "" */
    434 #define GRPC_MDELEM_LAST_MODIFIED_EMPTY \
    435   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56], GRPC_MDELEM_STORAGE_STATIC))
    436 /* "lb-token": "" */
    437 #define GRPC_MDELEM_LB_TOKEN_EMPTY \
    438   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57], GRPC_MDELEM_STORAGE_STATIC))
    439 /* "lb-cost-bin": "" */
    440 #define GRPC_MDELEM_LB_COST_BIN_EMPTY \
    441   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58], GRPC_MDELEM_STORAGE_STATIC))
    442 /* "link": "" */
    443 #define GRPC_MDELEM_LINK_EMPTY \
    444   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59], GRPC_MDELEM_STORAGE_STATIC))
    445 /* "location": "" */
    446 #define GRPC_MDELEM_LOCATION_EMPTY \
    447   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60], GRPC_MDELEM_STORAGE_STATIC))
    448 /* "max-forwards": "" */
    449 #define GRPC_MDELEM_MAX_FORWARDS_EMPTY \
    450   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61], GRPC_MDELEM_STORAGE_STATIC))
    451 /* "proxy-authenticate": "" */
    452 #define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY \
    453   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62], GRPC_MDELEM_STORAGE_STATIC))
    454 /* "proxy-authorization": "" */
    455 #define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY \
    456   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63], GRPC_MDELEM_STORAGE_STATIC))
    457 /* "range": "" */
    458 #define GRPC_MDELEM_RANGE_EMPTY \
    459   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64], GRPC_MDELEM_STORAGE_STATIC))
    460 /* "referer": "" */
    461 #define GRPC_MDELEM_REFERER_EMPTY \
    462   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65], GRPC_MDELEM_STORAGE_STATIC))
    463 /* "refresh": "" */
    464 #define GRPC_MDELEM_REFRESH_EMPTY \
    465   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66], GRPC_MDELEM_STORAGE_STATIC))
    466 /* "retry-after": "" */
    467 #define GRPC_MDELEM_RETRY_AFTER_EMPTY \
    468   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67], GRPC_MDELEM_STORAGE_STATIC))
    469 /* "server": "" */
    470 #define GRPC_MDELEM_SERVER_EMPTY \
    471   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68], GRPC_MDELEM_STORAGE_STATIC))
    472 /* "set-cookie": "" */
    473 #define GRPC_MDELEM_SET_COOKIE_EMPTY \
    474   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69], GRPC_MDELEM_STORAGE_STATIC))
    475 /* "strict-transport-security": "" */
    476 #define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
    477   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70], GRPC_MDELEM_STORAGE_STATIC))
    478 /* "transfer-encoding": "" */
    479 #define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY \
    480   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71], GRPC_MDELEM_STORAGE_STATIC))
    481 /* "user-agent": "" */
    482 #define GRPC_MDELEM_USER_AGENT_EMPTY \
    483   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72], GRPC_MDELEM_STORAGE_STATIC))
    484 /* "vary": "" */
    485 #define GRPC_MDELEM_VARY_EMPTY \
    486   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73], GRPC_MDELEM_STORAGE_STATIC))
    487 /* "via": "" */
    488 #define GRPC_MDELEM_VIA_EMPTY \
    489   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74], GRPC_MDELEM_STORAGE_STATIC))
    490 /* "www-authenticate": "" */
    491 #define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY \
    492   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75], GRPC_MDELEM_STORAGE_STATIC))
    493 /* "grpc-accept-encoding": "identity" */
    494 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \
    495   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76], GRPC_MDELEM_STORAGE_STATIC))
    496 /* "grpc-accept-encoding": "deflate" */
    497 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \
    498   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77], GRPC_MDELEM_STORAGE_STATIC))
    499 /* "grpc-accept-encoding": "identity,deflate" */
    500 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \
    501   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78], GRPC_MDELEM_STORAGE_STATIC))
    502 /* "grpc-accept-encoding": "gzip" */
    503 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \
    504   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79], GRPC_MDELEM_STORAGE_STATIC))
    505 /* "grpc-accept-encoding": "identity,gzip" */
    506 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \
    507   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80], GRPC_MDELEM_STORAGE_STATIC))
    508 /* "grpc-accept-encoding": "deflate,gzip" */
    509 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \
    510   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[81], GRPC_MDELEM_STORAGE_STATIC))
    511 /* "grpc-accept-encoding": "identity,deflate,gzip" */
    512 #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
    513   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[82], GRPC_MDELEM_STORAGE_STATIC))
    514 /* "accept-encoding": "identity" */
    515 #define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY \
    516   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[83], GRPC_MDELEM_STORAGE_STATIC))
    517 /* "accept-encoding": "gzip" */
    518 #define GRPC_MDELEM_ACCEPT_ENCODING_GZIP \
    519   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[84], GRPC_MDELEM_STORAGE_STATIC))
    520 /* "accept-encoding": "identity,gzip" */
    521 #define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \
    522   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[85], GRPC_MDELEM_STORAGE_STATIC))
    523 
    524 grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b);
    525 typedef enum {
    526   GRPC_BATCH_PATH,
    527   GRPC_BATCH_METHOD,
    528   GRPC_BATCH_STATUS,
    529   GRPC_BATCH_AUTHORITY,
    530   GRPC_BATCH_SCHEME,
    531   GRPC_BATCH_TE,
    532   GRPC_BATCH_GRPC_MESSAGE,
    533   GRPC_BATCH_GRPC_STATUS,
    534   GRPC_BATCH_GRPC_PAYLOAD_BIN,
    535   GRPC_BATCH_GRPC_ENCODING,
    536   GRPC_BATCH_GRPC_ACCEPT_ENCODING,
    537   GRPC_BATCH_GRPC_SERVER_STATS_BIN,
    538   GRPC_BATCH_GRPC_TAGS_BIN,
    539   GRPC_BATCH_GRPC_TRACE_BIN,
    540   GRPC_BATCH_CONTENT_TYPE,
    541   GRPC_BATCH_CONTENT_ENCODING,
    542   GRPC_BATCH_ACCEPT_ENCODING,
    543   GRPC_BATCH_GRPC_INTERNAL_ENCODING_REQUEST,
    544   GRPC_BATCH_GRPC_INTERNAL_STREAM_ENCODING_REQUEST,
    545   GRPC_BATCH_USER_AGENT,
    546   GRPC_BATCH_HOST,
    547   GRPC_BATCH_LB_TOKEN,
    548   GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS,
    549   GRPC_BATCH_GRPC_RETRY_PUSHBACK_MS,
    550   GRPC_BATCH_CALLOUTS_COUNT
    551 } grpc_metadata_batch_callouts_index;
    552 
    553 typedef union {
    554   struct grpc_linked_mdelem* array[GRPC_BATCH_CALLOUTS_COUNT];
    555   struct {
    556     struct grpc_linked_mdelem* path;
    557     struct grpc_linked_mdelem* method;
    558     struct grpc_linked_mdelem* status;
    559     struct grpc_linked_mdelem* authority;
    560     struct grpc_linked_mdelem* scheme;
    561     struct grpc_linked_mdelem* te;
    562     struct grpc_linked_mdelem* grpc_message;
    563     struct grpc_linked_mdelem* grpc_status;
    564     struct grpc_linked_mdelem* grpc_payload_bin;
    565     struct grpc_linked_mdelem* grpc_encoding;
    566     struct grpc_linked_mdelem* grpc_accept_encoding;
    567     struct grpc_linked_mdelem* grpc_server_stats_bin;
    568     struct grpc_linked_mdelem* grpc_tags_bin;
    569     struct grpc_linked_mdelem* grpc_trace_bin;
    570     struct grpc_linked_mdelem* content_type;
    571     struct grpc_linked_mdelem* content_encoding;
    572     struct grpc_linked_mdelem* accept_encoding;
    573     struct grpc_linked_mdelem* grpc_internal_encoding_request;
    574     struct grpc_linked_mdelem* grpc_internal_stream_encoding_request;
    575     struct grpc_linked_mdelem* user_agent;
    576     struct grpc_linked_mdelem* host;
    577     struct grpc_linked_mdelem* lb_token;
    578     struct grpc_linked_mdelem* grpc_previous_rpc_attempts;
    579     struct grpc_linked_mdelem* grpc_retry_pushback_ms;
    580   } named;
    581 } grpc_metadata_batch_callouts;
    582 
    583 #define GRPC_BATCH_INDEX_OF(slice)                      \
    584   (GRPC_IS_STATIC_METADATA_STRING((slice))              \
    585        ? (grpc_metadata_batch_callouts_index)GPR_CLAMP( \
    586              GRPC_STATIC_METADATA_INDEX((slice)), 0,    \
    587              GRPC_BATCH_CALLOUTS_COUNT)                 \
    588        : GRPC_BATCH_CALLOUTS_COUNT)
    589 
    590 extern const uint8_t grpc_static_accept_encoding_metadata[8];
    591 #define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs)                       \
    592   (GRPC_MAKE_MDELEM(                                                           \
    593       &grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]], \
    594       GRPC_MDELEM_STORAGE_STATIC))
    595 
    596 extern const uint8_t grpc_static_accept_stream_encoding_metadata[4];
    597 #define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs)                \
    598   (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table                                  \
    599                         [grpc_static_accept_stream_encoding_metadata[(algs)]], \
    600                     GRPC_MDELEM_STORAGE_STATIC))
    601 #endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */
    602