Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Components
Library
Importer
CacheProcessor.h
1
/* ImportFolderThread.h */
2
3
/* Copyright (C) 2011-2024 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 IMPORTFOLDERTHREAD_H
22
#define IMPORTFOLDERTHREAD_H
23
24
#include "ImportCache.h"
25
26
#include <QObject>
27
28
namespace
Util
29
{
30
class
ArchiveExtractor
;
31
class
DirectoryReader
;
32
class
FileSystem
;
33
}
34
35
namespace
Tagging
36
{
37
class
TagReader
;
38
}
39
40
namespace
Library
41
{
42
class
ImportCache
;
43
class
CacheProcessor
:
44
public
QObject
45
{
46
Q_OBJECT
47
48
signals:
49
void
sigCachedFilesChanged();
50
void
sigFinished();
51
52
public
:
53
struct
CacheResult
54
{
55
Library::ImportCachePtr cache {
nullptr
};
56
QStringList temporaryFiles;
57
};
58
59
~CacheProcessor
() noexcept override;
60
61
static
CacheProcessor
* create(const QStringList& fileList,
62
const QString& libraryPath,
63
const std::shared_ptr<
Tagging
::TagReader>& tagReader,
64
const std::shared_ptr<
Util
::ArchiveExtractor>& archiveExtractor,
65
const std::shared_ptr<
Util
::DirectoryReader>& directoryReader,
66
const std::shared_ptr<
Util
::FileSystem>& fileSystem);
67
68
[[nodiscard]] virtual
CacheResult
cacheResult() const = 0;
69
70
virtual
void
cancel() = 0;
71
[[nodiscard]] virtual
bool
wasCancelled() const = 0;
72
73
public slots:
// NOLINT(readability-redundant-access-specifiers)
74
virtual
void
cacheFiles() = 0;
75
76
protected:
77
void
emitCachedFilesChanged();
78
};
79
}
80
81
#endif
// IMPORTFOLDERTHREAD_H
Library::CacheProcessor
Definition
CacheProcessor.h:45
Library::ImportCache
Definition
ImportCache.h:40
Tagging::TagReader
Definition
TagReader.h:34
Util::ArchiveExtractor
Definition
ArchiveExtractor.h:31
Util::DirectoryReader
Definition
DirectoryReader.h:40
Util::FileSystem
Definition
FileSystem.h:34
Tagging
The GUI_TagEdit class.
Definition
Engine.h:33
Util
Helper functions.
Definition
MetaTypeRegistry.h:25
Library::CacheProcessor::CacheResult
Definition
CacheProcessor.h:54
Generated on
for Sayonara Player by
1.17.0