Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
PVR::CPVRChannelNumberInputHandler Class Referenceabstract

#include <PVRChannelNumberInputHandler.h>

Inheritance diagram for PVR::CPVRChannelNumberInputHandler:
ITimerCallback PVR::CGUIDialogPVRChannelsOSD PVR::CGUIWindowPVRChannelsBase PVR::CGUIWindowPVRGuideBase PVR::CPVRChannelSwitchingInputHandler PVR::CGUIWindowPVRRadioChannels PVR::CGUIWindowPVRTVChannels PVR::CGUIWindowPVRRadioGuide PVR::CGUIWindowPVRTVGuide

Public Member Functions

 CPVRChannelNumberInputHandler ()
 
 CPVRChannelNumberInputHandler (int iDelay, int iMaxDigits=CHANNEL_NUMBER_INPUT_MAX_DIGITS)
 ctor.
 
 ~CPVRChannelNumberInputHandler () override=default
 
CEventStream< PVRChannelNumberInputChangedEvent > & Events ()
 Get the events available for CEventStream.
 
void OnTimeout () override
 
virtual void GetChannelNumbers (std::vector< std::string > &channelNumbers)=0
 Get the currently available channel numbers.
 
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.
 
bool HasChannelNumber () const
 Check whether a channel number was entered.
 
std::string GetChannelNumberLabel () const
 Get the currently entered channel number as a formatted string.
 
bool CheckInputAndExecuteAction ()
 If a number was entered, execute the associated action.
 

Static Public Attributes

static const int CHANNEL_NUMBER_INPUT_MAX_DIGITS = 5
 

Protected Member Functions

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

Protected Attributes

CCriticalSection m_mutex
 

Constructor & Destructor Documentation

◆ CPVRChannelNumberInputHandler() [1/2]

CPVRChannelNumberInputHandler::CPVRChannelNumberInputHandler ( )

◆ CPVRChannelNumberInputHandler() [2/2]

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

ctor.

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

◆ ~CPVRChannelNumberInputHandler()

PVR::CPVRChannelNumberInputHandler::~CPVRChannelNumberInputHandler ( )
overridedefault

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::CGUIDialogPVRChannelsOSD, PVR::CGUIWindowPVRChannelsBase, PVR::CGUIWindowPVRGuideBase, 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.

◆ OnInputDone()

virtual void PVR::CPVRChannelNumberInputHandler::OnInputDone ( )
pure virtual

This method gets called after the channel number input timer has expired.

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

◆ OnTimeout()

void CPVRChannelNumberInputHandler::OnTimeout ( )
overridevirtual

Implements ITimerCallback.

Member Data Documentation

◆ CHANNEL_NUMBER_INPUT_MAX_DIGITS

const int PVR::CPVRChannelNumberInputHandler::CHANNEL_NUMBER_INPUT_MAX_DIGITS = 5
static

◆ m_mutex

CCriticalSection PVR::CPVRChannelNumberInputHandler::m_mutex
mutableprotected

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