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;
49 class PersistentSurfaceStore;
55 class ApplicationNotRespondingDetector;
56 class BufferStreamFactory;
57 class PromptSessionListener;
58 class PromptSessionManager;
59 class SessionListener;
60 class SessionCoordinator;
62 class CoordinateTranslator;
71 class ServerStatusListener;
90 void set_command_line(
int argc,
char const* argv[]);
96 void apply_settings();
99 auto supported_pixel_formats()
const -> std::vector<MirPixelFormat>;
108 bool exited_normally();
116 void add_configuration_option(
127 void add_configuration_option(
130 double default_value);
135 void add_configuration_option(
143 void add_configuration_option(
146 char const* default_value);
151 void add_configuration_option(
159 void add_configuration_option(
171 void set_command_line_handler(
172 std::function<
void(
int argc,
char const*
const* argv)>
const& command_line_hander);
178 void set_config_filename(
std::string const& config_file);
183 auto get_options()
const -> std::shared_ptr<options::Option>;
190 void add_init_callback(std::function<
void()>
const& init_callback);
197 void add_stop_callback(std::function<
void()>
const& stop_callback);
202 void set_exception_handler(std::function<
void()>
const& exception_handler);
212 void set_terminator(
Terminator const& terminator);
232 template<
typename T>
using Builder = std::function<std::shared_ptr<T>()>;
243 void override_the_display_buffer_compositor_factory(
247 void override_the_display_configuration_report(
259 void override_the_coordinate_translator(
263 void override_the_host_lifecycle_event_listener(
300 void override_the_application_not_responding_detector(
307 template<
typename T>
using Wrapper = std::function<std::shared_ptr<T>(std::shared_ptr<T>
const&)>;
316 void wrap_display_buffer_compositor_factory(
338 auto the_compositor() const ->
std::shared_ptr<compositor::Compositor>;
342 auto the_compositor_report() const ->
std::shared_ptr<compositor::CompositorReport>;
345 auto the_composite_event_filter() const ->
std::shared_ptr<input::CompositeEventFilter>;
348 auto the_cursor_listener() const ->
std::shared_ptr<input::CursorListener>;
351 auto the_cursor() const ->
std::shared_ptr<graphics::Cursor>;
354 auto the_focus_controller() const ->
std::shared_ptr<shell::FocusController>;
357 auto the_display() const ->
std::shared_ptr<graphics::Display>;
359 auto the_display_configuration_controller() const ->
std::shared_ptr<shell::DisplayConfigurationController>;
362 auto the_gl_config() const ->
std::shared_ptr<graphics::GLConfig>;
365 auto the_graphics_platform() const ->
std::shared_ptr<graphics::Platform>;
368 auto the_input_targeter() const ->
std::shared_ptr<shell::InputTargeter>;
371 auto the_logger() const ->
std::shared_ptr<logging::Logger>;
374 auto the_main_loop() const ->
std::shared_ptr<
MainLoop>;
377 auto the_prompt_session_listener() const ->
std::shared_ptr<scene::PromptSessionListener>;
380 auto the_prompt_session_manager() const ->
std::shared_ptr<scene::PromptSessionManager>;
383 auto the_session_authorizer() const ->
std::shared_ptr<frontend::SessionAuthorizer>;
386 auto the_session_coordinator() const ->
std::shared_ptr<scene::SessionCoordinator>;
389 auto the_session_listener() const ->
std::shared_ptr<scene::SessionListener>;
392 auto the_shell() const ->
std::shared_ptr<shell::Shell>;
395 auto the_shell_display_layout() const ->
std::shared_ptr<shell::DisplayLayout>;
398 auto the_buffer_stream_factory() const ->
std::shared_ptr<scene::BufferStreamFactory>;
401 auto the_surface_factory() const ->
std::shared_ptr<scene::SurfaceFactory>;
404 auto the_surface_stack() const ->
std::shared_ptr<shell::SurfaceStack>;
407 auto the_touch_visualizer() const ->
std::shared_ptr<input::TouchVisualizer>;
410 auto the_input_device_hub() const ->
std::shared_ptr<input::InputDeviceHub>;
413 auto the_application_not_responding_detector() const ->
414 std::shared_ptr<scene::ApplicationNotRespondingDetector>;
417 auto the_persistent_surface_store() const ->
std::shared_ptr<shell::PersistentSurfaceStore>;
431 auto open_client_socket() ->
Fd;
437 auto open_client_socket(
ConnectHandler const& connect_handler) -> Fd;
442 auto open_prompt_socket() -> Fd;
446 struct ServerConfiguration;
448 std::shared_ptr<Self> const self;
Definition: as_render_target.h:27
Customise and run a Mir server.
Definition: server.h:82
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:307
std::function< void()> EmergencyCleanupHandler
Functor for processing fatal signals for any "emergency cleanup". That is: SIGQUIT, SIGABRT, SIGFPE, SIGSEGV & SIGBUS.
Definition: server.h:219
std::function< std::shared_ptr< T >()> Builder
Each of the override functions takes a builder functor of the same form.
Definition: server.h:234
Definition: main_loop.h:30
OptionType
Definition: server.h:73
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:206
std::function< void(std::shared_ptr< frontend::Session > const &session)> ConnectHandler
Definition: server.h:426
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