[Libspiff-commits] SF.net SVN: libspiff:[516] trunk
Brought to you by:
hartwork
|
From: <har...@us...> - 2009-02-17 23:10:36
|
Revision: 516
http://libspiff.svn.sourceforge.net/libspiff/?rev=516&view=rev
Author: hartwork
Date: 2009-02-17 22:31:34 +0000 (Tue, 17 Feb 2009)
Log Message:
-----------
Still rename transition and related fixes
Modified Paths:
--------------
trunk/ChangeLog
trunk/Makefile.am
trunk/TODO.txt
trunk/bindings/c/doc/Doxyfile.in
trunk/bindings/c/doc/Makefile.am
trunk/bindings/c/doc/configure.ac
trunk/bindings/c/doc/release.sh
trunk/bindings/c/xspf_c.cpp
trunk/bindings/c/xspf_c.h
trunk/configure.ac
trunk/doc/Doxyfile.in
trunk/doc/Mainpage
trunk/doc/Makefile.am
trunk/doc/configure.ac
trunk/doc/release.sh
trunk/examples/check/check.cpp
trunk/examples/read/read.cpp
trunk/examples/strip/strip.cpp
trunk/examples/write/write.cpp
trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtension.h
trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionReader.h
trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h
trunk/include/xspf/Xspf.h
trunk/include/xspf/XspfChunkCallback.h
trunk/include/xspf/XspfData.h
trunk/include/xspf/XspfDateTime.h
trunk/include/xspf/XspfDefines.h
trunk/include/xspf/XspfExtension.h
trunk/include/xspf/XspfExtensionReader.h
trunk/include/xspf/XspfExtensionReaderFactory.h
trunk/include/xspf/XspfExtensionWriter.h
trunk/include/xspf/XspfIndentFormatter.h
trunk/include/xspf/XspfProps.h
trunk/include/xspf/XspfReader.h
trunk/include/xspf/XspfReaderCallback.h
trunk/include/xspf/XspfSeamlessFormatter.h
trunk/include/xspf/XspfStack.h
trunk/include/xspf/XspfToolbox.h
trunk/include/xspf/XspfTrack.h
trunk/include/xspf/XspfVersion.h
trunk/include/xspf/XspfWriter.h
trunk/include/xspf/XspfXmlFormatter.h
trunk/include/xspf/ZirkorosOnline/ZirkorosOnlineTrackExtension.h
trunk/include/xspf/ZirkorosOnline/ZirkorosOnlineTrackExtensionReader.h
trunk/scripts/edit_version.sh
trunk/scripts/release.sh
trunk/src/ProjectOpus/ProjectOpusPlaylistExtension.cpp
trunk/src/ProjectOpus/ProjectOpusPlaylistExtensionReader.cpp
trunk/src/ProjectOpus/ProjectOpusPlaylistExtensionWriter.cpp
trunk/src/XspfChunkCallback.cpp
trunk/src/XspfData.cpp
trunk/src/XspfDataWriter.cpp
trunk/src/XspfDataWriter.h
trunk/src/XspfDateTime.cpp
trunk/src/XspfExtension.cpp
trunk/src/XspfExtensionReader.cpp
trunk/src/XspfExtensionReaderFactory.cpp
trunk/src/XspfExtensionWriter.cpp
trunk/src/XspfIndentFormatter.cpp
trunk/src/XspfProps.cpp
trunk/src/XspfPropsWriter.cpp
trunk/src/XspfPropsWriter.h
trunk/src/XspfReader.cpp
trunk/src/XspfReaderCallback.cpp
trunk/src/XspfSeamlessFormatter.cpp
trunk/src/XspfSkipExtensionReader.cpp
trunk/src/XspfSkipExtensionReader.h
trunk/src/XspfStrictReaderCallback.cpp
trunk/src/XspfStrictReaderCallback.h
trunk/src/XspfToolbox.cpp
trunk/src/XspfTrack.cpp
trunk/src/XspfTrackWriter.cpp
trunk/src/XspfTrackWriter.h
trunk/src/XspfWriter.cpp
trunk/src/XspfXmlFormatter.cpp
trunk/src/ZirkorosOnline/ZirkorosOnlineTrackExtension.cpp
trunk/src/ZirkorosOnline/ZirkorosOnlineTrackExtensionReader.cpp
trunk/test/ChunkCallbackSuite.cpp
trunk/test/ChunkCallbackSuite.h
trunk/test/DateTimeSuite.cpp
trunk/test/DateTimeSuite.h
trunk/test/ExtensionReaderFactorySuite.cpp
trunk/test/ExtensionReaderFactorySuite.h
trunk/test/MaliciousXmlSuite.cpp
trunk/test/MemoryModelSuite.cpp
trunk/test/OfficialSuite.cpp
trunk/test/OfficialSuite.h
trunk/test/ProjectOpus/ProjectOpusSuite.cpp
trunk/test/ProjectOpus/ProjectOpusSuite.h
trunk/test/ReadWriteSuite.cpp
trunk/test/WhiteSpaceSuite.cpp
trunk/win32/Code_Blocks/check.cbp
trunk/win32/Code_Blocks/libxspf.cbp
trunk/win32/Code_Blocks/libxspf.workspace
trunk/win32/Code_Blocks/read.cbp
trunk/win32/Code_Blocks/strip.cbp
trunk/win32/Code_Blocks/test.cbp
trunk/win32/Code_Blocks/write.cbp
trunk/win32/Visual_Studio_2005/check.vcproj
trunk/win32/Visual_Studio_2005/libxspf.sln
trunk/win32/Visual_Studio_2005/libxspf.vcproj
trunk/win32/Visual_Studio_2005/read.vcproj
trunk/win32/Visual_Studio_2005/strip.vcproj
trunk/win32/Visual_Studio_2005/test.vcproj
trunk/win32/Visual_Studio_2005/write.vcproj
Added Paths:
-----------
trunk/bindings/c/doc/release.sh.in
trunk/doc/release.sh.in
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/ChangeLog 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,5 +1,6 @@
???
+ * Changed: Rename from libSpiff to libxspf
* Fixed: Compile errors with GCC 4.4
Thanks to Martin Michlmayr for the patch!
* Fixed: Compile errors with Sun Ceres C++ 5.10
@@ -19,6 +20,7 @@
* doc/html/index.qhp
* bindings/c/doc/html/index.qhp
Generation requires Doxygen 1.5.7.1-20081103 or later.
+ * Improved: Nested configure hacks resolved
* Soname: 4:1:0
2008-09-21 -- 1.0.0
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/Makefile.am 2009-02-17 22:31:34 UTC (rev 516)
@@ -9,19 +9,19 @@
bindings/c/doc
endif
-lib_LTLIBRARIES = libspiff.la
+lib_LTLIBRARIES = libxspf.la
bin_PROGRAMS = \
- examples/check/spiff_check \
- examples/strip/spiff_strip
+ examples/check/xspf_check \
+ examples/strip/xspf_strip
noinst_PROGRAMS = \
examples/read/example_read \
examples/write/example_write
-check_PROGRAMS = test/spiff_test
+check_PROGRAMS = test/xspf_test
-TESTS = test/spiff_test
+TESTS = test/xspf_test
@@ -32,35 +32,35 @@
-libspiff_la_LDFLAGS = -version-info 4:1:0
+libxspf_la_LDFLAGS = -version-info 4:1:0
-libspiff_la_SOURCES = \
- src/SpiffChunkCallback.cpp \
- src/SpiffData.cpp \
- src/SpiffDataWriter.cpp \
- src/SpiffDataWriter.h \
- src/SpiffDateTime.cpp \
- src/SpiffExtension.cpp \
- src/SpiffExtensionReader.cpp \
- src/SpiffExtensionReaderFactory.cpp \
- src/SpiffExtensionWriter.cpp \
- src/SpiffIndentFormatter.cpp \
- src/SpiffProps.cpp \
- src/SpiffPropsWriter.cpp \
- src/SpiffPropsWriter.h \
- src/SpiffReader.cpp \
- src/SpiffReaderCallback.cpp \
- src/SpiffSeamlessFormatter.cpp \
- src/SpiffSkipExtensionReader.cpp \
- src/SpiffSkipExtensionReader.h \
- src/SpiffStrictReaderCallback.cpp \
- src/SpiffStrictReaderCallback.h \
- src/SpiffToolbox.cpp \
- src/SpiffTrack.cpp \
- src/SpiffTrackWriter.cpp \
- src/SpiffTrackWriter.h \
- src/SpiffWriter.cpp \
- src/SpiffXmlFormatter.cpp \
+libxspf_la_SOURCES = \
+ src/XspfChunkCallback.cpp \
+ src/XspfData.cpp \
+ src/XspfDataWriter.cpp \
+ src/XspfDataWriter.h \
+ src/XspfDateTime.cpp \
+ src/XspfExtension.cpp \
+ src/XspfExtensionReader.cpp \
+ src/XspfExtensionReaderFactory.cpp \
+ src/XspfExtensionWriter.cpp \
+ src/XspfIndentFormatter.cpp \
+ src/XspfProps.cpp \
+ src/XspfPropsWriter.cpp \
+ src/XspfPropsWriter.h \
+ src/XspfReader.cpp \
+ src/XspfReaderCallback.cpp \
+ src/XspfSeamlessFormatter.cpp \
+ src/XspfSkipExtensionReader.cpp \
+ src/XspfSkipExtensionReader.h \
+ src/XspfStrictReaderCallback.cpp \
+ src/XspfStrictReaderCallback.h \
+ src/XspfToolbox.cpp \
+ src/XspfTrack.cpp \
+ src/XspfTrackWriter.cpp \
+ src/XspfTrackWriter.h \
+ src/XspfWriter.cpp \
+ src/XspfXmlFormatter.cpp \
\
src/ProjectOpus/ProjectOpusPlaylistExtension.cpp \
src/ProjectOpus/ProjectOpusPlaylistExtensionReader.cpp \
@@ -70,89 +70,89 @@
src/ZirkorosOnline/ZirkorosOnlineTrackExtensionReader.cpp \
src/ZirkorosOnline/ZirkorosOnlineTrackExtensionWriter.cpp \
\
- bindings/c/spiff_c.cpp
+ bindings/c/xspf_c.cpp
-include_spiffdir = $(prefix)/include/spiff
+include_xspfdir = $(prefix)/include/xspf
-include_spiff_HEADERS = \
- include/spiff/Spiff.h \
- include/spiff/SpiffChunkCallback.h \
- include/spiff/SpiffData.h \
- include/spiff/SpiffDateTime.h \
- include/spiff/SpiffDefines.h \
- include/spiff/SpiffExtension.h \
- include/spiff/SpiffExtensionReader.h \
- include/spiff/SpiffExtensionReaderFactory.h \
- include/spiff/SpiffExtensionWriter.h \
- include/spiff/SpiffIndentFormatter.h \
- include/spiff/SpiffProps.h \
- include/spiff/SpiffReader.h \
- include/spiff/SpiffReaderCallback.h \
- include/spiff/SpiffSeamlessFormatter.h \
- include/spiff/SpiffStack.h \
- include/spiff/SpiffToolbox.h \
- include/spiff/SpiffTrack.h \
- include/spiff/SpiffVersion.h \
- include/spiff/SpiffWriter.h \
- include/spiff/SpiffXmlFormatter.h \
+include_xspf_HEADERS = \
+ include/xspf/Xspf.h \
+ include/xspf/XspfChunkCallback.h \
+ include/xspf/XspfData.h \
+ include/xspf/XspfDateTime.h \
+ include/xspf/XspfDefines.h \
+ include/xspf/XspfExtension.h \
+ include/xspf/XspfExtensionReader.h \
+ include/xspf/XspfExtensionReaderFactory.h \
+ include/xspf/XspfExtensionWriter.h \
+ include/xspf/XspfIndentFormatter.h \
+ include/xspf/XspfProps.h \
+ include/xspf/XspfReader.h \
+ include/xspf/XspfReaderCallback.h \
+ include/xspf/XspfSeamlessFormatter.h \
+ include/xspf/XspfStack.h \
+ include/xspf/XspfToolbox.h \
+ include/xspf/XspfTrack.h \
+ include/xspf/XspfVersion.h \
+ include/xspf/XspfWriter.h \
+ include/xspf/XspfXmlFormatter.h \
\
- bindings/c/spiff_c.h
+ bindings/c/xspf_c.h
-include_spiff_ProjectOpusdir = $(prefix)/include/spiff/ProjectOpus
+include_xspf_ProjectOpusdir = $(prefix)/include/xspf/ProjectOpus
-include_spiff_ProjectOpus_HEADERS = \
- include/spiff/ProjectOpus/ProjectOpusPlaylistExtension.h \
- include/spiff/ProjectOpus/ProjectOpusPlaylistExtensionReader.h \
- include/spiff/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h
+include_xspf_ProjectOpus_HEADERS = \
+ include/xspf/ProjectOpus/ProjectOpusPlaylistExtension.h \
+ include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionReader.h \
+ include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h
-include_spiff_ZirkorosOnlinedir = $(prefix)/include/spiff/ZirkorosOnline
+include_xspf_ZirkorosOnlinedir = $(prefix)/include/xspf/ZirkorosOnline
-include_spiff_ZirkorosOnline_HEADERS = \
- include/spiff/ZirkorosOnline/ZirkorosOnlineTrackExtension.h \
- include/spiff/ZirkorosOnline/ZirkorosOnlineTrackExtensionReader.h \
- include/spiff/ZirkorosOnline/ZirkorosOnlineTrackExtensionWriter.h
+include_xspf_ZirkorosOnline_HEADERS = \
+ include/xspf/ZirkorosOnline/ZirkorosOnlineTrackExtension.h \
+ include/xspf/ZirkorosOnline/ZirkorosOnlineTrackExtensionReader.h \
+ include/xspf/ZirkorosOnline/ZirkorosOnlineTrackExtensionWriter.h
-examples_check_spiff_check_LDADD = libspiff.la
+examples_check_xspf_check_LDADD = libxspf.la
-examples_check_spiff_check_SOURCES = \
+examples_check_xspf_check_SOURCES = \
examples/check/check.cpp
-examples_read_example_read_LDADD = libspiff.la
+examples_read_example_read_LDADD = libxspf.la
examples_read_example_read_SOURCES = \
examples/read/read.cpp
-examples_strip_spiff_strip_LDADD = libspiff.la
+examples_strip_xspf_strip_LDADD = libxspf.la
-examples_strip_spiff_strip_SOURCES = \
+examples_strip_xspf_strip_SOURCES = \
examples/strip/strip.cpp
-examples_write_example_write_LDADD = libspiff.la
+examples_write_example_write_LDADD = libxspf.la
examples_write_example_write_SOURCES = \
examples/write/write.cpp
-test_spiff_test_LDADD = libspiff.la
+test_xspf_test_LDADD = libxspf.la
-test_spiff_test_CPPFLAGS = -DXSPF_SRCDIR=\"${srcdir}\"
+test_xspf_test_CPPFLAGS = -DXSPF_SRCDIR=\"${srcdir}\"
-test_spiff_test_SOURCES = \
+test_xspf_test_SOURCES = \
test/CppTest/collectoroutput.cpp \
test/CppTest/compileroutput.cpp \
test/CppTest/cpptest.h \
@@ -206,18 +206,20 @@
EXTRA_DIST = \
bindings/c/doc/aclocal.m4 \
bindings/c/doc/configure \
- bindings/c/doc/configure.in \
- bindings/c/doc/Doxyfile \
+ bindings/c/doc/configure.ac \
+ bindings/c/doc/Doxyfile.in \
bindings/c/doc/Makefile.am \
bindings/c/doc/Makefile.in \
+ bindings/c/doc/release.sh.in \
\
doc/aclocal.m4 \
doc/configure \
- doc/configure.in \
- doc/Doxyfile \
+ doc/configure.ac \
+ doc/Doxyfile.in \
doc/Mainpage \
doc/Makefile.am \
doc/Makefile.in \
+ doc/release.sh.in \
\
examples/read/playlist.xspf \
\
@@ -323,8 +325,8 @@
\
test/ProjectOpus/Example.xspf \
\
- win32/Code_Blocks/libspiff.cbp \
- win32/Code_Blocks/libspiff.workspace \
+ win32/Code_Blocks/libxspf.cbp \
+ win32/Code_Blocks/libxspf.workspace \
\
win32/Code_Blocks/check.cbp \
win32/Code_Blocks/read.cbp \
@@ -332,8 +334,8 @@
win32/Code_Blocks/test.cbp \
win32/Code_Blocks/write.cbp \
\
- win32/Visual_Studio_2005/libspiff.sln \
- win32/Visual_Studio_2005/libspiff.vcproj \
+ win32/Visual_Studio_2005/libxspf.sln \
+ win32/Visual_Studio_2005/libxspf.vcproj \
\
win32/Visual_Studio_2005/check.vcproj \
win32/Visual_Studio_2005/read.vcproj \
Modified: trunk/TODO.txt
===================================================================
--- trunk/TODO.txt 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/TODO.txt 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,6 +1,6 @@
== BEFORE NEXT RELEASE ==
* Finish Zirkoros extension
- * xml:id support for SpiffTrack
+ * xml:id support for XspfTrack
== SOON ==
* @since tags everywhere
Modified: trunk/bindings/c/doc/Doxyfile.in
===================================================================
--- trunk/bindings/c/doc/Doxyfile.in 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/doc/Doxyfile.in 2009-02-17 22:31:34 UTC (rev 516)
@@ -2,8 +2,8 @@
# .qhp output
GENERATE_QHP = yes
-QHP_NAMESPACE = "net.sourceforge.libspiff"
-QHP_VIRTUAL_FOLDER = "spiff_c-@VERSION@"
+QHP_NAMESPACE = "net.sourceforge.libxspf"
+QHP_VIRTUAL_FOLDER = "xspf_c-@VERSION@"
# .qch output
QCH_FILE = "../@PACKAGE@-@VERSION@.qch"
@@ -15,7 +15,7 @@
###############################################################
-PROJECT_NAME = spiff_c
+PROJECT_NAME = xspf_c
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by double-quotes) that should identify the project for which the documentation is generated. This name is used in the title of most generated pages and in a few other places.
Modified: trunk/bindings/c/doc/Makefile.am
===================================================================
--- trunk/bindings/c/doc/Makefile.am 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/doc/Makefile.am 2009-02-17 22:31:34 UTC (rev 516)
@@ -14,10 +14,12 @@
rm -f html/index.*
doxygen Doxyfile
-EXTRA_DIST = \
- Doxyfile \
- \
+DOC_FILES = \
html/*.css \
html/*.gif \
html/*.html \
html/*.png
+
+
+## Make doc files get installed
+nobase_nodist_doc_DATA = $(DOC_FILES)
Modified: trunk/bindings/c/doc/configure.ac
===================================================================
--- trunk/bindings/c/doc/configure.ac 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/doc/configure.ac 2009-02-17 22:31:34 UTC (rev 516)
@@ -2,17 +2,9 @@
AC_PREREQ(2.61)
AC_INIT(Doxyfile.in)
AC_CONFIG_AUX_DIR([../../../build-aux])
-AM_INIT_AUTOMAKE(spiff_c-doc, 1.0.0)
+AM_INIT_AUTOMAKE(xspf_c-doc, 1.1.0)
-## Nested configure hacks
-CALLED_BY_PARENT=0
-AC_ARG_ENABLE(doc, [], [
- CALLED_BY_PARENT=1
-], [])
-AM_CONDITIONAL(CALLED_BY_PARENT, test x${CALLED_BY_PARENT} = x1)
-
-
## Doxygen
AC_CHECK_PROG(DOXY_CHECK, doxygen, found, missing)
if test ${DOXY_CHECK} != "found" ; then
@@ -44,4 +36,5 @@
Doxyfile
Makefile
])
+AC_CONFIG_FILES([release.sh], [chmod a+x release.sh])
AC_OUTPUT
Modified: trunk/bindings/c/doc/release.sh
===================================================================
--- trunk/bindings/c/doc/release.sh 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/doc/release.sh 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,25 +1,39 @@
-#! /bin/bash
-CUR=0
-COUNT=3
+#! /usr/bin/env bash
+(
+cd $(dirname $(which "$0")) || exit 1
-step() {
- PERC=$((100 * CUR / COUNT))
- printf "[%3i%%] %s" ${PERC} "$1"
- echo
- CUR=$((CUR + 1))
-}
+distdir="xspf_c-doc-1.0.0"
+[ -z $MAKE ] && MAKE=make
-./bootstrap.sh || exit 1
-echo
+# Clean up
+rm -Rf "${distdir}" "${distdir}.zip"
-step "configure"
-./configure || exit 1
+# Generate
+"${MAKE}" || exit 1
-step "make"
-make || exit 1
+# Copy
+mkdir -p "${distdir}/html"
+cp \
+ html/*.css \
+ html/*.gif \
+ html/*.html \
+ html/*.png \
+ \
+ "${distdir}/html/" || exit 1
-step "make dist"
-make dist || exit 1
+# Package
+zip -r "${distdir}.zip" "${distdir}" || exit 1
-step "."
-exit 0
+cat <<INFO
+=================================================
+${distdir} archives ready for distribution:
+${distdir}.zip
+=================================================
+
+INFO
+
+# Clean up
+rm -Rf "${distdir}"
+
+)
+exit $?
Added: trunk/bindings/c/doc/release.sh.in
===================================================================
--- trunk/bindings/c/doc/release.sh.in (rev 0)
+++ trunk/bindings/c/doc/release.sh.in 2009-02-17 22:31:34 UTC (rev 516)
@@ -0,0 +1,39 @@
+#! /usr/bin/env bash
+(
+cd $(dirname $(which "$0")) || exit 1
+
+distdir="@PACKAGE@-@VERSION@"
+[ -z $MAKE ] && MAKE=make
+
+# Clean up
+rm -Rf "${distdir}" "${distdir}.zip"
+
+# Generate
+"${MAKE}" || exit 1
+
+# Copy
+mkdir -p "${distdir}/html"
+cp \
+ html/*.css \
+ html/*.gif \
+ html/*.html \
+ html/*.png \
+ \
+ "${distdir}/html/" || exit 1
+
+# Package
+zip -r "${distdir}.zip" "${distdir}" || exit 1
+
+cat <<INFO
+=================================================
+${distdir} archives ready for distribution:
+${distdir}.zip
+=================================================
+
+INFO
+
+# Clean up
+rm -Rf "${distdir}"
+
+)
+exit $?
Property changes on: trunk/bindings/c/doc/release.sh.in
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/bindings/c/xspf_c.cpp
===================================================================
--- trunk/bindings/c/xspf_c.cpp 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/xspf_c.cpp 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,5 +1,5 @@
/*
- * spiff_c - Simple C interface for libxspf
+ * xspf_c - Simple C interface for libxspf
*
* Copyright (C) 2007, Ed Schouten / Xiph.Org Foundation
* Copyright (C) 2008, Sebastian Pipping / Xiph.Org Foundation
@@ -40,80 +40,80 @@
* Sebastian Pipping <sp...@xi...>
*/
/**
- * @file spiff_c.cpp
+ * @file xspf_c.cpp
* @brief Simple libxspf C bindings.
*/
-#include <spiff/SpiffIndentFormatter.h>
-#include <spiff/SpiffProps.h>
-#include <spiff/SpiffReader.h>
-#include <spiff/SpiffReaderCallback.h>
-#include <spiff/SpiffTrack.h>
-#include <spiff/SpiffWriter.h>
+#include <xspf/XspfIndentFormatter.h>
+#include <xspf/XspfProps.h>
+#include <xspf/XspfReader.h>
+#include <xspf/XspfReaderCallback.h>
+#include <xspf/XspfTrack.h>
+#include <xspf/XspfWriter.h>
#include <cstring>
extern "C" {
-#include "spiff_c.h"
+#include "xspf_c.h"
}
-using namespace Spiff;
+using namespace Xspf;
/**
- * @brief Spiff list reading callback, which stores data in a specific
- * C-style Spiff list.
+ * @brief Xspf list reading callback, which stores data in a specific
+ * C-style Xspf list.
*/
-class SpiffCReaderCallback : public SpiffReaderCallback {
+class XspfCReaderCallback : public XspfReaderCallback {
private:
/**
- * @brief The C-style Spiff list the tracks should be appended
+ * @brief The C-style Xspf list the tracks should be appended
* to.
*/
- spiff_list *list;
+ xspf_list *list;
/**
* @brief Pointer to the `next' field in the last inserted item
* for improving append speed.
*/
- spiff_track **newtrack;
+ xspf_track **newtrack;
/**
- * @brief Callback which adds tracks to the spiff_list.
+ * @brief Callback which adds tracks to the xspf_list.
*/
- void addTrack(SpiffTrack *track);
+ void addTrack(XspfTrack *track);
/**
- * @brief Callback which sets properties in the spiff_list.
+ * @brief Callback which sets properties in the xspf_list.
*/
- void setProps(SpiffProps *props);
+ void setProps(XspfProps *props);
public:
/**
- * @brief Create callback interface for filling a spiff_list.
+ * @brief Create callback interface for filling a xspf_list.
*/
- SpiffCReaderCallback(spiff_list *list);
+ XspfCReaderCallback(xspf_list *list);
/**
- * @brief Finalize the spiff_list.
+ * @brief Finalize the xspf_list.
*/
- virtual ~SpiffCReaderCallback();
+ virtual ~XspfCReaderCallback();
};
-SpiffCReaderCallback::SpiffCReaderCallback(spiff_list *list)
+XspfCReaderCallback::XspfCReaderCallback(xspf_list *list)
{
this->list = list;
newtrack = &list->tracks;
}
-SpiffCReaderCallback::~SpiffCReaderCallback()
+XspfCReaderCallback::~XspfCReaderCallback()
{
/* Null-terminate the tracks list */
*newtrack = NULL;
}
void
-SpiffCReaderCallback::addTrack(SpiffTrack *track)
+XspfCReaderCallback::addTrack(XspfTrack *track)
{
- spiff_mvalue **newmv;
+ xspf_mvalue **newmv;
char *str;
/* Append new item to the track list */
- *newtrack = new spiff_track;
+ *newtrack = new xspf_track;
(*newtrack)->creator = track->stealCreator();
(*newtrack)->title = track->stealTitle();
@@ -125,7 +125,7 @@
/* Locations */
newmv = &(*newtrack)->locations;
while ((str = track->stealFirstLocation()) != NULL) {
- *newmv = new spiff_mvalue;
+ *newmv = new xspf_mvalue;
(*newmv)->value = str;
(*newmv)->pdata = NULL;
@@ -137,7 +137,7 @@
/* Identifiers */
newmv = &(*newtrack)->identifiers;
while ((str = track->stealFirstIdentifier()) != NULL) {
- *newmv = new spiff_mvalue;
+ *newmv = new xspf_mvalue;
(*newmv)->value = str;
(*newmv)->pdata = NULL;
@@ -152,7 +152,7 @@
}
void
-SpiffCReaderCallback::setProps(SpiffProps *props)
+XspfCReaderCallback::setProps(XspfProps *props)
{
list->license = props->stealLicense();
list->location = props->stealLocation();
@@ -162,12 +162,12 @@
}
/**
- * @brief Deallocate all objects in a spiff_mvalue linked list.
+ * @brief Deallocate all objects in a xspf_mvalue linked list.
*/
static void
-spiff_mvalue_free(struct spiff_mvalue *mv)
+xspf_mvalue_free(struct xspf_mvalue *mv)
{
- struct spiff_mvalue *nmv;
+ struct xspf_mvalue *nmv;
for (; mv != NULL; mv = nmv) {
/* Back-up pointer */
@@ -181,17 +181,17 @@
* Public C interface
*/
-extern "C" struct spiff_list *
-spiff_parse(char const *filename, char const *baseuri)
+extern "C" struct xspf_list *
+xspf_parse(char const *filename, char const *baseuri)
{
- SpiffReader read;
- spiff_list *ret;
+ XspfReader read;
+ xspf_list *ret;
/* Allocate empty playlist */
- ret = new spiff_list;
+ ret = new xspf_list;
/* Fill the list with parser results */
- SpiffCReaderCallback readcb(ret);
+ XspfCReaderCallback readcb(ret);
if (read.parseFile(filename, &readcb, baseuri) == XSPF_READER_SUCCESS) {
/* Success */
return (ret);
@@ -202,12 +202,12 @@
}
}
-extern "C" struct spiff_list *
-spiff_new(void)
+extern "C" struct xspf_list *
+xspf_new(void)
{
- spiff_list *ret;
+ xspf_list *ret;
- ret = new spiff_list;
+ ret = new xspf_list;
ret->license = NULL;
ret->location = NULL;
ret->identifier = NULL;
@@ -218,9 +218,9 @@
}
extern "C" void
-spiff_free(struct spiff_list *list)
+xspf_free(struct xspf_list *list)
{
- spiff_track *tr, *ntr;
+ xspf_track *tr, *ntr;
delete [] list->license;
delete [] list->location;
@@ -234,8 +234,8 @@
delete [] tr->title;
delete [] tr->album;
- spiff_mvalue_free(tr->locations);
- spiff_mvalue_free(tr->identifiers);
+ xspf_mvalue_free(tr->locations);
+ xspf_mvalue_free(tr->identifiers);
delete tr;
}
@@ -244,7 +244,7 @@
}
extern "C" void
-spiff_setvalue(char **str, char const *nstr)
+xspf_setvalue(char **str, char const *nstr)
{
/* Delete old string */
delete [] *str;
@@ -261,12 +261,12 @@
}
}
-extern "C" struct spiff_mvalue *
-spiff_new_mvalue_before(struct spiff_mvalue **mvalue)
+extern "C" struct xspf_mvalue *
+xspf_new_mvalue_before(struct xspf_mvalue **mvalue)
{
- spiff_mvalue *ret;
+ xspf_mvalue *ret;
- ret = new spiff_mvalue;
+ ret = new xspf_mvalue;
ret->value = NULL;
ret->pdata = NULL;
ret->next = *mvalue;
@@ -275,12 +275,12 @@
return (ret);
}
-extern "C" struct spiff_track *
-spiff_new_track_before(struct spiff_track **track)
+extern "C" struct xspf_track *
+xspf_new_track_before(struct xspf_track **track)
{
- spiff_track *ret;
+ xspf_track *ret;
- ret = new spiff_track;
+ ret = new xspf_track;
ret->creator = NULL;
ret->title = NULL;
ret->album = NULL;
@@ -296,21 +296,21 @@
}
int
-spiff_write(struct spiff_list *list, char const *filename, char const *baseuri)
+xspf_write(struct xspf_list *list, char const *filename, char const *baseuri)
{
- spiff_track *strack;
- spiff_mvalue *smvalue;
- SpiffIndentFormatter formatter(-2);
+ xspf_track *strack;
+ xspf_mvalue *smvalue;
+ XspfIndentFormatter formatter(-2);
int error;
- SpiffWriter * const writer = SpiffWriter::makeWriter(formatter,
- baseuri, SpiffWriter::NO_XML_BASE, &error);
+ XspfWriter * const writer = XspfWriter::makeWriter(formatter,
+ baseuri, XspfWriter::NO_XML_BASE, &error);
if (writer == NULL) {
return error;
}
/* Playlist properties */
{
- SpiffProps props;
+ XspfProps props;
props.lendLicense(list->license);
props.lendLocation(list->location);
props.lendIdentifier(list->identifier);
@@ -319,7 +319,7 @@
XSPF_LIST_FOREACH_TRACK(list, strack) {
/* Tracks */
- SpiffTrack track;
+ XspfTrack track;
track.lendCreator(strack->creator);
track.lendTitle(strack->title);
track.lendAlbum(strack->album);
Modified: trunk/bindings/c/xspf_c.h
===================================================================
--- trunk/bindings/c/xspf_c.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/bindings/c/xspf_c.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,5 +1,5 @@
/*
- * spiff_c - Simple C interface for libxspf
+ * xspf_c - Simple C interface for libxspf
*
* Copyright (C) 2007, Ed Schouten / Xiph.Org Foundation
* Copyright (C) 2008, Sebastian Pipping / Xiph.Org Foundation
@@ -40,7 +40,7 @@
* Sebastian Pipping <sp...@xi...>
*/
/**
- * @file spiff_c.h
+ * @file xspf_c.h
* @brief Simple libxspf C bindings.
*/
@@ -51,7 +51,7 @@
* @brief Linked list for values inside tracks or lists with string
* values.
*/
-struct spiff_mvalue {
+struct xspf_mvalue {
/**
* @brief Value of the current list entry.
*/
@@ -59,7 +59,7 @@
/**
* @brief Pointer to next object in the list.
*/
- struct spiff_mvalue *next;
+ struct xspf_mvalue *next;
/**
* @brief Private data that can be freely used.
@@ -70,7 +70,7 @@
/**
* @brief Single track in an XSPF list.
*/
-struct spiff_track {
+struct xspf_track {
/**
* @brief Track's creator.
*/
@@ -96,16 +96,16 @@
/**
* @brief Track's file locations.
*/
- struct spiff_mvalue *locations;
+ struct xspf_mvalue *locations;
/**
* @brief Unique track identifiers.
*/
- struct spiff_mvalue *identifiers;
+ struct xspf_mvalue *identifiers;
/**
* @brief Pointer to next track.
*/
- struct spiff_track *next;
+ struct xspf_track *next;
/**
* @brief Private data that can be freely used.
@@ -116,7 +116,7 @@
/**
* @brief Parsed XSPF file.
*/
-struct spiff_list {
+struct xspf_list {
/**
* @brief Playlist's license.
*/
@@ -133,7 +133,7 @@
/**
* @brief Linked list of tracks inside the playlist.
*/
- struct spiff_track *tracks;
+ struct xspf_track *tracks;
/**
* @brief Private data that can be freely used.
@@ -160,39 +160,39 @@
/**
* @brief Parse an XSPF file by filename.
*/
-struct spiff_list *spiff_parse(char const *filename, char const *baseuri);
+struct xspf_list *xspf_parse(char const *filename, char const *baseuri);
/**
* @brief Create a new empty XSPF playlist.
*/
-struct spiff_list *spiff_new(void);
+struct xspf_list *xspf_new(void);
/**
* @brief Free the parser results.
*/
-void spiff_free(struct spiff_list *list);
+void xspf_free(struct xspf_list *list);
/**
- * @brief Set or overwrite a value in the spiff_list, spiff_track or
- * spiff_mvalue structures. Passing NULL will unset the string.
+ * @brief Set or overwrite a value in the xspf_list, xspf_track or
+ * xspf_mvalue structures. Passing NULL will unset the string.
*/
-void spiff_setvalue(char **str, char const *nstr);
+void xspf_setvalue(char **str, char const *nstr);
/**
* @brief Insert a new mvalue to the linked list before the specified
* one. This routine can also be used to insert a new mvalue to
* the end of the list (or an empty list) by passing the address
* of the mvalue list or the next field in the last object.
*/
-struct spiff_mvalue *spiff_new_mvalue_before(
- struct spiff_mvalue **mvalue);
+struct xspf_mvalue *xspf_new_mvalue_before(
+ struct xspf_mvalue **mvalue);
/**
* @brief Insert a new track to the linked list before the specified
* one. This routine can also be used to insert a new track to
* the end of the list (or an empty list) by passing the address
* of the track list or the next field in the last object.
*/
-struct spiff_track *spiff_new_track_before(
- struct spiff_track **track);
+struct xspf_track *xspf_new_track_before(
+ struct xspf_track **track);
/**
- * @brief Write the Spiff playlist to a file.
+ * @brief Write the Xspf playlist to a file.
*/
-int spiff_write(struct spiff_list *list, char const *filename, char const *baseuri);
+int xspf_write(struct xspf_list *list, char const *filename, char const *baseuri);
#endif /* !XSPF_C_H */
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/configure.ac 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,8 +1,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT(src/SpiffReader.cpp)
+AC_INIT(src/XspfReader.cpp)
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE(libspiff, 1.0.0)
+AM_INIT_AUTOMAKE(libxspf, 1.1.0)
AM_CONFIG_HEADER(test/CppTest/config.h)
AC_PROG_LIBTOOL
@@ -91,10 +91,6 @@
], [])
AM_CONDITIONAL(GENERATE_DOC, test x${GENERATE_DOC} = x1)
-## Nested configure hacks
-AM_CONDITIONAL(CALLED_BY_PARENT, true)
-
-
# Local headers must come very first. Otherwise we
# risk including headers of an already installed
# libxspf version if its path is in CPPFLAGS
Modified: trunk/doc/Doxyfile.in
===================================================================
--- trunk/doc/Doxyfile.in 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/doc/Doxyfile.in 2009-02-17 22:31:34 UTC (rev 516)
@@ -2,8 +2,8 @@
# .qhp output
GENERATE_QHP = yes
-QHP_NAMESPACE = "net.sourceforge.libspiff"
-QHP_VIRTUAL_FOLDER = "libspiff-@VERSION@"
+QHP_NAMESPACE = "net.sourceforge.libxspf"
+QHP_VIRTUAL_FOLDER = "libxspf-@VERSION@"
# .qch output
QCH_FILE = "../@PACKAGE@-@VERSION@.qch"
Modified: trunk/doc/Mainpage
===================================================================
--- trunk/doc/Mainpage 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/doc/Mainpage 2009-02-17 22:31:34 UTC (rev 516)
@@ -20,7 +20,7 @@
* To read an XSPF playlist you first need a reader instance:
*
* @code
- * SpiffReaer reader;
+ * XspfReaer reader;
* @endcode
*
* You use the reader like this:
@@ -38,12 +38,12 @@
* want to verify that the given file is valid XSPF
* version 0 or 1 but do not need any more specific
* information about it. In general it is a pointer
- * to an instance of a class derived from SpiffReaderCallback.
+ * to an instance of a class derived from XspfReaderCallback.
* That means it can override these functions:
*
* @code
- * void addTrack(SpiffTrack * track);
- * void setProps(SpiffProps * props);
+ * void addTrack(XspfTrack * track);
+ * void setProps(XspfProps * props);
*
* void notifyFatalError(..);
* bool handleError(..);
@@ -86,7 +86,7 @@
*
* When reading is finished the value returned from parseFile() will be
* either <c>XSPF_READER_SUCCESS</c> or one of the error codes.
- * More details about the error occured are passed to the SpiffReaderCallback in use.
+ * More details about the error occured are passed to the XspfReaderCallback in use.
*
*
*
@@ -95,22 +95,22 @@
*
* @code
* XML_Char const * const baseUri = _PT("http://example.org/");
- * SpiffWriter * const writer = SpiffWriter::makeWriter(formatter, baseUri);
+ * XspfWriter * const writer = XspfWriter::makeWriter(formatter, baseUri);
* @endcode
*
* The first parameter is an XML formatter
- * (an instance of a class derived from SpiffXmlFormatter)
+ * (an instance of a class derived from XspfXmlFormatter)
* which will mainly control the whitespace in the XML output.
* libxspf already comes with two built-in formatters:
- * SpiffIndentFormatter which creates well-indented XML output
- * and SpiffSeamlessFormatter which does not create any whitespace at all.
+ * XspfIndentFormatter which creates well-indented XML output
+ * and XspfSeamlessFormatter which does not create any whitespace at all.
* The second parameter is the base URI used to shorten URIs where possible.
*
* If our playlist itself has properties we have to set them
* before adding any tracks:
*
* @code
- * SpiffProps props;
+ * XspfProps props;
* ...
* /* Fill in props */
* ...
@@ -120,7 +120,7 @@
* You could set the playlist's creation time like this:
*
* @code
- * SpiffDateTime dateTime(2006, 8, 28, 11, 30, 11, 1, 0);
+ * XspfDateTime dateTime(2006, 8, 28, 11, 30, 11, 1, 0);
* props.lendDate(&dateTime);
* @endcode
*
@@ -132,7 +132,7 @@
* existing memory. To make this more clear calling
*
* @code
- * props.giveTitle(_PT("Some title"), SpiffData::TRANSFER);
+ * props.giveTitle(_PT("Some title"), XspfData::TRANSFER);
* @endcode
*
* would be a bad idea since the memory would not be copied but still
@@ -144,7 +144,7 @@
*
* in this case.
*
- * Back to the writer: When you have created a SpiffWriter instance
+ * Back to the writer: When you have created a XspfWriter instance
* you can let it write its content to file:
*
* @code
@@ -155,7 +155,7 @@
* So before writing the playlist you should add your tracks:
*
* @code
- * SpiffTrack track;
+ * XspfTrack track;
* ...
* track.lendCreator(_PT("Breaking Benjamin"));
* ...
@@ -225,7 +225,7 @@
* reader.enableMaliciousXmlDetection(true);
* @endcode
*
- * you can make a SpiffReader instance protocol these metrics in order to detect
+ * you can make a XspfReader instance protocol these metrics in order to detect
* malicious XML. Also, all of these metrics can be limited and adjusted individually;
* for instance this is how to limit the lookup depth to a maximum of 2:
*
Modified: trunk/doc/Makefile.am
===================================================================
--- trunk/doc/Makefile.am 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/doc/Makefile.am 2009-02-17 22:31:34 UTC (rev 516)
@@ -21,21 +21,5 @@
html/*.png
-## Nested configure hacks
-if CALLED_BY_PARENT
-
-## Make doc get installed
+## Make doc files get installed
nobase_nodist_doc_DATA = $(DOC_FILES)
-
-## Kill automake error
-DIST_COMMON = $(DIST_COMMON)
-
-else
-
-## Make Automake not ship package sources
-DIST_COMMON =
-
-## Make doc go into dist when run from doc folder
-EXTRA_DIST = $(DOC_FILES)
-
-endif
Modified: trunk/doc/configure.ac
===================================================================
--- trunk/doc/configure.ac 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/doc/configure.ac 2009-02-17 22:31:34 UTC (rev 516)
@@ -2,17 +2,9 @@
AC_PREREQ(2.61)
AC_INIT(Doxyfile.in)
AC_CONFIG_AUX_DIR([../build-aux])
-AM_INIT_AUTOMAKE(libspiff-doc, 1.0.0)
+AM_INIT_AUTOMAKE(libxspf-doc, 1.1.0)
-## Nested configure hacks
-CALLED_BY_PARENT=0
-AC_ARG_ENABLE(doc, [], [
- CALLED_BY_PARENT=1
-], [])
-AM_CONDITIONAL(CALLED_BY_PARENT, test x${CALLED_BY_PARENT} = x1)
-
-
## Doxygen
AC_CHECK_PROG(DOXY_CHECK, doxygen, found, missing)
if test ${DOXY_CHECK} != "found" ; then
@@ -44,4 +36,5 @@
Doxyfile
Makefile
])
+AC_CONFIG_FILES([release.sh], [chmod a+x release.sh])
AC_OUTPUT
Modified: trunk/doc/release.sh
===================================================================
--- trunk/doc/release.sh 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/doc/release.sh 2009-02-17 22:31:34 UTC (rev 516)
@@ -1,25 +1,39 @@
-#! /bin/bash
-CUR=0
-COUNT=3
+#! /usr/bin/env bash
+(
+cd $(dirname $(which "$0")) || exit 1
-step() {
- PERC=$((100 * CUR / COUNT))
- printf "[%3i%%] %s" ${PERC} "$1"
- echo
- CUR=$((CUR + 1))
-}
+distdir="libxspf-doc-1.0.0"
+[ -z $MAKE ] && MAKE=make
-./bootstrap.sh || exit 1
-echo
+# Clean up
+rm -Rf "${distdir}" "${distdir}.zip"
-step "configure"
-./configure || exit 1
+# Generate
+"${MAKE}" || exit 1
-step "make"
-make || exit 1
+# Copy
+mkdir -p "${distdir}/html"
+cp \
+ html/*.css \
+ html/*.gif \
+ html/*.html \
+ html/*.png \
+ \
+ "${distdir}/html/" || exit 1
-step "make dist"
-make dist || exit 1
+# Package
+zip -r "${distdir}.zip" "${distdir}" || exit 1
-step "."
-exit 0
+cat <<INFO
+=================================================
+${distdir} archives ready for distribution:
+${distdir}.zip
+=================================================
+
+INFO
+
+# Clean up
+rm -Rf "${distdir}"
+
+)
+exit $?
Added: trunk/doc/release.sh.in
===================================================================
--- trunk/doc/release.sh.in (rev 0)
+++ trunk/doc/release.sh.in 2009-02-17 22:31:34 UTC (rev 516)
@@ -0,0 +1,39 @@
+#! /usr/bin/env bash
+(
+cd $(dirname $(which "$0")) || exit 1
+
+distdir="@PACKAGE@-@VERSION@"
+[ -z $MAKE ] && MAKE=make
+
+# Clean up
+rm -Rf "${distdir}" "${distdir}.zip"
+
+# Generate
+"${MAKE}" || exit 1
+
+# Copy
+mkdir -p "${distdir}/html"
+cp \
+ html/*.css \
+ html/*.gif \
+ html/*.html \
+ html/*.png \
+ \
+ "${distdir}/html/" || exit 1
+
+# Package
+zip -r "${distdir}.zip" "${distdir}" || exit 1
+
+cat <<INFO
+=================================================
+${distdir} archives ready for distribution:
+${distdir}.zip
+=================================================
+
+INFO
+
+# Clean up
+rm -Rf "${distdir}"
+
+)
+exit $?
Property changes on: trunk/doc/release.sh.in
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/examples/check/check.cpp
===================================================================
--- trunk/examples/check/check.cpp 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/examples/check/check.cpp 2009-02-17 22:31:34 UTC (rev 516)
@@ -38,10 +38,10 @@
* Sebastian Pipping, sp...@xi...
*/
-#include <spiff/Spiff.h>
+#include <xspf/Xspf.h>
#include <iostream>
#include <cassert>
-using namespace Spiff;
+using namespace Xspf;
#if defined(__WIN32__) || defined(WIN32)
@@ -55,7 +55,7 @@
#endif
-class Validator : public SpiffReaderCallback {
+class Validator : public XspfReaderCallback {
private:
int version;
@@ -74,7 +74,7 @@
}
private:
- void setProps(SpiffProps * props) {
+ void setProps(XspfProps * props) {
this->version = props->getVersion();
delete props;
}
@@ -127,14 +127,14 @@
int
printUsage() {
- std::cout << "USAGE: spiff_check ([--loose] -|--version)" << std::endl << std::flush;
+ std::cout << "USAGE: xspf_check ([--loose] -|--version)" << std::endl << std::flush;
return 1;
}
int
printVersion() {
- std::cout << "spiff_check "
+ std::cout << "xspf_check "
<< XSPF_VER_MAJOR << "."
<< XSPF_VER_MINOR << "."
<< XSPF_VER_RELEASE
@@ -162,7 +162,7 @@
int const numBytes = static_cast<int>(strlen(memory));
// Valid XSPF?
- SpiffReader reader;
+ XspfReader reader;
Validator validator(loose);
int const res = reader.parseMemory(memory, numBytes, &validator,
_PT("http://www.example.org/"));
Modified: trunk/examples/read/read.cpp
===================================================================
--- trunk/examples/read/read.cpp 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/examples/read/read.cpp 2009-02-17 22:31:34 UTC (rev 516)
@@ -38,7 +38,7 @@
* Sebastian Pipping, sp...@xi...
*/
-#include <spiff/Spiff.h>
+#include <xspf/Xspf.h>
#include <uriparser/Uri.h>
#include <cstdio>
#include <cstdlib> // MAX_PATH
@@ -63,10 +63,10 @@
#endif
-using namespace Spiff;
+using namespace Xspf;
-class DemoReaderCallback : public SpiffReaderCallback {
+class DemoReaderCallback : public XspfReaderCallback {
bool valid;
@@ -76,7 +76,7 @@
}
private:
- void addTrack(SpiffTrack * track) {
+ void addTrack(XspfTrack * track) {
open(_PT("Track"));
printKeyValue(_PT("Album"), track->getAlbum());
printKeyValue(_PT("Annotation"), track->getAnnotation());
@@ -85,16 +85,16 @@
printIdentifierSummary(track);
printKeyValue(_PT("Image"), track->getImage());
printKeyValue(_PT("Info"), track->getInfo());
- printLinkSummay<SpiffTrack>(track);
+ printLinkSummay<XspfTrack>(track);
printLocationSummary(track);
- printMetaSummary<SpiffTrack>(track);
+ printMetaSummary<XspfTrack>(track);
printKeyValue(_PT("Title"), track->getTitle());
printKeyValue(_PT("TrackNum"), track->getTrackNum());
close();
delete track;
}
- void setProps(SpiffProps * props) {
+ void setProps(XspfProps * props) {
open(_PT("Props"));
printKeyValue(_PT("Annotation"), props->getAnnotation());
printAttributionSummary(props);
@@ -105,9 +105,9 @@
printKeyValue(_PT("Image"), props->getImage());
printKeyValue(_PT("Info"), props->getInfo());
printKeyValue(_PT("License"), props->getLicense());
- printLinkSummay<SpiffProps>(props);
+ printLinkSummay<XspfProps>(props);
printKeyValue(_PT("Location"), props->getLocation());
- printMetaSummary<SpiffProps>(props);
+ printMetaSummary<XspfProps>(props);
printKeyValue(_PT("Title"), props->getTitle());
printKeyValue(_PT("Version"), props->getVersion());
close();
@@ -152,7 +152,7 @@
}
}
- static void printKeyValue(XML_Char const * key, SpiffDateTime const * value) {
+ static void printKeyValue(XML_Char const * key, XspfDateTime const * value) {
if (value == NULL) {
PORT_PRINTF(_PT("\t%s: -\n"), key);
} else {
@@ -169,27 +169,27 @@
template <class T>
static void printLinkSummay(T * data) {
- int const size = (static_cast<SpiffData *>(data))->getLinkCount();
+ int const size = (static_cast<XspfData *>(data))->getLinkCount();
printHelper(_PT("Links"), size);
}
template <class T>
static void printMetaSummary(T * data) {
- int const size = (static_cast<SpiffData *>(data))->getMetaCount();
+ int const size = (static_cast<XspfData *>(data))->getMetaCount();
printHelper(_PT("Metas"), size);
}
- static void printAttributionSummary(SpiffProps * props) {
+ static void printAttributionSummary(XspfProps * props) {
int const size = props->getAttributionCount();
printHelper(_PT("Attributions"), size);
}
- static void printIdentifierSummary(SpiffTrack * track) {
+ static void printIdentifierSummary(XspfTrack * track) {
int const size = track->getIdentifierCount();
printHelper(_PT("Identifier"), size);
}
- static void printLocationSummary(SpiffTrack * track) {
+ static void printLocationSummary(XspfTrack * track) {
int const size = track->getLocationCount();
printHelper(_PT("Locations"), size);
}
@@ -249,8 +249,8 @@
int
PORT_MAIN() {
- SpiffReader reader;
- SpiffReaderCallback * callback = new DemoReaderCallback;
+ XspfReader reader;
+ XspfReaderCallback * callback = new DemoReaderCallback;
// Make base URI
XML_Char const * const relativeFilename = _PT("playlist.xspf");
Modified: trunk/examples/strip/strip.cpp
===================================================================
--- trunk/examples/strip/strip.cpp 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/examples/strip/strip.cpp 2009-02-17 22:31:34 UTC (rev 516)
@@ -38,41 +38,41 @@
* Sebastian Pipping, sp...@xi...
*/
-#include <spiff/Spiff.h>
+#include <xspf/Xspf.h>
#include <iostream>
#include <list>
#include <cassert>
-using namespace Spiff;
+using namespace Xspf;
-class Collector : public SpiffReaderCallback {
+class Collector : public XspfReaderCallback {
private:
- std::list<SpiffTrack *> * tracks;
- SpiffProps * props;
+ std::list<XspfTrack *> * tracks;
+ XspfProps * props;
public:
- Collector() : tracks(new std::list<SpiffTrack *>()), props(NULL) {
+ Collector() : tracks(new std::list<XspfTrack *>()), props(NULL) {
}
- std::list<SpiffTrack *> * stealTracks() {
- std::list<SpiffTrack *> * backup = this->tracks;
+ std::list<XspfTrack *> * stealTracks() {
+ std::list<XspfTrack *> * backup = this->tracks;
this->tracks = NULL;
return backup;
}
- SpiffProps * stealProps() {
- SpiffProps * backup = this->props;
+ XspfProps * stealProps() {
+ XspfProps * backup = this->props;
this->props = NULL;
return backup;
}
~Collector() {
if (this->tracks != NULL) {
- std::list<SpiffTrack *>::iterator iter = this->tracks->begin();
+ std::list<XspfTrack *>::iterator iter = this->tracks->begin();
while (iter != this->tracks->end()) {
- SpiffTrack * const track = *iter;
+ XspfTrack * const track = *iter;
delete track;
iter++;
}
@@ -84,11 +84,11 @@
}
private:
- void addTrack(SpiffTrack * track) {
+ void addTrack(XspfTrack * track) {
this->tracks->push_back(track);
}
- void setProps(SpiffProps * props) {
+ void setProps(XspfProps * props) {
this->props = props;
}
@@ -96,13 +96,13 @@
int printUsage() {
- std::cout << "USAGE: spiff_strip (-|--version)" << std::endl << std::flush;
+ std::cout << "USAGE: xspf_strip (-|--version)" << std::endl << std::flush;
return 1;
}
int printVersion() {
- std::cout << "spiff_strip "
+ std::cout << "xspf_strip "
<< XSPF_VER_MAJOR << "."
<< XSPF_VER_MINOR << "."
<< XSPF_VER_RELEASE
@@ -129,7 +129,7 @@
int const inputNumBytes = static_cast<int>(strlen(inputMemory));
// Parse and collect
- SpiffReader reader;
+ XspfReader reader;
Collector collector;
// XML_Char const * const stdinBaseUri = _PT("http://purl.org/posix/stdin");
// XML_Char const * const stdinBaseUri = _PT("std:in");
@@ -143,12 +143,12 @@
}
// Steal collected information
- std::list<SpiffTrack *> * const tracks = collector.stealTracks();
- SpiffProps * const props = collector.stealProps();
+ std::list<XspfTrack *> * const tracks = collector.stealTracks();
+ XspfProps * const props = collector.stealProps();
// Version 0, well-indented XML
- SpiffIndentFormatter formatter;
- SpiffWriter * const writer = SpiffWriter::makeWriter(
+ XspfIndentFormatter formatter;
+ XspfWriter * const writer = XspfWriter::makeWriter(
formatter, stdinBaseUri);
assert(writer != NULL);
props->setVersion(0);
@@ -156,9 +156,9 @@
delete props;
// Write all tracks
- std::list<SpiffTrack *>::iterator iter = tracks->begin();
+ std::list<XspfTrack *>::iterator iter = tracks->begin();
while (iter != tracks->end()) {
- SpiffTrack * const track = *iter;
+ XspfTrack * const track = *iter;
writer->addTrack(track);
delete track;
iter++;
Modified: trunk/examples/write/write.cpp
===================================================================
--- trunk/examples/write/write.cpp 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/examples/write/write.cpp 2009-02-17 22:31:34 UTC (rev 516)
@@ -38,69 +38,69 @@
* Sebastian Pipping, sp...@xi...
*/
-#include <spiff/Spiff.h>
-#include <spiff/ProjectOpus/ProjectOpusPlaylistExtension.h>
+#include <xspf/Xspf.h>
+#include <xspf/ProjectOpus/ProjectOpusPlaylistExtension.h>
#include <cstdio>
#include <cassert>
-using namespace Spiff;
-using namespace Spiff::Toolbox;
-using namespace Spiff::ProjectOpus;
+using namespace Xspf;
+using namespace Xspf::Toolbox;
+using namespace Xspf::ProjectOpus;
void
-fillProps(SpiffProps & props) {
+fillProps(XspfProps & props) {
// NOTE: When writing please make URIs relative where it makes sense.
// Most importantly this applies to track locations, so the playlist
// files can be moved along with the files.
- // SpiffToolbox::makeRelativeUri() can do that job for you.
+ // XspfToolbox::makeRelativeUri() can do that job for you.
// An example usage is shown below.
- props.giveTitle(_PT("Now playing"), SpiffData::COPY);
- props.giveAnnotation(_PT("Well, ..."), SpiffData::COPY);
- props.giveCreator(_PT("libxspf XSPF library"), SpiffData::COPY);
- SpiffDateTime dateTime(2006, 8, 28, 11, 30, 11, 1, 0);
- props.giveDate(&dateTime, SpiffData::COPY);
- props.giveIdentifier(_PT("xspf:libxspf:testId"), SpiffData::COPY);
- props.giveImage(_PT("some/image.png"), SpiffData::COPY);
- props.giveInfo(_PT("http://info/info"), SpiffData::COPY);
- props.giveLicense(_PT("http://license/free/"), SpiffData::COPY);
- props.giveLocation(_PT("http://playlist/home.xspf"), SpiffData::COPY);
+ props.giveTitle(_PT("Now playing"), XspfData::COPY);
+ props.giveAnnotation(_PT("Well, ..."), XspfData::COPY);
+ props.giveCreator(_PT("libxspf XSPF library"), XspfData::COPY);
+ XspfDateTime dateTime(2006, 8, 28, 11, 30, 11, 1, 0);
+ props.giveDate(&dateTime, XspfData::COPY);
+ props.giveIdentifier(_PT("xspf:libxspf:testId"), XspfData::COPY);
+ props.giveImage(_PT("some/image.png"), XspfData::COPY);
+ props.giveInfo(_PT("http://info/info"), XspfData::COPY);
+ props.giveLicense(_PT("http://license/free/"), XspfData::COPY);
+ props.giveLocation(_PT("http://playlist/home.xspf"), XspfData::COPY);
props.setVersion(0);
- props.giveAppendAttributionIdentifier(_PT("some:any/many"), SpiffData::COPY);
- props.giveAppendAttributionLocation(_PT("test:pest/west"), SpiffData::COPY);
- props.giveAppendLink(_PT("store:url"), SpiffData::COPY,
- _PT("http://expensive/dot/com"), SpiffData::COPY);
- props.giveAppendMeta(_PT("tag:meta:year"), SpiffData::COPY, _PT("2006"), SpiffData::COPY);
+ props.giveAppendAttributionIdentifier(_PT("some:any/many"), XspfData::COPY);
+ props.giveAppendAttributionLocation(_PT("test:pest/west"), XspfData::COPY);
+ props.giveAppendLink(_PT("store:url"), XspfData::COPY,
+ _PT("http://expensive/dot/com"), XspfData::COPY);
+ props.giveAppendMeta(_PT("tag:meta:year"), XspfData::COPY, _PT("2006"), XspfData::COPY);
// Add a playlist extension
ProjectOpusPlaylistExtension playlistExtension;
playlistExtension.setNodeId(123);
playlistExtension.setType(TYPE_ALBUM);
- props.giveAppendExtension(&playlistExtension, SpiffData::COPY);
+ props.giveAppendExtension(&playlistExtension, XspfData::COPY);
}
void
-fillTrack(SpiffTrack & track) {
+fillTrack(XspfTrack & track) {
// NOTE: When writing please make URIs relative where it makes sense.
// Most importantly this applies to track locations, so the playlist
// files can be moved along with the files.
- // SpiffToolbox::makeRelativeUri() can do that job for you.
+ // XspfToolbox::makeRelativeUri() can do that job for you.
// An example usage is shown below.
- track.giveAlbum(_PT("Phobia"), SpiffData::COPY);
- track.giveCreator(_PT("Breaking Benjamin"), SpiffData::COPY);
- track.giveTitle(_PT("Unknown Soldier"), SpiffData::COPY);
+ track.giveAlbum(_PT("Phobia"), XspfData::COPY);
+ track.giveCreator(_PT("Breaking Benjamin"), XspfData::COPY);
+ track.giveTitle(_PT("Unknown Soldier"), XspfData::COPY);
track.setTrackNum(10);
- track.giveAppendIdentifier(_PT("id:bb:unknownSoldier"), SpiffData::COPY);
- track.giveAppendLink(_PT("http://meta/key/uri/here"), SpiffData::COPY,
- _PT("http://website"), SpiffData::COPY);
+ track.giveAppendIdentifier(_PT("id:bb:unknownSoldier"), XspfData::COPY);
+ track.giveAppendLink(_PT("http://meta/key/uri/here"), XspfData::COPY,
+ _PT("http://website"), XspfData::COPY);
track.giveAppendLocation(
- _PT("http://example.org/10_unknown_soldier.ogg"), SpiffData::COPY);
- track.giveAppendMeta(_PT("tag:meta:year"), SpiffData::COPY, _PT("2006"), SpiffData::COPY);
- track.giveAnnotation(_PT("Great song"), SpiffData::COPY);
+ _PT("http://example.org/10_unknown_soldier.ogg"), XspfData::COPY);
+ track.giveAppendMeta(_PT("tag:meta:year"), XspfData::COPY, _PT("2006"), XspfData::COPY);
+ track.giveAnnotation(_PT("Great song"), XspfData::COPY);
track.setDuration(123000);
track.giveImage(
- _PT("http://example.org/some/image.png"), SpiffData::COPY);
- track.giveInfo(_PT("http://info/info"), SpiffData::COPY);
+ _PT("http://example.org/some/image.png"), XspfData::COPY);
+ track.giveInfo(_PT("http://info/info"), XspfData::COPY);
}
@@ -110,13 +110,13 @@
XML_Char const * const relativeFilename = _PT("TEST.xspf");
// Set up playlist props
- SpiffProps props;
+ XspfProps props;
fillProps(props);
// Version 1, well-indented XML
- SpiffIndentFormatter formatter;
- SpiffWriter * const writer = SpiffWriter::makeWriter(
- formatter, baseUri, SpiffWriter::EMBED_AS_XML_BASE);
+ XspfIndentFormatter formatter;
+ XspfWriter * const writer = XspfWriter::makeWriter(
+ formatter, baseUri, XspfWriter::EMBED_AS_XML_BASE);
assert(writer != NULL);
// Pre-register extension namespace so
@@ -125,7 +125,7 @@
::namespaceKey, _PT("po"));
// Set up track
- SpiffTrack track;
+ XspfTrack track;
fillTrack(track);
// Add track two times
Modified: trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtension.h
===================================================================
--- trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtension.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtension.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -47,9 +47,9 @@
#define XSPF_PROJECT_OPUS_PLAYLIST_EXTENSION_H
-#include "../SpiffExtension.h"
+#include "../XspfExtension.h"
-namespace Spiff {
+namespace Xspf {
namespace ProjectOpus {
@@ -72,7 +72,7 @@
/**
* Represents a Project Opus playlist extension.
*/
-class ProjectOpusPlaylistExtension : public SpiffExtension {
+class ProjectOpusPlaylistExtension : public XspfExtension {
private:
/// @cond DOXYGEN_NON_API
@@ -132,10 +132,10 @@
*/
void setNodeId(unsigned int nodeId);
- SpiffExtension * clone() const;
+ XspfExtension * clone() const;
private:
- SpiffExtensionWriter * newWriter(SpiffXmlFormatter * output,
+ XspfExtensionWriter * newWriter(XspfXmlFormatter * output,
XML_Char const * baseUri) const;
public:
Modified: trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionReader.h
===================================================================
--- trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionReader.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionReader.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -47,9 +47,9 @@
#define XSPF_PROJECT_OPUS_PLAYLIST_EXTENSION_READER_H
-#include "../SpiffExtensionReader.h"
+#include "../XspfExtensionReader.h"
-namespace Spiff {
+namespace Xspf {
namespace ProjectOpus {
@@ -59,7 +59,7 @@
/**
* Reads a Project Opus playlist extension.
*/
-class ProjectOpusPlaylistExtensionReader : public SpiffExtensionReader {
+class ProjectOpusPlaylistExtensionReader : public XspfExtensionReader {
private:
/// @cond DOXYGEN_NON_API
@@ -70,9 +70,9 @@
/**
* Creates a new Project Opus playlist extension reader.
*
- * @param reader SpiffReader to interact with
+ * @param reader XspfReader to interact with
*/
- ProjectOpusPlaylistExtensionReader(SpiffReader * reader);
+ ProjectOpusPlaylistExtensionReader(XspfReader * reader);
/**
* Copy constructor.
@@ -98,8 +98,8 @@
XML_Char const ** atts);
bool handleExtensionEnd(XML_Char const * fullName);
bool handleExtensionCharacters(XML_Char const * s, int len);
- SpiffExtension * wrap();
- SpiffExtensionReader * createBrother(SpiffReader * reader) const;
+ XspfExtension * wrap();
+ XspfExtensionReader * createBrother(XspfReader * reader) const;
/**
* Checks and extracts the attributes of an info element.
Modified: trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h
===================================================================
--- trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/include/xspf/ProjectOpus/ProjectOpusPlaylistExtensionWriter.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -47,13 +47,13 @@
#define XSPF_PROJECT_OPUS_PLAYLIST_EXTENSION_WRITER_H
-#include "../SpiffExtensionWriter.h"
+#include "../XspfExtensionWriter.h"
-namespace Spiff {
+namespace Xspf {
-class SpiffExtension;
-class SpiffXmlFormatter;
+class XspfExtension;
+class XspfXmlFormatter;
namespace ProjectOpus {
@@ -69,7 +69,7 @@
/**
* Writes a Project Opus playlist extension.
*/
-class ProjectOpusPlaylistExtensionWriter : public SpiffExtensionWriter {
+class ProjectOpusPlaylistExtensionWriter : public XspfExtensionWriter {
private:
/// @cond DOXYGEN_NON_API
@@ -86,7 +86,7 @@
*/
ProjectOpusPlaylistExtensionWriter(
ProjectOpusPlaylistExtension const * extension,
- SpiffXmlFormatter * output, XML_Char const * baseUri);
+ XspfXmlFormatter * output, XML_Char const * baseUri);
/**
* Copy constructor.
*
Modified: trunk/include/xspf/Xspf.h
===================================================================
--- trunk/include/xspf/Xspf.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/include/xspf/Xspf.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -39,7 +39,7 @@
*/
/**
- * @file Spiff.h
+ * @file Xspf.h
* Include-everything header for lazy people with fast machines.
*/
@@ -48,31 +48,31 @@
/**
- * @namespace Spiff
+ * @namespace Xspf
* Provides reading and writing functionality
* for both XSPF-0 and XSPF-1.
*/
-// #include "Spiff.h"
- #include "SpiffChunkCallback.h"
-// #include "SpiffData.h"
- #include "SpiffDateTime.h"
-// #include "SpiffDefines.h"
- #include "SpiffExtension.h"
-// #include "SpiffExtensionReader.h"
- #include "SpiffExtensionReaderFactory.h"
- #include "SpiffExtensionWriter.h"
- #include "SpiffIndentFormatter.h"
- #include "SpiffProps.h"
- #include "SpiffReader.h"
- #include "SpiffReaderCallback.h"
- #include "SpiffSeamlessFormatter.h"
- #include "SpiffStack.h"
-// #include "SpiffToolbox.h"
- #include "SpiffTrack.h"
-// #include "SpiffVersion.h"
- #include "SpiffWriter.h"
-// #include "SpiffXmlFormatter.h"
+// #include "Xspf.h"
+ #include "XspfChunkCallback.h"
+// #include "XspfData.h"
+ #include "XspfDateTime.h"
+// #include "XspfDefines.h"
+ #include "XspfExtension.h"
+// #include "XspfExtensionReader.h"
+ #include "XspfExtensionReaderFactory.h"
+ #include "XspfExtensionWriter.h"
+ #include "XspfIndentFormatter.h"
+ #include "XspfProps.h"
+ #include "XspfReader.h"
+ #include "XspfReaderCallback.h"
+ #include "XspfSeamlessFormatter.h"
+ #include "XspfStack.h"
+// #include "XspfToolbox.h"
+ #include "XspfTrack.h"
+// #include "XspfVersion.h"
+ #include "XspfWriter.h"
+// #include "XspfXmlFormatter.h"
#endif // XSPF_H
Modified: trunk/include/xspf/XspfChunkCallback.h
===================================================================
--- trunk/include/xspf/XspfChunkCallback.h 2009-02-17 21:08:45 UTC (rev 515)
+++ trunk/include/xspf/XspfChunkCallback.h 2009-02-17 22:31:34 UTC (rev 516)
@@ -39,60 +39,60 @@
*/
/**
- * @file SpiffChunkCallback.h
- * Interface of SpiffChunkCallback.
+ * @file XspfChunkCallback.h
+ * Interface of XspfChunkCallback.
*/
#ifndef XSPF_CHUNK_CALLBACK_H
#define XSPF_CHUNK_CALLBACK_H
-namespace Spiff {
+namespace Xspf {
-class SpiffChunkCallbackPrivate;
+class XspfChunkCallbackPrivate;
/**
- * Hands out text chunks to a SpiffReader.
+ * Hands out text chunks to a XspfReader.
* This enables parsing from non-linear input
* structures. It can also be used to parse
* bug XSPF files in smaller chunks to lower
* memory usage.
*/
-class SpiffChunkCallback {
+class XspfChunkCallback {
- friend class SpiffReader;
+ friend class XspfReader;
private:
/// @cond DOXYGEN_NON_API
- SpiffChunkCallbackPrivate * const d; ///< D pointer
+ XspfChunkCallbackPrivate * const d; ///< D pointer
/// @endcond
protected:
/**
* Creates a new chunk callback.
*/
- SpiffChunkCallback();
+ XspfChunkCallback();
/**
* Copy constructor.
*
* @param source Source to copy from
*/
- SpiffChunkCallback(SpiffChunkCallback const & source);
+ XspfChunkCallback(XspfChunkCallback const & source);
/**
* Assignment operator.
*
* @param source Source to copy from
*/
- SpiffChunkCallback & operator=(SpiffChunkCallback const & source);
+ XspfChunkCallback & operator...
[truncated message content] |