diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-25 13:38:14 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-25 13:38:14 -0700 |
commit | f40df23eebdc0fb367ea265be98a4f86b6efbc94 (patch) | |
tree | bdad84361157815b91138e2a6ebdbedefe7c19c7 /include | |
parent | b7b20fee9649c57df0aef8cb54f85465312bab80 (diff) |
Auto-changes
Diffstat (limited to 'include')
22 files changed, 79 insertions, 65 deletions
diff --git a/include/grpc++/generic/async_generic_service.h b/include/grpc++/generic/async_generic_service.h index 9ae8391dc4..b87b17ee0d 100644 --- a/include/grpc++/generic/async_generic_service.h +++ b/include/grpc++/generic/async_generic_service.h @@ -34,8 +34,8 @@ #ifndef GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H #define GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H -#include <grpc++/support/byte_buffer.h> #include <grpc++/support/async_stream.h> +#include <grpc++/support/byte_buffer.h> struct grpc_server; diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index 8f9afe8251..cac345e0dc 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -215,7 +215,8 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> { CallOpSet<CallOpSendMessage> write_ops_; CallOpSet<CallOpClientSendClose> writes_done_ops_; CallOpSet<CallOpRecvInitialMetadata, CallOpGenericRecvMessage, - CallOpClientRecvStatus> finish_ops_; + CallOpClientRecvStatus> + finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -350,7 +351,8 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet<CallOpSendInitialMetadata> meta_ops_; CallOpSet<CallOpRecvMessage<R>> read_ops_; CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> finish_ops_; + CallOpServerSendStatus> + finish_ops_; }; template <class W> diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index 9c6dbd5484..1526debf54 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -101,10 +101,12 @@ class ClientAsyncResponseReader GRPC_FINAL class CallOpSetCollection : public CallOpSetCollectionInterface { public: SneakyCallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpClientSendClose> init_buf_; + CallOpClientSendClose> + init_buf_; CallOpSet<CallOpRecvInitialMetadata> meta_buf_; CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>, - CallOpClientRecvStatus> finish_buf_; + CallOpClientRecvStatus> + finish_buf_; }; std::shared_ptr<CallOpSetCollection> collection_; }; @@ -159,7 +161,8 @@ class ServerAsyncResponseWriter GRPC_FINAL ServerContext* ctx_; CallOpSet<CallOpSendInitialMetadata> meta_buf_; CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> finish_buf_; + CallOpServerSendStatus> + finish_buf_; }; } // namespace grpc diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 03affc2125..50f5a75191 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -280,7 +280,8 @@ class CallOpRecvMessage { if (*status) { got_message = true; *status = SerializationTraits<R>::Deserialize(recv_buf_, message_, - max_message_size).ok(); + max_message_size) + .ok(); } else { got_message = false; g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index a2b7d928c3..6c35a95765 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -56,7 +56,8 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, Call call(channel->CreateCall(method, context, &cq)); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, CallOpRecvInitialMetadata, CallOpRecvMessage<OutputMessage>, - CallOpClientSendClose, CallOpClientRecvStatus> ops; + CallOpClientSendClose, CallOpClientRecvStatus> + ops; Status status = ops.SendMessage(request); if (!status.ok()) { return status; diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h index 413eab7570..95c844723a 100644 --- a/include/grpc++/impl/codegen/impl/async_stream.h +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -215,7 +215,8 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> { CallOpSet<CallOpSendMessage> write_ops_; CallOpSet<CallOpClientSendClose> writes_done_ops_; CallOpSet<CallOpRecvInitialMetadata, CallOpGenericRecvMessage, - CallOpClientRecvStatus> finish_ops_; + CallOpClientRecvStatus> + finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -350,7 +351,8 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet<CallOpSendInitialMetadata> meta_ops_; CallOpSet<CallOpRecvMessage<R>> read_ops_; CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> finish_ops_; + CallOpServerSendStatus> + finish_ops_; }; template <class W> diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 3ecca0a406..0ab2ae466a 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -61,7 +61,8 @@ class RpcMethodHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -74,7 +75,8 @@ class RpcMethodHandler : public MethodHandler { private: // Application provided rpc handler function. std::function<Status(ServiceType*, ServerContext*, const RequestType*, - ResponseType*)> func_; + ResponseType*)> + func_; // The class the above handler function lives in. ServiceType* service_; }; @@ -96,7 +98,8 @@ class ClientStreamingHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpServerSendStatus> ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -108,7 +111,8 @@ class ClientStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, ServerReader<RequestType>*, - ResponseType*)> func_; + ResponseType*)> + func_; ServiceType* service_; }; @@ -143,7 +147,8 @@ class ServerStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, const RequestType*, - ServerWriter<ResponseType>*)> func_; + ServerWriter<ResponseType>*)> + func_; ServiceType* service_; }; @@ -174,7 +179,8 @@ class BidiStreamingHandler : public MethodHandler { private: std::function<Status(ServiceType*, ServerContext*, - ServerReaderWriter<ResponseType, RequestType>*)> func_; + ServerReaderWriter<ResponseType, RequestType>*)> + func_; ServiceType* service_; }; diff --git a/include/grpc++/impl/codegen/rpc_service_method.h b/include/grpc++/impl/codegen/rpc_service_method.h index 6256301677..8b1f026c91 100644 --- a/include/grpc++/impl/codegen/rpc_service_method.h +++ b/include/grpc++/impl/codegen/rpc_service_method.h @@ -40,10 +40,10 @@ #include <memory> #include <vector> -#include <grpc/impl/codegen/byte_buffer.h> #include <grpc++/impl/codegen/config.h> #include <grpc++/impl/codegen/rpc_method.h> #include <grpc++/impl/codegen/status.h> +#include <grpc/impl/codegen/byte_buffer.h> namespace grpc { class ServerContext; diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index 91ebe574b1..f8326bc44b 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -37,12 +37,12 @@ #include <map> #include <memory> -#include <grpc/impl/codegen/compression_types.h> -#include <grpc/impl/codegen/time.h> -#include <grpc++/impl/codegen/security/auth_context.h> #include <grpc++/impl/codegen/config.h> +#include <grpc++/impl/codegen/security/auth_context.h> #include <grpc++/impl/codegen/string_ref.h> #include <grpc++/impl/codegen/time.h> +#include <grpc/impl/codegen/compression_types.h> +#include <grpc/impl/codegen/time.h> struct gpr_timespec; struct grpc_metadata; diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index 7d4ed277ed..908d124df1 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -192,10 +192,11 @@ class ServerInterface : public CallHook { bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { bool serialization_status = *status && payload_ && - SerializationTraits<Message>::Deserialize( - payload_, request_, server_->max_message_size()).ok(); + SerializationTraits<Message>::Deserialize(payload_, request_, + server_->max_message_size()) + .ok(); bool ret = RegisteredAsyncRequest::FinalizeResult(tag, status); - *status = serialization_status&&* status; + *status = serialization_status && *status; return ret; } diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 5f878469ce..0eabc5fc0f 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -123,7 +123,8 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { ClientContext* context, const W& request) : context_(context), call_(channel->CreateCall(method, context, &cq_)) { CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, - CallOpClientSendClose> ops; + CallOpClientSendClose> + ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert GPR_CODEGEN_ASSERT(ops.SendMessage(request).ok()); @@ -235,7 +236,8 @@ class ClientWriter : public ClientWriterInterface<W> { private: ClientContext* context_; CallOpSet<CallOpRecvInitialMetadata, CallOpGenericRecvMessage, - CallOpClientRecvStatus> finish_ops_; + CallOpClientRecvStatus> + finish_ops_; CompletionQueue cq_; Call call_; }; diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index 27307f8fcd..3825518de1 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -34,13 +34,13 @@ #ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H #define GRPCXX_SUPPORT_BYTE_BUFFER_H -#include <grpc/grpc.h> -#include <grpc/byte_buffer.h> -#include <grpc/support/log.h> #include <grpc++/impl/serialization_traits.h> #include <grpc++/support/config.h> #include <grpc++/support/slice.h> #include <grpc++/support/status.h> +#include <grpc/byte_buffer.h> +#include <grpc/grpc.h> +#include <grpc/support/log.h> #include <vector> diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index a9ede35f90..8c2f7c71eb 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -34,12 +34,12 @@ #ifndef GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H #define GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H -#include <vector> #include <list> +#include <vector> +#include <grpc++/support/config.h> #include <grpc/compression.h> #include <grpc/grpc.h> -#include <grpc++/support/config.h> namespace grpc { namespace testing { diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 724691a033..6251a8bcde 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -34,8 +34,8 @@ #ifndef GRPCXX_SUPPORT_SLICE_H #define GRPCXX_SUPPORT_SLICE_H -#include <grpc/support/slice.h> #include <grpc++/support/config.h> +#include <grpc/support/slice.h> namespace grpc { diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index b0e63a6da2..9a1c6178ab 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -34,8 +34,8 @@ #ifndef GRPC_BYTE_BUFFER_READER_H #define GRPC_BYTE_BUFFER_READER_H -#include <grpc/grpc.h> #include <grpc/byte_buffer.h> +#include <grpc/grpc.h> #ifdef __cplusplus extern "C" { diff --git a/include/grpc/compression.h b/include/grpc/compression.h index 70ba393261..39023ded34 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -36,8 +36,8 @@ #include <stdlib.h> -#include <grpc/impl/codegen/port_platform.h> #include <grpc/impl/codegen/compression_types.h> +#include <grpc/impl/codegen/port_platform.h> #ifdef __cplusplus extern "C" { @@ -59,9 +59,8 @@ GRPCAPI int grpc_compression_algorithm_name( * 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, - uint32_t accepted_encodings); +GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level( + grpc_compression_level level, uint32_t accepted_encodings); GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts); diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 5113645daf..fe0cf28b3b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -36,13 +36,13 @@ #include <grpc/status.h> -#include <stddef.h> #include <grpc/byte_buffer.h> -#include <grpc/support/slice.h> -#include <grpc/support/time.h> #include <grpc/impl/codegen/connectivity_state.h> -#include <grpc/impl/codegen/propagation_bits.h> #include <grpc/impl/codegen/grpc_types.h> +#include <grpc/impl/codegen/propagation_bits.h> +#include <grpc/support/slice.h> +#include <grpc/support/time.h> +#include <stddef.h> #ifdef __cplusplus extern "C" { @@ -154,9 +154,8 @@ GRPCAPI void grpc_alarm_cancel(grpc_alarm *alarm); GRPCAPI void grpc_alarm_destroy(grpc_alarm *alarm); /** Check the connectivity state of a channel. */ -GRPCAPI grpc_connectivity_state -grpc_channel_check_connectivity_state(grpc_channel *channel, - int try_to_connect); +GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state( + grpc_channel *channel, int try_to_connect); /** Watch for a change in connectivity state. Once the channel connectivity state is different from last_observed_state, @@ -267,9 +266,10 @@ GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved); and description passed in. Importantly, this function does not send status nor description to the remote endpoint. */ -GRPCAPI grpc_call_error -grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, - const char *description, void *reserved); +GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, + grpc_status_code status, + const char *description, + void *reserved); /** Destroy a call. THREAD SAFETY: grpc_call_destroy is thread-compatible */ @@ -283,13 +283,11 @@ GRPCAPI void grpc_call_destroy(grpc_call *call); to \a cq_bound_to_call. Note that \a cq_for_notification must have been registered to the server via \a grpc_server_register_completion_queue. */ -GRPCAPI grpc_call_error -grpc_server_request_call(grpc_server *server, grpc_call **call, - grpc_call_details *details, - grpc_metadata_array *request_metadata, - grpc_completion_queue *cq_bound_to_call, - grpc_completion_queue *cq_for_notification, - void *tag_new); +GRPCAPI grpc_call_error grpc_server_request_call( + grpc_server *server, grpc_call **call, grpc_call_details *details, + grpc_metadata_array *request_metadata, + grpc_completion_queue *cq_bound_to_call, + grpc_completion_queue *cq_for_notification, void *tag_new); /** Registers a method in the server. Methods to this (host, method) pair will not be reported by diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 368d5dda51..f2d04e551a 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -80,9 +80,8 @@ grpc_auth_context_peer_identity(const grpc_auth_context *ctx); /* Finds a property in the context. May return an empty iterator (first _next will return NULL) if no property with this name was found in the context. */ -GRPCAPI grpc_auth_property_iterator -grpc_auth_context_find_properties_by_name(const grpc_auth_context *ctx, - const char *name); +GRPCAPI grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( + const grpc_auth_context *ctx, const char *name); /* Gets the name of the property that indicates the peer identity. Will return NULL if the peer is not authenticated. */ @@ -363,8 +362,8 @@ GRPCAPI int grpc_server_add_secure_http2_port(grpc_server *server, /* Sets a credentials to a call. Can only be called on the client side before grpc_call_start_batch. */ -GRPCAPI grpc_call_error -grpc_call_set_credentials(grpc_call *call, grpc_call_credentials *creds); +GRPCAPI grpc_call_error grpc_call_set_credentials(grpc_call *call, + grpc_call_credentials *creds); /* --- Auth Metadata Processing --- */ diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index d6e18e9ca5..afd8c5d4cf 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -34,8 +34,8 @@ #ifndef GRPC_IMPL_CODEGEN_LOG_H #define GRPC_IMPL_CODEGEN_LOG_H -#include <stdlib.h> /* for abort() */ #include <stdarg.h> +#include <stdlib.h> /* for abort() */ #include <grpc/impl/codegen/port_platform.h> diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index a62fdd087b..03c59e72a0 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -122,8 +122,8 @@ GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); /* Equivalent to gpr_slice_new, but with a two argument destroy function that also takes the slice length. */ -GPRAPI gpr_slice -gpr_slice_new_with_len(void *p, size_t len, void (*destroy)(void *, size_t)); +GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)); /* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc() call. diff --git a/include/grpc/impl/codegen/slice_buffer.h b/include/grpc/impl/codegen/slice_buffer.h index 4fe909ee82..7191878496 100644 --- a/include/grpc/impl/codegen/slice_buffer.h +++ b/include/grpc/impl/codegen/slice_buffer.h @@ -73,8 +73,8 @@ GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice); slice at the returned index in sb->slices) The implementation MAY decide to concatenate data at the end of a small slice added in this fashion. */ -GPRAPI size_t -gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, gpr_slice slice); +GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, + gpr_slice slice); GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices, size_t n); /* add a very small (less than 8 bytes) amount of data to the end of a slice diff --git a/include/grpc/impl/codegen/time.h b/include/grpc/impl/codegen/time.h index c22bedfe77..b4f45097c7 100644 --- a/include/grpc/impl/codegen/time.h +++ b/include/grpc/impl/codegen/time.h @@ -88,8 +88,8 @@ GPRAPI void gpr_time_init(void); GPRAPI gpr_timespec gpr_now(gpr_clock_type clock); /* Convert a timespec from one clock to another */ -GPRAPI gpr_timespec -gpr_convert_clock_type(gpr_timespec t, gpr_clock_type target_clock); +GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t, + gpr_clock_type target_clock); /* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b respectively. */ |