19 #ifndef MIR_CLIENT_RPC_MIR_PROTOBUF_RPC_CHANNEL_H_ 20 #define MIR_CLIENT_RPC_MIR_PROTOBUF_RPC_CHANNEL_H_ 28 #include "../lifecycle_control.h" 29 #include "../ping_handler.h" 33 #include <experimental/optional> 44 class DisplayConfiguration;
47 class AsyncBufferFactory;
60 std::shared_ptr<SurfaceMap>
const& surface_map,
61 std::shared_ptr<AsyncBufferFactory>
const& buffer_factory,
62 std::shared_ptr<DisplayConfiguration>
const& disp_config,
63 std::shared_ptr<input::InputDevices>
const& input_devices,
64 std::shared_ptr<RpcReport>
const& rpc_report,
65 std::shared_ptr<LifecycleControl>
const& lifecycle_control,
66 std::shared_ptr<PingHandler>
const& ping_handler,
67 std::shared_ptr<EventSink>
const& event_sink);
72 void on_data_available()
override;
73 void on_disconnected()
override;
76 Fd watch_fd()
const override;
92 void process_next_request_first();
96 google::protobuf::MessageLite
const* parameters,
97 google::protobuf::MessageLite* response,
98 google::protobuf::Closure* complete)
override;
101 std::shared_ptr<RpcReport>
const rpc_report;
104 static constexpr
size_t size_of_header = 2;
108 void receive_file_descriptors(google::protobuf::MessageLite* response);
109 template<
class MessageType>
110 void receive_any_file_descriptors_for(MessageType* response);
111 void send_message(mir::protobuf::wire::Invocation
const& body,
112 mir::protobuf::wire::Invocation
const& invocation,
113 std::vector<mir::Fd>& fds);
116 void process_event_sequence(
std::string const& event);
118 void notify_disconnected();
120 std::weak_ptr<SurfaceMap> surface_map;
121 std::shared_ptr<AsyncBufferFactory>
const buffer_factory;
122 std::shared_ptr<DisplayConfiguration> display_configuration;
123 std::shared_ptr<input::InputDevices> input_devices;
124 std::shared_ptr<LifecycleControl> lifecycle_control;
125 std::shared_ptr<PingHandler>
const ping_handler;
126 std::shared_ptr<EventSink> event_sink;
127 std::atomic<bool> disconnected;
128 std::mutex read_mutex;
129 std::mutex write_mutex;
131 bool prioritise_next_request{
false};
132 std::experimental::optional<uint32_t> id_to_wait_for;
144 std::shared_ptr<StreamTransport>
const transport;
145 std::shared_ptr<mir::dispatch::ActionQueue>
const delayed_processor;
All things Mir.
Definition: atomic_callback.h:25
Definition: mir_basic_rpc_channel.h:59
Definition: mir_basic_rpc_channel.h:102
An adaptor that combines multiple Dispatchables into a single Dispatchable.
Definition: multiplexing_dispatchable.h:52
std::vector< uint8_t > SendBuffer
Definition: mir_basic_rpc_channel.h:57
Definition: dispatchable.h:38
Definition: mir_protobuf_rpc_channel.h:53
uint32_t FdEvents
Definition: dispatchable.h:36
Observer of IO status.
Definition: stream_transport.h:87