diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-04-24 00:12:30 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-04-24 00:38:19 +0200 |
commit | 23be2803662c19f73a66c82c9d5dbd62b537515f (patch) | |
tree | 9d8afeb18c21cddcbfb9bb014f08f1474021db98 /include/grpc++ | |
parent | b7c2035e83a9b3e346f1fd37f9ad55c2070fb02e (diff) | |
parent | 3afd92ff511f52db3ecf892d9af65053323c89cb (diff) |
Merge branch 'master' of github.com:grpc/grpc into the-purge-2
Conflicts:
src/cpp/client/channel.cc
vsprojects/vs2010/grpc++.vcxproj
vsprojects/vs2013/grpc++.vcxproj.filters
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/channel_interface.h | 1 | ||||
-rw-r--r-- | include/grpc++/impl/internal_stub.h | 9 | ||||
-rw-r--r-- | include/grpc++/impl/rpc_method.h | 10 | ||||
-rw-r--r-- | include/grpc++/impl/rpc_service_method.h | 2 |
4 files changed, 10 insertions, 12 deletions
diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h index 7d50b45280..4d48974e69 100644 --- a/include/grpc++/channel_interface.h +++ b/include/grpc++/channel_interface.h @@ -51,6 +51,7 @@ class ChannelInterface : public CallHook { public: virtual ~ChannelInterface() {} + virtual void *RegisterMethod(const char *method_name) = 0; virtual Call CreateCall(const RpcMethod& method, ClientContext* context, CompletionQueue* cq) = 0; }; diff --git a/include/grpc++/impl/internal_stub.h b/include/grpc++/impl/internal_stub.h index 2cbf1d901b..370a3b8ac5 100644 --- a/include/grpc++/impl/internal_stub.h +++ b/include/grpc++/impl/internal_stub.h @@ -42,17 +42,14 @@ namespace grpc { class InternalStub { public: - InternalStub() {} + InternalStub(const std::shared_ptr<ChannelInterface>& channel) + : channel_(channel) {} virtual ~InternalStub() {} - void set_channel(const std::shared_ptr<ChannelInterface>& channel) { - channel_ = channel; - } - ChannelInterface* channel() { return channel_.get(); } private: - std::shared_ptr<ChannelInterface> channel_; + const std::shared_ptr<ChannelInterface> channel_; }; } // namespace grpc diff --git a/include/grpc++/impl/rpc_method.h b/include/grpc++/impl/rpc_method.h index e8909ac184..50a160b08c 100644 --- a/include/grpc++/impl/rpc_method.h +++ b/include/grpc++/impl/rpc_method.h @@ -45,17 +45,17 @@ class RpcMethod { BIDI_STREAMING }; - explicit RpcMethod(const char* name) - : name_(name), method_type_(NORMAL_RPC) {} - RpcMethod(const char* name, RpcType type) : name_(name), method_type_(type) {} + RpcMethod(const char* name, RpcType type, void* channel_tag) + : name_(name), method_type_(type), channel_tag_(channel_tag) {} const char* name() const { return name_; } - RpcType method_type() const { return method_type_; } + void* channel_tag() const { return channel_tag_; } private: - const char* name_; + const char* const name_; const RpcType method_type_; + void* const channel_tag_; }; } // namespace grpc diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index 097667827a..50204d2099 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -167,7 +167,7 @@ class RpcServiceMethod : public RpcMethod { MethodHandler* handler, grpc::protobuf::Message* request_prototype, grpc::protobuf::Message* response_prototype) - : RpcMethod(name, type), + : RpcMethod(name, type, nullptr), handler_(handler), request_prototype_(request_prototype), response_prototype_(response_prototype) {} |