MirAL
|
Runner for applying initialization options to Mir. More...
#include <miral/runner.h>
Public Member Functions | |
MirRunner (int argc, char const *argv[]) | |
MirRunner (int argc, char const *argv[], char const *config_file) | |
~MirRunner () | |
void | add_start_callback (std::function< void()> const &start_callback) |
Add a callback to be invoked when the server has started, If multiple callbacks are added they will be invoked in the sequence added. More... | |
void | add_stop_callback (std::function< void()> const &stop_callback) |
Add a callback to be invoked when the server is about to stop, If multiple callbacks are added they will be invoked in the reverse sequence added. More... | |
void | set_exception_handler (std::function< void()> const &handler) |
Set a handler for exceptions caught in run_with(). run_with() invokes handler() in catch (...) blocks before returning EXIT_FAILURE. Hence the exception can be re-thrown to retrieve type information. The default action is to call mir::report_exception(std::cerr) More... | |
auto | run_with (std::initializer_list< std::function< void(::mir::Server &)>> options) -> int |
Apply the supplied initialization options and run the Mir server. More... | |
void | stop () |
Tell the Mir server to exit. More... | |
Runner for applying initialization options to Mir.
miral::MirRunner::MirRunner | ( | int | argc, |
char const * | argv[] | ||
) |
miral::MirRunner::MirRunner | ( | int | argc, |
char const * | argv[], | ||
char const * | config_file | ||
) |
miral::MirRunner::~MirRunner | ( | ) |
void miral::MirRunner::add_start_callback | ( | std::function< void()> const & | start_callback | ) |
Add a callback to be invoked when the server has started, If multiple callbacks are added they will be invoked in the sequence added.
void miral::MirRunner::add_stop_callback | ( | std::function< void()> const & | stop_callback | ) |
Add a callback to be invoked when the server is about to stop, If multiple callbacks are added they will be invoked in the reverse sequence added.
auto miral::MirRunner::run_with | ( | std::initializer_list< std::function< void(::mir::Server &)>> | options | ) | -> int |
Apply the supplied initialization options and run the Mir server.
void miral::MirRunner::set_exception_handler | ( | std::function< void()> const & | handler | ) |
Set a handler for exceptions caught in run_with(). run_with() invokes handler() in catch (...) blocks before returning EXIT_FAILURE. Hence the exception can be re-thrown to retrieve type information. The default action is to call mir::report_exception(std::cerr)
void miral::MirRunner::stop | ( | ) |
Tell the Mir server to exit.
Copyright © 2016 Canonical Ltd.
Generated on Fri Sep 30 13:21:55 UTC 2016