ivi-main-loop
ivi::TimeOutEventSource Class Referenceabstract

A timeout source is triggered after a certain amount of time. More...

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

Inheritance diagram for ivi::TimeOutEventSource:
Collaboration diagram for ivi::TimeOutEventSource:

Public Types

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

Public Member Functions

 TimeOutEventSource (DurationInMilliseconds duration, const CallBackFunction &callBackFunction)
 
DurationInMilliseconds getDuration () const
 
virtual void setDuration (DurationInMilliseconds duration)=0
 
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

DurationInMilliseconds m_duration
 
CallBackFunction m_func
 

Detailed Description

A timeout source is triggered after a certain amount of time.

Definition at line 86 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: