Async  0.18.0
AsyncDnsLookup.h
Go to the documentation of this file.
1 
37 #ifndef ASYNC_DNS_LOOKUP_INCLUDED
38 #define ASYNC_DNS_LOOKUP_INCLUDED
39 
40 
41 /****************************************************************************
42  *
43  * System Includes
44  *
45  ****************************************************************************/
46 
47 #include <sigc++/sigc++.h>
48 
49 #include <vector>
50 
51 
52 /****************************************************************************
53  *
54  * Project Includes
55  *
56  ****************************************************************************/
57 
58 #include <AsyncIpAddress.h>
59 
60 
61 /****************************************************************************
62  *
63  * Local Includes
64  *
65  ****************************************************************************/
66 
67 
68 
69 /****************************************************************************
70  *
71  * Forward declarations
72  *
73  ****************************************************************************/
74 
75 class DnsLookupWorker;
76 
77 
78 /****************************************************************************
79  *
80  * Namespace
81  *
82  ****************************************************************************/
83 
84 namespace Async
85 {
86 
87 /****************************************************************************
88  *
89  * Defines & typedefs
90  *
91  ****************************************************************************/
92 
93 
94 
95 /****************************************************************************
96  *
97  * Exported Global Variables
98  *
99  ****************************************************************************/
100 
101 
102 
103 /****************************************************************************
104  *
105  * Class definitions
106  *
107  ****************************************************************************/
108 
120 class DnsLookup : public SigC::Object
121 {
122  public:
127  DnsLookup(const std::string& label);
128 
132  ~DnsLookup(void);
133 
138  const std::string &label(void) const { return m_label; }
139 
150  std::vector<IpAddress> addresses(void);
151 
156  SigC::Signal1<void, DnsLookup&> resultsReady;
157 
158 
159  protected:
160 
161  private:
162  DnsLookupWorker *worker;
163  std::string m_label;
164 
165  void onResultsReady(void);
166 
167 }; /* class DnsLookup */
168 
169 
170 } /* namespace */
171 
172 #endif /* ASYNC_DNS_LOOKUP_INCLUDED */
173 
174 
175 
176 /*
177  * This file has not been truncated
178  */
179