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>
109 {
return _eventReady; }
126 class IONotifierImpl* _impl;
Multicast Signal to call multiple slots.
Definition Signal.h:190
Event loop of a thread or process.
Definition EventLoop.h:83
void beginWait(int flags)
Begins monitoring for flags.
virtual void onDetach(EventLoop &loop)
Detached from loop.
WaitFlags
Definition IONotifier.h:63
@ Except
Exceptional condition.
Definition IONotifier.h:66
@ Read
Readable.
Definition IONotifier.h:64
@ Write
Writable.
Definition IONotifier.h:65
void setHandle(void *handle)
Sets the native handle to monitor.
Pt::Signal & eventReady()
Notifies when the handle or descriptor is ready.
Definition IONotifier.h:108
virtual void onCancel()
Blocks until operation has cancelled.
IONotifier(void *handle)
Construct with a native handle.
IONotifier()
Default constructor.
virtual bool onRun()
Check if ready and run.
void setFd(int fd)
Sets the file descriptor to monitor.
IONotifier(int fd)
Construct with a file descriptor.
void reset()
Clears the handle or file descriptor.
EventLoop * loop() const
Returns the used event loop.
Definition IONotifier.h:113
int endWait()
Ends monitoring and returns the ready flags.
virtual void onAttach(EventLoop &loop)
Attached to loop.
Selectable()
Default Constructor.
System programming
Definition Connection.h:26
Core module.
Definition Allocator.h:33