Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
PERIPHERALS::CEventScanner Class Reference

Class to scan for peripheral events. More...

#include <EventScanner.h>

Inheritance diagram for PERIPHERALS::CEventScanner:
PERIPHERALS::IEventPollCallback PERIPHERALS::IEventLockCallback CThread

Public Member Functions

 CEventScanner (IEventScannerCallback &callback)
 
 ~CEventScanner () override=default
 
void Start ()
 
void Stop ()
 
EventPollHandlePtr RegisterPollHandle ()
 
EventLockHandlePtr RegisterLock ()
 Acquire a lock that prevents event processing while held.
 
void Activate (CEventPollHandle &handle) override
 
void Deactivate (CEventPollHandle &handle) override
 
void HandleEvents (bool bWait) override
 
void Release (CEventPollHandle &handle) override
 
void ReleaseLock (CEventLockHandle &handle) override
 
- Public Member Functions inherited from PERIPHERALS::IEventPollCallback
virtual ~IEventPollCallback (void)=default
 
- Public Member Functions inherited from PERIPHERALS::IEventLockCallback
virtual ~IEventLockCallback (void)=default
 

Protected Member Functions

void Process () override
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
WaitResponse AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
virtual void OnException ()
 

Additional Inherited Members

- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 
- Static Protected Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
static CThreadGetCurrentThread ()
 
- Protected Attributes inherited from CThread
std::atomic< boolm_bStop
 

Detailed Description

Class to scan for peripheral events.

By default, a rate of 60 Hz is used. A client can obtain control over when input is handled by registering for a polling handle.

Constructor & Destructor Documentation

◆ CEventScanner()

CEventScanner::CEventScanner ( IEventScannerCallback & callback)
explicit

◆ ~CEventScanner()

PERIPHERALS::CEventScanner::~CEventScanner ( )
overridedefault

Member Function Documentation

◆ Activate()

void CEventScanner::Activate ( CEventPollHandle & handle)
overridevirtual

◆ Deactivate()

void CEventScanner::Deactivate ( CEventPollHandle & handle)
overridevirtual

◆ HandleEvents()

void CEventScanner::HandleEvents ( bool bWait)
overridevirtual

◆ Process()

void CEventScanner::Process ( void )
overrideprotectedvirtual

Reimplemented from CThread.

◆ RegisterLock()

EventLockHandlePtr CEventScanner::RegisterLock ( )

Acquire a lock that prevents event processing while held.

◆ RegisterPollHandle()

EventPollHandlePtr CEventScanner::RegisterPollHandle ( )

◆ Release()

void CEventScanner::Release ( CEventPollHandle & handle)
overridevirtual

◆ ReleaseLock()

void CEventScanner::ReleaseLock ( CEventLockHandle & handle)
overridevirtual

◆ Start()

void CEventScanner::Start ( )

◆ Stop()

void CEventScanner::Stop ( )

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