Go to the documentation of this file.
25 void Start(
const char *Message,
int Seconds);
31 operator bool(
void)
const {
return timeout != 0; }
54 void Exit(
int ExitCode) {
exitCode = ExitCode; }
57 bool DoExit(
void) {
return exitCode >= 0; }
70 void CallShutdownCommand(time_t WakeupTime,
int Channel,
const char *File,
bool UserShutdown);
88 bool Retry(time_t AtTime = 0) {
return retry <= (AtTime ? AtTime : time(NULL)); }
91 time_t GetRetry(
void) {
return retry; }
93 void SetRetry(
int Seconds) {
retry = time(NULL) + Seconds; }
bool ConfirmRestart(bool Ask)
Check for background activity that blocks restart.
void Start(const char *Message, int Seconds)
Start the 5 minute shutdown warning countdown.
const char * message
message to display, s is placeholder for time
int exitCode
Exit code, if VDR exit was requested, or -1 if not requested.
bool emergencyExitRequested
The requested exit is an emergency exit.
bool ConfirmShutdown(bool Ask)
Check for background activity that blocks shutdown.
void CheckManualStart(int ManualStart)
Check whether the next timer is in ManualStart time window.
void SetUserInactiveTimeout(int Seconds=-1, bool Force=false)
Set the time in the future when VDR will switch into non-interactive mode or power down.
int counter
last shown time in 10s units
bool Update(void)
Update status display of the countdown.
cShutdownHandler ShutdownHandler
bool timedOut
countdown did run down to 0 and was not canceled
time_t retry
Time for retrying the shutdown.
void RequestEmergencyExit(void)
Requests an emergency exit of the VDR main loop.
char * shutdownCommand
Command for shutting down VDR.
time_t timeout
5-minute countdown timer
time_t activeTimeout
Time when VDR will become non-interactive. 0 means never, 1 means unknown time ago.
void SetShutdownCommand(const char *ShutdownCommand)
Set the command string for shutdown command.
bool Done(void)
Check if countdown timer has run out without canceling.
void Cancel(void)
Cancel the 5 minute shutdown warning countdown.
void CallShutdownCommand(time_t WakeupTime, int Channel, const char *File, bool UserShutdown)
Call the shutdown command with the given parameters.
bool DoShutdown(bool Force)
Call the shutdown script with data of the next pending timer.