summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-05-29 15:50:21 +0000
committerSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-05-29 15:50:21 +0000
commit3235a22cc6a3bb2ace6a21e7fa028d21b5fdd476 (patch)
tree56b091b33f190a165d8eb850ce33f2b408f11445
parentf84624023496baa4f1e5206dba818f14ba844467 (diff)
downloadvdr-plugin-live-3235a22cc6a3bb2ace6a21e7fa028d21b5fdd476.tar.gz
vdr-plugin-live-3235a22cc6a3bb2ace6a21e7fa028d21b5fdd476.tar.bz2
- moved everything from boost to stdext.h
- using std::tr1 instead of boost where available
-rw-r--r--epg_events.h4
-rw-r--r--grab.cpp1
-rw-r--r--grab.h4
-rw-r--r--recordings.cpp5
-rw-r--r--recordings.h8
-rwxr-xr-xstdext.h59
-rw-r--r--tasks.cpp5
7 files changed, 72 insertions, 14 deletions
diff --git a/epg_events.h b/epg_events.h
index 03c7947..68eb0a4 100644
--- a/epg_events.h
+++ b/epg_events.h
@@ -3,7 +3,6 @@
#include <ctime>
#include <vector>
-#include <boost/shared_ptr.hpp>
#include <vdr/plugin.h>
#include <vdr/channels.h>
@@ -12,6 +11,7 @@
#include <vdr/i18n.h>
#include "live.h"
+#include "stdext.h"
namespace vdrlive
{
@@ -74,7 +74,7 @@ namespace vdrlive
time_t m_end_time;
};
- typedef boost::shared_ptr<EpgEvent> EpgEventPtr;
+ typedef std::tr1::shared_ptr<EpgEvent> EpgEventPtr;
class EpgEvents : public std::vector<EpgEventPtr> {
public:
diff --git a/grab.cpp b/grab.cpp
index a89c852..bc45263 100644
--- a/grab.cpp
+++ b/grab.cpp
@@ -79,7 +79,6 @@ void GrabImageTask::Action()
GrabImageManager::GrabImageManager()
: m_task( new GrabImageTask )
- , m_image( 0, &free )
, m_size( 0 )
{
}
diff --git a/grab.h b/grab.h
index c5ffccd..2d6f820 100644
--- a/grab.h
+++ b/grab.h
@@ -1,12 +1,12 @@
#ifndef VDR_LIVE_GRAB_H
#define VDR_LIVE_GRAB_H
-#include <boost/shared_array.hpp>
+#include "stdext.h"
#include "tasks.h"
namespace vdrlive {
-typedef boost::shared_array< char > GrabImagePtr;
+typedef std::tr1::shared_ptr< char > GrabImagePtr;
typedef std::pair< GrabImagePtr, int > GrabImageInfo;
class GrabImageTask;
diff --git a/recordings.cpp b/recordings.cpp
index 72178c1..6a66a77 100644
--- a/recordings.cpp
+++ b/recordings.cpp
@@ -1,17 +1,16 @@
#include <unistd.h>
#include <cstring>
#include <openssl/md5.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
#include <string>
#include <sstream>
#include <fstream>
#include "tools.h"
#include "epg_events.h"
#include "recordings.h"
+#include "stdext.h"
-using namespace boost;
+using namespace std::tr1;
using namespace std;
namespace vdrlive {
diff --git a/recordings.h b/recordings.h
index 1e4b57b..9e42ada 100644
--- a/recordings.h
+++ b/recordings.h
@@ -4,17 +4,17 @@
#include <ctime>
#include <map>
#include <vector>
-#include <boost/shared_ptr.hpp>
#include <vdr/recording.h>
+#include "stdext.h"
namespace vdrlive {
// Forward declations from epg_events.h
class EpgEvent;
- typedef boost::shared_ptr<EpgEvent> EpgEventPtr;
+ typedef std::tr1::shared_ptr<EpgEvent> EpgEventPtr;
class RecordingsManager;
- typedef boost::shared_ptr<RecordingsManager> RecordingsManagerPtr;
+ typedef std::tr1::shared_ptr<RecordingsManager> RecordingsManagerPtr;
class RecordingsManager
{
@@ -46,7 +46,7 @@ namespace vdrlive {
class RecordingsItem;
- typedef boost::shared_ptr< RecordingsItem > RecordingsItemPtr;
+ typedef std::tr1::shared_ptr< RecordingsItem > RecordingsItemPtr;
typedef std::multimap< std::string, RecordingsItemPtr > Map;
class RecordingsItem
diff --git a/stdext.h b/stdext.h
new file mode 100755
index 0000000..9bf3f20
--- /dev/null
+++ b/stdext.h
@@ -0,0 +1,59 @@
+#ifndef VDR_LIVE_STDEXT_H
+#define VDR_LIVE_STDEXT_H
+
+#if __GNUC__ >= 4
+
+# include <tr1/functional>
+# include <tr1/memory>
+
+#else
+
+# include <boost/version.hpp>
+
+# define BOOST_MAJOR_VERSION (BOOST_VERSION / 100000)
+# define BOOST_MINOR_VERSION ((BOOST_VERSION / 100) % 1000)
+
+# if BOOST_MAJOR_VERSION >= 1 && BOOST_MINOR_VERSION >= 34
+
+# include <boost/tr1/functional.hpp>
+# include <boost/tr1/memory.hpp>
+
+# elif BOOST_MAJOR_VERSION >= 1 && BOOST_MINOR_VERSION >= 32
+
+# include <boost/bind.hpp>
+# include <boost/shared_ptr.hpp>
+# include <boost/weak_ptr.hpp>
+
+namespace std {
+namespace tr1 {
+
+ using boost::bind;
+ using boost::shared_ptr;
+ using boost::weak_ptr;
+
+ namespace placeholders {
+ using ::_1;
+ using ::_2;
+ using ::_3;
+ using ::_4;
+ using ::_5;
+ using ::_6;
+ using ::_7;
+ using ::_8;
+ using ::_9;
+ }
+
+} // namespace std
+} // namespace tr1
+
+# else
+
+# error "Your Compiler is too old and you don't have boost >= 1.32.0 installed."
+# error "Please either install boost 1.32.0 or higher (1.34.0 is recommended)"
+# error "or upgrade your compiler suite to at least GCC 4.0"
+
+# endif
+
+#endif
+
+#endif // VDR_LIVE_STDEXT_H
diff --git a/tasks.cpp b/tasks.cpp
index 6e1bd07..fc487d3 100644
--- a/tasks.cpp
+++ b/tasks.cpp
@@ -1,18 +1,19 @@
#include <algorithm>
-#include <boost/bind.hpp>
#include <vdr/channels.h>
#include <vdr/i18n.h>
#include <vdr/menu.h>
#include <vdr/recording.h>
#include "exception.h"
#include "recordings.h"
+#include "stdext.h"
#include "tasks.h"
#include "tools.h"
namespace vdrlive {
using namespace std;
-using namespace boost;
+using namespace std::tr1;
+using namespace std::tr1::placeholders;
StickyTask::StickyTask()
{