aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/async_generic_service.h5
-rw-r--r--include/grpc++/async_unary_call.h7
-rw-r--r--include/grpc++/byte_buffer.h4
-rw-r--r--include/grpc++/channel_interface.h4
-rw-r--r--include/grpc++/client_context.h30
-rw-r--r--include/grpc++/completion_queue.h24
-rw-r--r--include/grpc++/config.h7
-rw-r--r--include/grpc++/credentials.h4
-rw-r--r--include/grpc++/generic_stub.h2
-rw-r--r--include/grpc++/impl/call.h72
-rw-r--r--include/grpc++/impl/client_unary_call.h8
11 files changed, 81 insertions, 86 deletions
diff --git a/include/grpc++/async_generic_service.h b/include/grpc++/async_generic_service.h
index d10a56c7f7..911d31cb1f 100644
--- a/include/grpc++/async_generic_service.h
+++ b/include/grpc++/async_generic_service.h
@@ -41,7 +41,8 @@ struct grpc_server;
namespace grpc {
-typedef ServerAsyncReaderWriter<ByteBuffer, ByteBuffer> GenericServerAsyncReaderWriter;
+typedef ServerAsyncReaderWriter<ByteBuffer, ByteBuffer>
+ GenericServerAsyncReaderWriter;
class GenericServerContext GRPC_FINAL : public ServerContext {
public:
@@ -74,6 +75,6 @@ class AsyncGenericService GRPC_FINAL {
Server* server_;
};
-} // namespace grpc
+} // namespace grpc
#endif // GRPCXX_ASYNC_GENERIC_SERVICE_H
diff --git a/include/grpc++/async_unary_call.h b/include/grpc++/async_unary_call.h
index 658941bb6d..d1d5be5b50 100644
--- a/include/grpc++/async_unary_call.h
+++ b/include/grpc++/async_unary_call.h
@@ -48,10 +48,9 @@ template <class R>
class ClientAsyncResponseReader GRPC_FINAL {
public:
ClientAsyncResponseReader(ChannelInterface* channel, CompletionQueue* cq,
- const RpcMethod& method, ClientContext* context,
- const grpc::protobuf::Message& request, void* tag)
- : context_(context),
- call_(channel->CreateCall(method, context, cq)) {
+ const RpcMethod& method, ClientContext* context,
+ const grpc::protobuf::Message& request, void* tag)
+ : context_(context), call_(channel->CreateCall(method, context, cq)) {
init_buf_.Reset(tag);
init_buf_.AddSendInitialMetadata(&context->send_initial_metadata_);
init_buf_.AddSendMessage(request);
diff --git a/include/grpc++/byte_buffer.h b/include/grpc++/byte_buffer.h
index e864ca3bba..ceb62622fd 100644
--- a/include/grpc++/byte_buffer.h
+++ b/include/grpc++/byte_buffer.h
@@ -72,9 +72,7 @@ class ByteBuffer GRPC_FINAL {
buffer_ = buf;
}
- grpc_byte_buffer* buffer() const {
- return buffer_;
- }
+ grpc_byte_buffer* buffer() const { return buffer_; }
grpc_byte_buffer* buffer_;
};
diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h
index 51260aed3d..7d50b45280 100644
--- a/include/grpc++/channel_interface.h
+++ b/include/grpc++/channel_interface.h
@@ -51,8 +51,8 @@ class ChannelInterface : public CallHook {
public:
virtual ~ChannelInterface() {}
- virtual Call CreateCall(const RpcMethod &method, ClientContext *context,
- CompletionQueue *cq) = 0;
+ virtual Call CreateCall(const RpcMethod& method, ClientContext* context,
+ CompletionQueue* cq) = 0;
};
} // namespace grpc
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index c55d7c2d58..4e7f5a7be0 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -74,8 +74,8 @@ class ClientContext {
ClientContext();
~ClientContext();
- void AddMetadata(const grpc::string &meta_key,
- const grpc::string &meta_value);
+ void AddMetadata(const grpc::string& meta_key,
+ const grpc::string& meta_value);
const std::multimap<grpc::string, grpc::string>& GetServerInitialMetadata() {
GPR_ASSERT(initial_metadata_received_);
@@ -87,19 +87,17 @@ class ClientContext {
return trailing_metadata_;
}
- void set_absolute_deadline(const system_clock::time_point &deadline);
+ void set_absolute_deadline(const system_clock::time_point& deadline);
system_clock::time_point absolute_deadline();
- void set_authority(const grpc::string& authority) {
- authority_ = authority;
- }
+ void set_authority(const grpc::string& authority) { authority_ = authority; }
void TryCancel();
private:
// Disallow copy and assign.
- ClientContext(const ClientContext &);
- ClientContext &operator=(const ClientContext &);
+ ClientContext(const ClientContext&);
+ ClientContext& operator=(const ClientContext&);
friend class CallOpBuffer;
friend class Channel;
@@ -118,24 +116,22 @@ class ClientContext {
template <class R>
friend class ::grpc::ClientAsyncResponseReader;
- grpc_call *call() { return call_; }
- void set_call(grpc_call *call) {
+ grpc_call* call() { return call_; }
+ void set_call(grpc_call* call) {
GPR_ASSERT(call_ == nullptr);
call_ = call;
}
- grpc_completion_queue *cq() { return cq_; }
- void set_cq(grpc_completion_queue *cq) { cq_ = cq; }
+ grpc_completion_queue* cq() { return cq_; }
+ void set_cq(grpc_completion_queue* cq) { cq_ = cq; }
gpr_timespec RawDeadline() { return absolute_deadline_; }
- grpc::string authority() {
- return authority_;
- }
+ grpc::string authority() { return authority_; }
bool initial_metadata_received_;
- grpc_call *call_;
- grpc_completion_queue *cq_;
+ grpc_call* call_;
+ grpc_completion_queue* cq_;
gpr_timespec absolute_deadline_;
grpc::string authority_;
std::multimap<grpc::string, grpc::string> send_initial_metadata_;
diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h
index f741e3c36b..1caaa8d6cf 100644
--- a/include/grpc++/completion_queue.h
+++ b/include/grpc++/completion_queue.h
@@ -65,26 +65,26 @@ class CompletionQueueTag {
// to do)
// If this function returns false, the tag is dropped and not returned
// from the completion queue
- virtual bool FinalizeResult(void **tag, bool *status) = 0;
+ virtual bool FinalizeResult(void** tag, bool* status) = 0;
};
// grpc_completion_queue wrapper class
class CompletionQueue {
public:
CompletionQueue();
- explicit CompletionQueue(grpc_completion_queue *take);
+ explicit CompletionQueue(grpc_completion_queue* take);
~CompletionQueue();
// Blocking read from queue.
// Returns true if an event was received, false if the queue is ready
// for destruction.
- bool Next(void **tag, bool *ok);
+ bool Next(void** tag, bool* ok);
// Shutdown has to be called, and the CompletionQueue can only be
// destructed when false is returned from Next().
void Shutdown();
- grpc_completion_queue *cq() { return cq_; }
+ grpc_completion_queue* cq() { return cq_; }
private:
// Friend synchronous wrappers so that they can access Pluck(), which is
@@ -103,20 +103,20 @@ class CompletionQueue {
friend class ::grpc::ServerReaderWriter;
friend class ::grpc::Server;
friend class ::grpc::ServerContext;
- friend Status BlockingUnaryCall(ChannelInterface *channel,
- const RpcMethod &method,
- ClientContext *context,
- const grpc::protobuf::Message &request,
- grpc::protobuf::Message *result);
+ friend Status BlockingUnaryCall(ChannelInterface* channel,
+ const RpcMethod& method,
+ ClientContext* context,
+ const grpc::protobuf::Message& request,
+ grpc::protobuf::Message* result);
// Wraps grpc_completion_queue_pluck.
// Cannot be mixed with calls to Next().
- bool Pluck(CompletionQueueTag *tag);
+ bool Pluck(CompletionQueueTag* tag);
// Does a single polling pluck on tag
- void TryPluck(CompletionQueueTag *tag);
+ void TryPluck(CompletionQueueTag* tag);
- grpc_completion_queue *cq_; // owned
+ grpc_completion_queue* cq_; // owned
};
} // namespace grpc
diff --git a/include/grpc++/config.h b/include/grpc++/config.h
index 0267b85215..35bf507364 100644
--- a/include/grpc++/config.h
+++ b/include/grpc++/config.h
@@ -59,11 +59,12 @@
#ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
#include <google/protobuf/io/zero_copy_stream.h>
-#define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ::google::protobuf::io::ZeroCopyOutputStream
-#define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ::google::protobuf::io::ZeroCopyInputStream
+#define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM \
+ ::google::protobuf::io::ZeroCopyOutputStream
+#define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM \
+ ::google::protobuf::io::ZeroCopyInputStream
#endif
-
namespace grpc {
typedef GRPC_CUSTOM_STRING string;
diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h
index 59ad638f47..c3f48592cc 100644
--- a/include/grpc++/credentials.h
+++ b/include/grpc++/credentials.h
@@ -50,8 +50,8 @@ class Credentials {
protected:
friend std::unique_ptr<Credentials> CompositeCredentials(
- const std::unique_ptr<Credentials>& creds1,
- const std::unique_ptr<Credentials>& creds2);
+ const std::unique_ptr<Credentials>& creds1,
+ const std::unique_ptr<Credentials>& creds2);
virtual SecureCredentials* AsSecureCredentials() = 0;
diff --git a/include/grpc++/generic_stub.h b/include/grpc++/generic_stub.h
index 6038d7c66c..d4c8380ad4 100644
--- a/include/grpc++/generic_stub.h
+++ b/include/grpc++/generic_stub.h
@@ -57,6 +57,6 @@ class GenericStub GRPC_FINAL {
std::shared_ptr<ChannelInterface> channel_;
};
-} // namespace grpc
+} // namespace grpc
#endif // GRPCXX_GENERIC_STUB_H
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h
index a8551ad459..e117ac6313 100644
--- a/include/grpc++/impl/call.h
+++ b/include/grpc++/impl/call.h
@@ -55,89 +55,89 @@ class CallOpBuffer : public CompletionQueueTag {
CallOpBuffer();
~CallOpBuffer();
- void Reset(void *next_return_tag);
+ void Reset(void* next_return_tag);
// Does not take ownership.
void AddSendInitialMetadata(
- std::multimap<grpc::string, grpc::string> *metadata);
- void AddSendInitialMetadata(ClientContext *ctx);
- void AddRecvInitialMetadata(ClientContext *ctx);
- void AddSendMessage(const grpc::protobuf::Message &message);
+ std::multimap<grpc::string, grpc::string>* metadata);
+ void AddSendInitialMetadata(ClientContext* ctx);
+ void AddRecvInitialMetadata(ClientContext* ctx);
+ void AddSendMessage(const grpc::protobuf::Message& message);
void AddSendMessage(const ByteBuffer& message);
- void AddRecvMessage(grpc::protobuf::Message *message);
- void AddRecvMessage(ByteBuffer *message);
+ void AddRecvMessage(grpc::protobuf::Message* message);
+ void AddRecvMessage(ByteBuffer* message);
void AddClientSendClose();
- void AddClientRecvStatus(ClientContext *ctx, Status *status);
- void AddServerSendStatus(std::multimap<grpc::string, grpc::string> *metadata,
- const Status &status);
- void AddServerRecvClose(bool *cancelled);
+ void AddClientRecvStatus(ClientContext* ctx, Status* status);
+ void AddServerSendStatus(std::multimap<grpc::string, grpc::string>* metadata,
+ const Status& status);
+ void AddServerRecvClose(bool* cancelled);
// INTERNAL API:
// Convert to an array of grpc_op elements
- void FillOps(grpc_op *ops, size_t *nops);
+ void FillOps(grpc_op* ops, size_t* nops);
// Called by completion queue just prior to returning from Next() or Pluck()
- bool FinalizeResult(void **tag, bool *status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
bool got_message;
private:
- void *return_tag_;
+ void* return_tag_;
// Send initial metadata
bool send_initial_metadata_;
size_t initial_metadata_count_;
- grpc_metadata *initial_metadata_;
+ grpc_metadata* initial_metadata_;
// Recv initial metadta
- std::multimap<grpc::string, grpc::string> *recv_initial_metadata_;
+ std::multimap<grpc::string, grpc::string>* recv_initial_metadata_;
grpc_metadata_array recv_initial_metadata_arr_;
// Send message
- const grpc::protobuf::Message *send_message_;
- const ByteBuffer *send_message_buffer_;
- grpc_byte_buffer *send_buf_;
+ const grpc::protobuf::Message* send_message_;
+ const ByteBuffer* send_message_buffer_;
+ grpc_byte_buffer* send_buf_;
// Recv message
- grpc::protobuf::Message *recv_message_;
- ByteBuffer *recv_message_buffer_;
- grpc_byte_buffer *recv_buf_;
+ grpc::protobuf::Message* recv_message_;
+ ByteBuffer* recv_message_buffer_;
+ grpc_byte_buffer* recv_buf_;
// Client send close
bool client_send_close_;
// Client recv status
- std::multimap<grpc::string, grpc::string> *recv_trailing_metadata_;
- Status *recv_status_;
+ std::multimap<grpc::string, grpc::string>* recv_trailing_metadata_;
+ Status* recv_status_;
grpc_metadata_array recv_trailing_metadata_arr_;
grpc_status_code status_code_;
- char *status_details_;
+ char* status_details_;
size_t status_details_capacity_;
// Server send status
- const Status *send_status_;
+ const Status* send_status_;
size_t trailing_metadata_count_;
- grpc_metadata *trailing_metadata_;
+ grpc_metadata* trailing_metadata_;
int cancelled_buf_;
- bool *recv_closed_;
+ bool* recv_closed_;
};
// Channel and Server implement this to allow them to hook performing ops
class CallHook {
public:
virtual ~CallHook() {}
- virtual void PerformOpsOnCall(CallOpBuffer *ops, Call *call) = 0;
+ virtual void PerformOpsOnCall(CallOpBuffer* ops, Call* call) = 0;
};
// Straightforward wrapping of the C call object
class Call GRPC_FINAL {
public:
/* call is owned by the caller */
- Call(grpc_call *call, CallHook *call_hook_, CompletionQueue *cq);
+ Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq);
- void PerformOps(CallOpBuffer *buffer);
+ void PerformOps(CallOpBuffer* buffer);
- grpc_call *call() { return call_; }
- CompletionQueue *cq() { return cq_; }
+ grpc_call* call() { return call_; }
+ CompletionQueue* cq() { return cq_; }
private:
- CallHook *call_hook_;
- CompletionQueue *cq_;
- grpc_call *call_;
+ CallHook* call_hook_;
+ CompletionQueue* cq_;
+ grpc_call* call_;
};
} // namespace grpc
diff --git a/include/grpc++/impl/client_unary_call.h b/include/grpc++/impl/client_unary_call.h
index fd9715da50..0e8aeed781 100644
--- a/include/grpc++/impl/client_unary_call.h
+++ b/include/grpc++/impl/client_unary_call.h
@@ -45,10 +45,10 @@ class RpcMethod;
class Status;
// Wrapper that performs a blocking unary call
-Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method,
- ClientContext *context,
- const grpc::protobuf::Message &request,
- grpc::protobuf::Message *result);
+Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method,
+ ClientContext* context,
+ const grpc::protobuf::Message& request,
+ grpc::protobuf::Message* result);
} // namespace grpc