diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-07-30 18:28:41 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-07-30 18:28:41 +0100 |
commit | fe61ba505f3b1aa7401836a97dd32284f9932a74 (patch) | |
tree | 682d06a9f995216fd24cc60d555e6f2adbabefe5 /p2pvr/daemon/maintenance.cpp | |
parent | Tidy SQL statements into sub-dirs (diff) | |
download | p2pvr-fe61ba505f3b1aa7401836a97dd32284f9932a74.tar.bz2 p2pvr-fe61ba505f3b1aa7401836a97dd32284f9932a74.tar.xz p2pvr-fe61ba505f3b1aa7401836a97dd32284f9932a74.zip |
Move everything out of the global namespace
Diffstat (limited to 'p2pvr/daemon/maintenance.cpp')
-rw-r--r-- | p2pvr/daemon/maintenance.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/p2pvr/daemon/maintenance.cpp b/p2pvr/daemon/maintenance.cpp index 23eef15..6abad00 100644 --- a/p2pvr/daemon/maintenance.cpp +++ b/p2pvr/daemon/maintenance.cpp @@ -9,8 +9,9 @@ namespace po = boost::program_options; -Maintenance::Options::Options() : IceTray::Options("P2PVR Maintenance options") { } -ICETRAY_OPTIONS(Maintenance::Options, +namespace P2PVR { +MaintenanceI::Options::Options() : IceTray::Options("P2PVR Maintenance options") { } +ICETRAY_OPTIONS(MaintenanceI::Options, ("p2pvr.maintenance.periodUpdateNetwork", po::value(&periodUpdateNetwork)->default_value(86400 * 7), "Period between automated updates of DVB network (1 week)") ("p2pvr.maintenance.periodUpdateServices", po::value(&periodUpdateServices)->default_value(86400 * 7), @@ -21,13 +22,13 @@ ICETRAY_OPTIONS(Maintenance::Options, "Perform the maintenance circle on start-up (false)") ); -IceTray::Logging::LoggerPtr Maintenance::logger(LOGMANAGER()->getLogger<Maintenance>()); +IceTray::Logging::LoggerPtr MaintenanceI::logger(LOGMANAGER()->getLogger<MaintenanceI>()); -Maintenance::Maintenance(IceTray::DatabasePoolPtr db, Ice::ObjectAdapterPtr a, IceUtil::TimerPtr t) : +MaintenanceI::MaintenanceI(IceTray::DatabasePoolPtr db, Ice::ObjectAdapterPtr a, IceUtil::TimerPtr t) : IceTray::AbstractDatabaseClient(db), adapter(a), timer(t), - clientCheck(new BindTimerTask(boost::bind(&Maintenance::ScheduledUpdate, this))), + clientCheck(new BindTimerTask(boost::bind(&MaintenanceI::ScheduledUpdate, this))), lastUpdateNetwork(0), lastUpdateServices(0), lastUpdateEvents(0), @@ -42,7 +43,7 @@ Maintenance::Maintenance(IceTray::DatabasePoolPtr db, Ice::ObjectAdapterPtr a, I } void -Maintenance::UpdateAll(const Ice::Current & ice) +MaintenanceI::UpdateAll(const Ice::Current & ice) { UpdateAll(FE_OFDM, ice); UpdateAll(FE_QPSK, ice); @@ -51,7 +52,7 @@ Maintenance::UpdateAll(const Ice::Current & ice) } void -Maintenance::UpdateAll(short type, const Ice::Current & ice) +MaintenanceI::UpdateAll(short type, const Ice::Current & ice) { UpdateNetwork(type, ice); UpdateServices(ice); @@ -59,7 +60,7 @@ Maintenance::UpdateAll(short type, const Ice::Current & ice) } void -Maintenance::ScheduledUpdate() +MaintenanceI::ScheduledUpdate() { logger->messagebf(LOG::DEBUG, "%s: triggered", __PRETTY_FUNCTION__); if (!updateRunning) { @@ -97,4 +98,5 @@ Maintenance::ScheduledUpdate() update.detach(); } } +} |