aboutsummaryrefslogtreecommitdiff
path: root/src/QXmppServiceInfo.h
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-09-01 12:40:55 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-09-01 12:40:55 +0000
commit01017e2ca66be42fc2933ec4bc8d388b9d4a85f2 (patch)
tree86e637d8372efb664bd6e274fd2bd08e0385d5a5 /src/QXmppServiceInfo.h
parentcd218ff692df40b0324ea6834eb4924293970de0 (diff)
downloadqxmpp-01017e2ca66be42fc2933ec4bc8d388b9d4a85f2.tar.gz
no need of separate classes, nested into one main class
Diffstat (limited to 'src/QXmppServiceInfo.h')
-rw-r--r--src/QXmppServiceInfo.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/QXmppServiceInfo.h b/src/QXmppServiceInfo.h
index 51e71282..0b752371 100644
--- a/src/QXmppServiceInfo.h
+++ b/src/QXmppServiceInfo.h
@@ -27,39 +27,38 @@
#include <QList>
#include <QString>
-/// \brief The QXmppServiceRecord class represents a DNS SRV record.
+/// \brief The QXmppServiceInfo class provides static methods for DNS SRV lookups.
///
-class QXmppServiceRecord
+class QXmppServiceInfo
{
public:
- QXmppServiceRecord();
-
- QString hostName() const;
- void setHostName(const QString &hostName);
+ /// \brief Represents a DNS SRV record
+ ///
+ class SrvRecord
+ {
+ public:
+ SrvRecord();
- quint16 port() const;
- void setPort(quint16 port);
+ QString hostName() const;
+ void setHostName(const QString &hostName);
-private:
- QString host_name;
- quint16 host_port;
-};
+ quint16 port() const;
+ void setPort(quint16 port);
-/// \brief The QXmppServiceInfo class provides static methods for DNS SRV lookups.
-///
+ private:
+ QString host_name;
+ quint16 host_port;
+ };
-class QXmppServiceInfo
-{
-public:
QString errorString() const;
- QList<QXmppServiceRecord> records() const;
+ QList<QXmppServiceInfo::SrvRecord> records() const;
static QXmppServiceInfo fromName(const QString &dname);
private:
QString m_errorString;
- QList<QXmppServiceRecord> m_records;
+ QList<QXmppServiceInfo::SrvRecord> m_records;
};
#endif