kodi
MusicLibraryImportJob.h
1 /*
2 * Copyright (C) 2017-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 "MusicLibraryProgressJob.h"
12 
13 class CGUIDialogProgress;
14 
19 {
20 public:
27  CMusicLibraryImportJob(const std::string &xmlFile, CGUIDialogProgress* progressDialog);
28 
29  ~CMusicLibraryImportJob() override;
30 
31  // specialization of CJob
32  const char *GetType() const override { return "MusicLibraryImportJob"; }
33  bool operator==(const CJob* job) const override;
34 
35 protected:
36  // implementation of CMusicLibraryJob
37  bool Work(CMusicDatabase &db) override;
38 
39 private:
40  std::string m_xmlFile;
41 };
42 
const char * GetType() const override
Function that returns the type of job.
Definition: MusicLibraryImportJob.h:32
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Class to store and read tag information.
Definition: MusicDatabase.h:98
CMusicLibraryImportJob(const std::string &xmlFile, CGUIDialogProgress *progressDialog)
Creates a new music library import job for the given xml file.
Definition: MusicLibraryImportJob.cpp:14
Combined base implementation of a music library job with a progress bar.
Definition: MusicLibraryProgressJob.h:17
Music library job implementation for importing data to the music library.
Definition: MusicLibraryImportJob.h:18
Definition: GUIDialogProgress.h:16
bool Work(CMusicDatabase &db) override
Worker method to be implemented by an actual implementation.
Definition: MusicLibraryImportJob.cpp:37