kodi
VideoLibraryRefreshingJob.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 <memory>
14 #include <string>
15 
16 class CFileItem;
17 
22 {
23 public:
33  CVideoLibraryRefreshingJob(std::shared_ptr<CFileItem> item,
34  bool forceRefresh,
35  bool refreshAll,
36  bool ignoreNfo = false,
37  const std::string& searchTitle = "");
38 
39  ~CVideoLibraryRefreshingJob() override;
40 
41  // specialization of CJob
42  const char *GetType() const override { return "VideoLibraryRefreshingJob"; }
43  bool operator==(const CJob* job) const override;
44 
45 protected:
46  // implementation of CVideoLibraryJob
47  bool Work(CVideoDatabase &db) override;
48 
49 private:
50  std::shared_ptr<CFileItem> m_item;
51  bool m_forceRefresh;
52  bool m_refreshAll;
53  bool m_ignoreNfo;
54  std::string m_searchTitle;
55 };
CVideoLibraryRefreshingJob(std::shared_ptr< CFileItem > item, bool forceRefresh, bool refreshAll, bool ignoreNfo=false, const std::string &searchTitle="")
Creates a new video library cleaning job for the given paths.
Definition: VideoLibraryRefreshingJob.cpp:42
const char * GetType() const override
Function that returns the type of job.
Definition: VideoLibraryRefreshingJob.h:42
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Definition: VideoDatabase.h:419
Combined base implementation of a video library job with a progress bar.
Definition: VideoLibraryProgressJob.h:17
bool Work(CVideoDatabase &db) override
Worker method to be implemented by an actual implementation.
Definition: VideoLibraryRefreshingJob.cpp:69
Video library job implementation for refreshing a single item.
Definition: VideoLibraryRefreshingJob.h:21
Represents a file on a share.
Definition: FileItem.h:102