[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/taglib/taglib/asf
From:       Lukáš Lalinský <lalinsky () gmail ! com>
Date:       2011-01-16 12:00:52
Message-ID: 20110116120052.DDFC13E1F1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214789 by lalinsky:

Consistency with the rest of TagLib

 M  +16 -32    asfattribute.cpp  
 M  +24 -48    asffile.cpp  
 M  +21 -39    asftag.cpp  


--- trunk/kdesupport/taglib/taglib/asf/asfattribute.cpp #1214788:1214789
@@ -73,8 +73,7 @@
   d->ref();
 }
 
-ASF::Attribute &
-ASF::Attribute::operator=(const ASF::Attribute &other)
+ASF::Attribute &ASF::Attribute::operator=(const ASF::Attribute &other)
 {
   if(d->deref())
     delete d;
@@ -138,58 +137,49 @@
   d->boolValue = value;
 }
 
-ASF::Attribute::AttributeTypes
-ASF::Attribute::type() const
+ASF::Attribute::AttributeTypes ASF::Attribute::type() const
 {
   return d->type;
 }
 
-String
-ASF::Attribute::toString() const
+String ASF::Attribute::toString() const
 {
   return d->stringValue;
 }
 
-ByteVector
-ASF::Attribute::toByteVector() const
+ByteVector ASF::Attribute::toByteVector() const
 {
   if(d->pictureValue.isValid())
     return d->pictureValue.render();
   return d->byteVectorValue;
 }
 
-unsigned short
-ASF::Attribute::toBool() const
+unsigned short ASF::Attribute::toBool() const
 {
   return d->shortValue;
 }
 
-unsigned short
-ASF::Attribute::toUShort() const
+unsigned short ASF::Attribute::toUShort() const
 {
   return d->shortValue;
 }
 
-unsigned int
-ASF::Attribute::toUInt() const
+unsigned int ASF::Attribute::toUInt() const
 {
   return d->intValue;
 }
 
-unsigned long long
-ASF::Attribute::toULongLong() const
+unsigned long long ASF::Attribute::toULongLong() const
 {
   return d->longLongValue;
 }
 
-ASF::Picture
-ASF::Attribute::toPicture() const
+ASF::Picture ASF::Attribute::toPicture() const
 {
   return d->pictureValue;
 }
 
-String
-ASF::Attribute::parse(ASF::File &f, int kind)
+String ASF::Attribute::parse(ASF::File &f, int kind)
 {
   uint size, nameLength;
   String name;
@@ -261,8 +251,7 @@
   return name;
 }
 
-int
-ASF::Attribute::dataSize() const
+int ASF::Attribute::dataSize() const
 {
   switch (d->type) {
   case WordType:
@@ -284,8 +273,7 @@
   return 0;
 }
 
-ByteVector
-ASF::Attribute::render(const String &name, int kind) const
+ByteVector ASF::Attribute::render(const String &name, int kind) const
 {
   ByteVector data;
 
@@ -345,26 +333,22 @@
   return data;
 }
 
-int
-ASF::Attribute::language() const
+int ASF::Attribute::language() const
 {
   return d->language;
 }
 
-void
-ASF::Attribute::setLanguage(int value)
+void ASF::Attribute::setLanguage(int value)
 {
   d->language = value;
 }
 
-int
-ASF::Attribute::stream() const
+int ASF::Attribute::stream() const
 {
   return d->stream;
 }
 
-void
-ASF::Attribute::setStream(int value)
+void ASF::Attribute::setStream(int value)
 {
   d->stream = value;
 }
--- trunk/kdesupport/taglib/taglib/asf/asffile.cpp #1214788:1214789
@@ -146,14 +146,12 @@
   ByteVector render(ASF::File *file);
 };
 
-void
-ASF::File::BaseObject::parse(ASF::File *file, unsigned int size)
+void ASF::File::BaseObject::parse(ASF::File *file, unsigned int size)
 {
   data = file->readBlock(size - 24);
 }
 
-ByteVector
-ASF::File::BaseObject::render(ASF::File * /*file*/)
+ByteVector ASF::File::BaseObject::render(ASF::File * /*file*/)
 {
   return guid() + ByteVector::fromLongLong(data.size() + 24, false) + data;
 }
@@ -162,33 +160,28 @@
 {
 }
 
-ByteVector
-ASF::File::UnknownObject::guid()
+ByteVector ASF::File::UnknownObject::guid()
 {
   return myGuid;
 }
 
-ByteVector
-ASF::File::FilePropertiesObject::guid()
+ByteVector ASF::File::FilePropertiesObject::guid()
 {
   return filePropertiesGuid;
 }
 
-void
-ASF::File::FilePropertiesObject::parse(ASF::File *file, uint size)
+void ASF::File::FilePropertiesObject::parse(ASF::File *file, uint size)
 {
   BaseObject::parse(file, size);
   file->d->properties->setLength((int)(data.mid(40, 8).toLongLong(false) / 10000000L \
- data.mid(56, 8).toLongLong(false) / 1000L));  }
 
