Ase::EventSource class

EventLoop source for callback execution.

Derived classes

class DispatcherSource virtual
EventLoop source for handler execution.
class PollFDSource virtual
EventLoop source for IO callbacks.
class TimedSource virtual
EventLoop source for timer execution.
class USignalSource virtual
EventLoop source for handler execution.

Public functions

void add_poll(PollFD*const pfd)
Add a PollFD descriptors for poll(2) and check().
auto check(const LoopState& state) →  bool pure virtual
Check the source and its PollFD descriptors for dispatching (true return).
auto dispatch(const LoopState& state) →  bool pure virtual
Dispatch source, returns if it should be kept alive.
void loop_remove()
Remove this source from its event loop if any.
auto main_loop() const →  MainLoop*
Get the main loop for this source.
auto may_recurse() const →  bool
Indicates if this source may recurse.
void may_recurse(bool may_recurse)
Dispatch this source if its running recursively.
auto prepare(const LoopState& state, int64* timeout_usecs_p) →  bool pure virtual
Prepare the source for dispatching (true return) or polling (false).
auto primary() const →  bool
Indicate whether this source is primary.
void primary(bool is_primary)
Set whether this source prevents its loop from exiting.
auto recursion() const →  bool
Indicates wether the source is currently in recursion.
void remove_poll(PollFD*const pfd)
Remove a previously added PollFD.