Sayonara Player
ImportCache.h
1 /* ImportCache.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef IMPORTCACHE_H
22 #define IMPORTCACHE_H
23 
24 #include "Utils/Pimpl.h"
25 
26 class QString;
27 class QStringList;
28 class MetaData;
29 class MetaDataList;
30 
36 {
37 private:
38  PIMPL(ImportCache)
39 
40 public:
41  ImportCache(const QString& library_path);
42  virtual ~ImportCache();
43 
44  ImportCache(const ImportCache& other);
45  ImportCache& operator=(const ImportCache& other);
46 
47  void clear();
48 
49  void add_soundfile(const MetaData& md);
50  void add_standard_file(const QString& filename);
51  void add_standard_file(const QString& filename, const QString& parent_dir);
52 
53  QStringList get_files() const;
54  MetaDataList get_soundfiles() const;
55  QString get_target_filename(const QString& src_filename, const QString& target_directory) const;
56  MetaData get_metadata(const QString& filename) const;
57  void change_metadata(const MetaDataList& v_md_old, const MetaDataList& v_md_new);
58 };
59 
60 using ImportCachePtr=std::shared_ptr<ImportCache>;
61 
62 #endif // IMPORTCACHE_H
The MetaData class.
Definition: MetaData.h:48
The ImportCache class.
Definition: ImportCache.h:35
The MetaDataList class.
Definition: MetaDataList.h:38