Run clang-format

pull/5149/head
Bogdan Drutu 9 years ago
parent 079a179991
commit 806f434f9d
  1. 220
      src/core/transport/static_metadata.c
  2. 52
      src/core/transport/static_metadata.h

@ -1,11 +1,11 @@
/* /*
* Copyright 2015-2016, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are
* met: * met:
* *
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above * * Redistributions in binary form must reproduce the above
@ -15,7 +15,7 @@
* * Neither the name of Google Inc. nor the names of its * * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from * contributors may be used to endorse or promote products derived from
* this software without specific prior written permission. * this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@ -31,11 +31,13 @@
/* /*
* WARNING: Auto-generated code. * WARNING: Auto-generated code.
* *
* To make changes to this file, change tools/codegen/core/gen_static_metadata.py, * To make changes to this file, change
* tools/codegen/core/gen_static_metadata.py,
* and then re-run it. * and then re-run it.
* *
* See metadata.h for an explanation of the interface here, and metadata.c for an * See metadata.h for an explanation of the interface here, and metadata.c for
* an
* explanation of what's going on. * explanation of what's going on.
*/ */
@ -45,106 +47,114 @@ grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,5,2,4,8,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; 0, 0, 0, 0, 0, 0, 3, 7, 5, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2] = { const gpr_uint8
11,35,10,35,12,35,12,49,13,35,14,35,15,35,16,35,17,35,19,35,20,35,21,35,24,35,25,35,26,35,27,35,28,35,29,35,30,18,30,35,31,35,32,35,36,35,37,35,38,35,39,35,42,33,42,34,42,48,42,53,42,54,42,55,42,56,43,33,43,48,43,53,46,0,46,1,46,2,50,35,57,35,58,35,59,35,60,35,61,35,62,35,63,35,64,35,65,35,66,40,66,68,67,78,67,79,69,35,70,35,71,35,72,35,73,35,74,35,75,41,75,51,75,52,76,35,77,35,80,3,80,4,80,5,80,6,80,7,80,8,80,9,81,35,82,83,84,35,85,35,86,35,87,35,88,35 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] = {
}; 11, 35, 10, 35, 12, 35, 12, 49, 13, 35, 14, 35, 15, 35, 16, 35, 17, 35,
19, 35, 20, 35, 21, 35, 24, 35, 25, 35, 26, 35, 27, 35, 28, 35, 29, 35,
30, 18, 30, 35, 31, 35, 32, 35, 36, 35, 37, 35, 38, 35, 39, 35, 42, 33,
42, 34, 42, 48, 42, 53, 42, 54, 42, 55, 42, 56, 43, 33, 43, 48, 43, 53,
46, 0, 46, 1, 46, 2, 50, 35, 57, 35, 58, 35, 59, 35, 60, 35, 61, 35,
62, 35, 63, 35, 64, 35, 65, 35, 66, 40, 66, 68, 67, 78, 67, 79, 69, 35,
70, 35, 71, 35, 72, 35, 73, 35, 74, 35, 75, 41, 75, 51, 75, 52, 76, 35,
77, 35, 80, 3, 80, 4, 80, 5, 80, 6, 80, 7, 80, 8, 80, 9, 81, 35,
82, 83, 84, 35, 85, 35, 86, 35, 87, 35, 88, 35};
const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"0", "0",
"1", "1",
"2", "2",
"200", "200",
"204", "204",
"206", "206",
"304", "304",
"400", "400",
"404", "404",
"500", "500",
"accept", "accept",
"accept-charset", "accept-charset",
"accept-encoding", "accept-encoding",
"accept-language", "accept-language",
"accept-ranges", "accept-ranges",
"access-control-allow-origin", "access-control-allow-origin",
"age", "age",
"allow", "allow",
"application/grpc", "application/grpc",
":authority", ":authority",
"authorization", "authorization",
"cache-control", "cache-control",
"census-bin", "census-bin",
"census-binary-bin", "census-binary-bin",
"content-disposition", "content-disposition",
"content-encoding", "content-encoding",
"content-language", "content-language",
"content-length", "content-length",
"content-location", "content-location",
"content-range", "content-range",
"content-type", "content-type",
"cookie", "cookie",
"date", "date",
"deflate", "deflate",
"deflate,gzip", "deflate,gzip",
"", "",
"etag", "etag",
"expect", "expect",
"expires", "expires",
"from", "from",
"GET", "GET",
"grpc", "grpc",
"grpc-accept-encoding", "grpc-accept-encoding",
"grpc-encoding", "grpc-encoding",
"grpc-internal-encoding-request", "grpc-internal-encoding-request",
"grpc-message", "grpc-message",
"grpc-status", "grpc-status",
"grpc-timeout", "grpc-timeout",
"gzip", "gzip",
"gzip, deflate", "gzip, deflate",
"host", "host",
"http", "http",
"https", "https",
"identity", "identity",
"identity,deflate", "identity,deflate",
"identity,deflate,gzip", "identity,deflate,gzip",
"identity,gzip", "identity,gzip",
"if-match", "if-match",
"if-modified-since", "if-modified-since",
"if-none-match", "if-none-match",
"if-range", "if-range",
"if-unmodified-since", "if-unmodified-since",
"last-modified", "last-modified",
"link", "link",
"location", "location",
"max-forwards", "max-forwards",
":method", ":method",
":path", ":path",
"POST", "POST",
"proxy-authenticate", "proxy-authenticate",
"proxy-authorization", "proxy-authorization",
"range", "range",
"referer", "referer",
"refresh", "refresh",
"retry-after", "retry-after",
":scheme", ":scheme",
"server", "server",
"set-cookie", "set-cookie",
"/", "/",
"/index.html", "/index.html",
":status", ":status",
"strict-transport-security", "strict-transport-security",
"te", "te",
"trailers", "trailers",
"transfer-encoding", "transfer-encoding",
"user-agent", "user-agent",
"vary", "vary",
"via", "via",
"www-authenticate" "www-authenticate"};
};
const gpr_uint8 grpc_static_accept_encoding_metadata[8] = { const gpr_uint8 grpc_static_accept_encoding_metadata[8] = {0, 29, 26, 30,
0,29,26,30,28,32,27,31 28, 32, 27, 31};
};

