#include "loop.hh"
Public Member Functions | |
void | add_poll (PollFD *const pfd) |
virtual bool | check (const LoopState &state)=0 |
virtual void | destroy () |
virtual bool | dispatch (const LoopState &state)=0 |
void | loop_remove () |
MainLoop * | main_loop () const |
bool | may_recurse () const |
void | may_recurse (bool may_recurse) |
virtual bool | prepare (const LoopState &state, int64 *timeout_usecs_p)=0 |
bool | primary () const |
void | primary (bool is_primary) |
bool | recursion () const |
void | remove_poll (PollFD *const pfd) |
Protected Member Functions | |
EventSource () | |
uint | n_pfds () |
uint | source_id () |
virtual | ~EventSource () |
Protected Attributes | ||
uint | dispatching_: 1 | |
uint | id_ | |
EventLoop * | loop_ | |
uint8 | loop_state_ | |
uint | may_recurse_: 1 | |
struct { | ||
uint idx | ||
PollFD * pfd | ||
} * | pfds_ | |
uint | primary_: 1 | |
int16 | priority_ | |
uint | was_dispatching_: 1 | |
EventLoop source for callback execution.
|
explicitprotected |
|
protectedvirtual |
|
protected |
|
protected |
Prepare the source for dispatching (true return) or polling (false).
Implemented in DispatcherSource, USignalSource, TimedSource, and PollFDSource.
|
pure virtual |
Check the source and its PollFD descriptors for dispatching (true return).
Implemented in DispatcherSource, USignalSource, TimedSource, and PollFDSource.
|
pure virtual |
Dispatch source, returns if it should be kept alive.
Implemented in DispatcherSource, USignalSource, TimedSource, and PollFDSource.
|
virtual |
Reimplemented in DispatcherSource, USignalSource, and PollFDSource.
bool recursion | ( | ) | const |
Indicates wether the source is currently in recursion.
bool may_recurse | ( | ) | const |
Indicates if this source may recurse.
void may_recurse | ( | bool | may_recurse | ) |
Dispatch this source if its running recursively.
bool primary | ( | ) | const |
Indicate whether this source is primary.
void primary | ( | bool | is_primary | ) |
Set whether this source prevents its loop from exiting.
void loop_remove | ( | ) |
Remove this source from its event loop if any.
MainLoop * main_loop | ( | ) | const |
Get the main loop for this source.
|
protected |
PollFD* pfd |
uint idx |
struct { ... } * pfds_ |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |