Music Hub  ..
A session-wide music playback service
qt::core::world Namespace Reference

Namespaces

 detail
 

Functions

void build_and_run (int argc, char **argv, const std::function< void()> &ready)
 Sets up the Qt core world and executes its event loop. Blocks until destroy() is called. More...
 
void destroy ()
 Destroys the Qt core world and quits its event loop. More...
 
std::future< void > enter_with_task (const std::function< void()> &task)
 Enters the Qt core world and schedules the given task for execution. More...
 
template<typename T >
std::future< T > enter_with_task_and_expect_result (const std::function< T()> &task)
 Enters the Qt core world and schedules the given task for execution. More...
 

Function Documentation

void qt::core::world::build_and_run ( int  argc,
char **  argv,
const std::function< void()> &  ready 
)

Sets up the Qt core world and executes its event loop. Blocks until destroy() is called.

Parameters
argcNumber of arguments in argv.
argvArray of command-line arguments.
readyFunctor be called when the world has been setup and is about to be executed.
Exceptions
std::runtime_errorin case of errors.

Definition at line 132 of file qtbridge.cpp.

References qt::core::world::detail::coreApplicationInstance(), qt::core::world::detail::createCoreApplicationInstanceWithArgs(), qt::core::world::detail::destroyCoreApplicationInstace(), and qt::core::world::detail::task_handler().

Referenced by CallMonitorPrivate::CallMonitorPrivate().

+ Here is the call graph for this function:

void qt::core::world::destroy ( )

Destroys the Qt core world and quits its event loop.

Definition at line 154 of file qtbridge.cpp.

References enter_with_task().

Referenced by CallMonitorPrivate::~CallMonitorPrivate().

+ Here is the call graph for this function:

std::future< void > qt::core::world::enter_with_task ( const std::function< void()> &  task)

Enters the Qt core world and schedules the given task for execution.

Parameters
taskThe task to be executed in the Qt core world.
Returns
A std::future that can be waited for to synchronize to the world's internal event loop.

Definition at line 163 of file qtbridge.cpp.

References qt::core::world::detail::TaskEvent::get_future(), and qt::core::world::detail::task_handler().

Referenced by CallMonitorPrivate::CallMonitorPrivate(), destroy(), and enter_with_task_and_expect_result().

+ Here is the call graph for this function:

template<typename T >
std::future<T> qt::core::world::enter_with_task_and_expect_result ( const std::function< T()> &  task)
inline

Enters the Qt core world and schedules the given task for execution.

Parameters
taskThe task to be executed in the Qt core world.
Returns
A std::future that can be waited for to get hold of the result of the task.

Definition at line 63 of file qtbridge.h.

References enter_with_task().

+ Here is the call graph for this function: