xbmc
CDDARipper.h
1 /*
2  * Copyright (C) 2005-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 "utils/JobManager.h"
12 
13 #include <string>
14 
15 class CFileItem;
16 
17 namespace MUSIC_INFO
18 {
19 class CMusicInfoTag;
20 }
21 
22 namespace KODI
23 {
24 namespace CDRIP
25 {
26 
38 class CCDDARipper : public CJobQueue
39 {
40 public:
46  static CCDDARipper& GetInstance();
47 
54  bool RipTrack(CFileItem* pItem);
55 
61  bool RipCD();
62 
63  void OnJobComplete(unsigned int jobID, bool success, CJob* job) override;
64 
65 private:
66  // private construction and no assignments
67  CCDDARipper();
68  CCDDARipper(const CCDDARipper&) = delete;
69  ~CCDDARipper() override;
70  CCDDARipper const& operator=(CCDDARipper const&) = delete;
71 
80  bool CreateAlbumDir(const MUSIC_INFO::CMusicInfoTag& infoTag,
81  std::string& strDirectory,
82  int& legalType);
83 
90  std::string GetAlbumDirName(const MUSIC_INFO::CMusicInfoTag& infoTag);
91 
98  std::string GetTrackName(CFileItem* item);
99 };
100 
101 } /* namespace CDRIP */
102 } /* namespace KODI */
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Controller configuration window.
Definition: AudioDecoder.h:18
Rip an entire CD or a single track.
Definition: CDDARipper.h:38
Definition: MusicInfoTag.h:27
Represents a file on a share.
Definition: FileItem.h:102
Job Queue class to handle a queue of unique jobs to be processed sequentially.
Definition: JobManager.h:63
Definition: Application.h:79