kodi
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
PVR::CPVRChannelNumberInputHandler Class Referenceabstract
Inheritance diagram for PVR::CPVRChannelNumberInputHandler:
Inheritance graph
[legend]
Collaboration diagram for PVR::CPVRChannelNumberInputHandler:
Collaboration graph
[legend]

Public Member Functions

 CPVRChannelNumberInputHandler (int iDelay, int iMaxDigits=CHANNEL_NUMBER_INPUT_MAX_DIGITS)
 ctor. More...
 
CEventStream< PVRChannelNumberInputChangedEvent > & Events ()
 Get the events available for CEventStream. More...
 
void OnTimeout () override
 
virtual void GetChannelNumbers (std::vector< std::string > &channelNumbers)=0
 Get the currently available channel numbers. More...
 
virtual void OnInputDone ()=0
 This method gets called after the channel number input timer has expired.
 
virtual void AppendChannelNumberCharacter (char cCharacter)
 Appends a channel number character. More...
 
bool HasChannelNumber () const
 Check whether a channel number was entered. More...
 
std::string GetChannelNumberLabel () const
 Get the currently entered channel number as a formatted string. More...
 
bool CheckInputAndExecuteAction ()
 If a number was entered, execute the associated action. More...
 

Static Public Attributes

static const int CHANNEL_NUMBER_INPUT_MAX_DIGITS = 5
 

Protected Member Functions

CPVRChannelNumber GetChannelNumber () const
 Get the currently entered channel number. More...
 
size_t GetCurrentDigitCount () const
 Get the currently entered number of digits. More...
 

Protected Attributes

CCriticalSection m_mutex
 

Constructor & Destructor Documentation

◆ CPVRChannelNumberInputHandler()

CPVRChannelNumberInputHandler::CPVRChannelNumberInputHandler ( int  iDelay,
int  iMaxDigits = CHANNEL_NUMBER_INPUT_MAX_DIGITS 
)

ctor.

Parameters
iDelaytimer delay in millisecods.
iMaxDigitsmaximum number of display digits to use.

Member Function Documentation

◆ AppendChannelNumberCharacter()

void CPVRChannelNumberInputHandler::AppendChannelNumberCharacter ( char  cCharacter)
virtual

Appends a channel number character.

Parameters
cCharacterThe character to append. value must be CPVRChannelNumber::SEPARATOR ('.') or any char in the range from '0' to '9'.

Reimplemented in PVR::CPVRChannelSwitchingInputHandler.

◆ CheckInputAndExecuteAction()

bool CPVRChannelNumberInputHandler::CheckInputAndExecuteAction ( )

If a number was entered, execute the associated action.

Returns
True, if the action was executed, false otherwise.

◆ Events()

CEventStream<PVRChannelNumberInputChangedEvent>& PVR::CPVRChannelNumberInputHandler::Events ( )
inline

Get the events available for CEventStream.

Returns
The events.

◆ GetChannelNumber()

CPVRChannelNumber CPVRChannelNumberInputHandler::GetChannelNumber ( ) const
protected

Get the currently entered channel number.

Returns
the channel number.

◆ GetChannelNumberLabel()

std::string CPVRChannelNumberInputHandler::GetChannelNumberLabel ( ) const

Get the currently entered channel number as a formatted string.

Returns
the channel number string.

◆ GetChannelNumbers()

virtual void PVR::CPVRChannelNumberInputHandler::GetChannelNumbers ( std::vector< std::string > &  channelNumbers)
pure virtual

Get the currently available channel numbers.

Parameters
channelNumbersThe list to fill with the channel numbers.

Implemented in PVR::CGUIWindowPVRGuideBase, PVR::CGUIDialogPVRChannelsOSD, PVR::CGUIWindowPVRChannelsBase, and PVR::CPVRChannelSwitchingInputHandler.

◆ GetCurrentDigitCount()

size_t PVR::CPVRChannelNumberInputHandler::GetCurrentDigitCount ( ) const
inlineprotected

Get the currently entered number of digits.

Returns
the number of digits.

◆ HasChannelNumber()

bool CPVRChannelNumberInputHandler::HasChannelNumber ( ) const

Check whether a channel number was entered.

Returns
True if the handler currently holds a channel number, false otherwise.

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