MPD  0.20.6
Public Member Functions
UpdateService Class Referencefinal

This class manages the update queue and runs the update thread. More...

#include <Service.hxx>

Inheritance diagram for UpdateService:
[legend]
Collaboration diagram for UpdateService:
[legend]

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...
 

Detailed Description

This class manages the update queue and runs the update thread.

Definition at line 37 of file Service.hxx.

Constructor & Destructor Documentation

UpdateService::UpdateService ( EventLoop _loop,
SimpleDatabase _db,
CompositeStorage _storage,
DatabaseListener _listener 
)
UpdateService::~UpdateService ( )

Member Function Documentation

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.

Parameters
patha path to update; if an empty string, the whole music directory is updated
Returns
the job id, or 0 on error
unsigned UpdateService::GetId ( ) const
inline

Returns a non-zero job id when we are currently updating the database.

Definition at line 68 of file Service.hxx.


The documentation for this class was generated from the following file: