ivi-main-loop
ivi::IdleEventSource Class Referenceabstract

An idle event source can be used to be notified whenever a dispatcher has no non-idle to trigger. More...

#include <ivi-main-loop-common.h>

Inheritance diagram for ivi::IdleEventSource:
Collaboration diagram for ivi::IdleEventSource:

Public Types

typedef std::function< ReportStatus()> CallBackFunction
 
enum  ReportStatus { ReportStatus::KEEP_ENABLED, ReportStatus::DISABLE }
 

Public Member Functions

 IdleEventSource (const CallBackFunction &function)
 
virtual void enable ()=0
 Enables the source. More...
 
virtual void disable ()=0
 Disables the source. More...
 
virtual bool isEnabled () const =0
 Returns true if the source is currently enabled, false otherwise. More...
 

Protected Attributes

CallBackFunction m_func
 

Detailed Description

An idle event source can be used to be notified whenever a dispatcher has no non-idle to trigger.

Definition at line 61 of file ivi-main-loop-common.h.

Member Enumeration Documentation

enum ivi::EventSource::ReportStatus
stronginherited
Enumerator
KEEP_ENABLED 

Returning that value from a source's callback function causes the source to remain enabled.

DISABLE 

Returning that value from a source's callback function causes the source to be disabled.

Definition at line 32 of file ivi-main-loop-common.h.

33  {
34  /// Returning that value from a source's callback function causes the source to remain enabled
35  KEEP_ENABLED,
36 
37  /// Returning that value from a source's callback function causes the source to be disabled
38  DISABLE
39  };

Member Function Documentation

virtual void ivi::EventSource::enable ( )
pure virtualinherited
virtual void ivi::EventSource::disable ( )
pure virtualinherited
virtual bool ivi::EventSource::isEnabled ( ) const
pure virtualinherited

Returns true if the source is currently enabled, false otherwise.

Implemented in ivi::GLibChannelWatchEventSource, ivi::GLibTimeOutEventSource, and ivi::GLibIdleEventSource.


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