QXmpp  Version:0.9.3
QXmppConfiguration.h
00001 /*
00002  * Copyright (C) 2008-2014 The QXmpp developers
00003  *
00004  * Author:
00005  *  Manjeet Dahiya
00006  *
00007  * Source:
00008  *  https://github.com/qxmpp-project/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 <QSharedDataPointer>
00030 
00031 #include "QXmppGlobal.h"
00032 
00033 class QNetworkProxy;
00034 class QSslCertificate;
00035 class QXmppConfigurationPrivate;
00036 
00047 
00048 class QXMPP_EXPORT QXmppConfiguration
00049 {
00050 public:
00054     enum StreamSecurityMode
00055     {
00056         TLSEnabled = 0, 
00057         TLSDisabled,    
00058         TLSRequired,    
00059 
00060         LegacySSL       
00061     };
00062 
00066     enum NonSASLAuthMechanism
00067     {
00068         NonSASLPlain = 0,
00069         NonSASLDigest    
00070     };
00071 
00076 
00077     QXmppConfiguration();
00078     QXmppConfiguration(const QXmppConfiguration &other);
00079     ~QXmppConfiguration();
00080     QXmppConfiguration& operator=(const QXmppConfiguration &other);
00081 
00082     QString host() const;
00083     void setHost(const QString&);
00084 
00085     QString domain() const;
00086     void setDomain(const QString&);
00087 
00088     int port() const;
00089     void setPort(int);
00090 
00091     QString user() const;
00092     void setUser(const QString&);
00093 
00094     QString password() const;
00095     void setPassword(const QString&);
00096 
00097     QString resource() const;
00098     void setResource(const QString&);
00099 
00100     QString jid() const;
00101     void setJid(const QString &jid);
00102 
00103     QString jidBare() const;
00104 
00105     QString facebookAccessToken() const;
00106     void setFacebookAccessToken(const QString&);
00107 
00108     QString facebookAppId() const;
00109     void setFacebookAppId(const QString&);
00110 
00111     QString googleAccessToken() const;
00112     void setGoogleAccessToken(const QString &accessToken);
00113 
00114     QString windowsLiveAccessToken() const;
00115     void setWindowsLiveAccessToken(const QString &accessToken);
00116 
00117     bool autoAcceptSubscriptions() const;
00118     void setAutoAcceptSubscriptions(bool);
00119 
00120     bool autoReconnectionEnabled() const;
00121     void setAutoReconnectionEnabled(bool);
00122 
00123     bool useSASLAuthentication() const;
00124     void setUseSASLAuthentication(bool);
00125 
00126     bool useNonSASLAuthentication() const;
00127     void setUseNonSASLAuthentication(bool);
00128 
00129     bool ignoreSslErrors() const;
00130     void setIgnoreSslErrors(bool);
00131 
00132     QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
00133     void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
00134 
00135     QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
00136     void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
00137 
00138     QString saslAuthMechanism() const;
00139     void setSaslAuthMechanism(const QString &mechanism);
00140 
00141     QNetworkProxy networkProxy() const;
00142     void setNetworkProxy(const QNetworkProxy& proxy);
00143 
00144     int keepAliveInterval() const;
00145     void setKeepAliveInterval(int secs);
00146 
00147     int keepAliveTimeout() const;
00148     void setKeepAliveTimeout(int secs);
00149 
00150     QList<QSslCertificate> caCertificates() const;
00151     void setCaCertificates(const QList<QSslCertificate> &);
00152 
00153 private:
00154     QSharedDataPointer<QXmppConfigurationPrivate> d;
00155 };
00156 
00157 #endif // QXMPPCONFIGURATION_H
 All Classes Functions Enumerations Enumerator Properties