31 namespace compositor {
class Compositor;
class DisplayBufferCompositorFactory;
class CompositorReport; }
32 namespace frontend {
class SessionAuthorizer;
class Session;
class SessionMediatorReport; }
33 namespace graphics {
class Cursor;
class Platform;
class Display;
class GLConfig;
class DisplayConfigurationPolicy;
class DisplayConfigurationReport; }
34 namespace input {
class CompositeEventFilter;
class InputDispatcher;
class CursorListener;
class CursorImages;
class TouchVisualizer;
class InputDeviceHub;}
35 namespace logging {
class Logger; }
36 namespace options {
class Option; }
39 using Secret = std::vector<uint8_t>;
45 class DisplayConfigurationController;
46 class FocusController;
47 class HostLifecycleEventListener;
54 class ApplicationNotRespondingDetector;
55 class BufferStreamFactory;
56 class PromptSessionListener;
57 class PromptSessionManager;
58 class SessionListener;
59 class SessionCoordinator;
61 class CoordinateTranslator;
66 class ServerStatusListener;
85 void set_command_line(
int argc,
char const* argv[]);
92 void override_the_cookie_authority(
93 std::function<std::shared_ptr<cookie::Authority>()>
const& cookie_authority_builder);
97 void apply_settings();
100 auto supported_pixel_formats()
const -> std::vector<MirPixelFormat>;
109 bool exited_normally();
117 void add_configuration_option(
128 void add_configuration_option(
131 double default_value);
136 void add_configuration_option(
144 void add_configuration_option(
147 char const* default_value);
152 void add_configuration_option(
160 void add_configuration_option(
172 void set_command_line_handler(
173 std::function<
void(
int argc,
char const*
const* argv)>
const& command_line_hander);
179 void set_config_filename(
std::string const& config_file);
184 auto get_options()
const -> std::shared_ptr<options::Option>;
191 void add_init_callback(std::function<
void()>
const& init_callback);
199 void set_exception_handler(std::function<
void()>
const& exception_handler);
209 void set_terminator(
Terminator const& terminator);
229 template<
typename T>
using Builder = std::function<std::shared_ptr<T>()>;
240 void override_the_display_buffer_compositor_factory(
244 void override_the_display_configuration_report(
251 void override_the_coordinate_translator(
255 void override_the_host_lifecycle_event_listener(
289 void override_the_application_not_responding_detector(
293 template<
typename T>
using Wrapper = std::function<std::shared_ptr<T>(std::shared_ptr<T>
const&)>;
302 void wrap_display_buffer_compositor_factory(
321 auto the_compositor() const ->
std::shared_ptr<compositor::Compositor>;
325 auto the_compositor_report() const ->
std::shared_ptr<compositor::CompositorReport>;
328 auto the_composite_event_filter() const ->
std::shared_ptr<input::CompositeEventFilter>;
331 auto the_cursor_listener() const ->
std::shared_ptr<input::CursorListener>;
334 auto the_cursor() const ->
std::shared_ptr<graphics::Cursor>;
337 auto the_focus_controller() const ->
std::shared_ptr<shell::FocusController>;
340 auto the_display() const ->
std::shared_ptr<graphics::Display>;
342 auto the_display_configuration_controller() const ->
std::shared_ptr<shell::DisplayConfigurationController>;
345 auto the_gl_config() const ->
std::shared_ptr<graphics::GLConfig>;
348 auto the_graphics_platform() const ->
std::shared_ptr<graphics::Platform>;
351 auto the_input_targeter() const ->
std::shared_ptr<shell::InputTargeter>;
354 auto the_logger() const ->
std::shared_ptr<logging::Logger>;
357 auto the_main_loop() const ->
std::shared_ptr<
MainLoop>;
360 auto the_prompt_session_listener() const ->
std::shared_ptr<scene::PromptSessionListener>;
363 auto the_prompt_session_manager() const ->
std::shared_ptr<scene::PromptSessionManager>;
366 auto the_session_authorizer() const ->
std::shared_ptr<frontend::SessionAuthorizer>;
369 auto the_session_coordinator() const ->
std::shared_ptr<scene::SessionCoordinator>;
372 auto the_session_listener() const ->
std::shared_ptr<scene::SessionListener>;
375 auto the_shell() const ->
std::shared_ptr<shell::Shell>;
378 auto the_shell_display_layout() const ->
std::shared_ptr<shell::DisplayLayout>;
381 auto the_buffer_stream_factory() const ->
std::shared_ptr<scene::BufferStreamFactory>;
384 auto the_surface_factory() const ->
std::shared_ptr<scene::SurfaceFactory>;
387 auto the_surface_stack() const ->
std::shared_ptr<shell::SurfaceStack>;
390 auto the_touch_visualizer() const ->
std::shared_ptr<input::TouchVisualizer>;
393 auto the_input_device_hub() const ->
std::shared_ptr<input::InputDeviceHub>;
396 auto the_application_not_responding_detector() const ->
397 std::shared_ptr<scene::ApplicationNotRespondingDetector>;
410 auto open_client_socket() ->
Fd;
416 auto open_client_socket(
ConnectHandler const& connect_handler) -> Fd;
421 auto open_prompt_socket() -> Fd;
425 struct ServerConfiguration;
427 std::shared_ptr<Self> const self;
All things Mir.
Definition: atomic_callback.h:25
Customise and run a Mir server.
Definition: server.h:77
std::function< std::shared_ptr< T >(std::shared_ptr< T > const &)> Wrapper
Each of the wrap functions takes a wrapper functor of the same form.
Definition: server.h:293
std::function< void()> EmergencyCleanupHandler
Functor for processing fatal signals for any "emergency cleanup". That is: SIGQUIT, SIGABRT, SIGFPE, SIGSEGV & SIGBUS.
Definition: server.h:216
std::function< std::shared_ptr< T >()> Builder
Each of the override functions takes a builder functor of the same form.
Definition: server.h:231
Definition: main_loop.h:29
OptionType
Definition: server.h:68
std::promise< bool > stop
Definition: in.cpp:28
std::function< void(int signal)> Terminator
Functor for processing SIGTERM or SIGINT This will not be called directly by a signal handler: arbitr...
Definition: server.h:203
std::function< void(std::shared_ptr< frontend::Session > const &session)> ConnectHandler
Definition: server.h:405
std::function< std::shared_ptr< WindowManager >(FocusController *focus_controller)> WindowManagerBuilder
WindowManagers are built while initializing an AbstractShell, so a builder functor is needed...
Definition: window_manager_builder.h:34
std::vector< uint8_t > Secret
Definition: authority.h:33