From 40da9829360108931ef2a873353b3f7271a495a8 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Fri, 16 May 2008 02:13:56 +0000 Subject: [PATCH] Add outline for RIFF files. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@808211 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- taglib/Makefile.am | 4 +-- taglib/riff/Makefile.am | 12 +++++++ taglib/riff/rifffile.cpp | 72 ++++++++++++++++++++++++++++++++++++++++ taglib/riff/rifffile.h | 69 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 2 deletions(-) create mode 100644 taglib/riff/Makefile.am create mode 100644 taglib/riff/rifffile.cpp create mode 100644 taglib/riff/rifffile.h diff --git a/taglib/Makefile.am b/taglib/Makefile.am index d849b944..9a0fedbd 100644 --- a/taglib/Makefile.am +++ b/taglib/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = toolkit mpeg ogg flac ape mpc wavpack trueaudio +SUBDIRS = toolkit mpeg ogg flac ape mpc wavpack trueaudio riff INCLUDES = \ -I$(top_srcdir)/taglib \ @@ -23,4 +23,4 @@ taglib_includedir = $(includedir)/taglib libtag_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 6:0:5 libtag_la_LIBADD = ./mpeg/libmpeg.la ./ogg/libogg.la ./flac/libflac.la ./mpc/libmpc.la \ ./ape/libape.la ./toolkit/libtoolkit.la ./wavpack/libwavpack.la \ - ./trueaudio/libtrueaudio.la + ./trueaudio/libtrueaudio.la ./riff/libriff.la diff --git a/taglib/riff/Makefile.am b/taglib/riff/Makefile.am new file mode 100644 index 00000000..60fe0a4a --- /dev/null +++ b/taglib/riff/Makefile.am @@ -0,0 +1,12 @@ +INCLUDES = \ + -I$(top_srcdir)/taglib \ + -I$(top_srcdir)/taglib/toolkit \ + -I$(top_srcdir)/taglib/mpeg/id3v2 \ + $(all_includes) + +noinst_LTLIBRARIES = libriff.la + +libriff_la_SOURCES = rifffile.cpp + +taglib_include_HEADERS = rifffile.h +taglib_includedir = $(includedir)/taglib diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp new file mode 100644 index 00000000..44a1a0ed --- /dev/null +++ b/taglib/riff/rifffile.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + copyright : (C) 2002 - 2008 by Scott Wheeler + email : wheeler@kde.org + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * + * USA * + * * + * Alternatively, this file is available under the Mozilla Public * + * License Version 1.1. You may obtain a copy of the License at * + * http://www.mozilla.org/MPL/ * + ***************************************************************************/ + +#include "rifffile.h" + +using namespace TagLib; + +class RIFF::File::FilePrivate +{ +public: + FilePrivate() + { + + } + + ~FilePrivate() + { + + } +}; + +//////////////////////////////////////////////////////////////////////////////// +// public members +//////////////////////////////////////////////////////////////////////////////// + +RIFF::File::~File() +{ + delete d; +} + +//////////////////////////////////////////////////////////////////////////////// +// protected members +//////////////////////////////////////////////////////////////////////////////// + +RIFF::File::File(FileName file) : TagLib::File(file) +{ + d = new FilePrivate; + + if(isOpen()) + read(); +} + +//////////////////////////////////////////////////////////////////////////////// +// private members +//////////////////////////////////////////////////////////////////////////////// + +void RIFF::File::read() +{ + +} diff --git a/taglib/riff/rifffile.h b/taglib/riff/rifffile.h new file mode 100644 index 00000000..ad700df4 --- /dev/null +++ b/taglib/riff/rifffile.h @@ -0,0 +1,69 @@ +/*************************************************************************** + copyright : (C) 2002 - 2008 by Scott Wheeler + email : wheeler@kde.org + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * + * USA * + * * + * Alternatively, this file is available under the Mozilla Public * + * License Version 1.1. You may obtain a copy of the License at * + * http://www.mozilla.org/MPL/ * + ***************************************************************************/ + +#ifndef TAGLIB_RIFFFILE_H +#define TAGLIB_RIFFFILE_H + +#include "taglib_export.h" +#include "tfile.h" + +namespace TagLib { + + //! An implementation of TagLib::File with RIFF specific methods + + namespace RIFF { + + //! An RIFF file class with some useful methods specific to RIFF + + /*! + * This implements the generic TagLib::File API and additionally provides + * access to properties that are distinct to RIFF files, notably access + * to the different ID3 tags. + */ + + class TAGLIB_EXPORT File : public TagLib::File + { + public: + /*! + * Destroys this instance of the File. + */ + virtual ~File(); + + protected: + File(FileName file); + + private: + File(const File &); + File &operator=(const File &); + + void read(); + + class FilePrivate; + FilePrivate *d; + }; + } +} + +#endif