Merge github.com:grpc/grpc into filter-selection

pull/5304/head
Craig Tiller 9 years ago
commit 3448887c90
  1. 2
      CONTRIBUTING.md
  2. 6
      Makefile
  3. 9
      build.yaml
  4. 2
      examples/cpp/helloworld/README.md
  5. 5
      examples/node/package.json
  6. 4
      examples/ruby/route_guide/route_guide_client.rb
  7. 6
      include/grpc++/impl/codegen/completion_queue_tag.h
  8. 6
      include/grpc++/impl/codegen/impl/async_stream.h
  9. 6
      include/grpc++/impl/codegen/impl/status_code_enum.h
  10. 6
      include/grpc++/impl/codegen/impl/sync.h
  11. 8
      include/grpc++/impl/grpc_library.h
  12. 6
      include/grpc++/impl/proto_utils.h
  13. 6
      include/grpc++/security/auth_context.h
  14. 8
      include/grpc++/security/auth_metadata_processor.h
  15. 6
      include/grpc++/security/credentials.h
  16. 8
      include/grpc++/security/server_credentials.h
  17. 6
      include/grpc/census.h
  18. 6
      include/grpc/compression.h
  19. 1
      include/grpc/grpc_security.h
  20. 6
      include/grpc/impl/codegen/propagation_bits.h
  21. 6
      include/grpc/support/atm_gcc_atomic.h
  22. 2
      include/grpc/support/subprocess.h
  23. 4
      include/grpc/support/tls.h
  24. 48
      include/grpc/support/tls_gcc.h
  25. 8
      include/grpc/support/tls_msvc.h
  26. 4
      include/grpc/support/tls_pthread.h
  27. 7
      setup.py
  28. 8
      src/core/census/aggregation.h
  29. 8
      src/core/census/grpc_filter.h
  30. 6
      src/core/census/mlog.h
  31. 8
      src/core/census/rpc_metric_id.h
  32. 6
      src/core/channel/channel_args.h
  33. 8
      src/core/channel/channel_stack.h
  34. 8
      src/core/channel/client_channel.h
  35. 8
      src/core/channel/client_uchannel.h
  36. 8
      src/core/channel/compress_filter.h
  37. 6
      src/core/channel/connected_channel.h
  38. 8
      src/core/channel/context.h
  39. 8
      src/core/channel/http_client_filter.h
  40. 8
      src/core/channel/http_server_filter.h
  41. 8
      src/core/channel/subchannel_call_holder.h
  42. 8
      src/core/client_config/client_config.h
  43. 6
      src/core/client_config/connector.h
  44. 8
      src/core/client_config/initial_connect_string.h
  45. 6
      src/core/client_config/lb_policies/load_balancer_api.h
  46. 8
      src/core/client_config/lb_policies/pick_first.h
  47. 8
      src/core/client_config/lb_policies/round_robin.h
  48. 6
      src/core/client_config/lb_policy.h
  49. 8
      src/core/client_config/lb_policy_factory.h
  50. 8
      src/core/client_config/lb_policy_registry.h
  51. 8
      src/core/client_config/resolver.h
  52. 8
      src/core/client_config/resolver_factory.h
  53. 8
      src/core/client_config/resolver_registry.h
  54. 8
      src/core/client_config/resolvers/dns_resolver.h
  55. 8
      src/core/client_config/resolvers/sockaddr_resolver.h
  56. 8
      src/core/client_config/resolvers/zookeeper_resolver.h
  57. 6
      src/core/client_config/subchannel.h
  58. 8
      src/core/client_config/subchannel_factory.h
  59. 1
      src/core/client_config/subchannel_index.c
  60. 6
      src/core/client_config/subchannel_index.h
  61. 8
      src/core/client_config/uri_parser.h
  62. 8
      src/core/compression/algorithm_metadata.h
  63. 47
      src/core/compression/compression_algorithm.c
  64. 8
      src/core/compression/message_compress.h
  65. 8
      src/core/debug/trace.h
  66. 8
      src/core/httpcli/format_request.h
  67. 6
      src/core/httpcli/httpcli.h
  68. 8
      src/core/httpcli/parser.h
  69. 6
      src/core/iomgr/closure.h
  70. 8
      src/core/iomgr/endpoint.h
  71. 8
      src/core/iomgr/endpoint_pair.h
  72. 6
      src/core/iomgr/exec_ctx.h
  73. 6
      src/core/iomgr/executor.h
  74. 6
      src/core/iomgr/fd_posix.h
  75. 6
      src/core/iomgr/iocp_windows.h
  76. 8
      src/core/iomgr/iomgr.h
  77. 6
      src/core/iomgr/iomgr_internal.h
  78. 8
      src/core/iomgr/iomgr_posix.h
  79. 6
      src/core/iomgr/pollset.h
  80. 6
      src/core/iomgr/pollset_posix.h
  81. 6
      src/core/iomgr/pollset_set.h
  82. 6
      src/core/iomgr/pollset_set_posix.h
  83. 6
      src/core/iomgr/pollset_set_windows.h
  84. 6
      src/core/iomgr/pollset_windows.h
  85. 6
      src/core/iomgr/resolve_address.h
  86. 8
      src/core/iomgr/sockaddr.h
  87. 8
      src/core/iomgr/sockaddr_posix.h
  88. 8
      src/core/iomgr/sockaddr_utils.h
  89. 6
      src/core/iomgr/sockaddr_win32.h
  90. 8
      src/core/iomgr/socket_utils_posix.h
  91. 8
      src/core/iomgr/socket_windows.h
  92. 8
      src/core/iomgr/tcp_client.h
  93. 6
      src/core/iomgr/tcp_posix.h
  94. 6
      src/core/iomgr/tcp_server.h
  95. 8
      src/core/iomgr/tcp_windows.h
  96. 8
      src/core/iomgr/time_averaged_stats.h
  97. 6
      src/core/iomgr/timer.h
  98. 8
      src/core/iomgr/timer_heap.h
  99. 6
      src/core/iomgr/udp_server.h
  100. 8
      src/core/iomgr/wakeup_fd_pipe.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -59,7 +59,7 @@ Each language uses its own build system to work. Currently, the root's Makefile
and the Visual Studio project files are building only the C and C++ source code.
In order to ease the maintenance of these files, we have a
template system. Please do not contribute manual changes to any of the generated
files. Instead, modify the template files, or the build.json file, and
files. Instead, modify the template files, or the build.yaml file, and
re-generate the project files using the following command:
`./tools/buildgen/generate_projects.sh`