-ByteVector
-ASF::File::StreamPropertiesObject::guid()
+ByteVector ASF::File::StreamPropertiesObject::guid()
 {
   return streamPropertiesGuid;
 }
 
-void
-ASF::File::StreamPropertiesObject::parse(ASF::File *file, uint size)
+void ASF::File::StreamPropertiesObject::parse(ASF::File *file, uint size)
 {
   BaseObject::parse(file, size);
   file->d->properties->setChannels(data.mid(56, 2).toShort(false));
@@ -196,14 +189,12 @@
   file->d->properties->setBitrate(data.mid(62, 4).toUInt(false) * 8 / 1000);
 }
 
-ByteVector
-ASF::File::ContentDescriptionObject::guid()
+ByteVector ASF::File::ContentDescriptionObject::guid()
 {
   return contentDescriptionGuid;
 }
 
-void
-ASF::File::ContentDescriptionObject::parse(ASF::File *file, uint /*size*/)
+void ASF::File::ContentDescriptionObject::parse(ASF::File *file, uint /*size*/)
 {
   file->d->contentDescriptionObject = this;
   int titleLength = file->readWORD();
@@ -218,8 +209,7 @@
   file->d->tag->setRating(file->readString(ratingLength));
 }
 
-ByteVector
-ASF::File::ContentDescriptionObject::render(ASF::File *file)
+ByteVector ASF::File::ContentDescriptionObject::render(ASF::File *file)
 {
   ByteVector v1 = file->renderString(file->d->tag->title());
   ByteVector v2 = file->renderString(file->d->tag->artist());
@@ -240,14 +230,12 @@
   return BaseObject::render(file);
 }
 
-ByteVector
-ASF::File::ExtendedContentDescriptionObject::guid()
+ByteVector ASF::File::ExtendedContentDescriptionObject::guid()
 {
   return extendedContentDescriptionGuid;
 }
 
-void
-ASF::File::ExtendedContentDescriptionObject::parse(ASF::File *file, uint /*size*/)
+void ASF::File::ExtendedContentDescriptionObject::parse(ASF::File *file, uint \
/*size*/)  {
   file->d->extendedContentDescriptionObject = this;
   int count = file->readWORD();
@@ -258,8 +246,7 @@
   }
 }
 
-ByteVector
-ASF::File::ExtendedContentDescriptionObject::render(ASF::File *file)
+ByteVector ASF::File::ExtendedContentDescriptionObject::render(ASF::File *file)
 {
   data.clear();
   data.append(ByteVector::fromShort(attributeData.size(), false));
@@ -267,14 +254,12 @@
   return BaseObject::render(file);
 }
 
-ByteVector
-ASF::File::MetadataObject::guid()
+ByteVector ASF::File::MetadataObject::guid()
 {
   return metadataGuid;
 }
 
-void
-ASF::File::MetadataObject::parse(ASF::File *file, uint /*size*/)
+void ASF::File::MetadataObject::parse(ASF::File *file, uint /*size*/)
 {
   file->d->metadataObject = this;
   int count = file->readWORD();
@@ -285,8 +270,7 @@
   }
 }
 
-ByteVector
-ASF::File::MetadataObject::render(ASF::File *file)
+ByteVector ASF::File::MetadataObject::render(ASF::File *file)
 {
   data.clear();
   data.append(ByteVector::fromShort(attributeData.size(), false));
@@ -294,14 +278,12 @@
   return BaseObject::render(file);
 }
 
-ByteVector
-ASF::File::MetadataLibraryObject::guid()
+ByteVector ASF::File::MetadataLibraryObject::guid()
 {
   return metadataLibraryGuid;
 }
 
-void
-ASF::File::MetadataLibraryObject::parse(ASF::File *file, uint /*size*/)
+void ASF::File::MetadataLibraryObject::parse(ASF::File *file, uint /*size*/)
 {
   file->d->metadataLibraryObject = this;
   int count = file->readWORD();
@@ -312,8 +294,7 @@
   }
 }
 
-ByteVector
-ASF::File::MetadataLibraryObject::render(ASF::File *file)
+ByteVector ASF::File::MetadataLibraryObject::render(ASF::File *file)
 {
   data.clear();
   data.append(ByteVector::fromShort(attributeData.size(), false));
@@ -321,14 +302,12 @@
   return BaseObject::render(file);
 }
 
-ByteVector
-ASF::File::HeaderExtensionObject::guid()
+ByteVector ASF::File::HeaderExtensionObject::guid()
 {
   return headerExtensionGuid;
 }
 
-void
-ASF::File::HeaderExtensionObject::parse(ASF::File *file, uint /*size*/)
+void ASF::File::HeaderExtensionObject::parse(ASF::File *file, uint /*size*/)
 {
   file->d->headerExtensionObject = this;
   file->seek(18, File::Current);
@@ -353,8 +332,7 @@
   }
 }
 
