Sayonara Player
src
Components
Library
Importer
ImportCache.h
1
/* ImportCache.h */
2
3
/* Copyright (C) 2011-2020 Michael Lugmair (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
#include <QList>
27
#include <QPair>
28
29
class
MetaData
;
30
class
MetaDataList
;
31
32
namespace
Library
33
{
38
class
ImportCache
39
{
40
PIMPL(
ImportCache
)
41
42
public
:
43
explicit
ImportCache
(
const
QString& libraryPath);
44
virtual
~
ImportCache
();
45
46
ImportCache
(
const
ImportCache
& other);
47
ImportCache
& operator=(
const
ImportCache
& other);
48
49
void
clear();
50
51
void
addFile(
const
QString& filename);
52
void
addFile(
const
QString& filename,
const
QString& parentDirectory);
53
54
QStringList files()
const
;
55
MetaDataList
soundfiles()
const
;
56
int
count()
const
;
57
int
soundFileCount()
const
;
58
59
QString targetFilename(
const
QString& srcFilename,
const
QString& targetDirectory)
const
;
60
MetaData
metadata(
const
QString& filename)
const
;
61
void
changeMetadata(
const
QList
<
QPair<MetaData, MetaData>
>& changedTracks);
62
63
private
:
64
void
addSoundfile(
const
QString& filename);
65
};
66
67
using
ImportCachePtr=std::shared_ptr<ImportCache>;
68
}
69
70
71
72
#endif // IMPORTCACHE_H
QPair
Definition:
typedefs.h:32
MetaDataList
The MetaDataList class.
Definition:
MetaDataList.h:37
QList
Definition:
EngineUtils.h:33
Library
An interface class needed when implementing a library plugin.
Definition:
LocalLibraryWatcher.h:31
MetaData
The MetaData class.
Definition:
MetaData.h:47
Library::ImportCache
The ImportCache class.
Definition:
ImportCache.h:39
Generated on Wed Jan 6 2021 00:00:00 for Sayonara Player by
1.8.20