[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / video / jobs / VideoLibraryJob.h
bloba8f7851b4a52f4be7160e969db07894c92dee07c
1 /*
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.
7 */
9 #pragma once
11 #include "utils/Job.h"
13 class CVideoDatabase;
15 /*!
16 \brief Basic implementation/interface of a CJob which interacts with the
17 video database.
19 class CVideoLibraryJob : public CJob
21 public:
22 ~CVideoLibraryJob() override;
24 /*!
25 \brief Whether the job can be cancelled or not.
27 virtual bool CanBeCancelled() const { return false; }
29 /*!
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; }
41 protected:
42 CVideoLibraryJob();
44 /*!
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;