21 #ifndef COMMON_IO_WINDOWSPOLLER_H_ 22 #define COMMON_IO_WINDOWSPOLLER_H_ 24 #include <ola/Clock.h> 29 #define WIN32_LEAN_AND_MEAN 30 #include <ola/win/CleanWindows.h> 36 #include "common/io/PollerInterface.h" 37 #include "common/io/TimeoutManager.h" 59 bool delete_on_close);
66 const TimeStamp *WakeUpTime()
const {
return &m_wake_up_time; }
72 typedef std::map<void*, class WindowsPollerDescriptor*> DescriptorMap;
73 typedef std::vector<class WindowsPollerDescriptor*> OrphanedDescriptors;
81 DescriptorMap m_descriptor_map;
82 OrphanedDescriptors m_orphaned_descriptors;
84 std::pair<WindowsPollerDescriptor*, bool>
85 LookupOrCreateDescriptor(
void* handle);
86 bool RemoveDescriptor(
const DescriptorHandle &handle,
88 bool warn_on_missing);
90 void HandleWakeup(
class PollData* data);
91 void FinalCheckIOs(std::vector<class PollData*> data);
97 #endif // COMMON_IO_WINDOWSPOLLER_H_ A time interval, with usecond accuracy.
Definition: Clock.h:138
Manages timer events.
Definition: TimeoutManager.h:45
A container for the exported variables.
Definition: ExportMap.h:324
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition: Descriptor.h:282
bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval)
Poll the Descriptors for events and execute any callbacks.
Definition: WindowsPoller.cpp:287
Definition: ExportMap.h:176
Export variables on the http server.
Definition: WindowsPoller.cpp:223
bool RemoveWriteDescriptor(class WriteFileDescriptor *descriptor)
Unregister a WriteFileDescriptor for write events.
Definition: WindowsPoller.cpp:216
bool AddWriteDescriptor(class WriteFileDescriptor *descriptor)
Register a WriteFileDescriptor to receive ready-to-write events.
Definition: WindowsPoller.cpp:188
bool RemoveReadDescriptor(class ReadFileDescriptor *descriptor)
Unregister a ReadFileDescriptor for read events.
Definition: WindowsPoller.cpp:176
Used to get the current time.
Definition: Clock.h:242
WindowsPoller(ExportMap *export_map, Clock *clock)
Create a new WindowsPoller.
Definition: WindowsPoller.cpp:102
Represents a file descriptor that supports reading data.
Definition: Descriptor.h:140
bool AddReadDescriptor(class ReadFileDescriptor *descriptor)
Register a ReadFileDescriptor for read events.
Definition: WindowsPoller.cpp:133
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
The interface for the Poller classes.
Definition: PollerInterface.h:70
An implementation of PollerInterface for Windows.
Definition: WindowsPoller.h:46
Represents a point in time with microsecond accuracy.
Definition: Clock.h:191
Represents a file descriptor that supports writing data.
Definition: Descriptor.h:170