QXmpp Version:0.3.91

- Main Page
- Modules
- Classes
- Files

- File List

QXmppStreamFeatures.h

    00001 /*
    00002  * Copyright (C) 2008-2011 The QXmpp developers
    00003  *
    00004  * Author:
    00005  *  Jeremy Lainé
    00006  *
    00007  * Source:
    00008  *  http://code.google.com/p/qxmpp
    00009  *
    00010  * This file is a part of QXmpp library.
    00011  *
    00012  * This library is free software; you can redistribute it and/or
    00013  * modify it under the terms of the GNU Lesser General Public
    00014  * License as published by the Free Software Foundation; either
    00015  * version 2.1 of the License, or (at your option) any later version.
    00016  *
    00017  * This library is distributed in the hope that it will be useful,
    00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00020  * Lesser General Public License for more details.
    00021  *
    00022  */
    00023
    00024 #ifndef QXMPPSTREAMFEATURES_H
    00025 #define QXMPPSTREAMFEATURES_H
    00026
    00027 #include "QXmppConfiguration.h"
    00028 #include "QXmppStanza.h"
    00029
    00030 class QXmppStreamFeatures : public QXmppStanza
    00031 {
    00032 public:
    00033     QXmppStreamFeatures();
    00034
    00035     enum Mode
    00036     {
    00037         Disabled = 0,
    00038         Enabled,
    00039         Required
    00040     };
    00041
    00042     Mode bindMode() const;
    00043     void setBindMode(Mode mode);
    00044
    00045     Mode sessionMode() const;
    00046     void setSessionMode(Mode mode);
    00047
    00048     Mode nonSaslAuthMode() const;
    00049     void setNonSaslAuthMode(Mode mode);
    00050
    00051     QList<QXmppConfiguration::SASLAuthMechanism> authMechanisms() const;
    00052     void setAuthMechanisms(QList<QXmppConfiguration::SASLAuthMechanism> &mecanisms);
    00053
    00054     QList<QXmppConfiguration::CompressionMethod> compressionMethods() const;
    00055     void setCompressionMethods(QList<QXmppConfiguration::CompressionMethod> &methods);
    00056
    00057     Mode tlsMode() const;
    00058     void setTlsMode(Mode mode);
    00059
    00061     void parse(const QDomElement &element);
    00062     void toXml(QXmlStreamWriter *writer) const;
    00064
    00065     static bool isStreamFeatures(const QDomElement &element);
    00066
    00067 private:
    00068     Mode m_bindMode;
    00069     Mode m_sessionMode;
    00070     Mode m_nonSaslAuthMode;
    00071     Mode m_tlsMode;
    00072     QList<QXmppConfiguration::SASLAuthMechanism> m_authMechanisms;
    00073     QList<QXmppConfiguration::CompressionMethod> m_compressionMethods;
    00074 };
    00075
    00076 #endif

All Classes Functions Enumerations Enumerator Properties