summaryrefslogtreecommitdiffstats
path: root/examples/network/dnslookup/dnslookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/dnslookup/dnslookup.h')
-rw-r--r--examples/network/dnslookup/dnslookup.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/examples/network/dnslookup/dnslookup.h b/examples/network/dnslookup/dnslookup.h
index d76756bad0..4d0232be8a 100644
--- a/examples/network/dnslookup/dnslookup.h
+++ b/examples/network/dnslookup/dnslookup.h
@@ -38,11 +38,21 @@
**
****************************************************************************/
-#include <QObject>
+#include <QDnsLookup>
+#include <QHostAddress>
-QT_BEGIN_NAMESPACE
-class QDnsLookup;
-QT_END_NAMESPACE
+//! [0]
+
+struct DnsQuery
+{
+ DnsQuery() : type(QDnsLookup::A) {}
+
+ QDnsLookup::Type type;
+ QHostAddress nameServer;
+ QString name;
+};
+
+//! [0]
class DnsManager : public QObject
{
@@ -50,6 +60,7 @@ class DnsManager : public QObject
public:
DnsManager();
+ void setQuery(const DnsQuery &q) { query = q; }
public slots:
void execute();
@@ -57,5 +68,6 @@ public slots:
private:
QDnsLookup *dns;
+ DnsQuery query;
};