00001 00030 #ifndef ASYNC_APPLICATION_INCLUDED 00031 #define ASYNC_APPLICATION_INCLUDED 00032 00033 00034 /**************************************************************************** 00035 * 00036 * System Includes 00037 * 00038 ****************************************************************************/ 00039 00040 #include <sigc++/sigc++.h> 00041 00042 #include <string> 00043 00044 00045 /**************************************************************************** 00046 * 00047 * Project Includes 00048 * 00049 ****************************************************************************/ 00050 00051 00052 00053 /**************************************************************************** 00054 * 00055 * Local Includes 00056 * 00057 ****************************************************************************/ 00058 00059 00060 00061 /**************************************************************************** 00062 * 00063 * Forward declarations 00064 * 00065 ****************************************************************************/ 00066 00067 00068 00069 /**************************************************************************** 00070 * 00071 * Namespace 00072 * 00073 ****************************************************************************/ 00074 00075 namespace Async 00076 { 00077 00078 /**************************************************************************** 00079 * 00080 * Forward declarations of classes inside of the declared namespace 00081 * 00082 ****************************************************************************/ 00083 00084 class Timer; 00085 class FdWatch; 00086 class DnsLookupWorker; 00087 00088 00089 /**************************************************************************** 00090 * 00091 * Defines & typedefs 00092 * 00093 ****************************************************************************/ 00094 00095 00096 00097 /**************************************************************************** 00098 * 00099 * Exported Global Variables 00100 * 00101 ****************************************************************************/ 00102 00103 00104 00105 /**************************************************************************** 00106 * 00107 * Class definitions 00108 * 00109 ****************************************************************************/ 00110 00118 class Application : public SigC::Object 00119 { 00120 public: 00129 static Application &app(void); 00130 00134 Application(void); 00135 00139 virtual ~Application(void); 00140 00148 virtual void exec(void) = 0; 00149 00155 virtual void quit(void) = 0; 00156 00157 protected: 00158 00159 private: 00160 friend class FdWatch; 00161 friend class Timer; 00162 friend class DnsLookup; 00163 00164 static Application *app_ptr; 00165 00166 virtual void addFdWatch(FdWatch *fd_watch) = 0; 00167 virtual void delFdWatch(FdWatch *fd_watch) = 0; 00168 virtual void addTimer(Timer *timer) = 0; 00169 virtual void delTimer(Timer *timer) = 0; 00170 virtual DnsLookupWorker *newDnsLookupWorker(const std::string& label) = 0; 00171 00172 }; /* class Application */ 00173 00174 00175 } /* namespace */ 00176 00177 #endif /* ASYNC_APPLICATION_INCLUDED */ 00178 00179 00180 00181 /* 00182 * This file has not been truncated 00183 */ 00184