1
/***************************************************************************
2
copyright : (C) 2006 by Lukáš Lalinský
3
email : lalinsky@gmail.com
5
copyright : (C) 2004 by Allan Sandfeld Jensen
6
email : kde@carewolf.org
7
(original MPC implementation)
8
***************************************************************************/
10
/***************************************************************************
11
* This library is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU Lesser General Public License version *
13
* 2.1 as published by the Free Software Foundation. *
15
* This library is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* Lesser General Public License for more details. *
20
* You should have received a copy of the GNU Lesser General Public *
21
* License along with this library; if not, write to the Free Software *
22
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
24
***************************************************************************/
26
#ifndef TAGLIB_WVFILE_H
27
#define TAGLIB_WVFILE_H
31
#include "wvproperties.h"
37
namespace ID3v1 { class Tag; }
38
namespace APE { class Tag; }
40
//! An implementation of WavPack metadata
43
* This is implementation of WavPack metadata.
45
* This supports ID3v1 and APE (v1 and v2) style comments as well as reading stream
46
* properties from the file.
51
//! An implementation of TagLib::File with WavPack specific methods
54
* This implements and provides an interface for WavPack files to the
55
* TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing
56
* the abstract TagLib::File API as well as providing some additional
57
* information specific to WavPack files.
60
class File : public TagLib::File
64
* This set of flags is used for various operations and is suitable for
65
* being OR-ed together.
68
//! Empty set. Matches no tag types.
70
//! Matches ID3v1 tags.
74
//! Matches all tag types.
79
* Contructs an WavPack file from \a file. If \a readProperties is true the
80
* file's audio properties will also be read using \a propertiesStyle. If
81
* false, \a propertiesStyle is ignored.
83
explicit File(const char *file, bool readProperties = true,
84
Properties::ReadStyle propertiesStyle = Properties::Average);
87
* Destroys this instance of the File.
92
* Returns the Tag for this file. This will be an APE tag, an ID3v1 tag
93
* or a combination of the two.
95
virtual TagLib::Tag *tag() const;
98
* Returns the MPC::Properties for this file. If no audio properties
99
* were read then this will return a null pointer.
101
virtual Properties *audioProperties() const;
109
* Returns a pointer to the ID3v1 tag of the file.
111
* If \a create is false (the default) this will return a null pointer
112
* if there is no valid ID3v1 tag. If \a create is true it will create
113
* an ID3v1 tag if one does not exist. If there is already an APE tag, the
114
* new ID3v1 tag will be placed after it.
116
* \note The Tag <b>is still</b> owned by the APE::File and should not be
117
* deleted by the user. It will be deleted when the file (object) is
120
ID3v1::Tag *ID3v1Tag(bool create = false);
123
* Returns a pointer to the APE tag of the file.
125
* If \a create is false (the default) this will return a null pointer
126
* if there is no valid APE tag. If \a create is true it will create
127
* a APE tag if one does not exist.
129
* \note The Tag <b>is still</b> owned by the APE::File and should not be
130
* deleted by the user. It will be deleted when the file (object) is
133
APE::Tag *APETag(bool create = false);
136
* This will remove the tags that match the OR-ed together TagTypes from the
137
* file. By default it removes all tags.
139
* \note This will also invalidate pointers to the tags
140
* as their memory will be freed.
141
* \note In order to make the removal permanent save() still needs to be called
143
void strip(int tags = AllTags);
147
File &operator=(const File &);
149
void read(bool readProperties, Properties::ReadStyle propertiesStyle);