Ticket #7762: shutdownSlaveEnhanced_v0.3+0.24.1.diff
File shutdownSlaveEnhanced_v0.3+0.24.1.diff, 20.7 KB (added by , 13 years ago) |
---|
-
mythtv/programs/mythbackend/encoderlink.cpp
commit 5b97d1c0d7e32b61bbda225a17fbc621b3ca1652 Author: Cédric Schieli <cschieli@gmail.com> Date: Sun Jun 5 12:16:28 2011 +0200 Ticket #7762: Autoshutdown slave feature enhanced Forwardported shutdownSlaveEnhanced_v0.3.diff to fixes/0.24 branch No functionnal changes, main fix was a s/gContext/gCoreContext/ diff --git a/mythtv/programs/mythbackend/encoderlink.cpp b/mythtv/programs/mythbackend/encoderlink.cpp index da7c684..afac5f4 100644
a b int EncoderLink::SetSignalMonitoringRate(int rate, int notifyFrontend) 345 345 346 346 /** \brief Tell a slave to go to sleep 347 347 */ 348 boolEncoderLink::GoToSleep(void)348 int EncoderLink::GoToSleep(void) 349 349 { 350 350 if (IsLocal() || !sock) 351 return false;351 return -1; 352 352 353 353 lastSleepTime = QDateTime::currentDateTime(); 354 354 -
mythtv/programs/mythbackend/encoderlink.h
diff --git a/mythtv/programs/mythbackend/encoderlink.h b/mythtv/programs/mythbackend/encoderlink.h index 09eaae1..6d6e9c5 100644
a b class EncoderLink 64 64 TVRec *GetTVRec(void) { return tv; } 65 65 66 66 /// \brief Tell a slave backend to go to sleep 67 boolGoToSleep(void);67 int GoToSleep(void); 68 68 int LockTuner(void); 69 69 /// \brief Unlock the tuner. 70 70 /// \sa LockTuner(), IsTunerLocked() -
mythtv/programs/mythbackend/mainserver.cpp
diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp index 80e688c..77b6daa 100644
a b void MainServer::HandleForgetRecording(QStringList &slist, PlaybackSock *pbs) 2608 2608 void MainServer::HandleGoToSleep(PlaybackSock *pbs) 2609 2609 { 2610 2610 QStringList strlist; 2611 2612 QString sleepCmd = gCoreContext->GetSetting("SleepCommand"); 2613 if (!sleepCmd.isEmpty()) 2614 { 2615 strlist << "OK"; 2616 SendResponse(pbs->getSocket(), strlist); 2617 VERBOSE(VB_IMPORTANT, "Received GO_TO_SLEEP command from master, " 2618 "running SleepCommand."); 2619 myth_system(sleepCmd); 2611 QDateTime idleSince; 2612 bool blockShutdown; 2613 2614 if (Scheduler::CheckShutdownServer(0, idleSince, blockShutdown)) 2615 { 2616 VERBOSE(VB_IDLE, "Received a request to shut down this machine.... response is OK."); 2617 // sleep 2618 QString sleep_cmd = gCoreContext->GetSetting("SleepCommand", ""); 2619 2620 if (!sleep_cmd.isEmpty()) 2621 { 2622 VERBOSE(VB_GENERAL, QString("Running the command to shutdown " 2623 "this computer :-\n\t\t\t\t\t\t") + sleep_cmd); 2624 2625 strlist << "OK"; 2626 SendResponse(pbs->getSocket(), strlist); 2627 // and now shutdown myself 2628 if (!myth_system(sleep_cmd)) 2629 return; 2630 else 2631 VERBOSE(VB_IMPORTANT, "SleepCommand failed, shutdown aborted"); 2632 } 2633 else 2634 { 2635 strlist << "ERROR: SleepCommand is empty"; 2636 VERBOSE(VB_IMPORTANT, "ERROR: Slave backend should go to sleep " 2637 "but no SleepCommand found!"); 2638 SendResponse(pbs->getSocket(), strlist); 2639 } 2620 2640 } 2621 2641 else 2622 2642 { 2623 strlist << "ERROR: SleepCommand is empty";2624 VERBOSE(VB_I MPORTANT,2625 "ERROR: in HandleGoToSleep(), but no SleepCommand found!");2643 // not allowed to sleep 2644 VERBOSE(VB_IDLE, "Received a request to shut down this machine.... response is BUSY."); 2645 strlist << "BUSY"; 2626 2646 SendResponse(pbs->getSocket(), strlist); 2627 2647 } 2628 2648 } -
mythtv/programs/mythbackend/playbacksock.cpp
diff --git a/mythtv/programs/mythbackend/playbacksock.cpp b/mythtv/programs/mythbackend/playbacksock.cpp index 4c07cd8..0f1fe21 100644
a b bool PlaybackSock::SendReceiveStringList( 144 144 145 145 /** \brief Tells a slave to go to sleep 146 146 */ 147 boolPlaybackSock::GoToSleep(void)147 int PlaybackSock::GoToSleep(void) 148 148 { 149 149 QStringList strlist( QString("GO_TO_SLEEP") ); 150 150 151 return SendReceiveStringList(strlist, 1) && (strlist[0] == "OK"); 151 if (SendReceiveStringList(strlist, 1)) { 152 if (strlist[0] == "OK") 153 return 1; 154 else if (strlist[0] == "BUSY") 155 return 0; 156 } 157 return -1; 152 158 } 153 159 154 160 /** -
mythtv/programs/mythbackend/playbacksock.h
diff --git a/mythtv/programs/mythbackend/playbacksock.h b/mythtv/programs/mythbackend/playbacksock.h index c66aabf..694c55f 100644
a b class PlaybackSock 58 58 void setIP(QString &lip) { ip = lip; } 59 59 QString getIP(void) const { return ip; } 60 60 61 boolGoToSleep(void);61 int GoToSleep(void); 62 62 void GetDiskSpace(QStringList &o_strlist); 63 63 int DeleteFile(const QString &filename, const QString &sgroup); 64 64 int StopRecording(const ProgramInfo *pginfo); -
mythtv/programs/mythbackend/scheduler.cpp
diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp index c9837fe..b2b03c6 100644
a b void Scheduler::RunScheduler(void) 1874 1874 } 1875 1875 } 1876 1876 1877 PutInactiveSlavesToSleep();1878 lastSleepCheck = QDateTime::currentDateTime();1879 1880 1877 SendMythSystemEvent("SCHEDULER_RAN"); 1881 1878 } 1882 1879 } … … void Scheduler::RunScheduler(void) 1888 1885 1889 1886 curtime = QDateTime::currentDateTime(); 1890 1887 1891 // About every 5 minutes check for slaves that can be put to sleep1892 if (lastSleepCheck.secsTo(curtime) > 300)1893 {1894 PutInactiveSlavesToSleep();1895 lastSleepCheck = QDateTime::currentDateTime();1896 }1897 1898 1888 // Go through the list of recordings starting in the next few minutes 1899 1889 // and wakeup any slaves that are asleep 1900 1890 RecIter recIter = startIter; … … void Scheduler::RunScheduler(void) 2196 2186 idleSince = QDateTime(); 2197 2187 } 2198 2188 2189 // About every minute check for slaves that can be waken up or put to sleep 2190 if (lastSleepCheck.secsTo(curtime) >= 60) 2191 { 2192 bool slaveWaken = WakeUpSlaves(false); 2193 if (!slaveWaken) 2194 PutInactiveSlavesToSleep(); 2195 lastSleepCheck = QDateTime::currentDateTime(); 2196 } 2197 2199 2198 // if idletimeout is 0, the user disabled the auto-shutdown feature 2200 2199 if ((idleTimeoutSecs > 0) && (m_mainServer != NULL)) 2201 2200 { … … void Scheduler::ShutdownServer(int prerollseconds, QDateTime &idleSince) 2378 2377 if ((*recIter)->GetRecordingStatus() == rsWillRecord) 2379 2378 break; 2380 2379 2381 // set the wakeuptime if needed 2382 if (recIter != reclist.end()) 2380 // set the wakeuptime if needed and if we are the master 2381 // otherwise, the master will wake up us 2382 if (recIter != reclist.end() && gCoreContext->IsMasterBackend()) 2383 2383 { 2384 2384 RecordingInfo *nextRecording = (*recIter); 2385 2385 QDateTime restarttime = nextRecording->GetRecordingStartTime() … … void Scheduler::ShutdownServer(int prerollseconds, QDateTime &idleSince) 2428 2428 } 2429 2429 } 2430 2430 2431 // tell anyone who is listening the master server is going down now 2432 MythEvent me(QString("SHUTDOWN_NOW")); 2433 gCoreContext->dispatch(me); 2431 if (gCoreContext->IsMasterBackend()) 2432 { 2433 // tell anyone who is listening the master server is going down now 2434 MythEvent me(QString("SHUTDOWN_NOW")); 2435 gCoreContext->dispatch(me); 2436 } 2434 2437 2435 2438 QString halt_cmd = gCoreContext->GetSetting("ServerHaltCommand", 2436 2439 "sudo /sbin/halt -p"); … … void Scheduler::PutInactiveSlavesToSleep(void) 2481 2484 "Scheduler, Checking for slaves that can be shut down"); 2482 2485 2483 2486 int sleepThreshold = 2484 gCoreContext->GetNumSetting( " SleepThreshold", 60 * 45);2487 gCoreContext->GetNumSetting( "idleWaitForRecordingTime", 15) * 60; 2485 2488 2486 2489 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Getting list of slaves that " 2487 2490 "will be active in the next %1 minutes.") … … void Scheduler::PutInactiveSlavesToSleep(void) 2490 2493 VERBOSE(VB_SCHEDULE+VB_EXTRA, "Checking scheduler's reclist"); 2491 2494 RecIter recIter = reclist.begin(); 2492 2495 QDateTime curtime = QDateTime::currentDateTime(); 2493 QStringList SlavesInUse;2496 QStringList slavesInUse; 2494 2497 for ( ; recIter != reclist.end(); ++recIter) 2495 2498 { 2496 2499 RecordingInfo *pginfo = *recIter; … … void Scheduler::PutInactiveSlavesToSleep(void) 2509 2512 { 2510 2513 enc = (*m_tvList)[pginfo->GetCardID()]; 2511 2514 if ((!enc->IsLocal()) && 2512 (!SlavesInUse.contains(enc->GetHostName()))) 2515 (!slavesInUse.contains(enc->GetHostName())) && 2516 (pginfo->GetRecordingStatus() == rsWillRecord)) 2513 2517 { 2514 if (pginfo->GetRecordingStatus() == rsWillRecord) 2515 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Slave %1 will " 2516 "be in use in %2 minutes").arg(enc->GetHostName()) 2517 .arg(secsleft / 60)); 2518 else 2519 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Slave %1 is " 2520 "in use currently recording '%1'") 2521 .arg(enc->GetHostName()).arg(pginfo->GetTitle())); 2522 SlavesInUse << enc->GetHostName(); 2518 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Slave %1 will " 2519 "be in use in %2 minutes").arg(enc->GetHostName()) 2520 .arg(secsleft / 60)); 2521 slavesInUse << enc->GetHostName(); 2523 2522 } 2524 2523 } 2525 2524 } 2526 2525 2527 VERBOSE(VB_SCHEDULE+VB_EXTRA, " Checking inuseprograms table:");2526 VERBOSE(VB_SCHEDULE+VB_EXTRA, "2 Checking inuseprograms table:"); 2528 2527 QDateTime oneHourAgo = QDateTime::currentDateTime().addSecs(-61 * 60); 2529 2528 MSqlQuery query(MSqlQuery::InitCon()); 2530 2529 query.prepare("SELECT DISTINCT hostname, recusage FROM inuseprograms " … … void Scheduler::PutInactiveSlavesToSleep(void) 2533 2532 if (query.exec()) 2534 2533 { 2535 2534 while(query.next()) { 2536 SlavesInUse << query.value(0).toString();2535 slavesInUse << query.value(0).toString(); 2537 2536 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Slave %1 is marked as " 2538 2537 "in use by a %2") 2539 2538 .arg(query.value(0).toString()) … … void Scheduler::PutInactiveSlavesToSleep(void) 2541 2540 } 2542 2541 } 2543 2542 2544 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Shutting down slaves which will " 2545 "be inactive for the next %1 minutes and can be put to sleep.") 2546 .arg(sleepThreshold / 60)); 2543 QStringList slavesThatCanWake; 2547 2544 2548 2545 enciter = m_tvList->begin(); 2549 2546 for (; enciter != m_tvList->end(); ++enciter) 2550 2547 { 2551 2548 enc = *enciter; 2549 QString slaveHost = enc->GetHostName(); 2552 2550 2553 2551 if ((!enc->IsLocal()) && 2554 2552 (enc->IsAwake()) && 2555 (!SlavesInUse.contains(enc->GetHostName())) && 2556 (!enc->IsFallingAsleep())) 2553 (!slavesInUse.contains(slaveHost)) && 2554 (!enc->IsFallingAsleep()) && 2555 (enc->GetSleepStatusTime().secsTo(curtime) > 300) && 2556 (!Scheduler::CheckDailyWakeUpPeriodSlave(slaveHost))) 2557 2557 { 2558 2558 QString sleepCommand = gCoreContext->GetSettingOnHost("SleepCommand", 2559 enc->GetHostName());2559 slaveHost); 2560 2560 QString wakeUpCommand = gCoreContext->GetSettingOnHost("WakeUpCommand", 2561 enc->GetHostName());2561 slaveHost); 2562 2562 2563 if (!sleepCommand.isEmpty() && !wakeUpCommand.isEmpty()) 2563 if (!sleepCommand.isEmpty() && !wakeUpCommand.isEmpty() && 2564 (!slavesThatCanWake.contains(slaveHost))) 2564 2565 { 2565 QString thisHost = enc->GetHostName();2566 slavesThatCanWake << slaveHost; 2566 2567 2567 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Commanding %1 to "2568 "go to sleep.").arg( thisHost));2568 VERBOSE(VB_SCHEDULE+VB_EXTRA, QString(" Asking %1 to " 2569 "go to sleep.").arg(slaveHost)); 2569 2570 2570 if (enc->GoToSleep()) 2571 int goToSleep = enc->GoToSleep(); 2572 if (goToSleep == 1) 2571 2573 { 2572 2574 QMap<int, EncoderLink *>::Iterator slviter = 2573 2575 m_tvList->begin(); 2574 2576 for (; slviter != m_tvList->end(); ++slviter) 2575 2577 { 2576 2578 EncoderLink *slv = *slviter; 2577 if (slv->GetHostName() == thisHost)2579 if (slv->GetHostName() == slaveHost) 2578 2580 { 2579 2581 VERBOSE(VB_SCHEDULE+VB_EXTRA, 2580 2582 QString(" Marking card %1 on slave %2 " … … void Scheduler::PutInactiveSlavesToSleep(void) 2585 2587 } 2586 2588 } 2587 2589 } 2588 else 2590 else if (goToSleep == -1) 2589 2591 { 2590 2592 VERBOSE(VB_IMPORTANT, LOC_ERR + QString("Unable to " 2591 2593 "shutdown %1 slave backend, setting sleep " 2592 "status to undefined.").arg( thisHost));2594 "status to undefined.").arg(slaveHost)); 2593 2595 QMap<int, EncoderLink *>::Iterator slviter = 2594 2596 m_tvList->begin(); 2595 2597 for (; slviter != m_tvList->end(); ++slviter) 2596 2598 { 2597 2599 EncoderLink *slv = *slviter; 2598 if (slv->GetHostName() == thisHost)2600 if (slv->GetHostName() == slaveHost) 2599 2601 slv->SetSleepStatus(sStatus_Undefined); 2600 2602 } 2601 2603 } … … bool Scheduler::WakeUpSlave(QString slaveHostname, bool setWakingStatus) 2642 2644 enc->SetLastWakeTime(curtime); 2643 2645 } 2644 2646 2647 VERBOSE(VB_SCHEDULE, QString("Trying to Wake Up %1.").arg(slaveHostname)); 2648 2645 2649 if (!IsMACAddress(wakeUpCommand)) 2646 2650 { 2651 wakeUpCommand = wakeUpCommand.replace(QRegExp("%SLAVE%"), QString("%1") 2652 .arg(slaveHostname)); 2647 2653 VERBOSE(VB_SCHEDULE, QString("Executing '%1' to wake up slave.") 2648 2654 .arg(wakeUpCommand)); 2649 2655 myth_system(wakeUpCommand); … … bool Scheduler::WakeUpSlave(QString slaveHostname, bool setWakingStatus) 2654 2660 return true; 2655 2661 } 2656 2662 2657 void Scheduler::WakeUpSlaves(void)2663 bool Scheduler::WakeUpSlaves(bool forceWakeAll) 2658 2664 { 2659 QStringList SlavesThatCanWake; 2665 VERBOSE(VB_SCHEDULE, "Scheduler, Checking for slaves that can be wake up"); 2666 QStringList slavesThatCanWake; 2660 2667 QString thisSlave; 2668 bool slaveWaken = false; 2661 2669 QMap<int, EncoderLink *>::Iterator enciter = m_tvList->begin(); 2662 2670 for (; enciter != m_tvList->end(); ++enciter) 2663 2671 { 2664 2672 EncoderLink *enc = *enciter; 2665 2673 2666 if ( enc->IsLocal())2674 if ((!forceWakeAll && !enc->CanSleep()) || enc->IsAwake() || enc->IsLocal() || enc->IsWaking()) 2667 2675 continue; 2668 2676 2669 2677 thisSlave = enc->GetHostName(); 2670 2678 2671 2679 if ((!gCoreContext->GetSettingOnHost("WakeUpCommand", thisSlave) 2672 2680 .isEmpty()) && 2673 (!SlavesThatCanWake.contains(thisSlave))) 2674 SlavesThatCanWake << thisSlave; 2681 (!slavesThatCanWake.contains(thisSlave))) 2682 { 2683 slavesThatCanWake << thisSlave; 2684 2685 if (forceWakeAll || (!forceWakeAll && Scheduler::CheckDailyWakeUpPeriodSlaveAndEncoderStatus(thisSlave, enc))) 2686 { 2687 VERBOSE(VB_SCHEDULE, 2688 QString("Scheduler, Sending wakeup command to slave: %1") 2689 .arg(thisSlave)); 2690 WakeUpSlave(thisSlave); 2691 slaveWaken = true; 2692 } 2693 } 2675 2694 } 2695 return slaveWaken; 2696 } 2697 2698 QDateTime Scheduler::getDailyWakeupTime(QString sPeriod, QString slaveHostname) 2699 { 2700 QString sTime = gCoreContext->GetSettingOnHost(sPeriod, slaveHostname, "00:00"); 2701 QTime tTime = QTime::fromString(sTime, "hh:mm"); 2702 QDateTime dtDateTime = QDateTime(QDate::currentDate(), tTime); 2703 2704 return dtDateTime; 2705 } 2676 2706 2677 int slave = 0; 2678 for (; slave < SlavesThatCanWake.count(); slave++) 2707 bool Scheduler::CheckDailyWakeUpPeriodSlaveAndEncoderStatus(QString slaveHostname, EncoderLink *enc) 2708 { 2709 QDateTime dtCurrent = QDateTime::currentDateTime(); 2710 if (Scheduler::CheckDailyWakeUpPeriodSlave(slaveHostname)) 2679 2711 { 2680 thisSlave = SlavesThatCanWake[slave]; 2681 VERBOSE(VB_SCHEDULE, 2682 QString("Scheduler, Sending wakeup command to slave: %1") 2683 .arg(thisSlave)); 2684 WakeUpSlave(thisSlave, false); 2712 if (enc->IsAsleep() && !enc->IsWaking()) 2713 { 2714 VERBOSE(VB_SCHEDULE, QString("DailyWakupPeriod starts for " 2715 "slave backend %1, waking it up").arg(slaveHostname)); 2716 return true; 2717 } 2718 else if ((enc->IsWaking()) && (enc->GetSleepStatusTime() 2719 .secsTo(dtCurrent) < 370) && 2720 (enc->GetLastWakeTime().secsTo(dtCurrent) > 60)) 2721 { 2722 VERBOSE(VB_SCHEDULE, QString("DailyWakupPeriod already " 2723 "started for slave backend %1 but not yet " 2724 "available, trying to wake it up again.") 2725 .arg(slaveHostname)); 2726 return true; 2727 } 2685 2728 } 2729 return false; 2686 2730 } 2687 2731 2732 bool Scheduler::CheckDailyWakeUpPeriodSlave(QString slaveHostname) 2733 { 2734 QDateTime dtPeriod1Start = getDailyWakeupTime("DailyWakeupStartPeriod1", slaveHostname); 2735 QDateTime dtPeriod1End = getDailyWakeupTime("DailyWakeupEndPeriod1", slaveHostname); 2736 QDateTime dtPeriod2Start = getDailyWakeupTime("DailyWakeupStartPeriod2", slaveHostname); 2737 QDateTime dtPeriod2End = getDailyWakeupTime("DailyWakeupEndPeriod2", slaveHostname); 2738 QDateTime dtCurrent = QDateTime::currentDateTime(); 2739 2740 bool inPeriod = false; 2741 2742 // taken from mythshutdown 2743 // Check for time periods that cross midnight 2744 if (dtPeriod1End < dtPeriod1Start) 2745 { 2746 if (dtCurrent > dtPeriod1End) 2747 dtPeriod1End = dtPeriod1End.addDays(1); 2748 else 2749 dtPeriod1Start = dtPeriod1Start.addDays(-1); 2750 } 2751 2752 if (dtPeriod2End < dtPeriod2Start) 2753 { 2754 if (dtCurrent > dtPeriod2End) 2755 dtPeriod2End = dtPeriod2End.addDays(1); 2756 else 2757 dtPeriod2Start = dtPeriod2Start.addDays(-1); 2758 } 2759 2760 // Check for one of the daily wakeup periods 2761 if (dtPeriod1Start != dtPeriod1End) 2762 { 2763 if (dtCurrent >= dtPeriod1Start && dtCurrent <= dtPeriod1End) 2764 { 2765 VERBOSE(VB_SCHEDULE+VB_EXTRA, "In a daily wakeup period (1)."); 2766 inPeriod = true; 2767 } 2768 } 2769 2770 if (dtPeriod2Start != dtPeriod2End) 2771 { 2772 if (dtCurrent >= dtPeriod2Start && dtCurrent <= dtPeriod2End) 2773 { 2774 VERBOSE(VB_SCHEDULE+VB_EXTRA, "In a daily wakeup period (2)."); 2775 inPeriod = true; 2776 } 2777 } 2778 2779 return inPeriod; 2780 } 2781 2688 2782 void *Scheduler::SchedulerThread(void *param) 2689 2783 { 2690 2784 // Lower scheduling priority, to avoid problems with recordings. -
mythtv/programs/mythbackend/scheduler.h
diff --git a/mythtv/programs/mythbackend/scheduler.h b/mythtv/programs/mythbackend/scheduler.h index b7f7d05..4c1bf0d 100644
a b class Scheduler : public QObject 82 82 83 83 RecStatusType GetRecStatus(const ProgramInfo &pginfo); 84 84 85 static bool CheckShutdownServer(int prerollseconds, QDateTime &idleSince, 86 bool &blockShutdown); 85 87 int GetError(void) const { return error; } 86 88 87 89 protected: … … class Scheduler : public QObject 131 133 bool ChangeRecordingEnd(RecordingInfo *oldp, RecordingInfo *newp); 132 134 133 135 void findAllScheduledPrograms(RecList &proglist); 134 bool CheckShutdownServer(int prerollseconds, QDateTime &idleSince,135 bool &blockShutdown);136 136 void ShutdownServer(int prerollseconds, QDateTime &idleSince); 137 137 void PutInactiveSlavesToSleep(void); 138 138 bool WakeUpSlave(QString slaveHostname, bool setWakingStatus = true); 139 void WakeUpSlaves(void); 139 bool WakeUpSlaves(bool forceWakeAll = true); 140 bool CheckDailyWakeUpPeriodSlave(QString slaveHostname); 141 bool CheckDailyWakeUpPeriodSlaveAndEncoderStatus(QString slaveHostname, EncoderLink *enc); 142 QDateTime getDailyWakeupTime(QString sPeriod, QString slaveHostname); 140 143 141 144 int FillRecordingDir(const QString &title, 142 145 const QString &hostname,