29 #ifndef Pt_System_IONotifier_h
30 #define Pt_System_IONotifier_h
32 #include <Pt/System/Api.h>
33 #include <Pt/System/IOError.h>
34 #include <Pt/System/Selectable.h>
36 #include <Pt/Signal.h>
109 {
return _eventReady; }
126 class IONotifierImpl* _impl;
136 #endif // Pt_System_IODevice_h
Core module.
Definition: Allocator.h:33
virtual void onDetach(EventLoop &loop)
Detached from loop.
virtual void onAttach(EventLoop &loop)
Attached to loop.
virtual void onCancel()
Blocks until operation has cancelled.
Multicast Signal to call multiple slots.
Definition: Signal.h:190
void reset()
Clears the handle or file descriptor.
WaitFlags
Definition: IONotifier.h:63
IONotifier(int fd)
Construct with a file descriptor.
void setHandle(void *handle)
Sets the native handle to monitor.
int endWait()
Ends monitoring and returns the ready flags.
void setFd(int fd)
Sets the file descriptor to monitor.
Operation that runs through an event loop.
Definition: Selectable.h:60
virtual bool onRun()
Check if ready and run.
Monitors a native handle or file descriptor.
Definition: IONotifier.h:60
EventLoop * loop() const
Returns the used event loop.
Definition: IONotifier.h:113
Event loop of a thread or process.
Definition: EventLoop.h:83
IONotifier()
Default constructor.
void beginWait(int flags)
Begins monitoring for flags.
IONotifier(void *handle)
Construct with a native handle.
Pt::Signal & eventReady()
Notifies when the handle or descriptor is ready.
Definition: IONotifier.h:108