Re 89 the public headers

pull/13432/head
ncteisen 7 years ago
parent adbfbd5977
commit 01a7547a3f
  1. 8
      include/grpc/census.h
  2. 8
      include/grpc/compression.h
  3. 8
      include/grpc/grpc.h
  4. 8
      include/grpc/grpc_cronet.h
  5. 8
      include/grpc/grpc_posix.h
  6. 8
      include/grpc/grpc_security.h
  7. 8
      include/grpc/grpc_security_constants.h
  8. 8
      include/grpc/impl/codegen/atm.h
  9. 8
      include/grpc/impl/codegen/atm_gcc_atomic.h
  10. 8
      include/grpc/impl/codegen/byte_buffer.h
  11. 8
      include/grpc/impl/codegen/byte_buffer_reader.h
  12. 8
      include/grpc/impl/codegen/compression_types.h
  13. 8
      include/grpc/impl/codegen/connectivity_state.h
  14. 8
      include/grpc/impl/codegen/gpr_types.h
  15. 8
      include/grpc/impl/codegen/grpc_types.h
  16. 8
      include/grpc/impl/codegen/propagation_bits.h
  17. 8
      include/grpc/impl/codegen/status.h
  18. 8
      include/grpc/impl/codegen/sync.h
  19. 8
      include/grpc/load_reporting.h
  20. 8
      include/grpc/slice.h
  21. 8
      include/grpc/slice_buffer.h
  22. 8
      include/grpc/support/alloc.h
  23. 8
      include/grpc/support/avl.h
  24. 8
      include/grpc/support/cmdline.h
  25. 8
      include/grpc/support/cpu.h
  26. 8
      include/grpc/support/histogram.h
  27. 8
      include/grpc/support/host_port.h
  28. 8
      include/grpc/support/log.h
  29. 8
      include/grpc/support/log_windows.h
  30. 8
      include/grpc/support/string_util.h
  31. 8
      include/grpc/support/subprocess.h
  32. 8
      include/grpc/support/sync.h
  33. 8
      include/grpc/support/thd.h
  34. 8
      include/grpc/support/time.h
  35. 8
      include/grpc/support/tls_pthread.h

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

@ -26,7 +26,9 @@
#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. */
@ -83,6 +85,8 @@ 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,7 +29,9 @@
#include <grpc/support/time.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/*! \mainpage GRPC Core
*
@ -464,6 +466,8 @@ 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,12 +21,16 @@
#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,7 +24,9 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/*! \mainpage GRPC Core POSIX
*
@ -57,6 +59,8 @@ 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,7 +23,9 @@
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>
#ifdef __cplusplus
extern "C" {
#endif
/** --- Authentication Context. --- */
@ -459,6 +461,8 @@ 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,7 +19,9 @@
#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"
@ -97,6 +99,8 @@ 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,13 +79,17 @@
#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,7 +23,9 @@
__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
@ -82,6 +84,8 @@ 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,7 +21,9 @@
#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).
*
@ -77,6 +79,8 @@ 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,7 +19,9 @@
#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;
@ -33,6 +35,8 @@ struct grpc_byte_buffer_reader {
} current;
};
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H */

@ -21,7 +21,9 @@
#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 */
@ -155,6 +157,8 @@ typedef struct grpc_compression_options {
} grpc_compression_options;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H */

@ -19,7 +19,9 @@
#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 {
@ -35,6 +37,8 @@ typedef enum {
GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H */

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

@ -29,7 +29,9 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_BB_RAW
@ -626,6 +628,8 @@ 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,7 +21,9 @@
#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 */
@ -43,6 +45,8 @@
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,7 +19,9 @@
#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 */
@ -144,6 +146,8 @@ typedef enum {
GRPC_STATUS__DO_NOT_USE = -1
} grpc_status_code;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_STATUS_H */

@ -37,7 +37,9 @@
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>
@ -53,6 +55,8 @@
#error Unable to determine platform for sync
#endif
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_SYNC_H */

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

@ -22,7 +22,9 @@
#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. */
@ -161,6 +163,8 @@ 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,7 +21,9 @@
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/** initialize a slice buffer */
GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer* sb);
@ -74,6 +76,8 @@ 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,7 +23,9 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_allocation_functions {
void* (*malloc_fn)(size_t size);
@ -58,6 +60,8 @@ 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,7 +21,9 @@
#include <grpc/support/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** internal node of an AVL tree */
typedef struct gpr_avl_node {
@ -93,6 +95,8 @@ 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,7 +21,9 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Simple command line parser.
@ -79,6 +81,8 @@ 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,7 +21,9 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Interface providing CPU information for currently running system */
@ -35,6 +37,8 @@ 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,7 +22,9 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_histogram gpr_histogram;
@ -55,6 +57,8 @@ 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,7 +21,9 @@
#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
@ -42,6 +44,8 @@ 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,7 +25,9 @@
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** GPR log API.
@ -94,6 +96,8 @@ GPRAPI void gpr_set_log_function(gpr_log_func func);
} \
} while (0)
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_LOG_H */

@ -21,7 +21,9 @@
#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.
@ -29,6 +31,8 @@
*/
GPRAPI char* gpr_format_message(int messageid);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_LOG_WINDOWS_H */

@ -21,7 +21,9 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** String utility functions */
@ -40,6 +42,8 @@ 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,7 +21,9 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_subprocess gpr_subprocess;
@ -35,6 +37,8 @@ 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,7 +22,9 @@
#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** --- Mutex interface ---
@ -271,6 +273,9 @@ GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter* c);
}
#endif /* 0 */
#ifdef __cplusplus
} // extern "C"
namespace grpc_core {
class mu_guard {
@ -286,5 +291,6 @@ class mu_guard {
};
} // namespace grpc_core
#endif
#endif /* GRPC_SUPPORT_SYNC_H */

@ -29,7 +29,9 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uintptr_t gpr_thd_id;
@ -67,6 +69,8 @@ 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,7 +24,9 @@
#include <stddef.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Time constants. */
GPRAPI gpr_timespec
@ -81,6 +83,8 @@ 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,8 +34,12 @@ 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 */

Loading…
Cancel
Save