20 #ifndef MIR_FRONTEND_SESSION_MEDIATOR_H_
21 #define MIR_FRONTEND_SESSION_MEDIATOR_H_
23 #include "mir_protobuf.pb.h"
28 #include <unordered_map>
40 class GraphicBufferAllocator;
48 class ClientBufferTracker;
53 class SessionMediatorReport;
64 std::shared_ptr<Shell>
const& shell,
65 std::shared_ptr<graphics::Platform>
const& graphics_platform,
66 std::shared_ptr<frontend::DisplayChanger>
const& display_changer,
67 std::vector<MirPixelFormat>
const& surface_pixel_formats,
68 std::shared_ptr<SessionMediatorReport>
const& report,
69 std::shared_ptr<EventSink>
const& event_sink,
70 std::shared_ptr<ResourceCache>
const& resource_cache,
71 std::shared_ptr<Screencast>
const& screencast);
76 void connect(::google::protobuf::RpcController* controller,
77 const ::mir::protobuf::ConnectParameters* request,
78 ::mir::protobuf::Connection* response,
79 ::google::protobuf::Closure* done)
override;
82 const mir::protobuf::SurfaceParameters* request,
83 mir::protobuf::Surface* response,
84 google::protobuf::Closure* done)
override;
87 google::protobuf::RpcController* controller,
89 mir::protobuf::Buffer* response,
90 google::protobuf::Closure* done)
override;
95 google::protobuf::Closure* done)
override;
97 void disconnect(google::protobuf::RpcController* controller,
98 const mir::protobuf::Void* request,
99 mir::protobuf::Void* response,
100 google::protobuf::Closure* done)
override;
103 const mir::protobuf::SurfaceSetting*,
104 mir::protobuf::SurfaceSetting*,
105 google::protobuf::Closure* done)
override;
108 const ::mir::protobuf::DisplayConfiguration* request,
109 ::mir::protobuf::DisplayConfiguration* response,
110 ::google::protobuf::Closure* done)
override;
113 const mir::protobuf::ScreencastParameters*,
114 mir::protobuf::Screencast*,
115 google::protobuf::Closure* done);
118 const mir::protobuf::ScreencastId*,
119 mir::protobuf::Void*,
120 google::protobuf::Closure* done);
123 const mir::protobuf::ScreencastId*,
124 mir::protobuf::Buffer*,
125 google::protobuf::Closure* done);
129 const mir::protobuf::DRMMagic* request,
130 mir::protobuf::DRMAuthMagicStatus* response,
131 google::protobuf::Closure* done)
override;
134 void pack_protobuf_buffer(protobuf::Buffer& protobuf_buffer,
140 std::shared_ptr<Shell>
const shell;
141 std::shared_ptr<graphics::Platform>
const graphics_platform;
143 std::vector<MirPixelFormat>
const surface_pixel_formats;
145 std::shared_ptr<frontend::DisplayChanger>
const display_changer;
146 std::shared_ptr<SessionMediatorReport>
const report;
147 std::shared_ptr<EventSink>
const event_sink;
148 std::shared_ptr<ResourceCache>
const resource_cache;
149 std::shared_ptr<Screencast>
const screencast;
151 std::unordered_map<SurfaceId,graphics::Buffer*> client_buffer_resource;
152 std::unordered_map<SurfaceId, std::shared_ptr<ClientBufferTracker>> client_buffer_tracker;
154 std::mutex session_mutex;
155 std::weak_ptr<Session> weak_session;
IntWrapper< detail::SessionsSurfaceIdTag > SurfaceId
Definition: surface_id.h:29
Definition: int_wrapper.h:27