Ubuntu TV Media Scanner
A centralized index for removable media content.
|
The Idle class provides access to GLib's idle source mechanism. More...
#include <mediascanner/glibutils.h>
Static Public Member Functions | |
static unsigned | Add (const SourceFunction &function, int priority=G_PRIORITY_DEFAULT) |
Installs a regular idle source. More... | |
static unsigned | AddOnce (const OneCallFunction &function, int priority=G_PRIORITY_DEFAULT) |
Installs a single-call idle source. More... | |
![]() | |
static bool | Remove (unsigned id) |
Removes an event source handler. More... | |
Additional Inherited Members | |
![]() | |
typedef std::function< bool()> | SourceFunction |
The signature of a regular idle source. More... | |
typedef std::function< void()> | OneCallFunction |
The signature of a single-call idle source. More... | |
![]() | |
static gboolean | on_source_function (gpointer data) |
static gboolean | on_one_call_function (gpointer data) |
The Idle class provides access to GLib's idle source mechanism.
It manages functions which get called whenever there are no higher priority events pending to the default main loop.
|
inlinestatic |
Installs a regular idle source.
This source will be invoked until the function
returns false
. After that it be removed automatically from the list of event sources.
function | The function to be called on idle. |
priority | The priority of the idle source. |
|
inlinestatic |
Installs a single-call idle source.
This source will be called exactly once. After that it be removed automatically from the list of event sources.
function | The function to be called on idle. |
priority | The priority of the idle source. |