summaryrefslogtreecommitdiff
path: root/p2pvr/daemon
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
commit42107bb466982e3d6810fb5cb36a97fa8a225042 (patch)
tree59fb8cb5ab5f934c32031db2a7f383403860dca2 /p2pvr/daemon
parentUpdate to work with system dbpp (diff)
parentSlash the amount of inclusion in pre-compiled headers (diff)
downloadp2pvr-42107bb466982e3d6810fb5cb36a97fa8a225042.tar.bz2
p2pvr-42107bb466982e3d6810fb5cb36a97fa8a225042.tar.xz
p2pvr-42107bb466982e3d6810fb5cb36a97fa8a225042.zip
Merge branch 'project2-adhoc-plugins'p2pvr-0.1.2
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r--p2pvr/daemon/daemon.cpp2
-rw-r--r--p2pvr/daemon/pch.hpp6
-rw-r--r--p2pvr/daemon/schedulers/bitDumbScheduler.cpp2
-rw-r--r--p2pvr/daemon/schedules.cpp6
-rw-r--r--p2pvr/daemon/schedules.h4
-rw-r--r--p2pvr/daemon/unittests/testp2ice.cpp14
6 files changed, 16 insertions, 18 deletions
diff --git a/p2pvr/daemon/daemon.cpp b/p2pvr/daemon/daemon.cpp
index 374a8b4..874ea3b 100644
--- a/p2pvr/daemon/daemon.cpp
+++ b/p2pvr/daemon/daemon.cpp
@@ -49,5 +49,5 @@ class P2PvrDaemon : public DaemonBase {
}
};
-DECLARE_GENERIC_LOADER("p2pvrdaemon", DaemonLoader, P2PvrDaemon);
+NAMEDFACTORY("p2pvrdaemon", P2PvrDaemon, DaemonFactory);
diff --git a/p2pvr/daemon/pch.hpp b/p2pvr/daemon/pch.hpp
index deec57c..7c96f52 100644
--- a/p2pvr/daemon/pch.hpp
+++ b/p2pvr/daemon/pch.hpp
@@ -5,7 +5,7 @@
#include <Ice/Ice.h>
#include <glibmm.h>
#include <boost/bind.hpp>
-#include <boost/function.hpp>
+#include <boost/function/function_fwd.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/shared_ptr.hpp>
@@ -15,10 +15,6 @@
#include <string>
#include <vector>
-#include <variableType.h>
-#include <rdbmsDataSource.h>
-#include <p2pvr.h>
-
#endif
#endif
diff --git a/p2pvr/daemon/schedulers/bitDumbScheduler.cpp b/p2pvr/daemon/schedulers/bitDumbScheduler.cpp
index eb40431..1681103 100644
--- a/p2pvr/daemon/schedulers/bitDumbScheduler.cpp
+++ b/p2pvr/daemon/schedulers/bitDumbScheduler.cpp
@@ -51,5 +51,5 @@ class TheBitDumbScheduler : public EpisodeGroup {
const Episodes episodes;
};
-DECLARE_GENERIC_LOADER("BitDumb", EpisodeGroupLoader, TheBitDumbScheduler);
+NAMEDFACTORY("BitDumb", TheBitDumbScheduler, EpisodeGroupFactory);
diff --git a/p2pvr/daemon/schedules.cpp b/p2pvr/daemon/schedules.cpp
index 5e3881d..40d7863 100644
--- a/p2pvr/daemon/schedules.cpp
+++ b/p2pvr/daemon/schedules.cpp
@@ -10,7 +10,7 @@
#include "containerIterator.h"
#include "resources.h"
#include <boost/date_time/posix_time/posix_time.hpp>
-#include <instanceStore.impl.h>
+#include <factory.impl.h>
#include "sqlSelectDeserializer.h"
#include <slicer/slicer.h>
#include <p2pvr-int.h>
@@ -246,7 +246,7 @@ Schedules::DoReschedule(const Ice::Current & ice)
}
Logger()->messagebf(LOG_DEBUG, "group complexity of %d options", total);
- EpisodeGroupPtr sched = EpisodeGroupPtr(EpisodeGroupLoader::createNew(SchedulerAlgorithm, group));
+ EpisodeGroupPtr sched = EpisodeGroupPtr(EpisodeGroupFactory::createNew(SchedulerAlgorithm, group));
sched->tuners = tunerCount;
std::set<ShowingPtr> selected;
for (const auto & s : sched->Solve()) {
@@ -346,5 +346,5 @@ Schedules::UpdateSchedule(const P2PVR::SchedulePtr & s, const Ice::Current & ice
return s->ScheduleId;
}
-INSTANTIATESTORE(std::string, EpisodeGroupLoader);
+INSTANTIATEFACTORY(EpisodeGroup, const Episodes &);
diff --git a/p2pvr/daemon/schedules.h b/p2pvr/daemon/schedules.h
index 2ff9e0f..07f2c23 100644
--- a/p2pvr/daemon/schedules.h
+++ b/p2pvr/daemon/schedules.h
@@ -4,7 +4,7 @@
#include <p2pvr.h>
#include <options.h>
#include "dbClient.h"
-#include <genLoader.h>
+#include <factory.h>
typedef boost::posix_time::ptime datetime;
class Episode;
@@ -77,7 +77,7 @@ class Schedules : public P2PVR::Schedules, public DatabaseClient {
static std::string SchedulerAlgorithm;
};
-typedef GenLoader<EpisodeGroup, std::string, const Episodes &> EpisodeGroupLoader;
+typedef AdHoc::Factory<EpisodeGroup, const Episodes &> EpisodeGroupFactory;
typedef boost::shared_ptr<EpisodeGroup> EpisodeGroupPtr;
#endif
diff --git a/p2pvr/daemon/unittests/testp2ice.cpp b/p2pvr/daemon/unittests/testp2ice.cpp
index 8229bf5..dc584b6 100644
--- a/p2pvr/daemon/unittests/testp2ice.cpp
+++ b/p2pvr/daemon/unittests/testp2ice.cpp
@@ -5,6 +5,8 @@
#include <definedDirs.h>
#include <sourceObject.h>
#include <testAppInstance.h>
+#include <stream.h>
+#include <rowSet.h>
const boost::filesystem::path variant = binDir.leaf();
const boost::filesystem::path compiler = binDir.parent_path().leaf();
@@ -15,19 +17,19 @@ static
void
commonTests()
{
- BOOST_REQUIRE(ElementLoader::getFor("p2pvrrecordingstream"));
- BOOST_REQUIRE(ElementLoader::getFor("p2pvrservicestream"));
- BOOST_REQUIRE(ElementLoader::getFor("P2PVR-SI-GetEvent"));
+ BOOST_REQUIRE(StreamFactory::get("p2pvrrecordingstream"));
+ BOOST_REQUIRE(StreamFactory::get("p2pvrservicestream"));
+ BOOST_REQUIRE(RowSetFactory::get("P2PVR-SI-GetEvent"));
}
static
void
unloadTests()
{
- BOOST_REQUIRE_THROW(ElementLoader::getFor("P2PVR-SI-GetEvent"), NotSupported);
+ BOOST_REQUIRE_THROW(RowSetFactory::get("P2PVR-SI-GetEvent"), AdHoc::NoSuchPluginException);
// Known issue, these *should* unload, but for some reason, don't.
- BOOST_WARN_THROW(ElementLoader::getFor("p2pvrrecordingstream"), NotSupported);
- BOOST_WARN_THROW(ElementLoader::getFor("p2pvrservicestream"), NotSupported);
+ BOOST_WARN_THROW(StreamFactory::get("p2pvrrecordingstream"), AdHoc::NoSuchPluginException);
+ BOOST_WARN_THROW(StreamFactory::get("p2pvrservicestream"), AdHoc::NoSuchPluginException);
}
BOOST_GLOBAL_FIXTURE( TestAppInstance );