MPD
0.20.18
|
This class manages the update queue and runs the update thread. More...
#include <Service.hxx>
Public Member Functions | |
UpdateService (EventLoop &_loop, SimpleDatabase &_db, CompositeStorage &_storage, DatabaseListener &_listener) | |
~UpdateService () | |
unsigned | GetId () const |
Returns a non-zero job id when we are currently updating the database. More... | |
gcc_nonnull_all unsigned | Enqueue (const char *path, bool discard) |
Add this path to the database update queue. More... | |
void | CancelAllAsync () |
Clear the queue and cancel the current update. More... | |
void | CancelMount (const char *uri) |
Cancel all updates for the given mount point. More... | |
This class manages the update queue and runs the update thread.
Definition at line 37 of file Service.hxx.
UpdateService::UpdateService | ( | EventLoop & | _loop, |
SimpleDatabase & | _db, | ||
CompositeStorage & | _storage, | ||
DatabaseListener & | _listener | ||
) |
UpdateService::~UpdateService | ( | ) |
void UpdateService::CancelAllAsync | ( | ) |
Clear the queue and cancel the current update.
Does not wait for the thread to exit.
void UpdateService::CancelMount | ( | const char * | uri | ) |
Cancel all updates for the given mount point.
If an update is already running for it, the method will wait for cancellation to complete.
gcc_nonnull_all unsigned UpdateService::Enqueue | ( | const char * | path, |
bool | discard | ||
) |
Add this path to the database update queue.
path | a path to update; if an empty string, the whole music directory is updated |
|
inline |
Returns a non-zero job id when we are currently updating the database.
Definition at line 68 of file Service.hxx.