-ByteVector
-ASF::File::HeaderExtensionObject::render(ASF::File *file)
+ByteVector ASF::File::HeaderExtensionObject::render(ASF::File *file)
 {
   data.clear();
   for(unsigned int i = 0; i < objects.size(); i++) {
@@ -533,8 +511,7 @@
   return v.toLongLong(false);
 }
 
-String
-ASF::File::readString(int length)
+String ASF::File::readString(int length)
 {
   ByteVector data = readBlock(length);
   unsigned int size = data.size();
@@ -550,8 +527,7 @@
   return String(data, String::UTF16LE);
 }
 
-ByteVector
-ASF::File::renderString(const String &str, bool includeLength)
+ByteVector ASF::File::renderString(const String &str, bool includeLength)
 {
   ByteVector data = str.data(String::UTF16LE) + ByteVector::fromShort(0, false);
   if(includeLength) {
--- trunk/kdesupport/taglib/taglib/asf/asftag.cpp #1214788:1214789
@@ -56,54 +56,46 @@
     delete d;
 }
 
-String
-ASF::Tag::title() const
+String ASF::Tag::title() const
 {
   return d->title;
 }
 
-String
-ASF::Tag::artist() const
+String ASF::Tag::artist() const
 {
   return d->artist;
 }
 
-String
-ASF::Tag::album() const
+String ASF::Tag::album() const
 {
   if(d->attributeListMap.contains("WM/AlbumTitle"))
     return d->attributeListMap["WM/AlbumTitle"][0].toString();
   return String::null;
 }
 
-String
-ASF::Tag::copyright() const
+String ASF::Tag::copyright() const
 {
   return d->copyright;
 }
 
-String
-ASF::Tag::comment() const
+String ASF::Tag::comment() const
 {
   return d->comment;
 }
 
-String
-ASF::Tag::rating() const
+String ASF::Tag::rating() const
 {
   return d->rating;
 }
 
-unsigned int
-ASF::Tag::year() const
+unsigned int ASF::Tag::year() const
 {
   if(d->attributeListMap.contains("WM/Year"))
     return d->attributeListMap["WM/Year"][0].toString().toInt();
   return 0;
 }
 
-unsigned int
-ASF::Tag::track() const
+unsigned int ASF::Tag::track() const
 {
   if(d->attributeListMap.contains("WM/TrackNumber")) {
     const ASF::Attribute attr = d->attributeListMap["WM/TrackNumber"][0];
@@ -117,70 +109,59 @@
   return 0;
 }
 
-String
-ASF::Tag::genre() const
+String ASF::Tag::genre() const
 {
   if(d->attributeListMap.contains("WM/Genre"))
     return d->attributeListMap["WM/Genre"][0].toString();
   return String::null;
 }
 
-void
-ASF::Tag::setTitle(const String &value)
+void ASF::Tag::setTitle(const String &value)
 {
   d->title = value;
 }
 
-void
-ASF::Tag::setArtist(const String &value)
+void ASF::Tag::setArtist(const String &value)
 {
   d->artist = value;
 }
 
-void
-ASF::Tag::setCopyright(const String &value)
+void ASF::Tag::setCopyright(const String &value)
 {
   d->copyright = value;
 }
 
-void
-ASF::Tag::setComment(const String &value)
+void ASF::Tag::setComment(const String &value)
 {
   d->comment = value;
 }
 
-void
-ASF::Tag::setRating(const String &value)
+void ASF::Tag::setRating(const String &value)
 {
   d->rating = value;
 }
 
-void
-ASF::Tag::setAlbum(const String &value)
+void ASF::Tag::setAlbum(const String &value)
 {
   setAttribute("WM/AlbumTitle", value);
 }
 
-void
-ASF::Tag::setGenre(const String &value)
+void ASF::Tag::setGenre(const String &value)
 {
   setAttribute("WM/Genre", value);
 }
 
-void
-ASF::Tag::setYear(uint value)
+void ASF::Tag::setYear(uint value)
 {
   setAttribute("WM/Year", String::number(value));
 }
 
-void
-ASF::Tag::setTrack(uint value)
+void ASF::Tag::setTrack(uint value)
 {
   setAttribute("WM/TrackNumber", String::number(value));
 }
 
-ASF::AttributeListMap&
-ASF::Tag::attributeListMap()
+ASF::AttributeListMap& ASF::Tag::attributeListMap()
 {
   return d->attributeListMap;
 }
@@ -209,7 +190,8 @@
   }
 }
 
-bool ASF::Tag::isEmpty() const {
+bool ASF::Tag::isEmpty() const
+{
   return TagLib::Tag::isEmpty() &&
          copyright().isEmpty() &&
          rating().isEmpty() &&


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic