Go to the documentation of this file.
25 void Start(
const char *Message,
int Seconds);
31 operator bool(
void)
const {
return timeout != 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)); }
bool EmergencyExitRequested(void)
Returns true if an emergency exit was requested.
time_t GetUserInactiveTime(void)
Time when user will become non-inactive, or 0 if never, 1 if a long time ago.
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.
bool Retry(time_t AtTime=0)
Check whether its time to re-try the 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.
void Exit(int ExitCode)
Set VDR exit code and initiate end of VDR main loop.
cShutdownHandler ShutdownHandler
bool timedOut
countdown did run down to 0 and was not canceled
time_t retry
Time for retrying the shutdown.
void SetUserInactive(void)
Set VDR manually into non-interactive mode from now on.
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 SetRetry(int Seconds)
Set shutdown retry so that VDR will not try to automatically shut down within Seconds.
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.
bool IsUserInactive(time_t AtTime=0)
Check whether VDR is in interactive mode or non-interactive mode (waiting for shutdown).
void CallShutdownCommand(time_t WakeupTime, int Channel, const char *File, bool UserShutdown)
Call the shutdown command with the given parameters.
int GetExitCode(void)
Get the currently set exit code of VDR.
time_t GetRetry(void)
Time when shutdown retry block ends.
bool DoExit(void)
Check if an exit code was set, and VDR should exit.
bool DoShutdown(bool Force)
Call the shutdown script with data of the next pending timer.