|
libzypp
17.22.0
|
#include <abstracteventsource.h>

Public Types | |
| enum | EventTypes { Read = 0x01, Write = 0x02, Exception = 0x04, Error = 0x08 } |
Public Types inherited from zyppng::Base | |
| using | Ptr = std::shared_ptr< Base > |
| using | WeakPtr = std::weak_ptr< Base > |
Public Member Functions | |
| AbstractEventSource () | |
| AbstractEventSource (AbstractEventSourcePrivate &dd) | |
| virtual | ~AbstractEventSource () |
| std::weak_ptr< EventDispatcher > | eventDispatcher () const |
| virtual void | onFdReady (int fd, int events)=0 |
| virtual void | onSignal (int signal)=0 |
Public Member Functions inherited from zyppng::Base | |
| Base () | |
| virtual | ~Base () |
| WeakPtr | parent () const |
| void | addChild (Base::Ptr child) |
| void | removeChild (Ptr child) |
| const std::unordered_set< Ptr > & | children () const |
| template<typename T > | |
| std::vector< std::weak_ptr< T > > | findChildren () const |
| template<typename T > | |
| std::shared_ptr< T > | shared_this () const |
| template<typename T > | |
| std::shared_ptr< T > | shared_this () |
| template<typename T > | |
| std::weak_ptr< T > | weak_this () const |
| template<typename T > | |
| std::weak_ptr< T > | weak_this () |
Protected Member Functions | |
| void | updateFdWatch (int fd, int mode) |
| void | removeFdWatch (int fd) |
Protected Member Functions inherited from zyppng::Base | |
| Base (BasePrivate &dd) | |
Additional Inherited Members | |
Protected Attributes inherited from zyppng::Base | |
| std::unique_ptr< BasePrivate > | d_ptr |
The AbstractEventSource class is the base class for all objects that can be tracked using one or more file descriptors
A subclass can register multiple file descriptors to be tracked using updateFdWatch and remove them with removeFdWatch. This is internally forwarded to the
In case there is activity on the file descriptor the EventDispatcher wakes up and forwards it to onFdReady.
Definition at line 37 of file abstracteventsource.h.
The different types of events a AbstractEventSource can listen for.
| Enumerator | |
|---|---|
| Read | |
| Write | |
| Exception | |
| Error | |
Definition at line 46 of file abstracteventsource.h.
| zyppng::AbstractEventSource::AbstractEventSource | ( | ) |
Definition at line 18 of file abstracteventsource.cc.
| zyppng::AbstractEventSource::AbstractEventSource | ( | AbstractEventSourcePrivate & | dd | ) |
Definition at line 22 of file abstracteventsource.cc.
|
virtual |
Definition at line 26 of file abstracteventsource.cc.
| std::weak_ptr< EventDispatcher > zyppng::AbstractEventSource::eventDispatcher | ( | ) | const |
Returns the
Definition at line 35 of file abstracteventsource.cc.
|
pure virtual |
Called by the
Implemented in zyppng::SocketNotifier.
|
pure virtual |
Called when a event source has registered to receive unix signals
Implemented in zyppng::SocketNotifier.
|
protected |
Register or update a file descriptor poll mode.
| fd | The fd to add or update to the watchlist of the |
| mode | The watchmode used in the watchlist |
Definition at line 40 of file abstracteventsource.cc.
|
protected |
Removes the given fd from the
Definition at line 50 of file abstracteventsource.cc.