QXmpp Version:0.3.91

- Main Page
- Modules
- Classes
- Files

- File List

QXmppConfiguration.h

    00001 /*
    00002  * Copyright (C) 2008-2011 The QXmpp developers
    00003  *
    00004  * Author:
    00005  *  Manjeet Dahiya
    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
    00025 #ifndef QXMPPCONFIGURATION_H
    00026 #define QXMPPCONFIGURATION_H
    00027
    00028 #include <QString>
    00029 #include <QNetworkProxy>
    00030 #include <QSslCertificate>
    00031
    00042
    00043 class QXmppConfiguration
    00044 {
    00045 public:
    00049     enum StreamSecurityMode
    00050     {
    00051         TLSEnabled = 0,
    00052         TLSDisabled,
    00053         TLSRequired
    00054
    00055     };
    00056
    00060     enum NonSASLAuthMechanism
    00061     {
    00062         NonSASLPlain = 0,
    00063         NonSASLDigest
    00064     };
    00065
    00070     enum SASLAuthMechanism
    00071     {
    00072         SASLPlain = 0,
    00073         SASLDigestMD5,
    00074         SASLAnonymous,
    00075         SASLXFacebookPlatform,
    00076     };
    00077
    00079     enum CompressionMethod
    00080     {
    00081         ZlibCompression = 0
    00082     };
    00083
    00084     QXmppConfiguration();
    00085     ~QXmppConfiguration();
    00086
    00087     QString host() const;
    00088     void setHost(const QString&);
    00089
    00090     QString domain() const;
    00091     void setDomain(const QString&);
    00092
    00093     int port() const;
    00094     void setPort(int);
    00095
    00096     QString user() const;
    00097     void setUser(const QString&);
    00098
    00099     QString password() const;
    00100     void setPassword(const QString&);
    00101
    00102     QString resource() const;
    00103     void setResource(const QString&);
    00104
    00105     QString jid() const;
    00106     void setJid(const QString &jid);
    00107
    00108     QString jidBare() const;
    00109
    00110     QString facebookAccessToken() const;
    00111     void setFacebookAccessToken(const QString&);
    00112
    00113     QString facebookAppId() const;
    00114     void setFacebookAppId(const QString&);
    00115
    00116     bool autoAcceptSubscriptions() const;
    00117     void setAutoAcceptSubscriptions(bool);
    00118
    00119     bool autoReconnectionEnabled() const;
    00120     void setAutoReconnectionEnabled(bool);
    00121
    00122     bool useSASLAuthentication() const;
    00123     void setUseSASLAuthentication(bool);
    00124
    00125     bool ignoreSslErrors() const;
    00126     void setIgnoreSslErrors(bool);
    00127
    00128     QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
    00129     void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
    00130
    00131     QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
    00132     void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
    00133
    00134     QXmppConfiguration::SASLAuthMechanism sASLAuthMechanism() const;
    00135     void setSASLAuthMechanism(QXmppConfiguration::SASLAuthMechanism);
    00136
    00137     QNetworkProxy networkProxy() const;
    00138     void setNetworkProxy(const QNetworkProxy& proxy);
    00139
    00140     int keepAliveInterval() const;
    00141     void setKeepAliveInterval(int secs);
    00142
    00143     int keepAliveTimeout() const;
    00144     void setKeepAliveTimeout(int secs);
    00145
    00146     QList<QSslCertificate> caCertificates() const;
    00147     void setCaCertificates(const QList<QSslCertificate> &);
    00148
    00149 private:
    00150     QString m_host;
    00151     int m_port;
    00152     QString m_user;
    00153     QString m_password;
    00154     QString m_domain;
    00155     QString m_resource;
    00156
    00157     // Facebook
    00158     QString m_facebookAccessToken;
    00159     QString m_facebookAppId;
    00160
    00161     // default is false
    00162     bool m_autoAcceptSubscriptions;
    00163     // default is true
    00164     bool m_sendIntialPresence;
    00165     // default is true
    00166     bool m_sendRosterRequest;
    00167     // interval in seconds, if zero won't ping
    00168     int m_keepAliveInterval;
    00169     // interval in seconds, if zero won't timeout
    00170     int m_keepAliveTimeout;
    00171     // will keep reconnecting if disconnected, default is true
    00172     bool m_autoReconnectionEnabled;
    00173     bool m_useSASLAuthentication;
    00174
    00175
    00176
    00177     // default is true
    00178     bool m_ignoreSslErrors;
    00179
    00180     StreamSecurityMode m_streamSecurityMode;
    00181     NonSASLAuthMechanism m_nonSASLAuthMechanism;
    00182     SASLAuthMechanism m_SASLAuthMechanism;
    00183
    00184     QNetworkProxy m_networkProxy;
    00185
    00186     QList<QSslCertificate> m_caCertificates;
    00187 };
    00188
    00189 #endif // QXMPPCONFIGURATION_H

All Classes Functions Enumerations Enumerator Properties