19 #ifndef MIR_FRONTEND_SESSION_MEDIATOR_H_
20 #define MIR_FRONTEND_SESSION_MEDIATOR_H_
40 class GraphicBufferAllocator;
49 class CoordinateTranslator;
56 class ClientBufferTracker;
60 class MessageResourceCache;
61 class SessionMediatorReport;
73 std::shared_ptr<Shell>
const& shell,
74 std::shared_ptr<graphics::PlatformIpcOperations>
const& ipc_operations,
75 std::shared_ptr<frontend::DisplayChanger>
const& display_changer,
76 std::vector<MirPixelFormat>
const& surface_pixel_formats,
77 std::shared_ptr<SessionMediatorReport>
const& report,
78 std::shared_ptr<EventSink>
const& event_sink,
79 std::shared_ptr<MessageResourceCache>
const& resource_cache,
80 std::shared_ptr<Screencast>
const& screencast,
82 std::shared_ptr<input::CursorImages>
const& cursor_images,
83 std::shared_ptr<scene::CoordinateTranslator>
const& translator);
90 void connect(::google::protobuf::RpcController* controller,
91 const ::mir::protobuf::ConnectParameters* request,
92 ::mir::protobuf::Connection* response,
93 ::google::protobuf::Closure* done)
override;
96 const mir::protobuf::SurfaceParameters* request,
97 mir::protobuf::Surface* response,
98 google::protobuf::Closure* done)
override;
101 google::protobuf::RpcController* controller,
103 mir::protobuf::Buffer* response,
104 google::protobuf::Closure* done)
override;
107 google::protobuf::RpcController* controller,
108 mir::protobuf::BufferRequest
const* request,
109 mir::protobuf::Buffer* response,
110 google::protobuf::Closure* done)
override;
114 mir::protobuf::Void*,
115 google::protobuf::Closure* done)
override;
117 void disconnect(google::protobuf::RpcController* controller,
118 const mir::protobuf::Void* request,
119 mir::protobuf::Void* response,
120 google::protobuf::Closure* done)
override;
123 const mir::protobuf::SurfaceSetting*,
124 mir::protobuf::SurfaceSetting*,
125 google::protobuf::Closure* done)
override;
128 const ::mir::protobuf::DisplayConfiguration* request,
129 ::mir::protobuf::DisplayConfiguration* response,
130 ::google::protobuf::Closure* done)
override;
133 const mir::protobuf::ScreencastParameters*,
134 mir::protobuf::Screencast*,
135 google::protobuf::Closure* done)
override;
138 const mir::protobuf::ScreencastId*,
139 mir::protobuf::Void*,
140 google::protobuf::Closure* done)
override;
143 const mir::protobuf::ScreencastId*,
144 mir::protobuf::Buffer*,
145 google::protobuf::Closure* done)
override;
148 mir::protobuf::CursorSetting
const*,
149 mir::protobuf::Void*,
150 google::protobuf::Closure* done)
override;
153 const ::mir::protobuf::PromptSessionParameters* request,
154 ::mir::protobuf::Void* response,
155 ::google::protobuf::Closure* done)
override;
158 const ::mir::protobuf::Void* request,
159 ::mir::protobuf::Void* response,
160 ::google::protobuf::Closure* done)
override;
164 const mir::protobuf::DRMMagic* request,
165 mir::protobuf::DRMAuthMagicStatus* response,
166 google::protobuf::Closure* done)
override;
169 google::protobuf::RpcController* ,
170 mir::protobuf::PlatformOperationMessage
const* request,
171 mir::protobuf::PlatformOperationMessage* response,
172 google::protobuf::Closure* done)
override;
175 ::google::protobuf::RpcController* controller,
176 ::mir::protobuf::SocketFDRequest
const* parameters,
177 ::mir::protobuf::SocketFD* response,
178 ::google::protobuf::Closure* done)
override;
182 ::google::protobuf::RpcController* controller,
183 ::mir::protobuf::CoordinateTranslationRequest
const* request,
184 ::mir::protobuf::CoordinateTranslationResponse* response,
185 ::google::protobuf::Closure *done)
override;
188 void pack_protobuf_buffer(protobuf::Buffer& protobuf_buffer,
196 std::unique_lock<std::mutex>& lock,
199 virtual std::function<void(std::shared_ptr<Session>
const&)> prompt_session_connect_handler()
const;
202 std::shared_ptr<Shell>
const shell;
203 std::shared_ptr<graphics::PlatformIpcOperations>
const ipc_operations;
205 std::vector<MirPixelFormat>
const surface_pixel_formats;
207 std::shared_ptr<frontend::DisplayChanger>
const display_changer;
208 std::shared_ptr<SessionMediatorReport>
const report;
209 std::shared_ptr<EventSink>
const event_sink;
210 std::shared_ptr<MessageResourceCache>
const resource_cache;
211 std::shared_ptr<Screencast>
const screencast;
213 std::shared_ptr<input::CursorImages>
const cursor_images;
214 std::shared_ptr<scene::CoordinateTranslator>
const translator;
218 std::mutex session_mutex;
219 std::weak_ptr<Session> weak_session;
220 std::weak_ptr<PromptSession> weak_prompt_session;
All things Mir.
Definition: buffer_stream.h:37
IntWrapper< detail::SessionsSurfaceIdTag > SurfaceId
Definition: surface_id.h:29
BufferIpcMsgType
Definition: platform_ipc_operations.h:29
Definition: connection_context.h:32
Definition: surface_tracker.h:39
Definition: int_wrapper.h:27
Definition: display_server.h:30