diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-12-01 16:35:48 +0000 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-12-01 16:35:48 +0000 |
commit | eecf91b31be4710066c87612081ab8bc350d1930 (patch) | |
tree | 6b5d3d1069809b19947ca05efb785021969336b0 | |
parent | 8442923f60356a16d5271579becce1894d4d8ff6 (diff) | |
download | vdr-plugin-live-eecf91b31be4710066c87612081ab8bc350d1930.tar.gz vdr-plugin-live-eecf91b31be4710066c87612081ab8bc350d1930.tar.bz2 |
- Backwards compatible update to support Tntnet Version 1.6.0.6.
Backwards compatibilty will be dropped in future version of LIVE.
-rw-r--r-- | Makefile | 41 | ||||
-rw-r--r-- | README | 22 | ||||
-rw-r--r-- | pages/page_exit.eh | 4 | ||||
-rw-r--r-- | pages/recordings.ecpp | 4 | ||||
-rw-r--r-- | thread.cpp | 10 |
5 files changed, 76 insertions, 5 deletions
@@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.52 2007/10/21 15:56:00 tadi Exp $ +# $Id: Makefile,v 1.53 2007/12/01 16:35:48 tadi Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -42,6 +42,7 @@ TMPDIR ?= /tmp APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) I18NTARG = $(shell if [ `echo $(APIVERSION) | tr [.] [0]` -ge "10507" ]; then echo "i18n"; fi) +TNTVERS7 = $(shell if [ `tntnet-config --version | sed -e's/\.//g'` -ge "1606" ]; then echo "yes"; fi) ### The name of the distribution archive: @@ -50,14 +51,22 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES += -I$(VDRDIR)/include -Ihttpd +INCLUDES += -I$(VDRDIR)/include +ifneq ($(TNTVERS7),yes) + INCLUDES += -Ihttpd + LIBS += httpd/libhttpd.a +endif DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +ifeq ($(TNTVERS7),yes) + DEFINES += -DTNTVERS7 +endif export DEFINES -LIBS += httpd/libhttpd.a - -SUBDIRS = httpd pages css javascript +SUBDIRS = pages css javascript +ifneq ($(TNTVERS7),yes) + SUBDIRS += httpd +endif ### The object files (add further files here): @@ -132,6 +141,28 @@ PAGES: libvdr-$(PLUGIN).so: SUBDIRS $(PLUGINOBJS) $(CXX) $(LDFLAGS) -shared -o $@ $(PLUGINOBJS) -Wl,--whole-archive $(WEBLIBS) -Wl,--no-whole-archive $(LIBS) @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +ifneq ($(TNTVERS7),yes) + @echo "" + @echo "If LIVE was built successfully and you can try to use it!" + @echo "" + @echo "" + @echo "" + @echo "" + @echo "IMPORTANT INFORMATION:" + @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + @echo "+ This is one of the *last* CVS versions of LIVE which will +" + @echo "+ work with versions of tntnet *less* than 1.6.0.6! +" + @echo "+ +" + @echo "+ This version of LIVE already supports tntnet >= 1.6.0.6. +" + @echo "+ +" + @echo "+ Please upgrade tntnet to at least version 1.6.0.6 soon, if +" + @echo "+ you want to keep track of beeding edge LIVE development. +" + @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + @echo "" + @echo "" + @echo "" + @echo "" +endif dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @@ -14,6 +14,28 @@ Latest version available at: either http://live.vdr-developer.org See the file COPYING for license information. +IMPORTANT: +========== + +This is one of the last developer snapshot versions of LIVE which will +work with Tntnet < 1.6.0.6. In fact only versions of Tntnet up to +1.6.0.1 have been used during development of LIVE and can be used for +shure until today. + +Since Nov 17 version 1.6.0.6 of Tntnet has been released with new +features and binary incompatible changes. This version of LIVE works +with that version and still maintains backwards compatibilty to older +versions of Tntnet. + +Future versions of LIVE will start to use the new Tntnet +features. This means that backwards compatibility can not be +maintained from that point in time onwards. + +We therefor strongly suggest you upgrade to Tntnet with at least +version 1.6.0.6. This new Tntnet version is supported by the current +version of LIVE. Just update Tntnet and recompile LIVE from scratch. + + Description: ============ diff --git a/pages/page_exit.eh b/pages/page_exit.eh index 4edb5ce..5e26a32 100644 --- a/pages/page_exit.eh +++ b/pages/page_exit.eh @@ -5,7 +5,11 @@ <%cpp> spoint.commit(); } catch ( vdrlive::HtmlError const& ex ) { +#ifdef TNTVERS7 + tnt::QueryParams param = qparam; +#else cxxtools::QueryParams param = qparam; +#endif param.add( "pageTitle", pageTitle ); param.add( "errorMessage", ex.what() ); callComp( "error", request, reply, param ); diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index f0d6553..26a4e52 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -74,7 +74,11 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { <li class="recording"> <& rec_item_dir name=(recItem->Name()) level=(level) &> <%cpp> +#ifdef TNTVERS7 + tnt::QueryParams recItemParams(qparam, false); +#else cxxtools::QueryParams recItemParams(qparam, false); +#endif for (path_type::const_iterator i = path.begin(); i != path.end(); ++i) { recItemParams.add("path", *i); } @@ -11,6 +11,7 @@ namespace vdrlive { using namespace std; using namespace tnt; +#ifndef TNTVERS7 class ProtectedCString { public: @@ -22,6 +23,7 @@ public: private: char* m_string; }; +#endif // TNTVERS7 ServerThread::ServerThread() { @@ -43,11 +45,19 @@ void ServerThread::Stop() void ServerThread::Action() { try { +#ifdef TNTVERS7 + tnt::Tntconfig tntconfig; + tntconfig.load(TntConfig::Get().GetConfigPath().c_str()); + m_server.reset(new Tntnet()); + m_server->init(tntconfig); +#else ProtectedCString configPath( TntConfig::Get().GetConfigPath().c_str() ); char* argv[] = { const_cast< char* >( "tntnet" ), const_cast< char* >( "-c" ), configPath }; int argc = sizeof( argv ) / sizeof( argv[0] ); + m_server.reset( new Tntnet( argc, argv ) ); +#endif // TNTVERS7 m_server->run(); m_server.reset( 0 ); } catch ( exception const& ex ) { |