Tag Parser  7.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
id3v2frameids.cpp
Go to the documentation of this file.
1 #include "./id3v2frameids.h"
2 
3 #include "../exceptions.h"
4 
5 namespace TagParser {
6 
17 namespace Id3v2FrameIds {
18 
23 uint32 convertToShortId(uint32 id)
24 {
25  switch (id) {
26  case lAlbum:
27  return sAlbum;
28  case lArtist:
29  return sArtist;
30  case lComment:
31  return sComment;
32  case lYear:
33  return sYear;
34  case lRecordDate:
35  return sRecordDate;
36  case lTitle:
37  return sTitle;
38  case lGenre:
39  return sGenre;
40  case lTrackPosition:
41  return sTrackPosition;
42  case lDiskPosition:
43  return sDiskPosition;
44  case lEncoder:
45  return sEncoder;
46  case lBpm:
47  return sBpm;
48  case lCover:
49  return sCover;
50  case lWriter:
51  return sWriter;
52  case lLength:
53  return sLength;
54  case lLanguage:
55  return sLanguage;
56  case lEncoderSettings:
57  return sEncoderSettings;
59  return sUnsynchronizedLyrics;
60  case lGrouping:
61  return sGrouping;
62  case lRecordLabel:
63  return sRecordLabel;
64  case lUserDefinedText:
65  return sUserDefinedText;
66  default:
67  return 0;
68  }
69 }
70 
75 uint32 convertToLongId(uint32 id)
76 {
77  switch (id) {
78  case sAlbum:
79  return lAlbum;
80  case sArtist:
81  return lArtist;
82  case sComment:
83  return lComment;
84  case sYear:
85  return lYear;
86  case sRecordDate:
87  return lRecordDate;
88  case sTitle:
89  return lTitle;
90  case sGenre:
91  return lGenre;
92  case sTrackPosition:
93  return lTrackPosition;
94  case sDiskPosition:
95  return lDiskPosition;
96  case sEncoder:
97  return lEncoder;
98  case sBpm:
99  return lBpm;
100  case sCover:
101  return lCover;
102  case sWriter:
103  return lWriter;
104  case sLength:
105  return lLength;
106  case sLanguage:
107  return lLanguage;
108  case sEncoderSettings:
109  return lEncoderSettings;
111  return lUnsynchronizedLyrics;
112  case sGrouping:
113  return lGrouping;
114  case sRecordLabel:
115  return lRecordLabel;
116  case sUserDefinedText:
117  return lUserDefinedText;
118  default:
119  return 0;
120  }
121 }
122 
123 } // namespace Id3v2FrameIds
124 
125 } // namespace TagParser
uint32 convertToLongId(uint32 id)
Converts the specified short frame ID to the equivalent long frame ID.
uint32 convertToShortId(uint32 id)
Converts the specified long frame ID to the equivalent short frame ID.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9