@ -1544,8 +1544,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 )
$(E) "[RUN] Testing lame_client_test"
$(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 )
$(E) "[RUN] Testing lb_policies_test"
$(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 )
$(E) "[RUN] Testing message_compress_test"
$(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 )
$(E) "[RUN] Testing mlog_test"
@ -1627,6 +1625,8 @@ test_c: buildtests_c
flaky_test_c: buildtests_c
$(E) "[RUN] Testing lb_policies_test"
$(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 )
test_cxx: test_zookeeper buildtests_cxx
@ -2691,6 +2691,7 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/util/grpc_profiler.c \
test/core/util/parse_hexstring.c \
test/core/util/port_posix.c \
test/core/util/port_server_client.c \
test/core/util/port_windows.c \
test/core/util/slice_splitter.c \
@ -2737,6 +2738,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
test/core/util/grpc_profiler.c \
test/core/util/parse_hexstring.c \
test/core/util/port_posix.c \
test/core/util/port_server_client.c \
test/core/util/port_windows.c \
test/core/util/slice_splitter.c \

@ -555,6 +555,7 @@ filegroups:
- test/core/util/grpc_profiler.h
- test/core/util/parse_hexstring.h
- test/core/util/port.h
- test/core/util/port_server_client.h
- test/core/util/slice_splitter.h
src:
- test/core/end2end/cq_verifier.c
@ -563,6 +564,7 @@ filegroups:
- test/core/util/grpc_profiler.c
- test/core/util/parse_hexstring.c
- test/core/util/port_posix.c
- test/core/util/port_server_client.c
- test/core/util/port_windows.c
- test/core/util/slice_splitter.c
- name: nanopb
@ -1679,6 +1681,7 @@ targets:
- gpr
- name: lb_policies_test
cpu_cost: 0.1
flaky: true
build: test
language: c
src:
@ -2468,6 +2471,8 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
exclude_configs:
- tsan
platforms:
- mac
- linux
@ -2487,6 +2492,8 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
exclude_configs:
- tsan
platforms:
- mac
- linux
@ -2943,7 +2950,7 @@ node_modules:
- src/node/ext/server_credentials.cc
- src/node/ext/timeval.cc
openssl_fallback:
base_uri: http://openssl.org/source/
base_uri: https://openssl.org/source/old/1.0.2/
extraction_dir: openssl-1.0.2f
tarball: openssl-1.0.2f.tar.gz
php_config_m4:

