Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CEvent Class Reference

#include <Event.h>

Inheritance diagram for CEvent:
CActivityResultEvent CDVDMediaCodecOnFrameAvailable

Public Member Functions

 CEvent (bool manual=false, bool signaled_=false)
 
void Reset ()
 
void Set ()
 
bool Signaled ()
 
bool WaitMSec (unsigned int milliSeconds)
 
bool Wait ()
 
int getNumWaits ()
 

Friends

class XbmcThreads::CEventGroup
 

Detailed Description

This is an Event class built from a ConditionVariable. The Event adds the state that the condition is gating as well as the mutex/lock.

This Event can be 'interruptible' (even though there is only a single place in the code that uses this behavior).

This class manages 'spurious returns' from the condition variable.

Constructor & Destructor Documentation

◆ CEvent()

CEvent::CEvent ( bool  manual = false,
bool  signaled_ = false 
)
inline

Member Function Documentation

◆ getNumWaits()

int CEvent::getNumWaits ( )
inline

This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.

◆ Reset()

void CEvent::Reset ( void  )
inline

◆ Set()

void CEvent::Set ( )

◆ Signaled()

bool CEvent::Signaled ( )
inline

Returns true if Event has been triggered and not reset, false otherwise.

◆ Wait()

bool CEvent::Wait ( )
inline

This will wait for the Event to be triggered. The method will return 'true' if the Event was triggered. If it was either interrupted it will return false. Otherwise it will return false.

◆ WaitMSec()

bool CEvent::WaitMSec ( unsigned int  milliSeconds)
inline

This will wait up to 'milliSeconds' milliseconds for the Event to be triggered. The method will return 'true' if the Event was triggered. Otherwise it will return false.

Friends And Related Function Documentation

◆ XbmcThreads::CEventGroup

friend class XbmcThreads::CEventGroup
friend

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