15 const QFileInfo fin(
m_file.fileName());
22 if(strncmp(magic,
"DBPL", 4))
28 m_file.read((
char*)&majorver, 1);
35 m_file.read((
char*)&minorver, 1);
42 m_file.read((
char*)&cnt, 4);
51 if(
m_file.read((
char*)&v, 2) != 2)
57 memset(uri, 0,
sizeof(
char) * (v + 1));
59 if(
m_file.read(uri, v) != v)
66 if(
m_file.read((
char*)&v, 1) != 1)
76 char decoder[20] = {0};
77 if(v &&
m_file.read((
char*)&decoder, v) != v)
82 if(
m_file.read((
char*)&v, 2) != 2)
88 if(
m_file.read((
char*)&v, 4) != 4)
93 if(
m_file.read((
char*)&v, 4) != 4)
99 if(
m_file.read((
char*)&duration, 4) != 4)
108 if(
m_file.read((
char*)&v, 1) != 1)
116 memset(ftype, 0,
sizeof(
char) * (v + 1));
118 if(
m_file.read(ftype, v) != v)
124 if(
m_file.read((
char*)&v, 4) != 4)
129 if(
m_file.read((
char*)&v, 4) != 4)
134 if(
m_file.read((
char*)&v, 4) != 4)
139 if(
m_file.read((
char*)&v, 4) != 4)
145 if(minorver >= 2 &&
m_file.read((
char*)&v, 4) != 4)
151 if(
m_file.read((
char*)&nm, 2) != 2)
156 for(
int j = 0; j < nm; j++)
158 if(
m_file.read((
char*)&v, 2) != 2)
169 memset(key, 0,
sizeof(
char) * (v + 1));
171 if(
m_file.read(key, v) != v)
176 if(
m_file.read((
char*)&v, 2) != 2)
187 memset(value, 0,
sizeof(
char) * (v + 1));
189 if(
m_file.read((
char*)&value, v) != v)
196 if(!item.m_songs.isEmpty())
#define TTKStaticCast(x, y)
static constexpr wchar_t key[]
static constexpr int PLAYLIST_MAJOR_VER
virtual bool writeBuffer(const MusicSongItemList &items) overridefinal
virtual bool readBuffer(MusicSongItemList &items) overridefinal
The class of the read write interface.
The class of the music song item.
static constexpr int PLAYLIST_MINOR_VER
The class of the music song info.
The class of the ttk file interface.
static qint64 formatDuration(const QString &time) noexcept