@ -207,7 +207,7 @@ completion queue to return the tag. The basic flow is
helloworld::Greeter::AsyncService service;
ServerBuilder builder;
builder.AddListeningPort("0.0.0.0:50051", InsecureServerCredentials());
builder.RegisterAsyncService(&service);
builder.RegisterService(&service);
auto cq = builder.AddCompletionQueue();
auto server = builder.BuildAndStart();
```

@ -2,6 +2,9 @@
"name": "grpc-examples",
"version": "0.1.0",
"dependencies": {
"grpc": "0.13.0"
"async": "^1.5.2",
"grpc": "0.13.0",
"lodash": "^4.6.1",
"minimist": "^1.2.0"
}
}

@ -38,6 +38,7 @@ lib_dir = File.join(File.dirname(this_dir), 'lib')
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
require 'grpc'
require 'multi_json'
require 'route_guide_services'
include Routeguide
@ -115,9 +116,8 @@ def run_record_route(stub, features)
p 'RecordRoute'
p '-----------'
points_on_route = 10 # arbitrary
deadline = points_on_route # as delay b/w each is max 1 second
reqs = RandomRoute.new(features, points_on_route)
resp = stub.record_route(reqs.each, deadline)
resp = stub.record_route(reqs.each)
p "summary: #{resp.inspect}"
end

@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_COMPLETION_QUEUE_TAG_H
#define GRPCXX_COMPLETION_QUEUE_TAG_H
#ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H
#define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H
namespace grpc {
@ -49,4 +49,4 @@ class CompletionQueueTag {
} // namespace grpc
#endif // GRPCXX_COMPLETION_QUEUE_TAG_H
#endif // GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H

@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H
#define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H
#ifndef GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H
#define GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H
#include <grpc++/impl/codegen/call.h>
#include <grpc++/impl/codegen/channel_interface.h>
@ -460,4 +460,4 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface,
} // namespace grpc
#endif // GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H
#endif // GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H

@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H
#define GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H
#ifndef GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H
#define GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H
namespace grpc {
@ -149,4 +149,4 @@ enum StatusCode {
} // namespace grpc
#endif // GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H
#endif // GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H

@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_IMPL_CODEGEN_SYNC_H
#define GRPCXX_IMPL_CODEGEN_SYNC_H
#ifndef GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
#define GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
#include <grpc++/impl/codegen/config.h>
@ -42,4 +42,4 @@
#include <grpc++/impl/codegen/sync_cxx11.h>
#endif
#endif // GRPCXX_IMPL_CODEGEN_SYNC_H
#endif // GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H

@ -58,8 +58,12 @@ static CoreCodegen g_core_codegen;
class GrpcLibraryInitializer GRPC_FINAL {
public:
GrpcLibraryInitializer() {
grpc::g_glip = &g_gli;
grpc::g_core_codegen_interface = &g_core_codegen;
if (grpc::g_glip == nullptr) {
grpc::g_glip = &g_gli;
}
if (grpc::g_core_codegen_interface == nullptr) {
grpc::g_core_codegen_interface = &g_core_codegen;
}
}
/// A no-op method to force the linker to reference this class, which will

@ -31,9 +31,9 @@
*
*/
#ifndef GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H
#define GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H
#ifndef GRPCXX_IMPL_PROTO_UTILS_H
#define GRPCXX_IMPL_PROTO_UTILS_H
#include <grpc++/impl/codegen/proto_utils.h>
#endif // GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H
#endif // GRPCXX_IMPL_PROTO_UTILS_H

@ -31,9 +31,9 @@
*
*/
#ifndef GRPCXX_SUPPORT_AUTH_CONTEXT_H
#define GRPCXX_SUPPORT_AUTH_CONTEXT_H
#ifndef GRPCXX_SECURITY_AUTH_CONTEXT_H
#define GRPCXX_SECURITY_AUTH_CONTEXT_H
#include <grpc++/impl/codegen/security/auth_context.h>
#endif // GRPCXX_SUPPORT_AUTH_CONTEXT_H
#endif // GRPCXX_SECURITY_AUTH_CONTEXT_H

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_AUTH_METADATA_PROCESSOR_H_
#define GRPCXX_AUTH_METADATA_PROCESSOR_H_
#ifndef GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H
#define GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H
#include <map>
@ -70,4 +70,4 @@ class AuthMetadataProcessor {
} // namespace grpc
#endif // GRPCXX_AUTH_METADATA_PROCESSOR_H_
#endif // GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H

@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_CREDENTIALS_H
#define GRPCXX_CREDENTIALS_H
#ifndef GRPCXX_SECURITY_CREDENTIALS_H
#define GRPCXX_SECURITY_CREDENTIALS_H
#include <map>
#include <memory>
@ -229,4 +229,4 @@ std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
} // namespace grpc
#endif // GRPCXX_CREDENTIALS_H
#endif // GRPCXX_SECURITY_CREDENTIALS_H

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPCXX_SERVER_CREDENTIALS_H
#define GRPCXX_SERVER_CREDENTIALS_H
#ifndef GRPCXX_SECURITY_SERVER_CREDENTIALS_H
#define GRPCXX_SECURITY_SERVER_CREDENTIALS_H
#include <memory>
#include <vector>
@ -89,4 +89,4 @@ std::shared_ptr<ServerCredentials> InsecureServerCredentials();
} // namespace grpc
#endif // GRPCXX_SERVER_CREDENTIALS_H
#endif // GRPCXX_SECURITY_SERVER_CREDENTIALS_H

@ -35,8 +35,8 @@
* they can (ultimately) be used in many different RPC systems (with differing
* implementations). */
#ifndef CENSUS_CENSUS_H
#define CENSUS_CENSUS_H
#ifndef GRPC_CENSUS_H
#define GRPC_CENSUS_H
#include <grpc/grpc.h>
@ -537,4 +537,4 @@ CENSUSAPI void census_view_reset(census_view *view);
}
#endif
#endif /* CENSUS_CENSUS_H */
#endif /* GRPC_CENSUS_H */

@ -55,11 +55,13 @@ GRPCAPI int grpc_compression_algorithm_parse(
GRPCAPI int grpc_compression_algorithm_name(
grpc_compression_algorithm algorithm, char **name);
/** Returns the compression algorithm corresponding to \a level.
/** Returns the compression algorithm corresponding to \a level for the
* compression algorithms encoded in the \a accepted_encodings bitset.
*
* It abort()s for unknown levels . */
GRPCAPI grpc_compression_algorithm
grpc_compression_algorithm_for_level(grpc_compression_level level);
grpc_compression_algorithm_for_level(grpc_compression_level level,
uint32_t accepted_encodings);
GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts);

@ -48,6 +48,7 @@ extern "C" {
#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name"
#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name"
#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert"
typedef struct grpc_auth_context grpc_auth_context;

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_IMPL_CODEGEN_H
#define GRPC_IMPL_CODEGEN_H
#ifndef GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H
#define GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H
#include <grpc/impl/codegen/port_platform.h>
@ -64,4 +64,4 @@ extern "C" {
}
#endif
#endif /* GRPC_IMPL_CODEGEN_H */
#endif /* GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H */

@ -31,9 +31,9 @@
*
*/
#ifndef GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H
#define GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H
#ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H
#define GRPC_SUPPORT_ATM_GCC_ATOMIC_H
#include <grpc/impl/codegen/atm_gcc_atomic.h>
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */
#endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */

@ -56,4 +56,4 @@ GPRAPI void gpr_subprocess_interrupt(gpr_subprocess *p);
} // extern "C"
#endif
#endif
#endif /* GRPC_SUPPORT_SUBPROCESS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -74,4 +74,4 @@
#include <grpc/support/tls_pthread.h>
#endif
#endif
#endif /* GRPC_SUPPORT_TLS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -34,9 +34,51 @@
#ifndef GRPC_SUPPORT_TLS_GCC_H
#define GRPC_SUPPORT_TLS_GCC_H
#include <stdbool.h>
#include <grpc/support/log.h>
/* Thread local storage based on gcc compiler primitives.
#include tls.h to use this - and see that file for documentation */
#ifndef NDEBUG
struct gpr_gcc_thread_local {
intptr_t value;
bool *inited;
};
#define GPR_TLS_DECL(name) \
static bool name##_inited = false; \
static __thread struct gpr_gcc_thread_local name = {0, &(name##_inited)}
#define gpr_tls_init(tls) \
do { \
GPR_ASSERT(*((tls)->inited) == false); \
*((tls)->inited) = true; \
} while (0)
/* It is allowed to call gpr_tls_init after gpr_tls_destroy is called. */
#define gpr_tls_destroy(tls) \
do { \
GPR_ASSERT(*((tls)->inited)); \
*((tls)->inited) = false; \
} while (0)
#define gpr_tls_set(tls, new_value) \
do { \
GPR_ASSERT(*((tls)->inited)); \
(tls)->value = (new_value); \
} while (0)
#define gpr_tls_get(tls) \
({ \
GPR_ASSERT(*((tls)->inited)); \
(tls)->value; \
})
#else /* NDEBUG */
struct gpr_gcc_thread_local {
intptr_t value;
};
@ -53,4 +95,6 @@ struct gpr_gcc_thread_local {
#define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value))
#define gpr_tls_get(tls) ((tls)->value)
#endif
#endif /* NDEBUG */
#endif /* GRPC_SUPPORT_TLS_GCC_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_SUPPORT_TLS_GCC_H
#define GRPC_SUPPORT_TLS_GCC_H
#ifndef GRPC_SUPPORT_TLS_MSVC_H
#define GRPC_SUPPORT_TLS_MSVC_H
/* Thread local storage based on ms visual c compiler primitives.
#include tls.h to use this - and see that file for documentation */
@ -53,4 +53,4 @@ struct gpr_msvc_thread_local {
#define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value))
#define gpr_tls_get(tls) ((tls)->value)
#endif
#endif /* GRPC_SUPPORT_TLS_MSVC_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -57,4 +57,4 @@ intptr_t gpr_tls_set(struct gpr_pthread_thread_local *tls, intptr_t value);
}
#endif
#endif
#endif /* GRPC_SUPPORT_TLS_PTHREAD_H */

@ -42,6 +42,7 @@ from setuptools.command import egg_info
# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in.
egg_info.manifest_maker.template = 'PYTHON-MANIFEST.in'
PY3 = sys.version_info.major == 3
PYTHON_STEM = './src/python/grpcio'
CORE_INCLUDE = ('./include', '.',)
BORINGSSL_INCLUDE = ('./third_party/boringssl/include',)
@ -103,7 +104,11 @@ if "linux" in sys.platform:
LDFLAGS += ('-Wl,-wrap,memcpy',)
if "linux" in sys.platform or "darwin" in sys.platform:
CFLAGS += ('-fvisibility=hidden',)
DEFINE_MACROS += (('PyMODINIT_FUNC', '__attribute__((visibility ("default"))) void'),)
pymodinit_type = 'PyObject*' if PY3 else 'void'
pymodinit = '__attribute__((visibility ("default"))) {}'.format(pymodinit_type)
DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),)
def cython_extensions(package_names, module_names, extra_sources, include_dirs,

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -33,8 +33,8 @@
#include <stddef.h>
#ifndef GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H
#define GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H
#ifndef GRPC_CORE_CENSUS_AGGREGATION_H
#define GRPC_CORE_CENSUS_AGGREGATION_H
/** Structure used to describe an aggregation type. */
struct census_aggregation_ops {
@ -63,4 +63,4 @@ struct census_aggregation_ops {
size_t (*print)(const void *aggregation, char *buffer, size_t n);
};
#endif /* GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H */
#endif /* GRPC_CORE_CENSUS_AGGREGATION_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H
#define GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H
#ifndef GRPC_CORE_CENSUS_GRPC_FILTER_H
#define GRPC_CORE_CENSUS_GRPC_FILTER_H
#include "src/core/channel/channel_stack.h"
@ -41,4 +41,4 @@
extern const grpc_channel_filter grpc_client_census_filter;
extern const grpc_channel_filter grpc_server_census_filter;
#endif /* GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H */
#endif /* GRPC_CORE_CENSUS_GRPC_FILTER_H */

@ -33,8 +33,8 @@
/* A very fast in-memory log, optimized for multiple writers. */
#ifndef GRPC_INTERNAL_CORE_CENSUS_MLOG_H
#define GRPC_INTERNAL_CORE_CENSUS_MLOG_H
#ifndef GRPC_CORE_CENSUS_MLOG_H
#define GRPC_CORE_CENSUS_MLOG_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
@ -92,4 +92,4 @@ size_t census_log_remaining_space(void);
out-of-space. */
int64_t census_log_out_of_space_count(void);
#endif /* GRPC_INTERNAL_CORE_CENSUS_LOG_H */
#endif /* GRPC_CORE_CENSUS_MLOG_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef CENSUS_RPC_METRIC_ID_H
#define CENSUS_RPC_METRIC_ID_H
#ifndef GRPC_CORE_CENSUS_RPC_METRIC_ID_H
#define GRPC_CORE_CENSUS_RPC_METRIC_ID_H
/* Metric ID's used for RPC measurements. */
/* Count of client requests sent. */
@ -48,4 +48,4 @@
/* Server side request latency. */
#define CENSUS_METRIC_RPC_SERVER_LATENCY ((uint32_t)5)
#endif /* CENSUS_RPC_METRIC_ID_H */
#endif /* GRPC_CORE_CENSUS_RPC_METRIC_ID_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H
#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H
#ifndef GRPC_CORE_CHANNEL_CHANNEL_ARGS_H
#define GRPC_CORE_CHANNEL_CHANNEL_ARGS_H
#include <grpc/compression.h>
#include <grpc/grpc.h>
@ -91,4 +91,4 @@ int grpc_channel_args_compression_algorithm_get_states(
int grpc_channel_args_compare(const grpc_channel_args *a,
const grpc_channel_args *b);
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H */
#endif /* GRPC_CORE_CHANNEL_CHANNEL_ARGS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H
#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H
#ifndef GRPC_CORE_CHANNEL_CHANNEL_STACK_H
#define GRPC_CORE_CHANNEL_CHANNEL_STACK_H
/* A channel filter defines how operations on a channel are implemented.
Channel filters are chained together to create full channels, and if those
@ -257,4 +257,4 @@ extern int grpc_trace_channel;
#define GRPC_CALL_LOG_OP(sev, elem, op) \
if (grpc_trace_channel) grpc_call_log_op(sev, elem, op)
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H */
#endif /* GRPC_CORE_CHANNEL_CHANNEL_STACK_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H
#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H
#ifndef GRPC_CORE_CHANNEL_CLIENT_CHANNEL_H
#define GRPC_CORE_CHANNEL_CLIENT_CHANNEL_H
#include "src/core/channel/channel_stack.h"
#include "src/core/client_config/resolver.h"
@ -60,4 +60,4 @@ void grpc_client_channel_watch_connectivity_state(
grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset,
grpc_connectivity_state *state, grpc_closure *on_complete);
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H */
#endif /* GRPC_CORE_CHANNEL_CLIENT_CHANNEL_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H
#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H
#ifndef GRPC_CORE_CHANNEL_CLIENT_UCHANNEL_H
#define GRPC_CORE_CHANNEL_CLIENT_UCHANNEL_H
#include "src/core/channel/channel_stack.h"
#include "src/core/client_config/resolver.h"
@ -57,4 +57,4 @@ grpc_channel *grpc_client_uchannel_create(grpc_subchannel *subchannel,
void grpc_client_uchannel_set_connected_subchannel(
grpc_channel *uchannel, grpc_connected_subchannel *connected_subchannel);
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H */
#endif /* GRPC_CORE_CHANNEL_CLIENT_UCHANNEL_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H
#define GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H
#ifndef GRPC_CORE_CHANNEL_COMPRESS_FILTER_H
#define GRPC_CORE_CHANNEL_COMPRESS_FILTER_H
#include "src/core/channel/channel_stack.h"
@ -62,4 +62,4 @@
extern const grpc_channel_filter grpc_compress_filter;
#endif /* GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H */
#endif /* GRPC_CORE_CHANNEL_COMPRESS_FILTER_H */

@ -31,12 +31,12 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H
#define GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H
#ifndef GRPC_CORE_CHANNEL_CONNECTED_CHANNEL_H
#define GRPC_CORE_CHANNEL_CONNECTED_CHANNEL_H
#include "src/core/channel/channel_stack_builder.h"
bool grpc_add_connected_filter(grpc_channel_stack_builder *builder,
void *arg_must_be_null);
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H */
#endif /* GRPC_CORE_CHANNEL_CONNECTED_CHANNEL_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H
#define GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H
#ifndef GRPC_CORE_CHANNEL_CONTEXT_H
#define GRPC_CORE_CHANNEL_CONTEXT_H
/* Call object context pointers */
typedef enum {
@ -46,4 +46,4 @@ typedef struct {
void (*destroy)(void *);
} grpc_call_context_element;
#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H */
#endif /* GRPC_CORE_CHANNEL_CONTEXT_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H
#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H
#ifndef GRPC_CORE_CHANNEL_HTTP_CLIENT_FILTER_H
#define GRPC_CORE_CHANNEL_HTTP_CLIENT_FILTER_H
#include "src/core/channel/channel_stack.h"
@ -41,4 +41,4 @@ extern const grpc_channel_filter grpc_http_client_filter;
#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H */
#endif /* GRPC_CORE_CHANNEL_HTTP_CLIENT_FILTER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,12 +31,12 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H
#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H
#ifndef GRPC_CORE_CHANNEL_HTTP_SERVER_FILTER_H
#define GRPC_CORE_CHANNEL_HTTP_SERVER_FILTER_H
#include "src/core/channel/channel_stack.h"
/* Processes metadata on the client side for HTTP2 transports */
extern const grpc_channel_filter grpc_http_server_filter;
#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H */
#endif /* GRPC_CORE_CHANNEL_HTTP_SERVER_FILTER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H
#define GRPC_INTERNAL_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H
#ifndef GRPC_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H
#define GRPC_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H
#include "src/core/client_config/subchannel.h"
@ -95,4 +95,4 @@ void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx,
char *grpc_subchannel_call_holder_get_peer(grpc_exec_ctx *exec_ctx,
grpc_subchannel_call_holder *holder);
#endif
#endif /* GRPC_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H
#ifndef GRPC_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H
#define GRPC_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H
#include "src/core/client_config/lb_policy.h"
@ -50,4 +50,4 @@ void grpc_client_config_set_lb_policy(grpc_client_config *client_config,
grpc_lb_policy *grpc_client_config_get_lb_policy(
grpc_client_config *client_config);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONNECTOR_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONNECTOR_H
#ifndef GRPC_CORE_CLIENT_CONFIG_CONNECTOR_H
#define GRPC_CORE_CLIENT_CONFIG_CONNECTOR_H
#include "src/core/channel/channel_stack.h"
#include "src/core/iomgr/sockaddr.h"
@ -89,4 +89,4 @@ void grpc_connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *connector,
void grpc_connector_shutdown(grpc_exec_ctx *exec_ctx,
grpc_connector *connector);
#endif
#endif /* GRPC_CORE_CLIENT_CONFIG_CONNECTOR_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H
#ifndef GRPC_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H
#define GRPC_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H
#include <grpc/support/slice.h>
#include "src/core/iomgr/sockaddr.h"
@ -47,4 +47,4 @@ void grpc_test_set_initial_connect_string_function(
void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len,
gpr_slice *connect_string);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#include <grpc/support/slice_buffer.h>
@ -82,4 +82,4 @@ void grpc_grpclb_response_destroy(grpc_grpclb_response *response);
}
#endif
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_PICK_FIRST_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_PICK_FIRST_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H
#include "src/core/client_config/lb_policy_factory.h"
@ -40,4 +40,4 @@
* the first subchannel from \a subchannels to succesfully connect */
grpc_lb_policy_factory *grpc_pick_first_lb_factory_create();
#endif
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_ROUND_ROBIN_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_ROUND_ROBIN_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H
#include "src/core/client_config/lb_policy.h"
@ -43,4 +43,4 @@ extern int grpc_lb_round_robin_trace;
/** Returns a load balancing factory for the round robin policy */
grpc_lb_policy_factory *grpc_round_robin_lb_factory_create();
#endif
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICY_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICY_H
#include "src/core/client_config/subchannel.h"
#include "src/core/transport/connectivity_state.h"
@ -141,4 +141,4 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx,
grpc_connectivity_state grpc_lb_policy_check_connectivity(
grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
#endif /* GRPC_INTERNAL_CORE_CONFIG_LB_POLICY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICY_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
#include "src/core/client_config/lb_policy.h"
#include "src/core/client_config/subchannel.h"
@ -70,4 +70,4 @@ void grpc_lb_policy_factory_unref(grpc_lb_policy_factory *factory);
grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy(
grpc_lb_policy_factory *factory, grpc_lb_policy_args *args);
#endif /* GRPC_INTERNAL_CORE_CONFIG_LB_POLICY_FACTORY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H
#define GRPC_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H
#include "src/core/client_config/lb_policy_factory.h"
@ -51,4 +51,4 @@ void grpc_register_lb_policy(grpc_lb_policy_factory *factory);
grpc_lb_policy *grpc_lb_policy_create(const char *name,
grpc_lb_policy_args *args);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVER_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVER_H
#include "src/core/client_config/client_config.h"
#include "src/core/client_config/subchannel.h"
@ -91,4 +91,4 @@ void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
grpc_client_config **target_config,
grpc_closure *on_complete);
#endif /* GRPC_INTERNAL_CORE_CONFIG_RESOLVER_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H
#include "src/core/client_config/resolver.h"
#include "src/core/client_config/subchannel_factory.h"
@ -79,4 +79,4 @@ grpc_resolver *grpc_resolver_factory_create_resolver(
char *grpc_resolver_factory_get_default_authority(
grpc_resolver_factory *factory, grpc_uri *uri);
#endif /* GRPC_INTERNAL_CORE_CONFIG_RESOLVER_FACTORY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H
#include "src/core/client_config/resolver_factory.h"
@ -62,4 +62,4 @@ grpc_resolver *grpc_resolver_create(
representing the default authority to pass from a client. */
char *grpc_get_default_authority(const char *target);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,12 +31,12 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H
#include "src/core/client_config/resolver_factory.h"
/** Create a dns resolver factory */
grpc_resolver_factory *grpc_dns_resolver_factory_create(void);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H
#include <grpc/support/port_platform.h>
@ -47,4 +47,4 @@ grpc_resolver_factory *grpc_ipv6_resolver_factory_create(void);
grpc_resolver_factory *grpc_unix_resolver_factory_create(void);
#endif
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,12 +31,12 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H
#ifndef GRPC_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H
#define GRPC_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H
#include "src/core/client_config/resolver_factory.h"
/** Create a zookeeper resolver factory */
grpc_resolver_factory *grpc_zookeeper_resolver_factory_create(void);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H
#ifndef GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_H
#define GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_H
#include "src/core/channel/channel_stack.h"
#include "src/core/client_config/connector.h"
@ -171,4 +171,4 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx,
grpc_connector *connector,
grpc_subchannel_args *args);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
#ifndef GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
#define GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
#include "src/core/channel/channel_stack.h"
#include "src/core/client_config/subchannel.h"
@ -63,4 +63,4 @@ grpc_subchannel *grpc_subchannel_factory_create_subchannel(
grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory,
grpc_subchannel_args *args);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */

@ -108,6 +108,7 @@ static int subchannel_key_compare(grpc_subchannel_key *a,
if (c != 0) return c;
c = memcmp(a->args.filters, b->args.filters,
a->args.filter_count * sizeof(*a->args.filters));
if (c != 0) return c;
return grpc_channel_args_compare(a->args.args, b->args.args);
}

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H
#ifndef GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H
#define GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H
#include "src/core/client_config/connector.h"
#include "src/core/client_config/subchannel.h"
@ -74,4 +74,4 @@ void grpc_subchannel_index_init(void);
/** Shutdown the subchannel index (global) */
void grpc_subchannel_index_shutdown(void);
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H */
#endif /* GRPC_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_URI_PARSER_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_URI_PARSER_H
#ifndef GRPC_CORE_CLIENT_CONFIG_URI_PARSER_H
#define GRPC_CORE_CLIENT_CONFIG_URI_PARSER_H
typedef struct {
char *scheme;
@ -48,4 +48,4 @@ grpc_uri *grpc_uri_parse(const char *uri_text, int suppress_errors);
/** destroy a uri */
void grpc_uri_destroy(grpc_uri *uri);
#endif
#endif /* GRPC_CORE_CLIENT_CONFIG_URI_PARSER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H
#define GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H
#ifndef GRPC_CORE_COMPRESSION_ALGORITHM_METADATA_H
#define GRPC_CORE_COMPRESSION_ALGORITHM_METADATA_H
#include <grpc/compression.h>
#include "src/core/transport/metadata.h"
@ -50,4 +50,4 @@ grpc_mdelem *grpc_compression_encoding_mdelem(
grpc_compression_algorithm grpc_compression_algorithm_from_mdstr(
grpc_mdstr *str);
#endif /* GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H */
#endif /* GRPC_CORE_COMPRESSION_ALGORITHM_METADATA_H */

@ -128,20 +128,57 @@ grpc_mdelem *grpc_compression_encoding_mdelem(
/* TODO(dgq): Add the ability to specify parameters to the individual
* compression algorithms */
grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level) {
grpc_compression_level level, uint32_t accepted_encodings) {
GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1,
((int)level));
if (level > GRPC_COMPRESS_LEVEL_HIGH) {
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort();
}
const size_t num_supported =
GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */
if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) {
return GRPC_COMPRESS_NONE;
}
GPR_ASSERT(level > 0);
/* Establish a "ranking" or compression algorithms in increasing order of
* compression.
* This is simplistic and we will probably want to introduce other dimensions
* in the future (cpu/memory cost, etc). */
const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_DEFLATE};
/* intersect algos_ranking with the supported ones keeping the ranked order */
grpc_compression_algorithm
sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT];
size_t algos_supported_idx = 0;
for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) {
const grpc_compression_algorithm alg = algos_ranking[i];
for (size_t j = 0; j < num_supported; j++) {
if (GPR_BITGET(accepted_encodings, alg) == 1) {
/* if \a alg in supported */
sorted_supported_algos[algos_supported_idx++] = alg;
break;
}
}
if (algos_supported_idx == num_supported) break;
}
switch (level) {
case GRPC_COMPRESS_LEVEL_NONE:
return GRPC_COMPRESS_NONE;
abort(); /* should have been handled already */
case GRPC_COMPRESS_LEVEL_LOW:
return sorted_supported_algos[0];
case GRPC_COMPRESS_LEVEL_MED:
return sorted_supported_algos[num_supported / 2];
case GRPC_COMPRESS_LEVEL_HIGH:
return GRPC_COMPRESS_DEFLATE;
return sorted_supported_algos[num_supported - 1];
default:
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort();
}
};
}
void grpc_compression_options_init(grpc_compression_options *opts) {

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H
#define GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H
#ifndef GRPC_CORE_COMPRESSION_MESSAGE_COMPRESS_H
#define GRPC_CORE_COMPRESSION_MESSAGE_COMPRESS_H
#include <grpc/compression.h>
#include <grpc/support/slice_buffer.h>
@ -49,4 +49,4 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm,
int grpc_msg_decompress(grpc_compression_algorithm algorithm,
gpr_slice_buffer* input, gpr_slice_buffer* output);
#endif /* GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H */
#endif /* GRPC_CORE_COMPRESSION_MESSAGE_COMPRESS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_DEBUG_TRACE_H
#define GRPC_INTERNAL_CORE_DEBUG_TRACE_H
#ifndef GRPC_CORE_DEBUG_TRACE_H
#define GRPC_CORE_DEBUG_TRACE_H
#include <grpc/support/port_platform.h>
@ -40,4 +40,4 @@ void grpc_register_tracer(const char *name, int *flag);
void grpc_tracer_init(const char *env_var_name);
void grpc_tracer_shutdown(void);
#endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_H */
#endif /* GRPC_CORE_DEBUG_TRACE_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H
#define GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H
#ifndef GRPC_CORE_HTTPCLI_FORMAT_REQUEST_H
#define GRPC_CORE_HTTPCLI_FORMAT_REQUEST_H
#include "src/core/httpcli/httpcli.h"
#include <grpc/support/slice.h>
@ -42,4 +42,4 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
const char *body_bytes,
size_t body_size);
#endif /* GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H */
#endif /* GRPC_CORE_HTTPCLI_FORMAT_REQUEST_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H
#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H
#ifndef GRPC_CORE_HTTPCLI_HTTPCLI_H
#define GRPC_CORE_HTTPCLI_HTTPCLI_H
#include <stddef.h>
@ -160,4 +160,4 @@ typedef int (*grpc_httpcli_post_override)(
void grpc_httpcli_set_override(grpc_httpcli_get_override get,
grpc_httpcli_post_override post);
#endif /* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H */
#endif /* GRPC_CORE_HTTPCLI_HTTPCLI_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H
#define GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H
#ifndef GRPC_CORE_HTTPCLI_PARSER_H
#define GRPC_CORE_HTTPCLI_PARSER_H
#include "src/core/httpcli/httpcli.h"
#include <grpc/support/port_platform.h>
@ -61,4 +61,4 @@ void grpc_httpcli_parser_destroy(grpc_httpcli_parser* parser);
int grpc_httpcli_parser_parse(grpc_httpcli_parser* parser, gpr_slice slice);
int grpc_httpcli_parser_eof(grpc_httpcli_parser* parser);
#endif /* GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H */
#endif /* GRPC_CORE_HTTPCLI_PARSER_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H
#define GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H
#ifndef GRPC_CORE_IOMGR_CLOSURE_H
#define GRPC_CORE_IOMGR_CLOSURE_H
#include <grpc/support/port_platform.h>
#include <stdbool.h>
@ -95,4 +95,4 @@ bool grpc_closure_list_empty(grpc_closure_list list);
/** return the next pointer for a queued closure list */
grpc_closure *grpc_closure_next(grpc_closure *closure);
#endif /* GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H */
#endif /* GRPC_CORE_IOMGR_CLOSURE_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H
#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H
#ifndef GRPC_CORE_IOMGR_ENDPOINT_H
#define GRPC_CORE_IOMGR_ENDPOINT_H
#include "src/core/iomgr/pollset.h"
#include "src/core/iomgr/pollset_set.h"
@ -99,4 +99,4 @@ struct grpc_endpoint {
const grpc_endpoint_vtable *vtable;
};
#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H */
#endif /* GRPC_CORE_IOMGR_ENDPOINT_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H
#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H
#ifndef GRPC_CORE_IOMGR_ENDPOINT_PAIR_H
#define GRPC_CORE_IOMGR_ENDPOINT_PAIR_H
#include "src/core/iomgr/endpoint.h"
@ -44,4 +44,4 @@ typedef struct {
grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name,
size_t read_slice_size);
#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H */
#endif /* GRPC_CORE_IOMGR_ENDPOINT_PAIR_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_EXEC_CTX_H
#define GRPC_INTERNAL_CORE_IOMGR_EXEC_CTX_H
#ifndef GRPC_CORE_IOMGR_EXEC_CTX_H
#define GRPC_CORE_IOMGR_EXEC_CTX_H
#include "src/core/iomgr/closure.h"
@ -95,4 +95,4 @@ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx,
void grpc_exec_ctx_global_init(void);
void grpc_exec_ctx_global_shutdown(void);
#endif
#endif /* GRPC_CORE_IOMGR_EXEC_CTX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H
#define GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H
#ifndef GRPC_CORE_IOMGR_EXECUTOR_H
#define GRPC_CORE_IOMGR_EXECUTOR_H
#include "src/core/iomgr/closure.h"
@ -50,4 +50,4 @@ void grpc_executor_enqueue(grpc_closure *closure, bool success);
/** Shutdown the executor, running all pending work as part of the call */
void grpc_executor_shutdown();
#endif /* GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H */
#endif /* GRPC_CORE_IOMGR_EXECUTOR_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H
#ifndef GRPC_CORE_IOMGR_FD_POSIX_H
#define GRPC_CORE_IOMGR_FD_POSIX_H
#include "src/core/iomgr/iomgr_internal.h"
#include "src/core/iomgr/pollset.h"
@ -189,4 +189,4 @@ void grpc_fd_unref(grpc_fd *fd);
void grpc_fd_global_init(void);
void grpc_fd_global_shutdown(void);
#endif /* GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H */
#endif /* GRPC_CORE_IOMGR_FD_POSIX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H
#define GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H
#ifndef GRPC_CORE_IOMGR_IOCP_WINDOWS_H
#define GRPC_CORE_IOMGR_IOCP_WINDOWS_H
#include <grpc/support/sync.h>
@ -60,4 +60,4 @@ void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx,
grpc_winsocket *winsocket,
grpc_closure *closure);
#endif /* GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_IOCP_WINDOWS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_H
#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_H
#ifndef GRPC_CORE_IOMGR_IOMGR_H
#define GRPC_CORE_IOMGR_IOMGR_H
/** Initializes the iomgr. */
void grpc_iomgr_init(void);
@ -40,4 +40,4 @@ void grpc_iomgr_init(void);
/** Signals the intention to shutdown the iomgr. */
void grpc_iomgr_shutdown(void);
#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */
#endif /* GRPC_CORE_IOMGR_IOMGR_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H
#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H
#ifndef GRPC_CORE_IOMGR_IOMGR_INTERNAL_H
#define GRPC_CORE_IOMGR_IOMGR_INTERNAL_H
#include <stdbool.h>
@ -59,4 +59,4 @@ void grpc_iomgr_platform_shutdown(void);
bool grpc_iomgr_abort_on_leaks(void);
#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H */
#endif /* GRPC_CORE_IOMGR_IOMGR_INTERNAL_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,9 +31,9 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H
#ifndef GRPC_CORE_IOMGR_IOMGR_POSIX_H
#define GRPC_CORE_IOMGR_IOMGR_POSIX_H
#include "src/core/iomgr/iomgr_internal.h"
#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H */
#endif /* GRPC_CORE_IOMGR_IOMGR_POSIX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_H
#ifndef GRPC_CORE_IOMGR_POLLSET_H
#define GRPC_CORE_IOMGR_POLLSET_H
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
@ -91,4 +91,4 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
void grpc_pollset_kick(grpc_pollset *pollset,
grpc_pollset_worker *specific_worker);
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H
#ifndef GRPC_CORE_IOMGR_POLLSET_POSIX_H
#define GRPC_CORE_IOMGR_POLLSET_POSIX_H
#include <poll.h>
@ -150,4 +150,4 @@ typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int);
extern grpc_poll_function_type grpc_poll_function;
extern grpc_wakeup_fd grpc_global_wakeup_fd;
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_POSIX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_H
#ifndef GRPC_CORE_IOMGR_POLLSET_SET_H
#define GRPC_CORE_IOMGR_POLLSET_SET_H
#include "src/core/iomgr/pollset.h"
@ -58,4 +58,4 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *bag,
grpc_pollset_set *item);
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_SET_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_POSIX_H
#ifndef GRPC_CORE_IOMGR_POLLSET_SET_POSIX_H
#define GRPC_CORE_IOMGR_POLLSET_SET_POSIX_H
#include "src/core/iomgr/fd_posix.h"
#include "src/core/iomgr/pollset_set.h"
@ -42,4 +42,4 @@ void grpc_pollset_set_add_fd(grpc_exec_ctx *exec_ctx,
void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *pollset_set, grpc_fd *fd);
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_SET_POSIX_H */

@ -31,9 +31,9 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_WINDOWS_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_WINDOWS_H
#ifndef GRPC_CORE_IOMGR_POLLSET_SET_WINDOWS_H
#define GRPC_CORE_IOMGR_POLLSET_SET_WINDOWS_H
#include "src/core/iomgr/pollset_set.h"
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_SET_WINDOWS_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H
#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H
#ifndef GRPC_CORE_IOMGR_POLLSET_WINDOWS_H
#define GRPC_CORE_IOMGR_POLLSET_WINDOWS_H
#include <grpc/support/sync.h>
@ -72,4 +72,4 @@ struct grpc_pollset {
grpc_closure *on_shutdown;
};
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_POLLSET_WINDOWS_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H
#define GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H
#ifndef GRPC_CORE_IOMGR_RESOLVE_ADDRESS_H
#define GRPC_CORE_IOMGR_RESOLVE_ADDRESS_H
#include <stddef.h>
#include "src/core/iomgr/exec_ctx.h"
@ -69,4 +69,4 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addresses);
extern grpc_resolved_addresses *(*grpc_blocking_resolve_address)(
const char *name, const char *default_port);
#endif /* GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H */
#endif /* GRPC_CORE_IOMGR_RESOLVE_ADDRESS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H
#ifndef GRPC_CORE_IOMGR_SOCKADDR_H
#define GRPC_CORE_IOMGR_SOCKADDR_H
#include <grpc/support/port_platform.h>
@ -44,4 +44,4 @@
#include "src/core/iomgr/sockaddr_posix.h"
#endif
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H */
#endif /* GRPC_CORE_IOMGR_SOCKADDR_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H
#ifndef GRPC_CORE_IOMGR_SOCKADDR_POSIX_H
#define GRPC_CORE_IOMGR_SOCKADDR_POSIX_H
#include <arpa/inet.h>
#include <sys/socket.h>
@ -41,4 +41,4 @@
#include <netdb.h>
#include <unistd.h>
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H */
#endif /* GRPC_CORE_IOMGR_SOCKADDR_POSIX_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H
#ifndef GRPC_CORE_IOMGR_SOCKADDR_UTILS_H
#define GRPC_CORE_IOMGR_SOCKADDR_UTILS_H
#include "src/core/iomgr/sockaddr.h"
@ -86,4 +86,4 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr,
char *grpc_sockaddr_to_uri(const struct sockaddr *addr);
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H */
#endif /* GRPC_CORE_IOMGR_SOCKADDR_UTILS_H */

@ -31,11 +31,11 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H
#ifndef GRPC_CORE_IOMGR_SOCKADDR_WIN32_H
#define GRPC_CORE_IOMGR_SOCKADDR_WIN32_H
#include <winsock2.h>
#include <ws2tcpip.h>
#include <mswsock.h>
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H */
#endif /* GRPC_CORE_IOMGR_SOCKADDR_WIN32_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H
#ifndef GRPC_CORE_IOMGR_SOCKET_UTILS_POSIX_H
#define GRPC_CORE_IOMGR_SOCKET_UTILS_POSIX_H
#include <unistd.h>
#include <sys/socket.h>
@ -110,4 +110,4 @@ extern int grpc_forbid_dualstack_sockets_for_testing;
int grpc_create_dualstack_socket(const struct sockaddr *addr, int type,
int protocol, grpc_dualstack_mode *dsmode);
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H */
#endif /* GRPC_CORE_IOMGR_SOCKET_UTILS_POSIX_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H
#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H
#ifndef GRPC_CORE_IOMGR_SOCKET_WINDOWS_H
#define GRPC_CORE_IOMGR_SOCKET_WINDOWS_H
#include <grpc/support/port_platform.h>
#include <winsock2.h>
@ -108,4 +108,4 @@ void grpc_winsocket_shutdown(grpc_winsocket *socket);
/* Destroy a socket. Should only be called if there's no pending operation. */
void grpc_winsocket_destroy(grpc_winsocket *socket);
#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_SOCKET_WINDOWS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H
#define GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H
#ifndef GRPC_CORE_IOMGR_TCP_CLIENT_H
#define GRPC_CORE_IOMGR_TCP_CLIENT_H
#include "src/core/iomgr/endpoint.h"
#include "src/core/iomgr/pollset_set.h"
@ -50,4 +50,4 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect,
const struct sockaddr *addr, size_t addr_len,
gpr_timespec deadline);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H */
#endif /* GRPC_CORE_IOMGR_TCP_CLIENT_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H
#ifndef GRPC_CORE_IOMGR_TCP_POSIX_H
#define GRPC_CORE_IOMGR_TCP_POSIX_H
/*
Low level TCP "bottom half" implementation, for use by transports built on
top of a TCP connection.
@ -68,4 +68,4 @@ int grpc_tcp_fd(grpc_endpoint *ep);
void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
int *fd, grpc_closure *done);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H */
#endif /* GRPC_CORE_IOMGR_TCP_POSIX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H
#define GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H
#ifndef GRPC_CORE_IOMGR_TCP_SERVER_H
#define GRPC_CORE_IOMGR_TCP_SERVER_H
#include "src/core/iomgr/closure.h"
#include "src/core/iomgr/endpoint.h"
@ -100,4 +100,4 @@ void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s,
a call (exec_ctx!=NULL) to shutdown_complete. */
void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H */
#endif /* GRPC_CORE_IOMGR_TCP_SERVER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H
#define GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H
#ifndef GRPC_CORE_IOMGR_TCP_WINDOWS_H
#define GRPC_CORE_IOMGR_TCP_WINDOWS_H
/*
Low level TCP "bottom half" implementation, for use by transports built on
top of a TCP connection.
@ -54,4 +54,4 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string);
int grpc_tcp_prepare_socket(SOCKET sock);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H */
#endif /* GRPC_CORE_IOMGR_TCP_WINDOWS_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H
#define GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H
#ifndef GRPC_CORE_IOMGR_TIME_AVERAGED_STATS_H
#define GRPC_CORE_IOMGR_TIME_AVERAGED_STATS_H
/* This tracks a time-decaying weighted average. It works by collecting
batches of samples and then mixing their average into a time-decaying
@ -85,4 +85,4 @@ void grpc_time_averaged_stats_add_sample(grpc_time_averaged_stats* stats,
value. */
double grpc_time_averaged_stats_update_average(grpc_time_averaged_stats* stats);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H */
#endif /* GRPC_CORE_IOMGR_TIME_AVERAGED_STATS_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_H
#define GRPC_INTERNAL_CORE_IOMGR_TIMER_H
#ifndef GRPC_CORE_IOMGR_TIMER_H
#define GRPC_CORE_IOMGR_TIMER_H
#include "src/core/iomgr/iomgr.h"
#include "src/core/iomgr/exec_ctx.h"
@ -105,4 +105,4 @@ void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx);
void grpc_kick_poller(void);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_H */
#endif /* GRPC_CORE_IOMGR_TIMER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H
#define GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H
#ifndef GRPC_CORE_IOMGR_TIMER_HEAP_H
#define GRPC_CORE_IOMGR_TIMER_HEAP_H
#include "src/core/iomgr/timer.h"
@ -54,4 +54,4 @@ void grpc_timer_heap_pop(grpc_timer_heap *heap);
int grpc_timer_heap_is_empty(grpc_timer_heap *heap);
#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H */
#endif /* GRPC_CORE_IOMGR_TIMER_HEAP_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H
#define GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H
#ifndef GRPC_CORE_IOMGR_UDP_SERVER_H
#define GRPC_CORE_IOMGR_UDP_SERVER_H
#include "src/core/iomgr/endpoint.h"
#include "src/core/iomgr/fd_posix.h"
@ -73,4 +73,4 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr,
void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server,
grpc_closure *on_done);
#endif /* GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H */
#endif /* GRPC_CORE_IOMGR_UDP_SERVER_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,11 +31,11 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H
#define GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H
#ifndef GRPC_CORE_IOMGR_WAKEUP_FD_PIPE_H
#define GRPC_CORE_IOMGR_WAKEUP_FD_PIPE_H
#include "src/core/iomgr/wakeup_fd_posix.h"
extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
#endif /* GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H */
#endif /* GRPC_CORE_IOMGR_WAKEUP_FD_PIPE_H */

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

Loading…
Cancel
Save