From eb1678f9612fa0987ab8a80ad9cfe8d368d25a14 Mon Sep 17 00:00:00 2001 From: naomiaro Date: Fri, 1 Oct 2010 17:29:25 -0400 Subject: [PATCH] moving ui_browser.php & ui_handler.php to htmlUi --- htmlUI/index.php | 10 - htmlUI/templates/header.tpl | 16 +- ui_browser.php => htmlUI/ui_browser.php | 0 ui_handler.php => htmlUI/ui_handler.php | 0 src/modules/core/bin/autogen.sh | 90 -- src/modules/core/bin/gen_coverage_data.sh | 75 -- src/modules/core/configure | 47 - src/modules/core/doc/.keepme | 1 - src/modules/core/doc/doxygen/.keepme | 1 - src/modules/core/etc/Makefile.in | 245 ---- src/modules/core/etc/acinclude.m4 | 576 -------- src/modules/core/etc/audioClip.xml | 25 - src/modules/core/etc/configure.ac | 135 -- src/modules/core/etc/doxygen.config | 1139 ---------------- src/modules/core/etc/fadeInfo.xml | 10 - src/modules/core/etc/metadataType.xml | 17 - .../core/etc/metadataTypeContainer.xml | 212 --- src/modules/core/etc/playlist.xml | 58 - src/modules/core/etc/playlistElement.xml | 39 - src/modules/core/etc/rdsContainer.xml | 18 - src/modules/core/etc/resourceBundle.xml | 11 - src/modules/core/etc/testResultToHtml.xsl | 63 - .../include/LiveSupport/Core/AsyncState.h | 212 --- .../core/include/LiveSupport/Core/AudioClip.h | 611 --------- .../include/LiveSupport/Core/BaseTestMethod.h | 116 -- .../include/LiveSupport/Core/Configurable.h | 98 -- .../core/include/LiveSupport/Core/Debug.h | 269 ---- .../core/include/LiveSupport/Core/FadeInfo.h | 255 ---- .../core/include/LiveSupport/Core/FileTools.h | 157 --- .../include/LiveSupport/Core/Installable.h | 135 -- .../LiveSupport/Core/LocalizedConfigurable.h | 144 -- .../LiveSupport/Core/LocalizedObject.h | 491 ------- .../core/include/LiveSupport/Core/Md5.h | 255 ---- .../LiveSupport/Core/MetadataConstraint.h | 173 --- .../include/LiveSupport/Core/MetadataType.h | 291 ----- .../LiveSupport/Core/MetadataTypeContainer.h | 279 ---- .../core/include/LiveSupport/Core/Mutex.h | 142 -- .../include/LiveSupport/Core/NumericTools.h | 100 -- .../LiveSupport/Core/OptionsContainer.h | 329 ----- .../include/LiveSupport/Core/PlayLogEntry.h | 161 --- .../core/include/LiveSupport/Core/Playable.h | 307 ----- .../core/include/LiveSupport/Core/Playlist.h | 927 ------------- .../LiveSupport/Core/PlaylistElement.h | 475 ------- .../core/include/LiveSupport/Core/Ptr.h | 99 -- .../include/LiveSupport/Core/RdsContainer.h | 239 ---- .../core/include/LiveSupport/Core/RdsItem.h | 277 ---- .../LiveSupport/Core/RunnableInterface.h | 100 -- .../include/LiveSupport/Core/ScheduleEntry.h | 272 ---- .../include/LiveSupport/Core/SearchCriteria.h | 396 ------ .../core/include/LiveSupport/Core/SessionId.h | 151 --- .../core/include/LiveSupport/Core/Thread.h | 173 --- .../include/LiveSupport/Core/TimeConversion.h | 280 ---- .../core/include/LiveSupport/Core/UniqueId.h | 246 ---- .../core/include/LiveSupport/Core/Uuid.h | 312 ----- .../Core/XmlRpcCommunicationException.h | 113 -- .../LiveSupport/Core/XmlRpcException.h | 153 --- .../LiveSupport/Core/XmlRpcIOException.h | 112 -- .../Core/XmlRpcInvalidArgumentException.h | 113 -- .../Core/XmlRpcInvalidDataException.h | 112 -- .../Core/XmlRpcMethodFaultException.h | 166 --- .../Core/XmlRpcMethodResponseException.h | 112 -- .../include/LiveSupport/Core/XmlRpcTools.h | 746 ----------- src/modules/core/lib/.keepme | 1 - src/modules/core/src/AsyncState.cxx | 195 --- src/modules/core/src/AsyncStateTest.cxx | 127 -- src/modules/core/src/AsyncStateTest.h | 104 -- src/modules/core/src/AudioClip.cxx | 742 ----------- src/modules/core/src/AudioClipTest.cxx | 272 ---- src/modules/core/src/AudioClipTest.h | 138 -- src/modules/core/src/BaseTestMethod.cxx | 144 -- .../core/src/EnumerationConstraint.cxx | 128 -- src/modules/core/src/EnumerationConstraint.h | 166 --- src/modules/core/src/FadeInfo.cxx | 133 -- src/modules/core/src/FadeInfoTest.cxx | 128 -- src/modules/core/src/FadeInfoTest.h | 99 -- src/modules/core/src/FileTools.cxx | 332 ----- src/modules/core/src/FileToolsTest.cxx | 149 --- src/modules/core/src/FileToolsTest.h | 111 -- .../core/src/LocalizedConfigurable.cxx | 111 -- .../core/src/LocalizedConfigurableTest.cxx | 167 --- .../core/src/LocalizedConfigurableTest.h | 108 -- src/modules/core/src/LocalizedObject.cxx | 335 ----- src/modules/core/src/LocalizedObjectTest.cxx | 342 ----- src/modules/core/src/LocalizedObjectTest.h | 156 --- src/modules/core/src/Md5.cxx | 586 --------- src/modules/core/src/Md5Test.cxx | 113 -- src/modules/core/src/Md5Test.h | 99 -- src/modules/core/src/MetadataConstraint.cxx | 110 -- src/modules/core/src/MetadataType.cxx | 195 --- .../core/src/MetadataTypeContainer.cxx | 181 --- .../core/src/MetadataTypeContainerTest.cxx | 337 ----- .../core/src/MetadataTypeContainerTest.h | 136 -- src/modules/core/src/NumericConstraint.cxx | 104 -- src/modules/core/src/NumericConstraint.h | 138 -- .../core/src/NumericRangeConstraint.cxx | 155 --- src/modules/core/src/NumericRangeConstraint.h | 186 --- src/modules/core/src/NumericTools.cxx | 72 - src/modules/core/src/NumericToolsTest.cxx | 95 -- src/modules/core/src/NumericToolsTest.h | 111 -- src/modules/core/src/OptionsContainer.cxx | 405 ------ src/modules/core/src/Playable.cxx | 72 - src/modules/core/src/Playlist.cxx | 971 -------------- src/modules/core/src/PlaylistElement.cxx | 342 ----- src/modules/core/src/PlaylistElementTest.cxx | 173 --- src/modules/core/src/PlaylistElementTest.h | 99 -- src/modules/core/src/PlaylistTest.cxx | 520 -------- src/modules/core/src/PlaylistTest.h | 187 --- src/modules/core/src/RdsContainer.cxx | 192 --- src/modules/core/src/RdsContainerTest.cxx | 144 -- src/modules/core/src/RdsContainerTest.h | 122 -- src/modules/core/src/RdsItem.cxx | 158 --- src/modules/core/src/ScheduleEntry.cxx | 138 -- src/modules/core/src/ScheduleEntryTest.cxx | 110 -- src/modules/core/src/ScheduleEntryTest.h | 103 -- src/modules/core/src/SearchCriteria.cxx | 270 ---- src/modules/core/src/SearchCriteriaTest.cxx | 189 --- src/modules/core/src/SearchCriteriaTest.h | 108 -- src/modules/core/src/TestRunnable.cxx | 75 -- src/modules/core/src/TestRunnable.h | 155 --- src/modules/core/src/TestRunner.cxx | 275 ---- src/modules/core/src/Thread.cxx | 110 -- src/modules/core/src/ThreadTest.cxx | 122 -- src/modules/core/src/ThreadTest.h | 108 -- src/modules/core/src/TimeConversion.cxx | 408 ------ src/modules/core/src/TimeConversionTest.cxx | 300 ----- src/modules/core/src/TimeConversionTest.h | 154 --- src/modules/core/src/UniqueId.cxx | 73 -- src/modules/core/src/UniqueIdTest.cxx | 129 -- src/modules/core/src/UniqueIdTest.h | 99 -- src/modules/core/src/Uuid.cxx | 312 ----- src/modules/core/src/UuidTest.cxx | 93 -- src/modules/core/src/UuidTest.h | 99 -- src/modules/core/src/XmlRpcException.cxx | 59 - src/modules/core/src/XmlRpcTools.cxx | 1161 ----------------- src/modules/core/src/XmlRpcToolsTest.cxx | 321 ----- src/modules/core/src/XmlRpcToolsTest.h | 143 -- src/modules/core/tmp/.keepme | 1 - src/modules/core/var/.keepme | 1 - src/modules/core/var/en.txt | 7 - src/modules/core/var/hello.tar | Bin 10240 -> 0 bytes src/modules/core/var/hu.txt | 14 - src/modules/core/var/jp.txt | 14 - src/modules/core/var/md5test.data | 1 - src/modules/core/var/root.txt | 55 - src/modules/core/var/test10001.mp3 | Bin 181568 -> 0 bytes src/modules/eventScheduler/bin/autogen.sh | 90 -- .../eventScheduler/bin/gen_coverage_data.sh | 75 -- src/modules/eventScheduler/configure | 47 - src/modules/eventScheduler/doc/.keepme | 1 - src/modules/eventScheduler/etc/Makefile.in | 178 --- src/modules/eventScheduler/etc/acinclude.m4 | 403 ------ src/modules/eventScheduler/etc/configure.ac | 114 -- src/modules/eventScheduler/etc/doxygen.config | 1139 ---------------- .../eventScheduler/etc/testResultToHtml.xsl | 63 - .../EventScheduler/EventContainerInterface.h | 108 -- .../EventScheduler/EventScheduler.h | 133 -- .../EventScheduler/ScheduledEventInterface.h | 162 --- src/modules/eventScheduler/lib/.keepme | 1 - .../eventScheduler/src/EventScheduler.cxx | 92 -- .../eventScheduler/src/EventSchedulerTest.cxx | 230 ---- .../eventScheduler/src/EventSchedulerTest.h | 111 -- .../eventScheduler/src/SchedulerThread.cxx | 235 ---- .../eventScheduler/src/SchedulerThread.h | 244 ---- .../src/SchedulerThreadTest.cxx | 181 --- .../eventScheduler/src/SchedulerThreadTest.h | 101 -- .../eventScheduler/src/TestEventContainer.cxx | 79 -- .../eventScheduler/src/TestEventContainer.h | 109 -- src/modules/eventScheduler/src/TestRunner.cxx | 275 ---- .../eventScheduler/src/TestScheduledEvent.cxx | 111 -- .../eventScheduler/src/TestScheduledEvent.h | 213 --- src/modules/eventScheduler/tmp/.keepme | 1 - 171 files changed, 8 insertions(+), 32773 deletions(-) delete mode 100644 htmlUI/index.php rename ui_browser.php => htmlUI/ui_browser.php (100%) rename ui_handler.php => htmlUI/ui_handler.php (100%) delete mode 100755 src/modules/core/bin/autogen.sh delete mode 100755 src/modules/core/bin/gen_coverage_data.sh delete mode 100755 src/modules/core/configure delete mode 100644 src/modules/core/doc/.keepme delete mode 100644 src/modules/core/doc/doxygen/.keepme delete mode 100644 src/modules/core/etc/Makefile.in delete mode 100644 src/modules/core/etc/acinclude.m4 delete mode 100644 src/modules/core/etc/audioClip.xml delete mode 100644 src/modules/core/etc/configure.ac delete mode 100644 src/modules/core/etc/doxygen.config delete mode 100644 src/modules/core/etc/fadeInfo.xml delete mode 100644 src/modules/core/etc/metadataType.xml delete mode 100644 src/modules/core/etc/metadataTypeContainer.xml delete mode 100644 src/modules/core/etc/playlist.xml delete mode 100644 src/modules/core/etc/playlistElement.xml delete mode 100644 src/modules/core/etc/rdsContainer.xml delete mode 100644 src/modules/core/etc/resourceBundle.xml delete mode 100644 src/modules/core/etc/testResultToHtml.xsl delete mode 100644 src/modules/core/include/LiveSupport/Core/AsyncState.h delete mode 100644 src/modules/core/include/LiveSupport/Core/AudioClip.h delete mode 100644 src/modules/core/include/LiveSupport/Core/BaseTestMethod.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Configurable.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Debug.h delete mode 100644 src/modules/core/include/LiveSupport/Core/FadeInfo.h delete mode 100644 src/modules/core/include/LiveSupport/Core/FileTools.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Installable.h delete mode 100644 src/modules/core/include/LiveSupport/Core/LocalizedConfigurable.h delete mode 100644 src/modules/core/include/LiveSupport/Core/LocalizedObject.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Md5.h delete mode 100644 src/modules/core/include/LiveSupport/Core/MetadataConstraint.h delete mode 100644 src/modules/core/include/LiveSupport/Core/MetadataType.h delete mode 100644 src/modules/core/include/LiveSupport/Core/MetadataTypeContainer.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Mutex.h delete mode 100644 src/modules/core/include/LiveSupport/Core/NumericTools.h delete mode 100644 src/modules/core/include/LiveSupport/Core/OptionsContainer.h delete mode 100644 src/modules/core/include/LiveSupport/Core/PlayLogEntry.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Playable.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Playlist.h delete mode 100644 src/modules/core/include/LiveSupport/Core/PlaylistElement.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Ptr.h delete mode 100644 src/modules/core/include/LiveSupport/Core/RdsContainer.h delete mode 100644 src/modules/core/include/LiveSupport/Core/RdsItem.h delete mode 100644 src/modules/core/include/LiveSupport/Core/RunnableInterface.h delete mode 100644 src/modules/core/include/LiveSupport/Core/ScheduleEntry.h delete mode 100644 src/modules/core/include/LiveSupport/Core/SearchCriteria.h delete mode 100644 src/modules/core/include/LiveSupport/Core/SessionId.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Thread.h delete mode 100644 src/modules/core/include/LiveSupport/Core/TimeConversion.h delete mode 100644 src/modules/core/include/LiveSupport/Core/UniqueId.h delete mode 100644 src/modules/core/include/LiveSupport/Core/Uuid.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcIOException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcInvalidDataException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h delete mode 100644 src/modules/core/include/LiveSupport/Core/XmlRpcTools.h delete mode 100644 src/modules/core/lib/.keepme delete mode 100644 src/modules/core/src/AsyncState.cxx delete mode 100644 src/modules/core/src/AsyncStateTest.cxx delete mode 100644 src/modules/core/src/AsyncStateTest.h delete mode 100644 src/modules/core/src/AudioClip.cxx delete mode 100644 src/modules/core/src/AudioClipTest.cxx delete mode 100644 src/modules/core/src/AudioClipTest.h delete mode 100644 src/modules/core/src/BaseTestMethod.cxx delete mode 100644 src/modules/core/src/EnumerationConstraint.cxx delete mode 100644 src/modules/core/src/EnumerationConstraint.h delete mode 100644 src/modules/core/src/FadeInfo.cxx delete mode 100644 src/modules/core/src/FadeInfoTest.cxx delete mode 100644 src/modules/core/src/FadeInfoTest.h delete mode 100644 src/modules/core/src/FileTools.cxx delete mode 100644 src/modules/core/src/FileToolsTest.cxx delete mode 100644 src/modules/core/src/FileToolsTest.h delete mode 100644 src/modules/core/src/LocalizedConfigurable.cxx delete mode 100644 src/modules/core/src/LocalizedConfigurableTest.cxx delete mode 100644 src/modules/core/src/LocalizedConfigurableTest.h delete mode 100644 src/modules/core/src/LocalizedObject.cxx delete mode 100644 src/modules/core/src/LocalizedObjectTest.cxx delete mode 100644 src/modules/core/src/LocalizedObjectTest.h delete mode 100644 src/modules/core/src/Md5.cxx delete mode 100644 src/modules/core/src/Md5Test.cxx delete mode 100644 src/modules/core/src/Md5Test.h delete mode 100644 src/modules/core/src/MetadataConstraint.cxx delete mode 100644 src/modules/core/src/MetadataType.cxx delete mode 100644 src/modules/core/src/MetadataTypeContainer.cxx delete mode 100644 src/modules/core/src/MetadataTypeContainerTest.cxx delete mode 100644 src/modules/core/src/MetadataTypeContainerTest.h delete mode 100644 src/modules/core/src/NumericConstraint.cxx delete mode 100644 src/modules/core/src/NumericConstraint.h delete mode 100644 src/modules/core/src/NumericRangeConstraint.cxx delete mode 100644 src/modules/core/src/NumericRangeConstraint.h delete mode 100644 src/modules/core/src/NumericTools.cxx delete mode 100644 src/modules/core/src/NumericToolsTest.cxx delete mode 100644 src/modules/core/src/NumericToolsTest.h delete mode 100644 src/modules/core/src/OptionsContainer.cxx delete mode 100644 src/modules/core/src/Playable.cxx delete mode 100644 src/modules/core/src/Playlist.cxx delete mode 100644 src/modules/core/src/PlaylistElement.cxx delete mode 100644 src/modules/core/src/PlaylistElementTest.cxx delete mode 100644 src/modules/core/src/PlaylistElementTest.h delete mode 100644 src/modules/core/src/PlaylistTest.cxx delete mode 100644 src/modules/core/src/PlaylistTest.h delete mode 100644 src/modules/core/src/RdsContainer.cxx delete mode 100644 src/modules/core/src/RdsContainerTest.cxx delete mode 100644 src/modules/core/src/RdsContainerTest.h delete mode 100644 src/modules/core/src/RdsItem.cxx delete mode 100644 src/modules/core/src/ScheduleEntry.cxx delete mode 100644 src/modules/core/src/ScheduleEntryTest.cxx delete mode 100644 src/modules/core/src/ScheduleEntryTest.h delete mode 100644 src/modules/core/src/SearchCriteria.cxx delete mode 100644 src/modules/core/src/SearchCriteriaTest.cxx delete mode 100644 src/modules/core/src/SearchCriteriaTest.h delete mode 100644 src/modules/core/src/TestRunnable.cxx delete mode 100644 src/modules/core/src/TestRunnable.h delete mode 100644 src/modules/core/src/TestRunner.cxx delete mode 100644 src/modules/core/src/Thread.cxx delete mode 100644 src/modules/core/src/ThreadTest.cxx delete mode 100644 src/modules/core/src/ThreadTest.h delete mode 100644 src/modules/core/src/TimeConversion.cxx delete mode 100644 src/modules/core/src/TimeConversionTest.cxx delete mode 100644 src/modules/core/src/TimeConversionTest.h delete mode 100644 src/modules/core/src/UniqueId.cxx delete mode 100644 src/modules/core/src/UniqueIdTest.cxx delete mode 100644 src/modules/core/src/UniqueIdTest.h delete mode 100644 src/modules/core/src/Uuid.cxx delete mode 100644 src/modules/core/src/UuidTest.cxx delete mode 100644 src/modules/core/src/UuidTest.h delete mode 100644 src/modules/core/src/XmlRpcException.cxx delete mode 100644 src/modules/core/src/XmlRpcTools.cxx delete mode 100644 src/modules/core/src/XmlRpcToolsTest.cxx delete mode 100644 src/modules/core/src/XmlRpcToolsTest.h delete mode 100644 src/modules/core/tmp/.keepme delete mode 100644 src/modules/core/var/.keepme delete mode 100644 src/modules/core/var/en.txt delete mode 100644 src/modules/core/var/hello.tar delete mode 100644 src/modules/core/var/hu.txt delete mode 100644 src/modules/core/var/jp.txt delete mode 100644 src/modules/core/var/md5test.data delete mode 100644 src/modules/core/var/root.txt delete mode 100644 src/modules/core/var/test10001.mp3 delete mode 100755 src/modules/eventScheduler/bin/autogen.sh delete mode 100755 src/modules/eventScheduler/bin/gen_coverage_data.sh delete mode 100755 src/modules/eventScheduler/configure delete mode 100644 src/modules/eventScheduler/doc/.keepme delete mode 100644 src/modules/eventScheduler/etc/Makefile.in delete mode 100644 src/modules/eventScheduler/etc/acinclude.m4 delete mode 100644 src/modules/eventScheduler/etc/configure.ac delete mode 100644 src/modules/eventScheduler/etc/doxygen.config delete mode 100644 src/modules/eventScheduler/etc/testResultToHtml.xsl delete mode 100644 src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventContainerInterface.h delete mode 100644 src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventScheduler.h delete mode 100644 src/modules/eventScheduler/include/LiveSupport/EventScheduler/ScheduledEventInterface.h delete mode 100644 src/modules/eventScheduler/lib/.keepme delete mode 100644 src/modules/eventScheduler/src/EventScheduler.cxx delete mode 100644 src/modules/eventScheduler/src/EventSchedulerTest.cxx delete mode 100644 src/modules/eventScheduler/src/EventSchedulerTest.h delete mode 100644 src/modules/eventScheduler/src/SchedulerThread.cxx delete mode 100644 src/modules/eventScheduler/src/SchedulerThread.h delete mode 100644 src/modules/eventScheduler/src/SchedulerThreadTest.cxx delete mode 100644 src/modules/eventScheduler/src/SchedulerThreadTest.h delete mode 100644 src/modules/eventScheduler/src/TestEventContainer.cxx delete mode 100644 src/modules/eventScheduler/src/TestEventContainer.h delete mode 100644 src/modules/eventScheduler/src/TestRunner.cxx delete mode 100644 src/modules/eventScheduler/src/TestScheduledEvent.cxx delete mode 100644 src/modules/eventScheduler/src/TestScheduledEvent.h delete mode 100644 src/modules/eventScheduler/tmp/.keepme diff --git a/htmlUI/index.php b/htmlUI/index.php deleted file mode 100644 index 5e1959825..000000000 --- a/htmlUI/index.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/htmlUI/templates/header.tpl b/htmlUI/templates/header.tpl index e7ec30a32..9b94c6da7 100644 --- a/htmlUI/templates/header.tpl +++ b/htmlUI/templates/header.tpl @@ -6,22 +6,22 @@ Campcaster - - - + + + - - + + - - + + {include file="script/basics.js.tpl"} {include file="script/contextmenu.js.tpl"} {include file="script/collector.js.tpl"} {include file="script/alttext.js.tpl"} - + diff --git a/ui_browser.php b/htmlUI/ui_browser.php similarity index 100% rename from ui_browser.php rename to htmlUI/ui_browser.php diff --git a/ui_handler.php b/htmlUI/ui_handler.php similarity index 100% rename from ui_handler.php rename to htmlUI/ui_handler.php diff --git a/src/modules/core/bin/autogen.sh b/src/modules/core/bin/autogen.sh deleted file mode 100755 index 42607afb6..000000000 --- a/src/modules/core/bin/autogen.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Run this to set up the build system: configure, makefiles, etc. -# (based on the version in enlightenment's cvs) -#------------------------------------------------------------------------------- - -package="Core" - -# assume we're in $basedir/bin -reldir=`dirname $0`/.. -basedir=`cd $reldir; pwd;` -test -z "$basedir" && basedir=. -usrdir=`cd $basedir/../../../usr; pwd;` - -bindir=$basedir/bin -etcdir=$basedir/etc -tmpdir=$basedir/tmp - -cd "$tmpdir" -DIE=0 - -(autoheader --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - -echo "Generating configuration files for $package, please wait...." - -configure_ac=${etcdir}/configure.ac -configure=${tmpdir}/configure -aclocal_m4=${tmpdir}/aclocal.m4 - -# copy over configure.ac and acinlclude.m4 from etc to tmp, -# as aclocal >= 1.8 is sooo unbelivably stupid that it will simply try to -# look for configure.ac in the current directory, and include acinclude.m4 -# in aclocal.m4 it without a directory path in front -ACLOCAL_FLAGS="-I ${tmpdir} --acdir=${tmpdir} --output=${aclocal_m4}" -echo " aclocal $ACLOCAL_FLAGS" -cp -f ${configure_ac} ${tmpdir} -cp -f ${etcdir}/acinclude.m4 ${tmpdir} -aclocal $ACLOCAL_FLAGS - -echo " autoheader ${configure_ac}" -autoheader ${configure_ac} - -echo " autoconf -I ${tmpdir} -o ${configure} ${configure_ac}" -autoconf -I ${tmpdir} -o ${configure} ${configure_ac} - diff --git a/src/modules/core/bin/gen_coverage_data.sh b/src/modules/core/bin/gen_coverage_data.sh deleted file mode 100755 index d9b78e642..000000000 --- a/src/modules/core/bin/gen_coverage_data.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script generates code coverage data for the module -#------------------------------------------------------------------------------- -module="Campcaster Core" - -reldir=`dirname $0`/.. -basedir=`cd $reldir; pwd;` -bindir=$basedir/bin -docdir=$basedir/doc -tmpdir=$basedir/tmp - -usrdir=`cd $basedir/../../../usr; pwd;` - -coverage_report_dir=$docdir/coverage - -raw_coverage_file=$tmpdir/raw_coverage.info -coverage_file=$tmpdir/coverage.info - -lcov=$usrdir/bin/lcov -genhtml=$usrdir/bin/genhtml - - -cd $basedir - -#------------------------------------------------------------------------------- -# Re-configure with covarege collection enabled, compile and run the tests -#------------------------------------------------------------------------------- -$bindir/autogen.sh --enable-coverage -make clean -make check - -#------------------------------------------------------------------------------- -# Generate some symlinks so that the sources are visible from tmpdir -#------------------------------------------------------------------------------- -ln -s $basedir/include $tmpdir/include -ln -s $basedir/src $tmpdir/src - - -#------------------------------------------------------------------------------- -# Use lcov to generate an HTML report on the coverage data -#------------------------------------------------------------------------------- -$lcov -d $tmpdir -c > $raw_coverage_file -$lcov -e $raw_coverage_file "$tmpdir/*" > $coverage_file -rm -rf $coverage_report_dir -mkdir -p $coverage_report_dir -$genhtml -t "$module" -o $coverage_report_dir $coverage_file - - -#------------------------------------------------------------------------------- -# Clean up -#------------------------------------------------------------------------------- -rm -f $tmpdir/include -rm -f $tmpdir/src diff --git a/src/modules/core/configure b/src/modules/core/configure deleted file mode 100755 index 0c58cc366..000000000 --- a/src/modules/core/configure +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Run this script to configure the environment. -# -# This script in effect calls the real automake / autoconf configure script -#------------------------------------------------------------------------------- - -# assume we're in $basedir -reldir=`dirname $0` -basedir=`cd $reldir; pwd;` -test -z "$basedir" && basedir=. - -bindir=$basedir/bin -tmpdir=$basedir/tmp - - -autogen=$bindir/autogen.sh -configure=$tmpdir/configure - -if [ ! -x $configure ]; then - (cd $basedir && $autogen "$@") -fi - -(cd $tmpdir && $configure "$@") - diff --git a/src/modules/core/doc/.keepme b/src/modules/core/doc/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/core/doc/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/core/doc/doxygen/.keepme b/src/modules/core/doc/doxygen/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/core/doc/doxygen/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/core/etc/Makefile.in b/src/modules/core/etc/Makefile.in deleted file mode 100644 index d564b7282..000000000 --- a/src/modules/core/etc/Makefile.in +++ /dev/null @@ -1,245 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# @configure_input@ -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# General command definitions -#------------------------------------------------------------------------------- -MKDIR = mkdir -p -RM = rm -f -RMDIR = rm -rf -DOXYGEN = doxygen -CP = cp -f - - -#------------------------------------------------------------------------------- -# Basic directory and file definitions -#------------------------------------------------------------------------------- -PACKAGE_NAME = @PACKAGE_NAME@ - -BASE_DIR = @builddir@ -DOC_DIR = ${BASE_DIR}/doc -DOXYGEN_DIR = ${DOC_DIR}/doxygen -COVERAGE_DIR = ${DOC_DIR}/coverage -ETC_DIR = ${BASE_DIR}/etc -INCLUDE_DIR = ${BASE_DIR}/include -LIB_DIR = ${BASE_DIR}/lib -SRC_DIR = ${BASE_DIR}/src -TMP_DIR = ${BASE_DIR}/tmp -VAR_DIR = ${BASE_DIR}/var - -prefix = @prefix@ - -USR_DIR = ${prefix} -USR_INCLUDE_DIR = ${USR_DIR}/include -USR_BIN_DIR = ${USR_DIR}/bin -USR_LIB_DIR = ${USR_DIR}/lib - -GENRB = @GENRB@ -TMP_LOCALIZATION_DIR = ${TMP_DIR}/${PACKAGE_NAME} -GENRBOPTS = --destdir ${TMP_LOCALIZATION_DIR} \ - --encoding utf-8 \ - --strict - -VPATH = ${SRC_DIR} - -BOOST_CFLAGS=@BOOST_CPPFLAGS@ -BOOST_LIBS=@BOOST_LDFLAGS@ -BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@ - -LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@ -LIBXMLPP_LIBS=@LIBXMLPP_LIBS@ - -CURL_CFLAGS=@CURL_CFLAGS@ -CURL_LIBS=@CURL_LIBS@ - -ICU_CFLAGS=@ICU_CFLAGS@ -ICU_CXXFLAGS=@ICU_CXXFLAGS@ -ICU_LIBS=@ICU_LIBS@ - -TAGLIB_CFLAGS=@TAGLIB_CFLAGS@ -TAGLIB_LIBS=@TAGLIB_LIBS@ - -TEST_RESULTS = ${DOC_DIR}/testResults.xml -# the text result XSLT has to be relative to the test result file, e.g. TMP_DIR -TEST_XSLT = ../etc/testResultToHtml.xsl - -CORE_LIB = livesupport_core -CORE_LIB_FILE = ${LIB_DIR}/lib${CORE_LIB}.a -TEST_RUNNER = ${TMP_DIR}/testRunner - -DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config - -export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH} - - -#------------------------------------------------------------------------------- -# Configuration parameters -#------------------------------------------------------------------------------- -CPPFLAGS = @CPPFLAGS@ -CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \ - -pedantic -Wall -Wno-long-long \ - ${BOOST_CFLAGS} \ - ${TAGLIB_CFLAGS} \ - ${LIBXMLPP_CFLAGS} \ - -I${USR_INCLUDE_DIR} \ - -I${INCLUDE_DIR} -I${TMP_DIR} -LDFLAGS = @LDFLAGS@ -pthread \ - ${BOOST_LIBS} \ - ${CURL_LIBS} \ - ${ICU_LIBS} \ - ${TAGLIB_LIBS} \ - ${LIBXMLPP_LIBS} \ - -L${USR_LIB_DIR} \ - -L${LIB_DIR} - - -#------------------------------------------------------------------------------- -# Dependencies -#------------------------------------------------------------------------------- -CORE_LIB_OBJS = ${TMP_DIR}/UniqueId.o \ - ${TMP_DIR}/Uuid.o \ - ${TMP_DIR}/Playable.o \ - ${TMP_DIR}/AudioClip.o \ - ${TMP_DIR}/FadeInfo.o \ - ${TMP_DIR}/ScheduleEntry.o \ - ${TMP_DIR}/PlaylistElement.o \ - ${TMP_DIR}/Playlist.o \ - ${TMP_DIR}/TimeConversion.o \ - ${TMP_DIR}/Thread.o \ - ${TMP_DIR}/LocalizedObject.o \ - ${TMP_DIR}/LocalizedConfigurable.o \ - ${TMP_DIR}/Md5.o \ - ${TMP_DIR}/XmlRpcTools.o \ - ${TMP_DIR}/XmlRpcException.o \ - ${TMP_DIR}/BaseTestMethod.o \ - ${TMP_DIR}/SearchCriteria.o \ - ${TMP_DIR}/MetadataType.o \ - ${TMP_DIR}/MetadataTypeContainer.o \ - ${TMP_DIR}/OptionsContainer.o \ - ${TMP_DIR}/FileTools.o \ - ${TMP_DIR}/AsyncState.o \ - ${TMP_DIR}/MetadataConstraint.o \ - ${TMP_DIR}/NumericConstraint.o \ - ${TMP_DIR}/NumericRangeConstraint.o \ - ${TMP_DIR}/EnumerationConstraint.o \ - ${TMP_DIR}/RdsItem.o \ - ${TMP_DIR}/RdsContainer.o \ - ${TMP_DIR}/NumericTools.o - -TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ - ${TMP_DIR}/FileToolsTest.o \ - ${TMP_DIR}/UuidTest.o \ - ${TMP_DIR}/UniqueIdTest.o \ - ${TMP_DIR}/AudioClipTest.o \ - ${TMP_DIR}/ScheduleEntryTest.o \ - ${TMP_DIR}/FadeInfoTest.o \ - ${TMP_DIR}/PlaylistElementTest.o \ - ${TMP_DIR}/PlaylistTest.o \ - ${TMP_DIR}/TimeConversionTest.o \ - ${TMP_DIR}/TestRunnable.o \ - ${TMP_DIR}/ThreadTest.o \ - ${TMP_DIR}/LocalizedObjectTest.o \ - ${TMP_DIR}/LocalizedConfigurableTest.o \ - ${TMP_DIR}/Md5Test.o \ - ${TMP_DIR}/XmlRpcToolsTest.o \ - ${TMP_DIR}/SearchCriteriaTest.o \ - ${TMP_DIR}/MetadataTypeContainerTest.o \ - ${TMP_DIR}/AsyncStateTest.o \ - ${TMP_DIR}/RdsContainerTest.o \ - ${TMP_DIR}/NumericToolsTest.o - -TEST_RUNNER_RES = ${TMP_LOCALIZATION_DIR}/root.res \ - ${TMP_LOCALIZATION_DIR}/en.res \ - ${TMP_LOCALIZATION_DIR}/hu.res \ - ${TMP_LOCALIZATION_DIR}/jp.res - -TEST_RUNNER_LIBS = -l${CORE_LIB} ${ICU_LIBS} ${BOOST_DATE_TIME_LIB} \ - -lcppunit -ldl -lxmlrpc++ -ltar - - -#------------------------------------------------------------------------------- -# Targets -#------------------------------------------------------------------------------- -.PHONY: all dir_setup doc clean docclean depclean distclean check install - -all: dir_setup ${CORE_LIB_FILE} - -dir_setup: ${TMP_DIR} ${TMP_LOCALIZATION_DIR} ${DOXYGEN_DIR} - -doc: - ${DOXYGEN} ${DOXYGEN_CONFIG} - -clean: - ${RM} ${CORE_LIB_OBJS} ${CORE_LIB_FILE} - ${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER_RES} ${TEST_RUNNER} - ${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info - ${RMDIR} ${TMP_LOCALIZATION_DIR} - -docclean: - ${RMDIR} ${DOXYGEN_DIR}/html - ${RMDIR} ${COVERAGE_DIR}/* - ${RM} ${TEST_RESULTS} - -depclean: clean - -distclean: clean docclean - ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* ${TMP_DIR}/ac*.m4 - -check: ${TEST_RUNNER} ${TEST_RUNNER_RES} - ${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT} - -install: all - ${MKDIR} ${USR_INCLUDE_DIR}/LiveSupport/Core - ${CP} ${INCLUDE_DIR}/LiveSupport/Core/*.h \ - ${USR_INCLUDE_DIR}/LiveSupport/Core - ${CP} ${CORE_LIB_FILE} ${USR_LIB_DIR} - - -#------------------------------------------------------------------------------- -# Specific targets -#------------------------------------------------------------------------------- -${CORE_LIB_FILE}: ${CORE_LIB_OBJS} - ${AR} crus $@ $^ - -${TMP_DIR}: - ${MKDIR} ${TMP_DIR} - -${TMP_LOCALIZATION_DIR}: - ${MKDIR} ${TMP_LOCALIZATION_DIR} - -${DOXYGEN_DIR}: - ${MKDIR} ${DOXYGEN_DIR} - -${TEST_RUNNER}: ${TEST_RUNNER_OBJS} ${CORE_LIB_FILE} - ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} - - -#------------------------------------------------------------------------------- -# Pattern rules -#------------------------------------------------------------------------------- -${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx - ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< - -${TMP_LOCALIZATION_DIR}/%.res : ${VAR_DIR}/%.txt - ${GENRB} ${GENRBOPTS} $^ - diff --git a/src/modules/core/etc/acinclude.m4 b/src/modules/core/etc/acinclude.m4 deleted file mode 100644 index 937632e1f..000000000 --- a/src/modules/core/etc/acinclude.m4 +++ /dev/null @@ -1,576 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2010 Sourcefabric O.P.S. -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.sourcefabric.org/ -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl Macro to check for available modules using pkg-conf -dnl -dnl usage: -dnl PKG_CHECK_MODULES(GSTUFF,[gtk+-2.0 >= 1.3], action-if, action-not) -dnl -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -dnl -dnl This function was taken from the glade-- project -dnl----------------------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for taglib of sufficient version by looking at taglib-config -dnl -dnl usage: -dnl AC_CHECK_TAGLIB(version, action-if, action-not) -dnl -dnl defines TAGLIB_LIBS, TAGLIB_CFLAGS, see taglib-config man page -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CHECK_TAGLIB], [ - succeeded=no - - if test -z "$TAGLIB_CONFIG"; then - AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, no) - fi - - if test "$TAGLIB_CONFIG" = "no" ; then - echo "*** The taglib-config script could not be found. Make sure it is" - echo "*** in your path, and that taglib is properly installed." - echo "*** Or see http://developer.kde.org/~wheeler/taglib.html" - else - TAGLIB_VERSION=`$TAGLIB_CONFIG --version` - AC_MSG_CHECKING(for taglib >= $1) - VERSION_CHECK=`expr $TAGLIB_VERSION \>\= $1` - if test "$VERSION_CHECK" = "1" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING(TAGLIB_CFLAGS) - TAGLIB_CFLAGS=`$TAGLIB_CONFIG --cflags` - AC_MSG_RESULT($TAGLIB_CFLAGS) - - AC_MSG_CHECKING(TAGLIB_LIBS) - TAGLIB_LIBS=`$TAGLIB_CONFIG --libs` - AC_MSG_RESULT($TAGLIB_LIBS) - else - TAGLIB_CFLAGS="" - TAGLIB_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ifelse([$3], ,echo "can't find taglib >= $1",) - fi - - AC_SUBST(TAGLIB_CFLAGS) - AC_SUBST(TAGLIB_LIBS) - fi - - if test $succeeded = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , AC_MSG_ERROR([Library requirements (taglib) not met.]), [$3]) - fi -]) - - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for ICU of sufficient version by looking at icu-config -dnl -dnl usage: -dnl AC_CHECK_ICU(version, action-if, action-not) -dnl -dnl defines ICU_LIBS, ICU_CFLAGS, ICU_CXXFLAGS, see icu-config man page -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CHECK_ICU], [ - succeeded=no - - if test -z "$ICU_CONFIG"; then - AC_PATH_PROG(ICU_CONFIG, icu-config, no) - fi - - if test "$ICU_CONFIG" = "no" ; then - echo "*** The icu-config script could not be found. Make sure it is" - echo "*** in your path, and that taglib is properly installed." - echo "*** Or see http://ibm.com/software/globalization/icu/" - else - ICU_VERSION=`$ICU_CONFIG --version` - AC_MSG_CHECKING(for ICU >= $1) - VERSION_CHECK=`expr $ICU_VERSION \>\= $1` - if test "$VERSION_CHECK" = "1" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING(ICU_CFLAGS) - ICU_CFLAGS=`$ICU_CONFIG --cflags` - AC_MSG_RESULT($ICU_CFLAGS) - - AC_MSG_CHECKING(ICU_CXXFLAGS) - ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags` - AC_MSG_RESULT($ICU_CXXFLAGS) - - AC_MSG_CHECKING(ICU_LIBS) - ICU_LIBS=`$ICU_CONFIG --ldflags` - AC_MSG_RESULT($ICU_LIBS) - else - ICU_CFLAGS="" - ICU_CXXFLAGS="" - ICU_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ifelse([$3], ,echo "can't find ICU >= $1",) - fi - - AC_SUBST(ICU_CFLAGS) - AC_SUBST(ICU_CXXFLAGS) - AC_SUBST(ICU_LIBS) - fi - - if test $succeeded = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , AC_MSG_ERROR([Library requirements (ICU) not met.]), [$3]) - fi -]) - - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for C++ namespaces -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ac_cxx_namespaces.html -dnl -dnl usage: -dnl If the compiler can prevent names clashes using namespaces, -dnl define HAVE_NAMESPACES. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for the Boost C++ libraries of a particular version (or newer). -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_base.html -dnl -dnl usage: -dnl If no path to the installed boost library is given the macro searches -dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT -dnl environment variable. Further documentation is available at -dnl http://randspringer.de/boost/index.html -dnl -dnl This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS) -dnl and sets: HAVE_BOOST -dnl -dnl Modified for Campcaster: -dnl * --with-boost default changed to Yes; -dnl * if the library is not found, it does not die, just prints "no", leaves -dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS -dnl variables to ""; -dnl * ${prefix} is prepended to the search path. -dnl -dnl Author: Thomas Porschberg -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - for ac_boost_path in /usr /usr/local /opt ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - BOOST_LDFLAGS="-L$best_path/lib" - - if test "x$BOOST_ROOT" != "x"; then - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "$succeeded" != "yes" ; then - BOOST_CPPFLAGS="" - BOOST_LDFLAGS="" - AC_MSG_RESULT(no) - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for Date_Time library from the Boost C++ libraries. -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_date_time.html -dnl -dnl usage: -dnl The macro requires a preceding call to AX_BOOST_BASE. -dnl Further documentation is available at -dnl . -dnl -dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB) -dnl and sets: HAVE_BOOST_DATE_TIME -dnl -dnl Modified for Campcaster: -dnl * --with-boost-date-time default changed to Yes. -dnl * added some more recognized suffixes to the library's name, incl. "-st". -dnl -dnl Authors: -dnl Thomas Porschberg -dnl Michael Tindal -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_DATE_TIME], -[ - AC_ARG_WITH([boost-date-time], - AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@], - [use the Date_Time library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_date_time_lib="" - else - want_boost="yes" - ax_boost_user_date_time_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Date_Time library is available, - ax_cv_boost_date_time, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include ]], - [[using namespace boost::gregorian; date d(2002,Jan,10); - return 0; - ]]), - ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_date_time" = "xyes"; then - AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available]) - BN=boost_date_time - if test "x$ax_boost_user_date_time_lib" = "x"; then - for ax_lib in $BN $BN-st $BN-mt $BN-mt-s $BN-s \ - $BN-$CC $BN-$CC-st $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \ - lib$BN lib$BN-st lib$BN-mt lib$BN-mt-s lib$BN-s \ - lib$BN-$CC lib$BN-$CC-st lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \ - $BN-mgw $BN-mgw $BN-mgw-st $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do - AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - else - for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do - AC_CHECK_LIB($ax_lib, main, - [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - - fi - if test "x$link_date_time" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for curl of sufficient version by looking at curl-config -dnl -dnl usage: -dnl AC_CHECK_CURL(version, action-if, action-not) -dnl -dnl defines CURL_LIBS, CURL_CFLAGS, see curl-config man page -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CHECK_CURL], [ - succeeded=no - - if test -z "$CURL_CONFIG"; then - AC_PATH_PROG(CURL_CONFIG, curl-config, no) - fi - - if test "$CURL_CONFIG" = "no" ; then - echo "*** The curl-config script could not be found. Make sure it is" - echo "*** in your path, and that curl is properly installed." - echo "*** Or see http://curl.haxx.se/" - else - dnl curl-config --version returns "libcurl ", thus cut the number - CURL_VERSION=`$CURL_CONFIG --version | cut -d" " -f2` - AC_MSG_CHECKING(for curl >= $1) - VERSION_CHECK=`expr $CURL_VERSION \>\= $1` - if test "$VERSION_CHECK" = "1" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING(CURL_CFLAGS) - CURL_CFLAGS=`$CURL_CONFIG --cflags` - AC_MSG_RESULT($CURL_CFLAGS) - - AC_MSG_CHECKING(CURL_LIBS) - CURL_LIBS=`$CURL_CONFIG --libs` - AC_MSG_RESULT($CURL_LIBS) - else - CURL_CFLAGS="" - CURL_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ifelse([$3], ,echo "can't find curl >= $1",) - fi - - AC_SUBST(CURL_CFLAGS) - AC_SUBST(CURL_LIBS) - fi - - if test $succeeded = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , AC_MSG_ERROR([Library requirements (curl) not met.]), [$3]) - fi -]) - - - diff --git a/src/modules/core/etc/audioClip.xml b/src/modules/core/etc/audioClip.xml deleted file mode 100644 index 7bb083628..000000000 --- a/src/modules/core/etc/audioClip.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - File Title txt - Alternative File Title ín sőmé %$#@* LÁNGŰAGÉ - Keywords: qwe, asd, zcx - Abstract txt - 2004-05-21 - 2004-05-22 - 2004-05-23 - 2004-05-24 - 2004-05-25 - 00:18:30.000000 - online - Spatial Coverage - Temporal Coverage - - diff --git a/src/modules/core/etc/configure.ac b/src/modules/core/etc/configure.ac deleted file mode 100644 index 361b9b5b6..000000000 --- a/src/modules/core/etc/configure.ac +++ /dev/null @@ -1,135 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2010 Sourcefabric O.P.S. -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.sourcefabric.org/ -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl NOTE: Run all configure related scripts from the tmp directory of the -dnl project. -dnl This is due to the fact that configure spreads a lot of trash around, -dnl like atom4te cache directories, config.* files, etc. into the directory -dnl it is being run from. We clearly don't want these in our base directory. -dnl----------------------------------------------------------------------------- -AC_INIT(Core, 0.0, bugs@campware.org) -AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (c) 2010 Sourcefabric O.P.S. under the GNU GPL]) -AC_REVISION($Revision$) - -AC_CONFIG_SRCDIR(../src/UniqueId.cxx) - -AC_CONFIG_HEADERS(configure.h) -AC_PROG_CXX() - -AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], - HAVE_INTEGRAL_TYPES="yes", HAVE_INTEGRAL_TYPES="no") -if test "x${HAVE_INTEGRAL_TYPES}" = "xno" ; then - AC_MSG_ERROR([a required integral type is not available]) -fi - -AC_CHECK_HEADERS(getopt.h sys/time.h time.h sys/types.h pwd.h errno.h stdint.h) - - -dnl----------------------------------------------------------------------------- -dnl specify whether debug info should be compiled into the executable -dnl----------------------------------------------------------------------------- -AC_SUBST(CXXFLAGS) - -AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], [compile with debug info (no)]), - [], - [enable_debug=no]) - -if test "x${enable_debug}" = "xyes"; then - CXXFLAGS="-g -O0" - AC_DEFINE(YDEBUG, 1, [Debug is on]) -else - CXXFLAGS="-O3" -fi - -AC_MSG_RESULT([using compiler options: ${CXXFLAGS}]) - - -dnl----------------------------------------------------------------------------- -dnl specify the pkg-config path -dnl----------------------------------------------------------------------------- -AC_ARG_WITH([pkg-config-path], - AC_HELP_STRING([--with-pkg-config-path], - [use the pkg-config path (prefix/lib/pkgconfig)]), - [PKG_CONFIG_PATH=${withval}], - [PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:$PKG_CONFIG_PATH]) - -AC_MSG_RESULT([using pkg-config path: ${PKG_CONFIG_PATH}]) - -export PKG_CONFIG_PATH - -export PATH=${prefix}/bin:${PATH} - - -AX_BOOST_BASE([1.33.1]) -if test "x${BOOST_CPPFLAGS}" != "x"; then - AX_BOOST_DATE_TIME - if test "x${BOOST_DATE_TIME_LIB}" = "x"; then - AC_MSG_ERROR([Boost date-time library not found]) - fi -else - AC_MSG_ERROR([Boost library >= 1.33.1 not found]) -fi - -PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) -AC_SUBST(LIBXMLPP_CFLAGS) -AC_SUBST(LIBXMLPP_LIBS) - -AC_CHECK_CURL(7.12.3) -AC_SUBST(CURL_CFLAGS) -AC_SUBST(CURL_LIBS) - -AC_CHECK_TAGLIB(1.3.1) -AC_SUBST(TAGLIB_CFLAGS) -AC_SUBST(TAGLIB_LIBS) - -AC_CHECK_ICU(3.0) -AC_SUBST(ICU_CFLAGS) -AC_SUBST(ICU_CXXFLAGS) -AC_SUBST(ICU_LIBS) - -AC_PATH_PROG(GENRB, genrb) -AC_SUBST(GENRB) - - -dnl----------------------------------------------------------------------------- -dnl enable compilaton for code coverage data -dnl----------------------------------------------------------------------------- -AC_SUBST(COVERAGE_CXXFLAGS) - -AC_ARG_ENABLE( coverage, -[ --enable-coverage enable code coverage data generaton (no) ], - ENABLE_COVERAGE=${enableval}, ENABLE_COVERAGE="no" ) - -if test "x${ENABLE_COVERAGE}" == "xyes" ; then - COVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage" - AC_MSG_RESULT([compiling in code coverage mode]) -else - AC_MSG_RESULT([not compiling in code coverage mode]) -fi - - -AC_CONFIG_FILES(../Makefile:../etc/Makefile.in) - -AC_OUTPUT() diff --git a/src/modules/core/etc/doxygen.config b/src/modules/core/etc/doxygen.config deleted file mode 100644 index f03486e9f..000000000 --- a/src/modules/core/etc/doxygen.config +++ /dev/null @@ -1,1139 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -# Doxyfile 1.3.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Campcaster - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 0.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/doxygen - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = YES - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include src - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = include - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/src/modules/core/etc/fadeInfo.xml b/src/modules/core/etc/fadeInfo.xml deleted file mode 100644 index a10bad613..000000000 --- a/src/modules/core/etc/fadeInfo.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - -]> - diff --git a/src/modules/core/etc/metadataType.xml b/src/modules/core/etc/metadataType.xml deleted file mode 100644 index 2a3ded6fb..000000000 --- a/src/modules/core/etc/metadataType.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -]> - - - diff --git a/src/modules/core/etc/metadataTypeContainer.xml b/src/modules/core/etc/metadataTypeContainer.xml deleted file mode 100644 index e0f16dfb5..000000000 --- a/src/modules/core/etc/metadataTypeContainer.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - -]> - - - - - - - - 0 - 3000 - - - - - - - mp3 - mpeg - ogg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/modules/core/etc/playlist.xml b/src/modules/core/etc/playlist.xml deleted file mode 100644 index c7c31c445..000000000 --- a/src/modules/core/etc/playlist.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - diff --git a/src/modules/core/etc/playlistElement.xml b/src/modules/core/etc/playlistElement.xml deleted file mode 100644 index 543b3ec17..000000000 --- a/src/modules/core/etc/playlistElement.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - -]> - - - - - - - - - diff --git a/src/modules/core/etc/rdsContainer.xml b/src/modules/core/etc/rdsContainer.xml deleted file mode 100644 index 5a9023024..000000000 --- a/src/modules/core/etc/rdsContainer.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - -]> - - - - - - diff --git a/src/modules/core/etc/resourceBundle.xml b/src/modules/core/etc/resourceBundle.xml deleted file mode 100644 index 2af0d220f..000000000 --- a/src/modules/core/etc/resourceBundle.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - -]> - diff --git a/src/modules/core/etc/testResultToHtml.xsl b/src/modules/core/etc/testResultToHtml.xsl deleted file mode 100644 index f9e893521..000000000 --- a/src/modules/core/etc/testResultToHtml.xsl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - Campcaster unit test results - - -

Preface

-This document is part of the -Campcaster -project, Copyright © 2004 Media -Development Loan Fund, under the GNU -GPL. -
-This is an automatically generated document. -

Scope

-This document contains the generated unit test results for the -Campcaster project. -

Summary

- - - - - - - - - - - - - - - - - - -
Total number of tests:
Tests passed:
Tests failed:
Test errors:
-
-

Tests

- - - - - - - - - - - - - -
test nametest status
failedpassed
- - -
- -
- diff --git a/src/modules/core/include/LiveSupport/Core/AsyncState.h b/src/modules/core/include/LiveSupport/Core/AsyncState.h deleted file mode 100644 index e087adc27..000000000 --- a/src/modules/core/include/LiveSupport/Core/AsyncState.h +++ /dev/null @@ -1,212 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_AsyncState_h -#define LiveSupport_Core_AsyncState_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include -#include -#include "LiveSupport/Core/Ptr.h" - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing the state of an asynchronous process. - * - * It provides some constants, plus conversion methods to and from - * strings (used when sending through XML-RPC methods). - * - * There are two sets of conversion methods, because the states have - * different names in the storage server for backup-related stuff and - * general transport stuff. - */ -class AsyncState -{ - private: - - /** - * The possible states of an asynchronous process. - */ - typedef enum { innerInitState, - innerPendingState, - innerFinishedState, - innerClosedState, - innerFailedState, - innerInvalidState } InnerState; - /** - * The value of this state. - */ - InnerState value; - - /** - * A private constructor. - */ - AsyncState(InnerState state) throw () - : value(state) - { - } - - - public: - - /** - * Default constructor; sets the state to "invalid". - */ - AsyncState(void) throw () - : value(innerInvalidState) - { - } - - /** - * Constant instance: init. - */ - static const AsyncState initState; - - /** - * Constant instance: pending. - */ - static const AsyncState pendingState; - - /** - * Constant instance: finished. - */ - static const AsyncState finishedState; - - /** - * Constant instance: closed. - */ - static const AsyncState closedState; - - /** - * Constant instance: failed. - */ - static const AsyncState failedState; - - /** - * Constant instance: invalid. - */ - static const AsyncState invalidState; - - /** - * Construct from a transport string. - * - * @param transportString a string used by the getTransportInfo - * method of the storage server. - * @return an AsyncState with the corresponding value. - */ - static AsyncState - fromTransportString(const std::string & transportString) - throw (); - - /** - * Construct from a backup string. - * - * @param backupString a string used by the xxxxBackupCheck - * method of the storage server. - * @return an AsyncState with the corresponding value. - */ - static AsyncState - fromBackupString(const std::string & backupString) - throw (); - - /** - * Convert to a transport string. - * - * @return a string used by the getTransportInfo method of the - * storage server. - */ - Ptr::Ref - toTransportString(void) const throw (); - - /** - * Convert to a backup string. - * - * @return a string used by the xxxxBackupCheck method of the - * storage server. - */ - Ptr::Ref - toBackupString(void) const throw (); - - /** - * Check for equality. - * - * @param other the other AsyncState to compare with. - * @return true if the two states are equal. - */ - bool - operator==(const AsyncState & other) const throw () - { - return (value == other.value); - } - - /** - * Check for inequality. - * - * @param other the other AsyncState to compare with. - * @return true if the two states are not equal. - */ - bool - operator!=(const AsyncState & other) const throw () - { - return (value != other.value); - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -/** - * Print to an ostream. - * - * @param ostream the ostream to print to. - * @param state the AsyncState to print. - * @return a reference to the same ostream object. - */ -std::ostream& -operator<<(std::ostream& ostream, const LiveSupport::Core::AsyncState state) - throw (); - -#endif // LiveSupport_Core_AsyncState_h - diff --git a/src/modules/core/include/LiveSupport/Core/AudioClip.h b/src/modules/core/include/LiveSupport/Core/AudioClip.h deleted file mode 100644 index 23b6b24bd..000000000 --- a/src/modules/core/include/LiveSupport/Core/AudioClip.h +++ /dev/null @@ -1,611 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_AudioClip_h -#define LiveSupport_Core_AudioClip_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/Playable.h" -#include "LiveSupport/Core/MetadataTypeContainer.h" - - -namespace LiveSupport { -namespace Core { - -using namespace std; -using namespace boost::posix_time; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing an audio clip. - * AudioClips contain the basic information about the audio clip. - * An AudioClip is contained in a PlaylistElement, which provides the - * relative offset and fade in/fade out information. A PlaylistElement, - * in turn, is contained in a Playlist. - * - * This object has to be configured with an XML configuration element - * called audioClip. This may look like the following: - * - *

- *  <audioClip id="1" 
- *             title="Name of the Song"
- *             playlength="00:18:30.000000"
- *             uri="file:var/test1.mp3" >
- *         <metadata
- *                   xmlns="http://mdlf.org/livesupport/elements/1.0/"
- *                   xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
- *                   xmlns:dc="http://purl.org/dc/elements/1.1/"
- *                   xmlns:dcterms="http://purl.org/dc/terms/"
- *                   xmlns:xml="http://www.w3.org/XML/1998/namespace" >
- *             <dc:title  >File Title txt</dc:title>
- *             <dcterms:extent  >00:02:30.000000</dcterms:extent>
- *             ...
- *         </metadata>
- *  </audioClip>
- *  
- * - * The metadata element is optional. The configure() method - * sets only those fields which had not been set previously: e.g., if we set - * some or all fields of the AudioClip in the constructor, then these fields - * in the XML element will be ignored by configure(). - * The title attribute and the <dc:title> - * element set the same field; if both are present, the title is set from - * the attribute and the element is ignored.. - * The same is true for the playlength attribute and the - * <dcterms:extent> element. - * It is required that by the end of the configure() method, the playlength - * is set somehow (from a constructor, the attribute or the element). - * If the title is not set by the end of the configure() method, it is then - * set to the empty string. - * Embedded XML elements are currently ignored: e.g., - *
  <group>
- *      <member1>value1</member1>
- *      <member2>value2</member2>
- *  </group>
- * produces a single metadata field group with an empty value, - * and ignores member1 and member2. - * TODO: fix this? - * - * The URI is not normally part of the XML element; it's only included - * as an optional attribute for testing purposes. - * - * The DTD for the above element is: - * - *

- *  <!ELEMENT audioClip (metadata?) >
- *  <!ATTLIST audioClip  id           NMTOKEN     #IMPLIED  >
- *  <!ATTLIST audioClip  title        CDATA       #IMPLIED  >
- *  <!ATTLIST audioClip  playlength   NMTOKEN     #IMPLIED  >
- *  <!ATTLIST audioClip  uri          CDATA       #IMPLIED   >
- *  
- */ -class AudioClip : public Configurable, - public Playable -{ - private: - /** - * The name of the configuration XML elmenent used by AudioClip. - */ - static const std::string configElementNameStr; - - /** - * The unique id of the audio clip. - */ - Ptr::Ref id; - - /** - * The title of the audio clip. - */ - Ptr::Ref title; - - /** - * The playling length of the audio clip. - */ - Ptr::Ref playlength; - - /** - * The location of the binary audio clip sound file. - */ - Ptr::Ref uri; - - /** - * The identifying token returned by the storage server. - */ - Ptr::Ref token; - - /** - * This audio clip in XML format. - */ - Ptr::Ref xmlAudioClip; - - /** - * Set the value of a metadata field in this audio clip. - * - * @param value the new value of the metadata field. - * @param name the name of the metadata field (without prefix) - * @param prefix the prefix of the metadata field - * @exception std::invalid_argument if the key is dcterms:extent, - * but the value is not a valid ISO-8601 time - */ - virtual void - setMetadata(Ptr::Ref value, - const std::string &name, const std::string &prefix) - throw (std::invalid_argument); - - /** - * Convert a time_duration to string, in format HH:MM:SS.ssssss. - */ - std::string - toFixedString(Ptr::Ref time) const throw () - { - if (time->fractional_seconds()) { - return to_simple_string(*time); - } else { - return to_simple_string(*time) + ".000000"; - } - } - - /** - * Set the playlength member of this audio clip. - * - * @param timeString the new playlength - * @exception std::invalid_argument if the argument is not - * a valid ISO-8601 time - */ - void - setPlaylength(Ptr::Ref timeString) - throw (std::invalid_argument); - - - public: - /** - * Copy constructor. - * - * Copies the pointers for all fields except xmlAudioClip. - * These fields are immutable; if you want to modify them, call the - * appropriate setter function with (a pointer to) an object - * with the new value. - * - * @param otherAudioClip the audio clip to be copied - */ - AudioClip(const AudioClip & otherAudioClip) throw (); - - /** - * Default constructor. - * - * This constructor creates an AudioClip with a null pointer - * for all (ID, playlength, title, uri) fields! It is meant for - * internal use only. If you want to upload a new audio clip to - * the storage, use the constructor with (title, playlength, uri) - * arguments. - */ - AudioClip(void) throw () - : Playable(AudioClipType) - { - } - - /** - * Create an audio clip by specifying its unique ID. - * The other fields will be filled in by configure(). - * - * This constructor creates an AudioClip with a null pointer - * for all fields except the ID! It is meant for internal use only. - * If you want to upload a new audio clip to the storage, - * use the constructor with (title, playlength, uri) arguments. - * - * @param id the id of the audio clip. - */ - AudioClip(Ptr::Ref id) throw () - : Playable(AudioClipType) - { - this->id = id; - } - - /** - * Create an audio clip by specifying all details, except - * for the title. The title is set to the empty string. - * - * This is used for testing purposes. - * If you want to upload a new audio clip to the storage, - * use the constructor with (title, playlength, uri) arguments. - * - * @param id the id of the audio clip. - * @param playlength the playing length of the audio clip. - * @param uri the location of the sound file corresponding to - * this audio clip object (optional) - */ - AudioClip(Ptr::Ref id, - Ptr::Ref playlength, - Ptr::Ref uri = Ptr::Ref()) - throw (); - - /** - * Create an audio clip by specifying all details. - * - * This is used for testing purposes. - * If you want to upload a new audio clip to the storage, - * use the constructor with (title, playlength, uri) arguments. - * - * @param id the id of the audio clip. - * @param title the title of the audio clip. - * @param playlength the playing length of the audio clip. - * @param uri the location of the sound file corresponding to - * this audio clip object (optional) - */ - AudioClip(Ptr::Ref id, - Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri = Ptr::Ref()) - throw (); - - /** - * Create an audio clip by specifying all details which need - * to be set by the user. - * The ID is left blank (i.e., a null pointer), - * and can be set later using setId(). - * - * This constructor is used when a new audio clip is uploaded to - * the storage. For example: - *

-         *  Ptr::Ref
-         *          storageClientFactory = StorageClientFactory::getInstance();
-         *  Ptr::Ref
-         *          storageClient = storageClientFactory->getStorageClient();
-         *  Ptr::Ref
-         *          audioClip(new AudioClip(title, playlength, uri));
-         *  storageClient->storeAudioClip(sessionId, audioClip);
-         *  std::cerr << audioClip->getId()->getId();   // has been set by the
-         *                                              //   storage client
-         *  
- * - * @see StorageClient::StorageClientFactory - * @see StorageClient::StorageClientInterface - * - * @param playlength the playing length of the audio clip. - * @param title the title of the audio clip. - * @param uri the location of the sound file corresponding to - * this audio clip object. - */ - AudioClip(Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri) - throw (); - - - /** - * Convert the audio clip to an XmlRpcValue (marshalling). - * - * @return an XmlRpcValue struct, containing a - * field named audioClip, with value of type string, - * which contains an XML document representing the audio clip. - */ - operator XmlRpc::XmlRpcValue() const - throw (); - - /** - * Construct an audio clip from an XmlRpcValue (demarshalling). - * - * @param xmlRpcValue an XmlRpcValue struct, containing a - * field named audioClip, with value of type string, - * which contains an XML document, the root node of which - * can be passed to the configure() method. - * @exception std::invalid_argument if the argument is invalid - */ - AudioClip(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~AudioClip(void) throw () - { - } - - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuraiton information - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Return the id of the audio clip. - * - * @return the unique id of the audio clip. - */ - virtual Ptr::Ref - getId(void) const throw () - { - return id; - } - - /** - * Set the ID of the object. This is only allowed if the ID was - * a null pointer; once the ID is set, it can not be changed. - * - * @param id the new unique id of the audio clip. - */ - void - setId(Ptr::Ref id) throw (std::invalid_argument) - { - if (!this->id) { - this->id = id; - } - else { - throw std::invalid_argument("can not set the ID twice"); - } - } - - /** - * Return the total playing length for this audio clip. - * - * @return the playing length in microseconds. - */ - virtual Ptr::Ref - getPlaylength(void) const throw () - { - return playlength; - } - - /** - * Return the URI of the binary sound file of this audio clip, - * which can be played by the audio player. - * - * @return the URI. - */ - virtual Ptr::Ref - getUri(void) const throw () - { - return uri; - } - - /** - * Set the URI of the binary sound file of this audio clip, - * which can be played by the audio player. - * - * @param uri the new URI. - */ - virtual void - setUri(Ptr::Ref uri) throw () - { - this->uri = uri; - } - - /** - * Return the token which is used to identify this audio clip - * to the storage server. - * - * @return the token. - */ - virtual Ptr::Ref - getToken(void) const throw () - { - return token; - } - - /** - * Set the token which is used to identify this audio clip - * to the storage server. - * - * @param token a new token. - */ - virtual void - setToken(Ptr::Ref token) - throw () - { - this->token = token; - } - - - /** - * Return the title of this audio clip. - * - * @return the title. - */ - virtual Ptr::Ref - getTitle(void) const throw () - { - return title; - } - - /** - * Set the title of this audio clip. - * - * @param title a new title. - */ - virtual void - setTitle(Ptr::Ref title) - throw (); - - /** - * Return the value of a metadata field in this audio clip. - * If the audio clip does not have this metadata field, returns a null - * pointer. - * - * @param key the name of the metadata field - * @return the value of the metadata field; 0 if there is - * no such field; - */ - virtual Ptr::Ref - getMetadata(const std::string &key) const - throw (); - - /** - * Set the value of a metadata field in this audio clip. - * - * @param value the new value of the metadata field. - * @param key the name of the metadata field - * @exception std::invalid_argument if the key is dcterms:extent, - * but the value is not a valid ISO-8601 time - */ - virtual void - setMetadata(Ptr::Ref value, - const std::string &key) - throw (std::invalid_argument); - - - /** - * Return a partial XML representation of this audio clip or playlist. - * - * This is a string containing a single or - * XML element, with minimal information (ID, title, playlength) - * only, without an XML header or any other metadata. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * @return a string representation of the audio clip as an XML element - */ - virtual Ptr::Ref - getXmlElementString(void) const throw (); - - - /** - * Return a complete XML representation of this audio clip. - * - * This is a string containing a an XML document with an - * root node, together with an XML header. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * The audio clip or playlist can be completely reconstructed from - * the string returned by this method: - *

-         *  Ptr::Ref         audioClip1 = ... something ...;
-         *  Ptr::Ref  parser;
-         *  parser->parse_memory(*audioClip1->getXmlDocumentString());
-         *  const xmlpp::Document*      document = parser->get_document();
-         *  const xmlpp::Element*       root     = document->get_root_node();
-         *  Ptr::Ref         audioClip2(new AudioClip());
-         *  audioClip2->configure(*root);
-         *  
- * results in two identical audio clips (and the same works for - * playlists, too). - * - * The XML document has the (pseudo-) DTD - *

-         *  <!ELEMENT audioClip (metadata) >
-         *  <!ATTLIST audioClip  id           NMTOKEN     #REQUIRED  >
-         *
-         *  <!ELEMENT metadata (dcterms:extent, dc:title, (ANY)*) >
-         *  <!ELEMENT dcterms:extent (NMTOKEN) >
-         *  <!ELEMENT dc:title       (CDATA) >
-         *  
- * - * If the audio clip has no metadata at all (this is possible if - * it was created by the default constructor or the constructor - * which takes a unique ID only), a null pointer is returned. - * - * @return a string representation of the audio clip as an XML document - */ - virtual Ptr::Ref - getXmlDocumentString(void) const throw (); - - - /** - * Read the metadata contained in the id3v2 tags of the mp3 sound - * file. If no id3v2 tags are found, the file is searched for other - * (id3v1, APE, XiphComment) tags. - * - * The tags are processed and translated into Dublin Core - * metadata fields using the MetadataTypeContainer object. - * - * @param metadataTypes contains a list of all supported - * metadata types. - * @exception std::invalid_argument if the AudioClip instance does not - * have a uri field, or the file name contained in the uri - * field is invalid. - */ - void - readTag(Ptr::Ref metadataTypes) - throw (std::invalid_argument); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - - /** - * Auxilliary method used by setMetadata() and getMetadata(). - */ - void - separateNameAndNameSpace(const std::string & key, - std::string & name, - std::string & nameSpace) - throw (); - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_AudioClip_h - diff --git a/src/modules/core/include/LiveSupport/Core/BaseTestMethod.h b/src/modules/core/include/LiveSupport/Core/BaseTestMethod.h deleted file mode 100644 index 62efd482e..000000000 --- a/src/modules/core/include/LiveSupport/Core/BaseTestMethod.h +++ /dev/null @@ -1,116 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_BaseTestMethod_h -#define LiveSupport_Core_BaseTestMethod_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A base class for the test methods. - * Subclass this class for the methods that use configuration files. - * This class gives helpers to access the configuration files - * from various locations (~/.campcaster, ./etc) - */ -class BaseTestMethod : public CPPUNIT_NS::TestFixture -{ - private: - /** - * Get the current working directory. - * - * @return the current working directory. - */ - static std::string - getCwd(void) throw (); - - public: - /** - * Return the full path for a configuration file. - * - * @param configFileName the name of the configuration file. - * @return the full path of the configuration file, found in the - * appropriate directory. - * @exception std::invalid_argument if the specified config file - * does not exist. - */ - static std::string - getConfigFile(const std::string configFileName) - throw (std::invalid_argument); - - /** - * Helper function to return an XML Document object based on - * a config file name. - * First, the proper location of the config file is found. - * - * @param parser the XML DOM parser to use for parsing. - * @param configFileName the name of the configuration file. - * @return an XML document, containing the contents of the - * config file - * @exception std::invalid_argument if the configuration file - * could not be found - * @exception std::exception on parsing errors. - */ - static const xmlpp::Document * - getConfigDocument(xmlpp::DomParser & parser, - const std::string configFileName) - throw (std::invalid_argument, - std::exception); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_BaseTestMethod_h - diff --git a/src/modules/core/include/LiveSupport/Core/Configurable.h b/src/modules/core/include/LiveSupport/Core/Configurable.h deleted file mode 100644 index c3eb51007..000000000 --- a/src/modules/core/include/LiveSupport/Core/Configurable.h +++ /dev/null @@ -1,98 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Configurable_h -#define LiveSupport_Core_Configurable_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An interface marking a class configurable by an XML element. - */ -class Configurable -{ - public: - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuraiton information - * @exception std::logic_error if the object has already - * been configured, and can not be reconfigured. - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument, - std::logic_error) - = 0; - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Configurable(void) throw () - { - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Configurable_h - diff --git a/src/modules/core/include/LiveSupport/Core/Debug.h b/src/modules/core/include/LiveSupport/Core/Debug.h deleted file mode 100644 index fa1ea82c9..000000000 --- a/src/modules/core/include/LiveSupport/Core/Debug.h +++ /dev/null @@ -1,269 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2003-2005 Max Howell - (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -#ifndef CAMPCASTER_DEBUG_H -#define CAMPCASTER_DEBUG_H - -#include "configure.h" - -#include -#include -#include -#include - -#ifndef DEBUG_PREFIX - #define CMP_PREFIX "" -#else - #define CMP_PREFIX "[" DEBUG_PREFIX "] " -#endif - -/** - * @namespace LiveSupport::Core::Debug - * @short A debug output API with indentation and block timing. - * @author Max Howell - * @author Ian Monroe - */ -namespace LiveSupport { - namespace Core { - namespace Debug { - static int indentAmount = 0; - } - } -} -using namespace LiveSupport; -using namespace LiveSupport::Core; - -#ifndef YDEBUG - class NoDebugStream; - - typedef NoDebugStream & (*NDBGFUNC)(NoDebugStream &); - - class NoDebugStream { - public: - /// Default constructor. - NoDebugStream() {} - ~NoDebugStream() {} - NoDebugStream& operator<<(NDBGFUNC) { return *this; } - - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(short int ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(unsigned short int ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(char ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(unsigned char ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(int ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(unsigned int ) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream &operator<<(const char *) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(const void *) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(void *) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(double) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(long) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(unsigned long) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(std::string) { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(boost::posix_time::ptime) - { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(boost::posix_time::time_duration) - { return *this; } - /** - * Does nothing. - * @return this stream - */ - NoDebugStream& operator<<(XmlRpc::XmlRpcValue) - { return *this; } - }; - static inline NoDebugStream debug() { return NoDebugStream(); } - static inline NoDebugStream warning() { return NoDebugStream(); } - static inline NoDebugStream error() { return NoDebugStream(); } - inline NoDebugStream &endl( NoDebugStream & s) { return s; } -#else - static inline std::ostream& debug() { return std::cout << std::string(Debug::indentAmount, ' ') << CMP_PREFIX; } - static inline std::ostream& warning() { return std::cout << std::string(Debug::indentAmount, ' ') << CMP_PREFIX << "[WARNING!] "; } - static inline std::ostream& error() { return std::cout << std::string(Debug::indentAmount, ' ') << CMP_PREFIX << "[ERROR!] "; } -#endif - -using std::endl; - -namespace LiveSupport { namespace Core { -namespace Debug -{ - /** - * @class Debug::Block - * @short Use this to label sections of your code - * - * Usage: - * #define DEBUG_PREFIX "Prefix" - * #include "LiveSupport/Core/Debug.h" - * - * void function() - * { - * ... - * { - * Debug::Block myBlock( "section" ); - * - * debug() << "output1" << endl; - * debug() << "output2" << endl; - * } - * ... - * } - * - * Will output: - * - * BEGIN: section - * [prefix] output1 - * [prefix] output2 - * END: section - Took 0.1s - * - * Its not thread-safe with the indentation count. But a race condition - * involving indentation width isn't a big deal. - */ - - class Block - { - public: - Block( std::string label ) - : m_label( label ) - { - gettimeofday( &m_start, 0 ); - debug() << "BEGIN: " << m_label << endl; - indentAmount += 2; //critical section - } - ~Block() - { - timeval end; - gettimeofday( &end, 0 ); - - end.tv_sec -= m_start.tv_sec; - if( end.tv_usec < m_start.tv_usec) { - // Manually carry a one from the seconds field. - end.tv_usec += 1000000; - end.tv_sec--; - } - end.tv_usec -= m_start.tv_usec; - - double duration = double(end.tv_sec) + (double(end.tv_usec) / 1000000.0); - - indentAmount -= 2; //critical section - debug() << "END__: " << m_label << " - Took " << duration << "s\n"; - } - private: - const std::string m_label; - timeval m_start; - }; - - /** - * @name Debug::stamp() - * @short To facilitate crash/freeze bugs, by making it easy to mark code that has been processed - * - * Usage: - * - * { - * Debug::stamp(); - * function1(); - * Debug::stamp(); - * function2(); - * Debug::stamp(); - * } - * - * Will output (assuming the crash occurs in function2() - * - * app: Stamp: 1 - * app: Stamp: 2 - * - */ - - inline void stamp() - { - static int n = 0; - debug() << "| Stamp: " << ++n << endl; - } -} -} } //LiveSupport and Core namespaces -#define DEBUG_BLOCK Debug::Block uniquelyNamedStackAllocatedStandardBlock( __PRETTY_FUNCTION__ ); - -/// Standard function announcer -#define DEBUG_FUNC_INFO { debug() << '[' << __PRETTY_FUNCTION__ << ']' << endl; } - -/// Announce a line -#define DEBUG_LINE_INFO { debug() << '[' << __PRETTY_FUNCTION__ << ']' << "Line: " << __LINE__ << endl; } - - -#endif //CAMPCASTER_DEBUG_H diff --git a/src/modules/core/include/LiveSupport/Core/FadeInfo.h b/src/modules/core/include/LiveSupport/Core/FadeInfo.h deleted file mode 100644 index 0270fcd6e..000000000 --- a/src/modules/core/include/LiveSupport/Core/FadeInfo.h +++ /dev/null @@ -1,255 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_FadeInfo_h -#define LiveSupport_Core_FadeInfo_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" -#include "LiveSupport/Core/Configurable.h" - - -namespace LiveSupport { -namespace Core { - -using namespace std; -using namespace boost::posix_time; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing fade in / fade out information of a playlist element. - * This is contained in a PlaylistElement, a list of which, in turn, is - * contained in a Playlist. - * - * This object has to be configured with an XML configuration element - * called fadeInfo. This may look like the following: - * - *

- *  <fadeInfo id="9901" 
- *            fadeIn="00:00:02.000000"
- *            fadeOut="00:00:01.500000" >
- *  </fadeInfo>
- *  
- * - * The DTD for the above element is: - * - *

- *  <!ELEMENT fadeInfo EMPTY >
- *  <!ATTLIST fadeInfo id         NMTOKEN     #REQUIRED  >
- *  <!ATTLIST fadeInfo fadeIn     NMTOKEN     #REQUIRED  >
- *  <!ATTLIST fadeInfo fadeIn     NMTOKEN     #REQUIRED  >
- *  
- */ -class FadeInfo : public Configurable -{ - private: - /** - * The name of the configuration XML elmenent used by FadeInfo. - */ - static const std::string configElementNameStr; - - /** - * The unique id of the fade info. - */ - Ptr::Ref id; - - /** - * The length of fade in period. - */ - Ptr::Ref fadeIn; - - /** - * The length of fade out period. - */ - Ptr::Ref fadeOut; - - /** - * Convert a time_duration to string, in format HH:MM:SS.ssssss. - */ - std::string - toFixedString(Ptr::Ref time) const throw () - { - if (time->fractional_seconds()) { - return to_simple_string(*time); - } else { - return to_simple_string(*time) + ".000000"; - } - } - - - public: - /** - * Default constructor. - */ - FadeInfo(void) throw () - { - } - - /** - * Create a fade info instance by specifying all details. - * This is used for testing purposes. - * - * @param id the id of the fade info. - * @param fadeIn the length of the fade in period. - * @param fadeOut the length of the fade in period. - */ - FadeInfo(Ptr::Ref id, - Ptr::Ref fadeIn, - Ptr::Ref fadeOut) throw() - { - this->id = id; - this->fadeIn = fadeIn; - this->fadeOut = fadeOut; - } - - /** - * Create a fade info instance by specifying the fade in and fade out. - * - * @param fadeIn the length of the fade in period. - * @param fadeOut the length of the fade in period. - */ - FadeInfo(Ptr::Ref fadeIn, - Ptr::Ref fadeOut) throw() - { - this->id = UniqueId::generateId(); - this->fadeIn = fadeIn; - this->fadeOut = fadeOut; - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~FadeInfo(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuraiton information - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Return the id of the fade info instance. - * - * @return the unique id of the fade info instance. - */ - Ptr::Ref - getId(void) const throw () - { - return id; - } - - /** - * Return the length of the fade in period. - * - * @return the length of the fade in period, in microseconds. - */ - Ptr::Ref - getFadeIn(void) const throw () - { - return fadeIn; - } - - /** - * Return the length of the fade in period. - * - * @return the length of the fade in period, in microseconds. - */ - Ptr::Ref - getFadeOut(void) const throw () - { - return fadeOut; - } - - /** - * Return an XML representation of this fadeInfo element. - * - * This is a string containing a single - * XML element, which is empty, and has a fadeIn and a fadeOut - * argument (of format hh:mm:ss.ssssss). - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * @return a string representation of the audio clip as an XML element - */ - Ptr::Ref - getXmlElementString(void) throw (); - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_FadeInfo_h - diff --git a/src/modules/core/include/LiveSupport/Core/FileTools.h b/src/modules/core/include/LiveSupport/Core/FileTools.h deleted file mode 100644 index ac52ae1ed..000000000 --- a/src/modules/core/include/LiveSupport/Core/FileTools.h +++ /dev/null @@ -1,157 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author: fgerlits $ - Version : $Revision$ - Location : $URL: svn+ssh://fgerlits@code.campware.org/home/svn/repo/livesupport/trunk/livesupport/src/modules/core/include/LiveSupport/Core/FileTools.h $ - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_FileTools_h -#define LiveSupport_Core_FileTools_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A collection of tools for handling files and URLs. - * - * @author $Author: fgerlits $ - * @version $Revision$ - */ -class FileTools -{ - public: - /** - * Copy the contents of a URL to a local file. - * - * @param url the URL to read. - * @param path the local path where the file is saved. - * @exception std::runtime_error on errors. - */ - static void - copyUrlToFile(const std::string & url, - const std::string & path) - throw (std::runtime_error); - - /** - * Upload the contents of a local file to a writable URL. - * - * @param path the local path where the file is. - * @param url the URL to write. - * @exception std::runtime_error on errors. - */ - static void - copyFileToUrl(const std::string & path, - const std::string & url) - throw (std::runtime_error); - - /** - * Generate a temporary file name. - * - * @return a temporary file name. - */ - static const std::string - tempnam(void) throw (); - - /** - * Append a file to an existing tarball. - * - * @param tarFileName the name of the existing tar file - * @param newFileRealName the name of the new file to append - * @param newFileInTarball the name of the new file in the tarball - * @exception std::runtime_error on file / tarball handling issues. - */ - static void - appendFileToTarball(const std::string & tarFileName, - const std::string & newFileRealName, - const std::string & newFileInTarball) - throw (std::runtime_error); - - /** - * Check if a file exists in a given tarball. - * - * @param tarFileName the name of the existing tar file - * @param fileName the name of the file to check in the traball. - * @return true if a file named fileName exists in the tarball, - * false otherwise. - * @exception std::runtime_error on file / tarball handling issues. - */ - static bool - existsInTarball(const std::string & tarFileName, - const std::string & fileName) - throw (std::runtime_error); - - /** - * Extract a file from a tarball. - * - * @param tarFileName the name of the existing tar file. - * @param fileInTarball the name of the file to be extracted - * in the tarball. - * @param fileExtracted the name of the new file to create. - * @exception std::runtime_error on file / tarball handling issues. - */ - static void - extractFileFromTarball(const std::string & tarFileName, - const std::string & fileInTarball, - const std::string & fileExtracted) - throw (std::runtime_error); -}; - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_FileTools_h - diff --git a/src/modules/core/include/LiveSupport/Core/Installable.h b/src/modules/core/include/LiveSupport/Core/Installable.h deleted file mode 100644 index ab77b1355..000000000 --- a/src/modules/core/include/LiveSupport/Core/Installable.h +++ /dev/null @@ -1,135 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Installable_h -#define LiveSupport_Core_Installable_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include "LiveSupport/Core/Ptr.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An interface for having objects that can install themselves. - * The concept of installation means setting up for long-term use. - * When something installs, it creates databases, writes configuration - * files, etc. It sets up the object to be run. This is not to be - * confused with instance initialization, e.g. when a server is started - * or stopped. - * - * The following life cycle is expected from systems impelementing this - * interface: - * - *
    - *
  • install
  • - *
    • - *
    • start
    • - *
    • stop
    • - *
    • start
    • - *
    • stop
    • - *
  • - *
  • uninstall
  • - *
- * - * Later more stages will be added, and load/save (externalization) - * facilities. - */ -class Installable -{ - public: - /** - * Install the component. - * This step involves creating the environment in which the component - * will run. This may be creation of coniguration files, - * database tables, etc. - * - * @exception std::exception on installation problems. - */ - virtual void - install(void) throw (std::exception) - = 0; - - /** - * Check to see if the component has already been installed. - * - * @return true if the component is properly installed, - * false otherwise - * @exception std::exception on generic problems - */ - virtual bool - isInstalled(void) throw (std::exception) - = 0; - - /** - * Uninstall the component. - * Removes all the resources created in the install step. - * - * @exception std::exception on unistallation problems. - */ - virtual void - uninstall(void) throw (std::exception) - = 0; - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Installable(void) throw () - { - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Installable_h - diff --git a/src/modules/core/include/LiveSupport/Core/LocalizedConfigurable.h b/src/modules/core/include/LiveSupport/Core/LocalizedConfigurable.h deleted file mode 100644 index 2589dfe1a..000000000 --- a/src/modules/core/include/LiveSupport/Core/LocalizedConfigurable.h +++ /dev/null @@ -1,144 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_LocalizedConfigurable_h -#define LiveSupport_Core_LocalizedConfigurable_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/LocalizedObject.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A configurable element, that is also localized. Reads localization - * information from the configuration file itself. - * - * The configure() function expects the following XML element: - * - *

- *  
- *  
- * - *

- *  
- *  
- *  
- *
- *  ]>
- *  
- */ -class LocalizedConfigurable : public Configurable, public LocalizedObject -{ - private: - /** - * The path to the resource bundles. - */ - std::string bundlePath; - - - public: - /** - * The default constructor. - */ - LocalizedConfigurable(void) throw () - { - } - - /** - * A virtual destructor. - */ - virtual - ~LocalizedConfigurable(void) throw () - { - } - - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuraiton information - * @exception std::logic_error if the object has already - * been configured, and can not be reconfigured. - * @see LocalizedObject#getBundle - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument, - std::logic_error); - - - /** - * Change the current locale, which was previously specified by - * configure(), to the new locale. This results in a replacement - * of the resource bundle, read from the same path as in the - * configuration element sent to configure(), but with the new - * locale id. - * - * @param newLocale the new locale id. - * @exception std::invalid_argument if there is no bundle by - * the specified locale - */ - virtual void - changeLocale(const std::string newLocale) - throw (std::invalid_argument); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_LocalizedConfigurable_h - diff --git a/src/modules/core/include/LiveSupport/Core/LocalizedObject.h b/src/modules/core/include/LiveSupport/Core/LocalizedObject.h deleted file mode 100644 index 809f42d85..000000000 --- a/src/modules/core/include/LiveSupport/Core/LocalizedObject.h +++ /dev/null @@ -1,491 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_LocalizedObject_h -#define LiveSupport_Core_LocalizedObject_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Base class for localized objects, containing some helper functions - * to make localized life easier. - */ -class LocalizedObject -{ - private: - /** - * The name of the configuration XML elmenent used by this object. - */ - static const std::string configElementNameStr; - - /** - * The resource bundle holding the localized resources for this - * object. - */ - Ptr::Ref bundle; - - - protected: - /** - * The default constructor. - */ - LocalizedObject(void) throw () - { - } - - - public: - /** - * Constructor. - * - * @param bundle the resource bundle holding the localized - * resources for this window - */ - LocalizedObject(Ptr::Ref bundle) throw () - { - this->bundle = bundle; - } - - /** - * Virtual destructor. - */ - virtual - ~LocalizedObject(void) throw () - { - } - - /** - * Return the name of the XML element that is expected - * to be sent to a call to getBundle(). - * - * @return the name of the expected XML configuration element. - * @see #getBundle(const xmlpp::Element &) - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Load a resource bundle based on an XML configuration element. - * - * The DTD for the lement to be supplied to this function is: - *

-         *  
-         *  
-         *  
-         *  ]>
-         *  
- * - * a sample configuration element is as follows: - * - *

-         *  
-         *  
- * - * for an overview of resource bundle parameters, see the ICU - * documentation on - * resource management - * - * @param element the XML configuration element - * @return the resource bundle, based on this element. - * @exception std::invalid_argument if the supplied element is not - * a proper resource bundle configuration element. - * @see http://oss.software.ibm.com/icu/userguide/ResourceManagement.html - */ - static Ptr::Ref - getBundle(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Get the resource bundle for this object. - * - * @return the resource bundle for this object. - */ - Ptr::Ref - getBundle(void) const throw () - { - return bundle; - } - - /** - * Change the resource bundle for this object. - * - * @param bundle the new resource bundle used by the object. - */ - virtual void - setBundle(Ptr::Ref bundle) throw () - { - this->bundle = bundle; - } - - /** - * Get a resource bundle nested inside our bundle. - * - * @param key the name of the resource bundle to get. - * @exception std::invalid_argument if there is no bundle by - * the specified key - */ - Ptr::Ref - getBundle(const Glib::ustring & key) - throw (std::invalid_argument) - { - return getBundle(getBundle(), key.c_str()); - } - - /** - * Get a resource bundle nested inside our bundle. - * - * @param key the name of the resource bundle to get. - * @exception std::invalid_argument if there is no bundle by - * the specified key - */ - Ptr::Ref - getBundle(const char * key) throw (std::invalid_argument) - { - return getBundle(getBundle(), key); - } - - /** - * Get a resource bundle nested inside our bundle. - * - * @param bundle the resource bundle containing the key. - * @param key the name of the nested resource bundle to get. - * @exception std::invalid_argument if there is no bundle by - * the specified key - */ - Ptr::Ref - getBundle(Ptr::Ref bundle, - const char * key) - throw (std::invalid_argument); - - /** - * Get a string from the resource bundle. - * - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - virtual Ptr::Ref - getResourceString(const char * key) - throw (std::invalid_argument) - { - return getResourceString(getBundle(), key); - } - - /** - * Get a string from the resource bundle. - * - * @param bundle the nested resource bundle containing the key. - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - virtual Ptr::Ref - getResourceString(const char * bundle, - const char * key) - throw (std::invalid_argument) - { - return getResourceString(getBundle(bundle), key); - } - - /** - * Get a string from the resource bundle. - * - * @param bundle the nested resource bundle containing the key. - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - virtual Ptr::Ref - getResourceString(Ptr::Ref bundle, - const char * key) - throw (std::invalid_argument); - - /** - * A convenience function to format a message. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param pattern the pattern to format - * @param arguments the arguments to use in the formatting - * @param nArguments the number of arguments supplied - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - static Ptr::Ref - formatMessage(Ptr::Ref pattern, - Formattable * arguments, - unsigned int nArguments) - throw (std::invalid_argument); - - /** - * A convenience function to format a message, based on a pattern - * loaded from a resource. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param patternKey the key of the pattern to format - * @param arguments the arguments to use in the formatting - * @param nArguments the number of arguments supplied - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match, or there is no resource - * specified by patternKey - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - virtual Ptr::Ref - formatMessage(const char * patternKey, - Formattable * arguments, - unsigned int nArguments) - throw (std::invalid_argument); - - /** - * A convenience function to format a message, based on a pattern - * loaded from a resource. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param patternKey the key of the pattern to format - * @param arguments the arguments to use in the formatting - * @param nArguments the number of arguments supplied - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match, or there is no resource - * specified by patternKey - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - virtual Ptr::Ref - formatMessage(const std::string & patternKey, - Formattable * arguments, - unsigned int nArguments) - throw (std::invalid_argument) - { - return formatMessage(patternKey.c_str(), arguments, nArguments); - } - - /** - * A convenience function to format a message, based on a pattern - * loaded from a resource, with one argument. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param patternKey the key of the pattern to format - * @param argument1 the single argument to the message. - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match, or there is no resource - * specified by patternKey - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - virtual Ptr::Ref - formatMessage(const std::string & patternKey, - const Glib::ustring & argument1) - throw (std::invalid_argument); - - /** - * A convenience function to format a message, based on a pattern - * loaded from a resource, with two arguments. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param patternKey the key of the pattern to format - * @param argument1 the first argument to the message. - * @param argument2 the second argument to the message. - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match, or there is no resource - * specified by patternKey - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - virtual Ptr::Ref - formatMessage(const std::string & patternKey, - const Glib::ustring & argument1, - const Glib::ustring & argument2) - throw (std::invalid_argument); - - /** - * A convenience function to format a message, based on a pattern - * loaded from a resource, with three arguments. - * For more information, see the ICU MessageFormat class - * documentation. - * - * @param patternKey the key of the pattern to format - * @param argument1 the first argument to the message. - * @param argument2 the second argument to the message. - * @param argument3 the second argument to the message. - * @return the formatted string - * @exception std::invalid_argument if the pattern is bad, or - * the arguments do not match, or there is no resource - * specified by patternKey - * @see http://oss.software.ibm.com/icu/apiref/classMessageFormat.html - */ - virtual Ptr::Ref - formatMessage(const std::string & patternKey, - const Glib::ustring & argument1, - const Glib::ustring & argument2, - const Glib::ustring & argument3) - throw (std::invalid_argument); - - /** - * Convert an ICU unicode string to a Glib ustring. - * - * @param unicodeString the ICU unicode string to convert. - * @return the same string as supplied, in Glib ustring form. - */ - static Ptr::Ref - unicodeStringToUstring(Ptr::Ref unicodeString) - throw (); - - /** - * Convert a Glib ustring to an ICU unicode string. - * - * @param gString the Glib ustring to convert - * @return the same string as supplied, in ICU unicode form. - */ - static Ptr::Ref - ustringToUnicodeString(Ptr::Ref gString) - throw (); - - /** - * Convert a Glib ustring to an ICU unicode string. - * - * @param gString the Glib ustring to convert - * @return the same string as supplied, in ICU unicode form. - */ - static Ptr::Ref - ustringToUnicodeString(const Glib::ustring & gString) - throw (); - - /** - * Get a string from the resource bundle, as a Glib ustring. - * - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - Ptr::Ref - getResourceUstring(const char * key) - throw (std::invalid_argument) - { - return unicodeStringToUstring(getResourceString(key)); - } - - /** - * Get a string from the resource bundle, as a Glib ustring. - * - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - Ptr::Ref - getResourceUstring(const std::string &key) - throw (std::invalid_argument) - { - return unicodeStringToUstring(getResourceString(key.c_str())); - } - - /** - * Get a string from a resource bundle nested inside this bundle, - * as a Glib ustring. - * - * @param bundle the name of the resource bundle to get. - * @param key the key identifying the requested string. - * @return the requested string - * @exception std::invalid_argument if there is no string for the - * specified key. - */ - Ptr::Ref - getResourceUstring(const char * bundle, - const char * key) - throw (std::invalid_argument) - { - return unicodeStringToUstring(getResourceString(bundle, key) ); - } - - /** - * Get some binary data as a string. - * Reads the binary data either from a binary or from - * an import key, and returns it as a Glib::ustring. - * The binary data is assumed to be in UTF-8 encoding. - * - * @param key the key identifying the requested binary data. - * @return the requested binary data as a string. - * @exception std::invalid_argument if there is no such key, or the - * value is not of binary type, or it isn't valid UTF-8. - */ - Ptr::Ref - getBinaryResourceAsUstring(const char * key) - throw (std::invalid_argument); -}; - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_LocalizedObject_h - diff --git a/src/modules/core/include/LiveSupport/Core/Md5.h b/src/modules/core/include/LiveSupport/Core/Md5.h deleted file mode 100644 index cae454040..000000000 --- a/src/modules/core/include/LiveSupport/Core/Md5.h +++ /dev/null @@ -1,255 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ------------------------------------------------------------------------------ - - This class is based on the following with minor modifications - (see http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html). - - ------------------------------------------------------------------------------ - -// Md5.CC - source code for the C++/object oriented translation and -// modification of Md5. - -// Translation and modification (c) 1995 by Mordechai T. Abzug - -// This translation/ modification is provided "as is," without express or -// implied warranty of any kind. - -// The translator/ modifier does not claim (1) that Md5 will do what you think -// it does; (2) that this translation/ modification is accurate; or (3) that -// this software is "merchantible." (Language for this disclaimer partially -// copied from the disclaimer below). - - ------------------------------------------------------------------------------ - - Which was based on: - - ------------------------------------------------------------------------------ - - Md5.H - header file for Md5C.C - MDDRIVER.C - test driver for MD2, MD4 and Md5 - - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All -rights reserved. - -License to copy and use this software is granted provided that it -is identified as the "RSA Data Security, Inc. Md5 Message-Digest -Algorithm" in all material mentioning or referencing this software -or this function. - -License is also granted to make and use derivative works provided -that such works are identified as "derived from the RSA Data -Security, Inc. Md5 Message-Digest Algorithm" in all material -mentioning or referencing the derived work. - -RSA Data Security, Inc. makes no representations concerning either -the merchantability of this software or the suitability of this -software for any particular purpose. It is provided "as is" -without express or implied warranty of any kind. - -These notices must be retained in any copies of any part of this -documentation and/or software. - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Md5_h -#define LiveSupport_Core_Md5_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_STDINT_H -#include -#else -#error need stdint.h -#endif - - -#include -#include -#include -#include -#include -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for generating md5 sums. - * - * First, one creates an Md5 object from a file, istream or string; then - * one can either call hexDigest() or simply convert the object to std::string - * in order to obtain the md5 sum in the form of 32 hexadecimal (lower case) - * digits. - * - * This is a trimmed version of the C++ class written by Mordechai T. Abzug - * on the basis of the original C code by RSA Data Security, Inc. See the - * header of the source file for further information. - */ -class Md5 -{ - private: - - // first, some types: - typedef unsigned int uint4; // assumes integer is 4 words long - typedef unsigned short int uint2; // assumes short integer is 2 words long - typedef unsigned char uint1; // assumes char is 1 word long - - // methods for controlled operation: - void update (uint1 *input, uint4 input_length); - void update (std::istream& stream); - void update (FILE *file); - void update (const std::string& s); - void finalize () throw(std::invalid_argument); - - // next, the private data: - uint4 state[4]; - uint4 count[2]; // number of *bits*, mod 2^64 - uint1 buffer[64]; // input buffer - uint1 digest[16]; - uint1 finalized; - - /** - * The low 64 bits of the checksum. - */ - uint64_t low64; - - /** - * The high 64 bits of the checksum. - */ - uint64_t high64; - - // last, the private methods, mostly static: - void init (); // called by all constructors - void transform (uint1 *buffer); // does the real update work. Note - // that length is implied to be 64. - - static void encode (uint1 *dest, uint4 *src, uint4 length); - static void decode (uint4 *dest, uint1 *src, uint4 length); - static void memcpy (uint1 *dest, uint1 *src, uint4 length); - static void memset (uint1 *start, uint1 val, uint4 length); - - static inline uint4 rotate_left (uint4 x, uint4 n); - static inline uint4 F (uint4 x, uint4 y, uint4 z); - static inline uint4 G (uint4 x, uint4 y, uint4 z); - static inline uint4 H (uint4 x, uint4 y, uint4 z); - static inline uint4 I (uint4 x, uint4 y, uint4 z); - static inline void FF (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void GG (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void HH (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void II (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - - /** - * Calculate the lower and higher 64 bit values for the checksum - */ - void - calcNumericRepresentation(void) throw (); - - - public: - - /** - * Construct from a std::string - */ - Md5 (const std::string &s) throw(std::invalid_argument); - - - /** - * Construct from an istream - */ - Md5 (std::istream& stream) throw(std::invalid_argument); - - - /** - * Construct from a file - */ - Md5 (FILE *file) throw(std::invalid_argument); - - - /** - * Get the md5 sum as a 32 digit ascii-hex string - */ - std::string hexDigest () throw(); - - - /** - * Get the md5 sum as a 32 digit ascii-hex string - */ - operator std::string () throw(); - - /** - * Return the lower 64 bits of the checksum. - * - * @return the lower 64 bits of the checksum. - */ - uint64_t - low64bits(void) const throw () - { - return low64; - } - - /** - * Return the higher 64 bits of the checksum. - * - * @return the higher 64 bits of the checksum. - */ - uint64_t - high64bits(void) const throw () - { - return high64; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - - -#endif // LiveSupport_Core_Md5_h - diff --git a/src/modules/core/include/LiveSupport/Core/MetadataConstraint.h b/src/modules/core/include/LiveSupport/Core/MetadataConstraint.h deleted file mode 100644 index 59de4b6d3..000000000 --- a/src/modules/core/include/LiveSupport/Core/MetadataConstraint.h +++ /dev/null @@ -1,173 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_MetadataConstraint_h -#define LiveSupport_Core_MetadataConstraint_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/Configurable.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for representing a constraint on the values of a metadata type. - * - * This is an abstract-cum-factory class for constructing the concrete - * constraint subclasses. You construct and configure this class, which - * will transparently construct the concrete subclass desired, and delegate - * the actual value checking to it. - * - * This object has to be configured with an XML configuration element - * called constraint. This may look like the following: - * - *

- *  
- *      1
- *      12
- *  
- *  
- * - * The type attribute identifies this MetadataConstraint object as belonging - * to the subclass NumericRangeConstraint. Other subclasses are - * NumericConstraint, EnumerationConstraint etc. - * - * Each MetadataType object may contain an optional MetadataConstraint member - * object, which restricts the acceptable values for this metadata type. - * - * The DTD for the expected XML element looks like the following: - * - *

- *  
- *  
- *  
- *  
- * - * @see MetadataConstraintContainer - */ -class MetadataConstraint : public Configurable -{ - private: - /** - * The name of the configuration XML element used by MetadataConstraint. - */ - static const std::string configElementNameStr; - - /** - * A reference to a concrete subclass. - */ - Ptr::Ref concreteConstraint; - - - protected: - /** - * The name of the type attribute. - */ - static const std::string typeAttributeName; - - /** - * The name of the configuration element for the constraint values. - */ - static const std::string valueElementName; - - - public: - /** - * Constructor. - */ - MetadataConstraint() throw () - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~MetadataConstraint(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Check that the given value satisfies the constraint. - * - * @param value the value to be checked against the constraint. - * @return true if the value satisfies the constraint. - * @exception std::logic_error if the object has not been - * configured yet. - */ - virtual bool - check(Ptr::Ref value) const - throw (std::logic_error); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_MetadataConstraint_h - diff --git a/src/modules/core/include/LiveSupport/Core/MetadataType.h b/src/modules/core/include/LiveSupport/Core/MetadataType.h deleted file mode 100644 index d3d15ffc7..000000000 --- a/src/modules/core/include/LiveSupport/Core/MetadataType.h +++ /dev/null @@ -1,291 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_MetadataType_h -#define LiveSupport_Core_MetadataType_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/MetadataConstraint.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -class MetadataTypeContainer; - - -/** - * A class for representing a metadata type. - * - * This object has to be configured with an XML configuration element - * called metadataType. This may look like the following: - * - *

- *  <metadataType dcName          = "dc:creator"
- *                id3Tag          = "TPE2"
- *                localizationKey = "dc_creator"
- *                tab             = "main" >
- *      <constraint     type = "numericRange" >
- *          <value>1</value>
- *          <value>12</value>
- *      </constraint>
- *  </metadataType>
- *  
- * - * The tab attribute (if present) must be one of "main", "music" or "voice" - * (all lowercase, case sensitive). - * This determines whether, at file upload, the metadata field appears in - * the Main, Music, or Voice tab. If the attribute is omitted, the metadata - * field will appear in none of the tabs. - * - * The optional constraint sub-element can give restrictions on the acceptable - * values for this type of metadata. See the MetadataConstraint class for - * more information, including the DTD of the <constraint> element. - * - * See the Studio config files for a list of all metadata types. - * - * The DTD for the expected XML element looks like the following: - * - *

- *  
- *  
- *  
- *  
- *  
- *  
- * - * @see MetadataTypeContainer - */ -class MetadataType : public Configurable -{ - friend class MetadataTypeContainer; - - public: - /** - * An enumeration of all possible metadata categories. - */ - typedef enum { noTab, - mainTab, - musicTab, - voiceTab } TabType; - - - private: - /** - * The name of the configuration XML element used by MetadataType. - */ - static const std::string configElementNameStr; - - /** - * A reference to a metadata type container. - */ - Ptr::Ref container; - - /** - * The Dublic Core name of this metadata type. - */ - Ptr::Ref dcName; - - /** - * The ID3v2 tag for this metadata type. - */ - Ptr::Ref id3Tag; - - /** - * The localization key for this metadata type. - */ - Ptr::Ref localizationKey; - - /** - * The localization key for this metadata type. - */ - TabType tab; - - /** - * The constraint object, if any. - */ - Ptr::Ref constraint; - - - protected: - /** - * Default constructor. - * - * @param container the container this metadata type is held in. - */ - MetadataType(Ptr::Ref container) - throw (); - - /** - * Constructor. - * - * @param container the container this metadata type is held in. - * @param dcName the Dublic Core metadata name. - * @param id3Tag the ID3v2 tag assciated with the metadata. - * @param localizationKey the key to get the localized name for - * the metadata - * @param tab in which tab to show this kind of metadata in the - * Upload File window (default: none of them). - */ - MetadataType(Ptr::Ref container, - Glib::ustring dcName, - Glib::ustring id3Tag, - Glib::ustring localizationKey, - TabType tab = noTab) - throw (); - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - - public: - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~MetadataType(void) throw () - { - } - - /** - * Return the Dublic Core name of the metadata type. - * - * @return the Dublic Core name of the metadata type. - */ - Ptr::Ref - getDcName(void) const throw () - { - return dcName; - } - - /** - * Return the ID3v2 tag name for the metadata type. - * - * @return the ID3v2 tag name for the metadata type, or a null - * pointer, if no ID3v2 tag exists for the metadata type. - */ - Ptr::Ref - getId3Tag(void) const throw () - { - return id3Tag; - } - - /** - * Return the localization key for the metadata type. - * - * @return the localization key for the metadata type. - */ - Ptr::Ref - getLocalizationKey(void) const throw () - { - return localizationKey; - } - - /** - * Return the localized name for the metadata type. - * - * @return the localized name for the metadata type. - * @exception std::invalid_argument if there is no localized - * name for this metadata type. - */ - Ptr::Ref - getLocalizedName(void) const throw (std::invalid_argument); - - /** - * Return the tab that this metadata type should appear in, - * when an audio clip is uploaded in the Studio client. - * - * @return the name of the tab for the metadata type. - */ - TabType - getTab(void) const throw () - { - return tab; - } - - /** - * Check that the given value satisfies the constraint. - * If the metadata type has no constraints, it returns true. - * If the constraint throws an exception, it returns false. - * - * @param value the value to be checked against the constraint. - * @return true if the value satisfies the constraint. - */ - bool - check(Ptr::Ref value) const throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_MetadataType_h - diff --git a/src/modules/core/include/LiveSupport/Core/MetadataTypeContainer.h b/src/modules/core/include/LiveSupport/Core/MetadataTypeContainer.h deleted file mode 100644 index e9782716d..000000000 --- a/src/modules/core/include/LiveSupport/Core/MetadataTypeContainer.h +++ /dev/null @@ -1,279 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_MetadataTypeContainer_h -#define LiveSupport_Core_MetadataTypeContainer_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/LocalizedObject.h" -#include "LiveSupport/Core/MetadataType.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Container holding MetadataType objects. - * - * This object has to be configured with an XML configuration element - * called metadataTypeContainer. This may look like the following: - * - *

- *  <metadataTypeContainer>
- *      <metadataType ... />
- *      <metadataType ... />
- *      ...
- *      <metadataType ... />
- *  </metadataTypeContainer>
- *  
- * - * The DTD for the expected XML element is the following: - * - *

- *  
- *  
- * - * For a description of the metadataType XML element, see the documentation - * for the MetadataType class. - * - * See the Studio config files for a list of all metadata types. - * - * @see MetadataType - */ -class MetadataTypeContainer : public Configurable, - public LocalizedObject, - public boost::enable_shared_from_this -{ - public: - /** - * A vector type holding contant MetadataType references. - */ - typedef std::vector::Ref> Vector; - - - private: - /** - * Map type for storing MetadataType objects by Glib::ustrings. - */ - typedef std::map::Ref> NameMap; - - /** - * The name of the configuration XML element used by - * MetadataTypeContainer. - */ - static const std::string configElementNameStr; - - /** - * A vector holding all MetadataType references. - */ - Vector vector; - - /** - * Map of MetadaType objects, stored by DC name. - */ - NameMap dcNameMap; - - /** - * Map of MetadaType objects, stored by ID3v2 tags. - */ - NameMap id3TagMap; - - - public: - /** - * Constructor. - * - * @param bundle the resource bundle holding the localized resources. - */ - MetadataTypeContainer(Ptr::Ref bundle) - throw () - : LocalizedObject(bundle) - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~MetadataTypeContainer(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Return an interator holding all MetadataType objects. - * The iterator holds objects of type Ptr::Ref. - * - * @return an iterator holding the available metadata types. - */ - Vector::const_iterator - begin(void) const throw () - { - return vector.begin(); - } - - /** - * Return an interator pointing to the end of MetadataType objects. - * The iterator holds objects of type Ptr::Ref. - * - * @return an iterator pointing to the end of metadata types. - */ - Vector::const_iterator - end(void) const throw () - { - return vector.end(); - } - - /** - * Tells if a MetadataType object exists with the specified - * Dublic Core name. - * - * @param dcName the DC name of the metadata type. - * @return true if a metadata type exists with the specified name, - * false otherwise - */ - bool - existsByDcName(const Glib::ustring dcName) const throw (); - - /** - * Return a MetadataType object, by Dublic Core name. - * - * @param dcName the DC name of the metadata type. - * @return a MetadataType object with the supplied DC name - * @exception std::invalid_argument if no metadata type exists - * with the suplied name. - */ - Ptr::Ref - getByDcName(const Glib::ustring dcName) - throw (std::invalid_argument); - - /** - * Tells if a MetadataType object exists with the specified - * ID3v2 tag. - * - * @param id3Tag the ID3v2 tag of the metadata type. - * @return true if a metadata type exists with the specified tag name, - * false otherwise - */ - bool - existsById3Tag(const Glib::ustring id3Tag) const throw (); - - /** - * Return a MetadataType object, by ID3v2 tag. - * - * @param id3Tag the ID3v2 tag of the metadata type. - * @return a MetadataType object with the supplied ID3v2 tag name. - * @exception std::invalid_argument if no metadata type exists - * with the suplied tag name. - */ - Ptr::Ref - getById3Tag(const Glib::ustring id3Tag) - throw (std::invalid_argument); - - /** - * Return a MetadataType object, by index. - * - * @param index the index of the item in the metadata container. - * @return the MetadataType object at the supplied index. - * @exception std::invalid_argument if the index is out of range. - */ - Ptr::Ref - getByIndex(unsigned int index) const - throw (std::invalid_argument); - - /** - * Check that the given value satisfies the constraint of a metadata - * type. - * If the metadata type has no constraints, it returns true. - * If the constraint throws an exception, it returns false. - * - * @param value the value to be checked against the constraint. - * @param dcName the metadata type, by its Dublin Core name. - * @return true if the value satisfies the constraint. - * @exception std::invalid_argument if no metadata type exists - * with the suplied name. - */ - bool - check(Ptr::Ref value, - const Glib::ustring & dcName) - throw (std::invalid_argument); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_MetadataTypeContainer_h - diff --git a/src/modules/core/include/LiveSupport/Core/Mutex.h b/src/modules/core/include/LiveSupport/Core/Mutex.h deleted file mode 100644 index ab4a47c6e..000000000 --- a/src/modules/core/include/LiveSupport/Core/Mutex.h +++ /dev/null @@ -1,142 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Mutex_h -#define LiveSupport_Core_Mutex_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A simple wrapper for pthread_mutex_t. - */ -class Mutex -{ - private: - /** - * The mutex object. - */ - pthread_mutex_t * mutex; - - - public: - /** - * Default constructor. - */ - Mutex(void) throw () - { - mutex = new pthread_mutex_t; - pthread_mutex_init(mutex, NULL); - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Mutex(void) throw () - { - pthread_mutex_destroy(mutex); - } - - /** - * Lock the mutex. - * If the mutex is already locked, it blocks until it becomes free. - */ - void - lock(void) throw () - { - pthread_mutex_lock(mutex); - } - - /** - * Unlock a mutex. - */ - void - unlock(void) throw () - { - pthread_mutex_unlock(mutex); - } - - /** - * Try to lock a mutex. - * If the mutex is already locked, it returns false. - * - * @return true if the mutex was successfully locked; false otherwise. - */ - bool - tryLock(void) throw () - { - return (pthread_mutex_trylock(mutex) == 0); - } - - /** - * Try to lock a mutex. - * If the mutex is already locked, it returns false. - * - *` @param errorCode return parameter for the error code; - * 0 for no error. - * @return true if the mutex was successfully locked; false otherwise. - */ - bool - tryLock(int & errorCode) throw () - { - errorCode = pthread_mutex_trylock(mutex); - return (errorCode == 0); - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - - -#endif // LiveSupport_Core_Mutex_h - diff --git a/src/modules/core/include/LiveSupport/Core/NumericTools.h b/src/modules/core/include/LiveSupport/Core/NumericTools.h deleted file mode 100644 index d883d60cc..000000000 --- a/src/modules/core/include/LiveSupport/Core/NumericTools.h +++ /dev/null @@ -1,100 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_NumericTools_h -#define LiveSupport_Core_NumericTools_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A toolbox for various small numeric functions. - */ -class NumericTools -{ - public: - - /** - * Convert an integer to a string. - * - * @param number the number to be converted. - * @return the string value of the number (in base 10). - */ - static Glib::ustring - itoa(int number) throw (); - - /** - * Add a number to the end of a string. - * This is used in various GUI classes, to generate Glade widget - * names like "itemLabel1", "itemLabel2" etc. - * - * NOTE: the index parameter is 0-based (because this - * is normal in C++, for containers etc), but the return value is - * 1-based (because this is what Glade expects)! - * Thus addIndex("itemLabel", 0) returns "itemLabel1". - * - * @param baseString the string without the index. - * @param index the index to be added to the string (0-based). - * @return the new string, with the index added at the end (1-based). - */ - static Glib::ustring - addIndex(const Glib::ustring & baseString, - int index) throw (); -}; - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_NumericTools_h - diff --git a/src/modules/core/include/LiveSupport/Core/OptionsContainer.h b/src/modules/core/include/LiveSupport/Core/OptionsContainer.h deleted file mode 100644 index e45847d86..000000000 --- a/src/modules/core/include/LiveSupport/Core/OptionsContainer.h +++ /dev/null @@ -1,329 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author $ - Version : $Revision $ - Location : $URL $ - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_OptionsContainer_h -#define LiveSupport_Core_OptionsContainer_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/RdsContainer.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A container for the options in gLiveSupport.xml. - * - * It supports a number of named string options (see OptionItemString), - * plus two special kinds of options: keyboard shortcuts, and RDS strings. - * - * @author $Author $ - * @version $Revision $ - */ -class OptionsContainer -{ - public: - /** - * The list of string options one can set. - * - * These are options of type Glib::ustring; any string is accepted - * as value, no range checking is done. - */ - typedef enum { outputPlayerDeviceName, - cuePlayerDeviceName, - authenticationServer, - authenticationPort, - authenticationPath, - storageServer, - storagePort, - storagePath, - schedulerServer, - schedulerPort, - schedulerPath, - serialDeviceName } OptionItemString; - - - private: - /** - * The XML document containing the options. - */ - xmlpp::Document optionsDocument; - - /** - * The file name (including path) used by writeToFile(). - */ - Ptr::Ref configFileName; - - /** - * Remember if we have been touched. - */ - bool touched; - - /** - * Container for the RDS settings. - */ - Ptr::Ref rdsContainer; - - /** - * Default constructor. - */ - OptionsContainer(void) throw () - { - } - - /** - * Find the node corresponding to an OptionItemString value. - * - * If there is no matching node, it returns a 0 pointer. - * - * @param optionItem the name of the item to find the node for - * @param isAttribute return parameter; is set to true if the - * node is an attribute, false if it's - * a CDATA text - * @return a pointer to the node found, or 0 - * @exception std::invalid_argument thrown by getNode() [should - * never happen] - */ - xmlpp::Node * - selectNode(OptionItemString optionItem, - bool & isAttribute) - throw (std::invalid_argument); - - /** - * Find the node corresponding to a keyboard shortcut. - * - * If there is no matching node, it returns a 0 pointer. - * - * @param containerNo the number of the KeyboardShortcutContainer - * (starting with 1, as per XPath) - * @param shortcutNo the number of the KeyboardShortcut within - * this container (also starting with 1) - * @return a pointer to the node found, or 0 - * @exception std::invalid_argument thrown by getNode() [should - * never happen] - */ - xmlpp::Node * - selectKeyboardShortcutNode(int containerNo, - int shortcutNo) - throw (std::invalid_argument); - - /** - * Return the first node matching an XPath string. - * - * If there is no matching node, it returns a 0 pointer. - * - * @param xPath the XPath of the node (from the root node) - * @return a pointer to the node found, or 0 - * @exception std::invalid_argument if the XPath is not well formed - */ - xmlpp::Node * - getNode(const Glib::ustring & xPath) - throw (std::invalid_argument); - - /** - * Create a node corresponding to an option item. - * - * So far, this is only implemented for serialDeviceName; - * for all other option items, it returns a 0 pointer. - * The XML element or attribute is created with a value of "". - * - * TODO: implement this properly; ideally, the paths would be read - * from the DTD of the default config file, and added to the current - * config file as needed. - * - * @param optionItem the option item to be created. - * @return a pointer to the node created, or 0. - */ - xmlpp::Node * - createNode(OptionItemString optionItem) throw (); - - - public: - /** - * Constructor with XML element parameter. - * - * @param optionsElement the XML element containing the options - * @param configFileName the name (with path) of the configuration - * file used by writeToFile() - * @see writeToFile() - */ - OptionsContainer(const xmlpp::Element & optionsElement, - Ptr::Ref configFileName) - throw (); - - /** - * Report if the object has been touched. - * - * It returns true if there has been any calls to setOptionItem() - * since its construction or the last call to writeToFile(). - * - * @return whether the options have been touched - */ - bool - isTouched(void) throw () - { - return touched || (rdsContainer && rdsContainer->isTouched()); - } - - /** - * Set a string type option. - * - * @param optionItem which option to set - * @param value the new value of the option - * @exception std::invalid_argument if the option name is not found - */ - void - setOptionItem(OptionItemString optionItem, - Ptr::Ref value) - throw (std::invalid_argument); - - /** - * Get a string type option. - * - * @return the value of the option - * @exception std::invalid_argument if the option name is not found - */ - Ptr::Ref - getOptionItem(OptionItemString optionItem) - throw (std::invalid_argument); - - /** - * Set a keyboard shortcut type option. - * - * @param containerNo which container to modify - * @param shortcutNo which shortcut to modify within this - * container - * @param value the name of the new shortcut key - * @exception std::invalid_argument if the shortcut is not found - */ - void - setKeyboardShortcutItem(int containerNo, - int shortcutNo, - Ptr::Ref value) - throw (std::invalid_argument); - - /** - * Set the value of the RDS options. - * The key can be any of the RDS data codes, like PS, PI, PTY, RT, - * etc. If there is already a value set for this code, it gets - * overwritten, otherwise a new key-value pair is added. - * - * @param key which setting to modify - * @param value the new value of the RDS setting - * @param enabled the new enabled/disabled state of the - * RDS setting - */ - void - setRdsOptions(Ptr::Ref key, - Ptr::Ref value, - bool enabled) throw (); - - /** - * Get the value of an RDS string. - * The key can be any of the RDS data codes, like PS, PI, PTY, RT, - * etc. - * - * @param key which setting to modify - * @return the value of the RDS setting - * @exception std::invalid_argument if there is no such RDS option. - */ - Ptr::Ref - getRdsValue(Ptr::Ref key) - throw (std::invalid_argument); - - /** - * Get the enabled/disabled state of an RDS option. - * - * @param key which setting to modify - * @return true if the RDS option is enabled, false otherwise. - * @exception std::invalid_argument if there is no such RDS option. - */ - bool - getRdsEnabled(Ptr::Ref key) - throw (std::invalid_argument); - - /** - * Get a string containing all the RDS values. - * This string can be sent to the RDS encoder. - * - * @return a string which can be sent to the RDS encoder; - * a 0 pointer if no RDS options have been defined. - */ - Ptr::Ref - getCompleteRdsString(void) throw () - { - return rdsContainer ? rdsContainer->toString() - : Ptr::Ref(); - } - - /** - * Save the options to a file. - * - * This writes the options in XML format to the file specified in the - * constructor. The directory must already exist (it's OK if the file - * does not), otherwise nothing is written. - */ - void - writeToFile(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_OptionsContainer_h - diff --git a/src/modules/core/include/LiveSupport/Core/PlayLogEntry.h b/src/modules/core/include/LiveSupport/Core/PlayLogEntry.h deleted file mode 100644 index 4618190b2..000000000 --- a/src/modules/core/include/LiveSupport/Core/PlayLogEntry.h +++ /dev/null @@ -1,161 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_PlayLogEntry_h -#define LiveSupport_Core_PlayLogEntry_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" - - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing a play log entry. - * PlayLogEntries contain information about the audio clips played. - */ -class PlayLogEntry -{ - private: - /** - * The unique id of the play log entry. - */ - Ptr::Ref id; - - /** - * The id of the audio clip referenced by this play log entry. - */ - Ptr::Ref audioClipId; - - /** - * The time this audio clip was played. - */ - Ptr::Ref timestamp; - - - public: - /** - * Default constructor. - */ - PlayLogEntry(void) throw () - { - } - - /** - * Create a play log entry by specifying all details. - * - * @param id the ID of the play log entry. - * @param audioClipId the ID of the audio clip logged - * @param timestamp the time this audio clip was played. - */ - PlayLogEntry(Ptr::Ref id, - Ptr::Ref audioClipId, - Ptr::Ref timestamp) throw() - { - this->id = id; - this->audioClipId = audioClipId; - this->timestamp = timestamp; - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~PlayLogEntry(void) throw () - { - } - - /** - * Return the ID of the play log entry. - * - * @return the unique ID of the play log entry. - */ - Ptr::Ref - getId(void) const throw () - { - return id; - } - - /** - * Return the ID of the audio clip referenced by this entry. - * - * @return the unique ID of the audio clip. - */ - Ptr::Ref - getAudioClipId(void) const throw () - { - return audioClipId; - } - - /** - * Return the time this audio clip was played. - * - * @return the the time the audio clip was played. - */ - Ptr::Ref - getTimestamp(void) const throw () - { - return timestamp; - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_PlayLogEntry_h - diff --git a/src/modules/core/include/LiveSupport/Core/Playable.h b/src/modules/core/include/LiveSupport/Core/Playable.h deleted file mode 100644 index 3be9ae49b..000000000 --- a/src/modules/core/include/LiveSupport/Core/Playable.h +++ /dev/null @@ -1,307 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Playable_h -#define LiveSupport_Core_Playable_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" -#include "LiveSupport/Core/Configurable.h" - - -namespace LiveSupport { -namespace Core { - -class AudioClip; // forward declarations to avoid circularity -class Playlist; - -using namespace boost::posix_time; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An abstract class which is extended by AudioClip and Playlist. - * It contains the methods which are common to these classes. - */ -class Playable : public boost::enable_shared_from_this -{ - public: - - /** - * The sub-types a Playable object can belong to. - */ - enum Type { AudioClipType, PlaylistType }; - - private: - - /** - * The type of this playable object (audio clip or playlist). - */ - Type type; - - protected: - - /** - * Only my children are allowed to instantiate me. - * - * @param typeParam either AudioClipType or PlaylistType. - */ - Playable(Type typeParam) throw () - : type(typeParam) - { - } - - - public: - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Playable(void) throw () - { - } - - /** - * Return the id of the audio clip or playlist. - * - * @return the unique id of the audio clip or playlist. - */ - virtual Ptr::Ref - getId(void) const throw () = 0; - - /** - * Return the total playing length for this audio clip or playlist. - * - * @return the playing length in microseconds. - */ - virtual Ptr::Ref - getPlaylength(void) const throw () = 0; - - - /** - * Return the URI of the sound file of this audio clip or - * playlist, which can be played by the audio player. This - * sound file can be an mp3 or a SMIL file. - * - * @return the URI. - */ - virtual Ptr::Ref - getUri(void) const throw () = 0; - - /** - * Set the URI of the sound file of this audio clip or - * playlist, which can be played by the audio player. This - * sound file can be an mp3 or a SMIL file. - * - * @param uri the new URI. - */ - virtual void - setUri(Ptr::Ref uri) throw () = 0; - - - /** - * Return the token which is used to identify this audio clip - * or playlist to the storage server. - * - * The token is set when the Playable object is acquired and - * unset (made null again) when it is released. - * - * @return the token. - */ - virtual Ptr::Ref - getToken(void) const throw () = 0; - - /** - * Set the token which is used to identify this audio clip - * or playlist to the storage server. - * - * The token is set when the Playable object is acquired and - * unset (made null again) when it is released. - * - * @param token a new token. - */ - virtual void - setToken(Ptr::Ref token) - throw () = 0; - - - /** - * Return the title of this audio clip or playlist. - * - * @return the title. - */ - virtual Ptr::Ref - getTitle(void) const throw () = 0; - - /** - * Set the title of this audio clip or playlist. - * - * @param title a new title. - */ - virtual void - setTitle(Ptr::Ref title) - throw () = 0; - - - /** - * Return the value of a metadata field in this audio clip or playlist. - * If the playable does not have this metadata field, returns a null - * pointer. - * - * @param key the name of the metadata field - * @return the value of the metadata field; 0 if there is - * no such field; - */ - virtual Ptr::Ref - getMetadata(const std::string &key) const - throw () = 0; - - /** - * Set the value of a metadata field in this audio clip or playlist. - * - * @param value the new value of the metadata field. - * @param key the name of the metadata field - * @exception std::invalid_argument if the key is dcterms:extent, - * but the value is not a valid ISO-8601 time - */ - virtual void - setMetadata(Ptr::Ref value, - const std::string &key) - throw (std::invalid_argument) - = 0; - - /** - * Return a partial XML representation of this audio clip or playlist. - * - * This is a string containing a single or - * XML element, with minimal information (ID, title, playlength) - * only, without an XML header or any other metadata. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * @return a string representation of the audio clip as an XML element - */ - virtual Ptr::Ref - getXmlElementString(void) const throw () = 0; - - - /** - * Return a complete XML representation of this audio clip or playlist. - * - * This is a string containing a an XML document with an - * or root node, together with an XML header and a - * element (in the case of playlists, for the outermost - * playlist only). - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * The audio clip or playlist can be reconstructed from - * the string returned by this method: - *

-         *  Ptr::Ref         audioClip1 = ... something ...;
-         *  Ptr::Ref  parser;
-         *  parser->parse_memory(*audioClip1->getXmlDocumentString());
-         *  const xmlpp::Document*      document = parser->get_document();
-         *  const xmlpp::Element*       root     = document->get_root_node();
-         *  Ptr::Ref         audioClip2(new AudioClip());
-         *  audioClip2->configure(*root);
-         *  
- * results in two identical audio clips (this works for playlists, - * too, but see the note at Playlist::getXmlDocumentString()). - * - * @return a string representation of the audio clip as an XML document - */ - virtual Ptr::Ref - getXmlDocumentString(void) const throw () = 0; - - - /** - * Return the type of this object. - * - * @return either AudioClipType or PlaylistType. - */ - Type - getType(void) const throw () - { - return type; - } - - /** - * Return an audio clip pointer to this object. If the object's - * type is not AudioClipType, returns a zero pointer. - * - * @see getType() - * @return an audio clip pointer to this object. - */ - Ptr::Ref - getAudioClip(void) throw (); - - /** - * Return a playlist pointer to this object. If the object's - * type is not PlaylistType, returns a zero pointer. - * - * @see getType() - * @return a playlist pointer to this object. - */ - Ptr::Ref - getPlaylist(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Playable_h - diff --git a/src/modules/core/include/LiveSupport/Core/Playlist.h b/src/modules/core/include/LiveSupport/Core/Playlist.h deleted file mode 100644 index 8b5ba3537..000000000 --- a/src/modules/core/include/LiveSupport/Core/Playlist.h +++ /dev/null @@ -1,927 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Playlist_h -#define LiveSupport_Core_Playlist_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/Playable.h" -#include "LiveSupport/Core/PlaylistElement.h" - - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing playlist. - * Playlist are containers for AudioClips, with the additional - * information of when and how each audio clip is played inside - * the playlist. - * - * This object has to be configured with an XML configuration element - * called playlist. This may look like the following: - * - *

- *  <playlist id="0000000000000001"
- *            title="My Playlist" 
- *            playlength="00:18:30.000000">
- *      <playlistElement> ... </playlistElement>
- *      ...
- *      <playlistElement> ... </playlistElement>
- *      <metadata xmlns="http://mdlf.org/livesupport/elements/1.0/"
- *                 xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
- *                 xmlns:dc="http://purl.org/dc/elements/1.1/"
- *                 xmlns:dcterms="http://purl.org/dc/terms/"
- *                 xmlns:xml="http://www.w3.org/XML/1998/namespace">
- *          <dc:title>File Title txt</dc:title>
- *          <dcterms:extent>00:02:30.000000</dcterms:extent>
- *          ...
- *      </metadata>
- *  </playlist>
- *  
- * - * The DTD for the above element is: - * - *

- *  <!ELEMENT playlist (playlistElement*, metadata?) >
- *  <!ATTLIST playlist  id           NMTOKEN    #REQUIRED >
- *  <!ATTLIST playlist  title        CDATA      ""        >
- *  <!ATTLIST playlist  playlength   NMTOKEN    #IMPLIED  >
- *  
- * - * For detais of the playlistElement element, see the documentation - * for the PlaylistElement class. - * - * The metadata element is optional. The configure() method - * sets only those fields which had not been set previously: e.g., if we set - * some or all fields of the Playlist in the constructor, then these fields - * in the XML element will be ignored by configure(). - * The title attribute and the <dc:title> - * element set the same field; if both are present, the title is set from - * the attribute and the element is ignored.. - * The same is true for the playlength attribute and the - * <dcterms:extent> element. - * - * It is required that by the end of the configure() method, the playlength - * is set somehow (from a constructor, the attribute or the element). - * If the title is not set by the end of the configure() method, it is then - * set to the empty string. - * - * A Playlist can be of various kinds, depending on what we want to use it - * for, and how we got it from the StorageClientInterface: - *
    - *
  • A playlist obtained by getPlaylist() has its uri, - * token and editToken fields all unset - * (i.e., null). Such playlists contain sub-playlists which - * are just stubs, i.e., id, title, playlength triples, - * without actual references to its content objects.
  • - *
  • A playlist obtained by acquirePlaylist() has its uri - * and token fields set, but its editToken - * field unset. These are complete Playlist objects, and their - * sub-playlists contain references to all their sub-objects etc. - * The sub-playlists have their uri fields set, which - * allows them to be played by the audio player, but their - * token field is unset, because these sub-playlists - * are acquired and will be released recursively when the outermost - * playlist containing them is acquired and released.
  • - *
  • A playlist obtained by editPlaylist() has its editToken - * field set (but uri and token unset). - * The sub-playlists of these are also just stubs.
  • - *
- * - * The playlists are stored by the storage server in the format returned by - * the getXmlDocumentString() function: - *
    - *
  • The outermost <playlist> has an id attribute, - * a list of <playlistElement> children - * and a <metadata> child.
  • - *
  • Each <playlistElement> has an id - * and a relativeOffset attribute, - * either a <playlist> or an <audioClip> child, - * and optionally a <fadeInfo> child.
  • - *
  • Each <playlist> and <audioClip> has id, title - * and playlength attributes (and no children).
  • - *
  • Each <fadeInfo> has fadeIn and fadeOut attributes - * (and no children).
  • - *
  • The <metadata> element contains all the metadata of - * the outermost playlist. - * The dc:title and dcterms:extent elements are compulsory, - * everything else is optional.
  • - *
- * An example: - * - *

- *  <playlist id="0000000000000001">
- *      <playlistElement id="0000000000000101"
- *                       relativeOffset="00:00:00.000000">
- *          <audioClip id="0000000000010001" 
- *                    title="My Audio Clip"
- *                    playlength="00:02:30.000000"/>
- *          <fadeInfo id="0000000000009901" 
- *                    fadeIn="00:00:02.000000"
- *                    fadeOut="00:00:01.500000"/>
- *      </playlistElement>
- *      <playlistElement id="0000000000000102"
- *                       relativeOffset="00:02:30.000000">
- *          <playlist id="0000000000000002" 
- *                    title="Embedded Playlist"
- *                    playlength="00:18:30.000000"/>
- *      </playlistElement>
- *      <metadata xmlns="http://mdlf.org/livesupport/elements/1.0/"
- *                xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
- *                xmlns:dc="http://purl.org/dc/elements/1.1/"
- *                xmlns:dcterms="http://purl.org/dc/terms/"
- *                xmlns:xml="http://www.w3.org/XML/1998/namespace">
- *          <dc:title>My Playlist</dc:title>
- *          <dcterms:extent>00:21:00.000000</dcterms:extent>
- *          ...
- *      </metadata>
- *  </playlist>
- *  
- * - */ -class Playlist : public Configurable, - public Playable -{ - private: - /** - * The name of the configuration XML elmenent used by Playlist. - */ - static const std::string configElementNameStr; - - /** - * The unique id of the playlist. - */ - Ptr::Ref id; - - /** - * The title of the playlist. - */ - Ptr::Ref title; - - /** - * The playling length of the playlist. - */ - Ptr::Ref playlength; - - /** - * The uri of the SMIL file generated from this playlist (if any). - */ - Ptr::Ref uri; - - /** - * The token given to this playlist by the storage server when - * the playlist is acquired; removed when it is released. - */ - Ptr::Ref token; - - /** - * The token given to this playlist by the storage server when - * it is opened for editing; removed when it is saved or reverted. - */ - Ptr::Ref editToken; - - /** - * A map type for storing the playlist elements associated with - * this playlist, indexed by their relative offsets. - */ - typedef std::multimap::Ref> - PlaylistElementListType; - - /** - * The list of playlist elements for this playlist. - */ - Ptr::Ref elementList; - - /** - * A saved copy of this playlist. - */ - Ptr::Ref savedCopy; - - - /** - * This playlist in XML format. - */ - Ptr::Ref xmlPlaylist; - - /** - * Set the value of a metadata field in this playlist. - * - * @param value the new value of the metadata field. - * @param name the name of the metadata field (without prefix) - * @param prefix the prefix of the metadata field - * @exception std::invalid_argument if the key is dcterms:extent, - * but the value is not a valid ISO-8601 time - */ - void - setMetadata(Ptr::Ref value, - const std::string &name, const std::string &prefix) - throw (std::invalid_argument); - - /** - * Set the total playing length of this playlist. - * - * @param playlength the playing length in microseconds precision. - */ - void - setPlaylength(Ptr::Ref playlength) - throw (); - - /** - * Set the playlength member of this audio clip. - * - * @param timeString the playing length in microseconds precision. - * @exception std::invalid_argument if the argument is not - * a valid ISO-8601 time - */ - void - setPlaylength(Ptr::Ref timeString) - throw (std::invalid_argument); - - /** - * A private iterator type for internal use. It is non-constant; - * otherwise it is the same as Playlist::const_iterator. - */ - typedef PlaylistElementListType::iterator iterator; - - /** - * Get an iterator pointing to a playlist element with a given ID. - * - * @param playlistElementId (a pointer to) the ID of the - * playlist element. - * @return an iterator to the playlist element if it exists, - * or this->end() if it does not. - */ - iterator - find(Ptr::Ref playlistElementId) - throw (); - - /** - * Convert a time_duration to string, in format HH:MM:SS.ssssss. - */ - std::string - toFixedString(Ptr::Ref time) const - throw () - { - if (time->fractional_seconds()) { - return to_simple_string(*time); - } else { - return to_simple_string(*time) + ".000000"; - } - } - - - public: - /** - * Copy constructor. - * - * @param otherPlaylist the playlist to be copied - */ - Playlist(const Playlist & otherPlaylist) - throw (); - - /** - * Default constructor. - * - * NOTE: this constructor creates a Playlist with a null pointer - * for both the ID and the playlength fields! It is meant for - * internal use only. - * - * If you want to create an empty Playlist, use the storage client: - *

-         *  Ptr::Ref
-         *          storageClientFactory = StorageClientFactory::getInstance();
-         *  Ptr::Ref
-         *          storageClient = storageClientFactory->getStorageClient();
-         *  Ptr::Ref
-         *          playlist = storageClient->createPlaylist(sessionId);
-         *  
- * - * @see StorageClient::StorageClientFactory - * @see StorageClient::StorageClientInterface - */ - Playlist(void) throw () - : Playable(PlaylistType) - { - elementList.reset(new PlaylistElementListType); - } - - /** - * Create a playlist by specifying its ID only. - * - * For internal use; see the note at the default constructor. - */ - Playlist(Ptr::Ref id) throw () - : Playable(PlaylistType) - { - this->id = id; - - elementList.reset(new PlaylistElementListType); - } - - /** - * Create a playlist by specifying all details, except the title. - * - * This is used for testing purposes; - * see the note at the default constructor. - * - * @param id the id of the playlist. - * @param playlength the playing length of the playlist. - * @param uri the location of the SMIL file representing this - * playlist (optional) - */ - Playlist(Ptr::Ref id, - Ptr::Ref playlength, - Ptr::Ref uri = Ptr::Ref()) - throw (); - - /** - * Create a playlist by specifying all details. - * - * This is used for testing purposes; - * see the note at the default constructor. - * - * @param id the id of the playlist. - * @param title the title of the playlist. - * @param playlength the playing length of the playlist. - * @param uri the location of the SMIL file representing this - * playlist (optional) - */ - Playlist(Ptr::Ref id, - Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri = Ptr::Ref()) - throw (); - - /** - * Convert the playlist to an XmlRpcValue (marshalling). - * - * @return an XmlRpcValue struct, containing a - * field named playlist, with value of type string, - * which contains an XML document representing the playlist. - */ - operator XmlRpc::XmlRpcValue() const - throw (); - - /** - * Construct a playlist from an XmlRpcValue (demarshalling). - * - * @param xmlRpcValue an XmlRpcValue struct, containing a - * field named playlist, with value of type string, - * which contains an XML document, the root node of which - * can be passed to the configure() method. - * @exception std::invalid_argument if the argument is invalid - */ - Playlist(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Playlist(void) throw () - { - } - - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuraiton information - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Return the id of the playlist. - * - * @return the unique id of the playlist. - */ - virtual Ptr::Ref - getId(void) const throw () - { - return id; - } - - - /** - * Return the title of this playlist. - * - * @return the title. - */ - virtual Ptr::Ref - getTitle(void) const throw () - { - return title; - } - - /** - * Set the title of this playlist. - * - * @param title a new title. - */ - virtual void - setTitle(Ptr::Ref title) - throw (); - - - /** - * Return the total playing length for this playlist. - * - * @return the playing length in microseconds precision. - */ - virtual Ptr::Ref - getPlaylength(void) const throw () - { - return playlength; - } - - /** - * Return the URI of the SMIL file created from this - * playlist, which can be played by the audio player. - * - * @return the URI. - */ - virtual Ptr::Ref - getUri(void) const throw () - { - return uri; - } - - /** - * Set the URI of the SMIL file created from this - * playlist, which can be played by the audio player. - * - * @param uri the new URI. - */ - virtual void - setUri(Ptr::Ref uri) throw () - { - this->uri = uri; - } - - /** - * Return the token which is used to identify this - * playlist to the storage server. - * - * The token is set when the Playable object is acquired and - * unset (made null again) when it is released. - * - * @return the token. - */ - virtual Ptr::Ref - getToken(void) const throw () - { - return token; - } - - /** - * Set the token which is used to identify this - * playlist to the storage server. - * - * The token is set when the Playable object is acquired and - * unset (made null again) when it is released. - * - * @param token a new token. - */ - virtual void - setToken(Ptr::Ref token) - throw () - { - this->token = token; - } - - /** - * Return the token which is used to identify this - * playlist to the storage server. - * - * The edit token is set when the Playable object is opened for - * editing and unset (made null again) when it is saved or reverted. - * - * @return the token. - */ - virtual Ptr::Ref - getEditToken(void) const throw () - { - return editToken; - } - - /** - * Set the token which is used to identify this - * playlist to the storage server. - * - * The edit token is set when the Playable object is opened for - * editing and unset (made null again) when it is saved or reverted. - * - * @param token a new token. - */ - virtual void - setEditToken(Ptr::Ref token) - throw () - { - this->editToken = token; - } - - /** - * Test whether the playlist is locked for editing. - * - * @return true if the playlist is currently being edited - */ - bool - isLocked() const throw () - { - return (editToken.get() != 0); - } - - - /** - * The iterator type for this class. A Playlist::const_iterator - * is a (constant) pointer to a pair < time_duration, - * Ptr<PlaylistElement>::Ref >. - * If it is such an iterator, then it->second - * is the playlist element referenced by the iterator, and - * it->first is its relative offset in the playlist. - * The playlist elements are listed in the order of their relative - * offset (starting time). - * - * @see begin(), end(), find() - */ - typedef PlaylistElementListType::const_iterator const_iterator; - - /** - * Get an iterator pointing to the first playlist element. - */ - const_iterator - begin() const throw () - { - return elementList->begin(); - } - - /** - * Get an iterator pointing to one after the last playlist element. - */ - const_iterator - end() const throw () - { - return elementList->end(); - } - - /** - * Get an iterator pointing to the first playlist element at a given - * relative offset. - * - * @param relativeOffset (a pointer to) the relative offset where - * the playlist element is. - * @return a constant iterator to the playlist element if it exists, - * or this->end() if it does not. - */ - const_iterator - find(Ptr::Ref relativeOffset) const - throw () - { - return elementList->find(*relativeOffset); - } - - /** - * Return the number of playlist elements in the playlist. - */ - int - size() const throw () - { - return elementList->size(); - } - - /** - * Add a new audio clip or sub-playlist to the playlist. - * - * Checks the type of the playlist, and calls either addAudioClip() - * or addPlaylist(). - * - * @param playable the new playable item to be added - * @param relativeOffset the start of the playable item, relative - * to the start of the playlist - * @param fadeInfo the fade in / fade out info (optional) - * @return the ID of the new PlaylistElement - * @exception std::invalid_argument if playable is neither an AudioClip - * nor a Playlist - */ - Ptr::Ref - addPlayable(Ptr::Ref playable, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (std::invalid_argument); - - /** - * Add a new audio clip to the playlist. - * - * The playlist is not checked for gaps (use valid() for that), - * but the playlength is adjusted if the new audio clip is added - * at the end of the playlist. - * - * @param audioClip the new audio clip to be added - * @param relativeOffset the start of the audio clip, relative - * to the start of the playlist - * @param fadeInfo the fade in / fade out info (optional) - * @return the ID of the new PlaylistElement - */ - Ptr::Ref - addAudioClip(Ptr::Ref audioClip, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (); - - /** - * Add a new sub-playlist to the playlist. - * - * The playlist is not checked for gaps (use valid() for that), - * but the playlength is adjusted if the new sub-playlist is added - * at the end of the playlist. - * - * @param playlist the sub-playlist to be added - * @param relativeOffset the start of the sub-playlist, relative - * to the start of the containing playlist - * @param fadeInfo the fade in / fade out info (optional) - * @return the ID of the new PlaylistElement - */ - Ptr::Ref - addPlaylist(Ptr::Ref playlist, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (); - - /** - * Add a new playlist element to the playlist. - * - * @param playlistElement the new playlist element to be added - */ - void - addPlaylistElement(Ptr::Ref playlistElement) - throw (); - - /** - * Set the fade in / fade out info for a playlist element. - * - * @param playlistElementId the ID of the playlist element - * @param fadeInfo the new fade in / fade out info - * @exception std::invalid_argument if there is no playlist element - * at the given relative offset - */ - void - setFadeInfo(Ptr::Ref playlistElementId, - Ptr::Ref fadeInfo) - throw (std::invalid_argument); - - /** - * Set clipStart for a playlist element. - * - */ - void - setClipStart(Ptr::Ref playlistElementId, - Ptr::Ref newStart) - throw (std::invalid_argument); - - /** - * Set clipEnd for a playlist element. - * - */ - void - setClipEnd(Ptr::Ref playlistElementId, - Ptr::Ref newEnd) - throw (std::invalid_argument); - - /** - * Remove a playlist element from the playlist. - * - * @param playlistElementId the ID of the playlist element - * @exception std::invalid_argument if the playlist element does not - * exist - */ - void - removePlaylistElement(Ptr::Ref playlistElementId) - throw (std::invalid_argument); - - /** - * Check if the playlist is valid. - * - * This means that - *
    - *
  • there are no gaps between the playlist elements - * (overlaps are allowed); and
  • - *
  • the length of the playlist is equal - * to the ending time of the last item in it.
  • - *
- * - * This is checked for the playlist itself, and all sub-playlists - * contained inside it. - * - * NOTE: all kinds of overlaps are allowed. - * TODO: restrict it somehow? - */ - bool - valid(void) const throw (); - - - /** - * Create a saved copy of this playlist. If a saved copy exists - * already, it is replaced by the current state. - */ - void - createSavedCopy(void) throw (); - - /** - * Delete the saved copy of the playlist, if exists (or do nothing). - */ - void - deleteSavedCopy(void) throw () - { - savedCopy.reset(); - } - - /** - * Revert to the saved copy of this playlist. If there is no - * saved copy, do nothing and throw an exception. - */ - void - revertToSavedCopy(void) throw (std::invalid_argument); - - - /** - * Return the value of a metadata field in this playlist. - * If the playlist does not have this metadata field, returns a null - * pointer. - * - * @param key the name of the metadata field - * @return the value of the metadata field; 0 if there is - * no such field; - */ - virtual Ptr::Ref - getMetadata(const std::string &key) const - throw (); - - /** - * Set the value of a metadata field in this playlist. - * - * @param value the new value of the metadata field. - * @param key the name of the metadata field - * @exception std::invalid_argument if the key is dcterms:extent, - * but the value is not a valid ISO-8601 time - */ - virtual void - setMetadata(Ptr::Ref value, - const std::string &key) - throw (std::invalid_argument); - - - /** - * Return a partial XML representation of this audio clip or playlist. - * - * This is a string containing a single <playlist> - * XML element, with minimal information { id, title, playlength } - * only, without an XML header or any other metadata. - * It does not contain the list of playlist elements in the playlist. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * @return a string representation of the playlist as an XML element - */ - virtual Ptr::Ref - getXmlElementString(void) const throw (); - - - /** - * Return a complete XML representation of this playlist. - * - * This is a string containing a an XML document with a - * <playlist> root node, together with an XML header and a - * <metadata> element (for the outermost playlist only). - * - * The playlist elements listed are only stubs returned by - * getXmlElementString(), i.e., { id, title, playlength } triples, - * without their contents. See the more detailed description at - * the top of this page. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * The uri, token and editToken fields are not - * part of the XML document string returned. - * - * @return a string representation of the playlist as an XML document - */ - virtual Ptr::Ref - getXmlDocumentString(void) const throw (); - - - /** - * Eliminate the gaps in the playlist. - * - * If there is a 2s gap between elements 2 and 3, then elements 3, - * 4, etc. are moved to 2s earlier. Elements 2 and 3 will not - * overlap, even if the first has a fade-out and the second has a - * fade-in. - * - * @return true if some gaps have been found and eliminated - */ - virtual bool - eliminateGaps(void) throw (); - - /** - * Find the playlist element at the specified offset. - * - * This is used by the Master Panel to display the contents - * of the currently playing Playlist. - * When there are more than one playlist elements at the given - * offset, the one with the greatest relativeOffset is chosen. - * Can return a 0 pointer if there is no playlist element at - * the given offset. - * - * @param offset the elapsed time relative to the Playlist. - * @return the playlist element at the given offset. - */ - Ptr::Ref - findAtOffset(Ptr::Ref offset) const - throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Playlist_h - diff --git a/src/modules/core/include/LiveSupport/Core/PlaylistElement.h b/src/modules/core/include/LiveSupport/Core/PlaylistElement.h deleted file mode 100644 index 6a72d53b1..000000000 --- a/src/modules/core/include/LiveSupport/Core/PlaylistElement.h +++ /dev/null @@ -1,475 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_PlaylistElement_h -#define LiveSupport_Core_PlaylistElement_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" -#include "LiveSupport/Core/Configurable.h" -#include "LiveSupport/Core/Playable.h" -#include "LiveSupport/Core/AudioClip.h" -#include "LiveSupport/Core/Playlist.h" -#include "LiveSupport/Core/FadeInfo.h" - - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -// forward declaration to avoid circular reference -class Playlist; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An item in a Playlist, consisting of an AudioClip or another Playlist - * and optional FadeInfo (fade in / fade out information). - * - * The contents of the playlist element can be accessed either by calling - * getPlayable(), or, if a specific type of element is needed, by checking - * getType() first, and then calling either getAudioClip() or getPlaylist(). - * - * This object has to be configured with an XML configuration element - * called playlistElement. This may look like the following: - * - *

- *  <playlistElement id="707" relativeOffset="00:12:34.000000" >
- *      <audioClip> ... </audioClip>
- *      <fadeInfo> ... </fadeInfo>
- *  </playlist>
- *  
- * - * For detais of the audioClip and fadeInfo elements, see the documentation - * for the AudioClip and FadeInfo classes. - * - * The DTD for the above element is: - * - *

- *  <!ELEMENT playlistElement ((audioClip|playlist), fadeInfo?) >
- *  <!ATTLIST playlistElement  id              NMTOKEN   #REQUIRED  >
- *  <!ATTLIST playlistElement  relativeOffset  NMTOKEN   #REQUIRED  >
- *  
- */ -class PlaylistElement : public Configurable -{ - public: - /** - * The possible types of the playlist element (audio clip or - * sub-playlist). - */ - enum Type { AudioClipType, PlaylistType }; - - private: - /** - * The name of the configuration XML element used by Playlist. - */ - static const std::string configElementNameStr; - - /** - * The id of the playlist element. - */ - Ptr::Ref id; - - /** - * The starting time of the event. - */ - Ptr::Ref relativeOffset; - Ptr::Ref clipStart; - Ptr::Ref clipEnd; - Ptr::Ref clipLength; - - /** - * The type of the entry (audio clip or sub-playlist). - */ - Type type; - - /** - * The generic playable object associated with the entry. - * This is either an audio clip or a playlist. - */ - Ptr::Ref playable; - - /** - * The audio clip associated with the entry. - */ - Ptr::Ref audioClip; - - /** - * The playlist associated with the entry. - */ - Ptr::Ref playlist; - - /** - * The fade in / fade out info associated with the entry. - */ - Ptr::Ref fadeInfo; - - /** - * Convert a time_duration to string, in format HH:MM:SS.ssssss. - */ - std::string - toFixedString(Ptr::Ref time) const throw () - { - if (time->fractional_seconds()) { - return to_simple_string(*time); - } else { - return to_simple_string(*time) + ".000000"; - } - } - - - public: - - /** - * The default constructor. - */ - PlaylistElement(void) throw (); - - /** - * Create a playlist element by specifying all details. - * This is used for testing purposes. - * - * @param id the id of the entry. - * @param relativeOffset the start time of this element, relative to - * the start of the playlist. - * @param audioClip (a pointer to) the audio clip associated - * with the playlist element. - * @param fadeInfo fade in / fade out information (optional) - */ - PlaylistElement(Ptr::Ref id, - Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref audioClip, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (); - - /** - * Create a new audio clip playlist element, with a new UniqueId, - * to be added to a playlist. - * - * @param relativeOffset the start time of this element, relative to - * the start of the playlist. - * @param audioClip (a pointer to) the audio clip associated - * with the playlist element. - * @param fadeInfo fade in / fade out information (optional) - */ - PlaylistElement(Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref audioClip, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (); - - /** - * Create a new sub-playlist playlist element, with a new UniqueId, - * to be added to a playlist. - * - * @param relativeOffset the start time of this element, relative to - * the start of the playlist. - * @param playlist (a pointer to) the sub-playlist associated - * with the playlist element. - * @param fadeInfo fade in / fade out information (optional) - */ - PlaylistElement(Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref playlist, - Ptr::Ref fadeInfo - = Ptr::Ref()) - throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~PlaylistElement(void) throw (); - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementNameStr; - } - - /** - * Configure the object based on the XML element supplied. - * The supplied element is expected to be of the name - * returned by configElementName(). - * - * @param element the XML element to configure the object from. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element & element) - throw (std::invalid_argument); - - /** - * Return the id of the playlist element. - * - * @return the id of the playlist element. - */ - Ptr::Ref - getId(void) const throw () - { - return id; - } - - /** - * Set the relative offset of the playlist element. - * Note: this is very dangerous; use only if you know what you are - * doing. Never ever change the relative offset of a PlaylistElement - * which is contained in a Playlist. - * - * @param newOffset the new relative offset of the element. - */ - void - setRelativeOffset(Ptr::Ref newOffset) - throw () - { - relativeOffset = newOffset; - } - - /** - * Return the relative offset of the playlist element. - * - * @return the relative offset of the element. - */ - Ptr::Ref - getRelativeOffset(void) const throw () - { - return relativeOffset; - } - - /** - */ - void - setClipStart(Ptr::Ref newStart) - throw () - { - clipStart = newStart; - } - - /** - */ - Ptr::Ref - getClipStart(void) const throw () - { - return clipStart; - } - - /** - */ - void - setClipEnd(Ptr::Ref newEnd) - throw () - { - clipEnd = newEnd; - } - - /** - */ - Ptr::Ref - getClipEnd(void) const throw () - { - return clipEnd; - } - - /** - */ - void - setClipLength(Ptr::Ref newLength) - throw () - { - clipLength = newLength; - } - - /** - */ - Ptr::Ref - getClipLength(void) const throw () - { - return clipLength; - } - - /** - * Return the type of this playlist element. If the return - * value is PlaylistElement::AudioClipType (resp. PlaylistType), - * the getAudioClip() (resp. getPlaylist()) - * method is guaranteed to return a non-zero value. - * - * @return either AudioClipType or PlaylistType. - */ - Type - getType(void) const throw () - { - return type; - } - - /** - * Return the Playable instance (an AudioClip or a Playlist) - * associated with the playlist element. Use this if you don't - * care which type this playlist element is, e.g., you - * just want to play it in an audio player. - * - * @return the Playable instance associated with the element. - */ - Ptr::Ref - getPlayable(void) const throw () - { - return playable; - } - - /** - * Set the Playable instance (an AudioClip or a Playlist) - * associated with the playlist element. - * - * This is used by WebStorageClient::acquirePlaylist() to replace - * a stub (id, title, playlength only) sub-playlist with a full one. - * - * @param playable the new Playable object. - */ - void - setPlayable(Ptr::Ref playable) throw () - { - this->playable = playable; - switch (playable->getType()) { - case Playable::AudioClipType : - audioClip = playable->getAudioClip(); - type = AudioClipType; - break; - case Playable::PlaylistType : - playlist = playable->getPlaylist(); - type = PlaylistType; - break; - } - } - - /** - * Return the audio clip associated with the playlist element. - * - * @see getType() - * @return the audio clip associated with the element. - */ - Ptr::Ref - getAudioClip(void) const throw () - { - return audioClip; - } - - /** - * Return the sub-playlist associated with the playlist element. - * - * @see getType() - * @return the sub-playlist associated with the element. - */ - Ptr::Ref - getPlaylist(void) const throw () - { - return playlist; - } - - /** - * Set the fade info associated with the playlist element. - * - * @param fadeInfo the fade info to be associated with the element. - */ - void - setFadeInfo(Ptr::Ref fadeInfo) throw () - { - this->fadeInfo = fadeInfo; - } - - /** - * Return the fade info associated with the playlist element. - * - * @return the fade info associated with the element. - */ - Ptr::Ref - getFadeInfo(void) const throw () - { - return fadeInfo; - } - - - /** - * Return an XML representation of this playlist element. - * - * This is a string containing a single - * XML element, with its ID and relativeOffset attributes, - * plus an or XML element, - * plus an optional element. - * - * The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, - * time durations have the format "hh:mm:ss.ssssss". - * - * @return a string representation of the audio clip as an XML element - */ - Ptr::Ref - getXmlElementString(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_PlaylistElement_h - diff --git a/src/modules/core/include/LiveSupport/Core/Ptr.h b/src/modules/core/include/LiveSupport/Core/Ptr.h deleted file mode 100644 index dd001c9d6..000000000 --- a/src/modules/core/include/LiveSupport/Core/Ptr.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Ptr_h -#define LiveSupport_Core_Ptr_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A placeholder class for holidng typedefs to smart pointers. - * This is a workaround, as unfortunately typedfs in themselves may - * not be templated. For a discussion on the issue, see - * http://www.gotw.ca/gotw/079.htm - * - * The smart pointers here are typedefs to the smart pointers in the - * boost library. For documentation of the boost smart pointers, - * see http://www.boost.org/libs/smart_ptr/ - */ -template -class Ptr -{ - private: - /** - * Default constructor. - */ - Ptr(void) throw () - { - } - - - public: - /** - * This is actually a typedef to the boost shared_ptr, which - * is a reference counting shared smart pointer. - * For more on boost::shared_ptr, see - * http://www.boost.org/libs/smart_ptr/shared_ptr.htm - * - * To use this pointer, define as follows: - * - * Ptr::Ref myPointer; - * - */ - typedef boost::shared_ptr Ref; -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Ptr_h - diff --git a/src/modules/core/include/LiveSupport/Core/RdsContainer.h b/src/modules/core/include/LiveSupport/Core/RdsContainer.h deleted file mode 100644 index d896dd69f..000000000 --- a/src/modules/core/include/LiveSupport/Core/RdsContainer.h +++ /dev/null @@ -1,239 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_RdsContainer_h -#define LiveSupport_Core_RdsContainer_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/Configurable.h" - -#include "LiveSupport/Core/RdsItem.h" - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Container holding RdsItem objects. - * - * It is used by the OptionContainer class to hold RDS strings - * (see http://en.wikipedia.org/wiki/Radio_Data_System). - * - * This object has to be configured with an XML configuration element - * called rdsContainer. This may look like the following: - * - *

- *  <rdsContainer>
- *      <rdsItem> ... </rdsItem>
- *      <rdsItem> ... </rdsItem>
- *      ...
- *      <rdsItem> ... </rdsItem>
- *  </rdsContainer>
- *  
- * - * The DTD for the expected XML element is the following: - * - *

- *  
- *  
- * - * For a description of the rdsItem XML element, see the documentation - * of the RdsItem class. - * - * @see KeyboardShortcut - */ -class RdsContainer : public Configurable -{ - private: - /** - * The name of the configuration XML element used by - * RdsContainer. - */ - static const std::string configElementName; - - /** - * A vector type holding contant KeyboardShortcut references. - */ - typedef std::vector::Ref> - RdsItemListType; - - /** - * The list of all RdsItem references. - */ - RdsItemListType rdsItemList; - - /** - * An XML document used by toXmlElement(). - */ - Ptr::Ref xmlDocument; - - /** - * Set to true by setRdsString(), and to false by toXmlElement(). - */ - bool touched; - - - public: - /** - * Constructor. - */ - RdsContainer() throw () - : touched(false) - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~RdsContainer(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementName; - } - - /** - * Configure the object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuration information. - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Set the value of the RDS options. - * The key can be any of the RDS data codes, like PS, PI, PTY, RT, - * etc. If there is already a value set for this code, it gets - * overwritten, otherwise a new key-value pair is added. - * - * @param key which setting to modify. - * @param value the new value of the RDS setting. - * @param enabled whether this value will be broadcast. - */ - void - setRdsOptions(Ptr::Ref key, - Ptr::Ref value, - bool enabled) throw (); - - /** - * Get the value of an RDS string. - * The key can be any of the RDS data codes, like PS, PI, PTY, RT, - * etc. - * - * @param key which setting to modify. - * @return the value of the RDS setting. - * @exception std::invalid_argument if there is no such RDS option. - */ - Ptr::Ref - getRdsValue(Ptr::Ref key) - throw (std::invalid_argument); - - /** - * Get the enabled/disabled state of an RDS option. - * - * @param key which setting to modify. - * @return true if the RDS option is enabled, false otherwise. - * @exception std::invalid_argument if there is no such RDS option. - */ - bool - getRdsEnabled(Ptr::Ref key) - throw (std::invalid_argument); - - /** - * Convert the object to a string. - * - * @return a string which can be sent to the RDS encoder. - */ - Ptr::Ref - toString(void) throw (); - - /** - * Convert the object to XML. - * - * @return an XML Element, which can be passed to configure() - * to create an object identical to this one. - */ - const xmlpp::Element * - toXmlElement(void) throw (); - - /** - * Tells you whether the object has been touched since the last save. - * Starts out false; set to true by setRdsString() and set back to - * false by toXmlElement(). - * - * @return whether the object has been touched. - */ - bool - isTouched(void) throw () - { - return touched; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_RdsContainer_h - diff --git a/src/modules/core/include/LiveSupport/Core/RdsItem.h b/src/modules/core/include/LiveSupport/Core/RdsItem.h deleted file mode 100644 index e09e3de61..000000000 --- a/src/modules/core/include/LiveSupport/Core/RdsItem.h +++ /dev/null @@ -1,277 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_RdsItem_h -#define LiveSupport_Core_RdsItem_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/Configurable.h" - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for representing an RDS key - value pair. - * - * This object has to be configured with an XML configuration element - * called rdsItem. This may look like the following: - * - *

- *  <rdsItem     key     = "PS"
- *                  value   = "BBC Four"
- *                  enabled = "1" />
- *  
- * - * The possible key values are PS, PI, RT, etc - * (see http://en.wikipedia.org/wiki/Radio_Data_System). - * - * There value attribute can be any string. - * - * The enabled attribute is either 0 (disabled) or 1 (enabled). - * - * The DTD for the expected XML element looks like the following: - * - *

- *  <!ELEMENT rdsItem   EMPTY >
- *  <!ATTLIST rdsItem   key      CDATA   #REQUIRED >
- *  <!ATTLIST rdsItem   value    CDATA   #REQUIRED >
- *  <!ATTLIST rdsItem   enabled  CDATA   #REQUIRED >
- *  
- * - * @see RdsItemContainer - */ -class RdsItem : public Configurable -{ - private: - /** - * The name of the configuration XML element used by RdsItem. - */ - static const std::string configElementName; - - /** - * The key for this RDS item. - */ - Ptr::Ref key; - - /** - * The value for this RDS item. - */ - Ptr::Ref value; - - /** - * The enabled/disabled attribute for this RDS item. - */ - bool enabled; - - /** - * An XML document used by toXmlElement(). - */ - Ptr::Ref xmlDocument; - - /** - * Set to true by setValue(), and to false by toXmlElement(). - */ - bool touched; - - - public: - /** - * Default constructor. - */ - RdsItem() throw () - : enabled(false), - touched(false) - { - } - - /** - * Constructor which sets the variables. - */ - RdsItem(Ptr::Ref key, - Ptr::Ref value, - bool enabled = false) throw () - : key(key), - value(value), - enabled(enabled), - touched(false) - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~RdsItem(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return configElementName; - } - - /** - * Configure the object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument if the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Get the key. - * The key can be a 0 pointer if the object has not been - * configured yet. - * - * @return the key of this RDS item. - */ - Ptr::Ref - getKey(void) throw () - { - return key; - } - - /** - * Get the value. - * The value can be a 0 pointer if the object has not been - * configured yet. - * - * @return the key of this RDS item. - */ - Ptr::Ref - getValue(void) throw () - { - return value; - } - - /** - * Set the value. - * - * @param value the new value of this RDS item. - */ - void - setValue(Ptr::Ref value) throw () - { - this->value = value; - touched = true; - } - - /** - * Get the enabled/disabled flag. - * - * @return true if the RDS item is enabled, false if not. - */ - bool - getEnabled(void) throw () - { - return enabled; - } - - /** - * Set the enabled/disabled flag. - * - * @param enabled the new value of the flag. - */ - void - setEnabled(bool enabled) throw () - { - this->enabled = enabled; - touched = true; - } - - /** - * Convert the object to a string. - * - * @return a string which can be sent to the RDS encoder. - */ - Ptr::Ref - toString(void) throw (); - - /** - * Convert the object to XML. - * - * @return an XML Element, which can be passed to configure() - * to create an object identical to this one. - */ - const xmlpp::Element * - toXmlElement(void) throw (); - - /** - * Tells you whether the object has been touched since the last save. - * Starts out false; set to true by setValue() and setEnabled(); - * set back to false by toXmlElement(). - * - * @return whether the object has been touched. - */ - bool - isTouched(void) throw () - { - return touched; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_RdsItem_h - diff --git a/src/modules/core/include/LiveSupport/Core/RunnableInterface.h b/src/modules/core/include/LiveSupport/Core/RunnableInterface.h deleted file mode 100644 index d44ef384f..000000000 --- a/src/modules/core/include/LiveSupport/Core/RunnableInterface.h +++ /dev/null @@ -1,100 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_RunnableInterface_h -#define LiveSupport_Core_RunnableInterface_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A Runnable object, that can form the main execution body of a thread. - * - * @see Thread - */ -class RunnableInterface -{ - public: - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~RunnableInterface(void) throw () - { - } - - /** - * The main execution loop for the thread. - */ - virtual void - run(void) throw () = 0; - - /** - * Send a signal to the runnable object. - * - * @param userData user-specific parameter for the signal. - */ - virtual void - signal(int userData) throw () = 0; - - /** - * Signal the thread to stop, gracefully. - * This is just a call to signal the execution to stop, eventually. - */ - virtual void - stop(void) throw () = 0; -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - - -#endif // LiveSupport_Core_RunnableInterface_h - diff --git a/src/modules/core/include/LiveSupport/Core/ScheduleEntry.h b/src/modules/core/include/LiveSupport/Core/ScheduleEntry.h deleted file mode 100644 index 9f151097e..000000000 --- a/src/modules/core/include/LiveSupport/Core/ScheduleEntry.h +++ /dev/null @@ -1,272 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_ScheduleEntry_h -#define LiveSupport_Core_ScheduleEntry_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/UniqueId.h" - - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; - -using namespace LiveSupport; - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A scheduled event. - */ -class ScheduleEntry -{ - private: - /** - * The name of the schedule entry element - */ - static const std::string scheduleEntryElementName; - - /** - * The name of the id attribute in the schedule entry element - */ - static const std::string idAttrName; - - /** - * The name of the playlist attribute in the schedule entry element - */ - static const std::string playlistIdAttrName; - - /** - * The name of the startTime attribute in the schedule entry element - */ - static const std::string startTimeAttrName; - - /** - * The name of the endTime attribute in the schedule entry element - */ - static const std::string endTimeAttrName; - - /** - * The name of the playlength attribute in the schedule entry element - */ - static const std::string playlengthAttrName; - - /** - * The id of the schedule entry. - */ - Ptr::Ref id; - - /** - * The id of the playlist associated with the entry. - */ - Ptr::Ref playlistId; - - /** - * The starting time of the event. - */ - Ptr::Ref startTime; - - /** - * The end time for the event. - */ - Ptr::Ref endTime; - - /** - * The playling length of the event. - */ - Ptr::Ref playlength; - - /** - * The default constructor. - */ - ScheduleEntry(void) throw () - { - } - - - public: - - /** - * A constructor with initialization values. - * - * @param id the id of the entry. - * @param playlistId the id of the playlist associated with the entry. - * @param startTime the starting time for the entry. - * @param endTime the ending time for the entry. - */ - ScheduleEntry(Ptr::Ref id, - Ptr::Ref playlistId, - Ptr::Ref startTime, - Ptr::Ref endTime) - throw () - { - this->id = id; - this->playlistId = playlistId; - this->startTime = startTime; - this->endTime = endTime; - - playlength.reset(new time_duration(*endTime - *startTime)); - } - - /** - * A constructor based on a DOM element - * - * @param element a DOM element returned earlier by a - * toDom() call from another schedule entry. - * @throws std::invalid_argument in case of a bad DOM element - * @see #getElementName - * @see #toDom - */ - ScheduleEntry(xmlpp::Element * element) - throw (std::invalid_argument); - - /** - * Return the name of the DOM element used to export / import - * a schedule entry. - * - * @return the DOM element name used at export / import. - */ - static const std::string - getElementName(void) throw () - { - return scheduleEntryElementName; - } - - /** - * Return the id of the entry. - * - * @return the id of the entry. - */ - Ptr::Ref - getId(void) const throw () - { - return id; - } - - /** - * Return the id of the playlist associated with the entry. - * - * @return the id of the playlist associated with the entry. - */ - Ptr::Ref - getPlaylistId(void) const throw () - { - return playlistId; - } - - /** - * Return the starting time for the entry. - * - * @return the starting time for the entry. - */ - Ptr::Ref - getStartTime(void) const throw () - { - return startTime; - } - - /** - * Return the ending time for the entry. - * - * @return the ending time for the entry. - */ - Ptr::Ref - getEndTime(void) const throw () - { - return endTime; - } - - /** - * Return the playlength of the schedule entry. - * - * @return the playing length of the schedule entry. - */ - Ptr::Ref - getPlaylength(void) const throw () - { - return playlength; - } - - /** - * Return a DOM representation of this object. - * Can be used to serialize or generate another object with - * a DOM-based constructor. - * - * @param element the new DOM node will be a new child of this - * element. - * @see #getElementName - */ - void - toDom(xmlpp::Element * element) const throw (); - - /** - * Compare a schedule entry to another one. - * - * @param other the other entry to compare to. - */ - bool - operator==(const ScheduleEntry & other) const throw () - { - return *id == *other.id - && *playlistId == *other.playlistId - && *startTime == *other.startTime - && *endTime == *other.endTime - && *playlength == *other.playlength; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_ScheduleEntry_h - diff --git a/src/modules/core/include/LiveSupport/Core/SearchCriteria.h b/src/modules/core/include/LiveSupport/Core/SearchCriteria.h deleted file mode 100644 index 853e2246b..000000000 --- a/src/modules/core/include/LiveSupport/Core/SearchCriteria.h +++ /dev/null @@ -1,396 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_SearchCriteria_h -#define LiveSupport_Core_SearchCriteria_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - -// forward declaration of friend class -namespace LiveSupport { -namespace StorageClient { - class TestStorageClient; -} } - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An object which contains a collection of search conditions. - * - * Its fields are: - *
    - *
  • type - values in (audioClip | playlist | all); the default is - * all
  • - *
  • operator - values in (and | or); the default is and
  • - *
  • condition1 : { key : string, comparison: string, value : string } - * - a search condition, where key is one of the - * fields in the metadata, and comparison is - * one of ("=" | "partial" | "prefix" - * | "<" | "<=" | ">" | ">=")
  • - *
  • ...
  • - *
  • conditionN
  • - *
  • limit : int - the maximum number of results to be returned; - * the default is 0, which means unlimited
  • - *
  • offset : int - ignore the first offset matches; - * the default is 0.
  • - *
- * - * Usage: construct a SearchCriteria object either directly using the - * constructor with 4 string arguments, or in several steps using - * addCondition() and the setter methods; - * then pass this object to StorageClientInterface::search() - * to search the local storage. - * - * The key and value fields are case-sensitive, all the other - * strings (type, operator names) are case-insensitive. - */ -class SearchCriteria -{ - public: - - /** - * A type to hold a single search condition. - */ - struct SearchConditionType - { - std::string key; - std::string comparisonOperator; - std::string value; - - SearchConditionType(const std::string & key, - const std::string & comparisonOperator, - const std::string & value) - : key(key), comparisonOperator(comparisonOperator), value(value) - { - } - }; - - private: - - /** - * The kind of object we are searching for. - */ - std::string type; - - /** - * The logical operator joining the conditions: "and" or "or". - */ - std::string logicalOperator; - - /** - * A type to hold the list of search conditions. - */ - typedef std::vector - SearchConditionListType; - - /** - * The vector of search conditions. - */ - SearchConditionListType searchConditions; - - /** - * The mtime to use for "ls:mtime". - */ - Ptr::Ref mtimeValue; - - /** - * The comparison operator to use for "ls:mtime". - */ - std::string mtimeComparisonOperator; - - /** - * The maximum number of conditions to be returned. - */ - int limit; - - /** - * The index of the first matching condition to be returned. - */ - int offset; - - /** - * Lowercase a string. - */ - std::string - lowerCase(const std::string & s) throw() - { - std::string returnValue; - std::string::const_iterator it = s.begin(); - while (it != s.end()) { - returnValue += std::tolower(*it); - ++it; - } - return returnValue; - } - - /** - * Give access of private members to the TestStorageClient. - */ - friend class LiveSupport::StorageClient::TestStorageClient; - - /** - * Add a search condition. - * - * @param xmlRpcValue the condition to add. - * @exception std::invalid_argument on syntax errors. - */ - void - addCondition(const XmlRpc::XmlRpcValue & xmlRpcValue) - throw(std::invalid_argument); - - - public: - - /** - * Construct an empty SearchCriteria object. - * This also works as a default constructor. - * - * @param type one of "audioClip" (default), "playlist" or "all" - * @param logicalOperator either "and" (default) or "or" - * @exception std::invalid_argument on syntax errors. - */ - SearchCriteria(const std::string & type = "all", - const std::string & logicalOperator = "and") - throw(std::invalid_argument) - : limit(0), offset(0) - { - setType(type); - setLogicalOperator(logicalOperator); - } - - /** - * Construct a SearchCriteria object with a single condition. - * - * @param type one of "audioClip", "playlist" or "all" - * @param key the metadata field to search in - * @param comparisonOperator one of "=", "partial", "prefix", - * "<", "<=", ">" or ">=" - * @param value the value to compare to - * @exception std::invalid_argument on syntax errors. - */ - SearchCriteria(const std::string & type, - const std::string & key, - const std::string & comparisonOperator, - const std::string & value) - throw(std::invalid_argument); - - /** - * Construct a SearchCriteria object from an XmlRpcValue. - * - * @param xmlRpcValue an XmlRpcValue struct, containing - * the search criteria. - * @exception std::invalid_argument on syntax errors. - */ - SearchCriteria(const XmlRpc::XmlRpcValue & xmlRpcValue) - throw(std::invalid_argument); - - /** - * Set the type field. - * - * @param type one of "audioClip", "playlist" or "all" - * @exception std::invalid_argument on syntax errors. - */ - void - setType(const std::string & type) - throw(std::invalid_argument) - { - std::string lowerCaseType = lowerCase(type); - if (lowerCaseType == "audioclip" - || lowerCaseType == "playlist" - || lowerCaseType == "all") { - this->type = lowerCaseType; - } else { - throw std::invalid_argument("bad type argument"); - } - - } - - /** - * Set the logical operator field. - * - * @param logicalOperator either "and" or "or" - * @exception std::invalid_argument on syntax errors. - */ - void - setLogicalOperator(const std::string & logicalOperator) - throw(std::invalid_argument) - { - std::string lowerCaseOp = lowerCase(logicalOperator); - if (lowerCaseOp == "and" || lowerCaseOp == "or") { - this->logicalOperator = lowerCaseOp; - } else { - throw std::invalid_argument("bad logical operator argument"); - } - } - - /** - * Add a search condition. - * - * @param key the metadata field to search in - * @param comparisonOperator one of "=", "partial", "prefix", - * "<", "<=", ">" or ">=" - * @param value the value to compare to - * @exception std::invalid_argument on syntax errors. - */ - void - addCondition(const std::string & key, - const std::string & comparisonOperator, - const std::string & value) - throw(std::invalid_argument); - - /** - * Add a search condition specifying the mtime (modified-at time). - * - * @param comparisonOperator one of "=", "partial", "prefix", - * "<", "<=", ">" or ">=" - * @param value the value of the mtime to compare to - * @exception std::invalid_argument on syntax errors. - */ - void - addMtimeCondition(const std::string & comparisonOperator, - Ptr::Ref value) - throw(std::invalid_argument); - - /** - * Add a search condition. - * - * @param condition the search condition to add - * @exception std::invalid_argument on syntax errors. - */ - void - addCondition(const Ptr::Ref condition) - throw(std::invalid_argument) - { - addCondition(condition->key, - condition->comparisonOperator, - condition->value); - } - - /** - * Get the limit field. - * - * @return the maximum number of search results to be returned - */ - int - getLimit() throw() - { - return limit; - } - - /** - * Set the limit field. - * - * @param limit the maximum number of search results to be returned - * @exception std::invalid_argument on syntax errors. - */ - void - setLimit(const int limit) - throw(std::invalid_argument) - { - if (limit >= 0) { - this->limit = limit; - } else { - throw std::invalid_argument("bad argument: less than zero"); - } - } - - /** - * Get the offset field. - * - * @return the index of the first matching condition - * to be returned (first = 0) - */ - int - getOffset() throw() - { - return offset; - } - - /** - * Set the offset field. - * - * @param offset the index of the first matching condition - * to be returned (first = 0) - * @exception std::invalid_argument on syntax errors. - */ - void - setOffset(const int offset) - throw(std::invalid_argument) - { - if (offset >= 0) { - this->offset = offset; - } else { - throw std::invalid_argument("bad argument: less than zero"); - } - } - - /** - * Convert to an XmlRpc::XmlRpcValue. - */ - operator XmlRpc::XmlRpcValue() const throw(); - - /** - * Check two SearchCriteria objects for equality. - */ - bool - operator ==(const SearchCriteria & other) const throw(); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_SearchCriteria_h - diff --git a/src/modules/core/include/LiveSupport/Core/SessionId.h b/src/modules/core/include/LiveSupport/Core/SessionId.h deleted file mode 100644 index ecae2e15c..000000000 --- a/src/modules/core/include/LiveSupport/Core/SessionId.h +++ /dev/null @@ -1,151 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_SessionId_h -#define LiveSupport_Core_SessionId_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing session identifiers. - */ -class SessionId -{ - private: - /** - * The value of the session ID. - */ - std::string id; - - /** - * Default constructor. - */ - SessionId(void) throw () - { - } - - - public: - /** - * The type for the value the session id is represented in. - */ - typedef std::string IdType; - - /** - * Constructor to create a SessionId with a specific value. - * - * @param id the value of the created id object. - */ - SessionId(const IdType id) throw () - { - this->id = id; - } - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this another sessionId have the same value, - * false otherwise. - */ - bool - operator==(const SessionId & otherId) const - throw () - { - return this->id == otherId.id; - } - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this another sessionId do not have the same value, - * false otherwise. - */ - bool - operator!=(const SessionId & otherId) const - throw () - { - return this->id != otherId.id; - } - - /** - * Compare this id with an other one. - * - * @param otherId the other session id to compare to. - * @return true if this id is smaller than the other one, - * false otherwise. - */ - bool - operator<(const SessionId & otherId) const - throw () - { - return this->id < otherId.id; - } - - /** - * Return the (string) value of this session ID. - * - * @return the value of this id. - */ - const IdType - getId(void) const throw () - { - return id; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_SessionId_h - diff --git a/src/modules/core/include/LiveSupport/Core/Thread.h b/src/modules/core/include/LiveSupport/Core/Thread.h deleted file mode 100644 index 5c88f7e5f..000000000 --- a/src/modules/core/include/LiveSupport/Core/Thread.h +++ /dev/null @@ -1,173 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Thread_h -#define LiveSupport_Core_Thread_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/RunnableInterface.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A generic thread executor class. - * - * @see RunnableInterface - */ -class Thread -{ - private: - /** - * The POSIX thread for this object. - */ - pthread_t thread; - - /** - * The Runnable object, that constitutes the main running body - * of the thread. - */ - Ptr::Ref runnable; - - /** - * Default constructor. - */ - Thread(void) throw () - { - } - - /** - * The thread function for the POSIX thread interface. - * - * @param thread pointer to this thread instance. - * @return always 0 - */ - static void * - posixThreadFunction(void * thread) throw (); - - public: - /** - * Constructor. - * - * @param runnable the Runnable object making up the execution - * part of the thread. - */ - Thread(Ptr::Ref runnable) throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~Thread(void) throw () - { - } - - /** - * Start the execution of the thread. - * This funcion will create a new thread and starts executing - * it by the run() function of the Runnable object. Start will - * return immediately. - * - * @exception std::exception if the thread could not be started. - */ - virtual void - start(void) throw (std::exception); - - /** - * Signal the thread to stop, gracefully. - * This is just a call to signal the execution to stop, eventually. - * The thread still has to be joined after calling stop(). - * - * @see #join - */ - virtual void - stop(void) throw () - { - runnable->stop(); - } - - /** - * Force the current thread to relinquish use of its processor. - * So that other threads get a chance to run. - */ - static void - yield(void) throw () - { - pthread_yield(); - } - - /** - * Join the thread. - * Wait for the thread to terminate and free up all its resources. - */ - virtual void - join(void) throw (); - - /** - * Send a signal to the runnable object inside this thread. - * - * @param userData user-specific parameter for the signal. - */ - virtual void - signal(int userData) throw () - { - runnable->signal(userData); - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - - -#endif // LiveSupport_Core_Thread_h - diff --git a/src/modules/core/include/LiveSupport/Core/TimeConversion.h b/src/modules/core/include/LiveSupport/Core/TimeConversion.h deleted file mode 100644 index e7f9bf659..000000000 --- a/src/modules/core/include/LiveSupport/Core/TimeConversion.h +++ /dev/null @@ -1,280 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_TimeConversion_h -#define LiveSupport_Core_TimeConversion_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_SYS_TIME_H -#include -#else -#error need sys/time.h -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" - - -namespace LiveSupport { -namespace Core { - -using namespace boost::posix_time; - -using namespace LiveSupport; - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A helper object holding static time conversion functions. - * - * TODO: clean this up, and use the boost conversion functions, instead of - * converting stuff manually - * (see http://boost.org/doc/html/date_time/posix_time.html). - * - */ -class TimeConversion -{ - private: - /** - * Parse a time string. - * - * It cuts off the portion between the end of the string and the last - * occurrence of the separator character. For example, if called with - * the parameters "00:01:02" and ':', the function returns "02" and - * truncates the original string to "00:01". - * - * If the separator character is not found in timeString, - * a copy of the whole timeString is returned, and the - * original timeString is changed to the empty string. - * - * @param timeString the input argument; on return, the rest of the - * string, after the return value cut off - * @param separator a separator character, usually ':' - * @return the part of the string which was cut off - */ - static Ptr::Ref - nextNumberFromEnd(Ptr::Ref timeString, - char separator) throw (); - - /** - * Parse a decimal string. - * - * It cuts off the portion between the end of the string and the last - * occurrence of the separator character. For example, if called with - * the parameters "1.23" and '.', the function returns "23" and - * truncates the original string to "1". - * - * If the separator character is not found in timeString, - * then an empty string is returned, and the - * original timeString remains unchanged. - * - * @param decimalString the input argument; on return, the rest of - * the string, after the return value cut off - * @param separator a separator character, usually '.' - * @return the part of the string which was cut off - */ - static Ptr::Ref - nextNumberFromStart(Ptr::Ref decimalString, - char separator) throw (); - - /** - * The default constructor. - */ - TimeConversion(void) throw () - { - } - - - public: - /** - * Convert a struct timeval to a boost::posix_time::ptime, - * with microsecond precision. - * - * @param timeval the struct timeval to convert. - * @return a boost::posix_time::ptime, holding the same time. - * @exception std::out_of_range if timeval represents a time that - * can not be handled by ptime - */ - static Ptr::Ref - timevalToPtime(const struct timeval *timeval) - throw (std::out_of_range); - - /** - * Convert a struct tm to a boost::posix_time::ptime, - * with second precision. - * - * @param time the struct tm to convert. - * @return a boost::posix_time::ptime, holding the same time. - * @exception std::out_of_range if time represents a time that - * can not be handled by ptime - */ - static Ptr::Ref - tmToPtime(const struct tm *time) - throw (std::out_of_range); - - /** - * Convert a boost::posix_time::ptime to a struct tm, - * with second precision. - * - * @param convertFrom the boost::posix_time::ptime to convert. - * @param convertTo holds the result of the conversion - * @return a struct tm, holding the same time. - */ - static void - ptimeToTm(Ptr::Ref convertFrom, struct tm & convertTo) - throw (); - - /** - * Return the current time, with microsecond precision. - * - * @return the current time, with microsecond precision. - */ - static Ptr::Ref - now(void) throw (); - - /** - * Return the current time, with microsecond precision, as a string. - * - * @return the current time, with microsecond precision. - */ - static Ptr::Ref - nowString(void) throw (); - - /** - * Sleep for the specified time duration, with microsecond precision. - * - * @param duration sleep for this duration. - */ - static void - sleep(Ptr::Ref duration) throw (); - - /** - * Convert a time_duration to a format used in SMILs. - * This means number of seconds, rounded to the nearest millisecond. - * For example: "1234.567s", "0.890s", or "3.000s". - * - * @param duration the time duration to convert. - */ - static Ptr::Ref - timeDurationToSmilString(Ptr::Ref duration) - throw (); - - /** - * Convert a time_duration to a rounded format used on the screen. - * - * This means a hh:mm:ss format, rounded to the nearest second. - * - * For example: "01:02:03" or "00:10:00". The hours field can be - * more than two characters wide, e.g.: "8765:48:45". - * - * @param duration the time duration to convert. - * @return the time duration in string format - */ - static Ptr::Ref - timeDurationToHhMmSsString(Ptr::Ref duration) - throw (); - - /** - * Convert a time_duration to a format used for fade info. - * - * This means a hh:mm:ss.ffffff format, with hours, minutes and - * fractions left off when zero. - * - * For example: 01:02:03.004, 1:02 (meaning 1m 2s), 3 (meaning 3s), - * 0.002 (meaning 2ms). Zero is represented as 0. - * - * @param duration the time duration to convert. - * @return the time duration in string format - */ - static Ptr::Ref - timeDurationToShortString(Ptr::Ref duration) - throw (); - - /** - * Parse a string to a time_duration. - * Similar to boost::posix_time::duration_from_string(), only - * not broken quite as badly. - * - * Parsing is right-to-left, starting with seconds: for example, - * 5 means 5 seconds; 01:02.03 means 1m 2.03s; 1:2:3 means 1h 2m 3s. - * - * If the time format is invalid, no exception is thrown, but the - * result is undefined (usually 00:00:00). - * TODO: fix this, by adding a format check - * - * @param durationString the duration as string - * @return the duration as a time_duration - */ - static Ptr::Ref - parseTimeDuration(Ptr::Ref durationString) - throw (); - - /** - * Get the number of digits used for fractional seconds - * in time durations. - * @return the constant 6, for microsecond precision. - */ - static int - getNumberOfDigitsPrecision(void) throw (); - - /** - * Round the time duration to the nearest second. - * - * @param duration the time to be rounded; it will not be - * modified. - * @return the rounded value. - */ - static Ptr::Ref - roundToNearestSecond(Ptr::Ref duration) - throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_TimeConversion_h - diff --git a/src/modules/core/include/LiveSupport/Core/UniqueId.h b/src/modules/core/include/LiveSupport/Core/UniqueId.h deleted file mode 100644 index 587c2d9ef..000000000 --- a/src/modules/core/include/LiveSupport/Core/UniqueId.h +++ /dev/null @@ -1,246 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_UniqueId_h -#define LiveSupport_Core_UniqueId_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include -#include -#include -#include "LiveSupport/Core/Ptr.h" - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing globally unique identifiers. - */ -class UniqueId -{ - public: - /** - * The type for the numeric value the unique id is represented in. - * This is set to 'long long int', i.e., 64-bit signed integers. - * TODO: change this into something not quite as non-portable. - */ - typedef long long int IdType; - - private: - /** - * The value of the id. - */ - IdType id; - - /** - * A string representation of the id, in hexadecimal notation. - */ - std::string idAsString; - - /** - * Default constructor. - */ - UniqueId(void) throw () - { - } - - - public: - /** - * Constructor to create a UniqueId with a specific integer value. - * The argument is expected to be between 0 and 2^31-1 (inclusive). - * - * @param id the numeric value of the created id object. - */ - UniqueId(const IdType id) throw () - { - this->id = id; - std::stringstream idWriter; - idWriter << std::hex << std::setw(16) << std::setfill('0') << id; - this->idAsString = idWriter.str(); - } - - /** - * Constructor to create a UniqueId with a specific string value. - * If the argument is not a valid hexadecimal number between 0 and - * 2^31-1 (inclusive), the integer value of the UniqueId will be - * bogus. - * - * @param idAsString the string value of the created id object, - * in hexadecimal notation. - */ - UniqueId(const std::string idAsString) throw () - { - this->idAsString = idAsString; - // TODO: add error checking - std::stringstream idReader(idAsString); - idReader >> std::hex >> this->id; - } - - /** - * Create a UniqueId from a numeric value, which is a string - * representation of the id, in base 10. - * If the argument is not a valid decimal number between 0 and - * 2^31-1 (inclusive), the value of the UniqueId will be - * bogus. - * - * @param idStr the id in base 10, in string from. - * @return a new UniqueId with the specified ID value. - */ - static Ptr::Ref - fromDecimalString(const std::string idStr) throw () - { - IdType id; - // TODO: error checking - std::stringstream idReader(idStr); - idReader >> id; - - Ptr::Ref uid(new UniqueId(id)); - return uid; - } - - /** - * Return the UniqueId as a string in base 10. - * - * @return a new string containing the value of the UniqueId. - */ - Ptr::Ref - toDecimalString(void) const throw () - { - std::stringstream idWriter; - idWriter << std::dec << id; - Ptr::Ref idString(new std::string( - idWriter.str() )); - return idString; - } - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this an otherId have the same ID value, - * false otherwise. - */ - bool - operator==(const UniqueId & otherId) const throw () - { - return this->id == otherId.id; - } - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this an otherId do not have the same ID value, - * false otherwise. - */ - bool - operator!=(const UniqueId & otherId) const throw () - { - return this->id != otherId.id; - } - - /** - * Compare this id with an other one. - * - * @param otherId the other unique id to compare to. - * @return true if this id is smaller than the other one, - * false otherwise. - */ - bool - operator<(const UniqueId & otherId) const throw () - { - return this->id < otherId.id; - } - - /** - * Generate a globally unique id. This is used for testing. - * In real life, unique IDs are generated by the storage server. - */ - static Ptr::Ref - generateId(void) throw (); - - /** - * Return the numeric value of this globally unique id. - * - * @return the numeric value of this id. - */ - const IdType - getId(void) const throw () - { - return id; - } - - /** - * Return the numeric value of this globally unique id - * (alternative syntax). - * - * @return the numeric value of this id. - */ - operator IdType() const throw () - { - return id; - } - - /** - * Return the string value of this globally unique id. - * - * @return the string value of this id. - */ - operator std::string() const throw () - { - return idAsString; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_UniqueId_h - diff --git a/src/modules/core/include/LiveSupport/Core/Uuid.h b/src/modules/core/include/LiveSupport/Core/Uuid.h deleted file mode 100644 index e3e72af08..000000000 --- a/src/modules/core/include/LiveSupport/Core/Uuid.h +++ /dev/null @@ -1,312 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - This code is based upon the Leach working draft for UUIDs, - http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt - and the sample code therein. - The original copyright message of the sample code is the following: - -** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & -** Digital Equipment Corporation, Maynard, Mass. -** Copyright (c) 1998 Microsoft. -** To anyone who acknowledges that this file is provided "AS IS" -** without any express or implied warranty: permission to use, copy, -** modify, and distribute this file for any purpose is hereby -** granted without fee, provided that the above copyright notices and -** this notice appears in all source code copies, and that none of -** the names of Open Software Foundation, Inc., Hewlett-Packard -** Company, or Digital Equipment Corporation be used in advertising -** or publicity pertaining to distribution of the software without -** specific, written prior permission. Neither Open Software -** Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment -** Corporation makes any representations about the suitability of -** this software for any purpose. - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_Uuid_h -#define LiveSupport_Core_Uuid_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_STDINT_H -#include -#else -#error need stdint.h -#endif - - -#include -#include "LiveSupport/Core/Ptr.h" - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class representing globally unique identifiers. - * This implementation is based on the Leach UUID/GUID draft: - * http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt - * - * @see http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt - */ -class Uuid -{ - private: - /** - * The raw time type - */ - typedef uint64_t UuidTime; - - /** - * Structure holding a 6-byte system node id. - */ - typedef struct { - char nodeId[6]; - } UuidNode; - - /** - * The value of the id. - */ - long long int id; - - /** - * A string representation of the id, in hexadecimal notation. - */ - std::string idAsString; - - /** - * The low part of time. - */ - uint32_t timeLow; - - /** - * The middle part of time. - */ - uint16_t timeMid; - - /** - * The high part of time, with version included. - */ - uint16_t timeHiAndVersion; - - /** - * Clock sequence number high and reserved parts. - */ - uint8_t clockSeqHiAndReserved; - - /** - * Clock sequenc number, low part. - */ - uint8_t clockSeqLow; - - /** - * The 6 byte system node id. - */ - uint8_t node[6]; - - /** - * Default constructor. - */ - Uuid(void) throw () - { - } - - /** - * Compare two UUIDs - * - * @param id1 one id to compare - * @param id2 the other id to compare - * @return true if they are equal, false otherwise - */ - static bool - compare(const Uuid & id1, - const Uuid & id2) throw (); - - /** - * Return the current time, but always return a different value, - * even if the system clock granularity is not fine enough. - * - * @param timestamp an out parameter for the current time. - */ - static void - getCurrentTime(UuidTime * timestamp) throw (); - - /** - * Try to generate a truely random number (which is not possible, - * of course). - * - * @return a random number - */ - static uint16_t - trueRandom(void) throw (); - - /** - * Read the last saved state of the UUID generator from - * non-volatile storage. - * - * @param clockSeq out parameter for the clock sequence - * @param timestamp out parameter for the timestamp - * @param node out parameter for the system node id - */ - int - readState(uint16_t * clockSeq, - UuidTime * timestamp, - UuidNode * node) throw (); - - /** - * Write the last saved state of the UUID generator to - * non-volatile storage. - * - * @param clockSeq the clock sequence - * @param timestamp the timestamp - * @param node the system node id - */ - void - writeState(uint16_t clockSeq, - UuidTime timestamp, - UuidNode node) throw (); - - /** - * Generate a type 1 UUID. - * This function will fill out the object's internal attributes - * for it to become a proper UUID. - * - * For UUID types, see - * http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt - * - * @param clockSeq the clock sequence - * @param timestamp the time stamp - * @param node the system node id - */ - void - format(uint16_t clockSeq, - UuidTime timestamp, - UuidNode node) throw (); - - /** - * Get the system time in the UUID UTC base time, - * which is October 15, 1582. - * - * @param uuidTime an out parameter for the time. - */ - static void - getSystemTime(UuidTime * uuidTime) throw (); - - /** - * Return the IEEE node id. - * - * @param node an out parameter for the node id. - */ - static void - getIeeeNodeIdentifier(UuidNode * node) throw (); - - /** - * Create a string representation of the UUID. - * Store the result in the idAsString attribute. - */ - void - representAsString(void) throw (); - - - public: - /** - * Generate a globally unique id. This is used for testing. - * In real life, unique IDs are generated by the storage server. - */ - static Ptr::Ref - generateId(void) throw (); - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this an otherId have the same ID value, - * false otherwise. - */ - bool - operator==(const Uuid & otherId) const throw () - { - return compare(*this, otherId); - } - - /** - * Compare this is with an other one. - * - * @param otherId the other unqiue id to compare to. - * @return true if this an otherId do not have the same ID value, - * false otherwise. - */ - bool - operator!=(const Uuid & otherId) const throw () - { - return !compare(*this, otherId); - } - - /** - * Return the string value of this globally unique id. - * - * @return the string value of this id. - */ - operator std::string() const throw () - { - return idAsString; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - -inline std::ostream & -operator<< (std::ostream & os, - const Uuid & id) -{ - os << (std::string) id; - - return os; -} - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_Uuid_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h deleted file mode 100644 index 79410f602..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcCommunicationException.h +++ /dev/null @@ -1,113 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcCommunicationException_h -#define LiveSupport_Core_XmlRpcCommunicationException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: could not find the XML-RPC server, - * the server responded 'no such method', or the method response could not be - * parsed. - */ -class XmlRpcCommunicationException : public XmlRpcException -{ - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcCommunicationException(const std::string &msg) throw () - : XmlRpcException(msg) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcCommunicationException(const std::exception & parent) - throw () - : XmlRpcException(parent) - { - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcCommunicationException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent) - { - } - - /** - * Virtual destructor. - */ - ~XmlRpcCommunicationException(void) throw () - { - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcCommunicationException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcException.h deleted file mode 100644 index e29b05cad..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcException.h +++ /dev/null @@ -1,153 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcException_h -#define LiveSupport_Core_XmlRpcException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Common parent of exception classes for XML-RPC related problems. - */ -class XmlRpcException : public std::exception -{ - private: - /** - * The message of the exception. - */ - Ptr::Ref message; - - /** - * A possible embedded exception. - */ - const std::exception & parent; - - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcException(const std::string &msg) throw () - : parent(*this) - { - message.reset(new std::string(msg)); - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcException(const std::exception & parent) throw () - : parent(parent) - { - message.reset(new std::string(parent.what())); - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcException(const std::string & msg, - const std::exception & parent) throw (); - - /** - * Virtual destructor. - */ - ~XmlRpcException(void) throw () - { - } - - /** - * Set the message of the exception. - * - * @param msg the new message of the exception. - */ - void - setMessage(const std::string & msg) throw () - { - message.reset(new std::string(msg)); - } - - /** - * Get the message of the exception. - * - * @return the message of the exception. - */ - virtual const char * - what(void) const throw () - { - return message->c_str(); - } - - /** - * Get the parent exception. - * - * @return the parent exception, which may be null. - */ - virtual const std::exception * - getParent(void) const throw () - { - return &parent == this ? 0 : &parent; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcIOException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcIOException.h deleted file mode 100644 index e7a394f67..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcIOException.h +++ /dev/null @@ -1,112 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcIOException_h -#define LiveSupport_Core_XmlRpcIOException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: there was a problem with a local - * I/O operation. - */ -class XmlRpcIOException : public XmlRpcException -{ - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcIOException(const std::string &msg) throw () - : XmlRpcException(msg) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcIOException(const std::exception & parent) - throw () - : XmlRpcException(parent) - { - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcIOException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent) - { - } - - /** - * Virtual destructor. - */ - ~XmlRpcIOException(void) throw () - { - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcIOException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h deleted file mode 100644 index 91774a4c0..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidArgumentException.h +++ /dev/null @@ -1,113 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcInvalidArgumentException_h -#define LiveSupport_Core_XmlRpcInvalidArgumentException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: invalid argument (functions which - * throw an XmlRpcException throw this when they would normally throw a - * std::invalid_argument). - */ -class XmlRpcInvalidArgumentException : public XmlRpcException -{ - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcInvalidArgumentException(const std::string &msg) throw () - : XmlRpcException(msg) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcInvalidArgumentException(const std::exception & parent) - throw () - : XmlRpcException(parent) - { - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcInvalidArgumentException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent) - { - } - - /** - * Virtual destructor. - */ - ~XmlRpcInvalidArgumentException(void) throw () - { - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcInvalidArgumentException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidDataException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidDataException.h deleted file mode 100644 index c80ac2c86..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcInvalidDataException.h +++ /dev/null @@ -1,112 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcInvalidDataException_h -#define LiveSupport_Core_XmlRpcInvalidDataException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: invalid data returned by the method. - * This could be a malformed AudioClip or Playlist, for example. - */ -class XmlRpcInvalidDataException : public XmlRpcException -{ - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcInvalidDataException(const std::string &msg) throw () - : XmlRpcException(msg) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcInvalidDataException(const std::exception & parent) - throw () - : XmlRpcException(parent) - { - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcInvalidDataException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent) - { - } - - /** - * Virtual destructor. - */ - ~XmlRpcInvalidDataException(void) throw () - { - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcInvalidDataException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h deleted file mode 100644 index d3accc9cc..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcMethodFaultException.h +++ /dev/null @@ -1,166 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcMethodFaultException_h -#define LiveSupport_Core_XmlRpcMethodFaultException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - -namespace { - -/*------------------------------------------------------------------------------ - * The default fault code, the value when no fault code is set. - *----------------------------------------------------------------------------*/ -const int defaultFaultCode = -1; - -} - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: the XML-RPC method returned a fault - * response. - */ -class XmlRpcMethodFaultException : public XmlRpcException -{ - private: - /** - * The XML-RPC faultCode of the exception. - */ - int faultCode; - - - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcMethodFaultException(const std::string &msg) throw () - : XmlRpcException(msg), - faultCode(defaultFaultCode) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcMethodFaultException(const std::exception & parent) - throw () - : XmlRpcException(parent), - faultCode(defaultFaultCode) - { - } - - /** - * Constructor based on a message and a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcMethodFaultException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent), - faultCode(defaultFaultCode) - { - } - - /** - * Constructor based on a fault code, fault string pair. - * - * @param methodName the name of the method throwing the exception. - * @param faultCode the code of the exception. - * @param faultString the message of the exception. - */ - XmlRpcMethodFaultException(const std::string & methodName, - int faultCode, - const std::string & faultString) - throw () - : XmlRpcException(""), - faultCode(faultCode) - { - std::stringstream msg; - msg << "XML-RPC method '" - << methodName - << "' returned error message:\n" - << faultCode - << " - " - << faultString; - setMessage(msg.str()); - } - - /** - * Virtual destructor. - */ - ~XmlRpcMethodFaultException(void) throw () - { - } - - /** - * Get the XML-RPC faultCode of the exception. - * - * @return the fault code, if one is set; or -1 if not. - */ - int - getFaultCode(void) const throw () - { - return faultCode; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcMethodFaultException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h b/src/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h deleted file mode 100644 index 5a5c6b2e2..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcMethodResponseException.h +++ /dev/null @@ -1,112 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcMethodResponseException_h -#define LiveSupport_Core_XmlRpcMethodResponseException_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/XmlRpcException.h" - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Exception signaling an XML-RPC problem: the XML-RPC method call completed - * normally, but the response received has incorrect syntax. - */ -class XmlRpcMethodResponseException : public XmlRpcException -{ - public: - /** - * Constructor based on a string. - * - * @param msg the message of the exception. - */ - XmlRpcMethodResponseException(const std::string &msg) throw () - : XmlRpcException(msg) - { - } - - /** - * Constructor based on a parent exception. - * - * @param parent the parent exception to this one. - */ - XmlRpcMethodResponseException(const std::exception & parent) - throw () - : XmlRpcException(parent) - { - } - - /** - * Constructor based on a message ant a parent exception. - * - * @param msg the message of the exception. - * @param parent the parent exception. - */ - XmlRpcMethodResponseException(const std::string & msg, - const std::exception & parent) - throw () - : XmlRpcException(msg, parent) - { - } - - /** - * Virtual destructor. - */ - ~XmlRpcMethodResponseException(void) throw () - { - } - -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcMethodResponseException_h - diff --git a/src/modules/core/include/LiveSupport/Core/XmlRpcTools.h b/src/modules/core/include/LiveSupport/Core/XmlRpcTools.h deleted file mode 100644 index f307a3176..000000000 --- a/src/modules/core/include/LiveSupport/Core/XmlRpcTools.h +++ /dev/null @@ -1,746 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_XmlRpcTools_h -#define LiveSupport_Core_XmlRpcTools_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/SessionId.h" -#include "LiveSupport/Core/Playlist.h" -#include "LiveSupport/Core/ScheduleEntry.h" -#include "LiveSupport/Core/PlayLogEntry.h" -#include "LiveSupport/Core/SearchCriteria.h" -#include "LiveSupport/Core/AsyncState.h" - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport; -using namespace LiveSupport::Core; -using namespace LiveSupport::StorageClient; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A toolbox for converting between inner representations of classes - * and XmlRpcValues. Used by almost all XmlRpcServerMethod subclasses - * in the Scheduler. - */ -class XmlRpcTools -{ - private: - - /** - * Convert a boost::posix_time::ptime to an XmlRpcValue - * - * @param ptime the ptime to convert - * @param xmlRpcValue the output parameter holding the value of - * the conversion. - */ - static void - ptimeToXmlRpcValue(Ptr::Ref ptime, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (); - - /** - * Convert a PlayLogEntry to an XmlRpcValue - * - * @param playLogEntry the PlayLogEntry to convert. - * @param xmlRpcValue the output parameter holding the result of - * the conversion. - */ - static void - playLogEntryToXmlRpcValue(Ptr::Ref playLogEntry, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - public: - /** - * Extract the schedule entry id from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a UniqueId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no UniqueId - * in xmlRpcValue - */ - static Ptr::Ref - extractScheduleEntryId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the generic 'id' from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a UniqueId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no playlistId - * member in xmlRpcValue - */ - static Ptr::Ref - extractId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the playlist ID from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a UniqueId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no playlistId - * member in xmlRpcValue - */ - static Ptr::Ref - extractPlaylistId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the playlist element ID from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a UniqueId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no playlistElementId - * member in xmlRpcValue - */ - static Ptr::Ref - extractPlaylistElementId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the audio clip id from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a UniqueId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no audioClipId - * member in xmlRpcValue - */ - static Ptr::Ref - extractAudioClipId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the relative offset from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no relativeOffset - * member in xmlRpcValue - */ - static Ptr::Ref - extractRelativeOffset(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the relative offset from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no relativeOffset - * member in xmlRpcValue - */ - static Ptr::Ref - extractClipStart(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the relative offset from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no relativeOffset - * member in xmlRpcValue - */ - static Ptr::Ref - extractClipEnd(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the relative offset from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no relativeOffset - * member in xmlRpcValue - */ - static Ptr::Ref - extractClipLength(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a Playlist to an XmlRpcValue - * - * @param playlist the Playlist to convert. - * @param xmlRpcValue the output parameter holding the result of - * the conversion. - */ - static void - playlistToXmlRpcValue(Ptr::Ref playlist, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (); - - /** - * Convert a vector of Playlists to an XML-RPC return value. - * - * @param playlistVector a list of Playlists. - * @param returnValue the output parameter holding an XML-RPC - * representation of the list of Playlists. - */ - static void - playlistVectorToXmlRpcValue( - const Ptr::Ref> >::Ref playlistVector, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Convert an AudioClip to an XmlRpcValue - * - * @param audioClip the AudioClip to convert. - * @param xmlRpcValue the output parameter holding the result of - * the conversion. - */ - static void - audioClipToXmlRpcValue(Ptr::Ref audioClip, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (); - - /** - * Convert a vector of AudioClips to an XML-RPC return value. - * - * @param audioClipVector a list of AudioClips. - * @param returnValue the output parameter holding an XML-RPC - * representation of the list of AudioClips. - */ - static void - audioClipVectorToXmlRpcValue( - const Ptr::Ref> >::Ref audioClipVector, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract a Playlist from an XML-RPC parameter. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the extracted Playlist. - */ - static Ptr::Ref - extractPlaylist(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract a vector of Playlists from an XML-RPC parameter. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a list of Playlists. - */ - static Ptr::Ref> >::Ref - extractPlaylistVector(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract an AudioClip from an XML-RPC parameter. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the extracted AudioClip. - */ - static Ptr::Ref - extractAudioClip(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract a vector of AudioClips from an XML-RPC parameter. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a list of AudioClips. - */ - static Ptr::Ref> >::Ref - extractAudioClipVector(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert an error code, message pair to an XML-RPC fault response. - * This is done by throwing an XmlRpc::XmlRpcException. The client - * receives a fault response, and the return value is set to a - * { faultCode, faultString } structure holding the error code and - * message. - * - * @param errorCode the numerical code of the error. - * @param errorMessage a short English description of the error. - * @param xmlRpcValue remains here from an earlier version - * TODO: remove this later. - */ - static void - markError(int errorCode, const std::string errorMessage, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (XmlRpc::XmlRpcException); - - /** - * Convert the valid status of a playlist to an XmlRpcValue - * - * @param validStatus true if the playlist is valid, false otherwise. - * @param xmlRpcValue the output parameter holding the result of - * the conversion. - */ - static void - validStatusToXmlRpcValue(bool validStatus, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (); - - /** - * Extract the 'from' time parameter from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the time value for the 'from' parameter - * @exception std::invalid_argument if there was no from parameter - * in xmlRpcValue - */ - static Ptr::Ref - extractFromTime(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the 'to' parameter from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the time value for the 'to' parameter - * @exception std::invalid_argument if there was no to parameter - * in xmlRpcValue - */ - static Ptr::Ref - extractToTime(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the 'start' parameter from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the time value for the 'start' parameter - * @exception std::invalid_argument if there was no to parameter - * in xmlRpcValue - */ - static Ptr::Ref - extractStartTime(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the 'end' parameter from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the time value for the 'end' parameter - * @exception std::invalid_argument if there was no to parameter - * in xmlRpcValue - */ - static Ptr::Ref - extractEndTime(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Add a 'from' time value to an XmlRpcValue. - * - * @param from the 'from' time value to add. - * @param returnValue an output parameter, which has the - * 'from' time added after the function returns. - */ - static void - fromTimeToXmlRpcValue( - Ptr::Ref from, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Add a 'to' time value to an XmlRpcValue. - * - * @param to the 'to' time value to add. - * @param returnValue an output parameter, which has the - * 'to' time added after the function returns. - */ - static void - toTimeToXmlRpcValue( - Ptr::Ref to, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract the playtime from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return the playing time, as stored in the XML-RPC parameter - * @exception std::invalid_argument if there was no playtime - * in xmlRpcValue - */ - static Ptr::Ref - extractPlayschedule(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the fade in time from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no fadeIn - * member in xmlRpcValue - */ - static Ptr::Ref - extractFadeIn(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the fade out time from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a time_duration that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no fadeOut - * member in xmlRpcValue - */ - static Ptr::Ref - extractFadeOut(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a vector of ScheduleEntries to an XML-RPC return value. - * - * @param scheduleEntries a list of ScheduleEntries. - * @param returnValue the output parameter holding an XML-RPC - * representation of the suppied schedule entires. - */ - static void - scheduleEntriesToXmlRpcValue( - Ptr::Ref> >::Ref scheduleEntries, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Convert an XmlRpcValue array, holding schedule entries, - * to a vector of ScheduleEntry object references. - * - * @param xmlRpcValue the XML-RPC array holding the schedule entry - * data - * @return a vector of ScheduleEntry object references, holding - * the same data. - */ - static Ptr::Ref> >::Ref - extractScheduleEntries(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (); - - /** - * Convert a schedule entry ID (a UniqueId) to an XmlRpcValue - * - * @param scheduleEntryId the UniqueId to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - scheduleEntryIdToXmlRpcValue( - Ptr::Ref scheduleEntryId, - XmlRpc::XmlRpcValue & returnValue) throw (); - - /** - * Add a session id to an XmlRpcValue - * - * @param sessionId the session id to add to the XmlRpcValue - * @param returnValue an output parameter, which has the - * session id added after the function returns. - */ - static void - sessionIdToXmlRpcValue( - Ptr::Ref sessionId, - XmlRpc::XmlRpcValue & returnValue) throw (); - - /** - * Add a playlist ID to an XmlRpcValue - * - * @param playlistId the playlist ID to add to the XmlRpcValue - * @param returnValue an output parameter, which has the - * playlist ID added after the function returns. - */ - static void - playlistIdToXmlRpcValue( - Ptr::Ref playlistId, - XmlRpc::XmlRpcValue & returnValue) throw (); - - /** - * Add an audio clip ID to an XmlRpcValue - * - * @param audioClipId the audio clip ID to add to the XmlRpcValue - * @param returnValue an output parameter, which has the - * audio clip ID added after the function returns. - */ - static void - audioClipIdToXmlRpcValue( - Ptr::Ref audioClipId, - XmlRpc::XmlRpcValue & returnValue) throw (); - - /** - * Add a playlist element ID to an XmlRpcValue - * - * @param playlistElementId the playlist element ID - * to add to the XmlRpcValue - * @param returnValue an output parameter, which has the - * playlist element ID added after the function returns. - */ - static void - playlistElementIdToXmlRpcValue( - Ptr::Ref playlistElementId, - XmlRpc::XmlRpcValue & returnValue) throw (); - - /** - * Add a playtime value to an XmlRpcValue. - * - * @param playtime the playtime to add to the XmlRpcValue - * @param returnValue an output parameter, which has the - * playtime added after the function returns. - */ - static void - playtimeToXmlRpcValue( - Ptr::Ref playtime, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Convert a vector of PlayLogEntries to an XML-RPC return value. - * - * @param playLogVector a list of PlayLogEntries. - * @param returnValue the output parameter holding an XML-RPC - * representation of the list of PlayLogEntries. - */ - static void - playLogVectorToXmlRpcValue( - Ptr::Ref> >::Ref - playLogVector, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract the session ID from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a SessionId that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no sessionId - * member in xmlRpcValue - */ - static Ptr::Ref - extractSessionId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the login name from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a std::string that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no login - * member in xmlRpcValue - */ - static Ptr::Ref - extractLoginName(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the password from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a std::string that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no sessionId - * member in xmlRpcValue - */ - static Ptr::Ref - extractPassword(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Extract the search criteria from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a search criteria that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no criteria - * member in xmlRpcValue. - */ - static Ptr::Ref - extractSearchCriteria(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a SearchCriteria to an XmlRpcValue. - * - * @param criteria the SearchCriteria to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - searchCriteriaToXmlRpcValue( - Ptr::Ref criteria, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract a token from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a string token that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no token - * member in xmlRpcValue. - */ - static Ptr::Ref - extractToken(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a string token to an XmlRpcValue. - * - * @param token the string token to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - tokenToXmlRpcValue(Ptr::Ref token, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract the backup status from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return an AsyncState that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no "status" - * member in xmlRpcValue. - */ - static AsyncState - extractBackupStatus(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert an AsyncState returned by one - * of the backup methods to an XmlRpcValue. - * - * @param status the AsyncState to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - backupStatusToXmlRpcValue(AsyncState status, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract a URL string from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a URL string that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no "url" - * member in xmlRpcValue. - */ - static Ptr::Ref - extractUrl(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a URL string to an XmlRpcValue. - * - * @param url the URL string to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - urlToXmlRpcValue(Ptr::Ref url, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract a path string from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a path string that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no "path" - * member in xmlRpcValue. - */ - static Ptr::Ref - extractPath(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a path string to an XmlRpcValue. - * - * @param path the path string to convert. - * @param returnValue the output parameter holding the result of - * the conversion. - */ - static void - pathToXmlRpcValue(Ptr::Ref path, - XmlRpc::XmlRpcValue & returnValue) - throw (); - - /** - * Extract a fault string from the XML-RPC parameters. - * - * @param xmlRpcValue the XML-RPC parameter to extract from. - * @return a fault string that was found in the XML-RPC parameter. - * @exception std::invalid_argument if there was no "faultString" - * member in xmlRpcValue. - */ - static Ptr::Ref - extractFaultString(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument); - - /** - * Convert a fault string to an XmlRpcValue. - * - * @param faultString the fault string to convert. - * @param xmlRpcValue the output parameter holding the result of - * the conversion. - */ - static void - faultStringToXmlRpcValue(Ptr::Ref faultString, - XmlRpc::XmlRpcValue & returnValue) - throw (); -}; - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_XmlRpcTools_h - diff --git a/src/modules/core/lib/.keepme b/src/modules/core/lib/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/core/lib/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/core/src/AsyncState.cxx b/src/modules/core/src/AsyncState.cxx deleted file mode 100644 index 728c13541..000000000 --- a/src/modules/core/src/AsyncState.cxx +++ /dev/null @@ -1,195 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "LiveSupport/Core/AsyncState.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * Constant instance: init. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::initState(innerInitState); - -/*------------------------------------------------------------------------------ - * Constant instance: pending. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::pendingState(innerPendingState); - -/*------------------------------------------------------------------------------ - * Constant instance: finished. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::finishedState(innerFinishedState); - -/*------------------------------------------------------------------------------ - * Constant instance: closed. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::closedState(innerClosedState); - -/*------------------------------------------------------------------------------ - * Constant instance: failed. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::failedState(innerFailedState); - -/*------------------------------------------------------------------------------ - * Constant instance: invalid. - *----------------------------------------------------------------------------*/ -const AsyncState AsyncState::invalidState(innerInvalidState); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Construct from a transport string. - *----------------------------------------------------------------------------*/ -AsyncState -AsyncState :: fromTransportString(const std::string & transportString) - throw () -{ - if (transportString == "init") { - return initState; - - } else if (transportString == "pending" || transportString == "waiting") { - return pendingState; - - } else if (transportString == "finished") { - return finishedState; - - } else if (transportString == "closed") { - return closedState; - - } else if (transportString == "failed") { - return failedState; - } - - return invalidState; -} - - -/*------------------------------------------------------------------------------ - * Construct from a backup string. - *----------------------------------------------------------------------------*/ -AsyncState -AsyncState :: fromBackupString(const std::string & backupString) - throw () -{ - if (backupString == "working") { - return pendingState; - - } else if (backupString == "success") { - return finishedState; - - } else if (backupString == "fault") { - return failedState; - } - - return invalidState; -} - - -/*------------------------------------------------------------------------------ - * Convert to a transport string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -AsyncState :: toTransportString(void) const throw () -{ - Ptr::Ref transportString(new std::string()); - - switch (value) { - case innerInitState: *transportString = "init"; - break; - - case innerPendingState: *transportString = "pending"; - break; - - case innerFinishedState: *transportString = "finished"; - break; - - case innerClosedState: *transportString = "closed"; - break; - - case innerFailedState: *transportString = "failed"; - break; - - case innerInvalidState: *transportString = "(invalid)"; - break; - } - - return transportString; -} - - -/*------------------------------------------------------------------------------ - * Convert to a backup string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -AsyncState :: toBackupString(void) const throw () -{ - Ptr::Ref backupString(new std::string()); - - switch (value) { - case innerInitState: *backupString = "(init)"; - break; - - case innerPendingState: *backupString = "working"; - break; - - case innerFinishedState: *backupString = "success"; - break; - - case innerClosedState: *backupString = "(closed)"; - break; - - case innerFailedState: *backupString = "fault"; - break; - - case innerInvalidState: *backupString = "(invalid)"; - break; - } - - return backupString; -} - - -/*------------------------------------------------------------------------------ - * Print to an ostream. - *----------------------------------------------------------------------------*/ -std::ostream & -operator<<(std::ostream & ostream, const LiveSupport::Core::AsyncState state) - throw () -{ - Ptr::Ref transportState = state.toTransportString(); - ostream << *transportState; - return ostream; -} - diff --git a/src/modules/core/src/AsyncStateTest.cxx b/src/modules/core/src/AsyncStateTest.cxx deleted file mode 100644 index 95d08a581..000000000 --- a/src/modules/core/src/AsyncStateTest.cxx +++ /dev/null @@ -1,127 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include -#include - -#include "LiveSupport/Core/AsyncState.h" -#include "AsyncStateTest.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(AsyncStateTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -AsyncStateTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -AsyncStateTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test the basic conversions. - *----------------------------------------------------------------------------*/ -void -AsyncStateTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - AsyncState state = AsyncState::invalidState; - Ptr::Ref transportString; - Ptr::Ref backupString; - - state = AsyncState::initState; - transportString = state.toTransportString(); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromTransportString(*transportString), - state); - - state = AsyncState::pendingState; - transportString = state.toTransportString(); - backupString = state.toBackupString(); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromTransportString(*transportString), - state); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromBackupString(*backupString), - state); - - state = AsyncState::finishedState; - transportString = state.toTransportString(); - backupString = state.toBackupString(); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromTransportString(*transportString), - state); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromBackupString(*backupString), - state); - - state = AsyncState::closedState; - transportString = state.toTransportString(); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromTransportString(*transportString), - state); - - state = AsyncState::failedState; - transportString = state.toTransportString(); - backupString = state.toBackupString(); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromTransportString(*transportString), - state); - CPPUNIT_ASSERT_EQUAL(AsyncState::fromBackupString(*backupString), - state); - -} - - -/*------------------------------------------------------------------------------ - * Test the printing to an ostream. - *----------------------------------------------------------------------------*/ -void -AsyncStateTest :: ostreamTest(void) - throw (CPPUNIT_NS::Exception) -{ - std::ostringstream stream; - AsyncState state = AsyncState::finishedState; - - stream << state; - CPPUNIT_ASSERT(stream.str() == "finished"); -} - diff --git a/src/modules/core/src/AsyncStateTest.h b/src/modules/core/src/AsyncStateTest.h deleted file mode 100644 index 0133d3080..000000000 --- a/src/modules/core/src/AsyncStateTest.h +++ /dev/null @@ -1,104 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef AsyncStateTest_h -#define AsyncStateTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the AsyncState class. - * - * @see AsyncState - */ -class AsyncStateTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(AsyncStateTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(ostreamTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * Test the basic conversions. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the printing to an ostream. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - ostreamTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // AsyncStateTest_h - diff --git a/src/modules/core/src/AudioClip.cxx b/src/modules/core/src/AudioClip.cxx deleted file mode 100644 index 272bba47c..000000000 --- a/src/modules/core/src/AudioClip.cxx +++ /dev/null @@ -1,742 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include // for TagLib -#include // for TagLib -#include // for TagLib -#include // for TagLib - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/AudioClip.h" - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The name of the config element for this class - */ -const std::string AudioClip::configElementNameStr = "audioClip"; - -/** - * The name of the attribute to get the id of the audio clip. - */ -static const std::string idAttrName = "id"; - -/** - * The name of the attribute to get the URI of the audio clip. - */ -static const std::string uriAttrName = "uri"; - -/** - * The name of the attribute to get the playlength of the audio clip. - */ -static const std::string playlengthAttrName = "playlength"; - -/** - * The name of the attribute to get the title of the audio clip. - */ -static const std::string titleAttrName = "title"; - -/** - * The name of the metadata child element. - */ -static const std::string metadataElementName = "metadata"; - -/** - * The prefix of the extent (length) metadata element. - */ -static const std::string extentElementPrefix = "dcterms"; - -/** - * The name of the extent (length) metadata element. - */ -static const std::string extentElementName = "extent"; - -/** - * The prefix of the title metadata element. - */ -static const std::string titleElementPrefix = "dc"; - -/** - * The name of the title metadata element. - */ -static const std::string titleElementName = "title"; - -/** - * The prefix for the Live Support extension elements. - */ -static const std::string liveSupportNamespacePrefix = "ls"; - -/** - * The prefix for the "xml:" prefix elements. - */ -static const std::string xmlNamespacePrefix = "xml"; - -/** - * The URI identifier for the default namespace - */ -static const std::string defaultNamespaceUri - = "http://mdlf.org/livesupport/elements/1.0/"; - -/** - * The URI identifier for the "ls" prefix. - */ -static const std::string liveSupportNamespaceUri - = "http://mdlf.org/livesupport/elements/1.0/"; - -/** - * The URI identifier for the "dc" prefix - */ -static const std::string dcNamespaceUri - = "http://purl.org/dc/elements/1.1/"; - -/** - * The URI identifier for the "dcterms" prefix - */ -static const std::string dctermsNamespaceUri - = "http://purl.org/dc/terms/"; - -/** - * The URI identifier for the "xml" prefix - */ -static const std::string xmlNamespaceUri - = "http://www.w3.org/XML/1998/namespace"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Copy constructor. - *----------------------------------------------------------------------------*/ -AudioClip :: AudioClip(const AudioClip & otherAudioClip) throw () - : Playable(AudioClipType) -{ - this->id = otherAudioClip.id; - this->title = otherAudioClip.title; - this->playlength = otherAudioClip.playlength; - this->uri = otherAudioClip.uri; - this->token = otherAudioClip.token; - - if (otherAudioClip.xmlAudioClip) { - xmlAudioClip.reset(new xmlpp::Document); - xmlAudioClip->create_root_node_by_import( - otherAudioClip.xmlAudioClip->get_root_node(), - true); // true == recursive - } -} - - -/*------------------------------------------------------------------------------ - * Test constructor without title. - *----------------------------------------------------------------------------*/ -AudioClip :: AudioClip(Ptr::Ref id, - Ptr::Ref playlength, - Ptr::Ref uri) - throw () - : Playable(AudioClipType) -{ - this->id = id; - this->title.reset(new Glib::ustring("")); - this->playlength = playlength; - this->uri = uri; - - setMetadata(title, titleElementName, titleElementPrefix); - - Ptr::Ref playlengthString(new const Glib::ustring( - toFixedString(playlength) )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Test constructor with title. - *----------------------------------------------------------------------------*/ -AudioClip :: AudioClip(Ptr::Ref id, - Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri) - throw () - : Playable(AudioClipType) -{ - this->id = id; - this->title = title; - this->playlength = playlength; - this->uri = uri; - - setMetadata(title, titleElementName, titleElementPrefix); - - Ptr::Ref playlengthString(new const Glib::ustring( - toFixedString(playlength) )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Constructor without ID. - *----------------------------------------------------------------------------*/ -AudioClip :: AudioClip(Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri) - throw () - : Playable(AudioClipType) -{ - this->title = title; - this->playlength = playlength; - this->uri = uri; - - setMetadata(title, titleElementName, titleElementPrefix); - - Ptr::Ref playlengthString(new const Glib::ustring( - toFixedString(playlength) )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Convert to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -AudioClip :: operator XmlRpc::XmlRpcValue() const - throw() -{ - XmlRpc::XmlRpcValue xmlRpcValue; - xmlRpcValue[configElementNameStr] = std::string(*getXmlDocumentString()); - - return xmlRpcValue; -} - - -/*------------------------------------------------------------------------------ - * Construct from an XmlRpcValue. - *----------------------------------------------------------------------------*/ -AudioClip :: AudioClip(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) - : Playable(AudioClipType) -{ - if (!xmlRpcValue.hasMember(configElementNameStr)) { - throw std::invalid_argument("no audio clip data found in XmlRpcValue"); - } - - xmlpp::DomParser parser; - try { - parser.parse_memory(std::string(xmlRpcValue[configElementNameStr])); - } catch (xmlpp::exception &e) { - throw std::invalid_argument("error parsing XML document"); - } - - configure(*parser.get_document()->get_root_node()); // may throw -} - - -/*------------------------------------------------------------------------------ - * Set the value of the title field. - *----------------------------------------------------------------------------*/ -void -AudioClip :: setTitle(Ptr::Ref title) - throw () -{ - this->title = title; - setMetadata(title, titleElementName, titleElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Set the value of the playlength from a string (private). - *----------------------------------------------------------------------------*/ -void -AudioClip :: setPlaylength(Ptr::Ref timeString) - throw (std::invalid_argument) -{ - try { - playlength = TimeConversion::parseTimeDuration(timeString); - } catch (std::exception &e) { - std::string eMsg = "bad time format in playlength: "; - eMsg += e.what(); - throw std::invalid_argument(eMsg); - } -} - - -/*------------------------------------------------------------------------------ - * Create an audio clip object based on an XML element. - *----------------------------------------------------------------------------*/ -void -AudioClip :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - std::string eMsg = "bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!id) { - if (!(attribute = element.get_attribute(idAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - id.reset(new UniqueId(attribute->get_value())); - } - - if (!playlength - && (attribute = element.get_attribute(playlengthAttrName))) { - Ptr::Ref playlengthString(new const Glib::ustring( - attribute->get_value() )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); - } - - if (!title - && (attribute = element.get_attribute(titleAttrName))) { - title.reset(new const Glib::ustring(attribute->get_value())); - setMetadata(title, titleElementName, titleElementPrefix); - } - - if (!uri - && (attribute = element.get_attribute(uriAttrName))) { - uri.reset(new const std::string(attribute->get_value())); - } - - xmlpp::Node::NodeList childNodes - = element.get_children(metadataElementName); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - if (it != childNodes.end()) { - const xmlpp::Element * metadataElement - = dynamic_cast (*it); - - xmlAudioClip.reset(new xmlpp::Document); - xmlpp::Element* root = xmlAudioClip->create_root_node( - configElementNameStr); - root->set_attribute(idAttrName, std::string(*id)); - root->import_node(metadataElement, true); // true = recursive - - const xmlpp::Node::NodeList dataFieldList - = metadataElement->get_children(); - xmlpp::Node::NodeList::const_iterator listIt = dataFieldList.begin(); - - while (listIt != dataFieldList.end()) { - const xmlpp::Node* dataNode = *listIt; - std::string prefix = dataNode->get_namespace_prefix(); - std::string name = dataNode->get_name(); - const xmlpp::Element* - dataElement - = dynamic_cast (dataNode); - if (!dataElement) { - ++listIt; - continue; - } - - if (!playlength && prefix == extentElementPrefix - && name == extentElementName) { - if (dataElement->has_child_text()) { - Ptr::Ref playlengthString(new std::string( - dataElement->get_child_text() - ->get_content() )); - setPlaylength(playlengthString); - } else { // or just leave blank? bad either way - playlength.reset(new time_duration(0,0,0,0)); - } - } - - if (!title && prefix == titleElementPrefix - && name == titleElementName) { - Glib::ustring value; - if (dataElement->has_child_text()) { - value = dataElement->get_child_text()->get_content(); - } else { - value = ""; - } - Ptr::Ref ptrToValue( - new const Glib::ustring(value)); - title = ptrToValue; - } - - ++listIt; - } - - ++it; - if (it != childNodes.end()) { - std::string eMsg = "more than one "; - eMsg += metadataElementName; - eMsg += " XML element"; - throw std::invalid_argument(eMsg); - } - } - - if (!playlength) { - std::string eMsg = "missing attribute "; - eMsg += playlengthAttrName; - eMsg += " or metadata element "; - eMsg += extentElementPrefix + ":" + extentElementName; - throw std::invalid_argument(eMsg); - } - - if (!title) { - title.reset(new const Glib::ustring("")); - } -} - - -/*------------------------------------------------------------------------------ - * Return the value of a metadata field. - *----------------------------------------------------------------------------*/ -Ptr::Ref -AudioClip :: getMetadata(const std::string & key) const - throw () -{ - std::string name, prefix; - separateNameAndNameSpace(key, name, prefix); - - Ptr::Ref value; - - if (! xmlAudioClip) { - return value; - } - xmlpp::Element* rootNode = xmlAudioClip->get_root_node(); - if (! rootNode) { - return value; - } - xmlpp::Node::NodeList rootList = rootNode->get_children( - metadataElementName); - if (rootList.size() == 0) { - return value; - } - - xmlpp::Node* metadata = rootList.front(); - xmlpp::Node::NodeList nodeList = metadata->get_children(name); - xmlpp::Node::NodeList::iterator it = nodeList.begin(); - - while (it != nodeList.end()) { - xmlpp::Node* node = *it; - if (node->get_namespace_prefix() == prefix) { - xmlpp::Element* element = dynamic_cast (node); - xmlpp::TextNode* textNode = element->get_child_text(); - if (textNode) { - value.reset(new Glib::ustring(textNode->get_content())); - } else { - value.reset(new Glib::ustring("")); - } - return value; - } - ++it; - } - - return value; -} - - -/*------------------------------------------------------------------------------ - * Set the value of a metadata field (public). - *----------------------------------------------------------------------------*/ -void -AudioClip :: setMetadata(Ptr::Ref value, - const std::string &key) - throw (std::invalid_argument) -{ - std::string name; - std::string prefix; - - separateNameAndNameSpace(key, name, prefix); - setMetadata(value, name, prefix); -} - - -/*------------------------------------------------------------------------------ - * Set the value of a metadata field (private). - *----------------------------------------------------------------------------*/ -void -AudioClip :: setMetadata(Ptr::Ref value, - const std::string &name, const std::string &prefix) - throw (std::invalid_argument) -{ - if (prefix == extentElementPrefix && name == extentElementName) { - Ptr::Ref valueString(new const std::string( - *value)); - setPlaylength(valueString); // may throw invalid_argument - } - - if (prefix == titleElementPrefix && name == titleElementName) { - title = value; - } - - // create a new xmlpp::Document for the metadata if necessary - if (! xmlAudioClip) { - xmlAudioClip.reset(new xmlpp::Document); - } - xmlpp::Element* rootNode = xmlAudioClip->get_root_node(); - if (! rootNode) { - rootNode = xmlAudioClip->create_root_node(configElementNameStr); - if (id) { - rootNode->set_attribute(idAttrName, std::string(*id)); - } - } - xmlpp::Node::NodeList rootList = rootNode->get_children( - metadataElementName); - xmlpp::Element* metadata; - if (rootList.size() > 0) { - metadata = dynamic_cast (rootList.front()); - } else { - metadata = rootNode->add_child(metadataElementName); - metadata->set_namespace_declaration(defaultNamespaceUri); - metadata->set_namespace_declaration(liveSupportNamespaceUri, - liveSupportNamespacePrefix); - metadata->set_namespace_declaration(dcNamespaceUri, - titleElementPrefix); - metadata->set_namespace_declaration(dctermsNamespaceUri, - extentElementPrefix); - metadata->set_namespace_declaration(xmlNamespaceUri, - xmlNamespacePrefix); - } - - // find the element to be modified - xmlpp::Node::NodeList nodeList = metadata->get_children(name); - xmlpp::Node::NodeList::iterator it = nodeList.begin(); - xmlpp::Element* element = 0; - - while (it != nodeList.end()) { - xmlpp::Node* node = *it; - if (node->get_namespace_prefix() == prefix) { - element = dynamic_cast (nodeList.front()); - break; - } - ++it; - } - - // or add it if it did not exist before - if (it == nodeList.end()) { - element = metadata->add_child(name); - try { - element->set_namespace(prefix); - } - catch (xmlpp::exception &e) { - // this namespace has not been declared; well OK, do nothing then - } - } - - element->set_child_text(*value); -} - - -/*------------------------------------------------------------------------------ - * Return a string containing the essential fields of this object, in XML. - *----------------------------------------------------------------------------*/ -Ptr::Ref -AudioClip :: getXmlElementString(void) const throw () -{ - Ptr::Ref xmlString(new Glib::ustring); - - xmlString->append("<"); - xmlString->append(configElementNameStr + " "); - xmlString->append(idAttrName + "=\"" - + std::string(*id) - + "\" "); - xmlString->append(Glib::ustring(titleAttrName) + "=\"" - + *title - + "\" "); - xmlString->append(playlengthAttrName + "=\"" - + toFixedString(playlength) - + "\"/>"); - return xmlString; -} - - -/*------------------------------------------------------------------------------ - * Return a string containing an XML representation of this audio clip. - *----------------------------------------------------------------------------*/ -Ptr::Ref -AudioClip :: getXmlDocumentString() const throw () -{ - Ptr::Ref localDocument; - - if (xmlAudioClip) { - localDocument = xmlAudioClip; - } else { - localDocument.reset(new xmlpp::Document()); - xmlpp::Element* rootNode = localDocument->create_root_node( - configElementNameStr); - if (id) { - rootNode->set_attribute(idAttrName, std::string(*id)); - } - - xmlpp::Element* metadata = rootNode->add_child(metadataElementName); - metadata->set_namespace_declaration(defaultNamespaceUri); - metadata->set_namespace_declaration(liveSupportNamespaceUri, - liveSupportNamespacePrefix); - metadata->set_namespace_declaration(dcNamespaceUri, - titleElementPrefix); - metadata->set_namespace_declaration(dctermsNamespaceUri, - extentElementPrefix); - metadata->set_namespace_declaration(xmlNamespaceUri, - xmlNamespacePrefix); - } - - Ptr::Ref metadataString(new Glib::ustring( - localDocument->write_to_string() )); - return metadataString; -} - - -/*------------------------------------------------------------------------------ - * Read the metadata contained in the id3v2 tag of the binary sound file. - *----------------------------------------------------------------------------*/ -void -AudioClip :: readTag(Ptr::Ref metadataTypes) - throw (std::invalid_argument) -{ - if (!getUri()) { - throw std::invalid_argument("audio clip has no uri field"); - } - - std::string uri = *getUri(); - if (uri.substr(0,7) == "file://") { - uri = uri.substr(7); - } else if (uri.substr(0,5) == "file:") { - uri = uri.substr(5); - } - - if (!TagLib::File::isReadable(uri.c_str())) { - throw std::invalid_argument("binary sound file not found"); - } - - TagLib::MPEG::File mpegFile(uri.c_str()); - TagLib::ID3v2::Tag* id3v2Tag = mpegFile.ID3v2Tag(); - if (id3v2Tag) { - Ptr::Ref metadata; - Ptr::Ref value; - - TagLib::ID3v2::FrameListMap frameListMap = id3v2Tag->frameListMap(); - TagLib::ID3v2::FrameListMap::ConstIterator it; - - for (it = frameListMap.begin(); it != frameListMap.end(); ++it) { - std::string keyString(it->first.data(), 4); - try { - metadata = metadataTypes->getById3Tag(keyString); - TagLib::ID3v2::FrameList frameList = it->second; - if (!frameList.isEmpty()) { - value.reset(new const Glib::ustring( - frameList.front()->toString().to8Bit(true))); - setMetadata(value, *metadata->getDcName()); - } - } catch (std::invalid_argument &e) { - // id3v2 tag name not found in MetadataTypeContainer - // TODO: print warning? - } - } - return; - } - - TagLib::FileRef genericFileRef(uri.c_str()); - TagLib::Tag* tag = genericFileRef.tag(); - if (tag) { - TagLib::String stringValue; - TagLib::uint intValue; - Ptr::Ref value; - - stringValue = tag->artist(); - if (!stringValue.isNull()) { - value.reset(new const Glib::ustring(stringValue.to8Bit(true))); - setMetadata(value, "dc:creator"); - } - - stringValue = tag->title(); - if (!stringValue.isNull()) { - value.reset(new const Glib::ustring(stringValue.to8Bit(true))); - setMetadata(value, "dc:title"); - } - - stringValue = tag->album(); - if (!stringValue.isNull()) { - value.reset(new const Glib::ustring(stringValue.to8Bit(true))); - setMetadata(value, "dc:source"); - } - - stringValue = tag->comment(); - if (!stringValue.isNull()) { - value.reset(new const Glib::ustring(stringValue.to8Bit(true))); - setMetadata(value, "dc:description"); - } - - stringValue = tag->genre(); - if (!stringValue.isNull()) { - value.reset(new const Glib::ustring(stringValue.to8Bit(true))); - setMetadata(value, "dc:type"); - } - - intValue = tag->year(); - if (intValue != 0) { - std::stringstream yearString; - yearString << intValue; - value.reset(new const Glib::ustring(yearString.str())); - setMetadata(value, "ls:year"); - } - - intValue = tag->track(); - if (intValue != 0) { - std::stringstream trackString; - trackString << intValue; - value.reset(new const Glib::ustring(trackString.str())); - setMetadata(value, "ls:track_num"); - } - } -} - - -/*------------------------------------------------------------------------------ - * Separate a key into the metadata name and its namespace - *----------------------------------------------------------------------------*/ -void -LiveSupport::Core :: separateNameAndNameSpace(const std::string & key, - std::string & name, - std::string & prefix) - throw () -{ - unsigned int colonPosition = key.find(':'); - - if (colonPosition != std::string::npos) { // there is a colon - prefix = key.substr(0, colonPosition); - name = key.substr(colonPosition+1); - } else { // no colon found - prefix = ""; - name = key; - } -} - diff --git a/src/modules/core/src/AudioClipTest.cxx b/src/modules/core/src/AudioClipTest.cxx deleted file mode 100644 index 2f470a598..000000000 --- a/src/modules/core/src/AudioClipTest.cxx +++ /dev/null @@ -1,272 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/AudioClip.h" -#include "LiveSupport/Core/Playlist.h" -#include "AudioClipTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(AudioClipTest); - -/** - * The name of the configuration file for the audio clip. - */ -static const std::string configFileName = "etc/audioClip.xml"; - -/** - * The name of the configuration file for the resource bundle. - */ -static const std::string bundleConfigFileName = "etc/resourceBundle.xml"; - -/** - * The name of the configuration file for the metadata type container. - */ -static const std::string metadataConfigFileName - = "etc/metadataTypeContainer.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: setUp(void) throw (CPPUNIT_NS::Exception) -{ - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, false)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - audioClip.reset(new AudioClip()); - audioClip->configure(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in audio clip configuration file"); - } catch (xmlpp::exception &e) { - std::string eMsg = "error parsing audio clip configuration file\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - - Ptr::Ref bundle; - try { - Ptr::Ref parser( - new xmlpp::DomParser(bundleConfigFileName, false)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - bundle = LocalizedObject::getBundle(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (std::exception &e) { - std::string eMsg = "error parsing audio clip configuration file\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - CPPUNIT_ASSERT(bundle); - - try { - Ptr::Ref parser( - new xmlpp::DomParser(metadataConfigFileName, false)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - metadataTypes.reset(new MetadataTypeContainer(bundle)); - metadataTypes->configure(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in metadata configuration file"); - } catch (xmlpp::exception &e) { - std::string eMsg = "error parsing metadata configuration file\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - CPPUNIT_ASSERT(audioClip); - CPPUNIT_ASSERT(audioClip->getId()); - CPPUNIT_ASSERT(audioClip->getId()->getId() == 0x1); - Ptr::Ref duration - = audioClip->getPlaylength(); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT(duration->hours() == 0); - CPPUNIT_ASSERT(duration->minutes() == 18); - CPPUNIT_ASSERT(duration->seconds() == 30); - - Ptr::Ref title = audioClip->getTitle(); - CPPUNIT_ASSERT(title); - CPPUNIT_ASSERT(*title == "File Title txt"); - - Ptr::Ref subject = audioClip - ->getMetadata("dc:subject"); - CPPUNIT_ASSERT(subject); - CPPUNIT_ASSERT(*subject == "Keywords: qwe, asd, zcx"); - - Ptr::Ref alternativeTitle = audioClip - ->getMetadata("dcterms:alternative"); - CPPUNIT_ASSERT(alternativeTitle); - CPPUNIT_ASSERT(*alternativeTitle == - "Alternative File Title ín sőmé %$#@* LÁNGŰAGÉ"); - - CPPUNIT_ASSERT(audioClip->getXmlElementString()); - CPPUNIT_ASSERT(*audioClip->getXmlElementString() == - ""); -} - - -/*------------------------------------------------------------------------------ - * Test conversion to and from Playable - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: conversionTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref playable = audioClip; - CPPUNIT_ASSERT(playable->getType() == Playable::AudioClipType); - - Ptr::Ref otherAudioClip = playable->getAudioClip(); - CPPUNIT_ASSERT(otherAudioClip == audioClip); - - Ptr::Ref playlist = playable->getPlaylist(); - CPPUNIT_ASSERT(!playlist); -} - - -/*------------------------------------------------------------------------------ - * Test id3v2 tag extraction - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: tagTest(void) - throw (CPPUNIT_NS::Exception) -{ - // should work with either plain file path... - Ptr::Ref uri(new std::string("var/test10001.mp3")); - audioClip->setUri(uri); - try { - audioClip->readTag(metadataTypes); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - Ptr::Ref title - = audioClip->getMetadata("dc:title"); - CPPUNIT_ASSERT(*title == "Theme Song"); - - Ptr::Ref artist - = audioClip->getMetadata("dc:creator"); - CPPUNIT_ASSERT(*artist == "The Muppets"); - - Ptr::Ref album - = audioClip->getMetadata("dc:source"); - CPPUNIT_ASSERT(*album == "מוישה אופניק"); - - // ... or with URI - uri.reset(new std::string("file:var/test10001.mp3")); - audioClip->setUri(uri); - try { - audioClip->readTag(metadataTypes); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - title = audioClip->getMetadata("dc:title"); - CPPUNIT_ASSERT(*title == "Theme Song"); - - artist = audioClip->getMetadata("dc:creator"); - CPPUNIT_ASSERT(*artist == "The Muppets"); - - album = audioClip->getMetadata("dc:source"); - CPPUNIT_ASSERT(*album == "מוישה אופניק"); - // Moshe Offnik is the Israeli/Palestinian version of Oscar The Grouch -} - - -/*------------------------------------------------------------------------------ - * Marshalling test - *----------------------------------------------------------------------------*/ -void -AudioClipTest :: marshallingTest(void) - throw (CPPUNIT_NS::Exception) -{ - XmlRpc::XmlRpcValue xmlRpcValue = *audioClip; - CPPUNIT_ASSERT(xmlRpcValue.hasMember("audioClip")); - - Ptr::Ref otherAudioClip; - CPPUNIT_ASSERT_NO_THROW(otherAudioClip.reset(new AudioClip(xmlRpcValue))); - - CPPUNIT_ASSERT(*audioClip->getId() == *otherAudioClip->getId()); - CPPUNIT_ASSERT(*audioClip->getTitle() - == *otherAudioClip->getTitle()); - CPPUNIT_ASSERT(*audioClip->getPlaylength() - == *otherAudioClip->getPlaylength()); -} - diff --git a/src/modules/core/src/AudioClipTest.h b/src/modules/core/src/AudioClipTest.h deleted file mode 100644 index c51b05b12..000000000 --- a/src/modules/core/src/AudioClipTest.h +++ /dev/null @@ -1,138 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef AudioClipTest_h -#define AudioClipTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include "LiveSupport/Core/AudioClip.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the AudioClip class. - * - * @see AudioClip - */ -class AudioClipTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(AudioClipTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(conversionTest); - CPPUNIT_TEST(tagTest); - CPPUNIT_TEST(marshallingTest); - CPPUNIT_TEST_SUITE_END(); - - private: - /** - * The audio clip to test. - */ - Ptr::Ref audioClip; - - /** - * The list of supported metadata types. - */ - Ptr::Ref metadataTypes; - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing conversion to and from Playable. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - conversionTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Id3v2 tag extraction test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - tagTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing conversion to and from XmlRpcValue. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - marshallingTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (CPPUNIT_NS::Exception); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // AudioClipTest_h - diff --git a/src/modules/core/src/BaseTestMethod.cxx b/src/modules/core/src/BaseTestMethod.cxx deleted file mode 100644 index fb26c1360..000000000 --- a/src/modules/core/src/BaseTestMethod.cxx +++ /dev/null @@ -1,144 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#else -#error need sys/types.h -#endif - -#ifdef HAVE_PWD_H -#include -#else -#error need pwd.h -#endif - -#ifdef HAVE_ERRNO_H -#include -#else -#error need errno.h -#endif - -#include - -#include "LiveSupport/Core/BaseTestMethod.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Return the current working directory - *----------------------------------------------------------------------------*/ -std::string -BaseTestMethod :: getCwd(void) throw () -{ - size_t size = 100; - char * buffer; - - while (true) { - buffer = new char[size]; - if (getcwd(buffer, size)) { - break; - } - delete[] buffer; - if (errno != ERANGE) { - return ""; - } - size *= 2; - } - - std::string cwd(buffer); - delete[] buffer; - return cwd; -} - - -/*------------------------------------------------------------------------------ - * Return the full path for a configuration file. - *----------------------------------------------------------------------------*/ -std::string -BaseTestMethod :: getConfigFile(const std::string configFileName) - throw (std::invalid_argument) -{ - std::string fileName; - std::ifstream file; - - // first, try with ~/.campcaster/configFileName - struct passwd * pwd = getpwuid(getuid()); - if (pwd) { - fileName += pwd->pw_dir; - fileName += "/.campcaster/" + configFileName; - file.open(fileName.c_str()); - if (file.good()) { - file.close(); - return fileName; - } - file.close(); - file.clear(); - } - - // second, try with ./etc/configFileName - fileName = getCwd() + "/etc/" + configFileName; - file.open(fileName.c_str()); - if (file.good()) { - file.close(); - return fileName; - } - file.close(); - - throw std::invalid_argument("can't find config file " + configFileName); -} - - -/*------------------------------------------------------------------------------ - * Return a configuration document - *----------------------------------------------------------------------------*/ -const xmlpp::Document * -BaseTestMethod :: getConfigDocument(xmlpp::DomParser & parser, - const std::string configFileName) - throw (std::invalid_argument, - std::exception) -{ - std::string realFileName = getConfigFile(configFileName); - parser.set_validate(); - parser.parse_file(realFileName); - return parser.get_document(); -} - diff --git a/src/modules/core/src/EnumerationConstraint.cxx b/src/modules/core/src/EnumerationConstraint.cxx deleted file mode 100644 index e657df9e4..000000000 --- a/src/modules/core/src/EnumerationConstraint.cxx +++ /dev/null @@ -1,128 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "EnumerationConstraint.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -namespace { - -/*------------------------------------------------------------------------------ - * The value of the type attribute for this class. - *----------------------------------------------------------------------------*/ -const std::string typeAttributeValue = "enumeration"; - -} - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a constraint element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -EnumerationConstraint :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != getConfigElementName()) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - const xmlpp::Attribute* typeAttribute; - if (!(typeAttribute = element.get_attribute(typeAttributeName))) { - throw std::invalid_argument("missing attribute " + typeAttributeName); - } - std::string type = typeAttribute->get_value(); - - if (type != typeAttributeValue) { - throw std::invalid_argument(typeAttributeValue - + " constraint configured with a" - + " constraint element of type " - + type); - } - - xmlpp::Node::NodeList childNodes = element.get_children(valueElementName); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - if (it == childNodes.end()) { - throw std::invalid_argument("empty enumeration constraint"); - } - - for (; it != childNodes.end(); ++it) { - readValue(*it); - } -} - - -/*------------------------------------------------------------------------------ - * Read an enumeration value from an XML node. - *----------------------------------------------------------------------------*/ -void -EnumerationConstraint :: readValue(const xmlpp::Node * node) - throw (std::invalid_argument) -{ - const xmlpp::Element * valueElement - = dynamic_cast (node); - if (valueElement) { - allowedValues.push_back(valueElement->get_child_text() - ->get_content() ); - } else { - throw std::invalid_argument("bad sub-element found in constraint"); - } -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint. - *----------------------------------------------------------------------------*/ -bool -EnumerationConstraint :: check(Ptr::Ref value) const - throw (std::logic_error) -{ - if (!value) { - throw std::logic_error("EnumerationConstraint::check() called with " - "a 0 pointer value"); - } - - ListType::const_iterator it; - for (it = allowedValues.begin(); it != allowedValues.end(); ++it) { - if (*it == *value) { - return true; - } - } - - return false; -} - diff --git a/src/modules/core/src/EnumerationConstraint.h b/src/modules/core/src/EnumerationConstraint.h deleted file mode 100644 index d10d24ac4..000000000 --- a/src/modules/core/src/EnumerationConstraint.h +++ /dev/null @@ -1,166 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_EnumerationConstraint_h -#define LiveSupport_Core_EnumerationConstraint_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include "LiveSupport/Core/MetadataConstraint.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for representing a metadata constraint allowing only strings from - * a given list of values. - * - * This is a concrete subclass of MetadataConstraint. Do not explicitly - * instantiate this class; create a MetadataConstraint object instead, and - * configure it with an XML element with the appropriate type attribute. - * - * This object has to be configured with an XML configuration element - * called constraint. This may look like the following: - * - *

- *  
- *      Monday
- *      ...
- *      Sunday
- *  
- *  
- * - * A metadata type with this kind of constraint can only accept one of the - * strings listed in the value elements (in a case-sensitive way). - * - * The DTD for the expected XML element looks like the following: - * - *

- *  
- *  
- *  
- *  
- * - * @see EnumerationConstraintContainer - */ -class EnumerationConstraint : public MetadataConstraint -{ - private: - /** - * The type for storing the enumeration values. - */ - typedef std::vector ListType; - - /** - * The list of allowed enumeration values. - */ - ListType allowedValues; - - /** - * Read an enumeration value from an XML node. - * - * @param node the node containing the value. - * @exception std::invalid_argument if the XML node is not - * of the expected form. - */ - void - readValue(const xmlpp::Node * node) throw (std::invalid_argument); - - - public: - /** - * Constructor. - */ - EnumerationConstraint() throw () - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~EnumerationConstraint(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return MetadataConstraint::getConfigElementName(); - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Check that the given value satisfies the constraint. - * - * @param value the value to be checked against the constraint. - * @return true if the value satisfies the constraint. - * @exception std::logic_error if the parameter is a 0 pointer. - */ - virtual bool - check(Ptr::Ref value) const - throw (std::logic_error); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_EnumerationConstraint_h - diff --git a/src/modules/core/src/FadeInfo.cxx b/src/modules/core/src/FadeInfo.cxx deleted file mode 100644 index b2dc869d6..000000000 --- a/src/modules/core/src/FadeInfo.cxx +++ /dev/null @@ -1,133 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/FadeInfo.h" - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string FadeInfo::configElementNameStr = "fadeInfo"; - -/** - * The name of the attribute to get the id of the audio clip. - */ -static const std::string idAttrName = "id"; - -/** - * The name of the attribute to get the fade in. - */ -static const std::string fadeInAttrName = "fadeIn"; - -/** - * The name of the attribute to get the fade out. - */ -static const std::string fadeOutAttrName = "fadeOut"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a fade info object based on an XML element. - *----------------------------------------------------------------------------*/ -void -FadeInfo :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - std::string eMsg = "bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!(attribute = element.get_attribute(idAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - id.reset(new UniqueId(attribute->get_value())); - - if (!(attribute = element.get_attribute(fadeInAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - Ptr::Ref fadeInString(new std::string( - attribute->get_value() )); - fadeIn = TimeConversion::parseTimeDuration(fadeInString); - - if (!(attribute = element.get_attribute(fadeOutAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - Ptr::Ref fadeOutString(new std::string( - attribute->get_value() )); - fadeOut = TimeConversion::parseTimeDuration(fadeOutString); -} - - -/*------------------------------------------------------------------------------ - * Return a string containing the essential fields of this object, in XML. - *----------------------------------------------------------------------------*/ -Ptr::Ref -FadeInfo :: getXmlElementString(void) throw () -{ - Ptr::Ref xmlString(new Glib::ustring); - - xmlString->append("<"); - xmlString->append(configElementNameStr + " "); - xmlString->append(idAttrName + "=\"" - + std::string(*id) - + "\" "); - xmlString->append(fadeInAttrName + "=\"" - + toFixedString(fadeIn) - + "\" "); - xmlString->append(fadeOutAttrName + "=\"" - + toFixedString(fadeOut) - + "\"/>"); - return xmlString; -} - diff --git a/src/modules/core/src/FadeInfoTest.cxx b/src/modules/core/src/FadeInfoTest.cxx deleted file mode 100644 index 5e7163c9d..000000000 --- a/src/modules/core/src/FadeInfoTest.cxx +++ /dev/null @@ -1,128 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/FadeInfo.h" -#include "FadeInfoTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(FadeInfoTest); - -/** - * The name of the configuration file for the audio clip. - */ -static const std::string configFileName = "etc/fadeInfo.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -FadeInfoTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -FadeInfoTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -FadeInfoTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - Ptr::Ref fadeInfo(new FadeInfo()); - - fadeInfo->configure(*root); - - CPPUNIT_ASSERT(fadeInfo->getId()->getId() == 0x9901); - - Ptr::Ref - fadeIn = fadeInfo->getFadeIn(); - CPPUNIT_ASSERT(fadeIn->hours() == 0); - CPPUNIT_ASSERT(fadeIn->minutes() == 0); - CPPUNIT_ASSERT(fadeIn->seconds() == 2); - - Ptr::Ref - fadeOut = fadeInfo->getFadeOut(); - CPPUNIT_ASSERT(fadeOut->hours() == 0); - CPPUNIT_ASSERT(fadeOut->minutes() == 0); - CPPUNIT_ASSERT(fadeOut->seconds() == 1); - CPPUNIT_ASSERT(fadeOut->fractional_seconds() == 500); - - CPPUNIT_ASSERT(*fadeInfo->getXmlElementString() == - ""); - - } catch (std::invalid_argument &e) { - std::string eMsg = "semantic error in configuration file:\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } catch (xmlpp::exception &e) { - std::string eMsg = "error parsing configuration file:\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } -} diff --git a/src/modules/core/src/FadeInfoTest.h b/src/modules/core/src/FadeInfoTest.h deleted file mode 100644 index ceed7031a..000000000 --- a/src/modules/core/src/FadeInfoTest.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef FadeInfoTest_h -#define FadeInfoTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the FadeInfo class. - * - * @see FadeInfo - */ -class FadeInfoTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(FadeInfoTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // FadeInfoTest_h - diff --git a/src/modules/core/src/FileTools.cxx b/src/modules/core/src/FileTools.cxx deleted file mode 100644 index f0199f82c..000000000 --- a/src/modules/core/src/FileTools.cxx +++ /dev/null @@ -1,332 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author: fgerlits $ - Version : $Revision$ - Location : $URL: svn+ssh://fgerlits@code.campware.org/home/svn/repo/livesupport/trunk/livesupport/src/modules/core/src/FileTools.cxx $ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_TIME_H -#include -#else -#error need time.h -#endif - -#ifdef HAVE_TIME_H -#include -#else -#error need stdio.h -#endif - - -#include -#include - -#include - -#include -#include -#include - -#include "LiveSupport/Core/FileTools.h" - - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Copy the contents of a URL to a local file. - *----------------------------------------------------------------------------*/ -void -FileTools :: copyUrlToFile(const std::string & url, - const std::string & path) - throw (std::runtime_error) -{ - FILE* file = fopen(path.c_str(), "wb"); - if (!file) { - throw std::runtime_error("File location is not writable."); - } - - CURL* handle = curl_easy_init(); - if (!handle) { - fclose(file); - throw std::runtime_error("Could not obtain curl handle."); - } - - int status = curl_easy_setopt(handle, CURLOPT_URL, url.c_str()); - status |= curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); - status |= curl_easy_setopt(handle, CURLOPT_HTTPGET, 1); - - if (status) { - fclose(file); - throw std::runtime_error("Could not set curl options."); - } - - status = curl_easy_perform(handle); - - if (status) { - fclose(file); - throw std::runtime_error("Error downloading file."); - } - - curl_easy_cleanup(handle); - fclose(file); -} - - -/*------------------------------------------------------------------------------ - * Upload the contents of a local file to a writable URL. - *----------------------------------------------------------------------------*/ -void -FileTools :: copyFileToUrl(const std::string & path, - const std::string & url) - throw (std::runtime_error) -{ - FILE* file = fopen(path.c_str(), "rb"); - if (!file) { - throw std::runtime_error("File not found."); - } - fseek(file, 0, SEEK_END); - long fileSize = ftell(file); - rewind(file); - - CURL* handle = curl_easy_init(); - if (!handle) { - throw std::runtime_error("Could not obtain curl handle."); - } - - int status = curl_easy_setopt(handle, CURLOPT_READDATA, file); - status |= curl_easy_setopt(handle, CURLOPT_INFILESIZE, fileSize); - // works for files of size up to 2 GB - status |= curl_easy_setopt(handle, CURLOPT_PUT, 1); - status |= curl_easy_setopt(handle, CURLOPT_URL, url.c_str()); -// status |= curl_easy_setopt(handle, CURLOPT_HEADER, 1); -// status |= curl_easy_setopt(handle, CURLOPT_ENCODING, "deflate"); - - if (status) { - throw std::runtime_error("Could not set curl options."); - } - - status = curl_easy_perform(handle); - - if (status) { - throw std::runtime_error("Error uploading file."); - } - - curl_easy_cleanup(handle); - fclose(file); -} - - -/*------------------------------------------------------------------------------ - * Create a temporary file name - *----------------------------------------------------------------------------*/ -const std::string -FileTools :: tempnam(void) throw () -{ - std::string fileName(::tempnam(NULL, NULL)); - - return fileName; -} - - -/*------------------------------------------------------------------------------ - * Append a file to an existing tarball - *----------------------------------------------------------------------------*/ -void -FileTools :: appendFileToTarball(const std::string & tarFileName, - const std::string & newFileRealName, - const std::string & newFileInTarball) - throw (std::runtime_error) -{ - TAR * tar; - off_t tarFileEnd; // keeps read position it tarball - - // first chop off the existing EOF from the tarball - - // open for reading first to determine where EOT block begins - if (tar_open(&tar, - (char*) tarFileName.c_str(), - NULL, - O_RDONLY, - 0, - 0) == -1) { - throw std::runtime_error("can't open tarball"); - } - - // go through all files in tarball and record end position - // of the last file read - tarFileEnd = 0; - while (th_read(tar) == 0) { - if (TH_ISREG(tar)) { - tar_skip_regfile(tar); - } - tarFileEnd = lseek(tar->fd, 0, SEEK_CUR); - } - - // at this point, tarFileEnd is position where EOT block begins - tar_close(tar); // close for reading - - //truncate EOT from the tarball - if (truncate(tarFileName.c_str(), tarFileEnd) == -1) { - throw std::runtime_error("can't truncate tarball"); - } - - // and now append the new file, and put an EOF at the end - - // open truncated tarball (without EOT block) for writing and append - if (tar_open(&tar, - (char*) tarFileName.c_str(), - NULL, - O_WRONLY | O_APPEND, - 0666, - 0) == -1) { - throw std::runtime_error("can't open tarball"); - } - - // add the new file - if (tar_append_file(tar, - (char*) newFileRealName.c_str(), - (char*) newFileInTarball.c_str()) == -1) { - tar_close(tar); - throw std::runtime_error("can't append file to tarball"); - } - - // add EOT at the end and close tarball - tar_append_eof(tar); - tar_close(tar); -} - - -/*------------------------------------------------------------------------------ - * Check if a file is in the tarball - *----------------------------------------------------------------------------*/ -bool -FileTools :: existsInTarball(const std::string & tarFileName, - const std::string & fileName) - throw (std::runtime_error) -{ - TAR * tar; - bool result = false; - - if (tar_open(&tar, - (char*) tarFileName.c_str(), - NULL, - O_RDONLY, - 0, - 0) == -1) { - throw std::runtime_error("can't open tarball"); - } - - while (th_read(tar) == 0) { - if (TH_ISREG(tar)) { - char * path = th_get_pathname(tar); - - if (fileName == path) { - result = true; - break; - } - - tar_skip_regfile(tar); - } - } - - // at this point, tarFileEnd is position where EOT block begins - tar_close(tar); // close for reading - - return result; -} - - -/*------------------------------------------------------------------------------ - * Extract a file from a tarball. - *----------------------------------------------------------------------------*/ -void -FileTools :: extractFileFromTarball(const std::string & tarFileName, - const std::string & fileInTarball, - const std::string & fileExtracted) - throw (std::runtime_error) -{ - TAR * tar; - bool found = false; - - if (tar_open(&tar, - (char*) tarFileName.c_str(), - NULL, - O_RDONLY, - 0, - 0) == -1) { - throw std::runtime_error("can't open tarball"); - } - - while (th_read(tar) == 0) { - if (TH_ISREG(tar)) { - char * path = th_get_pathname(tar); - - if (fileInTarball == path) { - found = true; - if (tar_extract_file(tar, - (char *) fileExtracted.c_str()) != 0) { - std::string errorMsg = "can't extract file "; - errorMsg += fileInTarball; - errorMsg += " from tarball "; - errorMsg += tarFileName; - throw std::runtime_error(errorMsg); - } - break; - } - - tar_skip_regfile(tar); - } - } - - // at this point, tarFileEnd is position where EOT block begins - tar_close(tar); // close for reading - - if (!found) { - std::string errorMsg = "could not find file "; - errorMsg += fileInTarball; - errorMsg += " in the tarball "; - errorMsg += tarFileName; - throw std::runtime_error(errorMsg); - } -} - diff --git a/src/modules/core/src/FileToolsTest.cxx b/src/modules/core/src/FileToolsTest.cxx deleted file mode 100644 index 9f23f8112..000000000 --- a/src/modules/core/src/FileToolsTest.cxx +++ /dev/null @@ -1,149 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author: fgerlits $ - Version : $Revision: 1871 $ - Location : $URL: svn+ssh://maroy@code.campware.org/home/svn/repo/livesupport/trunk/livesupport/src/modules/core/src/FileToolsTest.cxx $ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/FileTools.h" -#include "LiveSupport/Core/Playlist.h" -#include "FileToolsTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(FileToolsTest); - -namespace { - -/** - * The name of the test tar file - */ -const std::string tarFileName = "var/hello.tar"; - -/** - * The name of the test file in the tar file - */ -const std::string fileInTarName = "hello"; - -/** - * The name of the test file after extraction - */ -const std::string fileExtracted = "tmp/hello.txt"; - -} - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -FileToolsTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -FileToolsTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the sample hello tarfile is accessible - *----------------------------------------------------------------------------*/ -void -FileToolsTest :: existsInTarTest(void) - throw (CPPUNIT_NS::Exception) -{ - CPPUNIT_ASSERT(FileTools::existsInTarball(tarFileName, fileInTarName)); - CPPUNIT_ASSERT(!FileTools::existsInTarball(tarFileName, "foobar")); -} - - -/*------------------------------------------------------------------------------ - * Test to see if the sample hello tarfile is accessible - *----------------------------------------------------------------------------*/ -void -FileToolsTest :: extractFileFromTarballTest(void) - throw (CPPUNIT_NS::Exception) -{ - FILE * file; - - remove(fileExtracted.c_str()); - file = fopen(fileExtracted.c_str(), "r"); - CPPUNIT_ASSERT(file == 0); - - CPPUNIT_ASSERT_NO_THROW( - FileTools::extractFileFromTarball(tarFileName, - fileInTarName, - fileExtracted) - ); - - file = fopen(fileExtracted.c_str(), "r"); - CPPUNIT_ASSERT(file != 0); - CPPUNIT_ASSERT(fclose(file) == 0); - - CPPUNIT_ASSERT(remove(fileExtracted.c_str()) == 0); - file = fopen(fileExtracted.c_str(), "r"); - CPPUNIT_ASSERT(file == 0); - - CPPUNIT_ASSERT_THROW( - FileTools::extractFileFromTarball(tarFileName, - "foobar", - fileExtracted), - std::runtime_error - ); -} - diff --git a/src/modules/core/src/FileToolsTest.h b/src/modules/core/src/FileToolsTest.h deleted file mode 100644 index 1ca7dbda3..000000000 --- a/src/modules/core/src/FileToolsTest.h +++ /dev/null @@ -1,111 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef FileToolsTest_h -#define FileToolsTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include "LiveSupport/Core/FileTools.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the FileTools class. - * - * @see FileTools - */ -class FileToolsTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(FileToolsTest); - CPPUNIT_TEST(existsInTarTest); - CPPUNIT_TEST(extractFileFromTarballTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - protected: - - /** - * Test the existsInTarball() function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - existsInTarTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the extractFileFromTarball() function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - extractFileFromTarballTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // FileToolsTest_h - diff --git a/src/modules/core/src/LocalizedConfigurable.cxx b/src/modules/core/src/LocalizedConfigurable.cxx deleted file mode 100644 index dca0d9172..000000000 --- a/src/modules/core/src/LocalizedConfigurable.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/LocalizedConfigurable.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The name of the attribute to get the path of the resource bundle. - */ -static const std::string pathAttrName = "path"; - -/** - * The name of the attribute to get the locale of the resource bundle. - */ -static const std::string localeAttrName = "locale"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Load a resource bunlde based on an XML configuration element. - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurable :: configure(const xmlpp::Element & element) - throw (std::invalid_argument, - std::logic_error) -{ - if (element.get_name() != LocalizedObject::getConfigElementName()) { - std::string eMsg = "Bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!(attribute = element.get_attribute(pathAttrName))) { - std::string eMsg = "Missing attribute "; - eMsg += pathAttrName; - throw std::invalid_argument(eMsg); - } - bundlePath = attribute->get_value(); - - if (!(attribute = element.get_attribute(localeAttrName))) { - std::string eMsg = "Missing attribute "; - eMsg += localeAttrName; - throw std::invalid_argument(eMsg); - } - std::string locale = attribute->get_value(); - - changeLocale(locale); -} - - -/*------------------------------------------------------------------------------ - * Change the resource bundle to reflect the specified locale - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurable :: changeLocale(const std::string newLocale) - throw (std::invalid_argument) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref resourceBundle( - new ResourceBundle(bundlePath.c_str(), - newLocale.c_str(), - status)); - if (!U_SUCCESS(status)) { - throw std::invalid_argument("opening resource bundle a failure"); - } - - setBundle(resourceBundle); -} - - diff --git a/src/modules/core/src/LocalizedConfigurableTest.cxx b/src/modules/core/src/LocalizedConfigurableTest.cxx deleted file mode 100644 index 87cbee3a3..000000000 --- a/src/modules/core/src/LocalizedConfigurableTest.cxx +++ /dev/null @@ -1,167 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include - -#include "LiveSupport/Core/LocalizedConfigurable.h" -#include "LocalizedConfigurableTest.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(LocalizedConfigurableTest); - -/** - * The name of the configuration file for the resource bundle. - */ -static const std::string configFileName = "etc/resourceBundle.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurableTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurableTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurableTest :: simpleTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref locConf(new LocalizedConfigurable()); - - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - locConf->configure(*root); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (std::exception &e) { - CPPUNIT_FAIL(e.what()); - } - - try { - Ptr::Ref section1(new LocalizedObject( - locConf->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("fou") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * A test to see if chaning the locale works. - *----------------------------------------------------------------------------*/ -void -LocalizedConfigurableTest :: changeLocaleTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref locConf(new LocalizedConfigurable()); - - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - locConf->configure(*root); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (std::exception &e) { - CPPUNIT_FAIL(e.what()); - } - - // see if all is OK in english - try { - Ptr::Ref section1(new LocalizedObject( - locConf->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("fou") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - // see if all is OK when changing to hungarian. - try { - locConf->changeLocale("hu"); - - Ptr::Ref section1(new LocalizedObject( - locConf->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->charAt(0) == 0x0066); // 'f' - CPPUNIT_ASSERT(foo->charAt(1) == 0x00fa); // 'u' with acute - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - // see if all is OK when changing to japanese. - try { - locConf->changeLocale("jp"); - - Ptr::Ref section1(new LocalizedObject( - locConf->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->charAt(0) == 0x3075); // hiragana fu - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - diff --git a/src/modules/core/src/LocalizedConfigurableTest.h b/src/modules/core/src/LocalizedConfigurableTest.h deleted file mode 100644 index 279b0ad0b..000000000 --- a/src/modules/core/src/LocalizedConfigurableTest.h +++ /dev/null @@ -1,108 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LocalizedConfigurableTest_h -#define LocalizedConfigurableTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the LocalizedConfigurable class. - * - * @see LocalizedObject - */ -class LocalizedConfigurableTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(LocalizedConfigurableTest); - CPPUNIT_TEST(simpleTest); - CPPUNIT_TEST(changeLocaleTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - simpleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if changing the locale works. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - changeLocaleTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LocalizedConfigurableTest_h - diff --git a/src/modules/core/src/LocalizedObject.cxx b/src/modules/core/src/LocalizedObject.cxx deleted file mode 100644 index 37e5c4a14..000000000 --- a/src/modules/core/src/LocalizedObject.cxx +++ /dev/null @@ -1,335 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include "LiveSupport/Core/LocalizedObject.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string LocalizedObject::configElementNameStr = "resourceBundle"; - -/** - * The name of the attribute to get the path of the resource bundle. - */ -static const std::string pathAttrName = "path"; - -/** - * The name of the attribute to get the locale of the resource bundle. - */ -static const std::string localeAttrName = "locale"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Load a resource bunlde based on an XML configuration element. - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: getBundle(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - std::string eMsg = "Bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!(attribute = element.get_attribute(pathAttrName))) { - std::string eMsg = "Missing attribute "; - eMsg += pathAttrName; - throw std::invalid_argument(eMsg); - } - std::string path = attribute->get_value(); - - if (!(attribute = element.get_attribute(localeAttrName))) { - std::string eMsg = "Missing attribute "; - eMsg += localeAttrName; - throw std::invalid_argument(eMsg); - } - std::string locale = attribute->get_value(); - - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref resourceBundle( - new ResourceBundle(path.c_str(), - locale.c_str(), - status)); - if (!U_SUCCESS(status)) { - throw std::invalid_argument("opening resource bundle a failure"); - } - - return resourceBundle; -} - - -/*------------------------------------------------------------------------------ - * Get a resource bundle by the specified key - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: getBundle(Ptr::Ref bundle, - const char * key) - throw (std::invalid_argument) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref resourceBundle(new ResourceBundle( - bundle->getWithFallback(key, status))); - if (!U_SUCCESS(status)) { - std::string eMsg = "can't get resource bundle for key '"; - eMsg += key; - eMsg += "' and locale '"; - eMsg += bundle->getLocale().getName(); - eMsg += "'"; - throw std::invalid_argument(eMsg); - } - - return resourceBundle; -} - - -/*------------------------------------------------------------------------------ - * Get a string from a resource bundle in the ICU string format - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: getResourceString(Ptr::Ref bundle, - const char * key) - throw (std::invalid_argument) -{ - Ptr::Ref rb = getBundle(bundle, key); - if (rb->getType() == URES_STRING) { - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref str(new UnicodeString(rb->getString(status))); - if (!U_SUCCESS(status)) { - throw std::invalid_argument("requested resource not a string"); - } - - return str; - } else { - throw std::invalid_argument("requested resource not a string"); - } -} - - -/*------------------------------------------------------------------------------ - * Format a message - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: formatMessage(Ptr::Ref pattern, - Formattable * arguments, - unsigned int nArguments) - throw (std::invalid_argument) -{ - Ptr::Ref message(new UnicodeString()); - UErrorCode err = U_ZERO_ERROR; - MessageFormat::format(*pattern, arguments, nArguments, *message, err); - if (!U_SUCCESS(err)) { - throw std::invalid_argument("can't format string"); - } - - return message; -} - - -/*------------------------------------------------------------------------------ - * Format a message, based on a resource key for its pattern - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: formatMessage(const char * patternKey, - Formattable * arguments, - unsigned int nArguments) - throw (std::invalid_argument) -{ - return unicodeStringToUstring( - formatMessage(getResourceString(patternKey), arguments, nArguments)); -} - - -/*------------------------------------------------------------------------------ - * Format a message, based on a resource key for its pattern - * and one argument for formatting. - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: formatMessage(const std::string & patternKey, - const Glib::ustring & argument1) - throw (std::invalid_argument) -{ - Ptr::Ref uArgument1 = ustringToUnicodeString(argument1); - Formattable arguments[] = { *uArgument1 }; - - return formatMessage(patternKey, arguments, 1); -} - - -/*------------------------------------------------------------------------------ - * Format a message, based on a resource key for its pattern - * and two arguments for formatting. - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: formatMessage(const std::string & patternKey, - const Glib::ustring & argument1, - const Glib::ustring & argument2) - throw (std::invalid_argument) -{ - Ptr::Ref uArgument1 = ustringToUnicodeString(argument1); - Ptr::Ref uArgument2 = ustringToUnicodeString(argument2); - Formattable arguments[] = { *uArgument1, - *uArgument2 }; - - return formatMessage(patternKey, arguments, 2); -} - - -/*------------------------------------------------------------------------------ - * Format a message, based on a resource key for its pattern - * and one argument for formatting. - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: formatMessage(const std::string & patternKey, - const Glib::ustring & argument1, - const Glib::ustring & argument2, - const Glib::ustring & argument3) - throw (std::invalid_argument) -{ - Ptr::Ref uArgument1 = ustringToUnicodeString(argument1); - Ptr::Ref uArgument2 = ustringToUnicodeString(argument2); - Ptr::Ref uArgument3 = ustringToUnicodeString(argument3); - Formattable arguments[] = { *uArgument1, - *uArgument2, - *uArgument3 }; - return formatMessage(patternKey, arguments, 3); -} - - -/*------------------------------------------------------------------------------ - * Create a Glib ustring from an ICU UnicodeString - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: unicodeStringToUstring( - Ptr::Ref unicodeString) - throw () -{ - const UChar * uchars = unicodeString->getBuffer(); - int32_t length = unicodeString->length(); - Ptr::Ref ustr(new Glib::ustring()); - ustr->reserve(length); - - while (length--) { - ustr->push_back((gunichar) (*(uchars++))); - } - - return ustr; -} - - -/*------------------------------------------------------------------------------ - * Create an ICU UnicodeString from a Glib ustring - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: ustringToUnicodeString( - Ptr::Ref gString) - throw () -{ - Ptr::Ref uString(new UnicodeString()); - - Glib::ustring::const_iterator it = gString->begin(); - Glib::ustring::const_iterator end = gString->end(); - while (it < end) { - uString->append((UChar32) *it++); - } - - return uString; -} - - -/*------------------------------------------------------------------------------ - * Create an ICU UnicodeString from a Glib ustring - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: ustringToUnicodeString(const Glib::ustring & gString) - throw () -{ - Ptr::Ref uString(new UnicodeString()); - - Glib::ustring::const_iterator it = gString.begin(); - Glib::ustring::const_iterator end = gString.end(); - while (it < end) { - uString->append((UChar32) *it++); - } - - return uString; -} - - -/*------------------------------------------------------------------------------ - * Get a string from a resource bundle in the ICU string format - *----------------------------------------------------------------------------*/ -Ptr::Ref -LocalizedObject :: getBinaryResourceAsUstring(const char * key) - throw (std::invalid_argument) -{ - Ptr::Ref rb = getBundle(key); - if (rb->getType() == URES_BINARY) { - int32_t length; - UErrorCode status = U_ZERO_ERROR; - const uint8_t * data = rb->getBinary(length, status); - if (!U_SUCCESS(status)) { - throw std::invalid_argument("could not get requested " - "binary resource"); - } - char * strBuf = new char[length + 1]; - memcpy(strBuf, data, length); - strBuf[length] = 0; - Ptr::Ref string(new Glib::ustring(strBuf)); - if (string->validate()) { - return string; - } else { - std::string errorMessage = "invalid UTF-8 sequence found "; - errorMessage += "in resource '"; - errorMessage += key; - errorMessage += "'"; - throw std::invalid_argument(errorMessage); - } - } else { - throw std::invalid_argument("requested resource is not a binary value"); - } -} - diff --git a/src/modules/core/src/LocalizedObjectTest.cxx b/src/modules/core/src/LocalizedObjectTest.cxx deleted file mode 100644 index c334cd196..000000000 --- a/src/modules/core/src/LocalizedObjectTest.cxx +++ /dev/null @@ -1,342 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include - -#include "LiveSupport/Core/LocalizedObject.h" -#include "LocalizedObjectTest.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(LocalizedObjectTest); - -/** - * The name of the configuration file for the resource bundle. - */ -static const std::string configFileName = "etc/resourceBundle.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: simpleTest(void) - throw (CPPUNIT_NS::Exception) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref bundle(new ResourceBundle("./tmp/" PACKAGE_NAME, - "root", - status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - - try { - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("foo") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * A test to see different locales and fallback to work. - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: fallbackTest(void) - throw (CPPUNIT_NS::Exception) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref rootBundle; - Ptr::Ref enBundle; - - rootBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "root", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - enBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "en", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - - // first, see the root bundle - try { - Ptr::Ref locObj(new LocalizedObject(rootBundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("foo") == 0); - Ptr::Ref bar = section1->getResourceString("bar"); - CPPUNIT_ASSERT(bar->compare("bar") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - // now, the en bundle - try { - Ptr::Ref locObj(new LocalizedObject(enBundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("fou") == 0); - Ptr::Ref bar = section1->getResourceString("bar"); - CPPUNIT_ASSERT(bar->compare("bar") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * A test to see funny unicode characters to work. - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: unicodeTest(void) - throw (CPPUNIT_NS::Exception) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref huBundle; - Ptr::Ref jpBundle; - - huBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "hu", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - try { - Ptr::Ref locObj(new LocalizedObject(huBundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->charAt(0) == 0x0066); // 'f' - CPPUNIT_ASSERT(foo->charAt(1) == 0x00fa); // 'u' with acute - Ptr::Ref bar = section1->getResourceString("bar"); - CPPUNIT_ASSERT(bar->charAt(0) == 0x0062); // 'b' - CPPUNIT_ASSERT(bar->charAt(1) == 0x00e1); // 'a' with acute - CPPUNIT_ASSERT(bar->charAt(2) == 0x0072); // 'r' - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - jpBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "jp", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - try { - Ptr::Ref locObj(new LocalizedObject(jpBundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->charAt(0) == 0x3075); // hiragana fu - Ptr::Ref bar = section1->getResourceString("bar"); - CPPUNIT_ASSERT(bar->charAt(0) == 0x3070); // hiragana ba - CPPUNIT_ASSERT(bar->charAt(1) == 0x308b); // hiragana ru - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * Test message formatting. - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: formatMessageTest(void) - throw (CPPUNIT_NS::Exception) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref bundle(new ResourceBundle("./tmp/" PACKAGE_NAME, - "root", - status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - - try { - Ptr::Ref message; - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref messages(new LocalizedObject( - locObj->getBundle("messages"))); - Formattable arguments[] = { "p1", "p2" }; - - // test formatting through a key - message = messages->formatMessage("aMessage", arguments, 2); - CPPUNIT_ASSERT(*message == "parameter 0: p1, parameter 1: p2"); - - // test formatting through an explicit pattern - Ptr::Ref uMessage; - Ptr::Ref pattern(new UnicodeString( - "only 1 parameter: {0}")); - uMessage = LocalizedObject::formatMessage(pattern, arguments, 1); - CPPUNIT_ASSERT(uMessage->compare("only 1 parameter: p1") == 0); - - // test formatting through a key, and a fixed number of parameters - message = messages->formatMessage("aMessage3Args", "p0"); - CPPUNIT_ASSERT(*message == "p0: p0, p2: {2}, p1: {1}"); - message = messages->formatMessage("aMessage3Args", "p0", "p1"); - CPPUNIT_ASSERT(*message == "p0: p0, p2: {2}, p1: p1"); - message = messages->formatMessage("aMessage3Args", "p0", "p1", "p2"); - CPPUNIT_ASSERT(*message == "p0: p0, p2: p2, p1: p1"); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * Test to see if resource bundle can be loaded based on a config file - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: loadFromConfigTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref bundle; - - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - bundle = LocalizedObject::getBundle(*root); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (std::exception &e) { - CPPUNIT_FAIL(e.what()); - } - CPPUNIT_ASSERT(bundle.get()); - - // now, see if this really is the en bundle - try { - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceString("foo"); - CPPUNIT_ASSERT(foo->compare("fou") == 0); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * Test the ustring related functions. - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: ustringTest(void) - throw (CPPUNIT_NS::Exception) -{ - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref bundle(new ResourceBundle("./tmp/" PACKAGE_NAME, - "root", - status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - - // test getting an ustring resource - try { - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = section1->getResourceUstring("foo"); - CPPUNIT_ASSERT(*foo == "foo"); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - // test message formatting to ustring - try { - Ptr::Ref message; - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref messages(new LocalizedObject( - locObj->getBundle("messages"))); - Formattable arguments[] = { "p1", "p2" }; - - // test formatting through a key - message = messages->formatMessage("aMessage", arguments, 2); - CPPUNIT_ASSERT(*message == "parameter 0: p1, parameter 1: p2"); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } -} - - -/*------------------------------------------------------------------------------ - * Test the ustring related functions in problematic situations - * see http://bugs.campware.org/view.php?id=792 - *----------------------------------------------------------------------------*/ -void -LocalizedObjectTest :: ustringNegativeTest(void) - throw (CPPUNIT_NS::Exception) -{ - bool gotException; - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref bundle(new ResourceBundle("./tmp/" PACKAGE_NAME, - "root", - status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - - // test getting a missing ustring resource - gotException = false; - try { - Ptr::Ref locObj(new LocalizedObject(bundle)); - Ptr::Ref section1(new LocalizedObject( - locObj->getBundle("section1"))); - Ptr::Ref foo = - section1->getResourceUstring("nonexistentKey"); - } catch (std::invalid_argument &e) { - gotException = true; - } - CPPUNIT_ASSERT(gotException); -} - - diff --git a/src/modules/core/src/LocalizedObjectTest.h b/src/modules/core/src/LocalizedObjectTest.h deleted file mode 100644 index 7fdeeba35..000000000 --- a/src/modules/core/src/LocalizedObjectTest.h +++ /dev/null @@ -1,156 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LocalizedObjectTest_h -#define LocalizedObjectTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the LocalizedObject class. - * - * @see LocalizedObject - */ -class LocalizedObjectTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(LocalizedObjectTest); - CPPUNIT_TEST(simpleTest); - CPPUNIT_TEST(fallbackTest); - CPPUNIT_TEST(unicodeTest); - CPPUNIT_TEST(formatMessageTest); - CPPUNIT_TEST(loadFromConfigTest); - CPPUNIT_TEST(ustringTest); - CPPUNIT_TEST(ustringNegativeTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - simpleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test to see if multiple locales work, and they fall back to - * more generic values. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - fallbackTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test to see if funny unicode characters work properly. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - unicodeTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if message formatting works all right. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - formatMessageTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if a resource bundle can be loaded based on a - * configuration file - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - loadFromConfigTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to check the Glib::ustring related functions. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - ustringTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to check the Glib::ustring related function beaviour - * in problematic situations. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - ustringNegativeTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LocalizedObjectTest_h - diff --git a/src/modules/core/src/Md5.cxx b/src/modules/core/src/Md5.cxx deleted file mode 100644 index edf0f2d3b..000000000 --- a/src/modules/core/src/Md5.cxx +++ /dev/null @@ -1,586 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ------------------------------------------------------------------------------ - - This class is based on the following with minor modifications - (see http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html). - - ------------------------------------------------------------------------------ - -// Md5.CC - source code for the C++/object oriented translation and -// modification of Md5. - -// Translation and modification (c) 1995 by Mordechai T. Abzug - -// This translation/ modification is provided "as is," without express or -// implied warranty of any kind. - -// The translator/ modifier does not claim (1) that Md5 will do what you think -// it does; (2) that this translation/ modification is accurate; or (3) that -// this software is "merchantible." (Language for this disclaimer partially -// copied from the disclaimer below). - - ------------------------------------------------------------------------------ - - Which was based on: - - ------------------------------------------------------------------------------ - - Md5.H - header file for Md5C.C - MDDRIVER.C - test driver for MD2, MD4 and Md5 - - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All -rights reserved. - -License to copy and use this software is granted provided that it -is identified as the "RSA Data Security, Inc. Md5 Message-Digest -Algorithm" in all material mentioning or referencing this software -or this function. - -License is also granted to make and use derivative works provided -that such works are identified as "derived from the RSA Data -Security, Inc. Md5 Message-Digest Algorithm" in all material -mentioning or referencing the derived work. - -RSA Data Security, Inc. makes no representations concerning either -the merchantability of this software or the suitability of this -software for any particular purpose. It is provided "as is" -without express or implied warranty of any kind. - -These notices must be retained in any copies of any part of this -documentation and/or software. - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "LiveSupport/Core/Md5.h" - -#include -#include -#include - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Construct from a string. - *----------------------------------------------------------------------------*/ -Md5::Md5(const std::string &s) throw(std::invalid_argument) -{ - init(); - update (s); - finalize(); - calcNumericRepresentation(); -} - - -/*------------------------------------------------------------------------------ - * Construct from an istream. - *----------------------------------------------------------------------------*/ -Md5::Md5(std::istream& stream) throw(std::invalid_argument) -{ - init(); - update (stream); - finalize(); - calcNumericRepresentation(); -} - - -/*------------------------------------------------------------------------------ - * Construct from a file. - *----------------------------------------------------------------------------*/ -Md5::Md5(FILE *file) throw(std::invalid_argument) -{ - init(); - update(file); - finalize (); - calcNumericRepresentation(); -} - - -/*------------------------------------------------------------------------------ - * Output the md5 sum as a hexadecimal string. - *----------------------------------------------------------------------------*/ -std::string Md5::hexDigest() throw() -{ - std::stringstream strStr; - - for (int i=0; i<16; i++) { - strStr << std::hex << std::setw(2) << std::setfill('0') - << int(digest[i]); - } - - return strStr.str(); -} - - -/*------------------------------------------------------------------------------ - * Calculate the numeric representation of the checksum - *----------------------------------------------------------------------------*/ -void -Md5 :: calcNumericRepresentation(void) throw () -{ - low64 = (uint64_t) digest[15]; - low64 |= ((uint64_t) digest[14]) << 8; - low64 |= ((uint64_t) digest[13]) << 16; - low64 |= ((uint64_t) digest[12]) << 24; - low64 |= ((uint64_t) digest[11]) << 32; - low64 |= ((uint64_t) digest[10]) << 40; - low64 |= ((uint64_t) digest[9]) << 48; - low64 |= ((uint64_t) digest[8]) << 56; - - high64 = (uint64_t) digest[7]; - high64 |= ((uint64_t) digest[6]) << 8; - high64 |= ((uint64_t) digest[5]) << 16; - high64 |= ((uint64_t) digest[4]) << 24; - high64 |= ((uint64_t) digest[3]) << 32; - high64 |= ((uint64_t) digest[2]) << 40; - high64 |= ((uint64_t) digest[1]) << 48; - high64 |= ((uint64_t) digest[0]) << 56; -} - - -/*------------------------------------------------------------------------------ - * Convert the md5 sum to a hexadecimal string. - *----------------------------------------------------------------------------*/ -Md5::operator std::string() throw() -{ - return hexDigest(); -} - - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private methods */ - -// Md5 block update operation. Continues an Md5 message-digest -// operation, processing another message block, and updating the -// context. - -void Md5::update (uint1 *input, uint4 input_length) -{ - uint4 input_index, buffer_index; - uint4 buffer_space; // how much space is left in buffer - - if (finalized){ // so we can't update! - throw std::invalid_argument("Md5::update: " - "Can't update a finalized digest!"); - } - - // Compute number of bytes mod 64 - buffer_index = (unsigned int)((count[0] >> 3) & 0x3F); - - // Update number of bits - if ( (count[0] += ((uint4) input_length << 3))<((uint4) input_length << 3) ) - count[1]++; - - count[1] += ((uint4)input_length >> 29); - - - buffer_space = 64 - buffer_index; // how much space is left in buffer - - // Transform as many times as possible. - if (input_length >= buffer_space) { // ie. we have enough to fill the buffer - // fill the rest of the buffer and transform - memcpy (buffer + buffer_index, input, buffer_space); - transform (buffer); - - // now, transform each 64-byte piece of the input, bypassing the buffer - for (input_index = buffer_space; input_index + 63 < input_length; - input_index += 64) { - transform (input+input_index); - } - buffer_index = 0; // so we can buffer remaining - } else { - input_index=0; // so we can buffer the whole input - } - - // and here we do the buffering: - memcpy(buffer+buffer_index, input+input_index, input_length-input_index); -} - - - -// Md5 update for files. -// Like above, except that it works on files (and uses above as a primitive.) - -void Md5::update(FILE *file) -{ - uint1 buffer[1024]; - uint4 len; - - while ((len=fread(buffer, 1, 1024, file))) - update(buffer, len); - -// deleted by me (fgerlits) to make it work more like the istream version -// fclose (file); -} - - - - - - -// Md5 update for istreams. -// Like update for files; see above. - -void Md5::update(std::istream& stream) -{ - uint1 buffer[1024]; - uint4 len; - - while (stream.good()){ // note that return value of read is unusable. - stream.read((char *)buffer, 1024); - len=stream.gcount(); - update(buffer, len); - } -} - - - - - - -// Md5 update for strings. -// Like update for files; see above. - -void Md5::update(const std::string &s) -{ - uint1 buffer[1024]; - uint4 len; - uint4 pos = 0; - - while (pos < s.size()){ - len = s.copy((char *)buffer, 1024, pos); - update(buffer, len); - pos += len; - } -} - - - - - - -// Md5 finalization. Ends an Md5 message-digest operation, writing the -// the message digest and zeroizing the context. - - -void Md5::finalize () throw (std::invalid_argument) -{ - uint1 bits[8]; - uint4 index, padLen; - static uint1 PADDING[64]={ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - - if (finalized){ - throw std::invalid_argument("Md5::finalize: " - "Already finalized this digest!"); - } - - // Save number of bits - encode (bits, count, 8); - - // Pad out to 56 mod 64. - index = (uint4) ((count[0] >> 3) & 0x3f); - padLen = (index < 56) ? (56 - index) : (120 - index); - update (PADDING, padLen); - - // Append length (before padding) - update (bits, 8); - - // Store state in digest - encode (digest, state, 16); - - // Zeroize sensitive information - memset (buffer, 0, sizeof(*buffer)); - - finalized=1; -} - - - - -// PRIVATE METHODS: - - - -void Md5::init(){ - finalized=0; // we just started! - - // Nothing counted, so count=0 - count[0] = 0; - count[1] = 0; - - // Load magic initialization constants. - state[0] = 0x67452301; - state[1] = 0xefcdab89; - state[2] = 0x98badcfe; - state[3] = 0x10325476; -} - - - -// Constants for Md5Transform routine. -// Although we could use C++ style constants, defines are actually better, -// since they let us easily evade scope clashes. - -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 - - - - -// Md5 basic transformation. Transforms state based on block. -void Md5::transform (uint1 block[64]){ - - uint4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; - - decode (x, block, 64); - - assert(!finalized); // not just a user error, since the method is private - - /* Round 1 */ - FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ - FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ - FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ - FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ - FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ - FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ - FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ - FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ - FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ - FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ - FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ - FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ - FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ - FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ - FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ - FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ - - /* Round 2 */ - GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ - GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ - GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ - GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ - GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ - GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ - GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ - GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ - GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ - GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ - GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ - GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ - GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ - GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ - GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ - GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ - - /* Round 3 */ - HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ - HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ - HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ - HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ - HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ - HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ - HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ - HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ - HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ - HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ - HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ - HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ - HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ - HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ - HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ - HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ - - /* Round 4 */ - II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ - II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ - II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ - II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ - II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ - II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ - II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ - II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ - II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ - II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ - II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ - II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ - II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ - II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ - II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ - II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ - - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; - - // Zeroize sensitive information. - memset ( (uint1 *) x, 0, sizeof(x)); - -} - - - -// Encodes input (UINT4) into output (unsigned char). Assumes len is -// a multiple of 4. -void Md5::encode (uint1 *output, uint4 *input, uint4 len) { - - unsigned int i, j; - - for (i = 0, j = 0; j < len; i++, j += 4) { - output[j] = (uint1) (input[i] & 0xff); - output[j+1] = (uint1) ((input[i] >> 8) & 0xff); - output[j+2] = (uint1) ((input[i] >> 16) & 0xff); - output[j+3] = (uint1) ((input[i] >> 24) & 0xff); - } -} - - - - -// Decodes input (unsigned char) into output (UINT4). Assumes len is -// a multiple of 4. -void Md5::decode (uint4 *output, uint1 *input, uint4 len){ - - unsigned int i, j; - - for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = ((uint4)input[j]) | (((uint4)input[j+1]) << 8) | - (((uint4)input[j+2]) << 16) | (((uint4)input[j+3]) << 24); -} - - - - - -// Note: Replace "for loop" with standard memcpy if possible. -void Md5::memcpy (uint1 *output, uint1 *input, uint4 len){ - - unsigned int i; - - for (i = 0; i < len; i++) - output[i] = input[i]; -} - - - -// Note: Replace "for loop" with standard memset if possible. -void Md5::memset (uint1 *output, uint1 value, uint4 len){ - - unsigned int i; - - for (i = 0; i < len; i++) - output[i] = value; -} - - - -// ROTATE_LEFT rotates x left n bits. - -inline unsigned int Md5::rotate_left (uint4 x, uint4 n){ - return (x << n) | (x >> (32-n)) ; -} - - - - -// F, G, H and I are basic Md5 functions. - -inline unsigned int Md5::F (uint4 x, uint4 y, uint4 z){ - return (x & y) | (~x & z); -} - -inline unsigned int Md5::G (uint4 x, uint4 y, uint4 z){ - return (x & z) | (y & ~z); -} - -inline unsigned int Md5::H (uint4 x, uint4 y, uint4 z){ - return x ^ y ^ z; -} - -inline unsigned int Md5::I (uint4 x, uint4 y, uint4 z){ - return y ^ (x | ~z); -} - - - -// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. -// Rotation is separate from addition to prevent recomputation. - - -inline void Md5::FF(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac){ - a += F(b, c, d) + x + ac; - a = rotate_left (a, s) +b; -} - -inline void Md5::GG(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac){ - a += G(b, c, d) + x + ac; - a = rotate_left (a, s) +b; -} - -inline void Md5::HH(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac){ - a += H(b, c, d) + x + ac; - a = rotate_left (a, s) +b; -} - -inline void Md5::II(uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac){ - a += I(b, c, d) + x + ac; - a = rotate_left (a, s) +b; -} - - - - diff --git a/src/modules/core/src/Md5Test.cxx b/src/modules/core/src/Md5Test.cxx deleted file mode 100644 index 63b8eda5e..000000000 --- a/src/modules/core/src/Md5Test.cxx +++ /dev/null @@ -1,113 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/Md5.h" -#include "Md5Test.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(Md5Test); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -Md5Test :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -Md5Test :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if we can construct some simple md5 sums - *----------------------------------------------------------------------------*/ -void -Md5Test :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - // test the construction from string - Md5 emptyString(""); - CPPUNIT_ASSERT(emptyString.hexDigest() - == "d41d8cd98f00b204e9800998ecf8427e"); - - Md5 someString("Some other random string."); - CPPUNIT_ASSERT(someString.hexDigest() - == "9007a3599f5d3ae2ac11a29308f964eb"); - - std::string s = someString; - CPPUNIT_ASSERT(s == "9007a3599f5d3ae2ac11a29308f964eb"); - CPPUNIT_ASSERT(someString.low64bits() == 0xac11a29308f964ebLL); - CPPUNIT_ASSERT(someString.high64bits() == 0x9007a3599f5d3ae2LL); - - // test the construction from a FILE* - FILE *f = fopen("var/md5test.data", "r"); - Md5 testFile(f); - CPPUNIT_ASSERT(testFile.hexDigest() - == "fc359d2b366cc110db86c3d68bdf39c4"); - fclose(f); - - // test the construction from an istream - std::ifstream ifs("var/md5test.data"); - Md5 testFileStream(ifs); - CPPUNIT_ASSERT(testFileStream.hexDigest() - == "fc359d2b366cc110db86c3d68bdf39c4"); - ifs.close(); -} - diff --git a/src/modules/core/src/Md5Test.h b/src/modules/core/src/Md5Test.h deleted file mode 100644 index 0fb3c821d..000000000 --- a/src/modules/core/src/Md5Test.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef Md5Test_h -#define Md5Test_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the Md5 class. - * - * @see Md5 - */ -class Md5Test : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(Md5Test); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // Md5Test_h - diff --git a/src/modules/core/src/MetadataConstraint.cxx b/src/modules/core/src/MetadataConstraint.cxx deleted file mode 100644 index 1f18a1363..000000000 --- a/src/modules/core/src/MetadataConstraint.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "NumericConstraint.h" -#include "NumericRangeConstraint.h" -#include "EnumerationConstraint.h" - -#include "LiveSupport/Core/MetadataConstraint.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string MetadataConstraint::configElementNameStr = "constraint"; - -/*------------------------------------------------------------------------------ - * The name of the type attribute. - *----------------------------------------------------------------------------*/ -const std::string MetadataConstraint::typeAttributeName = "type"; - -/*------------------------------------------------------------------------------ - * The name of the configuration element for the constraint values. - *----------------------------------------------------------------------------*/ -const std::string MetadataConstraint::valueElementName = "value"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a constraint element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -MetadataConstraint :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - const xmlpp::Attribute* typeAttribute; - if (!(typeAttribute = element.get_attribute(typeAttributeName))) { - throw std::invalid_argument("missing attribute " + typeAttributeName); - } - std::string type = typeAttribute->get_value(); - - if (type == "numeric") { - concreteConstraint.reset(new NumericConstraint()); - concreteConstraint->configure(element); - - } else if (type == "numericRange") { - concreteConstraint.reset(new NumericRangeConstraint()); - concreteConstraint->configure(element); - - } else if (type == "enumeration") { - concreteConstraint.reset(new EnumerationConstraint()); - concreteConstraint->configure(element); - - } else { - throw std::invalid_argument("unknown metadata constraint" + type); - } -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint. - *----------------------------------------------------------------------------*/ -inline bool -MetadataConstraint :: check(Ptr::Ref value) const - throw (std::logic_error) -{ - if (concreteConstraint) { - return concreteConstraint->check(value); - } else { - throw std::logic_error("MetadataConstraint not configured yet"); - } -} - diff --git a/src/modules/core/src/MetadataType.cxx b/src/modules/core/src/MetadataType.cxx deleted file mode 100644 index 27a3339f6..000000000 --- a/src/modules/core/src/MetadataType.cxx +++ /dev/null @@ -1,195 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/MetadataTypeContainer.h" -#include "LiveSupport/Core/MetadataType.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string MetadataType::configElementNameStr = "metadataType"; - -/** - * The name of the attribute of the DC name in the metadataType element. - */ -static const std::string dcNameAttrName = "dcName"; - -/** - * The name of the attribute of the ID3v2 tag in the metadataType element - */ -static const std::string id3TagAttrName = "id3Tag"; - -/** - * The name of the attribute of the localization key in the - * metadataType element. - */ -static const std::string localizationKeyAttrName = "localizationKey"; - -/** - * The name of the attribute of the tab name in the metadataType element - */ -static const std::string tabAttrName = "tab"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -MetadataType :: MetadataType(Ptr::Ref container) - throw () - : container(container), - tab(noTab) -{ -} - - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -MetadataType :: MetadataType(Ptr::Ref container, - Glib::ustring dcName, - Glib::ustring id3Tag, - Glib::ustring localizationKey, - TabType tab) - throw () - : container(container), - tab(tab) -{ - this->dcName.reset(new Glib::ustring(dcName)); - this->id3Tag.reset(new Glib::ustring(id3Tag)); - this->localizationKey.reset(new Glib::ustring(localizationKey)); -} - - -/*------------------------------------------------------------------------------ - * Create a metadata type element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -MetadataType :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - const xmlpp::Attribute* attribute; - - // set the DC name - if (!(attribute = element.get_attribute(dcNameAttrName))) { - throw std::invalid_argument("missing attribute " + dcNameAttrName); - } - dcName.reset(new Glib::ustring(attribute->get_value())); - - // get the ID3v2 tag name, optional - if ((attribute = element.get_attribute(id3TagAttrName))) { - id3Tag.reset(new Glib::ustring(attribute->get_value())); - } - - // get the localization key - if (!(attribute = element.get_attribute(localizationKeyAttrName))) { - throw std::invalid_argument("missing attribute " - + localizationKeyAttrName); - } - localizationKey.reset(new Glib::ustring(attribute->get_value())); - - // get the tab, optional - tab = noTab; - if ((attribute = element.get_attribute(tabAttrName))) { - Glib::ustring tabString = attribute->get_value(); - if (tabString == "main") { - tab = mainTab; - } else if (tabString == "music") { - tab = musicTab; - } else if (tabString == "voice") { - tab = voiceTab; - } - } - - // get the constraint, optional - xmlpp::Node::NodeList childNodes = element.get_children( - MetadataConstraint::getConfigElementName()); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - if (it != childNodes.end()) { - const xmlpp::Element * constraintElement - = dynamic_cast (*it); - if (constraintElement) { - constraint.reset(new MetadataConstraint()); - constraint->configure(*constraintElement); - } - } -} - - -/*------------------------------------------------------------------------------ - * Return the localized name for this metadata type. - *----------------------------------------------------------------------------*/ -Ptr::Ref -MetadataType :: getLocalizedName(void) const - throw (std::invalid_argument) -{ - return container->getResourceUstring(*localizationKey); -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint. - *----------------------------------------------------------------------------*/ -bool -MetadataType :: check(Ptr::Ref value) const - throw () -{ - if (!value) { - return false; - } - - if (constraint) { - try { - return constraint->check(value); - } catch (std::logic_error &e) { - return false; - } - } else { - return true; - } -} - diff --git a/src/modules/core/src/MetadataTypeContainer.cxx b/src/modules/core/src/MetadataTypeContainer.cxx deleted file mode 100644 index 182801876..000000000 --- a/src/modules/core/src/MetadataTypeContainer.cxx +++ /dev/null @@ -1,181 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/MetadataTypeContainer.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string MetadataTypeContainer::configElementNameStr - = "metadataTypeContainer"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a metadata type container element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainer :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - // get the metadataType child elements, and process them - xmlpp::Node::NodeList childNodes = element.get_children( - MetadataType::getConfigElementName()); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - xmlpp::Node::NodeList::iterator end = childNodes.end(); - - while (it != end) { - const xmlpp::Element * metadataTypeElement - = dynamic_cast (*it); - Ptr::Ref metadataType( - new MetadataType(shared_from_this())); - - metadataType->configure(*metadataTypeElement); - - if (dcNameMap.find(*metadataType->getDcName()) != dcNameMap.end()) { - throw std::invalid_argument("trying to insert duplicate metadata " - "type: " + *metadataType->getDcName()); - } - if (metadataType->getId3Tag().get()) { - if (id3TagMap.find(*metadataType->getId3Tag()) != id3TagMap.end()) { - throw std::invalid_argument("trying to insert duplicate " - "metadata by ID3v2 tag: " - + *metadataType->getId3Tag()); - } - } - - dcNameMap[*metadataType->getDcName()] = metadataType; - if (metadataType->getId3Tag().get()) { - id3TagMap[*metadataType->getId3Tag()] = metadataType; - } - vector.push_back(metadataType); - - ++it; - } -} - - -/*------------------------------------------------------------------------------ - * Tell if a metadata type object by the Dublin Core name exists - *----------------------------------------------------------------------------*/ -bool -MetadataTypeContainer :: existsByDcName(const Glib::ustring dcName) const - throw () -{ - return dcNameMap.find(dcName) != dcNameMap.end(); -} - - -/*------------------------------------------------------------------------------ - * Look for a metadata type object by the Dublin Core name - *----------------------------------------------------------------------------*/ -Ptr::Ref -MetadataTypeContainer :: getByDcName(const Glib::ustring dcName) - throw (std::invalid_argument) -{ - if (!existsByDcName(dcName)) { - throw std::invalid_argument("no metadata type by the DC name " +dcName); - } - - return dcNameMap[dcName]; -} - - -/*------------------------------------------------------------------------------ - * Tell if a metadata type object by the ID3v2 tag name exists. - *----------------------------------------------------------------------------*/ -bool -MetadataTypeContainer :: existsById3Tag(const Glib::ustring id3Tag) const - throw () -{ - return id3TagMap.find(id3Tag) != id3TagMap.end(); -} - - -/*------------------------------------------------------------------------------ - * Look for a metadata type object by the ID3v2 tag name. - *----------------------------------------------------------------------------*/ -Ptr::Ref -MetadataTypeContainer :: getById3Tag(const Glib::ustring id3Tag) - throw (std::invalid_argument) -{ - if (!existsById3Tag(id3Tag)) { - throw std::invalid_argument("no metadata type by the ID3v2 Tag " - + id3Tag); - } - - return id3TagMap[id3Tag]; -} - - -/*------------------------------------------------------------------------------ - * Look for a metadata type object by the ID3v2 tag name. - *----------------------------------------------------------------------------*/ -Ptr::Ref -MetadataTypeContainer :: getByIndex(unsigned int index) const - throw (std::invalid_argument) -{ - if (index < 0 || index >= vector.size()) { - throw std::invalid_argument("index out of range in " - "MetadataTypeContainer::getByIndex()"); - } - - return vector.at(index); -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint of a metadata type. - *----------------------------------------------------------------------------*/ -bool -MetadataTypeContainer :: check(Ptr::Ref value, - const Glib::ustring & dcName) - throw (std::invalid_argument) -{ - Ptr::Ref metadataType = getByDcName(dcName); - return metadataType->check(value); -} - diff --git a/src/modules/core/src/MetadataTypeContainerTest.cxx b/src/modules/core/src/MetadataTypeContainerTest.cxx deleted file mode 100644 index fa0b43fb6..000000000 --- a/src/modules/core/src/MetadataTypeContainerTest.cxx +++ /dev/null @@ -1,337 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/MetadataTypeContainer.h" - -#include "MetadataTypeContainerTest.h" - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(MetadataTypeContainerTest); - -/** - * The name of the configuration file for the resource bundle. - */ -static const std::string bundleConfigFileName = "etc/resourceBundle.xml"; - -/** - * The name of the configuration file for the metadataType element. - */ -static const std::string metadataTypeConfigFileName = "etc/metadataType.xml"; - -/** - * The name of the configuration file for the metadataTypeContainer element. - */ -static const std::string configFileName = "etc/metadataTypeContainer.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: setUp(void) throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref rootBundle; - try { - Ptr::Ref parser( - new xmlpp::DomParser(bundleConfigFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - rootBundle = LocalizedObject::getBundle(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in bundle configuration file"); - } catch (std::exception &e) { - CPPUNIT_FAIL(std::string("XML error in bundle configuration file:\n") - + e.what()); - } - CPPUNIT_ASSERT(rootBundle); - - UErrorCode icuError = U_ZERO_ERROR; - bundle.reset(new ResourceBundle(rootBundle->get("metadata", icuError))); - CPPUNIT_ASSERT(U_SUCCESS(icuError)); - CPPUNIT_ASSERT(bundle); - - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - container.reset(new MetadataTypeContainer(bundle)); - container->configure(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(std::string("semantic error in metadata container" - " configuration file:\n") - + e.what()); - } catch (xmlpp::exception &e) { - CPPUNIT_FAIL(std::string("XML error in metadata container" - " configuration file:\n") - + e.what()); - } - -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref metadataType; - bool gotException; - - // test double-configuration - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - gotException = false; - try { - container->configure(*root); - } catch (std::invalid_argument &e) { - gotException = true; - } - CPPUNIT_ASSERT(gotException); - - } catch (xmlpp::exception &e) { - CPPUNIT_FAIL(std::string("XML error in configuration file:\n") - + e.what()); - } - - // a simple positive check on the DC name - CPPUNIT_ASSERT(container->existsByDcName("dc:creator")); - metadataType = container->getByDcName("dc:creator"); - - CPPUNIT_ASSERT(*metadataType->getDcName() == "dc:creator"); - CPPUNIT_ASSERT(*metadataType->getId3Tag() == "TPE1"); - CPPUNIT_ASSERT(*metadataType->getLocalizationKey() == "creator"); - - // a negative check on the DC name - CPPUNIT_ASSERT(!container->existsByDcName("dc:nonExistent")); - - gotException = false; - try { - container->getByDcName("dc:nonExistent"); - } catch (std::invalid_argument &e) { - gotException = true; - } - CPPUNIT_ASSERT(gotException); - - // a simple positive check on the ID3v2 tag - CPPUNIT_ASSERT(container->existsById3Tag("TPE1")); - metadataType = container->getById3Tag("TPE1"); - - CPPUNIT_ASSERT(*metadataType->getDcName() == "dc:creator"); - CPPUNIT_ASSERT(*metadataType->getId3Tag() == "TPE1"); - CPPUNIT_ASSERT(*metadataType->getLocalizationKey() == "creator"); - - // a negative check on the ID3v2 tag - CPPUNIT_ASSERT(!container->existsById3Tag("NonExistentTag")); - - gotException = false; - try { - container->getById3Tag("NonExistentTag"); - } catch (std::invalid_argument &e) { - gotException = true; - } - CPPUNIT_ASSERT(gotException); - - // two simple positive checks on the tab attribute - CPPUNIT_ASSERT(container->existsByDcName("dc:title")); - metadataType = container->getByDcName("dc:title"); - CPPUNIT_ASSERT(metadataType->getTab() == MetadataType::mainTab); - - CPPUNIT_ASSERT(container->existsByDcName("ls:buycdurl")); - metadataType = container->getByDcName("ls:buycdurl"); - CPPUNIT_ASSERT(metadataType->getTab() == MetadataType::noTab); -} - - -/*------------------------------------------------------------------------------ - * Test the iterator feature of the container. - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: iteratorTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref metadataType; - MetadataTypeContainer::Vector::const_iterator it; - MetadataTypeContainer::Vector::const_iterator end; - - // check the first two elements in the container - it = container->begin(); - end = container->end(); - - CPPUNIT_ASSERT(it != end); - metadataType = (Ptr::Ref) *it; - CPPUNIT_ASSERT(*metadataType->getDcName() == "dc:title"); - CPPUNIT_ASSERT(*metadataType->getId3Tag() == "TIT2"); - CPPUNIT_ASSERT(*metadataType->getLocalizationKey() == "title"); - - ++it; - CPPUNIT_ASSERT(it != end); - metadataType = (Ptr::Ref) *it; - CPPUNIT_ASSERT(*metadataType->getDcName() == "dc:creator"); - CPPUNIT_ASSERT(*metadataType->getId3Tag() == "TPE1"); - CPPUNIT_ASSERT(*metadataType->getLocalizationKey() == "creator"); - - // test on an empty container - container.reset(new MetadataTypeContainer(bundle)); - it = container->begin(); - end = container->end(); - CPPUNIT_ASSERT(it == end); -} - - -/*------------------------------------------------------------------------------ - * Test localized metadata type names. - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: localizedTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref metadataType; - - CPPUNIT_ASSERT(container->existsByDcName("dc:creator")); - metadataType = container->getByDcName("dc:creator"); - - CPPUNIT_ASSERT(*metadataType->getLocalizedName() == "Creator"); - - UErrorCode status = U_ZERO_ERROR; - Ptr::Ref rootBundle; - Ptr::Ref huBundle; - Ptr::Ref jpBundle; - Ptr::Ref ustr; - - // test with hungarian - rootBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "hu", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - huBundle.reset(new ResourceBundle(rootBundle->get("metadata", status))); - CPPUNIT_ASSERT(U_SUCCESS(status)); - container->setBundle(huBundle); - - ustr = metadataType->getLocalizedName(); - CPPUNIT_ASSERT(ustr->length() == 6); - CPPUNIT_ASSERT((*ustr)[0] == 0x0045); // 'E' - CPPUNIT_ASSERT((*ustr)[1] == 0x006C); // 'l' - CPPUNIT_ASSERT((*ustr)[2] == 0x0151); // 'o' with double acute - CPPUNIT_ASSERT((*ustr)[3] == 0x0061); // 'a' - CPPUNIT_ASSERT((*ustr)[4] == 0x0064); // 'd' - CPPUNIT_ASSERT((*ustr)[5] == 0x00F3); // 'o' with acute - - // test with japanese - rootBundle.reset(new ResourceBundle("./tmp/" PACKAGE_NAME, "jp", status)); - CPPUNIT_ASSERT(U_SUCCESS(status)); - jpBundle.reset(new ResourceBundle(rootBundle->get("metadata", status))); - CPPUNIT_ASSERT(U_SUCCESS(status)); - container->setBundle(jpBundle); - - ustr = metadataType->getLocalizedName(); - CPPUNIT_ASSERT(ustr->length() == 6); - CPPUNIT_ASSERT((*ustr)[0] == 0x30af); // katakana ku - CPPUNIT_ASSERT((*ustr)[1] == 0x30ea); // katakana ri - CPPUNIT_ASSERT((*ustr)[2] == 0x30a8); // katakana e - CPPUNIT_ASSERT((*ustr)[3] == 0x30fc); // katakana '-' - CPPUNIT_ASSERT((*ustr)[4] == 0x30bf); // katakana ta - CPPUNIT_ASSERT((*ustr)[5] == 0x30fc); // katakana '-' -} - - -/*------------------------------------------------------------------------------ - * Test to see if the constraints work. - *----------------------------------------------------------------------------*/ -void -MetadataTypeContainerTest :: constraintTest(void) - throw (CPPUNIT_NS::Exception) -{ - // test the case of no constraint; everything is OK - Ptr::Ref title; - CPPUNIT_ASSERT(!container->check(title, "dc:title")); // except a 0 pointer - title.reset(new Glib::ustring("Some title")); - CPPUNIT_ASSERT(container->check(title, "dc:title")); - - // test the numeric constraint; [0-9]+ required - Ptr::Ref bpm(new Glib::ustring ("1000")); - CPPUNIT_ASSERT(container->check(bpm, "ls:bpm")); - bpm->assign("2000 or more"); - CPPUNIT_ASSERT(!container->check(bpm, "ls:bpm")); - bpm->assign(""); - CPPUNIT_ASSERT(!container->check(bpm, "ls:bpm")); - - // test the numeric range constraint; [0-9]+ required, between 0 and 3000 - Ptr::Ref year(new Glib::ustring ("1000")); - CPPUNIT_ASSERT(container->check(year, "ls:year")); - year->assign("1066 AD"); - CPPUNIT_ASSERT(!container->check(year, "ls:year")); - year->assign("20066"); - CPPUNIT_ASSERT(!container->check(year, "ls:year")); - - // test the enumeration constraint; "mp3", "mpeg" or "ogg" are allowed - Ptr::Ref format(new Glib::ustring ("mp3")); - CPPUNIT_ASSERT(container->check(format, "dc:format")); - format->assign("wma"); - CPPUNIT_ASSERT(!container->check(format, "dc:format")); -} - diff --git a/src/modules/core/src/MetadataTypeContainerTest.h b/src/modules/core/src/MetadataTypeContainerTest.h deleted file mode 100644 index 5c82fe50d..000000000 --- a/src/modules/core/src/MetadataTypeContainerTest.h +++ /dev/null @@ -1,136 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef MetadataTypeContainerTest_h -#define MetadataTypeContainerTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the MetadataTypeContainer class. - * - * @see MetadataTypeContainer - */ -class MetadataTypeContainerTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(MetadataTypeContainerTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(iteratorTest); - CPPUNIT_TEST(localizedTest); - CPPUNIT_TEST(constraintTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * The resource bundle used by the container. - */ - Ptr::Ref bundle; - - /** - * The metadata container used in the tests. - */ - Ptr::Ref container; - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the iterators available from the container. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - iteratorTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test to see if localized metadata type names work. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - localizedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test to see if the constraints work. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - constraintTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (CPPUNIT_NS::Exception); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // MetadataTypeContainerTest_h - diff --git a/src/modules/core/src/NumericConstraint.cxx b/src/modules/core/src/NumericConstraint.cxx deleted file mode 100644 index f1736900b..000000000 --- a/src/modules/core/src/NumericConstraint.cxx +++ /dev/null @@ -1,104 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "NumericConstraint.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -namespace { - -/*------------------------------------------------------------------------------ - * The value of the type attribute for this class. - *----------------------------------------------------------------------------*/ -const std::string typeAttributeValue = "numeric"; - -} - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a constraint element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -NumericConstraint :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != getConfigElementName()) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - const xmlpp::Attribute* typeAttribute; - if (!(typeAttribute = element.get_attribute(typeAttributeName))) { - throw std::invalid_argument("missing attribute " + typeAttributeName); - } - std::string type = typeAttribute->get_value(); - - if (type != typeAttributeValue) { - throw std::invalid_argument(typeAttributeValue - + " constraint configured with a" - + " constraint element of type " - + type); - } -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint. - *----------------------------------------------------------------------------*/ -bool -NumericConstraint :: check(Ptr::Ref value) const - throw (std::logic_error) -{ - if (!value) { - throw std::logic_error("NumericConstraint::check() called with " - "a 0 pointer value"); - } - - Glib::ustring::const_iterator it = value->begin(); - - if (it == value->end()) { // the empty string is not a number - return false; - } - - for (; it != value->end(); ++it) { - if (*it < '0' || *it > '9') { - return false; - } - } - - return true; -} - diff --git a/src/modules/core/src/NumericConstraint.h b/src/modules/core/src/NumericConstraint.h deleted file mode 100644 index 871e539e8..000000000 --- a/src/modules/core/src/NumericConstraint.h +++ /dev/null @@ -1,138 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_NumericConstraint_h -#define LiveSupport_Core_NumericConstraint_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include "LiveSupport/Core/MetadataConstraint.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for representing a numeric metadata constraint. - * - * This is a concrete subclass of MetadataConstraint. Do not explicitly - * instantiate this class; create a MetadataConstraint object instead, and - * configure it with an XML element with the appropriate type attribute. - * - * This object has to be configured with an XML configuration element - * called constraint. This may look like the following: - * - *

- *  
- *  
- * - * A metadata type with this kind of constraint can only accept (decimal, - * non-negative) integer values, i.e., [0-9]+. - * - * The DTD for the expected XML element looks like the following: - * - *

- *  
- *  
- *  
- * - * @see NumericConstraintContainer - */ -class NumericConstraint : public MetadataConstraint -{ - public: - /** - * Constructor. - */ - NumericConstraint() throw () - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~NumericConstraint(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return MetadataConstraint::getConfigElementName(); - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Check that the given value satisfies the constraint. - * - * @param value the value to be checked against the constraint. - * @return true if the value satisfies the constraint. - * @exception std::logic_error if the parameter is a 0 pointer. - */ - virtual bool - check(Ptr::Ref value) const - throw (std::logic_error); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_NumericConstraint_h - diff --git a/src/modules/core/src/NumericRangeConstraint.cxx b/src/modules/core/src/NumericRangeConstraint.cxx deleted file mode 100644 index 4122df5e2..000000000 --- a/src/modules/core/src/NumericRangeConstraint.cxx +++ /dev/null @@ -1,155 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include - -#include "NumericConstraint.h" - -#include "NumericRangeConstraint.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -namespace { - -/*------------------------------------------------------------------------------ - * The value of the type attribute for this class. - *----------------------------------------------------------------------------*/ -const std::string typeAttributeValue = "numericRange"; - -} - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a constraint element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -NumericRangeConstraint :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != getConfigElementName()) { - throw std::invalid_argument("bad configuration element " - + element.get_name()); - } - - const xmlpp::Attribute* typeAttribute; - if (!(typeAttribute = element.get_attribute(typeAttributeName))) { - throw std::invalid_argument("missing attribute " + typeAttributeName); - } - std::string type = typeAttribute->get_value(); - - if (type != typeAttributeValue) { - throw std::invalid_argument(typeAttributeValue - + " constraint configured with a" - + " constraint element of type " - + type); - } - - xmlpp::Node::NodeList childNodes = element.get_children(valueElementName); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - if (it != childNodes.end()) { - minValue = readNumberFromNode(*it); - } else { - throw std::invalid_argument("sub-element not found in constraint"); - } - - ++it; - if (it != childNodes.end()) { - maxValue = readNumberFromNode(*it); - } else { - throw std::invalid_argument("sub-element not found in constraint"); - } -} - - -/*------------------------------------------------------------------------------ - * Read a number from an xml element. - *----------------------------------------------------------------------------*/ -NumericRangeConstraint :: ValueType -NumericRangeConstraint :: readNumberFromNode( - const xmlpp::Node * node) const - throw (std::invalid_argument) -{ - const xmlpp::Element * valueElement - = dynamic_cast (node); - if (valueElement) { - Ptr::Ref value(new Glib::ustring( - valueElement->get_child_text() - ->get_content() )); - return readNumber(value); - } else { - throw std::invalid_argument("bad sub-element found in constraint"); - } -} - - -/*------------------------------------------------------------------------------ - * Read a number from a string. - *----------------------------------------------------------------------------*/ -NumericRangeConstraint :: ValueType -NumericRangeConstraint :: readNumber( - Ptr::Ref value) const - throw (std::invalid_argument) -{ - NumericConstraint numericConstraint; - if (!numericConstraint.check(value)) { - throw std::invalid_argument("bad number found in constraint"); - } - - std::istringstream valueStream(*value); - ValueType valueNumber; - valueStream >> valueNumber; - - return valueNumber; -} - - -/*------------------------------------------------------------------------------ - * Check that the given value satisfies the constraint. - *----------------------------------------------------------------------------*/ -bool -NumericRangeConstraint :: check(Ptr::Ref value) const - throw (std::logic_error) -{ - ValueType valueNumber = readNumber(value); - - if (valueNumber >= minValue && valueNumber <= maxValue) { - return true; - } else { - return false; - } -} - diff --git a/src/modules/core/src/NumericRangeConstraint.h b/src/modules/core/src/NumericRangeConstraint.h deleted file mode 100644 index ba49a626b..000000000 --- a/src/modules/core/src/NumericRangeConstraint.h +++ /dev/null @@ -1,186 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_Core_NumericRangeConstraint_h -#define LiveSupport_Core_NumericRangeConstraint_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#include "LiveSupport/Core/MetadataConstraint.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A class for representing a metadata constraint which allows numbers between - * two given values (inclusive). - * - * This is a concrete subclass of MetadataConstraint. Do not explicitly - * instantiate this class; create a MetadataConstraint object instead, and - * configure it with an XML element with the appropriate type attribute. - * - * This object has to be configured with an XML configuration element - * called constraint. This may look like the following: - * - *

- *  
- *      1
- *      12
- *  
- *  
- * - * A metadata type with this kind of constraint can only accept (decimal, - * non-negative) integer values, i.e., [0-9]+, which are greater than or - * equal to the first value given, and less than or equal to the second - * value given. - * - * The DTD for the expected XML element looks like the following: - * - *

- *  
- *  
- *  
- *  
- * - * @see NumericRangeConstraintContainer - */ -class NumericRangeConstraint : public MetadataConstraint -{ - private: - /** - * The integer type used by the constraint. - */ - typedef unsigned long long ValueType; - - /** - * The smallest value allowed by the constraint. - */ - ValueType minValue; - - /** - * The largest value allowed by the constraint. - */ - ValueType maxValue; - - /** - * Read a number from an XML node. - * - * @param node the node containing the number. - * @return the number read from the node. - * @exception std::invalid_argument if the XML node is not - * of the expected form. - */ - ValueType - readNumberFromNode(const xmlpp::Node * node) const - throw (std::invalid_argument); - - /** - * Read a number from a string. - * - * @param value the string containing the number. - * @return the number read from the string. - * @exception std::invalid_argument if the string does not contain - * a number. - */ - ValueType - readNumber(Ptr::Ref value) const - throw (std::invalid_argument); - - - public: - /** - * Constructor. - */ - NumericRangeConstraint() throw () - { - } - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~NumericRangeConstraint(void) throw () - { - } - - /** - * Return the name of the XML element this object expects - * to be sent to a call to configure(). - * - * @return the name of the expected XML configuration element. - */ - static const std::string - getConfigElementName(void) throw () - { - return MetadataConstraint::getConfigElementName(); - } - - /** - * Configure the metadata object based on an XML configuration element. - * - * @param element the XML configuration element. - * @exception std::invalid_argument of the supplied XML element - * contains bad configuration information - */ - virtual void - configure(const xmlpp::Element &element) - throw (std::invalid_argument); - - /** - * Check that the given value satisfies the constraint. - * - * @param value the value to be checked against the constraint. - * @return true if the value satisfies the constraint. - * @exception std::logic_error if the parameter is a 0 pointer. - */ - virtual bool - check(Ptr::Ref value) const - throw (std::logic_error); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // LiveSupport_Core_NumericRangeConstraint_h - diff --git a/src/modules/core/src/NumericTools.cxx b/src/modules/core/src/NumericTools.cxx deleted file mode 100644 index 15999393a..000000000 --- a/src/modules/core/src/NumericTools.cxx +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/NumericTools.h" - - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Convert an integer to a string. - *----------------------------------------------------------------------------*/ -Glib::ustring -NumericTools :: itoa(int number) throw () -{ - std::ostringstream stream; - stream << number; - Glib::ustring string = stream.str(); - return string; -} - - -/*------------------------------------------------------------------------------ - * Add a number to the end of a string. - *----------------------------------------------------------------------------*/ -Glib::ustring -NumericTools :: addIndex(const Glib::ustring & baseString, - int index) throw () -{ - std::ostringstream stream; - stream << baseString - << (index + 1); - return stream.str(); -} - diff --git a/src/modules/core/src/NumericToolsTest.cxx b/src/modules/core/src/NumericToolsTest.cxx deleted file mode 100644 index 0affab324..000000000 --- a/src/modules/core/src/NumericToolsTest.cxx +++ /dev/null @@ -1,95 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/NumericTools.h" -#include "NumericToolsTest.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(NumericToolsTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -NumericToolsTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -NumericToolsTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test the itoa() function. - *----------------------------------------------------------------------------*/ -void -NumericToolsTest :: itoaTest(void) - throw (CPPUNIT_NS::Exception) -{ - int i = 3142874; - Glib::ustring a = NumericTools::itoa(i); - CPPUNIT_ASSERT(a == "3142874"); -} - - -/*------------------------------------------------------------------------------ - * Test the addIndex() function. - *----------------------------------------------------------------------------*/ -void -NumericToolsTest :: addIndexTest(void) - throw (CPPUNIT_NS::Exception) -{ - Glib::ustring base = "itemLabel"; - int index = 123; - Glib::ustring result = NumericTools::addIndex(base, index); - CPPUNIT_ASSERT(result == "itemLabel124"); - - Glib::ustring second = NumericTools::addIndex("second", 0); - CPPUNIT_ASSERT(second == "second1"); -} - diff --git a/src/modules/core/src/NumericToolsTest.h b/src/modules/core/src/NumericToolsTest.h deleted file mode 100644 index 046ff76fc..000000000 --- a/src/modules/core/src/NumericToolsTest.h +++ /dev/null @@ -1,111 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef NumericToolsTest_h -#define NumericToolsTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the NumericTools class. - * - * @see NumericTools - */ -class NumericToolsTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(NumericToolsTest); - CPPUNIT_TEST(itoaTest); - CPPUNIT_TEST(addIndexTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * Test the itoa() function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - itoaTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the addIndex() function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - addIndexTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // NumericToolsTest_h - diff --git a/src/modules/core/src/OptionsContainer.cxx b/src/modules/core/src/OptionsContainer.cxx deleted file mode 100644 index 784b0deaa..000000000 --- a/src/modules/core/src/OptionsContainer.cxx +++ /dev/null @@ -1,405 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author $ - Version : $Revision $ - Location : $URL $ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include -#include - -#include "LiveSupport/Core/OptionsContainer.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -OptionsContainer :: OptionsContainer( - const xmlpp::Element & optionsElement, - Ptr::Ref configFileName) - throw () - : configFileName(configFileName), - touched(false) -{ - optionsDocument.create_root_node_by_import(&optionsElement, true); - // true == recursive - - xmlpp::Node::NodeList nodes = optionsElement.get_children( - RdsContainer::getConfigElementName()); - if (nodes.size() > 0) { - rdsContainer.reset(new RdsContainer()); - rdsContainer->configure( - *dynamic_cast(nodes.front())); - } -} - - -/*------------------------------------------------------------------------------ - * Set a string type option. - *----------------------------------------------------------------------------*/ -void -OptionsContainer :: setOptionItem(OptionItemString optionItem, - Ptr::Ref value) - throw (std::invalid_argument) -{ - bool isAttribute = false; // text node or attr node - xmlpp::Node * targetNode = selectNode(optionItem, isAttribute); - - if (!targetNode) { - targetNode = createNode(optionItem); - } - - if (isAttribute) { - xmlpp::Attribute * attr = dynamic_cast(targetNode); - if (attr != 0) { - attr->set_value(*value); - touched = true; - return; - } - } else { - xmlpp::TextNode * text = dynamic_cast(targetNode); - if (text != 0) { - text->set_content(*value); - touched = true; - return; - } - } - - throw std::invalid_argument("option item not found"); -} - - -/*------------------------------------------------------------------------------ - * Get a string type option. - *----------------------------------------------------------------------------*/ -Ptr::Ref -OptionsContainer :: getOptionItem(OptionItemString optionItem) - throw (std::invalid_argument) -{ - bool isAttribute = false; // text node or attr node - const xmlpp::Node * targetNode = selectNode(optionItem, isAttribute); - - if (isAttribute) { - const xmlpp::Attribute * - attr = dynamic_cast(targetNode); - if (attr != 0) { - Ptr::Ref value(new Glib::ustring( - attr->get_value() )); - return value; - } - } else { - const xmlpp::TextNode * - text = dynamic_cast(targetNode); - if (text != 0) { - Ptr::Ref value(new Glib::ustring( - text->get_content() )); - return value; - } - } - - throw std::invalid_argument("option item not found"); -} - - -/*------------------------------------------------------------------------------ - * Set a keyboard shortcut type option. - *----------------------------------------------------------------------------*/ -void -OptionsContainer :: setKeyboardShortcutItem( - int containerNo, - int shortcutNo, - Ptr::Ref value) - throw (std::invalid_argument) -{ - xmlpp::Node * targetNode = selectKeyboardShortcutNode( - containerNo, shortcutNo); - - xmlpp::Attribute * attr = dynamic_cast(targetNode); - if (attr != 0) { - attr->set_value(*value); - touched = true; - return; - - } else { - throw std::invalid_argument("keyboard shortcut not found"); - } -} - - -/*------------------------------------------------------------------------------ - * Set the value of an RDS string. - *----------------------------------------------------------------------------*/ -void -OptionsContainer :: setRdsOptions(Ptr::Ref key, - Ptr::Ref value, - bool enabled) - throw () -{ - if (!rdsContainer) { - rdsContainer.reset(new RdsContainer()); - } - - rdsContainer->setRdsOptions(key, value, enabled); -} - - -/*------------------------------------------------------------------------------ - * Get the value of an RDS string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -OptionsContainer :: getRdsValue(Ptr::Ref key) - throw (std::invalid_argument) -{ - if (rdsContainer) { - return rdsContainer->getRdsValue(key); - } else { - throw std::invalid_argument("no RDS container found"); - } -} - - -/*------------------------------------------------------------------------------ - * Get the enabled/disabled state of an RDS option. - *----------------------------------------------------------------------------*/ -bool -OptionsContainer :: getRdsEnabled(Ptr::Ref key) - throw (std::invalid_argument) -{ - if (rdsContainer) { - return rdsContainer->getRdsEnabled(key); - } else { - throw std::invalid_argument("no RDS container found"); - } -} - - -/*------------------------------------------------------------------------------ - * Find the node corresponding to an OptionItemString value. - *----------------------------------------------------------------------------*/ -xmlpp::Node * -OptionsContainer :: selectNode(OptionItemString optionItem, - bool & isAttribute) - throw (std::invalid_argument) -{ - xmlpp::Node * targetNode = 0; - - switch (optionItem) { - case outputPlayerDeviceName : - targetNode = getNode("outputPlayer/audioPlayer/gstreamerPlayer/" - "@audioDevice"); - isAttribute = true; - break; - - case cuePlayerDeviceName : - targetNode = getNode("cuePlayer/audioPlayer/gstreamerPlayer/" - "@audioDevice"); - isAttribute = true; - break; - - case authenticationServer : - targetNode = getNode("authenticationClientFactory/" - "webAuthentication/location/@server"); - isAttribute = true; - break; - - case authenticationPort : - targetNode = getNode("authenticationClientFactory/" - "webAuthentication/location/@port"); - isAttribute = true; - break; - - case authenticationPath : - targetNode = getNode("authenticationClientFactory/" - "webAuthentication/location/@path"); - isAttribute = true; - break; - - case storageServer : - targetNode = getNode("storageClientFactory/" - "webStorage/location/@server"); - isAttribute = true; - break; - - case storagePort : - targetNode = getNode("storageClientFactory/" - "webStorage/location/@port"); - isAttribute = true; - break; - - case storagePath : - targetNode = getNode("storageClientFactory/" - "webStorage/location/@path"); - isAttribute = true; - break; - - case schedulerServer : - targetNode = getNode("schedulerClientFactory/" - "schedulerDaemonXmlRpcClient/@xmlRpcHost"); - isAttribute = true; - break; - - case schedulerPort : - targetNode = getNode("schedulerClientFactory/" - "schedulerDaemonXmlRpcClient/@xmlRpcPort"); - isAttribute = true; - break; - - case schedulerPath : - targetNode = getNode("schedulerClientFactory/" - "schedulerDaemonXmlRpcClient/@xmlRpcUri"); - isAttribute = true; - break; - - case serialDeviceName : - targetNode = getNode("serialPort/@path"); - isAttribute = true; - break; - } - - return targetNode; -} - - -/*------------------------------------------------------------------------------ - * Find the node corresponding to a keyboard shortcut. - *----------------------------------------------------------------------------*/ -xmlpp::Node * -OptionsContainer :: selectKeyboardShortcutNode(int containerNo, - int shortcutNo) - throw (std::invalid_argument) -{ - std::stringstream xPathStream; - xPathStream << "keyboardShortcutList/keyboardShortcutContainer[" - << containerNo - << "]/keyboardShortcut[" - << shortcutNo - << "]/@key"; - return getNode(xPathStream.str()); -} - - -/*------------------------------------------------------------------------------ - * Return the first node matching an XPath string. - *----------------------------------------------------------------------------*/ -xmlpp::Node * -OptionsContainer :: getNode(const Glib::ustring & xPath) - throw (std::invalid_argument) -{ - xmlpp::Element * rootNode = optionsDocument.get_root_node(); - xmlpp::NodeSet nodes; - - try { - nodes = rootNode->find(xPath); - - } catch (xmlpp::exception &e) { - throw std::invalid_argument(e.what()); - } - - std::vector::iterator it = nodes.begin(); - if (it != nodes.end()) { - return *it; - } else { - return 0; - } -} - - -/*------------------------------------------------------------------------------ - * Create the node corresponding to an OptionItemString value. - *----------------------------------------------------------------------------*/ -xmlpp::Node * -OptionsContainer :: createNode(OptionItemString optionItem) throw () -{ - xmlpp::Element * rootNode = optionsDocument.get_root_node(); - xmlpp::Element * element = 0; - xmlpp::Attribute * attribute = 0; - - // only supports the serialDeviceName option item, for now - switch (optionItem) { - case serialDeviceName : - element = dynamic_cast( - getNode("serialPort")); - if (!element) { - element = rootNode->add_child("serialPort"); - } - attribute = dynamic_cast( - getNode("serialPort/@path")); - if (!attribute) { - attribute = element->set_attribute("path", ""); - } - return attribute; - - default: - return 0; - } -} - - -/*------------------------------------------------------------------------------ - * Save the options to a file. - *----------------------------------------------------------------------------*/ -void -OptionsContainer :: writeToFile(void) throw () -{ - if (configFileName) { - if (rdsContainer && rdsContainer->isTouched()) { - xmlpp::Element * rootNode = optionsDocument.get_root_node(); - xmlpp::Node::NodeList nodes = rootNode->get_children( - RdsContainer::getConfigElementName()); - if (nodes.size() > 0) { - rootNode->remove_child(nodes.front()); - } - rootNode->import_node(rdsContainer->toXmlElement(), true); - } - - std::ofstream file(configFileName->c_str()); - if (file.good()) { - optionsDocument.write_to_stream_formatted(file, "utf-8"); - touched = false; - } - file.close(); - } -} - diff --git a/src/modules/core/src/Playable.cxx b/src/modules/core/src/Playable.cxx deleted file mode 100644 index 9a977f612..000000000 --- a/src/modules/core/src/Playable.cxx +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include "LiveSupport/Core/AudioClip.h" -#include "LiveSupport/Core/Playlist.h" - -#include "LiveSupport/Core/Playable.h" - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Return an audio clip pointer to this object. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playable :: getAudioClip(void) throw () -{ - Ptr::Ref audioClip; - if (type == AudioClipType) { - audioClip = boost::dynamic_pointer_cast - (shared_from_this()); - } - return audioClip; -} - - -/*------------------------------------------------------------------------------ - * Return a playlist pointer to this object. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playable :: getPlaylist(void) throw () -{ - Ptr::Ref playlist; - if (type == PlaylistType) { - playlist = boost::dynamic_pointer_cast - (shared_from_this()); - } - return playlist; -} - diff --git a/src/modules/core/src/Playlist.cxx b/src/modules/core/src/Playlist.cxx deleted file mode 100644 index c05f6da50..000000000 --- a/src/modules/core/src/Playlist.cxx +++ /dev/null @@ -1,971 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/Playlist.h" - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The name of the config element for this class - */ -const std::string Playlist::configElementNameStr = "playlist"; - -/** - * The name of the attribute to get the id of the playlist. - */ -static const std::string idAttrName = "id"; - -/** - * The name of the attribute to get the playlength of the playlist. - */ -static const std::string playlengthAttrName = "playlength"; - -/** - * The name of the attribute to get the title of the playlist. - */ -static const std::string titleAttrName = "title"; - -/** - * The name of playlist element child nodes. - */ -static const std::string elementListAttrName = "playlistElement"; - -/** - * The name of the metadata child element. - */ -static const std::string metadataElementName = "metadata"; - -/** - * The prefix of the extent (length) metadata element. - */ -static const std::string extentElementPrefix = "dcterms"; - -/** - * The name of the extent (length) metadata element. - */ -static const std::string extentElementName = "extent"; - -/** - * The prefix of the title metadata element. - */ -static const std::string titleElementPrefix = "dc"; - -/** - * The name of the title metadata element. - */ -static const std::string titleElementName = "title"; - -/** - * The prefix for the Live Support extension elements. - */ -static const std::string liveSupportNamespacePrefix = "ls"; - -/** - * The prefix for the "xml:" prefix elements. - */ -static const std::string xmlNamespacePrefix = "xml"; - -/** - * The URI identifier for the default namespace - */ -static const std::string defaultNamespaceUri - = "http://mdlf.org/livesupport/elements/1.0/"; - -/** - * The URI identifier for the "ls" prefix. - */ -static const std::string liveSupportNamespaceUri - = "http://mdlf.org/livesupport/elements/1.0/"; - -/** - * The URI identifier for the "dc" prefix - */ -static const std::string dcNamespaceUri - = "http://purl.org/dc/elements/1.1/"; - -/** - * The URI identifier for the "dcterms" prefix - */ -static const std::string dctermsNamespaceUri - = "http://purl.org/dc/terms/"; - -/** - * The URI identifier for the "xml" prefix - */ -static const std::string xmlNamespaceUri - = "http://www.w3.org/XML/1998/namespace"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Copy constructor. - *----------------------------------------------------------------------------*/ -Playlist :: Playlist(const Playlist & otherPlaylist) - throw () - : Playable(PlaylistType), - id (otherPlaylist.id), - title (otherPlaylist.title), - playlength(otherPlaylist.playlength), - uri (otherPlaylist.uri), - token (otherPlaylist.token) -{ - elementList.reset(new PlaylistElementListType); - const_iterator it; - for (it = otherPlaylist.begin(); it != otherPlaylist.end(); ++it) { - Ptr::Ref otherElement(new PlaylistElement( - *it->second )); - elementList->insert(std::make_pair(it->first, otherElement)); - } - - if (otherPlaylist.savedCopy) { - savedCopy.reset(new Playlist(*otherPlaylist.savedCopy)); - } - - if (otherPlaylist.xmlPlaylist) { - xmlPlaylist.reset(new xmlpp::Document); - xmlPlaylist->create_root_node_by_import( - otherPlaylist.xmlPlaylist->get_root_node(), - true); // true == recursive - } -} - - -/*------------------------------------------------------------------------------ - * Test constructor without title. - *----------------------------------------------------------------------------*/ -Playlist :: Playlist(Ptr::Ref id, - Ptr::Ref playlength, - Ptr::Ref uri) - throw () - : Playable(PlaylistType), - id(id), - uri(uri) -{ - this->title.reset(new Glib::ustring("")); - - elementList.reset(new PlaylistElementListType); - - setTitle(title); - setPlaylength(playlength); -} - - -/*------------------------------------------------------------------------------ - * Test constructor with title. - *----------------------------------------------------------------------------*/ -Playlist :: Playlist(Ptr::Ref id, - Ptr::Ref title, - Ptr::Ref playlength, - Ptr::Ref uri) - throw () - : Playable(PlaylistType), - id(id), - uri(uri) -{ - elementList.reset(new PlaylistElementListType); - - setTitle(title); - setPlaylength(playlength); -} - - -/*------------------------------------------------------------------------------ - * Convert to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -Playlist :: operator XmlRpc::XmlRpcValue() const - throw() -{ - XmlRpc::XmlRpcValue xmlRpcValue; - xmlRpcValue[configElementNameStr] = std::string(*getXmlDocumentString()); - - return xmlRpcValue; -} - - -/*------------------------------------------------------------------------------ - * Construct from an XmlRpcValue. - *----------------------------------------------------------------------------*/ -Playlist :: Playlist(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) - : Playable(PlaylistType) -{ - elementList.reset(new PlaylistElementListType); - - if (!xmlRpcValue.hasMember(configElementNameStr)) { - throw std::invalid_argument("no playlist data found in XmlRpcValue"); - } - - xmlpp::DomParser parser; - try { - parser.parse_memory(std::string(xmlRpcValue[configElementNameStr])); - } catch (xmlpp::exception &e) { - throw std::invalid_argument("error parsing XML document"); - } - - configure(*parser.get_document()->get_root_node()); // may throw -} - - -/*------------------------------------------------------------------------------ - * Set the value of the title field. - *----------------------------------------------------------------------------*/ -void -Playlist :: setTitle(Ptr::Ref title) - throw () -{ - setMetadata(title, titleElementName, titleElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Set the value of the playlength field (private). - *----------------------------------------------------------------------------*/ -void -Playlist :: setPlaylength(Ptr::Ref playlength) - throw () -{ - Ptr::Ref playlengthString(new const Glib::ustring( - toFixedString(playlength) )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); -} - - -/*------------------------------------------------------------------------------ - * Set the value of the playlength from a string (private). - *----------------------------------------------------------------------------*/ -void -Playlist :: setPlaylength(Ptr::Ref timeString) - throw (std::invalid_argument) -{ - try { - playlength = TimeConversion::parseTimeDuration(timeString); - } catch (std::exception &e) { - std::string eMsg = "bad time format in playlength: "; - eMsg += e.what(); - throw std::invalid_argument(eMsg); - } -} - - -/*------------------------------------------------------------------------------ - * Create a playlist object based on an XML element. - *----------------------------------------------------------------------------*/ -void -Playlist :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - std::string eMsg = "bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!id) { - if (!(attribute = element.get_attribute(idAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - id.reset(new UniqueId(attribute->get_value())); - } - - if (!playlength - && (attribute = element.get_attribute(playlengthAttrName))) { - Ptr::Ref playlengthString(new Glib::ustring( - attribute->get_value() )); - setMetadata(playlengthString, extentElementName, extentElementPrefix); - } - - if (!title - && (attribute = element.get_attribute(titleAttrName))) { - title.reset(new const Glib::ustring(attribute->get_value())); - setMetadata(title, titleElementName, titleElementPrefix); - } - - xmlpp::Node::NodeList childNodes - = element.get_children(elementListAttrName); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - while (it != childNodes.end()) { - Ptr::Ref newPlaylistElement(new PlaylistElement); - const xmlpp::Element * childElement - = dynamic_cast (*it); - newPlaylistElement->configure(*childElement); // may throw exception - addPlaylistElement(newPlaylistElement); - ++it; - } - - childNodes = element.get_children(metadataElementName); - it = childNodes.begin(); - - if (it != childNodes.end()) { - const xmlpp::Element * metadataElement - = dynamic_cast (*it); - - xmlPlaylist.reset(new xmlpp::Document); - xmlpp::Element* root = xmlPlaylist->create_root_node( - configElementNameStr); - root->set_attribute(idAttrName, std::string(*id)); - root->import_node(metadataElement, true); // true = recursive - - const xmlpp::Node::NodeList dataFieldList - = metadataElement->get_children(); - xmlpp::Node::NodeList::const_iterator listIt = dataFieldList.begin(); - - while (listIt != dataFieldList.end()) { - const xmlpp::Node* dataNode = *listIt; - std::string prefix = dataNode->get_namespace_prefix(); - std::string name = dataNode->get_name(); - const xmlpp::Element* - dataElement - = dynamic_cast (dataNode); - if (!dataElement) { - ++listIt; - continue; - } - - if (!playlength && prefix == extentElementPrefix - && name == extentElementName) { - if (dataElement->has_child_text()) { - Ptr::Ref playlengthString( - new std::string(dataElement->get_child_text() - ->get_content() )); - setPlaylength(playlengthString); - } else { // or just leave blank? bad either way - playlength.reset(new time_duration(0,0,0,0)); - } - } - - if (!title && prefix == titleElementPrefix - && name == titleElementName) { - Glib::ustring value; - if (dataElement->has_child_text()) { - value = dataElement->get_child_text()->get_content(); - } else { - value = ""; - } - Ptr::Ref ptrToValue( - new const Glib::ustring(value)); - title = ptrToValue; - } - - ++listIt; - } - - ++it; - if (it != childNodes.end()) { - std::string eMsg = "more than one "; - eMsg += metadataElementName; - eMsg += " XML element"; - throw std::invalid_argument(eMsg); - } - } - - if (!playlength) { - std::string eMsg = "missing attribute "; - eMsg += playlengthAttrName; - eMsg += " or metadata element "; - eMsg += extentElementPrefix + ":" + extentElementName; - throw std::invalid_argument(eMsg); - } - - if (!title) { - title.reset(new const Glib::ustring("")); - } -} - - -/*------------------------------------------------------------------------------ - * Add a new playlist element to the playlist. - *----------------------------------------------------------------------------*/ -void -Playlist::addPlaylistElement(Ptr::Ref playlistElement) - throw () -{ - Ptr::Ref relativeOffset - = playlistElement->getRelativeOffset(); - elementList->insert(std::make_pair(*relativeOffset, playlistElement)); -} - - -/*------------------------------------------------------------------------------ - * Add a new audio clip or sub-playlist to the playlist. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist::addPlayable(Ptr::Ref playable, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo) - throw (std::invalid_argument) -{ - Ptr::Ref audioClip; - Ptr::Ref playlist; - - switch (playable->getType()) { - case Playable::AudioClipType : - audioClip = boost::dynamic_pointer_cast(playable); - return addAudioClip(audioClip, relativeOffset, fadeInfo); - - case Playable::PlaylistType : - playlist = boost::dynamic_pointer_cast(playable); - return addPlaylist(playlist, relativeOffset, fadeInfo); - - default : - throw std::invalid_argument("Playable object is neither AudioClip" - " nor Playlist?!"); - } -} - - -/*------------------------------------------------------------------------------ - * Add a new audio clip to the playlist. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist::addAudioClip(Ptr::Ref audioClip, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo) - throw () -{ - Ptr::Ref playlistElement(new PlaylistElement( - relativeOffset, audioClip->getPlaylength(), audioClip, fadeInfo)); - elementList->insert(std::make_pair(*relativeOffset, playlistElement)); - - Ptr::Ref endOffset(new time_duration( - *relativeOffset - + *audioClip->getPlaylength())); - if (*endOffset > *playlength) { - setPlaylength(endOffset); - } - - return playlistElement->getId(); -} - - -/*------------------------------------------------------------------------------ - * Add a new sub-playlist to the playlist. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist::addPlaylist(Ptr::Ref playlist, - Ptr::Ref relativeOffset, - Ptr::Ref fadeInfo) - throw () -{ - Ptr::Ref playlistElement(new PlaylistElement( - relativeOffset, playlist->getPlaylength(), playlist, fadeInfo)); - elementList->insert(std::make_pair(*relativeOffset, playlistElement)); - - Ptr::Ref endOffset(new time_duration( - *relativeOffset - + *playlist->getPlaylength())); - if (*endOffset > *playlength) { - setPlaylength(endOffset); - } - - return playlistElement->getId(); -} - - -/*------------------------------------------------------------------------------ - * Get an iterator pointing to a playlist element with a given ID. - *----------------------------------------------------------------------------*/ -Playlist::iterator -Playlist::find(Ptr::Ref playlistElementId) - throw () -{ - Playlist::iterator it = elementList->begin(); - while (it != elementList->end() - && *(it->second->getId()) != *playlistElementId) { - ++it; - } - return it; -} - - -/*------------------------------------------------------------------------------ - * Change the fade in / fade out info of a playlist element. - *----------------------------------------------------------------------------*/ -void -Playlist::setFadeInfo(Ptr::Ref playlistElementId, - Ptr::Ref fadeInfo) - throw (std::invalid_argument) -{ - Playlist::iterator it = this->find(playlistElementId); - - if (it == this->end()) { - throw std::invalid_argument("no playlist element with this ID"); - } - - it->second->setFadeInfo(fadeInfo); -} - -/*------------------------------------------------------------------------------ - * Change clipStart of a playlist element. - *----------------------------------------------------------------------------*/ -void -Playlist::setClipStart(Ptr::Ref playlistElementId, - Ptr::Ref newStart) - throw (std::invalid_argument) -{ - Playlist::iterator it = this->find(playlistElementId); - - if (it == this->end()) { - throw std::invalid_argument("no playlist element with this ID"); - } - - Ptr::Ref endOffset(new time_duration( - *it->second->getRelativeOffset() - + *it->second->getPlayable()->getPlaylength() - *newStart)); - setPlaylength(endOffset); - - it->second->setClipStart(newStart); -} - -/*------------------------------------------------------------------------------ - * Change clipEnd of a playlist element. - *----------------------------------------------------------------------------*/ -void -Playlist::setClipEnd(Ptr::Ref playlistElementId, - Ptr::Ref newEnd) - throw (std::invalid_argument) -{ - Playlist::iterator it = this->find(playlistElementId); - - if (it == this->end()) { - throw std::invalid_argument("no playlist element with this ID"); - } - - Ptr::Ref endOffset(new time_duration( - *it->second->getRelativeOffset() - + *newEnd - *it->second->getClipStart())); - setPlaylength(endOffset); - - it->second->setClipEnd(newEnd); -} - - -/*------------------------------------------------------------------------------ - * Remove a playlist element from the playlist. - *----------------------------------------------------------------------------*/ -void -Playlist::removePlaylistElement(Ptr::Ref playlistElementId) - throw (std::invalid_argument) -{ - Playlist::iterator it = this->find(playlistElementId); - - if (it == this->end()) { - throw std::invalid_argument("no playlist element with this ID"); - } - - elementList->erase(it); -} - - -/*------------------------------------------------------------------------------ - * Validate the playlist. - *----------------------------------------------------------------------------*/ -bool -Playlist::valid(void) const throw () -{ - time_duration runningTime(0,0,0,0); - - PlaylistElementListType::const_iterator it = elementList->begin(); - while (it != elementList->end()) { - Ptr::Ref playlistElement = it->second; - - if (playlistElement->getType() == PlaylistElement::PlaylistType - && !playlistElement->getPlaylist()->valid()) { - return false; - } - - time_duration relativeOffset = *playlistElement->getRelativeOffset(); - if (runningTime < relativeOffset) { - return false; // found a gap in the playlist - } - - time_duration endTime = - relativeOffset - + *playlistElement->getPlayable()->getPlaylength(); - if (endTime > runningTime) { - runningTime = endTime; - } - - ++it; - } - - if (runningTime != *getPlaylength()) { - return false; - } - - return true; -} - - -/*------------------------------------------------------------------------------ - * Create a saved copy of the playlist. - *----------------------------------------------------------------------------*/ -void -Playlist::createSavedCopy(void) throw () -{ - savedCopy = Ptr::Ref(new Playlist(*this)); -} - - -/*------------------------------------------------------------------------------ - * Revert to a saved copy of the playlist. - *----------------------------------------------------------------------------*/ -void -Playlist::revertToSavedCopy(void) throw (std::invalid_argument) -{ - if (savedCopy == 0) { - throw (std::invalid_argument("playlist has no saved copy")); - } - - this->id = savedCopy->id; - this->title = savedCopy->title; - this->playlength = savedCopy->playlength; - this->uri = savedCopy->uri; - this->token = savedCopy->token; - this->elementList = savedCopy->elementList; - this->xmlPlaylist = savedCopy->xmlPlaylist; - - savedCopy.reset(); -} - - -/*------------------------------------------------------------------------------ - * Return the value of a metadata field. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist :: getMetadata(const std::string & key) const - throw () -{ - std::string name, prefix; - separateNameAndNameSpace(key, name, prefix); - - Ptr::Ref value; - - if (! xmlPlaylist) { - return value; - } - xmlpp::Element* rootNode = xmlPlaylist->get_root_node(); - if (! rootNode) { - return value; - } - xmlpp::Node::NodeList rootList = rootNode->get_children( - metadataElementName); - if (rootList.size() == 0) { - return value; - } - - xmlpp::Node* metadata = rootList.front(); - xmlpp::Node::NodeList nodeList = metadata->get_children(name); - xmlpp::Node::NodeList::iterator it = nodeList.begin(); - - while (it != nodeList.end()) { - xmlpp::Node* node = *it; - if (node->get_namespace_prefix() == prefix) { - xmlpp::Element* element = dynamic_cast (node); - xmlpp::TextNode* textNode = element->get_child_text(); - if (textNode) { - value.reset(new Glib::ustring(textNode->get_content())); - } else { - value.reset(new Glib::ustring("")); - } - return value; - } - ++it; - } - - return value; -} - - -/*------------------------------------------------------------------------------ - * Set the value of a metadata field (public). - *----------------------------------------------------------------------------*/ -void -Playlist :: setMetadata(Ptr::Ref value, - const std::string &key) - throw (std::invalid_argument) -{ - std::string name, prefix; - separateNameAndNameSpace(key, name, prefix); - setMetadata(value, name, prefix); -} - - -/*------------------------------------------------------------------------------ - * Set the value of a metadata field (private). - *----------------------------------------------------------------------------*/ -void -Playlist :: setMetadata(Ptr::Ref value, - const std::string &name, const std::string &prefix) - throw (std::invalid_argument) -{ - if (prefix == extentElementPrefix && name == extentElementName) { - Ptr::Ref valueString(new const std::string( - *value)); - setPlaylength(valueString); - } - - if (prefix == titleElementPrefix && name == titleElementName) { - title = value; - } - - // create a new xmlpp::Document for the metadata if necessary - if (! xmlPlaylist) { - xmlPlaylist.reset(new xmlpp::Document); - } - xmlpp::Element* rootNode = xmlPlaylist->get_root_node(); - if (! rootNode) { - rootNode = xmlPlaylist->create_root_node(configElementNameStr); - if (id) { - rootNode->set_attribute(idAttrName, std::string(*id)); - } - } - xmlpp::Node::NodeList rootList = rootNode->get_children( - metadataElementName); - xmlpp::Element* metadata; - if (rootList.size() > 0) { - metadata = dynamic_cast (rootList.front()); - } else { - metadata = rootNode->add_child(metadataElementName); - metadata->set_namespace_declaration(defaultNamespaceUri); - metadata->set_namespace_declaration(liveSupportNamespaceUri, - liveSupportNamespacePrefix); - metadata->set_namespace_declaration(dcNamespaceUri, - titleElementPrefix); - metadata->set_namespace_declaration(dctermsNamespaceUri, - extentElementPrefix); - metadata->set_namespace_declaration(xmlNamespaceUri, - xmlNamespacePrefix); - } - - // find the element to be modified - xmlpp::Node::NodeList nodeList = metadata->get_children(name); - xmlpp::Node::NodeList::iterator it = nodeList.begin(); - xmlpp::Element* element = 0; - - while (it != nodeList.end()) { - xmlpp::Node* node = *it; - if (node->get_namespace_prefix() == prefix) { - element = dynamic_cast (nodeList.front()); - break; - } - ++it; - } - - // or add it if it did not exist before - if (it == nodeList.end()) { - element = metadata->add_child(name); - try { - element->set_namespace(prefix); - } - catch (xmlpp::exception &e) { - // this namespace has not been declared; well OK, do nothing then - } - } - - element->set_child_text(*value); -} - - -/*------------------------------------------------------------------------------ - * Return a string containing the essential fields of this object, in XML. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist :: getXmlElementString(void) const throw () -{ - Ptr::Ref xmlString(new Glib::ustring); - - xmlString->append("<"); - xmlString->append(configElementNameStr + " "); - xmlString->append(idAttrName + "=\"" - + std::string(*getId()) - + "\" "); - xmlString->append(Glib::ustring(titleAttrName) + "=\"" - + *getTitle() - + "\" "); - xmlString->append(playlengthAttrName + "=\"" - + toFixedString(getPlaylength()) - + "\"/>"); - - return xmlString; -} - - -/*------------------------------------------------------------------------------ - * Return a string containing an XML representation of this playlist. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist :: getXmlDocumentString() const throw () -{ - Ptr::Ref localDocument; - - if (xmlPlaylist) { - localDocument = xmlPlaylist; - } else { - localDocument.reset(new xmlpp::Document()); - xmlpp::Element* rootNode = localDocument->create_root_node( - configElementNameStr); - if (id) { - rootNode->set_attribute(idAttrName, std::string(*id)); - } - - xmlpp::Element* metadata = rootNode->add_child(metadataElementName); - metadata->set_namespace_declaration(defaultNamespaceUri); - metadata->set_namespace_declaration(liveSupportNamespaceUri, - liveSupportNamespacePrefix); - metadata->set_namespace_declaration(dcNamespaceUri, - titleElementPrefix); - metadata->set_namespace_declaration(dctermsNamespaceUri, - extentElementPrefix); - metadata->set_namespace_declaration(xmlNamespaceUri, - xmlNamespacePrefix); - } - - Glib::ustring playlistElementsXmlString("\n"); - Playlist::const_iterator it = this->begin(); - while (it != this->end()) { - playlistElementsXmlString += *(it->second->getXmlElementString()); - playlistElementsXmlString += '\n'; - ++it; - } - - Ptr::Ref metadataString(new Glib::ustring( - localDocument->write_to_string() )); - unsigned int insertPosition = metadataString->find(metadataElementName); - insertPosition = metadataString->rfind('<', insertPosition); - metadataString->insert(insertPosition, playlistElementsXmlString); - - return metadataString; -} - - -/*------------------------------------------------------------------------------ - * Eliminate the gaps in the playlist. - *----------------------------------------------------------------------------*/ -bool -Playlist :: eliminateGaps(void) throw () -{ - bool didSomething = false; - - Playlist::const_iterator it = this->begin(); - while (it != this->end()) { - Ptr::Ref playlistElement = it->second; - if (playlistElement->getType() == PlaylistElement::PlaylistType) { - Ptr::Ref playlist = playlistElement->getPlaylist(); - didSomething |= playlist->eliminateGaps(); - } - ++it; - } - - time_duration position(0,0,0,0); - time_duration gapsFound(0,0,0,0); - - it = this->begin(); - while (it != this->end()) { - Ptr::Ref playlistElement = it->second; - Ptr::Ref startTime - = playlistElement->getRelativeOffset(); - Ptr::Ref newStartTime; - - if (*startTime - gapsFound > position) { - newStartTime.reset(new time_duration(position)); - playlistElement->setRelativeOffset(newStartTime); - gapsFound = *startTime - position; - didSomething = true; - - } else if (gapsFound.total_microseconds() != 0) { - newStartTime.reset(new time_duration(*startTime - gapsFound)); - playlistElement->setRelativeOffset(newStartTime); - - } else { - newStartTime = startTime; - } - - position = *newStartTime + *playlistElement->getPlayable() - ->getPlaylength(); - ++it; - } - - if (didSomething || position != *getPlaylength()) { - Ptr::Ref newPlaylength(new time_duration(position)); - setPlaylength(newPlaylength); - return true; - } else { - return false; - } -} - - -/*------------------------------------------------------------------------------ - * Find the playlist element at the specified offset. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Playlist :: findAtOffset(Ptr::Ref offset) const - throw () -{ - Ptr::Ref playlistElement; - - PlaylistElementListType::const_reverse_iterator it; - PlaylistElementListType::const_reverse_iterator rend - = elementList->rend(); - for (it = elementList->rbegin(); it != rend; ++it) { - time_duration currentStart = it->first; - if (currentStart <= *offset) { - Ptr::Ref - currentElement = it->second; - time_duration currentEnd = currentStart - + *currentElement->getPlayable() - ->getPlaylength(); - if (currentEnd > *offset) { - playlistElement = currentElement; - } - } - } - - return playlistElement; -} - diff --git a/src/modules/core/src/PlaylistElement.cxx b/src/modules/core/src/PlaylistElement.cxx deleted file mode 100644 index b10fc4def..000000000 --- a/src/modules/core/src/PlaylistElement.cxx +++ /dev/null @@ -1,342 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/Playlist.h" -#include "LiveSupport/Core/PlaylistElement.h" - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the config element for this class - *----------------------------------------------------------------------------*/ -const std::string PlaylistElement::configElementNameStr = "playlistElement"; - -/** - * The name of the attribute of the id of the playlist element. - */ -static const std::string idAttrName = "id"; - -/** - * The name of the attribute of the relative offset of the playlist element. - */ -static const std::string relativeOffsetAttrName = "relativeOffset"; - -/** - */ -static const std::string clipStartAttrName = "clipStart"; - -/** - */ -static const std::string clipEndAttrName = "clipEnd"; - -/** - */ -static const std::string clipLengthAttrName = "clipLength"; - -/** - * The name of the audio clip child element of the playlist element. - */ -static const std::string audioClipElementName = "audioClip"; - -/** - * The name of the playlist child element of the playlist element. - */ -static const std::string playlistElementName = "playlist"; - -/** - * The name of the fade info child element of the playlist element. - */ -static const std::string fadeInfoElementName = "fadeInfo"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * The default constructor. - *----------------------------------------------------------------------------*/ -PlaylistElement :: PlaylistElement(void) throw () -{ -} - -/*------------------------------------------------------------------------------ - * Create a playlist element by specifying all details. - *----------------------------------------------------------------------------*/ -PlaylistElement :: PlaylistElement(Ptr::Ref id, - Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref audioClip, - Ptr::Ref fadeInfo) - throw () -{ - this->id = id; - this->relativeOffset = relativeOffset; - this->clipLength = clipLength; - this->audioClip = audioClip; - this->playable = audioClip; - this->fadeInfo = fadeInfo; - this->type = AudioClipType; - - setClipStart(Ptr::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::Ref(new time_duration(0,0,0,0))); -} - - -/*------------------------------------------------------------------------------ - * Create a new audio clip playlist element, with a new UniqueId, - * to be added to a playlist. - *----------------------------------------------------------------------------*/ -PlaylistElement :: PlaylistElement(Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref audioClip, - Ptr::Ref fadeInfo) - throw () -{ - this->id = UniqueId::generateId(); - this->relativeOffset = relativeOffset; - this->clipLength = clipLength; - this->audioClip = audioClip; - this->playable = audioClip; - this->fadeInfo = fadeInfo; - this->type = AudioClipType; - - setClipStart(Ptr::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::Ref(new time_duration(0,0,0,0))); -} - - -/*------------------------------------------------------------------------------ - * Create a new sub-playlist playlist element, with a new UniqueId, - * to be added to a playlist. - *----------------------------------------------------------------------------*/ -PlaylistElement :: PlaylistElement(Ptr::Ref relativeOffset, - Ptr::Ref clipLength, - Ptr::Ref playlist, - Ptr::Ref fadeInfo) - throw () -{ - this->id = UniqueId::generateId(); - this->relativeOffset = relativeOffset; - this->clipLength = clipLength; - this->playlist = playlist; - this->playable = playlist; - this->fadeInfo = fadeInfo; - this->type = PlaylistType; - - setClipStart(Ptr::Ref(new time_duration(0,0,0,0))); - setClipEnd(Ptr::Ref(new time_duration(0,0,0,0))); -} - - -/*------------------------------------------------------------------------------ - * A virtual destructor, as this class has virtual functions. - *----------------------------------------------------------------------------*/ -PlaylistElement :: ~PlaylistElement(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Create a playlist element object based on an XML element. - *----------------------------------------------------------------------------*/ -void -PlaylistElement :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementNameStr) { - std::string eMsg = "bad configuration element "; - eMsg += element.get_name(); - throw std::invalid_argument(eMsg); - } - - // set id - const xmlpp::Attribute* attribute; - - if (!(attribute = element.get_attribute(idAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - id.reset(new UniqueId(attribute->get_value())); - - // set relative offset - if (!(attribute = element.get_attribute(relativeOffsetAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += relativeOffsetAttrName; - throw std::invalid_argument(eMsg); - } - Ptr::Ref relativeOffsetString(new std::string( - attribute->get_value() )); - relativeOffset = TimeConversion::parseTimeDuration(relativeOffsetString); - - // set clip start - if (attribute = element.get_attribute(clipStartAttrName)) { - Ptr::Ref clipStartString(new std::string( - attribute->get_value() )); - clipStart = TimeConversion::parseTimeDuration(clipStartString); - } else { - setClipStart(Ptr::Ref(new time_duration(0,0,0,0))); - } - - // set clip end - if (attribute = element.get_attribute(clipEndAttrName)) { - Ptr::Ref clipEndString(new std::string( - attribute->get_value() )); - clipEnd = TimeConversion::parseTimeDuration(clipEndString); - } else { - setClipEnd(Ptr::Ref(new time_duration(0,0,0,0))); - } - - // set clip length - if (attribute = element.get_attribute(clipLengthAttrName)) { - Ptr::Ref clipLengthString(new std::string( - attribute->get_value() )); - clipLength = TimeConversion::parseTimeDuration(clipLengthString); - } else { - setClipLength(Ptr::Ref(new time_duration(0,0,0,0))); - } - - // set audio clip - xmlpp::Node::NodeList childNodes - = element.get_children(audioClipElementName); - xmlpp::Node::NodeList::iterator it = childNodes.begin(); - - if (it != childNodes.end()) { - const xmlpp::Element * audioClipElement - = dynamic_cast (*it); - type = AudioClipType; - audioClip.reset(new AudioClip); - playable = audioClip; - audioClip->configure(*audioClipElement); // may throw exception - - ++it; - if (it != childNodes.end()) { - std::string eMsg = "more than one "; - eMsg += audioClipElementName; - eMsg += " XML element"; - throw std::invalid_argument(eMsg); - } - } else { - childNodes = element.get_children(playlistElementName); - it = childNodes.begin(); - if (it != childNodes.end()) { - const xmlpp::Element * playlistElement - = dynamic_cast (*it); - type = PlaylistType; - playlist.reset(new Playlist); - playable = playlist; - playlist->configure(*playlistElement); // may throw exception - ++it; - if (it != childNodes.end()) { - std::string eMsg = "more than one "; - eMsg += playlistElementName; - eMsg += " XML element"; - throw std::invalid_argument(eMsg); - } - } else { - std::string eMsg = "missing "; - eMsg += audioClipElementName; - eMsg += " or "; - eMsg += playlistElementName; - eMsg += " XML element in PlaylistElement configuration"; - throw std::invalid_argument(eMsg); - } - } - - // set fade info - childNodes = element.get_children(fadeInfoElementName); - it = childNodes.begin(); - - if (it == childNodes.end()) { // no fade info is OK - return; - } - - const xmlpp::Element * fadeInfoElement - = dynamic_cast (*it); - fadeInfo.reset(new FadeInfo); - fadeInfo->configure(*fadeInfoElement); // may throw exception - - ++it; - if (it != childNodes.end()) { - std::string eMsg = "more than one "; - eMsg += fadeInfoElementName; - eMsg += " XML element"; - throw std::invalid_argument(eMsg); - } -} - - -/*------------------------------------------------------------------------------ - * Return a string containing the essential fields of this object, in XML. - *----------------------------------------------------------------------------*/ -Ptr::Ref -PlaylistElement :: getXmlElementString(void) throw () -{ - Ptr::Ref xmlString(new Glib::ustring); - - xmlString->append("<"); - xmlString->append(configElementNameStr + " "); - xmlString->append(idAttrName + "=\"" - + std::string(*id) - + "\" "); - xmlString->append(relativeOffsetAttrName + "=\"" - + toFixedString(relativeOffset) - + "\" "); - xmlString->append(clipStartAttrName + "=\"" - + toFixedString(clipStart) - + "\" "); - xmlString->append(clipEndAttrName + "=\"" - + toFixedString(clipEnd) - + "\" "); - xmlString->append(clipLengthAttrName + "=\"" - + toFixedString(clipLength) - + "\">\n"); - - xmlString->append(*getPlayable()->getXmlElementString() + "\n"); - if (fadeInfo) { - xmlString->append(*fadeInfo->getXmlElementString() + "\n"); - } - xmlString->append("append(configElementNameStr + ">"); - - return xmlString; -} - diff --git a/src/modules/core/src/PlaylistElementTest.cxx b/src/modules/core/src/PlaylistElementTest.cxx deleted file mode 100644 index fd24625d6..000000000 --- a/src/modules/core/src/PlaylistElementTest.cxx +++ /dev/null @@ -1,173 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/Playlist.h" -#include "LiveSupport/Core/PlaylistElement.h" - -#include "PlaylistElementTest.h" - -using namespace std; -using namespace LiveSupport::Core; -using namespace boost::posix_time; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(PlaylistElementTest); - -/** - * The name of the configuration file for the playlist element. - */ -static const std::string configFileName = "etc/playlistElement.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -PlaylistElementTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -PlaylistElementTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -PlaylistElementTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref playlistElement(new PlaylistElement); - try { - - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - playlistElement->configure(*root); - - // the playlist element - CPPUNIT_ASSERT(playlistElement->getId()->getId() == 0x103); - Ptr::Ref relativeOffset - = playlistElement->getRelativeOffset(); - CPPUNIT_ASSERT(relativeOffset->total_seconds() == 11); - - CPPUNIT_ASSERT(playlistElement->getFadeInfo()->getId()->getId() - == 0x9901); - Ptr::Ref fadeIn - = playlistElement->getFadeInfo() - ->getFadeIn(); - CPPUNIT_ASSERT(fadeIn->total_milliseconds() == 2000); - Ptr::Ref fadeOut - = playlistElement->getFadeInfo() - ->getFadeOut(); - CPPUNIT_ASSERT(fadeOut->total_milliseconds() == 1500); - - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::PlaylistType); - - // check that we can access the playlist inside the playlist element - // as a Playable instance - CPPUNIT_ASSERT(playlistElement->getPlaylist() - == playlistElement->getPlayable()); - - // the playlist inside the playlist element - CPPUNIT_ASSERT(playlistElement->getPlaylist()->getId()->getId() - == 0x2); - Ptr::Ref playlist = playlistElement->getPlaylist(); - Playlist::const_iterator it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - playlistElement = it->second; - ++it; - CPPUNIT_ASSERT(it == playlist->end()); - - // the playlist element inside the playlist - CPPUNIT_ASSERT(playlistElement->getId()->getId() == 0x111); - relativeOffset = playlistElement->getRelativeOffset(); - CPPUNIT_ASSERT(relativeOffset->total_seconds() == 0); - - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::AudioClipType); - - CPPUNIT_ASSERT(*playlistElement->getXmlElementString() == - "\n" - "\n" - ""); - - // and the audio clip inside the playlist element - CPPUNIT_ASSERT(playlistElement->getAudioClip()->getId()->getId() - == 0x10003); - - // check that we can access this audio clip as a Playable instance - CPPUNIT_ASSERT(playlistElement->getAudioClip() - == playlistElement->getPlayable()); - - } catch (std::invalid_argument &e) { - std::string eMsg = "semantic error in configuration file:\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } catch (xmlpp::exception &e) { - std::string eMsg = "error parsing configuration file:\n"; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } -} diff --git a/src/modules/core/src/PlaylistElementTest.h b/src/modules/core/src/PlaylistElementTest.h deleted file mode 100644 index b74f8e490..000000000 --- a/src/modules/core/src/PlaylistElementTest.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef PlaylistElementTest_h -#define PlaylistElementTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the PlaylistElement class. - * - * @see PlaylistElement - */ -class PlaylistElementTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(PlaylistElementTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // PlaylistElementTest_h - diff --git a/src/modules/core/src/PlaylistTest.cxx b/src/modules/core/src/PlaylistTest.cxx deleted file mode 100644 index 34451345f..000000000 --- a/src/modules/core/src/PlaylistTest.cxx +++ /dev/null @@ -1,520 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/Playlist.h" -#include "PlaylistTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(PlaylistTest); - -/** - * The name of the configuration file for the playlist. - */ -static const std::string configFileName = "etc/playlist.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: setUp(void) throw () -{ - playlist.reset(new Playlist); - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - playlist->configure(*root); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (xmlpp::exception &e) { - CPPUNIT_FAIL("error parsing configuration file"); - } -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - CPPUNIT_ASSERT(playlist->getId()->getId() == 0x1); - Ptr::Ref duration - = playlist->getPlaylength(); - CPPUNIT_ASSERT(duration->total_seconds() == 34); - - CPPUNIT_ASSERT(playlist->valid()); - CPPUNIT_ASSERT(*playlist->getXmlElementString() == - ""); - Playlist::const_iterator it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - Ptr::Ref playlistElement = it->second; - CPPUNIT_ASSERT(playlistElement->getId()->getId() == 0x101); - Ptr::Ref relativeOffset - = playlistElement->getRelativeOffset(); - CPPUNIT_ASSERT(relativeOffset->total_seconds() == 0); - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::AudioClipType); - CPPUNIT_ASSERT(playlistElement->getAudioClip()->getId()->getId() - == 0x10001); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - playlistElement = it->second; - CPPUNIT_ASSERT(playlistElement->getId()->getId() == 0x102); - relativeOffset = playlistElement->getRelativeOffset(); - CPPUNIT_ASSERT(relativeOffset->total_seconds() == 11); - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::AudioClipType); - CPPUNIT_ASSERT(playlistElement->getAudioClip()->getId()->getId() - == 0x10002); - - ++it; - ++it; - CPPUNIT_ASSERT(it == playlist->end()); -} - - -/*------------------------------------------------------------------------------ - * Test to see if we can add or remove an audio clip - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: audioClipTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref clipId(new UniqueId("20001")); - Ptr::Ref clipLength(new time_duration(0,30,0,0)); - Ptr::Ref audioClip(new AudioClip(clipId, clipLength)); - - Ptr::Ref relativeOffset(new time_duration(0,10,0,0)); - // hour, min, sec, frac_sec - try { - playlist->addAudioClip(audioClip, relativeOffset); - } catch (std::invalid_argument &e) { - string eMsg = "addAudioClip returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - - CPPUNIT_ASSERT(playlist->getPlaylength()); - CPPUNIT_ASSERT(*playlist->getPlaylength() == *relativeOffset + *clipLength); - - CPPUNIT_ASSERT(!playlist->valid()); // big gap in playlist - - Playlist::const_iterator it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - - Ptr::Ref playlistElement = it->second; - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::AudioClipType); - CPPUNIT_ASSERT(playlistElement->getAudioClip()->getId()->getId() - == 0x20001); - - Ptr::Ref otherRelativeOffset - = playlistElement->getRelativeOffset(); - CPPUNIT_ASSERT(otherRelativeOffset->total_seconds() == 10*60); - - ++it; - CPPUNIT_ASSERT(it == playlist->end()); - - try { - playlist->removePlaylistElement(playlistElement->getId()); - } catch (std::invalid_argument &e) { - string eMsg = "removePlaylistElement returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - - it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it == playlist->end()); - - Ptr::Ref phonyPlaylistElementId(new UniqueId(9999)); - try { - playlist->removePlaylistElement(phonyPlaylistElementId); - CPPUNIT_FAIL("removePlaylistElement allowed to remove " - "non-existent audio clip"); - } catch (std::invalid_argument &e) { - } -} - - -/*------------------------------------------------------------------------------ - * Test the "save/revert to current state" mechanism - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: savedCopyTest(void) - throw (CPPUNIT_NS::Exception) -{ - try { - playlist->revertToSavedCopy(); - CPPUNIT_FAIL("allowed to revert to non-existent state"); - } catch (std::invalid_argument &e) { - } - - playlist->createSavedCopy(); - playlist->removePlaylistElement(playlist->begin()->second->getId()); - playlist->removePlaylistElement(playlist->begin()->second->getId()); - playlist->removePlaylistElement(playlist->begin()->second->getId()); - CPPUNIT_ASSERT(playlist->begin() == playlist->end()); - - try { - playlist->revertToSavedCopy(); - } catch (std::logic_error &e) { - CPPUNIT_FAIL("could not revert to saved state"); - } - - Playlist::const_iterator it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - Ptr::Ref playlistElement = it->second; - CPPUNIT_ASSERT(playlistElement->getType() - == PlaylistElement::AudioClipType); - CPPUNIT_ASSERT(playlistElement->getAudioClip()->getId()->getId() - == 0x10002); - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it == playlist->end()); - - playlist->deleteSavedCopy(); - try { - playlist->revertToSavedCopy(); - CPPUNIT_FAIL("allowed to revert to deleted state"); - } catch (std::logic_error &e) { - } -} - - -/*------------------------------------------------------------------------------ - * Test to see if we can add a fade info - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: fadeInfoTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref playlistElementOne, - playlistElementTwo; - - Playlist::const_iterator it = playlist->begin(); - CPPUNIT_ASSERT(it != playlist->end()); - playlistElementOne = it->second; - CPPUNIT_ASSERT(playlistElementOne->getFadeInfo().get() == 0); - - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - playlistElementTwo = it->second; - CPPUNIT_ASSERT(playlistElementTwo->getFadeInfo()->getFadeIn() - ->total_milliseconds() == 2000); - CPPUNIT_ASSERT(playlistElementTwo->getFadeInfo()->getFadeOut() - ->total_milliseconds() == 1500); - - ++it; - CPPUNIT_ASSERT(it != playlist->end()); - ++it; - CPPUNIT_ASSERT(it == playlist->end()); - - Ptr::Ref fadeIn (new time_duration(0,0,3,200000)); - Ptr::Ref fadeOut(new time_duration(0,0,4,0)); - Ptr::Ref fadeInfo(new FadeInfo(fadeIn, fadeOut)); - - try { - playlist->setFadeInfo(playlistElementOne->getId(), fadeInfo); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("could not add new fade info"); - } - - try { - playlist->setFadeInfo(playlistElementTwo->getId(), fadeInfo); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("could not update fade info"); - } - - it = playlist->begin(); - playlistElementOne = it->second; - CPPUNIT_ASSERT(playlistElementOne->getFadeInfo()->getFadeIn() - ->total_milliseconds() == 3200); - CPPUNIT_ASSERT(playlistElementOne->getFadeInfo()->getFadeOut() - ->total_milliseconds() == 4000); - ++it; - playlistElementTwo = it->second; - CPPUNIT_ASSERT(playlistElementTwo->getFadeInfo()->getFadeIn() - ->total_milliseconds() == 3200); - CPPUNIT_ASSERT(playlistElementTwo->getFadeInfo()->getFadeOut() - ->total_milliseconds() == 4000); - - Ptr::Ref phonyPlaylistElementId(new UniqueId(9999)); - try { - playlist->setFadeInfo(phonyPlaylistElementId, fadeInfo); - CPPUNIT_FAIL("allowed to set fade info for non-existent element"); - } catch (std::invalid_argument &e) { - } -} - - -/*------------------------------------------------------------------------------ - * Test conversion to and from Playable - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: conversionTest(void) - throw (CPPUNIT_NS::Exception) -{ - CPPUNIT_ASSERT(playlist.use_count() == 1); - - Ptr::Ref playable = playlist; - CPPUNIT_ASSERT(playable->getType() == Playable::PlaylistType); - CPPUNIT_ASSERT(playlist.use_count() == 2); - - Ptr::Ref otherPlaylist = playable->getPlaylist(); - CPPUNIT_ASSERT(otherPlaylist == playlist); - CPPUNIT_ASSERT(playlist.use_count() == 3); - - Ptr::Ref audioClip = playable->getAudioClip(); - CPPUNIT_ASSERT(!audioClip); -} - - -/*------------------------------------------------------------------------------ - * Marshalling test - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: marshallingTest(void) - throw (CPPUNIT_NS::Exception) -{ - XmlRpc::XmlRpcValue xmlRpcValue = *playlist; - CPPUNIT_ASSERT(xmlRpcValue.hasMember("playlist")); - - Ptr::Ref otherPlaylist; - CPPUNIT_ASSERT_NO_THROW(otherPlaylist.reset(new Playlist(xmlRpcValue))); - - CPPUNIT_ASSERT(*playlist->getId() == *otherPlaylist->getId()); - CPPUNIT_ASSERT(*playlist->getTitle() - == *otherPlaylist->getTitle()); - CPPUNIT_ASSERT(*playlist->getPlaylength() - == *otherPlaylist->getPlaylength()); -} - - -/*------------------------------------------------------------------------------ - * Testing the addPlayable() method - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: addPlayableTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref newPlaylist(new Playlist(*playlist)); - // make a copy - - Ptr::Ref clipId(new UniqueId("20001")); - Ptr::Ref clipLength(new time_duration(0,0,10,0)); - Ptr::Ref audioClip(new AudioClip(clipId, clipLength)); - - Ptr::Ref firstOffset(new time_duration(0,0,30,0)); - // hour, min, sec, frac_sec - try { - newPlaylist->addPlayable(audioClip, firstOffset); - } catch (std::invalid_argument &e) { - string eMsg = "addPlayable returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - - CPPUNIT_ASSERT(newPlaylist->getPlaylength()); - CPPUNIT_ASSERT(*newPlaylist->getPlaylength() == *firstOffset - + *audioClip->getPlaylength()); - - Ptr::Ref secondOffset(new time_duration(0,0,40,0)); - try { - newPlaylist->addPlayable(playlist, secondOffset); - } catch (std::invalid_argument &e) { - string eMsg = "addPlayable returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - - CPPUNIT_ASSERT(newPlaylist->getPlaylength()); - CPPUNIT_ASSERT(*newPlaylist->getPlaylength() == *secondOffset - + *playlist->getPlaylength()); -} - - -/*------------------------------------------------------------------------------ - * Testing the eliminateGaps() method - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: eliminateGapsTest(void) - throw (CPPUNIT_NS::Exception) -{ - // a simple negative test - bool result = playlist->eliminateGaps(); - CPPUNIT_ASSERT(result == false); - - // a simple positive test - Ptr::Ref secondElement(new UniqueId("101")); - try { - playlist->removePlaylistElement(secondElement); - } catch (std::invalid_argument &e) { - string eMsg = "removePlaylistElement() returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - CPPUNIT_ASSERT(!playlist->valid()); // big gap in playlist - CPPUNIT_ASSERT(playlist->getPlaylength()); - CPPUNIT_ASSERT(*playlist->getPlaylength() == seconds(34)); - - result = playlist->eliminateGaps(); - CPPUNIT_ASSERT(result == true); - CPPUNIT_ASSERT(playlist->valid()); // the gap is gone - CPPUNIT_ASSERT(playlist->getPlaylength()); - CPPUNIT_ASSERT(*playlist->getPlaylength() == seconds(23)); -} - - -/*------------------------------------------------------------------------------ - * A second test of the eliminateGaps() method - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: eliminateGapsLastItemTest(void) - throw (CPPUNIT_NS::Exception) -{ - // the same thing as above, but now we remove the last item - Ptr::Ref secondElement(new UniqueId("103")); - try { - playlist->removePlaylistElement(secondElement); - } catch (std::invalid_argument &e) { - string eMsg = "removePlaylistElement() returned with error: "; - eMsg += e.what(); - CPPUNIT_FAIL(eMsg); - } - CPPUNIT_ASSERT(!playlist->valid()); // big gap in playlist - CPPUNIT_ASSERT(playlist->getPlaylength()); - CPPUNIT_ASSERT(*playlist->getPlaylength() == seconds(34)); - - bool result = playlist->eliminateGaps(); - CPPUNIT_ASSERT(result == true); - CPPUNIT_ASSERT(playlist->valid()); // the gap is gone - CPPUNIT_ASSERT(playlist->getPlaylength()); - CPPUNIT_ASSERT(*playlist->getPlaylength() == seconds(23)); - -} - - -/*------------------------------------------------------------------------------ - * Test the findAtOffset() method. - *----------------------------------------------------------------------------*/ -void -PlaylistTest :: findAtOffsetTest(void) throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref offset(new time_duration()); - Ptr::Ref playlistElement; - - *offset = seconds(-1); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(!playlistElement); - - *offset = seconds(0); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(playlistElement); - CPPUNIT_ASSERT(playlistElement->getPlayable()->getId()->getId() == 0x10001); - - *offset = seconds(11); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(playlistElement); - CPPUNIT_ASSERT(playlistElement->getPlayable()->getId()->getId() == 0x10002); - - *offset = seconds(20); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(playlistElement); - CPPUNIT_ASSERT(playlistElement->getPlayable()->getId()->getId() == 0x10002); - - *offset = microseconds(30123456); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(playlistElement); - CPPUNIT_ASSERT(playlistElement->getPlayable()->getId()->getId() == 0x2); - - *offset = seconds(34); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(!playlistElement); - - *offset = hours(1); - playlistElement = playlist->findAtOffset(offset); - CPPUNIT_ASSERT(!playlistElement); -} - diff --git a/src/modules/core/src/PlaylistTest.h b/src/modules/core/src/PlaylistTest.h deleted file mode 100644 index cc8f75151..000000000 --- a/src/modules/core/src/PlaylistTest.h +++ /dev/null @@ -1,187 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef PlaylistTest_h -#define PlaylistTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the UploadPlaylistMetohd class. - * - * @see Playlist - */ -class PlaylistTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(PlaylistTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(audioClipTest); - CPPUNIT_TEST(savedCopyTest); - CPPUNIT_TEST(fadeInfoTest); - CPPUNIT_TEST(conversionTest); - CPPUNIT_TEST(marshallingTest); - CPPUNIT_TEST(addPlayableTest); - CPPUNIT_TEST(eliminateGapsTest); - CPPUNIT_TEST(eliminateGapsLastItemTest); - CPPUNIT_TEST(findAtOffsetTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * A playlist to play with. - */ - Ptr::Ref playlist; - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Trying to add a new audio clip. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - audioClipTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the "save/revert to current state" mechanism. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - savedCopyTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Trying to add a new fade info. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - fadeInfoTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing conversion to and from Playable. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - conversionTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing conversion to and from XmlRpcValue. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - marshallingTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the addPlayable() method. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - addPlayableTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the eliminateGaps() method. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - eliminateGapsTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A second test of the eliminateGaps() method. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - eliminateGapsLastItemTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the findAtOffset() method. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - findAtOffsetTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // PlaylistTest_h - diff --git a/src/modules/core/src/RdsContainer.cxx b/src/modules/core/src/RdsContainer.cxx deleted file mode 100644 index eefa7354e..000000000 --- a/src/modules/core/src/RdsContainer.cxx +++ /dev/null @@ -1,192 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/RdsContainer.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The name of the config element for this class - */ -const std::string RdsContainer::configElementName = "rdsContainer"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create an RDS container object based on an XML element. - *----------------------------------------------------------------------------*/ -void -RdsContainer :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementName) { - throw std::invalid_argument("bad coniguration element " - + element.get_name()); - } - - xmlpp::Node::NodeList childNodes = element.get_children( - RdsItem::getConfigElementName()); - xmlpp::Node::NodeList::const_iterator it; - - rdsItemList.clear(); - for (it = childNodes.begin(); it != childNodes.end(); ++it) { - const xmlpp::Element * rdsItemElement - = dynamic_cast (*it); - - Ptr::Ref rdsItem(new RdsItem()); - rdsItem->configure(*rdsItemElement); - - rdsItemList.push_back(rdsItem); - } -} - - -/*------------------------------------------------------------------------------ - * Set the RDS options. - *----------------------------------------------------------------------------*/ -void -RdsContainer :: setRdsOptions(Ptr::Ref key, - Ptr::Ref value, - bool enabled) - throw () -{ - RdsItemListType::const_iterator it; - - bool found = false; - for(it = rdsItemList.begin(); it != rdsItemList.end(); ++it) { - Ptr::Ref rdsItem = *it; - if (*rdsItem->getKey() == *key) { - found = true; - rdsItem->setValue(value); - rdsItem->setEnabled(enabled); - break; - } - } - - if (!found) { - Ptr::Ref rdsItem(new RdsItem(key, value, enabled)); - rdsItemList.push_back(rdsItem); - } - - touched = true; -} - - -/*------------------------------------------------------------------------------ - * Get the value of an RDS string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -RdsContainer :: getRdsValue(Ptr::Ref key) - throw (std::invalid_argument) -{ - RdsItemListType::const_iterator it; - for(it = rdsItemList.begin(); it != rdsItemList.end(); ++it) { - Ptr::Ref rdsItem = *it; - if (*rdsItem->getKey() == *key) { - return rdsItem->getValue(); - } - } - - Glib::ustring safeKey = key ? *key : "(null)"; - throw std::invalid_argument("RDS option " + safeKey + "not found."); -} - - -/*------------------------------------------------------------------------------ - * Get the enabled/disabled state of an RDS option. - *----------------------------------------------------------------------------*/ -bool -RdsContainer :: getRdsEnabled(Ptr::Ref key) - throw (std::invalid_argument) -{ - RdsItemListType::const_iterator it; - for(it = rdsItemList.begin(); it != rdsItemList.end(); ++it) { - Ptr::Ref rdsItem = *it; - if (*rdsItem->getKey() == *key) { - return rdsItem->getEnabled(); - } - } - - Glib::ustring safeKey = key ? *key : "(null)"; - throw std::invalid_argument("RDS option " + safeKey + "not found."); -} - - -/*------------------------------------------------------------------------------ - * Convert the object to a string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -RdsContainer :: toString(void) throw () -{ - Ptr::Ref rdsString(new Glib::ustring); - - RdsItemListType::const_iterator it; - for(it = rdsItemList.begin(); it != rdsItemList.end(); ++it) { - Ptr::Ref rdsItem = *it; - rdsString->append(*rdsItem->toString()); - } - - return rdsString; -} - - -/*------------------------------------------------------------------------------ - * Convert the object to XML. - *----------------------------------------------------------------------------*/ -const xmlpp::Element * -RdsContainer :: toXmlElement(void) throw () -{ - if (!touched && xmlDocument) { - return xmlDocument->get_root_node(); - } - - xmlDocument.reset(new xmlpp::Document()); - xmlpp::Element * rootNode = xmlDocument->create_root_node( - configElementName); - RdsItemListType::const_iterator it; - for(it = rdsItemList.begin(); it != rdsItemList.end(); ++it) { - Ptr::Ref rdsItem = *it; - rootNode->import_node(rdsItem->toXmlElement(), true); - } - - touched = false; - return rootNode; -} - diff --git a/src/modules/core/src/RdsContainerTest.cxx b/src/modules/core/src/RdsContainerTest.cxx deleted file mode 100644 index 95002e93f..000000000 --- a/src/modules/core/src/RdsContainerTest.cxx +++ /dev/null @@ -1,144 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - -#include -#include - -#include "RdsContainerTest.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(RdsContainerTest); - -namespace { - -/** - * The name of the test RDS container config file. - */ -const std::string configFileName = "etc/rdsContainer.xml"; - -} - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -RdsContainerTest :: setUp(void) throw (CPPUNIT_NS::Exception) -{ - std::ifstream ifs; - ifs.open(configFileName.c_str()); - - if (!ifs.is_open() || ifs.bad()) { - ifs.close(); - CPPUNIT_FAIL("could not open RDS container config file " - + configFileName); - } - - rdsContainer.reset(new RdsContainer); - - try { - Ptr::Ref parser(new xmlpp::DomParser()); - parser->parse_stream(ifs); - parser->set_validate(); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - rdsContainer->configure(*root); - - } catch (std::invalid_argument &e) { - ifs.close(); - CPPUNIT_FAIL("semantic error in RDS container configuration file: " - + std::string(e.what())); - } catch (xmlpp::exception &e) { - ifs.close(); - CPPUNIT_FAIL("syntax error in RDS container configuration file: " - + std::string(e.what())); - } - ifs.close(); -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -RdsContainerTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple test. - *----------------------------------------------------------------------------*/ -void -RdsContainerTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref key(new const Glib::ustring("PS")); - - Ptr::Ref value = rdsContainer->getRdsValue(key); - CPPUNIT_ASSERT(value); - CPPUNIT_ASSERT(*value == "BBC Four"); - - bool enabled = rdsContainer->getRdsEnabled(key); - CPPUNIT_ASSERT(enabled); -} - - -/*------------------------------------------------------------------------------ - * Test the toString() method. - *----------------------------------------------------------------------------*/ -void -RdsContainerTest :: toStringTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref string = rdsContainer->toString(); - CPPUNIT_ASSERT(string); - CPPUNIT_ASSERT(*string == "PS=BBC Four\r\n" - "RT=C. Monster - Monsterpiece Theater\r\n"); -} - diff --git a/src/modules/core/src/RdsContainerTest.h b/src/modules/core/src/RdsContainerTest.h deleted file mode 100644 index ca53c3415..000000000 --- a/src/modules/core/src/RdsContainerTest.h +++ /dev/null @@ -1,122 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef RdsContainerTest_h -#define RdsContainerTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" -#include "LiveSupport/Core/BaseTestMethod.h" - -#include "LiveSupport/Core/RdsContainer.h" - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Testing audio playback from the storage. - * - * @see KeyboardShortcutFactory - */ -class RdsContainerTest : public BaseTestMethod -{ - CPPUNIT_TEST_SUITE(RdsContainerTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(toStringTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * The RdsContainer object we are testing. - */ - Ptr::Ref rdsContainer; - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the toString() method. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - toStringTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (CPPUNIT_NS::Exception); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // RdsContainerTest_h - diff --git a/src/modules/core/src/RdsItem.cxx b/src/modules/core/src/RdsItem.cxx deleted file mode 100644 index 5469c70a3..000000000 --- a/src/modules/core/src/RdsItem.cxx +++ /dev/null @@ -1,158 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/RdsItem.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The name of the config element for this class - */ -const std::string RdsItem::configElementName = "rdsItem"; - -namespace { - -/** - * The name of the "key" attribute. - */ -const std::string keyAttributeName = "key"; - -/** - * The name of the "value" attribute. - */ -const std::string valueAttributeName = "value"; - -/** - * The name of the "enabled" attribute. - */ -const std::string enabledAttributeName = "enabled"; - -} - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create an RDS item object based on an XML element. - *----------------------------------------------------------------------------*/ -void -RdsItem :: configure(const xmlpp::Element & element) - throw (std::invalid_argument) -{ - if (element.get_name() != configElementName) { - throw std::invalid_argument("bad coniguration element " - + element.get_name()); - } - - xmlpp::Attribute * keyAttribute = element.get_attribute( - keyAttributeName); - if (keyAttribute) { - key.reset(new Glib::ustring(keyAttribute->get_value())); - } else { - throw std::invalid_argument("missing " - + keyAttributeName + " attribute"); - } - - xmlpp::Attribute * valueAttribute = element.get_attribute( - valueAttributeName); - if (valueAttribute) { - value.reset(new Glib::ustring(valueAttribute->get_value())); - } else { - throw std::invalid_argument("missing " - + valueAttributeName + " attribute"); - } - - xmlpp::Attribute * enabledAttribute = element.get_attribute( - enabledAttributeName); - if (enabledAttribute) { - Glib::ustring enabledString = enabledAttribute->get_value(); - if (enabledString == "0") { - enabled = false; - } else if (enabledString == "1") { - enabled = true; - } else { - throw std::invalid_argument("bad " - + enabledAttributeName + " attribute"); - } - } else { - throw std::invalid_argument("missing " - + enabledAttributeName + " attribute"); - } -} - - -/*------------------------------------------------------------------------------ - * Convert the object to a string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -RdsItem :: toString(void) throw () -{ - Ptr::Ref rdsString(new Glib::ustring); - - if (enabled) { - rdsString->append(*key); - rdsString->append("="); - rdsString->append(*value); - rdsString->append("\r\n"); - } - - return rdsString; -} - - -/*------------------------------------------------------------------------------ - * Convert the object to XML. - *----------------------------------------------------------------------------*/ -const xmlpp::Element * -RdsItem :: toXmlElement(void) throw () -{ - if (!touched && xmlDocument) { - return xmlDocument->get_root_node(); - } - - xmlDocument.reset(new xmlpp::Document()); - xmlpp::Element * rootNode = xmlDocument->create_root_node( - configElementName); - rootNode->set_attribute(keyAttributeName, *key); - rootNode->set_attribute(valueAttributeName, *value); - rootNode->set_attribute(enabledAttributeName, enabled ? "1" : "0"); - - touched = false; - return rootNode; -} - diff --git a/src/modules/core/src/ScheduleEntry.cxx b/src/modules/core/src/ScheduleEntry.cxx deleted file mode 100644 index b8509ea06..000000000 --- a/src/modules/core/src/ScheduleEntry.cxx +++ /dev/null @@ -1,138 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/ScheduleEntry.h" - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * The name of the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::scheduleEntryElementName = "scheduleEntry"; - -/*------------------------------------------------------------------------------ - * The name of the id attribute in the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::idAttrName = "id"; - -/*------------------------------------------------------------------------------ - * The name of the playlist attribute in the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::playlistIdAttrName = "playlistId"; - -/*------------------------------------------------------------------------------ - * The name of the startTime attribute in the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::startTimeAttrName = "startTime"; - -/*------------------------------------------------------------------------------ - * The name of the endTime attribute in the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::endTimeAttrName = "endTime"; - -/*------------------------------------------------------------------------------ - * The name of the playlength attribute in the schedule entry element - *----------------------------------------------------------------------------*/ -const std::string ScheduleEntry::playlengthAttrName = "playlength"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Create a schedule entry based on a previously exported DOM element - *----------------------------------------------------------------------------*/ -ScheduleEntry :: ScheduleEntry(xmlpp::Element * element) - throw (std::invalid_argument) -{ - if (element->get_name() != scheduleEntryElementName) { - std::string eMsg = "bad configuration element "; - eMsg += element->get_name(); - throw std::invalid_argument(eMsg); - } - - const xmlpp::Attribute * attribute = 0; - - if (!(attribute = element->get_attribute(idAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - id = UniqueId::fromDecimalString(attribute->get_value()); - - if (!(attribute = element->get_attribute(playlistIdAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - playlistId = UniqueId::fromDecimalString(attribute->get_value().c_str()); - - if (!(attribute = element->get_attribute(startTimeAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - startTime.reset(new ptime(from_iso_string(attribute->get_value()))); - - if (!(attribute = element->get_attribute(endTimeAttrName))) { - std::string eMsg = "missing attribute "; - eMsg += idAttrName; - throw std::invalid_argument(eMsg); - } - endTime.reset(new ptime(from_iso_string(attribute->get_value()))); - - playlength.reset(new time_duration(*endTime - *startTime)); -} - - -/*------------------------------------------------------------------------------ - * Export a schedule entry into a DOM element. - *----------------------------------------------------------------------------*/ -void -ScheduleEntry :: toDom(xmlpp::Element * element) const throw () -{ - xmlpp::Element * node = element->add_child(scheduleEntryElementName); - - node->set_attribute(idAttrName, *(id->toDecimalString())); - node->set_attribute(playlistIdAttrName, *(playlistId->toDecimalString())); - node->set_attribute(startTimeAttrName, to_iso_string(*startTime)); - node->set_attribute(endTimeAttrName, to_iso_string(*endTime)); - node->set_attribute(playlengthAttrName, to_simple_string(*playlength)); -} - diff --git a/src/modules/core/src/ScheduleEntryTest.cxx b/src/modules/core/src/ScheduleEntryTest.cxx deleted file mode 100644 index 08df77430..000000000 --- a/src/modules/core/src/ScheduleEntryTest.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/ScheduleEntry.h" -#include "ScheduleEntryTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(ScheduleEntryTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -ScheduleEntryTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -ScheduleEntryTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -ScheduleEntryTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref id(new UniqueId(1)); - Ptr::Ref playlistId(new UniqueId(2)); - Ptr::Ref startTime(new ptime( - time_from_string("2006-05-10 10:00:00"))); - Ptr::Ref endTime(new ptime( - time_from_string("2006-05-10 11:00:00"))); - - Ptr::Ref se(new ScheduleEntry(id, - playlistId, - startTime, - endTime)); - - xmlpp::Document * document = new xmlpp::Document(); - document->create_root_node("root"); - - se->toDom(document->get_root_node()); - - xmlpp::Node::NodeList::iterator it = document->get_root_node() - ->get_children().begin(); - xmlpp::Node * node = *it; - xmlpp::Element * element = dynamic_cast (node); - Ptr::Ref see(new ScheduleEntry(element)); - - CPPUNIT_ASSERT(*se == *see); -} - diff --git a/src/modules/core/src/ScheduleEntryTest.h b/src/modules/core/src/ScheduleEntryTest.h deleted file mode 100644 index 442443712..000000000 --- a/src/modules/core/src/ScheduleEntryTest.h +++ /dev/null @@ -1,103 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef ScheduleEntryTest_h -#define ScheduleEntryTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include "LiveSupport/Core/ScheduleEntry.h" - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the ScheduleEntry class. - * - * @see ScheduleEntry - */ -class ScheduleEntryTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(ScheduleEntryTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // ScheduleEntryTest_h - diff --git a/src/modules/core/src/SearchCriteria.cxx b/src/modules/core/src/SearchCriteria.cxx deleted file mode 100644 index 51020ab9f..000000000 --- a/src/modules/core/src/SearchCriteria.cxx +++ /dev/null @@ -1,270 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/SearchCriteria.h" - -using namespace LiveSupport::Core; -using namespace boost::posix_time; -using namespace XmlRpc; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Construct a SearchCriteria object with a single condition. - *----------------------------------------------------------------------------*/ -SearchCriteria :: SearchCriteria(const std::string & type, - const std::string & key, - const std::string & comparisonOperator, - const std::string & value) - throw(std::invalid_argument) - : logicalOperator("and"), limit(0), offset(0) -{ - setType(type); - addCondition(key, comparisonOperator, value); -} - - -/*------------------------------------------------------------------------------ - * Construct a SearchCriteria object from an XmlRpcValue. - *----------------------------------------------------------------------------*/ -SearchCriteria :: SearchCriteria(const XmlRpcValue & xmlRpcValue) - throw(std::invalid_argument) -{ - // make a non-const copy, because XmlRpcValue::operator[](const char *) - // does not work on const objects - XmlRpcValue value(xmlRpcValue); - - if (value.hasMember("filetype") - && value["filetype"].getType() == XmlRpcValue::TypeString) { - type = std::string(value["filetype"]); - } else { - throw std::invalid_argument("missing file type in search criteria"); - } - - if (value.hasMember("operator") - && value["operator"].getType() == XmlRpcValue::TypeString) { - logicalOperator = std::string(value["operator"]); - } else { - logicalOperator = std::string("and"); - } - - if (value.hasMember("limit") - && value["limit"].getType() == XmlRpcValue::TypeInt) { - limit = value["limit"]; - } - - if (value.hasMember("offset") - && value["offset"].getType() == XmlRpcValue::TypeInt) { - offset = value["offset"]; - } - - if (!value.hasMember("conditions") - || value["conditions"].getType() != XmlRpcValue::TypeArray) { - throw std::invalid_argument("missing conditions in search criteria"); - } - - for (int i = 0; i < value["conditions"].size(); ++i) { - addCondition(value["conditions"][i]); - } -} - - -/*------------------------------------------------------------------------------ - * Add a search condition. - *----------------------------------------------------------------------------*/ -void -SearchCriteria :: addCondition(const std::string & key, - const std::string & comparisonOperator, - const std::string & value) - throw(std::invalid_argument) -{ - std::string lowerCaseOp = lowerCase(comparisonOperator); - - if (lowerCaseOp == "=" - || lowerCaseOp == "partial" || lowerCaseOp == "prefix" - || lowerCaseOp == "<" || lowerCaseOp == "<=" - || lowerCaseOp == ">" || lowerCaseOp == ">=") { - SearchConditionType condition(key, lowerCaseOp, value); - searchConditions.push_back(condition); - } else { - throw std::invalid_argument("bad comparison operator argument"); - } -} - - -/*------------------------------------------------------------------------------ - * Add a search condition. - *----------------------------------------------------------------------------*/ -void -SearchCriteria :: addCondition(const XmlRpcValue & xmlRpcValue) - throw(std::invalid_argument) -{ - // make a non-const copy, because XmlRpcValue::operator[](const char *) - // does not work on const objects - XmlRpcValue value(xmlRpcValue); - - if (!value.hasMember("cat") - || value["cat"].getType() != XmlRpcValue::TypeString) { - throw std::invalid_argument("missing metadata name in search criteria"); - } - - if (!value.hasMember("op") - || value["op"].getType() != XmlRpcValue::TypeString) { - throw std::invalid_argument("missing operator name in search criteria"); - } - - if (!value.hasMember("val") - || value["val"].getType() != XmlRpcValue::TypeString) { - throw std::invalid_argument("missing value in search criteria"); - } - - addCondition(std::string(value["cat"]), - std::string(value["op"]), - std::string(value["val"])); -} - - -/*------------------------------------------------------------------------------ - * Add a search condition specifying the mtime (modified-at time). - *----------------------------------------------------------------------------*/ -void -SearchCriteria :: addMtimeCondition(const std::string & comparisonOperator, - Ptr::Ref value) - throw(std::invalid_argument) -{ - std::string lowerCaseOp = lowerCase(comparisonOperator); - - if (lowerCaseOp == "=" - || lowerCaseOp == "partial" || lowerCaseOp == "prefix" - || lowerCaseOp == "<" || lowerCaseOp == "<=" - || lowerCaseOp == ">" || lowerCaseOp == ">=") { - mtimeComparisonOperator = lowerCaseOp; - mtimeValue = value; - } else { - throw std::invalid_argument("bad comparison operator argument"); - } -} - - -/*------------------------------------------------------------------------------ - * Convert to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -SearchCriteria :: operator XmlRpcValue() const - throw() -{ - XmlRpcValue returnValue; - - returnValue["filetype"] = type; - if (searchConditions.size() != 1) { - returnValue["operator"] = logicalOperator; - } - - XmlRpcValue conditionList; - conditionList.setSize(searchConditions.size()); - SearchConditionListType::const_iterator it, end; - it = searchConditions.begin(); - end = searchConditions.end(); - for (int i = 0; it != end; ++i, ++it) { - XmlRpcValue condition; - condition["cat"] = it->key; - condition["op"] = it->comparisonOperator; - condition["val"] = it->value; - conditionList[i] = condition; - } - - if (mtimeValue) { - int i = conditionList.size(); - struct tm mtimeStructTm; - TimeConversion::ptimeToTm(mtimeValue, mtimeStructTm); - - XmlRpcValue condition; - condition["cat"] = "ls:mtime"; - condition["op"] = mtimeComparisonOperator; - condition["val"] = XmlRpcValue(&mtimeStructTm); - conditionList[i] = condition; - } - - returnValue["conditions"] = conditionList; - - if (limit) { - returnValue["limit"] = limit; - } - - if (offset) { - returnValue["offset"] = offset; - } - - return returnValue; -} - - -/*------------------------------------------------------------------------------ - * Check two SearchCriteria objects for equality. - *----------------------------------------------------------------------------*/ -bool -SearchCriteria :: operator ==(const SearchCriteria & other) const - throw() -{ - if (type != other.type - || limit != other.limit - || offset != other.offset - || searchConditions.size() != other.searchConditions.size()) { - return false; - } - - if (searchConditions.size() != 1 - && logicalOperator != other.logicalOperator) { - return false; - } - - SearchConditionListType::const_iterator it, otherIt; - it = searchConditions.begin(); - otherIt = other.searchConditions.begin(); - - for ( ; it != searchConditions.end(); ++it, ++otherIt) { - if (it->key != otherIt->key - || it->comparisonOperator != otherIt->comparisonOperator - || it->value != otherIt->value) { - return false; - } - } - - return true; -} - diff --git a/src/modules/core/src/SearchCriteriaTest.cxx b/src/modules/core/src/SearchCriteriaTest.cxx deleted file mode 100644 index 1814de1e2..000000000 --- a/src/modules/core/src/SearchCriteriaTest.cxx +++ /dev/null @@ -1,189 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include - -#include "LiveSupport/Core/SearchCriteria.h" -#include "SearchCriteriaTest.h" - -using namespace LiveSupport::Core; - - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(SearchCriteriaTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -SearchCriteriaTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -SearchCriteriaTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if we can do some simple operations - *----------------------------------------------------------------------------*/ -void -SearchCriteriaTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - XmlRpc::XmlRpcValue xmlRpcValue; - - try { - SearchCriteria firstCriteria; - xmlRpcValue = firstCriteria; - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - CPPUNIT_ASSERT(xmlRpcValue.hasMember("filetype")); - CPPUNIT_ASSERT(xmlRpcValue["filetype"] == "all"); - CPPUNIT_ASSERT(xmlRpcValue.hasMember("conditions")); - CPPUNIT_ASSERT(xmlRpcValue["conditions"].getType() - == XmlRpc::XmlRpcValue::TypeArray); - CPPUNIT_ASSERT(xmlRpcValue["conditions"].size() == 0); - - try { - SearchCriteria secondCriteria("playlist", "Or"); - secondCriteria.setLimit(50); - secondCriteria.setOffset(100); - secondCriteria.addCondition("dc:title", "PREFIX", "My "); - secondCriteria.addCondition("DcTerms:Extent", "<", "180"); - xmlRpcValue = secondCriteria; - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - CPPUNIT_ASSERT(xmlRpcValue.hasMember("filetype")); - CPPUNIT_ASSERT(xmlRpcValue["filetype"] == "playlist"); - CPPUNIT_ASSERT(xmlRpcValue.hasMember("operator")); - CPPUNIT_ASSERT(xmlRpcValue["operator"] == "or"); - CPPUNIT_ASSERT(xmlRpcValue.hasMember("conditions")); - XmlRpc::XmlRpcValue conditions = xmlRpcValue["conditions"]; - CPPUNIT_ASSERT(conditions.getType() == XmlRpc::XmlRpcValue::TypeArray); - CPPUNIT_ASSERT(conditions.size() == 2); - - XmlRpc::XmlRpcValue condition0 = conditions[0]; - CPPUNIT_ASSERT(condition0.hasMember("cat")); - CPPUNIT_ASSERT(condition0["cat"] == "dc:title"); - CPPUNIT_ASSERT(condition0.hasMember("op")); - CPPUNIT_ASSERT(condition0["op"] == "prefix"); - CPPUNIT_ASSERT(condition0.hasMember("val")); - CPPUNIT_ASSERT(condition0["val"] == "My "); - - XmlRpc::XmlRpcValue condition1 = conditions[1]; - CPPUNIT_ASSERT(condition1.hasMember("cat")); - CPPUNIT_ASSERT(condition1["cat"] == "DcTerms:Extent"); - CPPUNIT_ASSERT(condition1.hasMember("op")); - CPPUNIT_ASSERT(condition1["op"] == "<"); - CPPUNIT_ASSERT(condition1.hasMember("val")); - CPPUNIT_ASSERT(condition1["val"] == "180"); - - CPPUNIT_ASSERT(xmlRpcValue.hasMember("limit")); - CPPUNIT_ASSERT(xmlRpcValue["limit"].getType() - == XmlRpc::XmlRpcValue::TypeInt); - CPPUNIT_ASSERT(int(xmlRpcValue["limit"]) == 50); - CPPUNIT_ASSERT(xmlRpcValue.hasMember("offset")); - CPPUNIT_ASSERT(xmlRpcValue["offset"].getType() - == XmlRpc::XmlRpcValue::TypeInt); - CPPUNIT_ASSERT(int(xmlRpcValue["offset"]) == 100); - - try { - SearchCriteria thirdCriteria("all", "dc:creator", "partial", "X"); - xmlRpcValue = thirdCriteria; - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - CPPUNIT_ASSERT(xmlRpcValue.hasMember("filetype")); - CPPUNIT_ASSERT(xmlRpcValue["filetype"] == "all"); - CPPUNIT_ASSERT(xmlRpcValue.hasMember("conditions")); - conditions = xmlRpcValue["conditions"]; - CPPUNIT_ASSERT(conditions.getType() == XmlRpc::XmlRpcValue::TypeArray); - CPPUNIT_ASSERT(conditions.size() == 1); - - condition0 = conditions[0]; - CPPUNIT_ASSERT(condition0.hasMember("cat")); - CPPUNIT_ASSERT(condition0["cat"] == "dc:creator"); - CPPUNIT_ASSERT(condition0.hasMember("op")); - CPPUNIT_ASSERT(condition0["op"] == "partial"); - CPPUNIT_ASSERT(condition0.hasMember("val")); - CPPUNIT_ASSERT(condition0["val"] == "X"); -} - - -/*------------------------------------------------------------------------------ - * Test the conversion to/from an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -SearchCriteriaTest :: marshalingTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref criteria; - CPPUNIT_ASSERT_NO_THROW( - criteria.reset(new SearchCriteria("playlist", "Or")); - criteria->setLimit(50); - criteria->setOffset(100); - criteria->addCondition("dc:title", "PREFIX", "My "); - criteria->addCondition("DcTerms:Extent", "<", "180"); - ); - - XmlRpc::XmlRpcValue xmlRpcValue; - CPPUNIT_ASSERT_NO_THROW( - xmlRpcValue = *criteria; - ); - - Ptr::Ref copyCriteria; - CPPUNIT_ASSERT_NO_THROW( - copyCriteria.reset(new SearchCriteria(xmlRpcValue)); - ); - - CPPUNIT_ASSERT(*criteria == *copyCriteria); - - XmlRpc::XmlRpcValue copyXmlRpcValue; - CPPUNIT_ASSERT_NO_THROW( - copyXmlRpcValue = *copyCriteria; - ); - - CPPUNIT_ASSERT(xmlRpcValue == copyXmlRpcValue); -} - diff --git a/src/modules/core/src/SearchCriteriaTest.h b/src/modules/core/src/SearchCriteriaTest.h deleted file mode 100644 index 9164015a6..000000000 --- a/src/modules/core/src/SearchCriteriaTest.h +++ /dev/null @@ -1,108 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef SearchCriteriaTest_h -#define SearchCriteriaTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the SearchCriteria class. - * - * @see SearchCriteria - */ -class SearchCriteriaTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(SearchCriteriaTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(marshalingTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the conversion to/from an XmlRpcValue. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - marshalingTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // SearchCriteriaTest_h - diff --git a/src/modules/core/src/TestRunnable.cxx b/src/modules/core/src/TestRunnable.cxx deleted file mode 100644 index a4b013266..000000000 --- a/src/modules/core/src/TestRunnable.cxx +++ /dev/null @@ -1,75 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/TimeConversion.h" - -#include "TestRunnable.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -TestRunnable :: TestRunnable(Ptr::Ref loopTime) - throw () -{ - shouldRun = true; - state = created; - this->loopTime = loopTime; -} - - -/*------------------------------------------------------------------------------ - * The main execution body of the thread. - *----------------------------------------------------------------------------*/ -void -TestRunnable :: run(void) throw () -{ - state = running; - - while (shouldRun) { - // don't do anything in the main loop - TimeConversion::sleep(loopTime); - } - - state = stopped; -} - diff --git a/src/modules/core/src/TestRunnable.h b/src/modules/core/src/TestRunnable.h deleted file mode 100644 index bf7188432..000000000 --- a/src/modules/core/src/TestRunnable.h +++ /dev/null @@ -1,155 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef TestRunnable_h -#define TestRunnable_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/RunnableInterface.h" - - -namespace LiveSupport { -namespace Core { - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A sample Runnable object, for testing purposes. - */ -class TestRunnable : public virtual RunnableInterface -{ - public: - /** - * An enum signaling the states of the Runnable object. - */ - typedef enum { created, running, stopped } State; - - private: - /** - * The time interval the run() method will check if stop() - * has been called meanwhile. - */ - Ptr::Ref loopTime; - - /** - * Flag that marks if the main execution body should be - * running. - */ - bool shouldRun; - - /** - * The state of the object. - */ - State state; - - /** - * Default constructor. - */ - TestRunnable(void) throw () - { - } - - - public: - /** - * Constructor. - * - * @param loopTime the time at which the run() method checks - * if it still should run. - */ - TestRunnable(Ptr::Ref loopTime) throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~TestRunnable(void) throw () - { - } - - /** - * The main execution loop for the thread. - */ - virtual void - run(void) throw (); - - /** - * Signal the thread to stop, gracefully. - * This is just a call to signal the execution to stop, eventually. - */ - virtual void - stop(void) throw () - { - shouldRun = false; - } - - /** - * Send a signal to this object. - * This currently simply does nothing. - * - * @param userData the user data for the signal. - */ - virtual void - signal(int userData) throw () - { - } - - /** - * Get the state of the object. - */ - virtual State - getState(void) const throw () - { - return state; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - - -#endif // TestRunnable_h - diff --git a/src/modules/core/src/TestRunner.cxx b/src/modules/core/src/TestRunner.cxx deleted file mode 100644 index 8ce1c29bb..000000000 --- a/src/modules/core/src/TestRunner.cxx +++ /dev/null @@ -1,275 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - -#if HAVE_GETOPT_H -#include -#else -#error "Need getopt.h" -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * Our copyright notice, should be at most 80 columns - */ -static const char copyrightNotice[] = - "Copyright (c) 2010 Sourcefabric O.P.S. under the GNU GPL"; - -/** - * String describing the short options. - */ -static const char options[] = "ho:s:v"; - -/** - * Structure describing the long options - */ -static const struct option longOptions[] = { - { "help", no_argument, 0, 'h' }, - { "output", required_argument, 0, 'o' }, - { "stylesheet", required_argument, 0, 's' }, - { "version", no_argument, 0, 'v' }, - { 0, 0, 0, 0 } -}; - -/** - * The encoding to use for the output file. - */ -static const std::string encoding = "utf-8"; - -/** - * The output XML file name. - */ -static Ptr::Ref xmlOutFileName; - -/** - * The XSLT attached to the output file. - */ -static Ptr::Ref xsltFileName; - - -/* =============================================== local function prototypes */ - -/** - * Print program version. - * - * @param os the std::ostream to print to. - */ -static void -printVersion ( std::ostream & os ); - -/** - * Print program usage information. - * - * @param invocation the command line command used to invoke this program. - * @param os the std::ostream to print to. - */ -static void -printUsage ( const char invocation[], - std::ostream & os ); - -/** - * Process command line arguments. - * - * @param argc the number of arguments. - * @param argv the arguments themselves. - * @return true of all went well, false in case the program should exit - * after this call. - */ -static bool -processArguments(int argc, char *argv[]); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Run all tests - *----------------------------------------------------------------------------*/ -int -main( int argc, - char * argv[] ) throw () -{ - if (!processArguments(argc, argv)) { - return 0; - } - - // Create the event manager and test controller - CPPUNIT_NS::TestResult controller; - - // Add a listener that colllects test result - CPPUNIT_NS::TestResultCollector result; - controller.addListener( &result ); - - // Add a listener that print dots as test run. - CPPUNIT_NS::BriefTestProgressListener progress; - controller.addListener( &progress ); - - // Add the top suite to the test runner - CPPUNIT_NS::TestRunner runner; - runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); - runner.run( controller ); - - // Print test in a compiler compatible format. - CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); - outputter.setLocationFormat("%p:%l:"); - outputter.write(); - - // also generate an XML document as an output - std::ofstream xmlOutFile(xmlOutFileName->c_str()); - CPPUNIT_NS::XmlOutputter xmlOutputter(&result, xmlOutFile, encoding); - xmlOutputter.setStandalone(false); - if (xsltFileName) { - xmlOutputter.setStyleSheet(*xsltFileName); - } - xmlOutputter.write(); - xmlOutFile.flush(); - xmlOutFile.close(); - - return result.wasSuccessful() ? 0 : 1; -} - - -/*------------------------------------------------------------------------------ - * Process command line arguments. - *----------------------------------------------------------------------------*/ -static bool -processArguments(int argc, char *argv[]) -{ - int i; - - while ((i = getopt_long(argc, argv, options, longOptions, 0)) != -1) { - switch (i) { - case 'h': - printUsage(argv[0], std::cout); - return false; - - case 'o': - xmlOutFileName.reset(new std::string(optarg)); - break; - - case 's': - xsltFileName.reset(new std::string(optarg)); - break; - - case 'v': - printVersion(std::cout); - return false; - - default: - printUsage(argv[0], std::cout); - return false; - } - } - - if (optind < argc) { - std::cerr << "error processing command line arguments" << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - if (!xmlOutFileName) { - std::cerr << "mandatory option output file name not specified" - << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - std::cerr << "writing output to '" << *xmlOutFileName << '\'' << std::endl; - if (xsltFileName) { - std::cerr << "using XSLT file '" << *xsltFileName << '\'' << std::endl; - } - - return true; -} - - -/*------------------------------------------------------------------------------ - * Print program version. - *----------------------------------------------------------------------------*/ -static void -printVersion ( std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << copyrightNotice << std::endl; -} - - -/*------------------------------------------------------------------------------ - * Print program usage. - *----------------------------------------------------------------------------*/ -static void -printUsage ( const char invocation[], - std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << std::endl - << "Usage: " << invocation << " [OPTION]" - << std::endl - << " mandatory options:" << std::endl - << " -o, --output=file.name write test results into this XML file" - << std::endl - << " optional options:" << std::endl - << " -s, --stylesheet specify this XSLT for the output file" - << std::endl - << " this is either an absolute URI, or a" - << std::endl - << " relative path for the output document" - << std::endl - << " -h, --help display this help and exit" << std::endl - << " -v, --version display version information and exit" - << std::endl - << std::endl - << "Report bugs to " << PACKAGE_BUGREPORT << std::endl; -} - diff --git a/src/modules/core/src/Thread.cxx b/src/modules/core/src/Thread.cxx deleted file mode 100644 index 1fbb67ad3..000000000 --- a/src/modules/core/src/Thread.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_UNISTD_H -#include -#else -#error need unistd.h -#endif - - -#include "LiveSupport/Core/Thread.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -Thread :: Thread(Ptr::Ref runnable) throw () -{ - this->runnable = runnable; -} - - -/*------------------------------------------------------------------------------ - * The POSIX thread function for this thread. - *----------------------------------------------------------------------------*/ -void * -Thread :: posixThreadFunction(void * thread) throw () -{ - Thread * pThread = (Thread *) thread; - - pThread->runnable->run(); - - return 0; -} - - -/*------------------------------------------------------------------------------ - * Start the thread. - *----------------------------------------------------------------------------*/ -void -Thread :: start(void) throw (std::exception) -{ - int ret; - pthread_attr_t attr; - - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - ret = pthread_create(&thread, &attr, posixThreadFunction, this); - pthread_attr_destroy(&attr); - - yield(); - - if (ret) { - // TODO: signal return code - throw std::exception(); - } -} - - -/*------------------------------------------------------------------------------ - * Join the thread. - *----------------------------------------------------------------------------*/ -void -Thread :: join(void) throw () -{ - int ret; - if ((ret = pthread_join(thread, 0))) { - // TODO: signal return code - } -} - diff --git a/src/modules/core/src/ThreadTest.cxx b/src/modules/core/src/ThreadTest.cxx deleted file mode 100644 index 5f6d8038f..000000000 --- a/src/modules/core/src/ThreadTest.cxx +++ /dev/null @@ -1,122 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/Thread.h" -#include "TestRunnable.h" -#include "ThreadTest.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(ThreadTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -ThreadTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -ThreadTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple thread test. - *----------------------------------------------------------------------------*/ -void -ThreadTest :: simpleTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref cycle(new time_duration(seconds(1))); - Ptr::Ref runnable(new TestRunnable(cycle)); - Ptr::Ref thread(new Thread(runnable)); - Ptr::Ref sleepTime(new time_duration(seconds(1))); - - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::created); - thread->start(); - Thread::yield(); - TimeConversion::sleep(sleepTime); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running); - TimeConversion::sleep(sleepTime); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running); - thread->stop(); - TimeConversion::sleep(sleepTime); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::stopped); - thread->join(); -} - - -/*------------------------------------------------------------------------------ - * A test to see if a thread respoding slowly for a stop() - * call is joined correctly. - *----------------------------------------------------------------------------*/ -void -ThreadTest :: slowThreadTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref cycle(new time_duration(seconds(10))); - Ptr::Ref runnable(new TestRunnable(cycle)); - Ptr::Ref thread(new Thread(runnable)); - Ptr::Ref sleepTime(new time_duration(seconds(1))); - - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::created); - thread->start(); - Thread::yield(); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running); - TimeConversion::sleep(sleepTime); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running); - thread->stop(); - TimeConversion::sleep(sleepTime); - thread->join(); - CPPUNIT_ASSERT(runnable->getState() == TestRunnable::stopped); -} - diff --git a/src/modules/core/src/ThreadTest.h b/src/modules/core/src/ThreadTest.h deleted file mode 100644 index f42c42e54..000000000 --- a/src/modules/core/src/ThreadTest.h +++ /dev/null @@ -1,108 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef ThreadTest_h -#define ThreadTest_H - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the Thread class. - * - * @see Thread - */ -class ThreadTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(ThreadTest); - CPPUNIT_TEST(simpleTest); - CPPUNIT_TEST(slowThreadTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple thread test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - simpleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if a thread respoding slowly for a stop() - * call is joined correctly. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - slowThreadTest(void) throw (CPPUNIT_NS::Exception); - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // ThreadTest_h - diff --git a/src/modules/core/src/TimeConversion.cxx b/src/modules/core/src/TimeConversion.cxx deleted file mode 100644 index 9db4d4bb7..000000000 --- a/src/modules/core/src/TimeConversion.cxx +++ /dev/null @@ -1,408 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/TimeConversion.h" - - -using namespace boost::posix_time; -using namespace boost::gregorian; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * The number of digits used for fractional seconds in time durations. - */ -static const int numberOfDigitsPrecision = 6; - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Convert a struct timeval to a boost::ptime - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: timevalToPtime(const struct timeval *timeval) - throw (std::out_of_range) -{ - // don't convert through the boost::posix_time::from_time_t() function - // as probably because of timezone settings it ruins the actual value - struct tm tm; - localtime_r(&timeval->tv_sec, &tm); - Ptr::Ref time(new ptime(date(1900 + tm.tm_year, - 1 + tm.tm_mon, - tm.tm_mday), - time_duration(tm.tm_hour, - tm.tm_min, - tm.tm_sec) - + microseconds(timeval->tv_usec))); - - return time; -} - - -/*------------------------------------------------------------------------------ - * Convert a struct tm to a boost::ptime - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: tmToPtime(const struct tm *time) - throw (std::out_of_range) -{ - // don't convert through the boost::posix_time::from_time_t() function - // as probably because of timezone settings it ruins the actual value - Ptr::Ref pTime(new ptime(date(1900 + time->tm_year, - 1 + time->tm_mon, - time->tm_mday), - time_duration(time->tm_hour, - time->tm_min, - time->tm_sec))); - - return pTime; -} - - -/*------------------------------------------------------------------------------ - * Convert a boost::ptime to a struct tm - *----------------------------------------------------------------------------*/ -void -TimeConversion :: ptimeToTm(Ptr::Ref convertFrom, - struct tm & convertTo) - throw () -{ - date date = convertFrom->date(); - time_duration time = convertFrom->time_of_day(); - - convertTo.tm_year = date.year() - 1900; - convertTo.tm_mon = date.month() - 1; - convertTo.tm_mday = date.day(); - convertTo.tm_hour = time.hours(); - convertTo.tm_min = time.minutes(); - convertTo.tm_sec = time.seconds(); -} - - -/*------------------------------------------------------------------------------ - * Return the current time. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: now(void) - throw () -{ - struct timeval timeval; - - // TODO: check for -1 return value, to see if there are errors - gettimeofday(&timeval, 0); - return timevalToPtime(&timeval); -} - - -/*------------------------------------------------------------------------------ - * Return the current time, as a string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: nowString(void) - throw () -{ - ptime now = second_clock::local_time(); - Ptr::Ref timeString(new std::string(to_simple_string(now))); - - return timeString; -} - - -/*------------------------------------------------------------------------------ - * Sleep for the specified duration. - *----------------------------------------------------------------------------*/ -void -TimeConversion :: sleep(Ptr::Ref duration) - throw () -{ - int ret; - struct timespec tv; - - tv.tv_sec = duration->total_seconds(); - tv.tv_nsec = duration->fractional_seconds(); - - // if fractional digits is in microseconds, convert it to nanoseconds - if (time_duration::num_fractional_digits() == 6) { - tv.tv_nsec *= 1000L; - } - - if ((ret = nanosleep(&tv, 0))) { - // TODO: signal error - } -} - - -/*------------------------------------------------------------------------------ - * Convert a time_duration to a format used in SMILs. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: timeDurationToSmilString( - Ptr::Ref duration) - throw () -{ - std::stringstream stringStream; - stringStream << std::dec - << duration->total_seconds(); - - int microseconds = duration->fractional_seconds(); - stringStream << "." - << std::setw(3) - << std::setfill('0') - << (microseconds + 500) / 1000 - << 's'; - Ptr::Ref result(new std::string(stringStream.str())); - return result; -} - - -/*------------------------------------------------------------------------------ - * Convert a time_duration to a rounded format used on the screen. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: timeDurationToHhMmSsString( - Ptr::Ref duration) - throw () -{ - Ptr::Ref roundedDuration = roundToNearestSecond( - duration); - std::stringstream stringStream; - stringStream << std::dec - << std::setw(2) - << std::setfill('0') - << roundedDuration->hours() - << ":" - << std::setw(2) - << std::setfill('0') - << roundedDuration->minutes() - << ":" - << std::setw(2) - << std::setfill('0') - << roundedDuration->seconds(); - - Ptr::Ref result(new std::string(stringStream.str())); - return result; -} - - -/*------------------------------------------------------------------------------ - * Convert a time_duration to a format used for fade info. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: timeDurationToShortString( - Ptr::Ref duration) - throw () -{ - std::stringstream stringStream; - - if (duration->hours()) { - stringStream << duration->hours() - << ":" - << std::setw(2) - << std::setfill('0') - << duration->minutes() - << ":" - << std::setw(2) - << std::setfill('0'); - - } else if (duration->minutes()) { - stringStream << duration->minutes() - << ":" - << std::setw(2) - << std::setfill('0'); - } - - stringStream << duration->seconds(); - - std::stringstream fractionsStream; - fractionsStream << std::setw(getNumberOfDigitsPrecision()) - << std::setfill('0') - << duration->fractional_seconds(); - std::string fractionsString(fractionsStream.str()); - unsigned int lastNonZero = fractionsString.find_last_not_of('0'); - if (lastNonZero != std::string::npos) { - stringStream << "." - << fractionsString.substr(0, lastNonZero+1); - } - - Ptr::Ref result(new std::string(stringStream.str())); - return result; -} - - -/*------------------------------------------------------------------------------ - * Parse a string to a time_duration. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: parseTimeDuration(Ptr::Ref durationString) - throw () -{ - int micros = 0; - int seconds = 0; - int minutes = 0; - int hours = 0; - - Ptr::Ref temp(new std::string(*durationString)); - - if (temp->length() > 0) { - Ptr::Ref secondsString = nextNumberFromEnd(temp, ':'); - Ptr::Ref fractionsString = nextNumberFromStart( - secondsString, '.'); - if (fractionsString->length() > 0) { - std::stringstream fractionsStream; - fractionsStream << std::left - << std::setw( - TimeConversion::getNumberOfDigitsPrecision() ) - << std::setfill('0') - << *fractionsString; - fractionsStream >> micros; - } - if (secondsString->length() > 0) { - std::stringstream secondsStream(*secondsString); - secondsStream >> seconds; - } - } - - if (temp->length() > 0) { - Ptr::Ref minutesString = nextNumberFromEnd(temp, ':'); - std::stringstream minutesStream(*minutesString); - minutesStream >> minutes; - } - - if (temp->length() > 0) { - std::stringstream hoursStream(*temp); - hoursStream >> hours; - } - - Ptr::Ref result(new time_duration( - hours, minutes, seconds, micros )); - return result; -} - - -/*------------------------------------------------------------------------------ - * Parse a time string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: nextNumberFromEnd(Ptr::Ref timeString, - char separator) - throw () -{ - Ptr::Ref result; - unsigned int pos = timeString->find_last_of(separator); - - if (pos != std::string::npos) { - if (pos != timeString->length()-1) { - result.reset(new std::string(*timeString, pos+1)); - } else { - result.reset(new std::string); - } - *timeString = timeString->substr(0, pos); - } else { - result.reset(new std::string(*timeString)); - *timeString = std::string(""); - } - - return result; -} - - -/*------------------------------------------------------------------------------ - * Parse a decimal string. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: nextNumberFromStart(Ptr::Ref timeString, - char separator) - throw () -{ - Ptr::Ref result; - unsigned int pos = timeString->find(separator); - - if (pos != std::string::npos) { - if (pos != timeString->length()-1) { - result.reset(new std::string(*timeString, pos+1)); - } else { - result.reset(new std::string); - } - *timeString = timeString->substr(0, pos); - } else { - result.reset(new std::string("")); - } - - return result; -} - - -/*------------------------------------------------------------------------------ - * Get the number of digits used for fractional seconds in time durations. - *----------------------------------------------------------------------------*/ -int -TimeConversion :: getNumberOfDigitsPrecision(void) throw () -{ - return numberOfDigitsPrecision; -} - - -/*------------------------------------------------------------------------------ - * Round the time duration to the nearest second. - *----------------------------------------------------------------------------*/ -Ptr::Ref -TimeConversion :: roundToNearestSecond(Ptr::Ref duration) - throw () -{ - int hours = duration->hours(); - int minutes = duration->minutes(); - int seconds = duration->seconds(); - - if (duration->fractional_seconds() >= 500000) { - ++seconds; - } - if (seconds == 60) { - seconds = 0; - ++minutes; - } - if (minutes == 60) { - minutes = 0; - ++hours; - } - - Ptr::Ref roundedDuration(new time_duration( - hours, minutes, seconds, 0)); - return roundedDuration; -} - diff --git a/src/modules/core/src/TimeConversionTest.cxx b/src/modules/core/src/TimeConversionTest.cxx deleted file mode 100644 index 74a46a35d..000000000 --- a/src/modules/core/src/TimeConversionTest.cxx +++ /dev/null @@ -1,300 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "TimeConversionTest.h" - - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(TimeConversionTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test the timevalToPtime function - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: timevalToPtimeTest(void) - throw (CPPUNIT_NS::Exception) -{ - struct tm tm; - time_t time; - struct timeval timeval; - Ptr::Ref pTime; - - // first create a time_t with the time for 2004-11-04 12:58:30 - tm.tm_year = 104; // number of years since 1900, 104 means 2004 - tm.tm_mon = 10; // number of months since January, 10 means November - tm.tm_mday = 4; - tm.tm_hour = 12; - tm.tm_min = 58; - tm.tm_sec = 30; - tm.tm_isdst = 0; - time = mktime(&tm); - - // now fill the timeval with timet, and 1234 useconds - timeval.tv_sec = time; - timeval.tv_usec = 1234; - - // and now convert, and see if it is correct - pTime = TimeConversion::timevalToPtime(&timeval); - CPPUNIT_ASSERT(pTime->date().year() == 2004); - CPPUNIT_ASSERT(pTime->date().month() == 11); - CPPUNIT_ASSERT(pTime->date().day() == 4); - CPPUNIT_ASSERT(pTime->time_of_day().hours() == 12); - CPPUNIT_ASSERT(pTime->time_of_day().minutes() == 58); - CPPUNIT_ASSERT(pTime->time_of_day().seconds() == 30); - CPPUNIT_ASSERT((pTime->time_of_day().total_microseconds() - - ((uint64_t) (pTime->time_of_day().total_seconds()) * 1000000UL)) - == 1234); -} - - -/*------------------------------------------------------------------------------ - * Test the tmToPtime function - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: tmToPtimeTest(void) - throw (CPPUNIT_NS::Exception) -{ - struct tm tm; - Ptr::Ref pTime; - - // first create a time_t with the time for 2004-11-04 12:58:30 - tm.tm_year = 104; // number of years since 1900, 104 means 2004 - tm.tm_mon = 10; // number of months since January, 10 means November - tm.tm_mday = 4; - tm.tm_hour = 12; - tm.tm_min = 58; - tm.tm_sec = 30; - tm.tm_isdst = 0; - - // and now convert, and see if it is correct - pTime = TimeConversion::tmToPtime(&tm); - CPPUNIT_ASSERT(pTime->date().year() == 2004); - CPPUNIT_ASSERT(pTime->date().month() == 11); - CPPUNIT_ASSERT(pTime->date().day() == 4); - CPPUNIT_ASSERT(pTime->time_of_day().hours() == 12); - CPPUNIT_ASSERT(pTime->time_of_day().minutes() == 58); - CPPUNIT_ASSERT(pTime->time_of_day().seconds() == 30); -} - - -/*------------------------------------------------------------------------------ - * Test the ptimeToTm function - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: ptimeToTmTest(void) - throw (CPPUNIT_NS::Exception) -{ - struct tm tm; - Ptr::Ref pTime(new ptime(time_from_string("1770-12-17 10:20:30"))); - - TimeConversion::ptimeToTm(pTime, tm); - CPPUNIT_ASSERT(tm.tm_year + 1900 == 1770); - CPPUNIT_ASSERT(tm.tm_mon + 1 == 12); - CPPUNIT_ASSERT(tm.tm_mday == 17); - CPPUNIT_ASSERT(tm.tm_hour == 10); - CPPUNIT_ASSERT(tm.tm_min == 20); - CPPUNIT_ASSERT(tm.tm_sec == 30); -} - - -/*------------------------------------------------------------------------------ - * Test the now function - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: nowTest(void) - throw (CPPUNIT_NS::Exception) -{ - struct tm tm; - time_t tTime; - Ptr::Ref pTime; - - tTime = time(0); - pTime = TimeConversion::now(); - - localtime_r(&tTime, &tm); - - // the below checking is a bit phone, what if the two times actually - // spill over the second barrier (or, for that instance, the year - // barrier?) - CPPUNIT_ASSERT(pTime->date().year() == (1900 + tm.tm_year)); - CPPUNIT_ASSERT(pTime->date().month() == (1 + tm.tm_mon)); - CPPUNIT_ASSERT(pTime->date().day() == tm.tm_mday); - CPPUNIT_ASSERT(pTime->time_of_day().hours() == tm.tm_hour); - CPPUNIT_ASSERT(pTime->time_of_day().minutes() == tm.tm_min); - CPPUNIT_ASSERT(pTime->time_of_day().seconds() == tm.tm_sec); -} - - -/*------------------------------------------------------------------------------ - * Test the sleep function - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: sleepTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref start; - Ptr::Ref end; - Ptr::Ref duration; - - duration.reset(new time_duration(seconds(2))); - - start = TimeConversion::now(); - TimeConversion::sleep(duration); - end = TimeConversion::now(); - - CPPUNIT_ASSERT((*end - *start) >= *duration); -} - - -/*------------------------------------------------------------------------------ - * Test the time_duration to string conversions - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: durationToStringTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref duration; - Ptr::Ref smilString; - Ptr::Ref hhMmSsString; - Ptr::Ref shortString; - - - duration.reset(new time_duration(duration_from_string("01:02:03.503700"))); - smilString = TimeConversion::timeDurationToSmilString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("3723.504s"), *smilString); - - hhMmSsString = TimeConversion::timeDurationToHhMmSsString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("01:02:04"), *hhMmSsString); - - shortString = TimeConversion::timeDurationToShortString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("1:02:03.5037"), *shortString); - - duration.reset(new time_duration(duration_from_string("111:22:33"))); - hhMmSsString = TimeConversion::timeDurationToHhMmSsString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("111:22:33"), *hhMmSsString); - shortString = TimeConversion::timeDurationToShortString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("111:22:33"), *shortString); - - duration.reset(new time_duration(duration_from_string("00:01:02.500000"))); - shortString = TimeConversion::timeDurationToShortString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("1:02.5"), *shortString); - - duration.reset(new time_duration(duration_from_string("00:00:02.001000"))); - shortString = TimeConversion::timeDurationToShortString(duration); - CPPUNIT_ASSERT_EQUAL(std::string("2.001"), *shortString); -} - - -/*------------------------------------------------------------------------------ - * Test the parseTimeDuration() function. - *----------------------------------------------------------------------------*/ -void -TimeConversionTest :: parseTimeDurationTest(void) - throw (CPPUNIT_NS::Exception) -{ - // legal arguments - Ptr::Ref timeString(new std::string("01:02:03.503700")); - Ptr::Ref duration; - CPPUNIT_ASSERT_NO_THROW( - duration = TimeConversion::parseTimeDuration(timeString) - ); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT_EQUAL(std::string("01:02:03.503700"), - to_simple_string(*duration)); - - timeString.reset(new std::string("02:03.5")); - CPPUNIT_ASSERT_NO_THROW( - duration = TimeConversion::parseTimeDuration(timeString) - ); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT_EQUAL(std::string("00:02:03.500000"), - to_simple_string(*duration)); - - timeString.reset(new std::string("77")); - CPPUNIT_ASSERT_NO_THROW( - duration = TimeConversion::parseTimeDuration(timeString) - ); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT_EQUAL(std::string("00:01:17"), - to_simple_string(*duration)); - - // illegal arguments - timeString.reset(new std::string("5 minutes and 2 seconds")); - CPPUNIT_ASSERT_NO_THROW( - duration = TimeConversion::parseTimeDuration(timeString) - ); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT_EQUAL(std::string("00:00:05"), // bad! - to_simple_string(*duration)); - - timeString.reset(new std::string("1.2.3")); - CPPUNIT_ASSERT_NO_THROW( - duration = TimeConversion::parseTimeDuration(timeString) - ); - CPPUNIT_ASSERT(duration); - CPPUNIT_ASSERT_EQUAL(std::string("00:00:01.000002"), // bad! - to_simple_string(*duration)); -} - diff --git a/src/modules/core/src/TimeConversionTest.h b/src/modules/core/src/TimeConversionTest.h deleted file mode 100644 index 0c1491334..000000000 --- a/src/modules/core/src/TimeConversionTest.h +++ /dev/null @@ -1,154 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef TimeConversionTest_h -#define TimeConversionTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the TimeConversion class. - * - * @see TimeConversion - */ -class TimeConversionTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(TimeConversionTest); - CPPUNIT_TEST(timevalToPtimeTest); - CPPUNIT_TEST(tmToPtimeTest); - CPPUNIT_TEST(ptimeToTmTest); - CPPUNIT_TEST(nowTest); - CPPUNIT_TEST(sleepTest); - CPPUNIT_TEST(durationToStringTest); - CPPUNIT_TEST(parseTimeDurationTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * Test conversion from struct timeval to ptime - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - timevalToPtimeTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test conversion from struct tm to ptime - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - tmToPtimeTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test conversion from ptime to struct tm - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - ptimeToTmTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the now function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - nowTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the sleep function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - sleepTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the time_duration to string conversions - * functions. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - durationToStringTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the parseTimeDuration() function. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - parseTimeDurationTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // TimeConversionTest_h - diff --git a/src/modules/core/src/UniqueId.cxx b/src/modules/core/src/UniqueId.cxx deleted file mode 100644 index 5d54d432b..000000000 --- a/src/modules/core/src/UniqueId.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Uuid.h" -#include "LiveSupport/Core/Md5.h" -#include "LiveSupport/Core/UniqueId.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Generate a globally unique id. - *----------------------------------------------------------------------------*/ -Ptr::Ref -UniqueId :: generateId(void) throw () -{ - Ptr::Ref uuid = Uuid::generateId(); - // as uuid is 128 bits, but we have only 63 bits, create an md5 hash - // (which is still 128 bits), and use its values to create a 63 value - // hopefully this is unique enough - Md5 md5((std::string)*uuid); - uint64_t idValue; - - idValue = md5.high64bits(); - idValue += md5.low64bits(); - // make sure it's 63 bits only, so that signed 64 bit containers can - // also accept it - idValue &= 0x7fffffffffffffffLL; - - Ptr::Ref id(new UniqueId(idValue)); - - return id; -} - diff --git a/src/modules/core/src/UniqueIdTest.cxx b/src/modules/core/src/UniqueIdTest.cxx deleted file mode 100644 index c2f6ecfb8..000000000 --- a/src/modules/core/src/UniqueIdTest.cxx +++ /dev/null @@ -1,129 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/UniqueId.h" -#include "UniqueIdTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(UniqueIdTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -UniqueIdTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -UniqueIdTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -UniqueIdTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - UniqueId::IdType idNumeric = 51966; - std::string idAsString = "000000000000cafe"; - Ptr::Ref id; - - id.reset(new UniqueId(idNumeric)); - CPPUNIT_ASSERT(id->getId() == idNumeric); - CPPUNIT_ASSERT(UniqueId::IdType(*id) == idNumeric); - CPPUNIT_ASSERT(std::string(*id) == idAsString); - - id.reset(new UniqueId(idAsString)); - CPPUNIT_ASSERT(id->getId() == idNumeric); - CPPUNIT_ASSERT(UniqueId::IdType(*id) == idNumeric); - CPPUNIT_ASSERT(std::string(*id) == idAsString); - - id = UniqueId::generateId(); - idNumeric = UniqueId::IdType(*id); - idAsString = std::string(*id); - std::stringstream idReader(idAsString); - UniqueId::IdType idNumericCheck; - idReader >> std::hex >> idNumericCheck; - CPPUNIT_ASSERT(idNumeric == idNumericCheck); - - // OK if initialized with bad strings, but the integral value is bogus - std::string idAsVeryLongString = "123456789abcdef0123456789abcdef0"; - id.reset(new UniqueId(idAsVeryLongString)); - CPPUNIT_ASSERT(std::string(*id) == idAsVeryLongString); - - std::string idAsSillyString = "this is not a number"; - id.reset(new UniqueId(idAsSillyString)); - CPPUNIT_ASSERT(std::string(*id) == idAsSillyString); - -/* // this works fine, but please don't use - UniqueId::IdType idSillyNumeric = -3; - id.reset(new UniqueId(idSillyNumeric)); - CPPUNIT_ASSERT(UniqueId::IdType(*id) == idSillyNumeric); - CPPUNIT_ASSERT(std::string(*id) == "fffffffffffffffd"); */ - - // this is used in Postgresql classes, because Long does not get properly - // typedef'd to long long -- can be removed after this bug is fixed - std::string idAsDecimalString = "65546"; - id = UniqueId::fromDecimalString(idAsDecimalString); - CPPUNIT_ASSERT(id->getId() == 65546); - CPPUNIT_ASSERT(*id->toDecimalString() == idAsDecimalString); -} - diff --git a/src/modules/core/src/UniqueIdTest.h b/src/modules/core/src/UniqueIdTest.h deleted file mode 100644 index 27810190d..000000000 --- a/src/modules/core/src/UniqueIdTest.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef UniqueIdTest_h -#define UniqueIdTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the UniqueId class. - * - * @see UniqueId - */ -class UniqueIdTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(UniqueIdTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // UniqueIdTest_h - diff --git a/src/modules/core/src/Uuid.cxx b/src/modules/core/src/Uuid.cxx deleted file mode 100644 index 8bf938300..000000000 --- a/src/modules/core/src/Uuid.cxx +++ /dev/null @@ -1,312 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_SYS_TIME_H -#include -#else -#error need sys/time.h -#endif - -#ifdef HAVE_UNISTD_H -#include -#else -#error need unistd.h -#endif - - -#include -#include -#include -#include -#include "LiveSupport/Core/Uuid.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/*------------------------------------------------------------------------------ - * Set the following to the number of 100ns ticks of the actual - * resolution of your system's clock - *----------------------------------------------------------------------------*/ -#define UUIDS_PER_TICK 1024 - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Generate a globally unique id. - *----------------------------------------------------------------------------*/ -Ptr::Ref -Uuid :: generateId(void) throw () -{ - Ptr::Ref id(new Uuid()); - - UuidTime timestamp; - UuidTime lastTime; - uint16_t clockseq; - UuidNode node; - UuidNode lastNode; - int f; - - /* acquire system wide lock so we're alone */ - //LOCK; - - /* get current time */ - getCurrentTime(×tamp); - - /* get node ID */ - getIeeeNodeIdentifier(&node); - - /* get saved state from NV storage */ - f = id->readState(&clockseq, &lastTime, &lastNode); - - /* if no NV state, or if clock went backwards, or node ID changed - (e.g., net card swap) change clockseq */ - if (!f || memcmp(&node, &lastNode, sizeof(UuidNode))) { - clockseq = trueRandom(); - } else if (timestamp < lastTime) { - clockseq++; - } - - /* stuff fields into the UUID */ - id->format(clockseq, timestamp, node); - id->representAsString(); - - /* save the state for next time */ - id->writeState(clockseq, timestamp, node); - - //UNLOCK; - - return id; -} - - -/*------------------------------------------------------------------------------ - * Format the UUID - *----------------------------------------------------------------------------*/ -void -Uuid :: format(uint16_t clockSeq, - UuidTime timestamp, - UuidNode node) throw () -{ - /* Construct a version 1 uuid with the information we've gathered - * plus a few constants. */ - timeLow = (unsigned long)(timestamp & 0xFFFFFFFF); - timeMid = (unsigned short)((timestamp >> 32) & 0xFFFF); - timeHiAndVersion = (unsigned short)((timestamp >> 48) & 0x0FFF); - timeHiAndVersion |= (1 << 12); - clockSeqLow = clockSeq & 0xFF; - clockSeqHiAndReserved = (clockSeq & 0x3F00) >> 8; - clockSeqHiAndReserved |= 0x80; - - for (int i = 0; i < 6; ++i) { - this->node[i] = node.nodeId[i]; - } -} - - -/*------------------------------------------------------------------------------ - * Create a string representation of the UUID - *----------------------------------------------------------------------------*/ -void -Uuid :: representAsString(void) throw () -{ - std::stringstream sstr; - - sstr << std::hex << std::setw(8) << std::setfill('0') << timeLow << '-' - << std::hex << std::setw(4) << std::setfill('0') << timeMid << '-' - << std::hex << std::setw(4) << std::setfill('0') - << timeHiAndVersion << '-' - << std::hex << std::setw(2) << std::setfill('0') - << (unsigned short) clockSeqHiAndReserved << '-' - << std::hex << std::setw(2) << std::setfill('0') - << (unsigned short) clockSeqLow << '-'; - for (int i = 0; i < 6; ++i) { - sstr << std::hex << std::setw(2) << std::setfill('0') - << (unsigned short) this->node[i]; - } - - idAsString = sstr.str(); -} - - -/*------------------------------------------------------------------------------ - * Read the current state from non-volatile storage - *----------------------------------------------------------------------------*/ -int -Uuid :: readState(uint16_t * clockSeq, - UuidTime * timestamp, - UuidNode * node) throw () -{ - // TODO: read the state from non-volatile storage - - return 0; -} - - -/*------------------------------------------------------------------------------ - * Write the current state to non-volatile storage - *----------------------------------------------------------------------------*/ -void -Uuid :: writeState(uint16_t clockSeq, - UuidTime timestamp, - UuidNode node) throw () -{ - // TODO: write the current state to non-volatile storage -} - - -/*------------------------------------------------------------------------------ - * Get the current time into a timestamp - *----------------------------------------------------------------------------*/ -void -Uuid :: getCurrentTime(UuidTime *timestamp) throw () -{ - UuidTime timeNow; - static UuidTime timeLast; - static uint16_t uuidsThisTick; - static bool inited = false; - - if (!inited) { - getSystemTime(&timeNow); - uuidsThisTick = UUIDS_PER_TICK; - inited = true; - }; - - while (true) { - getSystemTime(&timeNow); - - /* if clock reading changed since last UUID generated... */ - if (timeLast != timeNow) { - /* reset count of uuids gen'd with this clock reading */ - uuidsThisTick = 0; - break; - }; - if (uuidsThisTick < UUIDS_PER_TICK) { - uuidsThisTick++; - break; - }; - /* going too fast for our clock; spin */ - }; - - /* add the count of uuids to low order bits of the clock reading */ - *timestamp = timeNow + uuidsThisTick; -} - - -/*------------------------------------------------------------------------------ - * Get the system time in the UUID UTC base time, which is October 15, 1582 - *----------------------------------------------------------------------------*/ -void -Uuid :: getSystemTime(UuidTime * uuidTime) throw () -{ - struct timeval tp; - - gettimeofday(&tp, (struct timezone *)0); - - /* Offset between UUID formatted times and Unix formatted times. - UUID UTC base time is October 15, 1582. - Unix base time is January 1, 1970. - */ - *uuidTime = (tp.tv_sec * 10000000) - + (tp.tv_usec * 10) - + 0x01B21DD213814000LL; -} - - -/*------------------------------------------------------------------------------ - * Get the IEEE node identifier - *----------------------------------------------------------------------------*/ -void -Uuid :: getIeeeNodeIdentifier(UuidNode * node) throw () -{ - long hostId = gethostid(); - - node->nodeId[5] = (char) (hostId & 0x0000000000ffL); - node->nodeId[4] = (char) ((hostId & 0x00000000ff00L) >> 8); - node->nodeId[3] = (char) ((hostId & 0x000000ff0000L) >> 16); - node->nodeId[2] = (char) ((hostId & 0x0000ff000000L) >> 24); - // these will be 0, as the returned node is only 32 bits - node->nodeId[1] = 0; - node->nodeId[0] = 0; -} - - -/*------------------------------------------------------------------------------ - * Generate a random number - *----------------------------------------------------------------------------*/ -uint16_t -Uuid :: trueRandom(void) throw () -{ - static bool inited = false; - UuidTime timeNow; - - if (!inited) { - getSystemTime(&timeNow); - timeNow = timeNow/UUIDS_PER_TICK; - srand((unsigned int)(((timeNow >> 32) ^ timeNow)&0xffffffff)); - inited = true; - }; - - return rand(); -} - - -/*------------------------------------------------------------------------------ - * Compare two ids. - *----------------------------------------------------------------------------*/ -bool -Uuid :: compare(const Uuid & id1, - const Uuid & id2) throw () -{ - if (!(id1.timeLow == id2.timeLow - && id1.timeMid == id2.timeMid - && id1.timeHiAndVersion == id2.timeHiAndVersion - && id1.clockSeqHiAndReserved == id2.clockSeqHiAndReserved - && id1.clockSeqLow == id2.clockSeqLow)) { - - return false; - } - - for (int i = 0; i < 6; ++i) { - if (id1.node[i] != id2.node[i]) { - return false; - } - } - - return true; -} - diff --git a/src/modules/core/src/UuidTest.cxx b/src/modules/core/src/UuidTest.cxx deleted file mode 100644 index cf1b60182..000000000 --- a/src/modules/core/src/UuidTest.cxx +++ /dev/null @@ -1,93 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/Uuid.h" -#include "UuidTest.h" - - -using namespace std; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(UuidTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -UuidTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -UuidTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Test to see if the singleton Hello object is accessible - *----------------------------------------------------------------------------*/ -void -UuidTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref id1; - Ptr::Ref id2; - - id1 = Uuid::generateId(); - id2 = Uuid::generateId(); - - CPPUNIT_ASSERT(*id1 != *id2); -} - diff --git a/src/modules/core/src/UuidTest.h b/src/modules/core/src/UuidTest.h deleted file mode 100644 index 8469b4b19..000000000 --- a/src/modules/core/src/UuidTest.h +++ /dev/null @@ -1,99 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef UuidTest_h -#define UuidTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the Uuid class. - * - * @see Uuid - */ -class UuidTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(UuidTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Core -} // namespace LiveSupport - -#endif // UuidTest_h - diff --git a/src/modules/core/src/XmlRpcException.cxx b/src/modules/core/src/XmlRpcException.cxx deleted file mode 100644 index cd8ce781f..000000000 --- a/src/modules/core/src/XmlRpcException.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/XmlRpcException.h" - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -XmlRpcException :: XmlRpcException(const std::string & msg, - const std::exception & parent) - throw () - : parent(parent) -{ - message.reset(new std::string(msg)); - message->append("\nparent exception:\n"); - message->append(parent.what()); -} - diff --git a/src/modules/core/src/XmlRpcTools.cxx b/src/modules/core/src/XmlRpcTools.cxx deleted file mode 100644 index 891d863bb..000000000 --- a/src/modules/core/src/XmlRpcTools.cxx +++ /dev/null @@ -1,1161 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_TIME_H -#include -#else -#error need time.h -#endif - - -#include -#include "LiveSupport/Core/TimeConversion.h" - -#include "LiveSupport/Core/XmlRpcTools.h" - - -using namespace boost; -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - -namespace { - -/*------------------------------------------------------------------------------ - * The name of the generic ID member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string idName = "id"; - -/*------------------------------------------------------------------------------ - * The name of the playlist ID member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string playlistIdName = "playlistId"; - -/*------------------------------------------------------------------------------ - * The name of the audio clip ID member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string audioClipIdName = "audioClipId"; - -/*------------------------------------------------------------------------------ - * The name of the playlist element ID member in the XML-RPC param structure - *----------------------------------------------------------------------------*/ -const std::string playlistElementIdName = "playlistElementId"; - -/*------------------------------------------------------------------------------ - * The name of the relative offset member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string relativeOffsetName = "relativeOffset"; - -/*------------------------------------------------------------------------------ - * The name of the relative offset member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string clipStartName = "clipStart"; - -/*------------------------------------------------------------------------------ - * The name of the relative offset member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string clipEndName = "clipEnd"; - -/*------------------------------------------------------------------------------ - * The name of the relative offset member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string clipLengthName = "clipLength"; - -/*------------------------------------------------------------------------------ - * The name of the from member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string fromTimeName = "from"; - -/*------------------------------------------------------------------------------ - * The name of the to member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string toTimeName = "to"; - -/*------------------------------------------------------------------------------ - * The name of the start member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string startTimeName = "start"; - -/*------------------------------------------------------------------------------ - * The name of the end member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string endTimeName = "end"; - -/*------------------------------------------------------------------------------ - * The name of the schedule entry id member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string scheduleEntryIdName = "scheduleEntryId"; - -/*------------------------------------------------------------------------------ - * The name of the playtime member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string playtimeName = "playtime"; - -/*------------------------------------------------------------------------------ - * The name of the fade in member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string fadeInName = "fadeIn"; - -/*------------------------------------------------------------------------------ - * The name of the fade out member in the XML-RPC parameter structure. - *----------------------------------------------------------------------------*/ -const std::string fadeOutName = "fadeOut"; - -/*------------------------------------------------------------------------------ - * The name of the session ID member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string sessionIdName = "sessionId"; - -/*------------------------------------------------------------------------------ - * The name of the login name member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string loginName = "login"; - -/*------------------------------------------------------------------------------ - * The name of the password member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string passwordName = "password"; - -/*------------------------------------------------------------------------------ - * The name of the search criteria member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string searchCriteriaName = "criteria"; - -/*------------------------------------------------------------------------------ - * The name of the token member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string tokenName = "token"; - -/*------------------------------------------------------------------------------ - * The name of the backup status member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string backupStatusName = "status"; - -/*------------------------------------------------------------------------------ - * The name of the URL member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string urlName = "url"; - -/*------------------------------------------------------------------------------ - * The name of the path member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string pathName = "path"; - -/*------------------------------------------------------------------------------ - * The name of the fault string member in the XML-RPC parameter structure - *----------------------------------------------------------------------------*/ -const std::string faultStringName = "faultString"; - -} - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Extract the schedule entry ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractScheduleEntryId( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(scheduleEntryIdName) - || xmlRpcValue[scheduleEntryIdName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad schedule entry ID " - "argument"); - } - - Ptr::Ref id(new UniqueId(std::string( - xmlRpcValue[scheduleEntryIdName] ))); - return id; -} - - -/*------------------------------------------------------------------------------ - * Extract the generic ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(idName) - || xmlRpcValue[idName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad ID argument"); - } - - Ptr::Ref id(new UniqueId(std::string(xmlRpcValue[idName]))); - return id; -} - - -/*------------------------------------------------------------------------------ - * Extract the playlist ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPlaylistId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(playlistIdName) - || xmlRpcValue[playlistIdName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad playlist ID argument"); - } - - Ptr::Ref id(new UniqueId(std::string( - xmlRpcValue[playlistIdName] ))); - return id; -} - - -/*------------------------------------------------------------------------------ - * Extract the playlist element ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPlaylistElementId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(playlistElementIdName) - || xmlRpcValue[playlistElementIdName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad playlist element ID " - "argument"); - } - - Ptr::Ref id(new UniqueId(std::string( - xmlRpcValue[playlistElementIdName] ))); - return id; -} - - -/*------------------------------------------------------------------------------ - * Extract the audio clip ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractAudioClipId(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(audioClipIdName) - || xmlRpcValue[audioClipIdName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad audio clip ID argument"); - } - - Ptr::Ref id(new UniqueId(std::string( - xmlRpcValue[audioClipIdName] ))); - return id; -} - -/*------------------------------------------------------------------------------ - * Extract the relative offset from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractClipStart(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(clipStartName) - || xmlRpcValue[clipStartName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing clip start argument"); - } - - Ptr::Ref clipStart(new time_duration(0,0, - int(xmlRpcValue[clipStartName]), 0)); - return clipStart; -} - -/*------------------------------------------------------------------------------ - * Extract the relative offset from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractClipEnd(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(clipEndName) - || xmlRpcValue[clipEndName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing clip end argument"); - } - - Ptr::Ref clipEnd(new time_duration(0,0, - int(xmlRpcValue[clipEndName]), 0)); - return clipEnd; -} - -/*------------------------------------------------------------------------------ - * Extract the relative offset from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractClipLength(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(clipLengthName) - || xmlRpcValue[clipLengthName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing clip length argument"); - } - - Ptr::Ref clipLength(new time_duration(0,0, - int(xmlRpcValue[clipLengthName]), 0)); - return clipLength; -} - -/*------------------------------------------------------------------------------ - * Extract the relative offset from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractRelativeOffset(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(relativeOffsetName) - || xmlRpcValue[relativeOffsetName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing relative offset argument"); - } - - Ptr::Ref relativeOffset(new time_duration(0,0, - int(xmlRpcValue[relativeOffsetName]), 0)); - return relativeOffset; -} - - -/*------------------------------------------------------------------------------ - * Convert a Playlist to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playlistToXmlRpcValue( - Ptr::Ref playlist, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw () -{ - xmlRpcValue["playlist"] = std::string(*playlist->getXmlDocumentString()); -} - - -/*------------------------------------------------------------------------------ - * Convert a vector of Playlists into an XML-RPC value. - * This function returns an XML-RPC array of XML-RPC structures. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playlistVectorToXmlRpcValue( - const Ptr::Ref> >::Ref playlistVector, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue.setSize(playlistVector->size()); - // a call to setSize() makes sure it's an XML-RPC - // array - - std::vector::Ref>::const_iterator it = - playlistVector->begin(); - int arraySize = 0; - while (it != playlistVector->end()) { - Ptr::Ref playlist = *it; - XmlRpc::XmlRpcValue returnStruct; - playlistToXmlRpcValue(playlist, returnStruct); - returnValue[arraySize++] = returnStruct; - ++it; - } -} - - -/*------------------------------------------------------------------------------ - * Convert an AudioClip to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: audioClipToXmlRpcValue( - Ptr::Ref audioClip, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw () -{ - xmlRpcValue["audioClip"] = std::string(*audioClip->getXmlDocumentString()); -} - - -/*------------------------------------------------------------------------------ - * Convert a vector of AudioClips into an XML-RPC value. - * This function returns an XML-RPC array of XML-RPC structures. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: audioClipVectorToXmlRpcValue( - const Ptr::Ref> >::Ref audioClipVector, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue.setSize(audioClipVector->size()); - // a call to setSize() makes sure it's an XML-RPC - // array - - std::vector::Ref>::const_iterator it = - audioClipVector->begin(); - int arraySize = 0; - while (it != audioClipVector->end()) { - Ptr::Ref audioClip = *it; - XmlRpc::XmlRpcValue returnStruct; - audioClipToXmlRpcValue(audioClip, returnStruct); - returnValue[arraySize++] = returnStruct; - ++it; - } -} - - -/*------------------------------------------------------------------------------ - * Extract a Playlist from an XML-RPC parameter. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPlaylist(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - Ptr::Ref playlist(new Playlist(xmlRpcValue)); - // may throw std::invalid_argument - return playlist; -} - - -/*------------------------------------------------------------------------------ - * Extract a vector of Playlists from an XML-RPC parameter. - *----------------------------------------------------------------------------*/ -Ptr::Ref> >::Ref -XmlRpcTools :: extractPlaylistVector(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (xmlRpcValue.getType() != XmlRpc::XmlRpcValue::TypeArray) { - throw std::invalid_argument("argument to extractPlaylistVector " - "is not an array"); - } - - Ptr::Ref> >::Ref playlistVector; - for (int i=0; i < xmlRpcValue.size(); i++) { - Ptr::Ref playlist(new Playlist(xmlRpcValue[i])); - // may throw std::invalid_argument - playlistVector->push_back(playlist); - } - return playlistVector; -} - - -/*------------------------------------------------------------------------------ - * Extract an AudioClip from an XML-RPC parameter. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractAudioClip(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - Ptr::Ref audioClip(new AudioClip(xmlRpcValue)); - // may throw std::invalid_argument - return audioClip; -} - - -/*------------------------------------------------------------------------------ - * Extract a vector of AudioClips from an XML-RPC parameter. - *----------------------------------------------------------------------------*/ -Ptr::Ref> >::Ref -XmlRpcTools :: extractAudioClipVector(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (xmlRpcValue.getType() != XmlRpc::XmlRpcValue::TypeArray) { - throw std::invalid_argument("argument to extractAudioClipVector " - "is not an array"); - } - - Ptr::Ref> >::Ref audioClipVector; - for (int i=0; i < xmlRpcValue.size(); i++) { - Ptr::Ref audioClip(new AudioClip(xmlRpcValue[i])); - // may throw std::invalid_argument - audioClipVector->push_back(audioClip); - } - return audioClipVector; -} - - -/*------------------------------------------------------------------------------ - * Convert an error code, error message pair to an XML-RPC fault response - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: markError(int errorCode, const std::string errorMessage, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (XmlRpc::XmlRpcException) -{ - throw XmlRpc::XmlRpcException(errorMessage, errorCode); -} - - -/*------------------------------------------------------------------------------ - * Convert the valid status of a playlist to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: validStatusToXmlRpcValue( - bool validStatus, - XmlRpc::XmlRpcValue & xmlRpcValue) - throw () -{ - xmlRpcValue["valid"] = XmlRpc::XmlRpcValue(validStatus); -} - - -/*------------------------------------------------------------------------------ - * Extract the 'from' time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractFromTime( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(fromTimeName) - || xmlRpcValue[fromTimeName].getType() - != XmlRpc::XmlRpcValue::TypeDateTime) { - throw std::invalid_argument("missing or bad 'from' time in " - "parameter structure"); - } - - struct tm time = (struct tm) xmlRpcValue[fromTimeName]; - return TimeConversion::tmToPtime(&time); -} - - -/*------------------------------------------------------------------------------ - * Extract the 'to' time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractToTime( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(toTimeName) - || xmlRpcValue[toTimeName].getType() - != XmlRpc::XmlRpcValue::TypeDateTime) { - throw std::invalid_argument("missing or bad 'to' time in " - "parameter structure"); - } - - struct tm time = (struct tm) xmlRpcValue[toTimeName]; - return TimeConversion::tmToPtime(&time); -} - - -/*------------------------------------------------------------------------------ - * Extract the 'start' time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractStartTime( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(startTimeName) - || xmlRpcValue[startTimeName].getType() - != XmlRpc::XmlRpcValue::TypeDateTime) { - throw std::invalid_argument("missing or bad 'start' time in " - "parameter structure"); - } - - struct tm time = (struct tm) xmlRpcValue[startTimeName]; - return TimeConversion::tmToPtime(&time); -} - - -/*------------------------------------------------------------------------------ - * Extract the 'end' time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractEndTime( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(endTimeName) - || xmlRpcValue[endTimeName].getType() - != XmlRpc::XmlRpcValue::TypeDateTime) { - throw std::invalid_argument("missing or bad 'end' time in " - "parameter structure"); - } - - struct tm time = (struct tm) xmlRpcValue[endTimeName]; - return TimeConversion::tmToPtime(&time); -} - - -/*------------------------------------------------------------------------------ - * Convert a boost::posix_time::ptime to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: ptimeToXmlRpcValue( - Ptr::Ref ptimeParam, - XmlRpc::XmlRpcValue& xmlRpcValue) - throw () -{ - struct tm time; - Ptr::Ref myPtime(new ptime(*ptimeParam)); // get rid of const - - TimeConversion::ptimeToTm(myPtime, time); - xmlRpcValue = XmlRpc::XmlRpcValue(&time); -} - - -/*------------------------------------------------------------------------------ - * Convert a vector of ScheduleEntries into an XML-RPC value. - * This function returns an XML-RPC array of XML-RPC structures. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: scheduleEntriesToXmlRpcValue( - Ptr::Ref> >::Ref scheduleEntries, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue.setSize(scheduleEntries->size()); - // a call to setSize() makes sure it's an XML-RPC - // array - - std::vector::Ref>::iterator it - = scheduleEntries->begin(); - int arraySize = 0; - while (it != scheduleEntries->end()) { - Ptr::Ref entry = *it; - XmlRpc::XmlRpcValue returnStruct; - returnStruct[idName] = std::string(*entry->getId()); - returnStruct[playlistIdName] = std::string(*entry->getPlaylistId()); - - XmlRpc::XmlRpcValue time; - ptimeToXmlRpcValue(entry->getStartTime(), time); - returnStruct[startTimeName] = time; - - ptimeToXmlRpcValue(entry->getEndTime(), time); - returnStruct[endTimeName] = time; - - returnValue[arraySize++] = returnStruct; - ++it; - } -} - - -/*------------------------------------------------------------------------------ - * Convert an XML-RPC value, holding an array of schedule entries - * to a vector holding the same ScheduleEntry object. - *----------------------------------------------------------------------------*/ -Ptr::Ref> >::Ref -XmlRpcTools :: extractScheduleEntries( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw () -{ - Ptr::Ref> >::Ref entries; - entries.reset(new std::vector::Ref>()); - - int nEntries = xmlRpcValue.size(); - for (int i = 0; i < nEntries; ++i) { - XmlRpc::XmlRpcValue & entryValue = xmlRpcValue[i]; - - Ptr::Ref entryId = extractId(entryValue); - Ptr::Ref playlistId = extractPlaylistId(entryValue); - Ptr::Ref start = extractStartTime(entryValue); - Ptr::Ref end = extractEndTime(entryValue); - - Ptr::Ref entry(new ScheduleEntry(entryId, - playlistId, - start, - end)); - - entries->push_back(entry); - } - - return entries; -} - - -/*------------------------------------------------------------------------------ - * Extract the playtime from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPlayschedule( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(playtimeName) - || xmlRpcValue[playtimeName].getType() - != XmlRpc::XmlRpcValue::TypeDateTime) { - throw std::invalid_argument("missing or bad playtime in " - "parameter structure"); - } - - struct tm time = (struct tm) xmlRpcValue[playtimeName]; - return TimeConversion::tmToPtime(&time); -} - - -/*------------------------------------------------------------------------------ - * Extract the fade in time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractFadeIn(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(fadeInName) - || xmlRpcValue[fadeInName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing or bad 'fade in' argument"); - } - - Ptr::Ref fadeIn(new time_duration(0,0, - int(xmlRpcValue[fadeInName]), 0)); - return fadeIn; -} - - -/*------------------------------------------------------------------------------ - * Extract the fade out time from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractFadeOut(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(fadeOutName) - || xmlRpcValue[fadeOutName].getType() - != XmlRpc::XmlRpcValue::TypeInt) { - throw std::invalid_argument("missing or bad 'fade out' argument"); - } - - Ptr::Ref fadeOut(new time_duration(0,0, - int(xmlRpcValue[fadeOutName]), 0)); - return fadeOut; -} - - -/*------------------------------------------------------------------------------ - * Convert a schedule entry ID (a UniqueId) to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: scheduleEntryIdToXmlRpcValue( - Ptr::Ref scheduleEntryId, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[scheduleEntryIdName] = std::string(*scheduleEntryId); -} - - -/*------------------------------------------------------------------------------ - * Add a session ID to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: sessionIdToXmlRpcValue( - Ptr::Ref sessionId, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[sessionIdName] = sessionId->getId(); -} - - -/*------------------------------------------------------------------------------ - * Add a playlist ID to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playlistIdToXmlRpcValue( - Ptr::Ref playlistId, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[playlistIdName] = std::string(*playlistId); -} - - -/*------------------------------------------------------------------------------ - * Add an audio clip ID to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: audioClipIdToXmlRpcValue( - Ptr::Ref audioClipId, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[audioClipIdName] = std::string(*audioClipId); -} - - -/*------------------------------------------------------------------------------ - * Add a playlist element ID to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playlistElementIdToXmlRpcValue( - Ptr::Ref playlistElementId, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[playlistElementIdName] = std::string(*playlistElementId); -} - - -/*------------------------------------------------------------------------------ - * Add a playtime value to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playtimeToXmlRpcValue( - Ptr::Ref playtime, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - XmlRpc::XmlRpcValue timestamp; - ptimeToXmlRpcValue(playtime, timestamp); - returnValue[playtimeName] = timestamp; -} - - -/*------------------------------------------------------------------------------ - * Add a 'from' time value to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: fromTimeToXmlRpcValue( - Ptr::Ref from, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - XmlRpc::XmlRpcValue timestamp; - ptimeToXmlRpcValue(from, timestamp); - returnValue[fromTimeName] = timestamp; -} - - -/*------------------------------------------------------------------------------ - * Add a 'to' time value to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: toTimeToXmlRpcValue( - Ptr::Ref to, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - XmlRpc::XmlRpcValue timestamp; - ptimeToXmlRpcValue(to, timestamp); - returnValue[toTimeName] = timestamp; -} - - -/*------------------------------------------------------------------------------ - * Convert a PlayLogEntry to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playLogEntryToXmlRpcValue( - Ptr::Ref playLogEntry, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue["audioClipId"] = std::string(*playLogEntry->getAudioClipId()); - - XmlRpc::XmlRpcValue timestamp; - ptimeToXmlRpcValue(playLogEntry->getTimestamp(), timestamp); - returnValue["timestamp"] = timestamp; -} - - -/*------------------------------------------------------------------------------ - * Convert a vector of PlayLogEntries into an XML-RPC value. - * This function returns an XML-RPC array of XML-RPC structures. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: playLogVectorToXmlRpcValue( - Ptr::Ref> >::Ref playLogVector, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue.setSize(playLogVector->size()); - // a call to setSize() makes sure it's an XML-RPC - // array - - std::vector::Ref>::const_iterator it = - playLogVector->begin(); - int arraySize = 0; - while (it != playLogVector->end()) { - Ptr::Ref playLog = *it; - XmlRpc::XmlRpcValue returnStruct; - playLogEntryToXmlRpcValue(playLog, returnStruct); - returnValue[arraySize++] = returnStruct; - ++it; - } -} - - -/*------------------------------------------------------------------------------ - * Extract the session ID from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractSessionId( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(sessionIdName) - || xmlRpcValue[sessionIdName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad session ID argument"); - } - - Ptr::Ref id(new SessionId(std::string( - xmlRpcValue[sessionIdName] ))); - return id; -} - - -/*------------------------------------------------------------------------------ - * Extract the login name from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractLoginName( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(loginName) - || xmlRpcValue[loginName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad login name argument"); - } - - Ptr::Ref login(new std::string(xmlRpcValue[loginName])); - return login; -} - - -/*------------------------------------------------------------------------------ - * Extract the password from an XML-RPC function call parameter - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPassword( - XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(passwordName) - || xmlRpcValue[passwordName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad password argument"); - } - - Ptr::Ref password(new std::string( - xmlRpcValue[passwordName] )); - return password; -} - - -/*------------------------------------------------------------------------------ - * Extract the search criteria from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractSearchCriteria(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(searchCriteriaName) - || xmlRpcValue[searchCriteriaName].getType() - != XmlRpc::XmlRpcValue::TypeStruct) { - throw std::invalid_argument("missing or bad criteria argument"); - } - XmlRpc::XmlRpcValue xmlCriteria = xmlRpcValue[searchCriteriaName]; - - Ptr::Ref criteria(new SearchCriteria(xmlCriteria)); - - return criteria; -} - - -/*------------------------------------------------------------------------------ - * Convert a SearchCriteria to an XmlRpcValue - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: searchCriteriaToXmlRpcValue( - Ptr::Ref criteria, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[searchCriteriaName] = *criteria; -} - - -/*------------------------------------------------------------------------------ - * Extract a token from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractToken(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(tokenName) - || xmlRpcValue[tokenName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad token argument"); - } - - Ptr::Ref token(new Glib::ustring( - xmlRpcValue[tokenName] )); - return token; -} - - -/*------------------------------------------------------------------------------ - * Convert a string token to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: tokenToXmlRpcValue( - Ptr::Ref token, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[tokenName] = std::string(*token); -} - - -/*------------------------------------------------------------------------------ - * Extract the backup status from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -AsyncState -XmlRpcTools :: extractBackupStatus(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(backupStatusName) - || xmlRpcValue[backupStatusName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad status argument"); - } - - AsyncState status = AsyncState::fromBackupString( - xmlRpcValue[backupStatusName]); - return status; -} - - -/*------------------------------------------------------------------------------ - * Convert a StorageClientInterface::AsyncState returned by one - * of the backup methods to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: backupStatusToXmlRpcValue(AsyncState status, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - Ptr::Ref stringValue = status.toBackupString(); - returnValue[backupStatusName] = *stringValue; -} - - -/*------------------------------------------------------------------------------ - * Extract a URL string from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractUrl(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(urlName) - || xmlRpcValue[urlName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad url argument"); - } - - Ptr::Ref url(new Glib::ustring( - xmlRpcValue[urlName] )); - return url; -} - - -/*------------------------------------------------------------------------------ - * Convert a string token to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: urlToXmlRpcValue( - Ptr::Ref url, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[urlName] = std::string(*url); -} - - -/*------------------------------------------------------------------------------ - * Extract a path string from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractPath(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(pathName) - || xmlRpcValue[pathName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad path argument"); - } - - Ptr::Ref path(new Glib::ustring( - xmlRpcValue[pathName] )); - return path; -} - - -/*------------------------------------------------------------------------------ - * Convert a string token to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: pathToXmlRpcValue( - Ptr::Ref path, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[pathName] = std::string(*path); -} - - -/*------------------------------------------------------------------------------ - * Extract a fault string from the XML-RPC parameters. - *----------------------------------------------------------------------------*/ -Ptr::Ref -XmlRpcTools :: extractFaultString(XmlRpc::XmlRpcValue & xmlRpcValue) - throw (std::invalid_argument) -{ - if (!xmlRpcValue.hasMember(faultStringName) - || xmlRpcValue[faultStringName].getType() - != XmlRpc::XmlRpcValue::TypeString) { - throw std::invalid_argument("missing or bad faultString argument"); - } - - Ptr::Ref faultString(new Glib::ustring( - xmlRpcValue[faultStringName] )); - return faultString; -} - - -/*------------------------------------------------------------------------------ - * Convert a fault string to an XmlRpcValue. - *----------------------------------------------------------------------------*/ -void -XmlRpcTools :: faultStringToXmlRpcValue( - Ptr::Ref faultString, - XmlRpc::XmlRpcValue & returnValue) - throw () -{ - returnValue[faultStringName] = std::string(*faultString); -} - diff --git a/src/modules/core/src/XmlRpcToolsTest.cxx b/src/modules/core/src/XmlRpcToolsTest.cxx deleted file mode 100644 index 0398fcf1c..000000000 --- a/src/modules/core/src/XmlRpcToolsTest.cxx +++ /dev/null @@ -1,321 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include -#include - -#include "LiveSupport/Core/XmlRpcTools.h" -#include "XmlRpcToolsTest.h" - - -using namespace LiveSupport::Core; - -using namespace std; -using namespace XmlRpc; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(XmlRpcToolsTest); - -/** - * The name of the configuration file for the playlist. - */ -const std::string configFileName = "etc/playlist.xml"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Configure a Configurable with an XML file. - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: configure( - Ptr::Ref configurable, - const std::string fileName) - throw (CPPUNIT_NS::Exception) -{ - try { - Ptr::Ref parser( - new xmlpp::DomParser(configFileName, true)); - const xmlpp::Document * document = parser->get_document(); - const xmlpp::Element * root = document->get_root_node(); - - configurable->configure(*root); - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in configuration file"); - } catch (xmlpp::exception &e) { - CPPUNIT_FAIL("error parsing configuration file"); - } -} - - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Just a very simple smoke test - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - XmlRpcValue xmlRpcPlaylist; - XmlRpcValue xmlRpcAudioClip; - Ptr::Ref playlist = Ptr::Ref(new Playlist()); - Ptr::Ref audioClip; - - // set up a playlist instance - configure(playlist, configFileName); - audioClip = playlist->begin()->second->getAudioClip(); - - // run the packing methods - XmlRpcTools :: playlistToXmlRpcValue(playlist, xmlRpcPlaylist); - XmlRpcTools :: audioClipToXmlRpcValue(audioClip, xmlRpcAudioClip); - - CPPUNIT_ASSERT(xmlRpcPlaylist.hasMember("playlist")); - CPPUNIT_ASSERT(xmlRpcPlaylist["playlist"].getType() - == XmlRpcValue::TypeString); - - CPPUNIT_ASSERT(xmlRpcAudioClip.hasMember("audioClip")); - CPPUNIT_ASSERT(xmlRpcAudioClip["audioClip"].getType() - == XmlRpcValue::TypeString); - - XmlRpcValue xmlRpcPlaylistId; - Ptr::Ref playlistId(new UniqueId(rand())); - Ptr::Ref audioClipId(new UniqueId(rand())); - Ptr::Ref relativeOffset(new time_duration(0,0,rand(),0)); - - xmlRpcPlaylistId["playlistId"] = std::string(*playlistId); - xmlRpcPlaylistId["audioClipId"] = std::string(*audioClipId); - xmlRpcPlaylistId["relativeOffset"] = relativeOffset->total_seconds(); - - // run the unpacking methods - Ptr::Ref newPlaylistId; - Ptr::Ref newAudioClipId; - Ptr::Ref newRelativeOffset; - Ptr::Ref newPlaylist; - Ptr::Ref newAudioClip; - try { - newPlaylistId = XmlRpcTools::extractPlaylistId(xmlRpcPlaylistId); - newAudioClipId = XmlRpcTools::extractAudioClipId(xmlRpcPlaylistId); - newRelativeOffset - = XmlRpcTools::extractRelativeOffset(xmlRpcPlaylistId); - newPlaylist = XmlRpcTools::extractPlaylist(xmlRpcPlaylist); - newAudioClip = XmlRpcTools::extractAudioClip(xmlRpcAudioClip); - - } catch (std::invalid_argument &e) { - CPPUNIT_FAIL(e.what()); - } - - CPPUNIT_ASSERT(*playlistId == *newPlaylistId); - CPPUNIT_ASSERT(*audioClipId == *newAudioClipId); - CPPUNIT_ASSERT(*relativeOffset == *newRelativeOffset); - - CPPUNIT_ASSERT(*playlist->getId() == *newPlaylist->getId()); - CPPUNIT_ASSERT(*playlist->getTitle() == *newPlaylist->getTitle()); - CPPUNIT_ASSERT(*playlist->getPlaylength() - == *newPlaylist->getPlaylength()); - - CPPUNIT_ASSERT(*audioClip->getId() == *newAudioClip->getId()); - CPPUNIT_ASSERT(*audioClip->getTitle() == *newAudioClip->getTitle()); - CPPUNIT_ASSERT(*audioClip->getPlaylength() - == *newAudioClip->getPlaylength()); -} - - -/*------------------------------------------------------------------------------ - * Testing the search criteria marshaling/demarshaling. - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: secondTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref token(new Glib::ustring("this is a token")); - XmlRpcValue xmlRpcToken; - - CPPUNIT_ASSERT_NO_THROW( - XmlRpcTools::tokenToXmlRpcValue(token, xmlRpcToken) - ); - - Ptr::Ref otherToken; - CPPUNIT_ASSERT_NO_THROW( - otherToken = XmlRpcTools::extractToken(xmlRpcToken) - ); - CPPUNIT_ASSERT(otherToken); - - CPPUNIT_ASSERT(*token == *otherToken); - - XmlRpcValue otherXmlRpcToken; - CPPUNIT_ASSERT_NO_THROW( - XmlRpcTools::tokenToXmlRpcValue(otherToken, otherXmlRpcToken) - ); - - CPPUNIT_ASSERT(xmlRpcToken == otherXmlRpcToken); -} - - -/*------------------------------------------------------------------------------ - * Testing the search criteria marshaling/demarshaling. - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: searchCriteriaTest(void) - throw (CPPUNIT_NS::Exception) -{ - std::string xmlStringCriteria = -"" -"" -"criteria" -"" -" " -" filetype" -" audioClip" -" " -" " -" operator" -" or" -" " -" " -" limit" -" 5" -" " -" " -" offset" -" 100" -" " -" " -" conditions" -" " -" " -" " -" cat" -" dc:title" -" " -" " -" op" -" partial" -" " -" " -" val" -" abcdef" -" " -" " -" " -" " -" cat" -" dc:creator" -" " -" " -" op" -" =" -" " -" " -" val" -" ABCDEF" -" " -" " -" " -" " -"" -"" -""; - - XmlRpcValue xmlRpcCriteria; - int offset = 0; - xmlRpcCriteria.fromXml(xmlStringCriteria, &offset); - - Ptr::Ref criteria; - CPPUNIT_ASSERT_NO_THROW( - criteria = XmlRpcTools::extractSearchCriteria(xmlRpcCriteria) - ); - CPPUNIT_ASSERT(criteria); - - XmlRpcValue otherXmlRpcCriteria; - CPPUNIT_ASSERT_NO_THROW( - XmlRpcTools::searchCriteriaToXmlRpcValue(criteria, otherXmlRpcCriteria) - ); - - CPPUNIT_ASSERT(xmlRpcCriteria == otherXmlRpcCriteria); - - Ptr::Ref otherCriteria; - CPPUNIT_ASSERT_NO_THROW( - otherCriteria = XmlRpcTools::extractSearchCriteria(otherXmlRpcCriteria) - ); - CPPUNIT_ASSERT(otherCriteria); - - CPPUNIT_ASSERT(*criteria == *otherCriteria); -} - - -/*------------------------------------------------------------------------------ - * Testing markError() - *----------------------------------------------------------------------------*/ -void -XmlRpcToolsTest :: errorTest(void) - throw (CPPUNIT_NS::Exception) -{ - XmlRpcValue xmlRpcValue; - - try { - XmlRpcTools :: markError(42, "this is an error", xmlRpcValue); - CPPUNIT_FAIL("did not throw exception in markError()"); - } catch (XmlRpc::XmlRpcException &e) { - CPPUNIT_ASSERT(e.getCode() == 42); - CPPUNIT_ASSERT(e.getMessage() == "this is an error"); - } -} - diff --git a/src/modules/core/src/XmlRpcToolsTest.h b/src/modules/core/src/XmlRpcToolsTest.h deleted file mode 100644 index 4b2f13d3b..000000000 --- a/src/modules/core/src/XmlRpcToolsTest.h +++ /dev/null @@ -1,143 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef XmlRpcToolsTest_h -#define XmlRpcToolsTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace Core { - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the XmlRpcTools class. - * - * @see XmlRpcTools - */ -class XmlRpcToolsTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(XmlRpcToolsTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(secondTest); - CPPUNIT_TEST(searchCriteriaTest); - CPPUNIT_TEST(errorTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Configure a configurable with an XML file. - * - * @param configurable configure this - * @param fileName the name of the XML file to configure with. - * @exception CPPUNIT_NS::Exception on XML parsing errors. - */ - void - configure(Ptr::Ref configurable, - std::string fileName) - throw (CPPUNIT_NS::Exception); - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Another simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - secondTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the search criteria marshaling/demarshaling. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - searchCriteriaTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Testing the method for error message packaging. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - errorTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace Scheduler -} // namespace LiveSupport - -#endif // XmlRpcToolsTest_h - diff --git a/src/modules/core/tmp/.keepme b/src/modules/core/tmp/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/core/tmp/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/core/var/.keepme b/src/modules/core/var/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/core/var/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/core/var/en.txt b/src/modules/core/var/en.txt deleted file mode 100644 index a0b0a6d89..000000000 --- a/src/modules/core/var/en.txt +++ /dev/null @@ -1,7 +0,0 @@ -en:table -{ - section1:table - { - foo:string { "fou" } - } -} diff --git a/src/modules/core/var/hello.tar b/src/modules/core/var/hello.tar deleted file mode 100644 index 0d2d65d0aab9d7d5031ff1d881f3f48bc0761a74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10240 zcmeIvF$%*l3_wxMJ%zh>kW$CKLT}JH5JRDcfZYteeeHJ6m?89Qk%hpPo*yaaMfMGC z5rUVNERNcAyXM+X^0{{>d00009f*1yg#!S&qT}GYt;~4Qn)U7QXEQr;d9Ie!qC0PF5 z^uH&G6+E1sE!^GIMdU?4&fow5P)j*W$xG==Z)@^9COcrLe_rlM@ zDpB^pA(obCaKat(gWC*uh{0@2Hv~{)sx}ya?SjyGM1lw;Jzf7P*xWagNU0zY{Vl5F zuPC3mz@H;x(O4?`Z!5*k!l62>o+gmER*97I05m`V5D}s@$`}B5 z1{?;U-hp3-{qu;~sDTjB_wBz0!NY#kKuC}o-|&j@Q@r ztjY%+d1dBZ?gIk`2#`F7aeycZIU}e^(EMloMnDZ)iHSmzG&~}#qqWEj?q>G>O)Q#L zj;+1b?-7*Vb3t)4PY3B4Y_v~@N?XGQyI8-skqvEk>i|` z$e?yZCFU~v6;w6)S-KK{I1zArdr@(EdXuzW;z0GpnPf(86crwojryM*PW^1xRZjL@ zImr?-(`69Jolp0E5IA@4g~ph>vFERCwiLH@kmOBPF$!Ivs=@)#BAya70*%+>3t3-;fq4UNNp4d>H{>xxS)Dm(g5taT_(DU%*0BI_= zWLNt!BaI5gKSttY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+JU zytc1j|2IZ#<~mPIP8k9zs3K5$^^bg|{gTgto}zt!sJ{k0yqvw8Y)d3O${WKTcj2LbGT#XC-Xiv+uPd#d;FpYyhtVy47oUGI^gb4L&uTE9lF&sLoxlYiP8JP0 z_k|*6ITFlcT#kdX#tlCAZ5*4+Pi}(kw8)&o??CszeY*d zu)MP^8G$tPMAd1j*4%1je6PmcGTXRi{qmy{qJ4mdAosnldruSlut;DiD3K4@aXsUl zRVpEh8osjo*O1knKniw}7{lB3tNnpSlR9=?IQD49EQcHr))-@A9^jt`jDx%|U&)S4 zdQAJ;)>x%3235zBDCq3x+O>AiW`v5!k1!F1d3_JdQXp7L{yzRy!96W~glEJLe841v zW|T3Il~UV#GxgG4GKU<@q$sW=#my$j$HrOtf4Tl4M2UF;06^zsq2f{ibc%lsSpZBi Y^eyxyPXLtS@PGN$|NmqEPyT`b16 /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - -echo "Generating configuration files for $package, please wait...." - -configure_ac=${etcdir}/configure.ac -configure=${tmpdir}/configure -aclocal_m4=${tmpdir}/aclocal.m4 - -# copy over configure.ac and acinlclude.m4 from etc to tmp, -# as aclocal >= 1.8 is sooo unbelivably stupid that it will simply try to -# look for configure.ac in the current directory, and include acinclude.m4 -# in aclocal.m4 it without a directory path in front -ACLOCAL_FLAGS="-I ${tmpdir} --acdir=${tmpdir} --output=${aclocal_m4}" -echo " aclocal $ACLOCAL_FLAGS" -cp -f ${configure_ac} ${tmpdir} -cp -f ${etcdir}/acinclude.m4 ${tmpdir} -aclocal $ACLOCAL_FLAGS - -echo " autoheader ${configure_ac}" -autoheader ${configure_ac} - -echo " autoconf -I ${tmpdir} -o ${configure} ${configure_ac}" -autoconf -I ${tmpdir} -o ${configure} ${configure_ac} - diff --git a/src/modules/eventScheduler/bin/gen_coverage_data.sh b/src/modules/eventScheduler/bin/gen_coverage_data.sh deleted file mode 100755 index 52ad8fc6f..000000000 --- a/src/modules/eventScheduler/bin/gen_coverage_data.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script generates code coverage data for the module -#------------------------------------------------------------------------------- -module="Campcaster EventScheduler" - -reldir=`dirname $0`/.. -basedir=`cd $reldir; pwd;` -bindir=$basedir/bin -docdir=$basedir/doc -tmpdir=$basedir/tmp - -usrdir=`cd $basedir/../../../usr; pwd;` - -coverage_report_dir=$docdir/coverage - -raw_coverage_file=$tmpdir/raw_coverage.info -coverage_file=$tmpdir/coverage.info - -lcov=$usrdir/bin/lcov -genhtml=$usrdir/bin/genhtml - - -cd $basedir - -#------------------------------------------------------------------------------- -# Re-configure with covarege collection enabled, compile and run the tests -#------------------------------------------------------------------------------- -$bindir/autogen.sh --enable-coverage -make clean -make check - -#------------------------------------------------------------------------------- -# Generate some symlinks so that the sources are visible from tmpdir -#------------------------------------------------------------------------------- -ln -s $basedir/include $tmpdir/include -ln -s $basedir/src $tmpdir/src - - -#------------------------------------------------------------------------------- -# Use lcov to generate an HTML report on the coverage data -#------------------------------------------------------------------------------- -$lcov -d $tmpdir -c > $raw_coverage_file -$lcov -e $raw_coverage_file "$tmpdir/*" > $coverage_file -rm -rf $coverage_report_dir -mkdir -p $coverage_report_dir -$genhtml -t "$module" -o $coverage_report_dir $coverage_file - - -#------------------------------------------------------------------------------- -# Clean up -#------------------------------------------------------------------------------- -rm -f $tmpdir/include -rm -f $tmpdir/src diff --git a/src/modules/eventScheduler/configure b/src/modules/eventScheduler/configure deleted file mode 100755 index 0c58cc366..000000000 --- a/src/modules/eventScheduler/configure +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Run this script to configure the environment. -# -# This script in effect calls the real automake / autoconf configure script -#------------------------------------------------------------------------------- - -# assume we're in $basedir -reldir=`dirname $0` -basedir=`cd $reldir; pwd;` -test -z "$basedir" && basedir=. - -bindir=$basedir/bin -tmpdir=$basedir/tmp - - -autogen=$bindir/autogen.sh -configure=$tmpdir/configure - -if [ ! -x $configure ]; then - (cd $basedir && $autogen "$@") -fi - -(cd $tmpdir && $configure "$@") - diff --git a/src/modules/eventScheduler/doc/.keepme b/src/modules/eventScheduler/doc/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/eventScheduler/doc/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/eventScheduler/etc/Makefile.in b/src/modules/eventScheduler/etc/Makefile.in deleted file mode 100644 index 2d0a8c248..000000000 --- a/src/modules/eventScheduler/etc/Makefile.in +++ /dev/null @@ -1,178 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# @configure_input@ -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# General command definitions -#------------------------------------------------------------------------------- -MKDIR = mkdir -p -RM = rm -f -RMDIR = rm -rf -DOXYGEN = doxygen -CP = cp -f - - -#------------------------------------------------------------------------------- -# Basic directory and file definitions -#------------------------------------------------------------------------------- -BASE_DIR = @builddir@ -DOC_DIR = ${BASE_DIR}/doc -DOXYGEN_DIR = ${DOC_DIR}/doxygen -COVERAGE_DIR = ${DOC_DIR}/coverage -ETC_DIR = ${BASE_DIR}/etc -INCLUDE_DIR = ${BASE_DIR}/include -LIB_DIR = ${BASE_DIR}/lib -SRC_DIR = ${BASE_DIR}/src -TMP_DIR = ${BASE_DIR}/tmp - -prefix = @prefix@ - -USR_DIR = ${prefix} -USR_INCLUDE_DIR = ${USR_DIR}/include -USR_LIB_DIR = ${USR_DIR}/lib - -MODULES_DIR = ${BASE_DIR}/.. - -CORE_DIR = ${MODULES_DIR}/core -CORE_INCLUDE_DIR = ${CORE_DIR}/include -CORE_LIB_DIR = ${CORE_DIR}/lib -CORE_LIB = livesupport_core -CORE_LIB_FILE = ${CORE_LIB_DIR}/lib${CORE_LIB}.a - -VPATH = ${SRC_DIR} - -BOOST_CFLAGS=@BOOST_CPPFLAGS@ -BOOST_LIBS=@BOOST_LDFLAGS@ -BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@ - -LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@ -LIBXMLPP_LIBS=@LIBXMLPP_LIBS@ - -TEST_RESULTS = ${DOC_DIR}/testResults.xml -# the text result XSLT has to be relative to the test result file, e.g. TMP_DIR -TEST_XSLT = ../etc/testResultToHtml.xsl - -EVENT_SCHEDULER_LIB = livesupport_event_scheduler -EVENT_SCHEDULER_LIB_FILE = ${LIB_DIR}/lib${EVENT_SCHEDULER_LIB}.a -TEST_RUNNER = ${TMP_DIR}/testRunner - -DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config - -export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH} - - -#------------------------------------------------------------------------------- -# Configuration parameters -#------------------------------------------------------------------------------- -CPPFLAGS = @CPPFLAGS@ -CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \ - -Wall -Wno-long-long \ - ${BOOST_CFLAGS} \ - ${LIBXMLPP_CFLAGS} \ - -I${USR_INCLUDE_DIR} \ - -I${CORE_INCLUDE_DIR} \ - -I${INCLUDE_DIR} -I${TMP_DIR} -LDFLAGS = @LDFLAGS@ -pthread \ - ${BOOST_LIBS} \ - ${LIBXMLPP_LIBS} \ - -L${USR_LIB_DIR} \ - -L${CORE_LIB_DIR} \ - -L${LIB_DIR} - - -#------------------------------------------------------------------------------- -# Dependencies -#------------------------------------------------------------------------------- -EVENT_SCHEDULER_LIB_OBJS = ${TMP_DIR}/SchedulerThread.o \ - ${TMP_DIR}/EventScheduler.o -TEST_RUNNER_OBJS = ${TMP_DIR}/TestScheduledEvent.o \ - ${TMP_DIR}/TestEventContainer.o \ - ${TMP_DIR}/SchedulerThreadTest.o \ - ${TMP_DIR}/EventSchedulerTest.o \ - ${TMP_DIR}/TestRunner.o -TEST_RUNNER_LIBS = -l${EVENT_SCHEDULER_LIB} -l${CORE_LIB} \ - ${BOOST_DATE_TIME_LIB} \ - -lcppunit -ldl - - -#------------------------------------------------------------------------------- -# Targets -#------------------------------------------------------------------------------- -.PHONY: all dir_setup doc clean docclean depclean distclean check install - -all: dir_setup ${EVENT_SCHEDULER_LIB_FILE} - -dir_setup: ${TMP_DIR} ${DOXYGEN_DIR} - -doc: - ${DOXYGEN} ${DOXYGEN_CONFIG} - -clean: - ${RM} ${EVENT_SCHEDULER_LIB_OBJS} ${EVENT_SCHEDULER_LIB_FILE} - ${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER} - ${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info - -docclean: - ${RMDIR} ${DOXYGEN_DIR}/html - ${RMDIR} ${COVERAGE_DIR}/* - ${RM} ${TEST_RESULTS} - -depclean: clean - -distclean: clean docclean - ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* ${TMP_DIR}/ac*.m4 - -check: all ${TEST_RUNNER} - ${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT} - -install: all - ${MKDIR} ${USR_INCLUDE_DIR}/LiveSupport/EventScheduler - ${CP} ${INCLUDE_DIR}/LiveSupport/EventScheduler/*.h \ - ${USR_INCLUDE_DIR}/LiveSupport/EventScheduler - ${CP} ${EVENT_SCHEDULER_LIB_FILE} ${USR_LIB_DIR} - - -#------------------------------------------------------------------------------- -# Specific targets -#------------------------------------------------------------------------------- -${EVENT_SCHEDULER_LIB_FILE}: ${EVENT_SCHEDULER_LIB_OBJS} - ${AR} crus $@ $^ - -${TMP_DIR}: - ${MKDIR} ${TMP_DIR} - -${DOXYGEN_DIR}: - ${MKDIR} ${DOXYGEN_DIR} - -${TEST_RUNNER}: ${CORE_LIB_FILE} ${TEST_RUNNER_OBJS} ${EVENT_SCHEDULER_LIB_FILE} - ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} - -${CORE_LIB_FILE}: - ${MAKE} -C ${CORE_DIR} - - -#------------------------------------------------------------------------------- -# Pattern rules -#------------------------------------------------------------------------------- -${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx - ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< - diff --git a/src/modules/eventScheduler/etc/acinclude.m4 b/src/modules/eventScheduler/etc/acinclude.m4 deleted file mode 100644 index 314a5a258..000000000 --- a/src/modules/eventScheduler/etc/acinclude.m4 +++ /dev/null @@ -1,403 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2010 Sourcefabric O.P.S. -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.sourcefabric.org/ -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl Macro to check for available modules using pkg-conf -dnl -dnl usage: -dnl PKG_CHECK_MODULES(GSTUFF,[gtk+-2.0 >= 1.3], action-if, action-not) -dnl -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -dnl -dnl This function was taken from the glade-- project -dnl----------------------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for C++ namespaces -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ac_cxx_namespaces.html -dnl -dnl usage: -dnl If the compiler can prevent names clashes using namespaces, -dnl define HAVE_NAMESPACES. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for the Boost C++ libraries of a particular version (or newer). -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_base.html -dnl -dnl usage: -dnl If no path to the installed boost library is given the macro searches -dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT -dnl environment variable. Further documentation is available at -dnl http://randspringer.de/boost/index.html -dnl -dnl This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS) -dnl and sets: HAVE_BOOST -dnl -dnl Modified for Campcaster: -dnl * --with-boost default changed to Yes; -dnl * if the library is not found, it does not die, just prints "no", leaves -dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS -dnl variables to ""; -dnl * ${prefix} is prepended to the search path. -dnl -dnl Author: Thomas Porschberg -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - for ac_boost_path in /usr /usr/local /opt ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - BOOST_LDFLAGS="-L$best_path/lib" - - if test "x$BOOST_ROOT" != "x"; then - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "$succeeded" != "yes" ; then - BOOST_CPPFLAGS="" - BOOST_LDFLAGS="" - AC_MSG_RESULT(no) - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for Date_Time library from the Boost C++ libraries. -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_date_time.html -dnl -dnl usage: -dnl The macro requires a preceding call to AX_BOOST_BASE. -dnl Further documentation is available at -dnl . -dnl -dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB) -dnl and sets: HAVE_BOOST_DATE_TIME -dnl -dnl Modified for Campcaster: -dnl * --with-boost-date-time default changed to Yes. -dnl * added some more recognized suffixes to the library's name, incl. "-st". -dnl -dnl Authors: -dnl Thomas Porschberg -dnl Michael Tindal -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_DATE_TIME], -[ - AC_ARG_WITH([boost-date-time], - AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@], - [use the Date_Time library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_date_time_lib="" - else - want_boost="yes" - ax_boost_user_date_time_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Date_Time library is available, - ax_cv_boost_date_time, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include ]], - [[using namespace boost::gregorian; date d(2002,Jan,10); - return 0; - ]]), - ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_date_time" = "xyes"; then - AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available]) - BN=boost_date_time - if test "x$ax_boost_user_date_time_lib" = "x"; then - for ax_lib in $BN $BN-st $BN-mt $BN-mt-s $BN-s \ - $BN-$CC $BN-$CC-st $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \ - lib$BN lib$BN-st lib$BN-mt lib$BN-mt-s lib$BN-s \ - lib$BN-$CC lib$BN-$CC-st lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \ - $BN-mgw $BN-mgw $BN-mgw-st $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do - AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - else - for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do - AC_CHECK_LIB($ax_lib, main, - [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - - fi - if test "x$link_date_time" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - diff --git a/src/modules/eventScheduler/etc/configure.ac b/src/modules/eventScheduler/etc/configure.ac deleted file mode 100644 index 7d81cff76..000000000 --- a/src/modules/eventScheduler/etc/configure.ac +++ /dev/null @@ -1,114 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2010 Sourcefabric O.P.S. -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.sourcefabric.org/ -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl NOTE: Run all configure related scripts from the tmp directory of the -dnl project. -dnl This is due to the fact that configure spreads a lot of trash around, -dnl like atom4te cache directories, config.* files, etc. into the directory -dnl it is being run from. We clearly don't want these in our base directory. -dnl----------------------------------------------------------------------------- -AC_INIT(EventScheduler, 0.0, bugs@campware.org) -AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (c) 2010 Sourcefabric O.P.S. under the GNU GPL]) -AC_REVISION($Revision$) - -AC_CONFIG_SRCDIR(../src/SchedulerThread.cxx) - -AC_CONFIG_HEADERS(configure.h) -AC_PROG_CXX() - -AC_CHECK_HEADERS(getopt.h unistd.h sys/time.h) - - -dnl----------------------------------------------------------------------------- -dnl specify whether debug info should be compiled into the executable -dnl----------------------------------------------------------------------------- -AC_SUBST(CXXFLAGS) - -AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], [compile with debug info (no)]), - [], - [enable_debug=no]) - -if test "x${enable_debug}" = "xyes"; then - CXXFLAGS="-g -O0" - AC_DEFINE( YDEBUG, 1, [Debug is on] ) -else - CXXFLAGS="-O3" -fi - - -AC_MSG_RESULT([using compiler options: ${CXXFLAGS}]) - - -dnl----------------------------------------------------------------------------- -dnl specify the pkg-config path -dnl----------------------------------------------------------------------------- -AC_ARG_WITH([pkg-config-path], - AC_HELP_STRING([--with-pkg-config-path], - [use the pkg-config path (prefix/lib/pkgconfig)]), - [PKG_CONFIG_PATH=${withval}], - [PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:$PKG_CONFIG_PATH]) - -AC_MSG_RESULT([using pkg-config path: ${PKG_CONFIG_PATH}]) - -export PKG_CONFIG_PATH - -export PATH=${prefix}/bin:${PATH} - - -AX_BOOST_BASE([1.33.1]) -if test "x${BOOST_CPPFLAGS}" != "x"; then - AX_BOOST_DATE_TIME - if test "x${BOOST_DATE_TIME_LIB}" = "x"; then - AC_MSG_ERROR([Boost date-time library not found]) - fi -else - AC_MSG_ERROR([Boost library >= 1.33.1 not found]) -fi - -PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) -AC_SUBST(LIBXMLPP_CFLAGS) -AC_SUBST(LIBXMLPP_LIBS) - - -dnl----------------------------------------------------------------------------- -dnl enable compilaton for code coverage data -dnl----------------------------------------------------------------------------- -AC_SUBST(COVERAGE_CXXFLAGS) - -AC_ARG_ENABLE( coverage, -[ --enable-coverage enable code coverage data generaton (no) ], - ENABLE_COVERAGE=${enableval}, ENABLE_COVERAGE="no" ) - -if test "x${ENABLE_COVERAGE}" == "xyes" ; then - COVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage" - AC_MSG_RESULT([compiling in code coverage mode]) -else - AC_MSG_RESULT([not compiling in code coverage mode]) -fi - - -AC_CONFIG_FILES(../Makefile:../etc/Makefile.in) - -AC_OUTPUT() diff --git a/src/modules/eventScheduler/etc/doxygen.config b/src/modules/eventScheduler/etc/doxygen.config deleted file mode 100644 index f03486e9f..000000000 --- a/src/modules/eventScheduler/etc/doxygen.config +++ /dev/null @@ -1,1139 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.sourcefabric.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -# Doxyfile 1.3.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Campcaster - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 0.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/doxygen - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = YES - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include src - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = include - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/src/modules/eventScheduler/etc/testResultToHtml.xsl b/src/modules/eventScheduler/etc/testResultToHtml.xsl deleted file mode 100644 index f9e893521..000000000 --- a/src/modules/eventScheduler/etc/testResultToHtml.xsl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - Campcaster unit test results - - -

Preface

-This document is part of the -
Campcaster -project, Copyright © 2004 Media -Development Loan Fund, under the GNU -GPL. -
-This is an automatically generated document. -

Scope

-This document contains the generated unit test results for the -Campcaster project. -

Summary

- - - - - - - - - - - - - - - - - - -
Total number of tests:
Tests passed:
Tests failed:
Test errors:
-
-

Tests

- - - - - - - - - - - - - -
test nametest status
failedpassed
- - - - - - diff --git a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventContainerInterface.h b/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventContainerInterface.h deleted file mode 100644 index 5cb320345..000000000 --- a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventContainerInterface.h +++ /dev/null @@ -1,108 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_EventScheduler_EventContainerInterface_h -#define LiveSupport_EventScheduler_EventContainerInterface_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/EventScheduler/ScheduledEventInterface.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Base interface for providing the events to get schedulerd by the - * EventScheduler. - */ -class EventContainerInterface -{ - public: - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~EventContainerInterface(void) throw () - { - } - - /** - * Return the first event after the specified timepoint. - * - * @param when return the first event after this timepoint, - * @return the first event to schedule after the specified - * timepoint. may be a reference to 0, if currently - * there are no known events after the specified time. - */ - virtual Ptr::Ref - getNextEvent(Ptr::Ref when) throw () = 0; - - - /** - * Return current event - * - * @param - * @return the first event to schedule at this point in time - * may be a reference to 0, if there are no known events at this time - */ - virtual Ptr::Ref - getCurrentEvent() throw () = 0; -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // LiveSupport_EventScheduler_EventContainerInterface_h - diff --git a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventScheduler.h b/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventScheduler.h deleted file mode 100644 index c26c0de9b..000000000 --- a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/EventScheduler.h +++ /dev/null @@ -1,133 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_EventScheduler_EventScheduler_h -#define LiveSupport_EventScheduler_EventScheduler_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Thread.h" -#include "LiveSupport/Core/RunnableInterface.h" -#include "LiveSupport/EventScheduler/EventContainerInterface.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A generic event scheduler, for non-everlapping subsequent events. - */ -class EventScheduler -{ - private: - /** - * The thread of the scheduler. - */ - Ptr::Ref thread; - - /** - * The scheduler thread runnable object. - */ - Ptr::Ref runnable; - - - public: - /** - * Constructor. - * - * @param eventContainer the container this thread will get its - * events to schedule from. - * @param granularity the granularity of the thread: the time the - * thread will sleep between checking up on things. - */ - EventScheduler(Ptr::Ref eventContainer, - Ptr::Ref granularity) - throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~EventScheduler(void) throw () - { - } - - /** - * Start the event scheduler. - * This function starts the event scheduler in the background, - * and returns immediately. - */ - virtual void - start(void) throw (); - - /** - * Forces the scheduler to re-read its event container. - * Call this if the events held in the event container have - * changed. - */ - virtual void - update(void) throw (); - - /** - * Stop the event scheduler. - */ - virtual void - stop(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // LiveSupport_EventScheduler_EventScheduler_h - diff --git a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/ScheduledEventInterface.h b/src/modules/eventScheduler/include/LiveSupport/EventScheduler/ScheduledEventInterface.h deleted file mode 100644 index 3d38341f7..000000000 --- a/src/modules/eventScheduler/include/LiveSupport/EventScheduler/ScheduledEventInterface.h +++ /dev/null @@ -1,162 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_EventScheduler_ScheduledEventInterface_h -#define LiveSupport_EventScheduler_ScheduledEventInterface_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/Ptr.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * The base class for all events scheduled by the EventScheduler. - * Subclass this one, and implement the necessary functions to have - * a class that can be scheduled. - * - * The lifetime of the scheduled event is as follows, if it is scheduled - * to start at time S and end at time E, where E = S + event.eventLength(): - *
    - *
  • latest at S - event.maxTimeToInitialize(): event.initialize()
  • - *
  • at S: event.start()
  • - *
  • at E: event.stop()
  • - *
  • after E: event.deInitialize()
  • - *
- */ -class ScheduledEventInterface -{ - public: - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~ScheduledEventInterface(void) throw () - { - } - - /** - * Tell the time this event is scheduled for. - * - * @return the time this event is scheduled for. - */ - virtual Ptr::Ref - getScheduledTime(void) throw () = 0; - - /** - * Initialize the event object. - * This should finishin at most maxTimeToInitialize() time. - * Use this call to allocate any resources that will be needed - * by the event itself. - * - * @exception std::exception on initialization problems. - * a raised exception will result in the cancellation - * of the event. - * @see #maxTimeToInitialize - */ - virtual void - initialize(void) throw (std::exception) = 0; - - /** - * The maximum time for the initalize() function to complete. - * It is the responsibility of the ScheduledEventInterface object to - * complete the initialization in that time. - * - * @return the maximum time for the initialize() function to complete. - * @see #initialize - */ - virtual Ptr::Ref - maxTimeToInitialize(void) throw () = 0; - - /** - * De-initialize the event object. - */ - virtual void - deInitialize(void) throw () = 0; - - /** - * Start the event. - * This function call should start the execution of the event in - * a separate thread, and return immediately. - */ - virtual void - start(Ptr::Ref offset) throw () = 0; - - /** - * The length of the event. - * The scheduler will call stop() when this much time has passed - * after calling start(). - * - * @return the length of the event, in time. - */ - virtual Ptr::Ref - eventLength(void) throw () = 0; - - /** - * Stop the event. - * This function call should result in the event stopping, if - * this has not happened yet. The event execution should be stopped - * and ready to be de-initialized after this call returns. - */ - virtual void - stop(void) throw () = 0; -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // LiveSupport_EventScheduler_ScheduledEventInterface_h - diff --git a/src/modules/eventScheduler/lib/.keepme b/src/modules/eventScheduler/lib/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/eventScheduler/lib/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/src/modules/eventScheduler/src/EventScheduler.cxx b/src/modules/eventScheduler/src/EventScheduler.cxx deleted file mode 100644 index 11d8b747a..000000000 --- a/src/modules/eventScheduler/src/EventScheduler.cxx +++ /dev/null @@ -1,92 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/EventScheduler/EventScheduler.h" - -#include "SchedulerThread.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -LiveSupport::EventScheduler::EventScheduler :: EventScheduler( - Ptr::Ref eventContainer, - Ptr::Ref granularity) - throw () -{ - runnable.reset(new SchedulerThread(eventContainer, granularity)); - thread.reset(new Thread(runnable)); -} - - -/*------------------------------------------------------------------------------ - * Start the event scheduler. - *----------------------------------------------------------------------------*/ -void -LiveSupport::EventScheduler::EventScheduler :: start(void) throw () -{ - thread->start(); -} - - -/*------------------------------------------------------------------------------ - * Update the events. - *----------------------------------------------------------------------------*/ -void -LiveSupport::EventScheduler::EventScheduler :: update(void) throw () -{ - thread->signal(SchedulerThread::UpdateSignal); -} - - -/*------------------------------------------------------------------------------ - * Stop the event scheduler. - *----------------------------------------------------------------------------*/ -void -LiveSupport::EventScheduler::EventScheduler :: stop(void) throw () -{ - thread->stop(); - thread->join(); -} - diff --git a/src/modules/eventScheduler/src/EventSchedulerTest.cxx b/src/modules/eventScheduler/src/EventSchedulerTest.cxx deleted file mode 100644 index d5dbc6512..000000000 --- a/src/modules/eventScheduler/src/EventSchedulerTest.cxx +++ /dev/null @@ -1,230 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/TimeConversion.h" - -#include "LiveSupport/EventScheduler/EventScheduler.h" -#include "TestScheduledEvent.h" -#include "TestEventContainer.h" -#include "EventSchedulerTest.h" - - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(EventSchedulerTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -EventSchedulerTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -EventSchedulerTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple test for the event scheduler thread - *----------------------------------------------------------------------------*/ -void -EventSchedulerTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref event; - Ptr::Ref container; - Ptr::Ref eventScheduler; - Ptr::Ref now; - Ptr::Ref when; - Ptr::Ref initTime; - Ptr::Ref eventLength; - Ptr::Ref granularity; - TestScheduledEvent::State state; - - /* time timeline for this test is: - initialize - 1sec, sometime before start - start - now + 5sec - stop - start + 3 sec - */ - - now = TimeConversion::now(); - when.reset(new ptime(*now + seconds(5))); - initTime.reset(new time_duration(seconds(1))); - eventLength.reset(new time_duration(seconds(3))); - granularity.reset(new time_duration(seconds(1))); - - event.reset(new TestScheduledEvent(when, initTime, eventLength)); - container.reset(new TestEventContainer(event)); - - eventScheduler.reset(new EventScheduler(container, granularity)); - - eventScheduler->start(); - - CPPUNIT_ASSERT(event->getState() == TestScheduledEvent::created); - state = event->getState(); - - for (bool running = true; running; ) { - // check for each state, and see if they are entered into in a correct - // order - now = TimeConversion::now(); - switch (event->getState()) { - case TestScheduledEvent::created: - CPPUNIT_ASSERT(state == TestScheduledEvent::created); - break; - - case TestScheduledEvent::initializing: - // as the init time is same as granularity, we will only - // see initializing once, and can assume that the previous - // state was 'created' - CPPUNIT_ASSERT(state == TestScheduledEvent::created); - break; - - case TestScheduledEvent::initialized: - CPPUNIT_ASSERT(state == TestScheduledEvent::initializing - || state == TestScheduledEvent::initialized); - break; - - case TestScheduledEvent::running: - CPPUNIT_ASSERT(state == TestScheduledEvent::initialized - || state == TestScheduledEvent::running); - // see if the state changed from initialized to running - // at the appropriate time - if (state == TestScheduledEvent::initialized) { - CPPUNIT_ASSERT(*when <= *now - && *now <= *when + *granularity); - } - break; - - case TestScheduledEvent::stopped: - CPPUNIT_ASSERT(state == TestScheduledEvent::running - || state == TestScheduledEvent::stopped); - break; - - case TestScheduledEvent::deInitialized: - // accept running as a possible previous state, as we might - // not catch the stopped state at all - CPPUNIT_ASSERT(state == TestScheduledEvent::running - || state == TestScheduledEvent::stopped); - running = false; - break; - - default: - CPPUNIT_FAIL("unrecognized event state"); - } - state = event->getState(); - TimeConversion::sleep(granularity); - } - - eventScheduler->stop(); -} - - -/*------------------------------------------------------------------------------ - * A test to see what happens, when an event is scheduled after it should - * have been initialized, but not to be started yet. - * See http://bugs.campware.org/view.php?id=757 for details. - *----------------------------------------------------------------------------*/ -void -EventSchedulerTest :: postInitTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref event; - Ptr::Ref container; - Ptr::Ref eventScheduler; - Ptr::Ref now; - Ptr::Ref when; - Ptr::Ref initTime; - Ptr::Ref eventLength; - Ptr::Ref granularity; - TestScheduledEvent::State state; - - /* time timeline for this test is: - initialize - 10 sec - start - now + 5sec - stop - start + 3 sec - */ - - now = TimeConversion::now(); - when.reset(new ptime(*now + seconds(5))); - initTime.reset(new time_duration(seconds(10))); - eventLength.reset(new time_duration(seconds(3))); - granularity.reset(new time_duration(seconds(1))); - - event.reset(new TestScheduledEvent(when, initTime, eventLength)); - container.reset(new TestEventContainer(event)); - - eventScheduler.reset(new EventScheduler(container, granularity)); - - eventScheduler->start(); - - CPPUNIT_ASSERT(event->getState() == TestScheduledEvent::created); - state = event->getState(); - - Ptr::Ref end(new ptime(*when + seconds(10))); - while (*TimeConversion::now() < *end) { - // nothing should happen here, just wait for some to see that - // indeed it doesn't - CPPUNIT_ASSERT(event->getState() == TestScheduledEvent::created); - TimeConversion::sleep(granularity); - } - - eventScheduler->stop(); -} - diff --git a/src/modules/eventScheduler/src/EventSchedulerTest.h b/src/modules/eventScheduler/src/EventSchedulerTest.h deleted file mode 100644 index ecc06031e..000000000 --- a/src/modules/eventScheduler/src/EventSchedulerTest.h +++ /dev/null @@ -1,111 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef EventSchedulerTest_h -#define EventSchedulerTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace EventScheduler { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the EventScheduler class. - * - * @see EventScheduler - */ -class EventSchedulerTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(EventSchedulerTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(postInitTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if an event is scheduled after it should have - * been initialized (see http://bugs.campware.org/view.php?id=757) - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - postInitTest(void) throw (CPPUNIT_NS::Exception); - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - -#endif // EventSchedulerTest_h - diff --git a/src/modules/eventScheduler/src/SchedulerThread.cxx b/src/modules/eventScheduler/src/SchedulerThread.cxx deleted file mode 100644 index 972c8e666..000000000 --- a/src/modules/eventScheduler/src/SchedulerThread.cxx +++ /dev/null @@ -1,235 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#define DEBUG_PREFIX "SchedulerThread" -#include "LiveSupport/Core/Debug.h" - -#include "LiveSupport/Core/TimeConversion.h" - -#include "SchedulerThread.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -SchedulerThread :: SchedulerThread( - Ptr::Ref eventContainer, - Ptr::Ref granularity) - throw () - : eventContainer(eventContainer), - granularity(granularity), - shouldRun(false) -{ - //DEBUG_FUNC_INFO -} - - -/*------------------------------------------------------------------------------ - * Get the next event from the eventContainer - *----------------------------------------------------------------------------*/ -void -SchedulerThread :: getNextEvent(Ptr::Ref when) throw () -{ - //DEBUG_FUNC_INFO - - nextEvent = eventContainer->getNextEvent(when); - if (nextEvent.get()) { - nextEventTime = nextEvent->getScheduledTime(); - nextInitTime.reset(new ptime(*nextEventTime - - *granularity - - *nextEvent->maxTimeToInitialize())); - nextEventEnd.reset(new ptime(*nextEventTime - + *nextEvent->eventLength())); - debug() << "::getNextEvent() - nextInitTime: " - << to_simple_string(*nextInitTime) << endl; - debug() << " - nextEventTime: " - << to_simple_string(*nextEventTime) << endl; - debug() << " - nextEventEnd: " - << to_simple_string(*nextEventEnd) << endl; - } -} - -/*------------------------------------------------------------------------------ - * Get the next event from the eventContainer - *----------------------------------------------------------------------------*/ -void -SchedulerThread :: getCurrentEvent() throw () -{ - //DEBUG_FUNC_INFO - - nextEvent = eventContainer->getCurrentEvent(); - if (nextEvent.get()) { - //fake these events here so we can preload - nextInitTime.reset(new ptime(*TimeConversion::now() + *granularity)); - nextEventTime.reset(new ptime(*nextInitTime + *nextEvent->maxTimeToInitialize())); - nextEventEnd.reset(new ptime(*nextEvent->getScheduledTime() - + *nextEvent->eventLength())); - debug() << "::getCurrentEvent() - nextInitTime: " - << to_simple_string(*nextInitTime) << endl; - debug() << " - nextEventTime: " - << to_simple_string(*nextEventTime) << endl; - debug() << " - nextEventEnd: " - << to_simple_string(*nextEventEnd) << endl; - } -} - - -/*------------------------------------------------------------------------------ - * The main execution body of the thread. - *----------------------------------------------------------------------------*/ -void -SchedulerThread :: nextStep(Ptr::Ref now) throw () -{ - nextEventMutex.lock(); - - if (nextEvent) { - if (imminent(now, nextInitTime)) { - preloadMutex.lock(); - debug() << "::nextStep() - Init [" << *TimeConversion::now() - << "]" << endl; - try { - nextEvent->initialize(); - } catch (std::exception &e) { - preloadMutex.unlock(); - // cancel event by getting the next event after this was - // supposed to finish - getNextEvent(nextEventEnd); - // TODO: log error - std::cerr << "event initialization error: " << e.what() - << std::endl; - } - } else if (imminent(now, nextEventTime)) { - Ptr::Ref timePassed(new time_duration(*now - - *nextEvent->getScheduledTime())); - Ptr::Ref timeNull(new time_duration(0, 0, 0, 0)); - if(*timePassed > *timeNull) { - debug() << "::nextStep() with offset - Start [" << *TimeConversion::now() - << "]" << endl; - nextEvent->start(timePassed); - } else { - Ptr::Ref timeLeft(new time_duration(*nextEventTime - - *now)); - TimeConversion::sleep(timeLeft); - debug() << "::nextStep() - Start [" << *TimeConversion::now() - << "]" << endl; - nextEvent->start(timeNull); - } - currentEvent = nextEvent; - currentEventEnd = nextEventEnd; - getNextEvent(TimeConversion::now()); - preloadMutex.unlock(); - } - } - - nextEventMutex.unlock(); - - if (currentEvent && imminent(now, currentEventEnd)) { - Ptr::Ref timeLeft(new time_duration(*currentEventEnd - - *now)); - TimeConversion::sleep(timeLeft); - currentEvent->stop(); - currentEvent->deInitialize(); - currentEvent.reset(); - debug() << "::nextStep() - End [" << *TimeConversion::now() - << "]" << endl; - } -} - - -/*------------------------------------------------------------------------------ - * The main execution body of the thread. - *----------------------------------------------------------------------------*/ -void -SchedulerThread :: run(void) throw () -{ - //DEBUG_FUNC_INFO - - shouldRun = true; - getCurrentEvent();//implements scheduler autostart -// getNextEvent(TimeConversion::now());//use if you do not want autostart - - while (shouldRun) { - Ptr::Ref start = TimeConversion::now(); - - nextStep(start); - - // sleep until the next granularity - Ptr::Ref end = TimeConversion::now(); - Ptr::Ref diff(new time_duration(*end - *start)); - if (*diff <= *granularity) { - Ptr::Ref sleepTime(new time_duration(*granularity - - *diff)); - TimeConversion::sleep(sleepTime); - } - } -} - - -/*------------------------------------------------------------------------------ - * Accept a signal. - *----------------------------------------------------------------------------*/ -void -SchedulerThread :: signal(int signalId) throw () -{ - //DEBUG_FUNC_INFO - debug() << "::signal() - [" << *TimeConversion::now() << "]" << endl; - - switch (signalId) { - case UpdateSignal: - if (nextEventMutex.tryLock()) { - if (preloadMutex.tryLock()) { - getNextEvent(TimeConversion::now()); - preloadMutex.unlock(); - nextEventMutex.unlock(); - } else { - nextEventMutex.unlock(); - } - } - break; - - default: - break; - } -} - - diff --git a/src/modules/eventScheduler/src/SchedulerThread.h b/src/modules/eventScheduler/src/SchedulerThread.h deleted file mode 100644 index 9f3e09a8b..000000000 --- a/src/modules/eventScheduler/src/SchedulerThread.h +++ /dev/null @@ -1,244 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef SchedulerThread_h -#define SchedulerThread_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include "LiveSupport/Core/RunnableInterface.h" -#include "LiveSupport/Core/Mutex.h" -#include "LiveSupport/EventScheduler/ScheduledEventInterface.h" -#include "LiveSupport/EventScheduler/EventContainerInterface.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * The main, executing thread of the scheduler. - */ -class SchedulerThread : public virtual RunnableInterface -{ - public: - /** - * Enumerated type for the signals accepted by this object. - * - * @see #signal - */ - typedef enum { UpdateSignal } SignalTypes; - - private: - /** - * The event container, to get the events from. - */ - Ptr::Ref eventContainer; - - /** - * The event which is being running now. - */ - Ptr::Ref currentEvent; - - /** - * The next event to execute. - */ - Ptr::Ref nextEvent; - - /** - * The execution time of the next event. - */ - Ptr::Ref nextEventTime; - - /** - * The time to start the initialization of the next event. - */ - Ptr::Ref nextInitTime; - - /** - * The ending time of the current event. - */ - Ptr::Ref currentEventEnd; - - /** - * The ending time of the next event. - */ - Ptr::Ref nextEventEnd; - - /** - * The granularity of the scheduler: the time it will sleep - * between checking up on the state of things. - */ - Ptr::Ref granularity; - - /** - * Flag indicating whether the thread should still run, or - * actually terminate. - */ - bool shouldRun; - - /** - * A mutex for getting the next event. - */ - Mutex nextEventMutex; - - /** - * A mutex for the preload. - */ - Mutex preloadMutex; - - /** - * Default constructor. - */ - SchedulerThread(void) throw () - { - } - - /** - * Get the next event. - * - * @param when get the first event after this specified time. - */ - void - getNextEvent(Ptr::Ref when) throw (); - - /** - * Get the current event. - * - * @param - */ - void - getCurrentEvent() throw (); - - /** - * Tell if the specified time falls within now and the next - * waking up. Basically tells if it is within now and - * now + granularity. - * - * @param now the current time. - * @param time check this time if it is imminent. - * @return true if the specified time falls within now and - * now + granularity, false otherwise. - */ - bool - imminent(Ptr::Ref now, - Ptr::Ref when) const throw () - { - return *when >= *now && (*now + *granularity) > *when; - } - - /** - * Execute the next step on the active event, if any is imminent. - * - * @param now the current time. - */ - void - nextStep(Ptr::Ref now) throw (); - - - public: - /** - * Constructor. - * - * @param eventContainer the container this thread will get its - * events to schedule from. - * @param granularity the granularity of the thread: the time the - * thread will sleep between checking up on things. - */ - SchedulerThread(Ptr::Ref eventContainer, - Ptr::Ref granularity) - throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~SchedulerThread(void) throw () - { - } - - /** - * The main execution loop for the thread. - */ - virtual void - run(void) throw (); - - /** - * Accept a signal. - * Currently supported signal values are: - *
    - *
  • UpdateSignal - re-read the event container
  • - *
- * - * @param signalId a value from SignalTypes. - * @see #SignalTypes - */ - virtual void - signal(int signalId) throw (); - - - /** - * Signal the thread to stop, gracefully. - */ - virtual void - stop(void) throw () - { - shouldRun = false; - } -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // SchedulerThread_h - diff --git a/src/modules/eventScheduler/src/SchedulerThreadTest.cxx b/src/modules/eventScheduler/src/SchedulerThreadTest.cxx deleted file mode 100644 index 05c71cd75..000000000 --- a/src/modules/eventScheduler/src/SchedulerThreadTest.cxx +++ /dev/null @@ -1,181 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - - -#include -#include - -#include "LiveSupport/Core/TimeConversion.h" -#include "LiveSupport/Core/Thread.h" - -#include "SchedulerThread.h" -#include "TestScheduledEvent.h" -#include "TestEventContainer.h" -#include "SchedulerThreadTest.h" - - -using namespace boost::posix_time; - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(SchedulerThreadTest); - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -SchedulerThreadTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -SchedulerThreadTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple test for the event scheduler thread - *----------------------------------------------------------------------------*/ -void -SchedulerThreadTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref event; - Ptr::Ref container; - Ptr::Ref thread; - Ptr::Ref schedulerThread; - Ptr::Ref now; - Ptr::Ref when; - Ptr::Ref initTime; - Ptr::Ref eventLength; - Ptr::Ref granularity; - TestScheduledEvent::State state; - - /* time timeline for this test is: - initialize - 1sec, sometime before start - start - now + 5sec - stop - start + 3 sec - */ - - now = TimeConversion::now(); - when.reset(new ptime(*now + seconds(5))); - initTime.reset(new time_duration(seconds(1))); - eventLength.reset(new time_duration(seconds(3))); - granularity.reset(new time_duration(seconds(1))); - - event.reset(new TestScheduledEvent(when, initTime, eventLength)); - container.reset(new TestEventContainer(event)); - - schedulerThread.reset(new SchedulerThread(container, granularity)); - thread.reset(new Thread(schedulerThread)); - - thread->start(); - - CPPUNIT_ASSERT(event->getState() == TestScheduledEvent::created); - state = event->getState(); - - for (bool running = true; running; ) { - // check for each state, and see if they are entered into in a correct - // order - now = TimeConversion::now(); - switch (event->getState()) { - case TestScheduledEvent::created: - CPPUNIT_ASSERT(state == TestScheduledEvent::created); - break; - - case TestScheduledEvent::initializing: - // as the init time is same as granularity, we will only - // see initializing once, and can assume that the previous - // state was 'created' - CPPUNIT_ASSERT(state == TestScheduledEvent::created); - break; - - case TestScheduledEvent::initialized: - CPPUNIT_ASSERT(state == TestScheduledEvent::initializing - || state == TestScheduledEvent::initialized); - break; - - case TestScheduledEvent::running: - CPPUNIT_ASSERT(state == TestScheduledEvent::initialized - || state == TestScheduledEvent::running); - // see if the state changed from initialized to running - // at the appropriate time - if (state == TestScheduledEvent::initialized) { - CPPUNIT_ASSERT(*when <= *now - && *now <= *when + *granularity); - } - break; - - case TestScheduledEvent::stopped: - CPPUNIT_ASSERT(state == TestScheduledEvent::running - || state == TestScheduledEvent::stopped); - break; - - case TestScheduledEvent::deInitialized: - // accept running as a possible previous state, as we might - // not catch the stopped state at all - CPPUNIT_ASSERT(state == TestScheduledEvent::running - || state == TestScheduledEvent::stopped); - running = false; - break; - - default: - CPPUNIT_FAIL("unrecognized event state"); - } - state = event->getState(); - TimeConversion::sleep(granularity); - } - - thread->stop(); - thread->join(); -} - diff --git a/src/modules/eventScheduler/src/SchedulerThreadTest.h b/src/modules/eventScheduler/src/SchedulerThreadTest.h deleted file mode 100644 index 609eb7563..000000000 --- a/src/modules/eventScheduler/src/SchedulerThreadTest.h +++ /dev/null @@ -1,101 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef SchedulerThreadTest_h -#define SchedulerThreadTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace EventScheduler { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the SchedulerThread class. - * - * @see EventScheduler - */ -class SchedulerThreadTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(SchedulerThreadTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - - protected: - - /** - * A simple test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - -#endif // SchedulerThreadTest_h - diff --git a/src/modules/eventScheduler/src/TestEventContainer.cxx b/src/modules/eventScheduler/src/TestEventContainer.cxx deleted file mode 100644 index 6909b4d05..000000000 --- a/src/modules/eventScheduler/src/TestEventContainer.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_UNISTD_H -#include -#else -#error need unistd.h -#endif - - -#include "TestEventContainer.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -TestEventContainer :: TestEventContainer( - Ptr::Ref event) - throw () -{ - this->event = event; -} - - -/*------------------------------------------------------------------------------ - * Return the first scheduled event after the specified timepoint - *----------------------------------------------------------------------------*/ -Ptr::Ref -TestEventContainer :: getNextEvent(Ptr::Ref when) throw () -{ - if (*when < (*event->getScheduledTime() - *event->maxTimeToInitialize())) { - return event; - } else { - // return an empty reference - Ptr::Ref empty; - return empty; - } -} - diff --git a/src/modules/eventScheduler/src/TestEventContainer.h b/src/modules/eventScheduler/src/TestEventContainer.h deleted file mode 100644 index b07e14610..000000000 --- a/src/modules/eventScheduler/src/TestEventContainer.h +++ /dev/null @@ -1,109 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef TestEventContainer_h -#define TestEventContainer_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/EventScheduler/EventContainerInterface.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * An event container for testing purposes. - */ -class TestEventContainer : public virtual EventContainerInterface -{ - private: - /** - * The only event that this container holds. - */ - Ptr::Ref event; - - - public: - /** - * Constructor. - * - * @param event the only event this container will hold. - */ - TestEventContainer(Ptr::Ref event) - throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~TestEventContainer(void) throw () - { - } - - /** - * Return the first event after the specified timepoint. - * - * @param when return the first event after this timepoint, - * @return the first event to schedule after the specified - * timepoint. may be a reference to 0, if currently - * there are no known events after the specified time. - */ - virtual Ptr::Ref - getNextEvent(Ptr::Ref when) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // TestEventContainer_h - diff --git a/src/modules/eventScheduler/src/TestRunner.cxx b/src/modules/eventScheduler/src/TestRunner.cxx deleted file mode 100644 index 8ce1c29bb..000000000 --- a/src/modules/eventScheduler/src/TestRunner.cxx +++ /dev/null @@ -1,275 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - -#if HAVE_GETOPT_H -#include -#else -#error "Need getopt.h" -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * Our copyright notice, should be at most 80 columns - */ -static const char copyrightNotice[] = - "Copyright (c) 2010 Sourcefabric O.P.S. under the GNU GPL"; - -/** - * String describing the short options. - */ -static const char options[] = "ho:s:v"; - -/** - * Structure describing the long options - */ -static const struct option longOptions[] = { - { "help", no_argument, 0, 'h' }, - { "output", required_argument, 0, 'o' }, - { "stylesheet", required_argument, 0, 's' }, - { "version", no_argument, 0, 'v' }, - { 0, 0, 0, 0 } -}; - -/** - * The encoding to use for the output file. - */ -static const std::string encoding = "utf-8"; - -/** - * The output XML file name. - */ -static Ptr::Ref xmlOutFileName; - -/** - * The XSLT attached to the output file. - */ -static Ptr::Ref xsltFileName; - - -/* =============================================== local function prototypes */ - -/** - * Print program version. - * - * @param os the std::ostream to print to. - */ -static void -printVersion ( std::ostream & os ); - -/** - * Print program usage information. - * - * @param invocation the command line command used to invoke this program. - * @param os the std::ostream to print to. - */ -static void -printUsage ( const char invocation[], - std::ostream & os ); - -/** - * Process command line arguments. - * - * @param argc the number of arguments. - * @param argv the arguments themselves. - * @return true of all went well, false in case the program should exit - * after this call. - */ -static bool -processArguments(int argc, char *argv[]); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Run all tests - *----------------------------------------------------------------------------*/ -int -main( int argc, - char * argv[] ) throw () -{ - if (!processArguments(argc, argv)) { - return 0; - } - - // Create the event manager and test controller - CPPUNIT_NS::TestResult controller; - - // Add a listener that colllects test result - CPPUNIT_NS::TestResultCollector result; - controller.addListener( &result ); - - // Add a listener that print dots as test run. - CPPUNIT_NS::BriefTestProgressListener progress; - controller.addListener( &progress ); - - // Add the top suite to the test runner - CPPUNIT_NS::TestRunner runner; - runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); - runner.run( controller ); - - // Print test in a compiler compatible format. - CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); - outputter.setLocationFormat("%p:%l:"); - outputter.write(); - - // also generate an XML document as an output - std::ofstream xmlOutFile(xmlOutFileName->c_str()); - CPPUNIT_NS::XmlOutputter xmlOutputter(&result, xmlOutFile, encoding); - xmlOutputter.setStandalone(false); - if (xsltFileName) { - xmlOutputter.setStyleSheet(*xsltFileName); - } - xmlOutputter.write(); - xmlOutFile.flush(); - xmlOutFile.close(); - - return result.wasSuccessful() ? 0 : 1; -} - - -/*------------------------------------------------------------------------------ - * Process command line arguments. - *----------------------------------------------------------------------------*/ -static bool -processArguments(int argc, char *argv[]) -{ - int i; - - while ((i = getopt_long(argc, argv, options, longOptions, 0)) != -1) { - switch (i) { - case 'h': - printUsage(argv[0], std::cout); - return false; - - case 'o': - xmlOutFileName.reset(new std::string(optarg)); - break; - - case 's': - xsltFileName.reset(new std::string(optarg)); - break; - - case 'v': - printVersion(std::cout); - return false; - - default: - printUsage(argv[0], std::cout); - return false; - } - } - - if (optind < argc) { - std::cerr << "error processing command line arguments" << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - if (!xmlOutFileName) { - std::cerr << "mandatory option output file name not specified" - << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - std::cerr << "writing output to '" << *xmlOutFileName << '\'' << std::endl; - if (xsltFileName) { - std::cerr << "using XSLT file '" << *xsltFileName << '\'' << std::endl; - } - - return true; -} - - -/*------------------------------------------------------------------------------ - * Print program version. - *----------------------------------------------------------------------------*/ -static void -printVersion ( std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << copyrightNotice << std::endl; -} - - -/*------------------------------------------------------------------------------ - * Print program usage. - *----------------------------------------------------------------------------*/ -static void -printUsage ( const char invocation[], - std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << std::endl - << "Usage: " << invocation << " [OPTION]" - << std::endl - << " mandatory options:" << std::endl - << " -o, --output=file.name write test results into this XML file" - << std::endl - << " optional options:" << std::endl - << " -s, --stylesheet specify this XSLT for the output file" - << std::endl - << " this is either an absolute URI, or a" - << std::endl - << " relative path for the output document" - << std::endl - << " -h, --help display this help and exit" << std::endl - << " -v, --version display version information and exit" - << std::endl - << std::endl - << "Report bugs to " << PACKAGE_BUGREPORT << std::endl; -} - diff --git a/src/modules/eventScheduler/src/TestScheduledEvent.cxx b/src/modules/eventScheduler/src/TestScheduledEvent.cxx deleted file mode 100644 index b94c12db4..000000000 --- a/src/modules/eventScheduler/src/TestScheduledEvent.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_UNISTD_H -#include -#else -#error need unistd.h -#endif - -#include "LiveSupport/Core/TimeConversion.h" - -#include "TestScheduledEvent.h" - - -using namespace LiveSupport::Core; -using namespace LiveSupport::EventScheduler; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Constructor. - *----------------------------------------------------------------------------*/ -TestScheduledEvent :: TestScheduledEvent( - Ptr::Ref when, - Ptr::Ref maxTimeToInitialize, - Ptr::Ref eventLength) - throw () -{ - this->when = when; - this->initTime = maxTimeToInitialize; - this->length = eventLength; - state = created; -} - - -/*------------------------------------------------------------------------------ - * Initialize the event object. - *----------------------------------------------------------------------------*/ -void -TestScheduledEvent :: initialize(void) throw (std::exception) -{ - state = initializing; - TimeConversion::sleep(initTime); - state = initialized; -} - - -/*------------------------------------------------------------------------------ - * Initialize the event object. - *----------------------------------------------------------------------------*/ -void -TestScheduledEvent :: deInitialize(void) throw () -{ - state = deInitialized; -} - - -/*------------------------------------------------------------------------------ - * Initialize the event object. - *----------------------------------------------------------------------------*/ -void -TestScheduledEvent :: start(void) throw () -{ - state = running; -} - - -/*------------------------------------------------------------------------------ - * Initialize the event object. - *----------------------------------------------------------------------------*/ -void -TestScheduledEvent :: stop(void) throw () -{ - state = stopped; -} - diff --git a/src/modules/eventScheduler/src/TestScheduledEvent.h b/src/modules/eventScheduler/src/TestScheduledEvent.h deleted file mode 100644 index fbf31e4ff..000000000 --- a/src/modules/eventScheduler/src/TestScheduledEvent.h +++ /dev/null @@ -1,213 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2010 Sourcefabric O.P.S. - - This file is part of the Campcaster project. - http://campcaster.sourcefabric.org/ - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -------------------------------------------------------------------------------*/ -#ifndef TestScheduledEvent_h -#define TestScheduledEvent_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include "LiveSupport/EventScheduler/ScheduledEventInterface.h" - - -namespace LiveSupport { -namespace EventScheduler { - -using namespace boost::posix_time; - -using namespace LiveSupport; -using namespace LiveSupport::Core; - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * A scheduled event for testing purposes. - */ -class TestScheduledEvent : public virtual ScheduledEventInterface -{ - public: - /** - * Enumeration describing the possible states of the event. - */ - typedef enum { created, - initializing, - initialized, - running, - stopped, - deInitialized } State; - - private: - /** - * The time this event is scheduled for. - */ - Ptr::Ref when; - - /** - * The maximum time this event should get initialized. - */ - Ptr::Ref initTime; - - /** - * The length of the event. - */ - Ptr::Ref length; - - /** - * The current state of the event. - */ - State state; - - public: - /** - * Constructor. - * - * @param when the time this event is scheduled for. - * @param maxTimeToInitialize the maximum time for this event - * to initialize. - * @param eventLength the length of the event. - */ - TestScheduledEvent(Ptr::Ref when, - Ptr::Ref maxTimeToInitialize, - Ptr::Ref eventLength) - throw (); - - /** - * A virtual destructor, as this class has virtual functions. - */ - virtual - ~TestScheduledEvent(void) throw () - { - } - - /** - * Return the current state of the event. - */ - virtual State - getState(void) const throw () - { - return state; - } - - /** - * Tell the time this event is scheduled for. - * - * @return the time this event is scheduled for. - */ - virtual Ptr::Ref - getScheduledTime(void) throw () - { - return when; - } - - /** - * Initialize the event object. - * This should finishin at most maxTimeToInitialize() time. - * Use this call to allocate any resources that will be needed - * by the event itself. - * - * @exception std::exception on initialization problems. - * a raised exception will result in the cancellation - * of the event. - * @see #maxTimeToInitialize - */ - virtual void - initialize(void) throw (std::exception); - - /** - * The maximum time for the initalize() function to complete. - * It is the responsibility of the ScheduledEventInterface object to - * complete the initialization in that time. - * - * @return the maximum time for the initialize() function to complete. - * @see #initialize - */ - virtual Ptr::Ref - maxTimeToInitialize(void) throw () - { - return initTime; - } - - /** - * De-initialize the event object. - */ - virtual void - deInitialize(void) throw (); - - /** - * Start the event. - * This function call should start the execution of the event in - * a separate thread, and return immediately. - */ - virtual void - start(void) throw (); - - /** - * The length of the event. - * The scheduler will call stop() when this much time has passed - * after calling start(). - * - * @return the length of the event, in time. - */ - virtual Ptr::Ref - eventLength(void) throw () - { - return length; - } - - /** - * Stop the event. - * This function call should result in the event stopping, if - * this has not happened yet. The processing of this event should - * persue in a seperate thread, and the function itself should - * return immediately. - */ - virtual void - stop(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace EventScheduler -} // namespace LiveSupport - - -#endif // TestScheduledEvent_h - diff --git a/src/modules/eventScheduler/tmp/.keepme b/src/modules/eventScheduler/tmp/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/src/modules/eventScheduler/tmp/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me