From a7e6d65a4864422854117149a6e98ff80e492fa9 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 20 Sep 2017 18:56:37 -0700 Subject: Changes for C to C++. Adding extern C to header files for compatibility. --- src/core/ext/filters/client_channel/client_channel.h | 10 +++++++++- src/core/ext/filters/client_channel/client_channel_factory.h | 10 +++++++++- src/core/ext/filters/client_channel/connector.h | 10 +++++++++- src/core/ext/filters/client_channel/http_connect_handshaker.h | 10 +++++++++- src/core/ext/filters/client_channel/http_proxy.h | 10 +++++++++- src/core/ext/filters/client_channel/lb_policy.h | 8 ++++++++ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h | 10 +++++++++- .../filters/client_channel/lb_policy/grpclb/grpclb_channel.h | 8 ++++++++ .../client_channel/lb_policy/grpclb/grpclb_client_stats.h | 8 ++++++++ src/core/ext/filters/client_channel/lb_policy_factory.h | 10 +++++++++- src/core/ext/filters/client_channel/lb_policy_registry.h | 10 +++++++++- src/core/ext/filters/client_channel/parse_address.h | 10 +++++++++- src/core/ext/filters/client_channel/proxy_mapper.h | 10 +++++++++- src/core/ext/filters/client_channel/proxy_mapper_registry.h | 10 +++++++++- src/core/ext/filters/client_channel/resolver.h | 8 ++++++++ .../client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h | 8 ++++++++ .../client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h | 8 ++++++++ .../ext/filters/client_channel/resolver/fake/fake_resolver.h | 8 ++++++++ src/core/ext/filters/client_channel/resolver_factory.h | 10 +++++++++- src/core/ext/filters/client_channel/resolver_registry.h | 10 +++++++++- src/core/ext/filters/client_channel/retry_throttle.h | 10 +++++++++- src/core/ext/filters/client_channel/subchannel.h | 8 ++++++++ src/core/ext/filters/client_channel/subchannel_index.h | 10 +++++++++- src/core/ext/filters/client_channel/uri_parser.h | 10 +++++++++- src/core/ext/filters/deadline/deadline_filter.h | 10 +++++++++- .../ext/filters/load_reporting/server_load_reporting_plugin.h | 8 ++++++++ src/core/ext/filters/workarounds/workaround_utils.h | 10 +++++++++- 27 files changed, 234 insertions(+), 18 deletions(-) (limited to 'src/core/ext/filters') diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h index c99f0092e9..b32f378c6c 100644 --- a/src/core/ext/filters/client_channel/client_channel.h +++ b/src/core/ext/filters/client_channel/client_channel.h @@ -28,6 +28,10 @@ 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 connected to again later. @@ -52,4 +56,8 @@ void grpc_client_channel_watch_connectivity_state( grpc_subchannel_call *grpc_client_channel_get_subchannel_call( grpc_call_element *elem); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/client_channel_factory.h b/src/core/ext/filters/client_channel/client_channel_factory.h index ce6266c769..bad8b97042 100644 --- a/src/core/ext/filters/client_channel/client_channel_factory.h +++ b/src/core/ext/filters/client_channel/client_channel_factory.h @@ -27,6 +27,10 @@ // 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 grpc_client_channel_factory_vtable; @@ -74,4 +78,8 @@ grpc_channel *grpc_client_channel_factory_create_channel( grpc_arg grpc_client_channel_factory_create_channel_arg( grpc_client_channel_factory *factory); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/connector.h b/src/core/ext/filters/client_channel/connector.h index 7f3d4a1cc0..79ccb0d9bf 100644 --- a/src/core/ext/filters/client_channel/connector.h +++ b/src/core/ext/filters/client_channel/connector.h @@ -23,6 +23,10 @@ #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; @@ -70,4 +74,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.h b/src/core/ext/filters/client_channel/http_connect_handshaker.h index 928a23dc93..5042c61bec 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.h +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.h @@ -28,7 +28,15 @@ /// 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(); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/http_proxy.h b/src/core/ext/filters/client_channel/http_proxy.h index 34694931d0..65d52334af 100644 --- a/src/core/ext/filters/client_channel/http_proxy.h +++ b/src/core/ext/filters/client_channel/http_proxy.h @@ -19,6 +19,14 @@ #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(); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 645d51e138..010299c2f4 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -23,6 +23,10 @@ #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) */ typedef struct grpc_lb_policy grpc_lb_policy; @@ -204,4 +208,8 @@ 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 */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h index 63ad66c5e9..c67df609fc 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h @@ -21,9 +21,17 @@ #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(); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h index 6120bf53f7..e8599d1f51 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h @@ -23,6 +23,10 @@ #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*. * @@ -40,5 +44,9 @@ 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 \ */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h index c51e2a431a..b38c076f38 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h @@ -23,6 +23,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct grpc_grpclb_client_stats grpc_grpclb_client_stats; typedef struct { @@ -61,5 +65,9 @@ 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 \ */ diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index cf0f8cb615..69bcba4232 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -29,6 +29,10 @@ // 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; @@ -130,4 +134,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h index f5995687cf..0867844c37 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.h +++ b/src/core/ext/filters/client_channel/lb_policy_registry.h @@ -22,6 +22,10 @@ #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 */ void grpc_lb_policy_registry_init(void); @@ -37,4 +41,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h index c90a827da5..742df380b7 100644 --- a/src/core/ext/filters/client_channel/parse_address.h +++ b/src/core/ext/filters/client_channel/parse_address.h @@ -24,6 +24,10 @@ #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. */ bool grpc_parse_unix(const grpc_uri *uri, grpc_resolved_address *resolved_addr); @@ -45,4 +49,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/proxy_mapper.h b/src/core/ext/filters/client_channel/proxy_mapper.h index a13861ccaf..1325a9f1f6 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper.h +++ b/src/core/ext/filters/client_channel/proxy_mapper.h @@ -25,6 +25,10 @@ #include "src/core/lib/iomgr/resolve_address.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct grpc_proxy_mapper grpc_proxy_mapper; typedef struct { @@ -71,4 +75,8 @@ bool grpc_proxy_mapper_map_address(grpc_exec_ctx* exec_ctx, void grpc_proxy_mapper_destroy(grpc_proxy_mapper* mapper); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.h b/src/core/ext/filters/client_channel/proxy_mapper_registry.h index 99e54d1a78..2d389f1c21 100644 --- a/src/core/ext/filters/client_channel/proxy_mapper_registry.h +++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.h @@ -21,6 +21,10 @@ #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(); @@ -41,4 +45,8 @@ bool grpc_proxy_mappers_map_address(grpc_exec_ctx* exec_ctx, grpc_resolved_address** new_address, grpc_channel_args** new_args); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/resolver.h b/src/core/ext/filters/client_channel/resolver.h index ae9c8f66fe..73fbbbbc3b 100644 --- a/src/core/ext/filters/client_channel/resolver.h +++ b/src/core/ext/filters/client_channel/resolver.h @@ -22,6 +22,10 @@ #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; @@ -87,4 +91,8 @@ 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 */ diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h index 386012d2ed..3d4309f2fa 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -22,6 +22,10 @@ #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; /* Start \a ev_driver. It will keep working until all IO on its ares_channel is @@ -49,5 +53,9 @@ 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 \ */ diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 108333047d..38fbea9aac 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -25,6 +25,10 @@ #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; /* Asynchronously resolve \a name. Use \a default_port if a port isn't @@ -65,5 +69,9 @@ 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 \ */ diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h index c084ef2a58..005f5f9417 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h @@ -24,6 +24,10 @@ #define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \ "grpc.fake_resolver.response_generator" +#ifdef __cplusplus +extern "C" { +#endif + void grpc_resolver_fake_init(); // Instances of \a grpc_fake_resolver_response_generator are passed to the @@ -56,5 +60,9 @@ 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 \ */ diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h index 6bd7929d4e..6e533e3248 100644 --- a/src/core/ext/filters/client_channel/resolver_factory.h +++ b/src/core/ext/filters/client_channel/resolver_factory.h @@ -24,6 +24,10 @@ #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; @@ -67,4 +71,8 @@ grpc_resolver *grpc_resolver_factory_create_resolver( char *grpc_resolver_factory_get_default_authority( grpc_resolver_factory *factory, grpc_uri *uri); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/ext/filters/client_channel/resolver_registry.h index 692490543d..eb08d887b1 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.h +++ b/src/core/ext/filters/client_channel/resolver_registry.h @@ -22,6 +22,10 @@ #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); @@ -66,4 +70,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/retry_throttle.h b/src/core/ext/filters/client_channel/retry_throttle.h index bf99297e98..3b849475b9 100644 --- a/src/core/ext/filters/client_channel/retry_throttle.h +++ b/src/core/ext/filters/client_channel/retry_throttle.h @@ -21,6 +21,10 @@ #include +#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; @@ -47,4 +51,8 @@ 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); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/subchannel.h b/src/core/ext/filters/client_channel/subchannel.h index 51d712f6a7..c67ff97b0b 100644 --- a/src/core/ext/filters/client_channel/subchannel.h +++ b/src/core/ext/filters/client_channel/subchannel.h @@ -26,6 +26,10 @@ #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" @@ -188,4 +192,8 @@ 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 */ diff --git a/src/core/ext/filters/client_channel/subchannel_index.h b/src/core/ext/filters/client_channel/subchannel_index.h index 92e36d5283..09bac3592c 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.h +++ b/src/core/ext/filters/client_channel/subchannel_index.h @@ -21,6 +21,10 @@ #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 */ @@ -78,4 +82,8 @@ void grpc_subchannel_index_unref(void); * force_creation set. */ void grpc_subchannel_index_test_only_set_force_creation(bool force_creation); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */ \ No newline at end of file diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/ext/filters/client_channel/uri_parser.h index 05ca2e00e4..43e8ae64e0 100644 --- a/src/core/ext/filters/client_channel/uri_parser.h +++ b/src/core/ext/filters/client_channel/uri_parser.h @@ -22,6 +22,10 @@ #include #include "src/core/lib/iomgr/exec_ctx.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { char *scheme; char *authority; @@ -47,4 +51,8 @@ const char *grpc_uri_get_query_arg(const grpc_uri *uri, const char *key); /** destroy a uri */ void grpc_uri_destroy(grpc_uri *uri); -#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */ \ No newline at end of file diff --git a/src/core/ext/filters/deadline/deadline_filter.h b/src/core/ext/filters/deadline/deadline_filter.h index 3eb102ad28..f4a1110ee6 100644 --- a/src/core/ext/filters/deadline/deadline_filter.h +++ b/src/core/ext/filters/deadline/deadline_filter.h @@ -20,6 +20,10 @@ #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, GRPC_DEADLINE_STATE_PENDING, @@ -89,4 +93,8 @@ 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; -#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */ \ No newline at end of file diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h index 65a6d0900e..65e254eb53 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h +++ b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h @@ -23,6 +23,10 @@ #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 { GRPC_LR_POINT_UNKNOWN = 0, @@ -55,5 +59,9 @@ 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 \ */ diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h index 2ad7a876d5..afd5291333 100644 --- a/src/core/ext/filters/workarounds/workaround_utils.h +++ b/src/core/ext/filters/workarounds/workaround_utils.h @@ -24,6 +24,10 @@ #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]; } grpc_workaround_user_agent_md; @@ -34,4 +38,8 @@ typedef bool (*user_agent_parser)(grpc_mdelem); void grpc_register_workaround(uint32_t id, user_agent_parser parser); -#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */ +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */ \ No newline at end of file -- cgit v1.2.3