forked from ibsh/is_KeyFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadatataglib.h
106 lines (94 loc) · 2.83 KB
/
metadatataglib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*************************************************************************
Copyright 2011 Ibrahim Sha'ath
This file is part of KeyFinder.
KeyFinder is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
KeyFinder is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with KeyFinder. If not, see <http://www.gnu.org/licenses/>.
*************************************************************************/
#ifndef METADATATAGLIB_H
#define METADATATAGLIB_H
#include <QString>
#include <QFile>
#include <QDebug>
#include <QMutex>
#ifdef Q_OS_WIN
#include "os_windows.h"
#include <tag.h>
#include <taglib.h>
#include <fileref.h>
#include <tfile.h>
#include <id3v1tag.h>
#include <id3v2tag.h>
#include <commentsframe.h>
#include <textidentificationframe.h>
#include <asftag.h>
#include <apetag.h>
#include <mp4tag.h>
// #include <apefile.h> // removed with Windows version; difficulty in compilation
#include <asffile.h>
#include <flacfile.h>
#include <mp4file.h>
#include <mpcfile.h>
#include <mpegfile.h>
#include <oggfile.h>
#include <oggflacfile.h>
#include <speexfile.h>
#include <vorbisfile.h>
#include <rifffile.h>
#include <aifffile.h>
#include <wavfile.h>
#include <trueaudiofile.h>
#include <wavpackfile.h>
#else
#include <taglib/tag.h>
#include <taglib/taglib.h>
#include <taglib/fileref.h>
#include <taglib/tfile.h>
#include <taglib/id3v1tag.h>
#include <taglib/id3v2tag.h>
#include <taglib/textidentificationframe.h>
#include <taglib/commentsframe.h>
#include <taglib/asftag.h>
#include <taglib/apetag.h>
#include <taglib/mp4tag.h>
#include <taglib/apefile.h>
#include <taglib/asffile.h>
#include <taglib/flacfile.h>
#include <taglib/mp4file.h>
#include <taglib/mpcfile.h>
#include <taglib/mpegfile.h>
#include <taglib/oggfile.h>
#include <taglib/oggflacfile.h>
#include <taglib/speexfile.h>
#include <taglib/vorbisfile.h>
#include <taglib/rifffile.h>
#include <taglib/aifffile.h>
#include <taglib/wavfile.h>
#include <taglib/trueaudiofile.h>
#include <taglib/wavpackfile.h>
#endif
#include "preferences.h"
class TagLibMetadata{
public:
TagLibMetadata(const QString&);
~TagLibMetadata();
QString getTitle() const;
QString getArtist() const;
QString getComment() const;
QString getGrouping() const;
QString getKey() const;
QString writeKeyToMetadata(int, const Preferences&);
private:
TagLib::File* f;
int setComment(const QString&);
int setGrouping(const QString&);
int setKey(const QString&);
};
#endif // METADATATAGLIB_H