]> granicus.if.org Git - taglib/commitdiff
FLAC: Move some public functions to above private ones.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 14:45:31 +0000 (23:45 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 15:49:22 +0000 (00:49 +0900)
taglib/flac/flacfile.cpp

index e1db4bc24f27e1df3afcd9b5e95c5d22768ac817..66422f208b2bc12a84c870da6e765081a8efa39a 100644 (file)
@@ -290,6 +290,74 @@ void FLAC::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
   d->ID3v2FrameFactory = factory;
 }
 
+ByteVector FLAC::File::streamInfoData()
+{
+  return ByteVector();
+}
+
+long FLAC::File::streamLength()
+{
+  return 0;
+}
+
+List<FLAC::Picture *> FLAC::File::pictureList()
+{
+  List<Picture *> pictures;
+  for(uint i = 0; i < d->blocks.size(); i++) {
+    Picture *picture = dynamic_cast<Picture *>(d->blocks[i]);
+    if(picture) {
+      pictures.append(picture);
+    }
+  }
+  return pictures;
+}
+
+void FLAC::File::addPicture(Picture *picture)
+{
+  d->blocks.append(picture);
+}
+
+void FLAC::File::removePicture(Picture *picture, bool del)
+{
+  MetadataBlock *block = picture;
+  List<MetadataBlock *>::Iterator it = d->blocks.find(block);
+  if(it != d->blocks.end())
+    d->blocks.erase(it);
+
+  if(del)
+    delete picture;
+}
+
+void FLAC::File::removePictures()
+{
+  List<MetadataBlock *> newBlocks;
+  for(uint i = 0; i < d->blocks.size(); i++) {
+    Picture *picture = dynamic_cast<Picture *>(d->blocks[i]);
+    if(picture) {
+      delete picture;
+    }
+    else {
+      newBlocks.append(d->blocks[i]);
+    }
+  }
+  d->blocks = newBlocks;
+}
+
+bool FLAC::File::hasXiphComment() const
+{
+  return d->hasXiphComment;
+}
+
+bool FLAC::File::hasID3v1Tag() const
+{
+  return d->hasID3v1;
+}
+
+bool FLAC::File::hasID3v2Tag() const
+{
+  return d->hasID3v2;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // private members
 ////////////////////////////////////////////////////////////////////////////////
@@ -350,16 +418,6 @@ void FLAC::File::read(bool readProperties, Properties::ReadStyle propertiesStyle
   }
 }
 
-ByteVector FLAC::File::streamInfoData()
-{
-  return ByteVector();
-}
-
-long FLAC::File::streamLength()
-{
-  return 0;
-}
-
 void FLAC::File::scan()
 {
   // Scan the metadata pages
@@ -512,61 +570,3 @@ long FLAC::File::findID3v2()
 
   return -1;
 }
-
-List<FLAC::Picture *> FLAC::File::pictureList()
-{
-  List<Picture *> pictures;
-  for(uint i = 0; i < d->blocks.size(); i++) {
-    Picture *picture = dynamic_cast<Picture *>(d->blocks[i]);
-    if(picture) {
-      pictures.append(picture);
-    }
-  }
-  return pictures;
-}
-
-void FLAC::File::addPicture(Picture *picture)
-{
-  d->blocks.append(picture);
-}
-
-void FLAC::File::removePicture(Picture *picture, bool del)
-{
-  MetadataBlock *block = picture;
-  List<MetadataBlock *>::Iterator it = d->blocks.find(block);
-  if(it != d->blocks.end())
-    d->blocks.erase(it);
-
-  if(del)
-    delete picture;
-}
-
-void FLAC::File::removePictures()
-{
-  List<MetadataBlock *> newBlocks;
-  for(uint i = 0; i < d->blocks.size(); i++) {
-    Picture *picture = dynamic_cast<Picture *>(d->blocks[i]);
-    if(picture) {
-      delete picture;
-    }
-    else {
-      newBlocks.append(d->blocks[i]);
-    }
-  }
-  d->blocks = newBlocks;
-}
-
-bool FLAC::File::hasXiphComment() const
-{
-  return d->hasXiphComment;
-}
-
-bool FLAC::File::hasID3v1Tag() const
-{
-  return d->hasID3v1;
-}
-
-bool FLAC::File::hasID3v2Tag() const
-{
-  return d->hasID3v2;
-}