diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-13 17:00:58 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-13 17:00:58 +0000 |
| commit | 174735b46026f9aeb62ddede04f6c0be7fa2418f (patch) | |
| tree | f79171ef968327eab6b9103613bc130108e55ec3 /src/QXmppStreamFeatures.h | |
| parent | 0acf07023dca6b6d35c347cb28dce44a04363019 (diff) | |
| download | qxmpp-174735b46026f9aeb62ddede04f6c0be7fa2418f.tar.gz | |
add QXmppStreamFeatures
Diffstat (limited to 'src/QXmppStreamFeatures.h')
| -rw-r--r-- | src/QXmppStreamFeatures.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/QXmppStreamFeatures.h b/src/QXmppStreamFeatures.h new file mode 100644 index 00000000..b31ca450 --- /dev/null +++ b/src/QXmppStreamFeatures.h @@ -0,0 +1,59 @@ +/* + * 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 QXMPPSTREAMFEATURES_H +#define QXMPPSTREAMFEATURES_H + +#include "QXmppConfiguration.h" +#include "QXmppStanza.h" + +class QXmppStreamFeatures : public QXmppStanza +{ +public: + QXmppStreamFeatures(); + + bool isBindAvailable() const; + void setBindAvailable(bool available); + + bool isSessionAvailable() const; + void setSessionAvailable(bool available); + + QList<QXmppConfiguration::SASLAuthMechanism> authMechanisms() const; + void setAuthMechanisms(QList<QXmppConfiguration::SASLAuthMechanism> &mecanisms); + + QXmppConfiguration::StreamSecurityMode securityMode() const; + void setSecurityMode(QXmppConfiguration::StreamSecurityMode mode); + + /// \cond + void parse(const QDomElement &element); + void toXml(QXmlStreamWriter *writer) const; + /// \endcond + +private: + bool m_bindAvailable; + bool m_sessionAvailable; + QList<QXmppConfiguration::SASLAuthMechanism> m_authMechanisms; + QXmppConfiguration::StreamSecurityMode m_securityMode; +}; + +#endif |
