20 #ifndef MPD_UPDATE_SERVICE_HXX 21 #define MPD_UPDATE_SERVICE_HXX 47 static constexpr
unsigned update_task_id_max = 1 << 15;
49 unsigned update_task_id;
80 unsigned Enqueue(
const char *path,
bool discard);
97 virtual void RunDeferred()
override;
101 static void Task(
void *ctx);
105 unsigned GenerateId();
unsigned GetId() const
Returns a non-zero job id when we are currently updating the database.
An event loop that polls for events on file/socket descriptors.
UpdateService(EventLoop &_loop, SimpleDatabase &_db, CompositeStorage &_storage, DatabaseListener &_listener)
An object that listens to events from the Database.
Defer execution of an event into an EventLoop.
gcc_nonnull_all unsigned Enqueue(const char *path, bool discard)
Add this path to the database update queue.
This class manages the update queue and runs the update thread.
void CancelMount(const char *uri)
Cancel all updates for the given mount point.
A Storage implementation that combines multiple other Storage instances in one virtual tree...
void CancelAllAsync()
Clear the queue and cancel the current update.
const Storage const char * uri