vdr  1.7.27
Public Member Functions | Private Attributes
cCountdown Class Reference

#include <shutdown.h>

List of all members.

Public Member Functions

 cCountdown (void)
void Start (const char *Message, int Seconds)
void Cancel (void)
bool Done (void)
 operator bool (void) const
bool Update (void)
 cCountdown (void)
void Start (const char *Message, int Seconds)
void Cancel (void)
bool Done (void)
 operator bool (void) const
bool Update (void)

Private Attributes

time_t timeout
int counter
bool timedOut
const char * message

Detailed Description

Definition at line 17 of file include/vdr/shutdown.h.


Constructor & Destructor Documentation

Definition at line 30 of file shutdown.c.

References counter, message, timedOut, and timeout.


Member Function Documentation

void cCountdown::Cancel ( void  )

Cancel the 5 minute shutdown warning countdown.

Definition at line 47 of file shutdown.c.

References cSkins::Message(), mtStatus, Skins, timedOut, and timeout.

Referenced by Done(), and main().

void cCountdown::Cancel ( void  )

Cancel the 5 minute shutdown warning countdown.

bool cCountdown::Done ( void  )

Check if countdown timer has run out without canceling.

bool cCountdown::Done ( void  )

Check if countdown timer has run out without canceling.

Definition at line 56 of file shutdown.c.

References Cancel(), and timedOut.

Referenced by main().

cCountdown::operator bool ( void  ) const [inline]

Check if countdown is running.

Definition at line 31 of file shutdown.h.

References timeout.

cCountdown::operator bool ( void  ) const [inline]

Check if countdown is running.

Definition at line 31 of file include/vdr/shutdown.h.

References timeout.

void cCountdown::Start ( const char *  Message,
int  Seconds 
)

Start the 5 minute shutdown warning countdown.

void cCountdown::Start ( const char *  Message,
int  Seconds 
)

Start the 5 minute shutdown warning countdown.

Definition at line 38 of file shutdown.c.

References counter, message, timedOut, timeout, and Update().

Referenced by main().

bool cCountdown::Update ( void  )

Update status display of the countdown.

Returns true on actual update.

bool cCountdown::Update ( void  )

Update status display of the countdown.

Returns true on actual update.

Definition at line 65 of file shutdown.c.

References counter, message, cSkins::Message(), mtStatus, Skins, cString::sprintf(), timedOut, and timeout.

Referenced by main(), and Start().


Member Data Documentation

int cCountdown::counter [private]

last shown time in 10s units

Definition at line 20 of file include/vdr/shutdown.h.

Referenced by cCountdown(), Start(), and Update().

const char * cCountdown::message [private]

message to display, s is placeholder for time

Definition at line 22 of file include/vdr/shutdown.h.

Referenced by cCountdown(), Start(), and Update().

bool cCountdown::timedOut [private]

countdown did run down to 0 and was not canceled

Definition at line 21 of file include/vdr/shutdown.h.

Referenced by Cancel(), cCountdown(), Done(), Start(), and Update().

time_t cCountdown::timeout [private]

5-minute countdown timer

Definition at line 19 of file include/vdr/shutdown.h.

Referenced by Cancel(), cCountdown(), operator bool(), Start(), and Update().


The documentation for this class was generated from the following files: