00001 00037 #ifndef ASYNC_DNS_LOOKUP_INCLUDED 00038 #define ASYNC_DNS_LOOKUP_INCLUDED 00039 00040 00041 /**************************************************************************** 00042 * 00043 * System Includes 00044 * 00045 ****************************************************************************/ 00046 00047 #include <sigc++/sigc++.h> 00048 00049 #include <vector> 00050 00051 00052 /**************************************************************************** 00053 * 00054 * Project Includes 00055 * 00056 ****************************************************************************/ 00057 00058 #include <AsyncIpAddress.h> 00059 00060 00061 /**************************************************************************** 00062 * 00063 * Local Includes 00064 * 00065 ****************************************************************************/ 00066 00067 00068 00069 /**************************************************************************** 00070 * 00071 * Forward declarations 00072 * 00073 ****************************************************************************/ 00074 00075 class DnsLookupWorker; 00076 00077 00078 /**************************************************************************** 00079 * 00080 * Namespace 00081 * 00082 ****************************************************************************/ 00083 00084 namespace Async 00085 { 00086 00087 /**************************************************************************** 00088 * 00089 * Defines & typedefs 00090 * 00091 ****************************************************************************/ 00092 00093 00094 00095 /**************************************************************************** 00096 * 00097 * Exported Global Variables 00098 * 00099 ****************************************************************************/ 00100 00101 00102 00103 /**************************************************************************** 00104 * 00105 * Class definitions 00106 * 00107 ****************************************************************************/ 00108 00120 class DnsLookup : public SigC::Object 00121 { 00122 public: 00127 DnsLookup(const std::string& label); 00128 00132 ~DnsLookup(void); 00133 00138 const std::string &label(void) const { return m_label; } 00139 00150 std::vector<IpAddress> addresses(void); 00151 00156 SigC::Signal1<void, DnsLookup&> resultsReady; 00157 00158 00159 protected: 00160 00161 private: 00162 DnsLookupWorker *worker; 00163 std::string m_label; 00164 00165 void onResultsReady(void); 00166 00167 }; /* class DnsLookup */ 00168 00169 00170 } /* namespace */ 00171 00172 #endif /* ASYNC_DNS_LOOKUP_INCLUDED */ 00173 00174 00175 00176 /* 00177 * This file has not been truncated 00178 */ 00179