UserTextIdentificationFrame::UserTextIdentificationFrame(const ByteVector &data) :
TextIdentificationFrame(data)
{
-
+ checkFields();
}
String UserTextIdentificationFrame::toString() const
StringList UserTextIdentificationFrame::fieldList() const
{
- StringList l = TextIdentificationFrame::fieldList();
-
- if(!l.isEmpty()) {
- StringList::Iterator it = l.begin();
- l.erase(it);
- }
+ // TODO: remove this function
- return l;
+ return TextIdentificationFrame::fieldList();
}
void UserTextIdentificationFrame::setText(const String &text)
UserTextIdentificationFrame::UserTextIdentificationFrame(const ByteVector &data, Header *h) :
TextIdentificationFrame(data, h)
{
-
+ checkFields();
+}
+
+void UserTextIdentificationFrame::checkFields()
+{
+ int fields = fieldList().size();
+
+ if(fields == 0)
+ setDescription(String::null);
+ if(fields <= 1)
+ setText(String::null);
}
UserTextIdentificationFrame(const TextIdentificationFrame &);
UserTextIdentificationFrame &operator=(const UserTextIdentificationFrame &);
+ void checkFields();
+
class UserTextIdentificationFramePrivate;
UserTextIdentificationFramePrivate *d;
};