kwave  18.07.70
ID3_PropertyMap.h
Go to the documentation of this file.
1 /*************************************************************************
2  ID3_PropertyMap.h - map for translating properties to ID3 frame tags
3  -------------------
4  begin : Sat Jul 30 2012
5  copyright : (C) 2012 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 #ifndef ID3_PROPERTY_MAP_H
19 #define ID3_PROPERTY_MAP_H
20 
21 #include "config.h"
22 
23 #include <QList>
24 #include <QPair>
25 
26 #include <id3/globals.h>
27 
28 #include "libkwave/FileInfo.h"
29 
30 namespace Kwave
31 {
32 
34  {
35  public:
36 
38  typedef enum {
39  ENC_NONE = 0,
51  } Encoding;
52 
55 
57  virtual ~ID3_PropertyMap() {}
58 
63  ID3_FrameID findProperty(const Kwave::FileProperty property) const;
64 
66  bool containsProperty(const Kwave::FileProperty property) const;
67 
75  void insert(const Kwave::FileProperty property, const ID3_FrameID id,
76  const Encoding encoding);
77 
84  bool containsID(const ID3_FrameID id) const;
85 
92  Encoding encoding(const ID3_FrameID id) const;
93 
95  QList<ID3_FrameID> knownIDs() const;
96 
103  Kwave::FileProperty property(const ID3_FrameID id) const;
104 
106  QList<Kwave::FileProperty> properties() const;
107 
108  private:
109 
111  bool supported(const ID3_FrameID id) const;
112 
113  private:
115  typedef struct
116  {
118  ID3_FrameID m_frame_id;
119  Encoding m_encoding;
120  } Mapping;
121 
123  QList<Mapping> m_list;
124  };
125 }
126 
127 #endif /* ID3_PROPERTY_MAP_H */
128 
129 //***************************************************************************
130 //***************************************************************************
Definition: App.h:33
void insert(const Kwave::FileProperty property, const ID3_FrameID id, const Encoding encoding)
QList< Kwave::FileProperty > properties() const
QList< Mapping > m_list
ID3_FrameID findProperty(const Kwave::FileProperty property) const
QList< ID3_FrameID > knownIDs() const
bool containsID(const ID3_FrameID id) const
Encoding encoding(const ID3_FrameID id) const
Kwave::FileProperty property(const ID3_FrameID id) const
bool supported(const ID3_FrameID id) const
bool containsProperty(const Kwave::FileProperty property) const
FileProperty
Definition: FileInfo.h:45