From 2638c1386552016e1874b097ba8330df9311e3f8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 6 Oct 2015 14:14:47 +0100 Subject: Compat fixes since adhocutil updates to master --- project2/ice/iceboxDaemon.cpp | 11 ++++++----- project2/ice/unittests/testIceBoxDaemon.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/project2/ice/iceboxDaemon.cpp b/project2/ice/iceboxDaemon.cpp index fa1afd8..ccc69f7 100644 --- a/project2/ice/iceboxDaemon.cpp +++ b/project2/ice/iceboxDaemon.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -12,22 +13,22 @@ class IceBoxDaemon : public IceBox::Service, public AppInstance { public: IceBoxDaemon() { - Plugable::onAllComponents(boost::bind(&ComponentLoader::onBegin, _1)); + LifeCycle::onAllComponents(boost::bind(&LifeCycle::onBegin, _1)); } ~IceBoxDaemon() { - Plugable::onAllComponents(boost::bind(&ComponentLoader::onIdle, _1)); + LifeCycle::onAllComponents(boost::bind(&LifeCycle::onIdle, _1)); } void start(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &) { - OptionsSources::Add("service", new IceBoxOptionsSource(ic)); + AdHoc::PluginManager::getDefault()->add(new IceBoxOptionsSource(ic), "service", __FILE__, __LINE__); OptionsSource::loadSources([this] { return reqPlatform;} ); int argc = 0; char ** argv = nullptr; ic->getLogger()->print("Creating daemon: " + daemonType); - daemon = DaemonLoader::createNew(daemonType, argc, argv); + daemon = DaemonFactory::createNew(daemonType, argc, argv); daemon->setup(); daemonThread = new std::thread(&Daemon::run, daemon); } @@ -68,7 +69,7 @@ extern "C" { IceBox::Service * createProject2Daemon(Ice::CommunicatorPtr ic) { - OptionsSources::Add("admin", new IceBoxOptionsSource(ic)); + AdHoc::PluginManager::getDefault()->add(new IceBoxOptionsSource(ic), "admin", __FILE__, __LINE__); return new IceBoxDaemon(); } } diff --git a/project2/ice/unittests/testIceBoxDaemon.cpp b/project2/ice/unittests/testIceBoxDaemon.cpp index a2ba774..6ee8487 100644 --- a/project2/ice/unittests/testIceBoxDaemon.cpp +++ b/project2/ice/unittests/testIceBoxDaemon.cpp @@ -51,5 +51,5 @@ class TestDaemon : public Daemon { private: mutable bool stop; }; -DECLARE_COMPONENT_LOADER("TestDaemon", TestDaemon, DaemonLoader); +NAMEDFACTORY("TestDaemon", TestDaemon, DaemonFactory); -- cgit v1.2.3