31 #ifndef ASYNC_CPP_APPLICATION_INCLUDED
32 #define ASYNC_CPP_APPLICATION_INCLUDED
41 #include <sys/types.h>
42 #include <sys/select.h>
44 #include <sigc++/sigc++.h>
169 bool operator()(
const struct timeval& t1,
const struct timeval& t2)
const
171 return timercmp(&t1, &t2, <);
174 typedef std::map<int, FdWatch*> WatchMap;
175 typedef std::multimap<struct timeval, Timer *, lttimeval> TimerMap;
181 WatchMap rd_watch_map;
182 WatchMap wr_watch_map;
185 void addFdWatch(
FdWatch *fd_watch);
186 void delFdWatch(
FdWatch *fd_watch);
187 void addTimer(
Timer *timer);
188 void addTimerP(
Timer *timer,
const struct timeval& current);
189 void delTimer(
Timer *timer);
190 DnsLookupWorker *newDnsLookupWorker(
const std::string& label);
The base class for asynchronous applications.
void quit(void)
Exit the application main loop.
The core class for writing asyncronous applications.
A class that produces timer events.
A class for watching file descriptors.
void exec(void)
Execute the application main loop.
~CppApplication(void)
Destructor.
An application class for writing non GUI applications.
CppApplication(void)
Constructor.