kwave  18.07.70
VorbisCommentMap.cpp
Go to the documentation of this file.
1 /*************************************************************************
2 VorbisCommentMap.cpp - map for translating properties to vorbis comments
3  -------------------
4  begin : Sun May 23 2004
5  copyright : (C) 2004 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "config.h"
19 
20 #include "libkwave/String.h"
22 
24 #define INS(p,d) insert(_(p), d)
25 
26 //***************************************************************************
28 {
29  INS("DATE", Kwave::INF_CREATION_DATE ); // creation date (iso)
30  INS("TITLE", Kwave::INF_NAME ); // name
31  INS("VERSION", Kwave::INF_VERSION ); // version of the song
32  INS("ALBUM", Kwave::INF_ALBUM ); // name of the album
33  INS("TRACKNUMBER", Kwave::INF_TRACK ); // index of the track
34  INS("ARTIST", Kwave::INF_AUTHOR ); // author's name
35  INS("PERFORMER", Kwave::INF_PERFORMER ); // performer
36  INS("COPYRIGHT", Kwave::INF_COPYRIGHT ); // copyright
37  INS("LICENSE", Kwave::INF_LICENSE ); // name of the license
38  INS("ORGANIZATION", Kwave::INF_ORGANIZATION ); // producing organization
39  INS("DESCRIPTION", Kwave::INF_SUBJECT ); // subject
40  INS("GENRE", Kwave::INF_GENRE ); // genre
41  INS("LOCATION", Kwave::INF_SOURCE ); // source
42  INS("CONTACT", Kwave::INF_CONTACT ); // contact address(es)
43  INS("ISRC", Kwave::INF_ISRC ); // ISRC code
44  INS("ENCODER", Kwave::INF_SOFTWARE ); // software
45  INS("ENCODED_BY", Kwave::INF_ENGINEER ); // name of the encoder
46  INS("VBR_QUALITY", Kwave::INF_VBR_QUALITY ); // VBR quality
47 }
48 
49 //***************************************************************************
51  const Kwave::FileProperty property)
52 {
53  QMap<QString, Kwave::FileProperty>::Iterator it;
54  for (it = begin(); it != end(); ++it) {
55  if (it.value() == property) return it.key();
56  }
57  return QString();
58 }
59 
60 //***************************************************************************
62  const Kwave::FileProperty property)
63 {
64  return (findProperty(property).length() != 0);
65 }
66 
67 //***************************************************************************
68 //***************************************************************************
#define INS(p, d)
QString findProperty(const Kwave::FileProperty property)
bool containsProperty(const Kwave::FileProperty property)
FileProperty
Definition: FileInfo.h:45