@ -1,11 +1,11 @@
/* /*
* Copyright 2015-2016, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are
* met: * met:
* *
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above * * Redistributions in binary form must reproduce the above
@ -15,7 +15,7 @@
* * Neither the name of Google Inc. nor the names of its * * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from * contributors may be used to endorse or promote products derived from
* this software without specific prior written permission. * this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@ -31,11 +31,13 @@
/* /*
* WARNING: Auto-generated code. * WARNING: Auto-generated code.
* *
* To make changes to this file, change tools/codegen/core/gen_static_metadata.py, * To make changes to this file, change
* tools/codegen/core/gen_static_metadata.py,
* and then re-run it. * and then re-run it.
* *
* See metadata.h for an explanation of the interface here, and metadata.c for an * See metadata.h for an explanation of the interface here, and metadata.c for
* an
* explanation of what's going on. * explanation of what's going on.
*/ */
@ -157,7 +159,8 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
/* "identity,deflate" */ /* "identity,deflate" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (&grpc_static_mdstr_table[54]) #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (&grpc_static_mdstr_table[54])
/* "identity,deflate,gzip" */ /* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP (&grpc_static_mdstr_table[55]) #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(&grpc_static_mdstr_table[55])
/* "identity,gzip" */ /* "identity,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (&grpc_static_mdstr_table[56]) #define GRPC_MDSTR_IDENTITY_COMMA_GZIP (&grpc_static_mdstr_table[56])
/* "if-match" */ /* "if-match" */
@ -235,13 +238,15 @@ extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* "accept-encoding": "" */ /* "accept-encoding": "" */
#define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY (&grpc_static_mdelem_table[2]) #define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY (&grpc_static_mdelem_table[2])
/* "accept-encoding": "gzip, deflate" */ /* "accept-encoding": "gzip, deflate" */
#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE (&grpc_static_mdelem_table[3]) #define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \
(&grpc_static_mdelem_table[3])
/* "accept-language": "" */ /* "accept-language": "" */
#define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY (&grpc_static_mdelem_table[4]) #define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY (&grpc_static_mdelem_table[4])
/* "accept-ranges": "" */ /* "accept-ranges": "" */
#define GRPC_MDELEM_ACCEPT_RANGES_EMPTY (&grpc_static_mdelem_table[5]) #define GRPC_MDELEM_ACCEPT_RANGES_EMPTY (&grpc_static_mdelem_table[5])
/* "access-control-allow-origin": "" */ /* "access-control-allow-origin": "" */
#define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY (&grpc_static_mdelem_table[6]) #define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \
(&grpc_static_mdelem_table[6])
/* "age": "" */ /* "age": "" */
#define GRPC_MDELEM_AGE_EMPTY (&grpc_static_mdelem_table[7]) #define GRPC_MDELEM_AGE_EMPTY (&grpc_static_mdelem_table[7])
/* "allow": "" */ /* "allow": "" */
@ -265,7 +270,8 @@ extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* "content-range": "" */ /* "content-range": "" */
#define GRPC_MDELEM_CONTENT_RANGE_EMPTY (&grpc_static_mdelem_table[17]) #define GRPC_MDELEM_CONTENT_RANGE_EMPTY (&grpc_static_mdelem_table[17])
/* "content-type": "application/grpc" */ /* "content-type": "application/grpc" */
#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC (&grpc_static_mdelem_table[18]) #define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \
(&grpc_static_mdelem_table[18])
/* "content-type": "" */ /* "content-type": "" */
#define GRPC_MDELEM_CONTENT_TYPE_EMPTY (&grpc_static_mdelem_table[19]) #define GRPC_MDELEM_CONTENT_TYPE_EMPTY (&grpc_static_mdelem_table[19])
/* "cookie": "" */ /* "cookie": "" */
@ -283,17 +289,22 @@ extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* "grpc-accept-encoding": "deflate" */ /* "grpc-accept-encoding": "deflate" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE (&grpc_static_mdelem_table[26]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE (&grpc_static_mdelem_table[26])
/* "grpc-accept-encoding": "deflate,gzip" */ /* "grpc-accept-encoding": "deflate,gzip" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP (&grpc_static_mdelem_table[27]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \
(&grpc_static_mdelem_table[27])
/* "grpc-accept-encoding": "gzip" */ /* "grpc-accept-encoding": "gzip" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP (&grpc_static_mdelem_table[28]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP (&grpc_static_mdelem_table[28])
/* "grpc-accept-encoding": "identity" */ /* "grpc-accept-encoding": "identity" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY (&grpc_static_mdelem_table[29]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \
(&grpc_static_mdelem_table[29])
/* "grpc-accept-encoding": "identity,deflate" */ /* "grpc-accept-encoding": "identity,deflate" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE (&grpc_static_mdelem_table[30]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \
(&grpc_static_mdelem_table[30])
/* "grpc-accept-encoding": "identity,deflate,gzip" */ /* "grpc-accept-encoding": "identity,deflate,gzip" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP (&grpc_static_mdelem_table[31]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(&grpc_static_mdelem_table[31])
/* "grpc-accept-encoding": "identity,gzip" */ /* "grpc-accept-encoding": "identity,gzip" */
#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP (&grpc_static_mdelem_table[32]) #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \
(&grpc_static_mdelem_table[32])
/* "grpc-encoding": "deflate" */ /* "grpc-encoding": "deflate" */
#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE (&grpc_static_mdelem_table[33]) #define GRPC_MDELEM_GRPC_ENCODING_DEFLATE (&grpc_static_mdelem_table[33])
/* "grpc-encoding": "gzip" */ /* "grpc-encoding": "gzip" */
@ -371,7 +382,8 @@ extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* ":status": "500" */ /* ":status": "500" */
#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[70]) #define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[70])
/* "strict-transport-security": "" */ /* "strict-transport-security": "" */
#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY (&grpc_static_mdelem_table[71]) #define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \
(&grpc_static_mdelem_table[71])
/* "te": "trailers" */ /* "te": "trailers" */
#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[72]) #define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[72])
/* "transfer-encoding": "" */ /* "transfer-encoding": "" */
@ -385,8 +397,10 @@ extern gpr_uintptr grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
/* "www-authenticate": "" */ /* "www-authenticate": "" */
#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[77]) #define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[77])
extern const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2]; extern const gpr_uint8
grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2];
extern const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT]; extern const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT];
extern const gpr_uint8 grpc_static_accept_encoding_metadata[8]; extern const gpr_uint8 grpc_static_accept_encoding_metadata[8];
#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) (&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]]) #define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \
(&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]])
#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */ #endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */

Loading…
Cancel
Save