19 #ifndef MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
20 #define MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
65 mir::protobuf::wire::Invocation
const&
invoke,
66 google::protobuf::MessageLite* response,
67 google::protobuf::Closure* complete);
70 google::protobuf::MessageLite*
message_for_result(mir::protobuf::wire::Result& result);
83 google::protobuf::MessageLite* response,
84 google::protobuf::Closure* target)
85 : response(response), complete(target) {}
88 : response(0), complete() {}
90 google::protobuf::MessageLite* response;
91 google::protobuf::Closure* complete;
94 std::mutex
mutable mutex;
95 std::map<int, PendingCall> pending_calls;
96 std::shared_ptr<RpcReport>
const rpc_report;
107 google::protobuf::MessageLite
const* parameters,
108 google::protobuf::MessageLite* response,
109 google::protobuf::Closure* complete) = 0;
115 google::protobuf::MessageLite
const* request,
116 size_t num_side_channel_fds);
120 std::atomic<int> next_message_id;
121 int const protocol_version;
All things Mir.
Definition: atomic_callback.h:25
int next_id()
Definition: mir_basic_rpc_channel.cpp:151
void invoke(Self *self, Server *server, void(ServerX::*function)(ParameterMessage const *request, ResultMessage *response,::google::protobuf::Closure *done), Invocation const &invocation)
Definition: template_protobuf_message_processor.h:47
MirBasicRpcChannel()
Definition: mir_basic_rpc_channel.cpp:122
Definition: mir_basic_rpc_channel.h:59
void complete_response(mir::protobuf::wire::Result &result)
Definition: mir_basic_rpc_channel.cpp:75
Definition: mir_basic_rpc_channel.h:100
virtual ~MirBasicRpcChannel()
std::vector< uint8_t > SendBuffer
Definition: mir_basic_rpc_channel.h:57
void save_completion_details(mir::protobuf::wire::Invocation const &invoke, google::protobuf::MessageLite *response, google::protobuf::Closure *complete)
Definition: mir_basic_rpc_channel.cpp:59
void force_completion()
Definition: mir_basic_rpc_channel.cpp:100
google::protobuf::MessageLite * message_for_result(mir::protobuf::wire::Result &result)
Definition: mir_basic_rpc_channel.cpp:69
Definition: mir_basic_rpc_channel.h:28
virtual void call_method(std::string const &method_name, google::protobuf::MessageLite const *parameters, google::protobuf::MessageLite *response, google::protobuf::Closure *complete)=0
PendingCallCache(std::shared_ptr< RpcReport > const &rpc_report)
Definition: mir_basic_rpc_channel.cpp:53
bool empty() const
Definition: mir_basic_rpc_channel.cpp:114
mir::protobuf::wire::Invocation invocation_for(std::string const &method_name, google::protobuf::MessageLite const *request, size_t num_side_channel_fds)
Definition: mir_basic_rpc_channel.cpp:130