kodi
VideoLibraryMarkWatchedJob.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/VideoLibraryJob.h"
12 
13 #include <memory>
14 
15 class CFileItem;
16 
21 {
22 public:
29  CVideoLibraryMarkWatchedJob(const std::shared_ptr<CFileItem>& item, bool mark);
30  ~CVideoLibraryMarkWatchedJob() override;
31 
32  const char *GetType() const override { return "CVideoLibraryMarkWatchedJob"; }
33  bool operator==(const CJob* job) const override;
34 
35 protected:
36  bool Work(CVideoDatabase &db) override;
37 
38 private:
39  std::shared_ptr<CFileItem> m_item;
40  bool m_mark;
41 };
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
CVideoLibraryMarkWatchedJob(const std::shared_ptr< CFileItem > &item, bool mark)
Creates a new video library scanning job.
Definition: VideoLibraryMarkWatchedJob.cpp:28
Basic implementation/interface of a CJob which interacts with the video database. ...
Definition: VideoLibraryJob.h:19
Video library job implementation for marking items as watched/unwatched.
Definition: VideoLibraryMarkWatchedJob.h:20
Definition: VideoDatabase.h:419
bool Work(CVideoDatabase &db) override
Worker method to be implemented by an actual implementation.
Definition: VideoLibraryMarkWatchedJob.cpp:47
const char * GetType() const override
Function that returns the type of job.
Definition: VideoLibraryMarkWatchedJob.h:32
Represents a file on a share.
Definition: FileItem.h:102