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;
67 class ServerStatusListener;
86 void set_command_line(
int argc,
char const* argv[]);
92 void apply_settings();
95 auto supported_pixel_formats()
const -> std::vector<MirPixelFormat>;
104 bool exited_normally();
112 void add_configuration_option(
123 void add_configuration_option(
126 double default_value);
131 void add_configuration_option(
139 void add_configuration_option(
142 char const* default_value);
147 void add_configuration_option(
155 void add_configuration_option(
167 void set_command_line_handler(
168 std::function<
void(
int argc,
char const*
const* argv)>
const& command_line_hander);
174 void set_config_filename(
std::string const& config_file);
179 auto get_options()
const -> std::shared_ptr<options::Option>;
186 void add_init_callback(std::function<
void()>
const& init_callback);
193 void add_stop_callback(std::function<
void()>
const& stop_callback);
198 void set_exception_handler(std::function<
void()>
const& exception_handler);
208 void set_terminator(
Terminator const& terminator);
228 template<
typename T>
using Builder = std::function<std::shared_ptr<T>()>;
239 void override_the_display_buffer_compositor_factory(
243 void override_the_display_configuration_report(
255 void override_the_coordinate_translator(
259 void override_the_host_lifecycle_event_listener(
293 void override_the_application_not_responding_detector(
300 template<
typename T>
using Wrapper = std::function<std::shared_ptr<T>(std::shared_ptr<T>
const&)>;
309 void wrap_display_buffer_compositor_factory(
331 auto the_compositor() const ->
std::shared_ptr<compositor::Compositor>;
335 auto the_compositor_report() const ->
std::shared_ptr<compositor::CompositorReport>;
338 auto the_composite_event_filter() const ->
std::shared_ptr<input::CompositeEventFilter>;
341 auto the_cursor_listener() const ->
std::shared_ptr<input::CursorListener>;
344 auto the_cursor() const ->
std::shared_ptr<graphics::Cursor>;
347 auto the_focus_controller() const ->
std::shared_ptr<shell::FocusController>;
350 auto the_display() const ->
std::shared_ptr<graphics::Display>;
352 auto the_display_configuration_controller() const ->
std::shared_ptr<shell::DisplayConfigurationController>;
355 auto the_gl_config() const ->
std::shared_ptr<graphics::GLConfig>;
358 auto the_graphics_platform() const ->
std::shared_ptr<graphics::Platform>;
361 auto the_input_targeter() const ->
std::shared_ptr<shell::InputTargeter>;
364 auto the_logger() const ->
std::shared_ptr<logging::Logger>;
367 auto the_main_loop() const ->
std::shared_ptr<
MainLoop>;
370 auto the_prompt_session_listener() const ->
std::shared_ptr<scene::PromptSessionListener>;
373 auto the_prompt_session_manager() const ->
std::shared_ptr<scene::PromptSessionManager>;
376 auto the_session_authorizer() const ->
std::shared_ptr<frontend::SessionAuthorizer>;
379 auto the_session_coordinator() const ->
std::shared_ptr<scene::SessionCoordinator>;
382 auto the_session_listener() const ->
std::shared_ptr<scene::SessionListener>;
385 auto the_shell() const ->
std::shared_ptr<shell::Shell>;
388 auto the_shell_display_layout() const ->
std::shared_ptr<shell::DisplayLayout>;
391 auto the_buffer_stream_factory() const ->
std::shared_ptr<scene::BufferStreamFactory>;
394 auto the_surface_factory() const ->
std::shared_ptr<scene::SurfaceFactory>;
397 auto the_surface_stack() const ->
std::shared_ptr<shell::SurfaceStack>;
400 auto the_touch_visualizer() const ->
std::shared_ptr<input::TouchVisualizer>;
403 auto the_input_device_hub() const ->
std::shared_ptr<input::InputDeviceHub>;
406 auto the_application_not_responding_detector() const ->
407 std::shared_ptr<scene::ApplicationNotRespondingDetector>;
410 auto the_persistent_surface_store() const ->
std::shared_ptr<shell::PersistentSurfaceStore>;
424 auto open_client_socket() ->
Fd;
430 auto open_client_socket(
ConnectHandler const& connect_handler) -> Fd;
435 auto open_prompt_socket() -> Fd;
439 struct ServerConfiguration;
441 std::shared_ptr<Self> const self;
All things Mir.
Definition: atomic_callback.h:25
Customise and run a Mir server.
Definition: server.h:78
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:300
std::function< void()> EmergencyCleanupHandler
Functor for processing fatal signals for any "emergency cleanup". That is: SIGQUIT, SIGABRT, SIGFPE, SIGSEGV & SIGBUS.
Definition: server.h:215
std::function< std::shared_ptr< T >()> Builder
Each of the override functions takes a builder functor of the same form.
Definition: server.h:230
Definition: main_loop.h:29
OptionType
Definition: server.h:69
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:202
std::function< void(std::shared_ptr< frontend::Session > const &session)> ConnectHandler
Definition: server.h:419
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