Remove all extern C

pull/13432/head
ncteisen 7 years ago
parent 90c8cf6acc
commit adbfbd5977
  1. 4
      include/grpc++/impl/codegen/core_codegen_interface.h
  2. 8
      include/grpc/census.h
  3. 8
      include/grpc/compression.h
  4. 8
      include/grpc/grpc.h
  5. 8
      include/grpc/grpc_cronet.h
  6. 8
      include/grpc/grpc_posix.h
  7. 8
      include/grpc/grpc_security.h
  8. 8
      include/grpc/grpc_security_constants.h
  9. 8
      include/grpc/impl/codegen/atm.h
  10. 8
      include/grpc/impl/codegen/atm_gcc_atomic.h
  11. 8
      include/grpc/impl/codegen/byte_buffer.h
  12. 8
      include/grpc/impl/codegen/byte_buffer_reader.h
  13. 8
      include/grpc/impl/codegen/compression_types.h
  14. 8
      include/grpc/impl/codegen/connectivity_state.h
  15. 8
      include/grpc/impl/codegen/gpr_types.h
  16. 8
      include/grpc/impl/codegen/grpc_types.h
  17. 8
      include/grpc/impl/codegen/propagation_bits.h
  18. 8
      include/grpc/impl/codegen/status.h
  19. 8
      include/grpc/impl/codegen/sync.h
  20. 8
      include/grpc/load_reporting.h
  21. 8
      include/grpc/slice.h
  22. 8
      include/grpc/slice_buffer.h
  23. 8
      include/grpc/support/alloc.h
  24. 8
      include/grpc/support/avl.h
  25. 8
      include/grpc/support/cmdline.h
  26. 8
      include/grpc/support/cpu.h
  27. 8
      include/grpc/support/histogram.h
  28. 8
      include/grpc/support/host_port.h
  29. 8
      include/grpc/support/log.h
  30. 8
      include/grpc/support/log_windows.h
  31. 8
      include/grpc/support/string_util.h
  32. 8
      include/grpc/support/subprocess.h
  33. 8
      include/grpc/support/sync.h
  34. 8
      include/grpc/support/thd.h
  35. 8
      include/grpc/support/time.h
  36. 8
      include/grpc/support/tls_pthread.h
  37. 8
      src/core/ext/filters/client_channel/client_channel.h
  38. 8
      src/core/ext/filters/client_channel/client_channel_factory.h
  39. 4
      src/core/ext/filters/client_channel/client_channel_plugin.cc
  40. 8
      src/core/ext/filters/client_channel/connector.h
  41. 8
      src/core/ext/filters/client_channel/http_connect_handshaker.h
  42. 8
      src/core/ext/filters/client_channel/http_proxy.h
  43. 8
      src/core/ext/filters/client_channel/lb_policy.h
  44. 8
      src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
  45. 4
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
  46. 8
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
  47. 8
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
  48. 8
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
  49. 8
      src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
  50. 4
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
  51. 4
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
  52. 8
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
  53. 8
      src/core/ext/filters/client_channel/lb_policy_factory.h
  54. 8
      src/core/ext/filters/client_channel/lb_policy_registry.h
  55. 8
      src/core/ext/filters/client_channel/parse_address.h
  56. 8
      src/core/ext/filters/client_channel/proxy_mapper.h
  57. 8
      src/core/ext/filters/client_channel/proxy_mapper_registry.h
  58. 8
      src/core/ext/filters/client_channel/resolver.h
  59. 8
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  60. 8
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
  61. 8
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
  62. 4
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  63. 4
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
  64. 8
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
  65. 4
      src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
  66. 8
      src/core/ext/filters/client_channel/resolver_factory.h
  67. 8
      src/core/ext/filters/client_channel/resolver_registry.h
  68. 8
      src/core/ext/filters/client_channel/retry_throttle.h
  69. 8
      src/core/ext/filters/client_channel/subchannel.h
  70. 8
      src/core/ext/filters/client_channel/subchannel_index.h
  71. 8
      src/core/ext/filters/client_channel/uri_parser.h
  72. 4
      src/core/ext/filters/deadline/deadline_filter.cc
  73. 8
      src/core/ext/filters/deadline/deadline_filter.h
  74. 8
      src/core/ext/filters/http/client/http_client_filter.h
  75. 4
      src/core/ext/filters/http/http_filters_plugin.cc
  76. 8
      src/core/ext/filters/http/message_compress/message_compress_filter.h
  77. 8
      src/core/ext/filters/http/server/http_server_filter.h
  78. 8
      src/core/ext/filters/load_reporting/server_load_reporting_filter.h
  79. 4
      src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
  80. 8
      src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
  81. 4
      src/core/ext/filters/max_age/max_age_filter.cc
  82. 8
      src/core/ext/filters/max_age/max_age_filter.h
  83. 4
      src/core/ext/filters/message_size/message_size_filter.cc
  84. 8
      src/core/ext/filters/message_size/message_size_filter.h
  85. 4
      src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
  86. 8
      src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h
  87. 8
      src/core/ext/filters/workarounds/workaround_utils.h
  88. 8
      src/core/ext/transport/chttp2/alpn/alpn.h
  89. 8
      src/core/ext/transport/chttp2/client/chttp2_connector.h
  90. 8
      src/core/ext/transport/chttp2/server/chttp2_server.h
  91. 8
      src/core/ext/transport/chttp2/transport/bin_decoder.h
  92. 8
      src/core/ext/transport/chttp2/transport/bin_encoder.h
  93. 4
      src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
  94. 8
      src/core/ext/transport/chttp2/transport/chttp2_transport.h
  95. 2
      src/core/ext/transport/chttp2/transport/flow_control.h
  96. 8
      src/core/ext/transport/chttp2/transport/frame.h
  97. 8
      src/core/ext/transport/chttp2/transport/frame_data.h
  98. 8
      src/core/ext/transport/chttp2/transport/frame_goaway.h
  99. 8
      src/core/ext/transport/chttp2/transport/frame_ping.h
  100. 8
      src/core/ext/transport/chttp2/transport/frame_rst_stream.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -25,10 +25,6 @@
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/sync.h>
extern "C" {
struct grpc_byte_buffer;
}
namespace grpc {
/// Interface between the codegen library and the minimal subset of core

@ -21,9 +21,7 @@
#include <grpc/grpc.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
A Census Context is a handle used by Census to represent the current tracing
@ -31,8 +29,6 @@ extern "C" {
(this is the responsibility of the local RPC system). */
typedef struct census_context census_context;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CENSUS_H */

@ -26,9 +26,7 @@
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm. Returns 1 upon success, 0 otherwise. */
@ -85,8 +83,6 @@ GRPCAPI int grpc_compression_options_is_stream_compression_algorithm_enabled(
const grpc_compression_options* opts,
grpc_stream_compression_algorithm algorithm);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_COMPRESSION_H */

@ -29,9 +29,7 @@
#include <grpc/support/time.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/*! \mainpage GRPC Core
*
@ -466,8 +464,6 @@ GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
*/
GRPCAPI const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_GRPC_H */

@ -21,16 +21,12 @@
#include <grpc/grpc.h>
#ifdef __cplusplus
extern "C" {
#endif
GRPCAPI grpc_channel* grpc_cronet_secure_channel_create(
void* engine, const char* target, const grpc_channel_args* args,
void* reserved);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_GRPC_CRONET_H */

@ -24,9 +24,7 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/*! \mainpage GRPC Core POSIX
*
@ -59,8 +57,6 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server* server,
- This API is optional but if called, it MUST be called before grpc_init() */
GRPCAPI void grpc_use_signal(int signum);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_GRPC_POSIX_H */

@ -23,9 +23,7 @@
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>
#ifdef __cplusplus
extern "C" {
#endif
/** --- Authentication Context. --- */
@ -461,8 +459,6 @@ typedef struct {
GRPCAPI void grpc_server_credentials_set_auth_metadata_processor(
grpc_server_credentials* creds, grpc_auth_metadata_processor processor);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_GRPC_SECURITY_H */

@ -19,9 +19,7 @@
#ifndef GRPC_GRPC_SECURITY_CONSTANTS_H
#define GRPC_GRPC_SECURITY_CONSTANTS_H
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME "transport_security_type"
#define GRPC_SSL_TRANSPORT_SECURITY_TYPE "ssl"
@ -99,8 +97,6 @@ typedef enum {
GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY
} grpc_ssl_client_certificate_request_type;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_GRPC_SECURITY_CONSTANTS_H */

@ -79,17 +79,13 @@
#error could not determine platform for atm
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** Adds \a delta to \a *value, clamping the result to the range specified
by \a min and \a max. Returns the new value. */
gpr_atm gpr_atm_no_barrier_clamped_add(gpr_atm* value, gpr_atm delta,
gpr_atm min, gpr_atm max);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_ATM_H */

@ -23,9 +23,7 @@
__atomic_* interface. */
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
@ -84,8 +82,6 @@ static __inline int gpr_atm_full_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {
#define gpr_atm_full_xchg(p, n) \
GPR_ATM_INC_CAS_THEN(__atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL))
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */

@ -21,9 +21,7 @@
#include <grpc/impl/codegen/grpc_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
*
@ -79,8 +77,6 @@ grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader* reader);
GRPCAPI grpc_byte_buffer* grpc_raw_byte_buffer_from_reader(
grpc_byte_buffer_reader* reader);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_H */

@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#ifdef __cplusplus
extern "C" {
#endif
struct grpc_byte_buffer;
@ -35,8 +33,6 @@ struct grpc_byte_buffer_reader {
} current;
};
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H */

@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** To be used as initial metadata key for the request of a concrete compression
* algorithm */
@ -157,8 +155,6 @@ typedef struct grpc_compression_options {
} grpc_compression_options;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H */

@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H
#define GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H
#ifdef __cplusplus
extern "C" {
#endif
/** Connectivity state of a channel. */
typedef enum {
@ -37,8 +35,6 @@ typedef enum {
GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H */

@ -23,9 +23,7 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/** The clocks we support. */
typedef enum {
@ -52,8 +50,6 @@ typedef struct gpr_timespec {
gpr_clock_type clock_type;
} gpr_timespec;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_GPR_TYPES_H */

@ -29,9 +29,7 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_BB_RAW
@ -628,8 +626,6 @@ typedef struct grpc_completion_queue_attributes {
/** The completion queue factory structure is opaque to the callers of grpc */
typedef struct grpc_completion_queue_factory grpc_completion_queue_factory;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_GRPC_TYPES_H */

@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Propagation bits: this can be bitwise or-ed to form propagation_mask for
* grpc_call */
@ -45,8 +43,6 @@ extern "C" {
0xffff | GRPC_PROPAGATE_DEADLINE | GRPC_PROPAGATE_CENSUS_STATS_CONTEXT | \
GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT | GRPC_PROPAGATE_CANCELLATION)))
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H */

@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_STATUS_H
#define GRPC_IMPL_CODEGEN_STATUS_H
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/** Not an error; returned on success */
@ -146,8 +144,6 @@ typedef enum {
GRPC_STATUS__DO_NOT_USE = -1
} grpc_status_code;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_STATUS_H */

@ -37,9 +37,7 @@
provides no memory barriers.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* Platform-specific type declarations of gpr_mu and gpr_cv. */
#include <grpc/impl/codegen/port_platform.h>
@ -55,8 +53,6 @@ extern "C" {
#error Unable to determine platform for sync
#endif
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_SYNC_H */

@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Metadata key for the gRPC LB load balancer token.
*
@ -41,8 +39,6 @@ extern "C" {
* call. */
#define GRPC_LB_COST_MD_KEY "lb-cost-bin"
#ifdef __cplusplus
}
#endif
#endif /* GRPC_LOAD_REPORTING_H */

@ -22,9 +22,7 @@
#include <grpc/impl/codegen/slice.h>
#include <grpc/support/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Increment the refcount of s. Requires slice is initialized.
Returns s. */
@ -163,8 +161,6 @@ GPRAPI grpc_slice grpc_slice_dup(grpc_slice a);
NULL's. Returned string must be freed with gpr_free. */
GPRAPI char* grpc_slice_to_c_string(grpc_slice s);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SLICE_H */

@ -21,9 +21,7 @@
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/** initialize a slice buffer */
GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer* sb);
@ -76,8 +74,6 @@ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* src);
GPRAPI void grpc_slice_buffer_undo_take_first(grpc_slice_buffer* src,
grpc_slice slice);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SLICE_BUFFER_H */

@ -23,9 +23,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_allocation_functions {
void* (*malloc_fn)(size_t size);
@ -60,8 +58,6 @@ GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions);
/** Return the family of allocation functions currently in effect. */
GPRAPI gpr_allocation_functions gpr_get_allocation_functions();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_ALLOC_H */

@ -21,9 +21,7 @@
#include <grpc/support/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** internal node of an AVL tree */
typedef struct gpr_avl_node {
@ -95,8 +93,6 @@ GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void* key, void** value,
/** Return 1 if avl is empty, 0 otherwise */
GPRAPI int gpr_avl_is_empty(gpr_avl avl);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_AVL_H */

@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Simple command line parser.
@ -81,8 +79,6 @@ GPRAPI void gpr_cmdline_destroy(gpr_cmdline* cl);
/** Get a string describing usage */
GPRAPI char* gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_CMDLINE_H */

@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Interface providing CPU information for currently running system */
@ -37,8 +35,6 @@ GPRAPI unsigned gpr_cpu_num_cores(void);
[0, gpr_cpu_num_cores() - 1] */
GPRAPI unsigned gpr_cpu_current_cpu(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GRPC_SUPPORT_CPU_H */

@ -22,9 +22,7 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_histogram gpr_histogram;
@ -57,8 +55,6 @@ GPRAPI void gpr_histogram_merge_contents(gpr_histogram* histogram,
double max_seen, double sum,
double sum_of_squares, double count);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_HISTOGRAM_H */

@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Given a host and port, creates a newly-allocated string of the form
"host:port" or "[ho:st]:port", depending on whether the host contains colons
@ -44,8 +42,6 @@ GPRAPI int gpr_join_host_port(char** out, const char* host, int port);
failure. */
GPRAPI int gpr_split_host_port(const char* name, char** host, char** port);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_HOST_PORT_H */

@ -25,9 +25,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** GPR log API.
@ -96,8 +94,6 @@ GPRAPI void gpr_set_log_function(gpr_log_func func);
} \
} while (0)
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_LOG_H */

@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Returns a string allocated with gpr_malloc that contains a UTF-8
* formatted error message, corresponding to the error messageid.
@ -31,8 +29,6 @@ extern "C" {
*/
GPRAPI char* gpr_format_message(int messageid);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_LOG_WINDOWS_H */

@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** String utility functions */
@ -42,8 +40,6 @@ GPRAPI char* gpr_strdup(const char* src);
GPRAPI int gpr_asprintf(char** strp, const char* format, ...)
GPR_PRINT_FORMAT_CHECK(2, 3);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_STRING_UTIL_H */

@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_subprocess gpr_subprocess;
@ -37,8 +35,6 @@ GPRAPI void gpr_subprocess_destroy(gpr_subprocess* p);
GPRAPI int gpr_subprocess_join(gpr_subprocess* p);
GPRAPI void gpr_subprocess_interrupt(gpr_subprocess* p);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GRPC_SUPPORT_SUBPROCESS_H */

@ -22,9 +22,7 @@
#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** --- Mutex interface ---
@ -273,9 +271,6 @@ GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter* c);
}
#endif /* 0 */
#ifdef __cplusplus
} // extern "C"
namespace grpc_core {
class mu_guard {
@ -291,6 +286,5 @@ class mu_guard {
};
} // namespace grpc_core
#endif
#endif /* GRPC_SUPPORT_SYNC_H */

@ -29,9 +29,7 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uintptr_t gpr_thd_id;
@ -69,8 +67,6 @@ GPRAPI gpr_thd_id gpr_thd_currentid(void);
Calling this on a detached thread has unpredictable results. */
GPRAPI void gpr_thd_join(gpr_thd_id t);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_THD_H */

@ -24,9 +24,7 @@
#include <stddef.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Time constants. */
GPRAPI gpr_timespec
@ -83,8 +81,6 @@ GPRAPI void gpr_sleep_until(gpr_timespec until);
GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_TIME_H */

@ -34,12 +34,8 @@ struct gpr_pthread_thread_local {
#define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL))
#define gpr_tls_destroy(tls) pthread_key_delete((tls)->key)
#define gpr_tls_get(tls) ((intptr_t)pthread_getspecific((tls)->key))
#ifdef __cplusplus
extern "C" {
#endif
intptr_t gpr_tls_set(struct gpr_pthread_thread_local* tls, intptr_t value);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_TLS_PTHREAD_H */

@ -28,9 +28,7 @@ extern grpc_tracer_flag grpc_client_channel_trace;
// Channel arg key for server URI string.
#define GRPC_ARG_SERVER_URI "grpc.server_uri"
#ifdef __cplusplus
extern "C" {
#endif
/* A client channel is a channel that begins disconnected, and can connect
to some endpoint on demand. If that endpoint disconnects, it will be
@ -56,8 +54,6 @@ void grpc_client_channel_watch_connectivity_state(
grpc_subchannel_call* grpc_client_channel_get_subchannel_call(
grpc_call_element* elem);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */

@ -27,9 +27,7 @@
// Channel arg key for client channel factory.
#define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_client_channel_factory grpc_client_channel_factory;
typedef struct grpc_client_channel_factory_vtable
@ -78,8 +76,6 @@ grpc_channel* grpc_client_channel_factory_create_channel(
grpc_arg grpc_client_channel_factory_create_channel_arg(
grpc_client_channel_factory* factory);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */

@ -65,7 +65,7 @@ static bool set_default_host_if_unset(grpc_exec_ctx* exec_ctx,
return true;
}
extern "C" void grpc_client_channel_init(void) {
void grpc_client_channel_init(void) {
grpc_lb_policy_registry_init();
grpc_resolver_registry_init();
grpc_retry_throttle_map_init();
@ -84,7 +84,7 @@ extern "C" void grpc_client_channel_init(void) {
#endif
}
extern "C" void grpc_client_channel_shutdown(void) {
void grpc_client_channel_shutdown(void) {
grpc_subchannel_index_shutdown();
grpc_channel_init_shutdown();
grpc_proxy_mapper_registry_shutdown();

@ -23,9 +23,7 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/transport/transport.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_connector grpc_connector;
typedef struct grpc_connector_vtable grpc_connector_vtable;
@ -74,8 +72,6 @@ void grpc_connector_connect(grpc_exec_ctx* exec_ctx, grpc_connector* connector,
void grpc_connector_shutdown(grpc_exec_ctx* exec_ctx, grpc_connector* connector,
grpc_error* why);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */

@ -28,15 +28,11 @@
/// seperated by colons.
#define GRPC_ARG_HTTP_CONNECT_HEADERS "grpc.http_connect_headers"
#ifdef __cplusplus
extern "C" {
#endif
/// Registers handshaker factory.
void grpc_http_connect_register_handshaker_factory();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */

@ -19,14 +19,10 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H
#ifdef __cplusplus
extern "C" {
#endif
void grpc_register_http_proxy_mapper();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */

@ -23,9 +23,7 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/transport/connectivity_state.h"
#ifdef __cplusplus
extern "C" {
#endif
/** A load balancing policy: specified by a vtable and a struct (which
is expected to be extended to contain some parameters) */
@ -208,8 +206,6 @@ void grpc_lb_policy_update_locked(grpc_exec_ctx* exec_ctx,
grpc_lb_policy* policy,
const grpc_lb_policy_args* lb_policy_args);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H */

@ -21,15 +21,11 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_client_load_reporting_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H \
*/

@ -2001,7 +2001,7 @@ static bool maybe_add_client_load_reporting_filter(
return true;
}
extern "C" void grpc_lb_policy_grpclb_init() {
void grpc_lb_policy_grpclb_init() {
grpc_register_lb_policy(grpc_glb_lb_factory_create());
grpc_register_tracer(&grpc_lb_glb_trace);
#ifndef NDEBUG
@ -2013,4 +2013,4 @@ extern "C" void grpc_lb_policy_grpclb_init() {
(void*)&grpc_client_load_reporting_filter);
}
extern "C" void grpc_lb_policy_grpclb_shutdown() {}
void grpc_lb_policy_grpclb_shutdown() {}

@ -21,17 +21,13 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Returns a load balancing factory for the glb policy, which tries to connect
* to a load balancing server to decide the next successfully connected
* subchannel to pick. */
grpc_lb_policy_factory* grpc_glb_lb_factory_create();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */

@ -23,9 +23,7 @@
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/lib/slice/slice_hash_table.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Create the channel used for communicating with an LB service.
* Note that an LB *service* may be comprised of several LB *servers*.
@ -44,9 +42,7 @@ grpc_channel_args* grpc_lb_policy_grpclb_build_lb_channel_args(
grpc_fake_resolver_response_generator* response_generator,
const grpc_channel_args* args);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H \
*/

@ -23,9 +23,7 @@
#include <grpc/impl/codegen/grpc_types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_grpclb_client_stats grpc_grpclb_client_stats;
@ -65,9 +63,7 @@ void grpc_grpclb_client_stats_get_locked(
void grpc_grpclb_dropped_call_counts_destroy(
grpc_grpclb_dropped_call_counts* drop_entries);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H \
*/

@ -25,9 +25,7 @@
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128
@ -87,9 +85,7 @@ grpc_millis grpc_grpclb_duration_to_millis(grpc_grpclb_duration* duration_pb);
void grpc_grpclb_initial_response_destroy(
grpc_grpclb_initial_response* response);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H \
*/

@ -593,9 +593,9 @@ static grpc_lb_policy_factory* pick_first_lb_factory_create() {
/* Plugin registration */
extern "C" void grpc_lb_policy_pick_first_init() {
void grpc_lb_policy_pick_first_init() {
grpc_register_lb_policy(pick_first_lb_factory_create());
grpc_register_tracer(&grpc_lb_pick_first_trace);
}
extern "C" void grpc_lb_policy_pick_first_shutdown() {}
void grpc_lb_policy_pick_first_shutdown() {}

@ -689,9 +689,9 @@ static grpc_lb_policy_factory* round_robin_lb_factory_create() {
/* Plugin registration */
extern "C" void grpc_lb_policy_round_robin_init() {
void grpc_lb_policy_round_robin_init() {
grpc_register_lb_policy(round_robin_lb_factory_create());
grpc_register_tracer(&grpc_lb_round_robin_trace);
}
extern "C" void grpc_lb_policy_round_robin_shutdown() {}
void grpc_lb_policy_round_robin_shutdown() {}

@ -36,9 +36,7 @@
// round_robin that could be refactored and moved here. In a future PR,
// need to clean this up.
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_lb_subchannel_list grpc_lb_subchannel_list;
@ -146,8 +144,6 @@ void grpc_lb_subchannel_list_shutdown_and_unref(
grpc_exec_ctx* exec_ctx, grpc_lb_subchannel_list* subchannel_list,
const char* reason);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_SUBCHANNEL_LIST_H */

@ -29,9 +29,7 @@
// Channel arg key for grpc_lb_addresses.
#define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_lb_policy_factory grpc_lb_policy_factory;
typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable;
@ -134,8 +132,6 @@ grpc_lb_policy* grpc_lb_policy_factory_create_lb_policy(
grpc_exec_ctx* exec_ctx, grpc_lb_policy_factory* factory,
grpc_lb_policy_args* args);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */

@ -22,9 +22,7 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Initialize the registry and set \a default_factory as the factory to be
* returned when no name is provided in a lookup */
@ -41,8 +39,6 @@ void grpc_register_lb_policy(grpc_lb_policy_factory* factory);
grpc_lb_policy* grpc_lb_policy_create(grpc_exec_ctx* exec_ctx, const char* name,
grpc_lb_policy_args* args);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */

@ -24,9 +24,7 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/iomgr/resolve_address.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Populate \a resolved_addr from \a uri, whose path is expected to contain a
* unix socket path. Returns true upon success. */
@ -49,8 +47,6 @@ bool grpc_parse_ipv4_hostport(const char* hostport, grpc_resolved_address* addr,
bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
bool log_errors);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */

@ -25,9 +25,7 @@
#include "src/core/lib/iomgr/resolve_address.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_proxy_mapper grpc_proxy_mapper;
@ -75,8 +73,6 @@ bool grpc_proxy_mapper_map_address(grpc_exec_ctx* exec_ctx,
void grpc_proxy_mapper_destroy(grpc_proxy_mapper* mapper);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */

@ -21,9 +21,7 @@
#include "src/core/ext/filters/client_channel/proxy_mapper.h"
#ifdef __cplusplus
extern "C" {
#endif
void grpc_proxy_mapper_registry_init();
void grpc_proxy_mapper_registry_shutdown();
@ -45,8 +43,6 @@ bool grpc_proxy_mappers_map_address(grpc_exec_ctx* exec_ctx,
grpc_resolved_address** new_address,
grpc_channel_args** new_args);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */

@ -22,9 +22,7 @@
#include "src/core/ext/filters/client_channel/subchannel.h"
#include "src/core/lib/iomgr/iomgr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_resolver grpc_resolver;
typedef struct grpc_resolver_vtable grpc_resolver_vtable;
@ -91,8 +89,6 @@ void grpc_resolver_next_locked(grpc_exec_ctx* exec_ctx, grpc_resolver* resolver,
grpc_channel_args** result,
grpc_closure* on_complete);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H */

@ -425,7 +425,7 @@ static grpc_resolver_factory* dns_ares_resolver_factory_create() {
return &dns_resolver_factory;
}
extern "C" void grpc_resolver_dns_ares_init(void) {
void grpc_resolver_dns_ares_init(void) {
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER");
/* TODO(zyc): Turn on c-ares based resolver by default after the address
sorter and the CNAME support are added. */
@ -441,7 +441,7 @@ extern "C" void grpc_resolver_dns_ares_init(void) {
gpr_free(resolver);
}
extern "C" void grpc_resolver_dns_ares_shutdown(void) {
void grpc_resolver_dns_ares_shutdown(void) {
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER");
if (resolver != nullptr && gpr_stricmp(resolver, "ares") == 0) {
grpc_ares_cleanup();
@ -451,8 +451,8 @@ extern "C" void grpc_resolver_dns_ares_shutdown(void) {
#else /* GRPC_ARES == 1 && !defined(GRPC_UV) */
extern "C" void grpc_resolver_dns_ares_init(void) {}
void grpc_resolver_dns_ares_init(void) {}
extern "C" void grpc_resolver_dns_ares_shutdown(void) {}
void grpc_resolver_dns_ares_shutdown(void) {}
#endif /* GRPC_ARES == 1 && !defined(GRPC_UV) */

@ -23,9 +23,7 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_ares_ev_driver grpc_ares_ev_driver;
@ -54,9 +52,7 @@ void grpc_ares_ev_driver_destroy(grpc_ares_ev_driver* ev_driver);
void grpc_ares_ev_driver_shutdown(grpc_exec_ctx* exec_ctx,
grpc_ares_ev_driver* ev_driver);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H \
*/

@ -25,9 +25,7 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/resolve_address.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_ares_request grpc_ares_request;
@ -69,9 +67,7 @@ grpc_error* grpc_ares_init(void);
it has been called the same number of times as grpc_ares_init(). */
void grpc_ares_cleanup(void);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H \
*/

@ -295,7 +295,7 @@ static grpc_resolver_factory* dns_resolver_factory_create() {
return &dns_resolver_factory;
}
extern "C" void grpc_resolver_dns_native_init(void) {
void grpc_resolver_dns_native_init(void) {
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER");
if (resolver != nullptr && gpr_stricmp(resolver, "native") == 0) {
gpr_log(GPR_DEBUG, "Using native dns resolver");
@ -313,4 +313,4 @@ extern "C" void grpc_resolver_dns_native_init(void) {
gpr_free(resolver);
}
extern "C" void grpc_resolver_dns_native_shutdown(void) {}
void grpc_resolver_dns_native_shutdown(void) {}

@ -258,8 +258,8 @@ static const grpc_resolver_factory_vtable fake_resolver_factory_vtable = {
static grpc_resolver_factory fake_resolver_factory = {
&fake_resolver_factory_vtable};
extern "C" void grpc_resolver_fake_init(void) {
void grpc_resolver_fake_init(void) {
grpc_register_resolver_type(&fake_resolver_factory);
}
extern "C" void grpc_resolver_fake_shutdown(void) {}
void grpc_resolver_fake_shutdown(void) {}

@ -21,9 +21,7 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/channel/channel_args.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \
"grpc.fake_resolver.response_generator"
@ -60,9 +58,7 @@ grpc_fake_resolver_response_generator_ref(
void grpc_fake_resolver_response_generator_unref(
grpc_fake_resolver_response_generator* generator);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FAKE_FAKE_RESOLVER_H \
*/

@ -211,7 +211,7 @@ DECL_FACTORY(unix);
DECL_FACTORY(ipv4);
DECL_FACTORY(ipv6);
extern "C" void grpc_resolver_sockaddr_init(void) {
void grpc_resolver_sockaddr_init(void) {
grpc_register_resolver_type(&ipv4_resolver_factory);
grpc_register_resolver_type(&ipv6_resolver_factory);
#ifdef GRPC_HAVE_UNIX_SOCKET
@ -219,4 +219,4 @@ extern "C" void grpc_resolver_sockaddr_init(void) {
#endif
}
extern "C" void grpc_resolver_sockaddr_shutdown(void) {}
void grpc_resolver_sockaddr_shutdown(void) {}

@ -24,9 +24,7 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/iomgr/pollset_set.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_resolver_factory grpc_resolver_factory;
typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable;
@ -71,8 +69,6 @@ grpc_resolver* grpc_resolver_factory_create_resolver(
char* grpc_resolver_factory_get_default_authority(
grpc_resolver_factory* factory, grpc_uri* uri);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */

@ -22,9 +22,7 @@
#include "src/core/ext/filters/client_channel/resolver_factory.h"
#include "src/core/lib/iomgr/pollset_set.h"
#ifdef __cplusplus
extern "C" {
#endif
void grpc_resolver_registry_init();
void grpc_resolver_registry_shutdown(void);
@ -70,8 +68,6 @@ char* grpc_get_default_authority(grpc_exec_ctx* exec_ctx, const char* target);
char* grpc_resolver_factory_add_default_prefix_if_needed(
grpc_exec_ctx* exec_ctx, const char* target);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */

@ -21,9 +21,7 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/// Tracks retry throttling data for an individual server name.
typedef struct grpc_server_retry_throttle_data grpc_server_retry_throttle_data;
@ -51,8 +49,6 @@ void grpc_retry_throttle_map_shutdown();
grpc_server_retry_throttle_data* grpc_retry_throttle_map_get_data_for_server(
const char* server_name, int max_milli_tokens, int milli_token_ratio);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */

@ -26,9 +26,7 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/metadata.h"
#ifdef __cplusplus
extern "C" {
#endif
// Channel arg containing a grpc_resolved_address to connect to.
#define GRPC_ARG_SUBCHANNEL_ADDRESS "grpc.subchannel_address"
@ -192,8 +190,6 @@ const char* grpc_get_subchannel_address_uri_arg(const grpc_channel_args* args);
/// Caller is responsible for freeing the string.
grpc_arg grpc_create_subchannel_address_arg(const grpc_resolved_address* addr);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_H */

@ -21,9 +21,7 @@
#include "src/core/ext/filters/client_channel/subchannel.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \file Provides an index of active subchannels so that they can be
shared amongst channels */
@ -82,8 +80,6 @@ void grpc_subchannel_index_unref(void);
* force_creation set. */
void grpc_subchannel_index_test_only_set_force_creation(bool force_creation);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */

@ -22,9 +22,7 @@
#include <stddef.h>
#include "src/core/lib/iomgr/exec_ctx.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
char* scheme;
@ -51,8 +49,6 @@ const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key);
/** destroy a uri */
void grpc_uri_destroy(grpc_uri* uri);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */

@ -382,7 +382,7 @@ static bool maybe_add_deadline_filter(grpc_exec_ctx* exec_ctx,
: true;
}
extern "C" void grpc_deadline_filter_init(void) {
void grpc_deadline_filter_init(void) {
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_deadline_filter, (void*)&grpc_client_deadline_filter);
@ -391,4 +391,4 @@ extern "C" void grpc_deadline_filter_init(void) {
maybe_add_deadline_filter, (void*)&grpc_server_deadline_filter);
}
extern "C" void grpc_deadline_filter_shutdown(void) {}
void grpc_deadline_filter_shutdown(void) {}

@ -20,9 +20,7 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/timer.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum grpc_deadline_timer_state {
GRPC_DEADLINE_STATE_INITIAL,
@ -94,8 +92,6 @@ bool grpc_deadline_checking_enabled(const grpc_channel_args* args);
extern const grpc_channel_filter grpc_client_deadline_filter;
extern const grpc_channel_filter grpc_server_deadline_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */

@ -20,9 +20,7 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Processes metadata on the client side for HTTP2 transports */
extern const grpc_channel_filter grpc_http_client_filter;
@ -30,8 +28,6 @@ extern const grpc_channel_filter grpc_http_client_filter;
/* Channel arg to determine maximum size of payload eligable for GET request */
#define GRPC_ARG_MAX_PAYLOAD_SIZE_FOR_GET "grpc.max_payload_size_for_get"
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_CLIENT_HTTP_CLIENT_FILTER_H */

@ -64,7 +64,7 @@ static bool maybe_add_required_filter(grpc_exec_ctx* exec_ctx,
: true;
}
extern "C" void grpc_http_filters_init(void) {
void grpc_http_filters_init(void) {
grpc_register_tracer(&grpc_compression_trace);
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
@ -86,4 +86,4 @@ extern "C" void grpc_http_filters_init(void) {
maybe_add_required_filter, (void*)&grpc_http_server_filter);
}
extern "C" void grpc_http_filters_shutdown(void) {}
void grpc_http_filters_shutdown(void) {}

@ -23,9 +23,7 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Compression filter for outgoing data.
*
@ -51,9 +49,7 @@ extern "C" {
extern const grpc_channel_filter grpc_message_compress_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H \
*/

@ -21,15 +21,11 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Processes metadata on the client side for HTTP2 transports */
extern const grpc_channel_filter grpc_http_server_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_SERVER_HTTP_SERVER_FILTER_H */

@ -22,15 +22,11 @@
#include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_server_load_reporting_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_FILTER_H \
*/

@ -61,10 +61,10 @@ grpc_arg grpc_load_reporting_enable_arg() {
/* Plugin registration */
extern "C" void grpc_server_load_reporting_plugin_init(void) {
void grpc_server_load_reporting_plugin_init(void) {
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_server_load_reporting_filter,
(void*)&grpc_server_load_reporting_filter);
}
extern "C" void grpc_server_load_reporting_plugin_shutdown() {}
void grpc_server_load_reporting_plugin_shutdown() {}

@ -23,9 +23,7 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Identifiers for the invocation point of the users LR callback */
typedef enum grpc_load_reporting_source {
@ -59,9 +57,7 @@ typedef struct grpc_load_reporting_call_data {
/** Return a \a grpc_arg enabling load reporting */
grpc_arg grpc_load_reporting_enable_arg();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_PLUGIN_H \
*/

@ -404,10 +404,10 @@ static bool maybe_add_max_age_filter(grpc_exec_ctx* exec_ctx,
}
}
extern "C" void grpc_max_age_filter_init(void) {
void grpc_max_age_filter_init(void) {
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_max_age_filter, nullptr);
}
extern "C" void grpc_max_age_filter_shutdown(void) {}
void grpc_max_age_filter_shutdown(void) {}

@ -19,14 +19,10 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_max_age_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_MAX_AGE_MAX_AGE_FILTER_H */

@ -310,7 +310,7 @@ static bool maybe_add_message_size_filter(grpc_exec_ctx* exec_ctx,
}
}
extern "C" void grpc_message_size_filter_init(void) {
void grpc_message_size_filter_init(void) {
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_message_size_filter, nullptr);
@ -322,4 +322,4 @@ extern "C" void grpc_message_size_filter_init(void) {
maybe_add_message_size_filter, nullptr);
}
extern "C" void grpc_message_size_filter_shutdown(void) {}
void grpc_message_size_filter_shutdown(void) {}

@ -19,14 +19,10 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_message_size_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H */

@ -196,7 +196,7 @@ static bool register_workaround_cronet_compression(
builder, &grpc_workaround_cronet_compression_filter, nullptr, nullptr);
}
extern "C" void grpc_workaround_cronet_compression_filter_init(void) {
void grpc_workaround_cronet_compression_filter_init(void) {
grpc_channel_init_register_stage(
GRPC_SERVER_CHANNEL, GRPC_WORKAROUND_PRIORITY_HIGH,
register_workaround_cronet_compression, nullptr);
@ -204,4 +204,4 @@ extern "C" void grpc_workaround_cronet_compression_filter_init(void) {
parse_user_agent);
}
extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void) {}
void grpc_workaround_cronet_compression_filter_shutdown(void) {}

@ -19,15 +19,11 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_workaround_cronet_compression_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H \
*/

@ -24,9 +24,7 @@
#define GRPC_WORKAROUND_PRIORITY_HIGH 10001
#define GRPC_WORKAROUND_PROIRITY_LOW 9999
#ifdef __cplusplus
extern "C" {
#endif
typedef struct grpc_workaround_user_agent_md {
bool workaround_active[GRPC_MAX_WORKAROUND_ID];
@ -38,8 +36,6 @@ typedef bool (*user_agent_parser)(grpc_mdelem);
void grpc_register_workaround(uint32_t id, user_agent_parser parser);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */

@ -21,9 +21,7 @@
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Retuns 1 if the version is supported, 0 otherwise. */
int grpc_chttp2_is_alpn_version_supported(const char* version, size_t size);
@ -35,8 +33,6 @@ size_t grpc_chttp2_num_alpn_versions(void);
* grpc_chttp2_num_alpn_versions()) */
const char* grpc_chttp2_get_alpn_version_index(size_t i);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H */

@ -19,16 +19,12 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H
#ifdef __cplusplus
extern "C" {
#endif
#include "src/core/ext/filters/client_channel/connector.h"
grpc_connector* grpc_chttp2_connector_create();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */

@ -23,9 +23,7 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#ifdef __cplusplus
extern "C" {
#endif
/// Adds a port to \a server. Sets \a port_num to the port number.
/// Takes ownership of \a args.
@ -33,8 +31,6 @@ grpc_error* grpc_chttp2_server_add_port(grpc_exec_ctx* exec_ctx,
grpc_server* server, const char* addr,
grpc_channel_args* args, int* port_num);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */

@ -22,9 +22,7 @@
#include <grpc/slice.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
struct grpc_base64_decode_context {
/* input/output: */
@ -53,8 +51,6 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
grpc_slice input,
size_t output_length);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */

@ -21,9 +21,7 @@
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/* base64 encode a slice. Returns a new slice, does not take ownership of the
input */
@ -40,8 +38,6 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input);
return y; */
grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(grpc_slice input);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */

@ -20,7 +20,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/metadata.h"
extern "C" void grpc_chttp2_plugin_init(void) {
void grpc_chttp2_plugin_init(void) {
grpc_register_tracer(&grpc_http_trace);
grpc_register_tracer(&grpc_flowctl_trace);
grpc_register_tracer(&grpc_trace_http2_stream_state);
@ -29,4 +29,4 @@ extern "C" void grpc_chttp2_plugin_init(void) {
#endif
}
extern "C" void grpc_chttp2_plugin_shutdown(void) {}
void grpc_chttp2_plugin_shutdown(void) {}

@ -23,9 +23,7 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/transport/transport.h"
#ifdef __cplusplus
extern "C" {
#endif
extern grpc_tracer_flag grpc_http_trace;
extern grpc_tracer_flag grpc_flowctl_trace;
@ -45,8 +43,6 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx* exec_ctx,
grpc_transport* transport,
grpc_slice_buffer* read_buffer);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */

@ -30,7 +30,7 @@
struct grpc_chttp2_transport;
struct grpc_chttp2_stream;
extern "C" grpc_tracer_flag grpc_flowctl_trace;
extern grpc_tracer_flag grpc_flowctl_trace;
namespace grpc {
namespace testing {

@ -24,9 +24,7 @@
#include "src/core/lib/iomgr/error.h"
#ifdef __cplusplus
extern "C" {
#endif
/* defined in internal.h */
typedef struct grpc_chttp2_stream grpc_chttp2_stream;
@ -47,8 +45,6 @@ typedef struct grpc_chttp2_transport grpc_chttp2_transport;
#define GRPC_CHTTP2_DATA_FLAG_PADDED 8
#define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H */

@ -28,9 +28,7 @@
#include "src/core/lib/transport/byte_stream.h"
#include "src/core/lib/transport/transport.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_CHTTP2_DATA_FH_0,
@ -84,8 +82,6 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
grpc_slice_buffer* slices, grpc_slice* slice_out,
grpc_byte_stream** stream_out);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */

@ -25,9 +25,7 @@
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_CHTTP2_GOAWAY_LSI0,
@ -64,8 +62,6 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code,
grpc_slice debug_data,
grpc_slice_buffer* slice_buffer);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */

@ -23,9 +23,7 @@
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint8_t byte;
@ -45,8 +43,6 @@ grpc_error* grpc_chttp2_ping_parser_parse(grpc_exec_ctx* exec_ctx, void* parser,
/* Test-only function for disabling ping ack */
void grpc_set_disable_ping_ack(bool disable_ping_ack);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */

@ -24,9 +24,7 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/transport.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint8_t byte;
@ -44,8 +42,6 @@ grpc_error* grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx* exec_ctx,
grpc_chttp2_stream* s,
grpc_slice slice, int is_last);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save