1 /**************************************************************************
2 copyright : (C) 2005-2007 by Lukáš Lalinský
3 email : lalinsky@gmail.com
4 **************************************************************************/
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. *
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. *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
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 ***************************************************************************/
26 #ifndef TAGLIB_ASFTAG_H
27 #define TAGLIB_ASFTAG_H
32 #include "taglib_export.h"
33 #include "asfattribute.h"
39 typedef List<Attribute> AttributeList;
40 typedef Map<String, AttributeList> AttributeListMap;
42 class TAGLIB_EXPORT Tag : public TagLib::Tag {
53 * Returns the track name.
55 virtual String title() const;
58 * Returns the artist name.
60 virtual String artist() const;
63 * Returns the album name; if no album name is present in the tag
64 * String::null will be returned.
66 virtual String album() const;
69 * Returns the track comment.
71 virtual String comment() const;
74 * Returns the genre name; if no genre is present in the tag String::null
77 virtual String genre() const;
82 virtual String rating() const;
85 * Returns the genre name; if no genre is present in the tag String::null
88 virtual String copyright() const;
91 * Returns the year; if there is no year set, this will return 0.
93 virtual uint year() const;
96 * Returns the track number; if there is no track number set, this will
99 virtual uint track() const;
102 * Sets the title to \a s.
104 virtual void setTitle(const String &s);
107 * Sets the artist to \a s.
109 virtual void setArtist(const String &s);
112 * Sets the album to \a s. If \a s is String::null then this value will be
115 virtual void setAlbum(const String &s);
118 * Sets the comment to \a s.
120 virtual void setComment(const String &s);
123 * Sets the rating to \a s.
125 virtual void setRating(const String &s);
128 * Sets the copyright to \a s.
130 virtual void setCopyright(const String &s);
133 * Sets the genre to \a s.
135 virtual void setGenre(const String &s);
138 * Sets the year to \a i. If \a s is 0 then this value will be cleared.
140 virtual void setYear(uint i);
143 * Sets the track to \a i. If \a s is 0 then this value will be cleared.
145 virtual void setTrack(uint i);
148 * Returns true if the tag does not contain any data. This should be
149 * reimplemented in subclasses that provide more than the basic tagging
150 * abilities in this class.
152 virtual bool isEmpty() const;
155 * Returns a reference to the item list map. This is an AttributeListMap of
156 * all of the items in the tag.
158 * This is the most powerfull structure for accessing the items of the tag.
160 AttributeListMap &attributeListMap();
163 * Removes the \a key attribute from the tag
165 void removeItem(const String &name);
168 * Sets the \a key attribute to the value of \a attribute. If an attribute
169 * with the \a key is already present, it will be replaced.
171 void setAttribute(const String &name, const Attribute &attribute);
174 * Sets the \a key attribute to the value of \a attribute. If an attribute
175 * with the \a key is already present, it will be added to the list.
177 void addAttribute(const String &name, const Attribute &attribute);