diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-01 12:57:59 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-01 12:57:59 +0000 |
| commit | 7928a07468cf277ea5519a386728eca1b19c1eff (patch) | |
| tree | 303320114139ea731df2cd0e97a367f0527fb601 /src/QXmppSrvLookup.h | |
| parent | 01017e2ca66be42fc2933ec4bc8d388b9d4a85f2 (diff) | |
| download | qxmpp-7928a07468cf277ea5519a386728eca1b19c1eff.tar.gz | |
change className
Diffstat (limited to 'src/QXmppSrvLookup.h')
| -rw-r--r-- | src/QXmppSrvLookup.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/QXmppSrvLookup.h b/src/QXmppSrvLookup.h new file mode 100644 index 00000000..3e4d98d6 --- /dev/null +++ b/src/QXmppSrvLookup.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * Author: + * Jeremy Lainé + * + * Source: + * http://code.google.com/p/qxmpp + * + * This file is a part of QXmpp library. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + */ + +#ifndef QXMPPSRVLOOKUP_H +#define QXMPPSRVLOOKUP_H + +#include <QList> +#include <QString> + +/// \brief The QXmppSrvLookup class provides static methods for DNS SRV lookups. +/// + +class QXmppSrvLookup +{ +public: + /// \brief Represents a DNS SRV record + /// + class SrvRecord + { + public: + SrvRecord(); + + QString hostName() const; + void setHostName(const QString &hostName); + + quint16 port() const; + void setPort(quint16 port); + + private: + QString host_name; + quint16 host_port; + }; + + QString errorString() const; + QList<QXmppSrvLookup::SrvRecord> records() const; + + static QXmppSrvLookup fromName(const QString &dname); + +private: + QString m_errorString; + QList<QXmppSrvLookup::SrvRecord> m_records; +}; + +#endif |
