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