25 void Start(
const char *Message,
int Seconds);
31 operator bool(
void)
const {
return timeout != 0; }
88 bool Retry(time_t AtTime = 0) {
return retry <= (AtTime ? AtTime : time(NULL)); }
time_t timeout
5-minute countdown timer
bool timedOut
countdown did run down to 0 and was not canceled
const char * message
message to display, s is placeholder for time
bool Update(void)
Update status display of the countdown.
int counter
last shown time in 10s units
void Start(const char *Message, int Seconds)
Start the 5 minute shutdown warning countdown.
void Cancel(void)
Cancel the 5 minute shutdown warning countdown.
bool Done(void)
Check if countdown timer has run out without canceling.
void CheckManualStart(int ManualStart)
Check whether the next timer is in ManualStart time window.
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 ConfirmShutdown(bool Ask)
Check for background activity that blocks shutdown.
time_t GetUserInactiveTime(void)
Time when user will become non-inactive, or 0 if never, 1 if a long time ago.
bool EmergencyExitRequested(void)
Returns true if an emergency exit was requested.
void SetRetry(int Seconds)
Set shutdown retry so that VDR will not try to automatically shut down within Seconds.
bool Retry(time_t AtTime=0)
Check whether its time to re-try the shutdown.
int exitCode
Exit code, if VDR exit was requested, or -1 if not requested.
bool IsUserInactive(time_t AtTime=0)
Check whether VDR is in interactive mode or non-interactive mode (waiting for shutdown).
void RequestEmergencyExit(void)
Requests an emergency exit of the VDR main loop.
bool DoShutdown(bool Force)
Call the shutdown script with data of the next pending timer.
bool ConfirmRestart(bool Ask)
Check for background activity that blocks restart.
void Exit(int ExitCode)
Set VDR exit code and initiate end of VDR main loop.
void CallShutdownCommand(time_t WakeupTime, int Channel, const char *File, bool UserShutdown)
Call the shutdown command with the given parameters.
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.
bool DoExit(void)
Check if an exit code was set, and VDR should exit.
time_t retry
Time for retrying the shutdown.
void SetUserInactive(void)
Set VDR manually into non-interactive mode from now on.
time_t GetRetry(void)
Time when shutdown retry block ends.
bool emergencyExitRequested
The requested exit is an emergency exit.
int GetExitCode(void)
Get the currently set exit code of VDR.
char * shutdownCommand
Command for shutting down VDR.
cShutdownHandler ShutdownHandler