2 * Copyright (C) 2014-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "utils/Job.h"
16 \brief Basic implementation/interface of a CJob which interacts with the
19 class CVideoLibraryJob
: public CJob
22 ~CVideoLibraryJob() override
;
25 \brief Whether the job can be cancelled or not.
27 virtual bool CanBeCancelled() const { return false; }
30 \brief Tries to cancel the running job.
32 \return True if the job was cancelled, false otherwise
34 virtual bool Cancel() { return false; }
36 // implementation of CJob
37 bool DoWork() override
;
38 const char *GetType() const override
{ return "VideoLibraryJob"; }
39 bool operator==(const CJob
* job
) const override
{ return false; }
45 \brief Worker method to be implemented by an actual implementation.
47 \param[in] db Already open video database to be used for interaction
48 \return True if the process succeeded, false otherwise
50 virtual bool Work(CVideoDatabase
&db
) = 0;