Mir

libmir-server needs API for initializing server instance

Bug #1122386 reported by Robert Carr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Alan Griffiths

Bug Description

Currently we have some code in main.cpp related to initializing the mir instance (setting required signal handlers, parsing options, etc...).

In order to enable shells to utilize libmir-server in a uniform way, we should probably provide some API like:

mir::DisplayServerInstance::DisplayServerInstance(mir::ServerConfiguration)
mir::DisplayServerInstance::run(int argc, char **argv, std::function<void(mir::DisplayServer *)> server_ready)

Related branches

Revision history for this message
Robert Carr (robertcarr) wrote :

The qt-poc branch contains a DisplayServerInstance class and example usage in src/main.cpp and src/demo-shell/demo_shell_main.cpp .

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Rather than adding:

class mir::DisplayServerInstance and
mir::DisplayServerInstance::run(int argc, char **argv, std::function<void(mir::DisplayServer *)> server_ready)

I'd suggest the configuration object deals with the command line. Vis:

mir::DefaultServerConfiguration::DefaultServerConfiguration(int argc, char const**argv);

If a callback is needed, then why not add that to DisplayServer::start()?

Changed in mir:
status: New → Triaged
importance: Undecided → Medium
information type: Proprietary → Public
Revision history for this message
Robert Carr (robertcarr) wrote :

Fixed through the server configuration changes and mir::run_mir

Changed in mir:
status: Triaged → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Which branch fixed it?

Changed in mir:
milestone: none → 0.0.3
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.