kwave
18.07.70
|
#include <ID3_PropertyMap.h>
Classes | |
struct | Mapping |
Public Types | |
enum | Encoding { ENC_NONE = 0, ENC_COMMENT, ENC_GENRE_TYPE, ENC_LENGTH, ENC_TERMS_OF_USE, ENC_TEXT, ENC_TEXT_SLASH, ENC_TEXT_LIST, ENC_TEXT_URL, ENC_TEXT_PARTINSET, ENC_TEXT_TIMESTAMP, ENC_TRACK_NUM } |
Public Member Functions | |
ID3_PropertyMap () | |
virtual | ~ID3_PropertyMap () |
ID3_FrameID | findProperty (const Kwave::FileProperty property) const |
bool | containsProperty (const Kwave::FileProperty property) const |
void | insert (const Kwave::FileProperty property, const ID3_FrameID id, const Encoding encoding) |
bool | containsID (const ID3_FrameID id) const |
Encoding | encoding (const ID3_FrameID id) const |
QList< ID3_FrameID > | knownIDs () const |
Kwave::FileProperty | property (const ID3_FrameID id) const |
QList< Kwave::FileProperty > | properties () const |
Private Member Functions | |
bool | supported (const ID3_FrameID id) const |
Private Attributes | |
QList< Mapping > | m_list |
Definition at line 33 of file ID3_PropertyMap.h.
encoding of the ID3 tag
Definition at line 38 of file ID3_PropertyMap.h.
Kwave::ID3_PropertyMap::ID3_PropertyMap | ( | ) |
Default constructor, with initializing
Definition at line 25 of file ID3_PropertyMap.cpp.
References ENC_COMMENT, ENC_GENRE_TYPE, ENC_LENGTH, ENC_NONE, ENC_TERMS_OF_USE, ENC_TEXT, ENC_TEXT_LIST, ENC_TEXT_PARTINSET, ENC_TEXT_SLASH, ENC_TEXT_TIMESTAMP, ENC_TEXT_URL, ENC_TRACK_NUM, Kwave::INF_ALBUM, Kwave::INF_ANNOTATION, Kwave::INF_AUTHOR, Kwave::INF_CD, Kwave::INF_CDS, Kwave::INF_COMMENTS, Kwave::INF_COMMISSIONED, Kwave::INF_CONTACT, Kwave::INF_COPYRIGHT, Kwave::INF_CREATION_DATE, Kwave::INF_GENRE, Kwave::INF_ISRC, Kwave::INF_LENGTH, Kwave::INF_LICENSE, Kwave::INF_MEDIUM, Kwave::INF_NAME, Kwave::INF_ORGANIZATION, Kwave::INF_PERFORMER, Kwave::INF_SOFTWARE, Kwave::INF_TECHNICAN, Kwave::INF_TRACK, Kwave::INF_TRACKS, Kwave::INF_UNKNOWN, Kwave::INF_VERSION, and insert().
|
inlinevirtual |
Destructor
Definition at line 57 of file ID3_PropertyMap.h.
References containsID(), containsProperty(), encoding(), findProperty(), insert(), knownIDs(), properties(), property(), and supported().
bool Kwave::ID3_PropertyMap::containsID | ( | const ID3_FrameID | id | ) | const |
returns true if a given ID3 frame ID is in the map
id | a ID3 frame ID |
Definition at line 203 of file ID3_PropertyMap.cpp.
References Kwave::ID3_PropertyMap::Mapping::m_frame_id, m_list, and supported().
Referenced by ~ID3_PropertyMap().
bool Kwave::ID3_PropertyMap::containsProperty | ( | const Kwave::FileProperty | property | ) | const |
Returns true if the map contains a given property
Definition at line 192 of file ID3_PropertyMap.cpp.
References Kwave::ID3_PropertyMap::Mapping::m_frame_id, m_list, Kwave::ID3_PropertyMap::Mapping::m_property, and supported().
Referenced by ~ID3_PropertyMap().
Kwave::ID3_PropertyMap::Encoding Kwave::ID3_PropertyMap::encoding | ( | const ID3_FrameID | id | ) | const |
returns the encoding of the ID3 frame
id | a ID3 frame ID |
Definition at line 216 of file ID3_PropertyMap.cpp.
References ENC_NONE, Kwave::ID3_PropertyMap::Mapping::m_encoding, Kwave::ID3_PropertyMap::Mapping::m_frame_id, and m_list.
Referenced by Kwave::MP3Encoder::encodeID3Tags(), insert(), Kwave::MP3Decoder::parseID3Tags(), and ~ID3_PropertyMap().
ID3_FrameID Kwave::ID3_PropertyMap::findProperty | ( | const Kwave::FileProperty | property | ) | const |
Returns the frame ID of a property or an empty string if nothing found (reverse lookup).
Definition at line 181 of file ID3_PropertyMap.cpp.
References Kwave::ID3_PropertyMap::Mapping::m_frame_id, m_list, Kwave::ID3_PropertyMap::Mapping::m_property, and supported().
Referenced by Kwave::MP3Encoder::encodeID3Tags(), and ~ID3_PropertyMap().
void Kwave::ID3_PropertyMap::insert | ( | const Kwave::FileProperty | property, |
const ID3_FrameID | id, | ||
const Encoding | encoding | ||
) |
insert a new property / frame ID mapping
property | a Kwave FileProperty |
id | a ID3 frame ID |
encoding | the type of the encoding of the tag |
Definition at line 169 of file ID3_PropertyMap.cpp.
References encoding(), Kwave::ID3_PropertyMap::Mapping::m_encoding, Kwave::ID3_PropertyMap::Mapping::m_frame_id, m_list, Kwave::ID3_PropertyMap::Mapping::m_property, and property().
Referenced by ID3_PropertyMap(), and ~ID3_PropertyMap().
QList< ID3_FrameID > Kwave::ID3_PropertyMap::knownIDs | ( | ) | const |
returns a list of all known ID3 frame IDs
Definition at line 227 of file ID3_PropertyMap.cpp.
References Kwave::ID3_PropertyMap::Mapping::m_frame_id, and m_list.
Referenced by ~ID3_PropertyMap().
QList< Kwave::FileProperty > Kwave::ID3_PropertyMap::properties | ( | ) | const |
Returns a list with all supported properties
Definition at line 247 of file ID3_PropertyMap.cpp.
References m_list, and Kwave::ID3_PropertyMap::Mapping::m_property.
Referenced by Kwave::MP3Encoder::supportedProperties(), and ~ID3_PropertyMap().
Kwave::FileProperty Kwave::ID3_PropertyMap::property | ( | const ID3_FrameID | id | ) | const |
Returns the first FileProperty that matches a given ID3 frame ID
id | a ID3 frame ID |
Definition at line 238 of file ID3_PropertyMap.cpp.
References Kwave::INF_UNKNOWN, Kwave::ID3_PropertyMap::Mapping::m_frame_id, m_list, and Kwave::ID3_PropertyMap::Mapping::m_property.
Referenced by insert(), Kwave::MP3Decoder::parseID3Tags(), and ~ID3_PropertyMap().
|
private |
returns true if a frame is supported by id3lib
Definition at line 258 of file ID3_PropertyMap.cpp.
Referenced by containsID(), containsProperty(), findProperty(), and ~ID3_PropertyMap().
|
private |
list of mappings
Definition at line 123 of file ID3_PropertyMap.h.
Referenced by containsID(), containsProperty(), encoding(), findProperty(), insert(), knownIDs(), properties(), and property().