TagLib 1.8.0 (mp4tag.h Source File)
Home
Class Hierarchy
Namespaces
Classes
Headers
Namespace Members
Class Members
File Members
taglib
mp4
mp4tag.h
Go to the documentation of this file.
1
/**************************************************************************
2
copyright : (C) 2007,2011 by Lukáš Lalinský
3
email : lalinsky@gmail.com
4
**************************************************************************/
5
6
/***************************************************************************
7
* This library is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU Lesser General Public License version *
9
* 2.1 as published by the Free Software Foundation. *
10
* *
11
* This library is distributed in the hope that it will be useful, but *
12
* WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
* Lesser General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU Lesser General Public *
17
* License along with this library; if not, write to the Free Software *
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19
* 02110-1301 USA *
20
* *
21
* Alternatively, this file is available under the Mozilla Public *
22
* License Version 1.1. You may obtain a copy of the License at *
23
* http://www.mozilla.org/MPL/ *
24
***************************************************************************/
25
26
#ifndef TAGLIB_MP4TAG_H
27
#define TAGLIB_MP4TAG_H
28
29
#include "
tag.h
"
30
#include "
tbytevectorlist.h
"
31
#include "
tfile.h
"
32
#include "
tmap.h
"
33
#include "
tstringlist.h
"
34
#include "
taglib_export.h
"
35
#include "
mp4atom.h
"
36
#include "
mp4item.h
"
37
38
namespace
TagLib {
39
40
namespace
MP4 {
41
42
typedef
TagLib::Map<String, Item>
ItemListMap
;
43
44
class
TAGLIB_EXPORT
Tag
:
public
TagLib::Tag
45
{
46
public
:
47
Tag
();
48
Tag
(
TagLib::File
*file, Atoms *atoms);
49
~
Tag
();
50
bool
save();
51
52
String
title()
const
;
53
String
artist()
const
;
54
String
album()
const
;
55
String
comment()
const
;
56
String
genre
()
const
;
57
uint
year()
const
;
58
uint
track()
const
;
59
60
void
setTitle(
const
String
&value);
61
void
setArtist(
const
String
&value);
62
void
setAlbum(
const
String
&value);
63
void
setComment(
const
String
&value);
64
void
setGenre(
const
String
&value);
65
void
setYear(
uint
value);
66
void
setTrack(
uint
value);
67
68
ItemListMap
&itemListMap();
69
70
private
:
71
AtomDataList parseData2(Atom *atom,
TagLib::File
*file,
int
expectedFlags = -1,
bool
freeForm =
false
);
72
TagLib::ByteVectorList
parseData(Atom *atom,
TagLib::File
*file,
int
expectedFlags = -1,
bool
freeForm =
false
);
73
void
parseText(Atom *atom,
TagLib::File
*file,
int
expectedFlags = 1);
74
void
parseFreeForm(Atom *atom,
TagLib::File
*file);
75
void
parseInt(Atom *atom,
TagLib::File
*file);
76
void
parseByte(Atom *atom,
TagLib::File
*file);
77
void
parseUInt(Atom *atom,
TagLib::File
*file);
78
void
parseLongLong(Atom *atom,
TagLib::File
*file);
79
void
parseGnre(Atom *atom,
TagLib::File
*file);
80
void
parseIntPair(Atom *atom,
TagLib::File
*file);
81
void
parseBool(Atom *atom,
TagLib::File
*file);
82
void
parseCovr(Atom *atom,
TagLib::File
*file);
83
84
TagLib::ByteVector
padIlst(
const
ByteVector
&data,
int
length = -1);
85
TagLib::ByteVector
renderAtom(
const
ByteVector
&name,
const
TagLib::ByteVector
&data);
86
TagLib::ByteVector
renderData(
const
ByteVector
&name,
int
flags,
const
TagLib::ByteVectorList
&data);
87
TagLib::ByteVector
renderText(
const
ByteVector
&name,
Item
&item,
int
flags = TypeUTF8);
88
TagLib::ByteVector
renderFreeForm(
const
String
&name,
Item
&item);
89
TagLib::ByteVector
renderBool(
const
ByteVector
&name,
Item
&item);
90
TagLib::ByteVector
renderInt(
const
ByteVector
&name,
Item
&item);
91
TagLib::ByteVector
renderByte(
const
ByteVector
&name,
Item
&item);
92
TagLib::ByteVector
renderUInt(
const
ByteVector
&name,
Item
&item);
93
TagLib::ByteVector
renderLongLong(
const
ByteVector
&name,
Item
&item);
94
TagLib::ByteVector
renderIntPair(
const
ByteVector
&name,
Item
&item);
95
TagLib::ByteVector
renderIntPairNoTrailing(
const
ByteVector
&name,
Item
&item);
96
TagLib::ByteVector
renderCovr(
const
ByteVector
&name,
Item
&item);
97
98
void
updateParents(AtomList &path,
long
delta,
int
ignore = 0);
99
void
updateOffsets(
long
delta,
long
offset);
100
101
void
saveNew(
TagLib::ByteVector
&data);
102
void
saveExisting(
TagLib::ByteVector
&data, AtomList &path);
103
104
class
TagPrivate;
105
TagPrivate *d;
106
};
107
108
}
109
110
}
111
112
#endif