kodi
VideoLibraryCleaningJob.h
1 /*
2  * Copyright (C) 2014-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "video/jobs/VideoLibraryProgressJob.h"
12 
13 #include <set>
14 
16 
21 {
22 public:
29  CVideoLibraryCleaningJob(const std::set<int>& paths = std::set<int>(), bool showDialog = false);
30 
37  CVideoLibraryCleaningJob(const std::set<int>& paths, CGUIDialogProgressBarHandle* progressBar);
38  ~CVideoLibraryCleaningJob() override;
39 
40  // specialization of CJob
41  const char *GetType() const override { return "VideoLibraryCleaningJob"; }
42  bool operator==(const CJob* job) const override;
43 
44 protected:
45  // implementation of CVideoLibraryJob
46  bool Work(CVideoDatabase &db) override;
47 
48 private:
49  std::set<int> m_paths;
50  bool m_showDialog;
51 };
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Definition: VideoDatabase.h:419
Video library job implementation for cleaning the video library.
Definition: VideoLibraryCleaningJob.h:20
Combined base implementation of a video library job with a progress bar.
Definition: VideoLibraryProgressJob.h:17
CVideoLibraryCleaningJob(const std::set< int > &paths=std::set< int >(), bool showDialog=false)
Creates a new video library cleaning job for the given paths.
Definition: VideoLibraryCleaningJob.cpp:14
Definition: GUIDialogExtendedProgressBar.h:16
const char * GetType() const override
Function that returns the type of job.
Definition: VideoLibraryCleaningJob.h:41
bool Work(CVideoDatabase &db) override
Worker method to be implemented by an actual implementation.
Definition: VideoLibraryCleaningJob.cpp:41