19 #ifndef MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
20 #define MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
22 #include <google/protobuf/service.h>
23 #include <google/protobuf/descriptor.h>
59 google::protobuf::Message* response,
60 std::shared_ptr<google::protobuf::Closure>
const& complete);
74 google::protobuf::Message* response,
75 std::shared_ptr<google::protobuf::Closure>
const& target)
76 : response(response), complete(target) {}
79 : response(0), complete() {}
81 google::protobuf::Message* response;
82 std::shared_ptr<google::protobuf::Closure> complete;
85 std::mutex
mutable mutex;
86 std::map<int, PendingCall> pending_calls;
87 std::shared_ptr<RpcReport>
const rpc_report;
99 google::protobuf::MethodDescriptor
const* method,
100 google::protobuf::Message
const* request);
104 std::atomic<int> next_message_id;
All things Mir.
Definition: aging_buffer.h:24
Definition: mir_protobuf_wire.pb.h:43
void invoke(ProtobufMessageProcessor *self, DisplayServer *server, void(mir::protobuf::DisplayServer::*function)(::google::protobuf::RpcController *controller, const protobuf::SurfaceId *request, protobuf::Buffer *response,::google::protobuf::Closure *done), Invocation const &invocation)
Definition: protobuf_message_processor.cpp:66
int next_id()
Definition: mir_basic_rpc_channel.cpp:124
MirBasicRpcChannel()
Definition: mir_basic_rpc_channel.cpp:95
Definition: mir_basic_rpc_channel.h:52
void complete_response(mir::protobuf::wire::Result &result)
Definition: mir_basic_rpc_channel.cpp:47
Definition: mir_basic_rpc_channel.h:91
~MirBasicRpcChannel()
Definition: mir_basic_rpc_channel.cpp:100
std::vector< uint8_t > SendBuffer
Definition: mir_basic_rpc_channel.h:50
void force_completion()
Definition: mir_basic_rpc_channel.cpp:73
Definition: mir_protobuf_wire.pb.h:165
void save_completion_details(mir::protobuf::wire::Invocation const &invoke, google::protobuf::Message *response, std::shared_ptr< google::protobuf::Closure > const &complete)
Definition: mir_basic_rpc_channel.cpp:37
PendingCallCache(std::shared_ptr< RpcReport > const &rpc_report)
Definition: mir_basic_rpc_channel.cpp:31
mir::protobuf::wire::Invocation invocation_for(google::protobuf::MethodDescriptor const *method, google::protobuf::Message const *request)
Definition: mir_basic_rpc_channel.cpp:105
bool empty() const
Definition: mir_basic_rpc_channel.cpp:87