summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p2pvr/daemon/events.cpp2
-rw-r--r--p2pvr/daemon/recordings.cpp1
-rw-r--r--p2pvr/daemon/schedules.cpp1
-rw-r--r--p2pvr/daemon/sqlContainerCreator.h28
-rw-r--r--p2pvr/lib/containerCreator.h36
-rw-r--r--p2pvr/lib/dvbsiHelpers.h3
-rw-r--r--p2pvr/lib/objectRowState.h3
7 files changed, 2 insertions, 72 deletions
diff --git a/p2pvr/daemon/events.cpp b/p2pvr/daemon/events.cpp
index 40db4df..01fe01e 100644
--- a/p2pvr/daemon/events.cpp
+++ b/p2pvr/daemon/events.cpp
@@ -1,5 +1,5 @@
#include <pch.hpp>
-#include "containerCreator.h"
+#include "containerIterator.h"
#include <p2pvr.h>
#include <p2Helpers.h>
diff --git a/p2pvr/daemon/recordings.cpp b/p2pvr/daemon/recordings.cpp
index e3e92a0..9b79d60 100644
--- a/p2pvr/daemon/recordings.cpp
+++ b/p2pvr/daemon/recordings.cpp
@@ -3,7 +3,6 @@
#include "resources.h"
#include <Ice/Ice.h>
#include <logger.h>
-#include "sqlContainerCreator.h"
#include <slicer/slicer.h>
#include "sqlSelectDeserializer.h"
diff --git a/p2pvr/daemon/schedules.cpp b/p2pvr/daemon/schedules.cpp
index 1590312..f5aaad1 100644
--- a/p2pvr/daemon/schedules.cpp
+++ b/p2pvr/daemon/schedules.cpp
@@ -1,6 +1,5 @@
#include <pch.hpp>
#include "schedules.h"
-#include "sqlContainerCreator.h"
#include <rdbmsDataSource.h>
#include <logger.h>
#include <Ice/Ice.h>
diff --git a/p2pvr/daemon/sqlContainerCreator.h b/p2pvr/daemon/sqlContainerCreator.h
deleted file mode 100644
index 5c8d8f8..0000000
--- a/p2pvr/daemon/sqlContainerCreator.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef SQLCONTAINERCREATOR_H
-#define SQLCONTAINERCREATOR_H
-
-#include "containerCreator.h"
-#include <boost/shared_ptr.hpp>
-#include <selectcommand.h>
-#include <sqlHandleAsVariableType.h>
-
-template <typename T, typename V, typename P = IceInternal::Handle<V>>
-class SqlContainerCreator : public ContainerCreator<T, V, P> {
- public:
- SqlContainerCreator(T & c) : ContainerCreator<T, V, P>(c) { }
-
- void populate(boost::shared_ptr<DB::SelectCommand> sel)
- {
- sel->execute();
- ContainerCreator<T, V, P>::populate(boost::bind(&DB::SelectCommand::fetch, sel), [sel](unsigned int c) {
- HandleAsVariableType h;
- const DB::Column & col = (*sel)[c];
- col.apply(h);
- return h.variable;
- }, sel->columnCount());
- }
-};
-
-
-#endif
-
diff --git a/p2pvr/lib/containerCreator.h b/p2pvr/lib/containerCreator.h
deleted file mode 100644
index 289ac9e..0000000
--- a/p2pvr/lib/containerCreator.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef CONTAINERCREATOR_H
-#define CONTAINERCREATOR_H
-
-#include <boost/function.hpp>
-#include <Ice/Handle.h>
-#include "objectRowState.h"
-
-template <typename T, typename V, typename P = IceInternal::Handle<V>>
-class ContainerCreator {
- public:
- ContainerCreator(T & c) : container(c) { }
-
- void populate(
- boost::function<bool()> fetch,
- boost::function<VariableType(unsigned int)> get,
- unsigned int columnCount)
- {
- while (fetch()) {
- auto v = P(new V);
- container.push_back(v);
- ObjectRowState<P> rs;
- if (rs.fields.size() != columnCount) {
- throw std::runtime_error("Incorrent column count");
- }
- for (unsigned int c = 0; c < columnCount; c++) {
- rs.fields[c] = get(c);
- }
- UnbindColumns<P>(rs, v);
- }
- }
- private:
- T & container;
-};
-
-#endif
-
diff --git a/p2pvr/lib/dvbsiHelpers.h b/p2pvr/lib/dvbsiHelpers.h
index 137bf98..949014c 100644
--- a/p2pvr/lib/dvbsiHelpers.h
+++ b/p2pvr/lib/dvbsiHelpers.h
@@ -6,8 +6,7 @@
#define ColumnHelper(T) \
template<> void CreateColumns<T>(const ColumnCreator & cc); \
- template<> void BindColumns(RowState & rs, const T & obj); \
- template<> void UnbindColumns(RowState & rs, const T & s)
+ template<> void BindColumns(RowState & rs, const T & obj);
ColumnHelper(DVBSI::NetworkPtr);
ColumnHelper(DVBSI::NetworkTransportStreamPtr);
diff --git a/p2pvr/lib/objectRowState.h b/p2pvr/lib/objectRowState.h
index 9ba69f0..f305469 100644
--- a/p2pvr/lib/objectRowState.h
+++ b/p2pvr/lib/objectRowState.h
@@ -12,9 +12,6 @@ template <typename V>
void BindColumns(RowState &, const V &);
template <typename V>
-void UnbindColumns(RowState &, const V &);
-
-template <typename V>
void CreateColumns(const ColumnCreator &);
template <typename T>