QXmpp Version: 0.9.3
Loading...
Searching...
No Matches
QXmppConfiguration.h
1/*
2 * Copyright (C) 2008-2014 The QXmpp developers
3 *
4 * Author:
5 * Manjeet Dahiya
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24
25#ifndef QXMPPCONFIGURATION_H
26#define QXMPPCONFIGURATION_H
27
28#include <QString>
29#include <QSharedDataPointer>
30
31#include "QXmppGlobal.h"
32
33class QNetworkProxy;
34class QSslCertificate;
35class QXmppConfigurationPrivate;
36
47
48class QXMPP_EXPORT QXmppConfiguration
49{
50public:
55 {
56 TLSEnabled = 0,
58 TLSRequired,
60 LegacySSL
61 };
62
67 {
68 NonSASLPlain = 0,
69 NonSASLDigest
70 };
71
76
80 QXmppConfiguration& operator=(const QXmppConfiguration &other);
81
82 QString host() const;
83 void setHost(const QString&);
84
85 QString domain() const;
86 void setDomain(const QString&);
87
88 int port() const;
89 void setPort(int);
90
91 QString user() const;
92 void setUser(const QString&);
93
94 QString password() const;
95 void setPassword(const QString&);
96
97 QString resource() const;
98 void setResource(const QString&);
99
100 QString jid() const;
101 void setJid(const QString &jid);
102
103 QString jidBare() const;
104
105 QString facebookAccessToken() const;
106 void setFacebookAccessToken(const QString&);
107
108 QString facebookAppId() const;
109 void setFacebookAppId(const QString&);
110
111 QString googleAccessToken() const;
112 void setGoogleAccessToken(const QString &accessToken);
113
114 QString windowsLiveAccessToken() const;
115 void setWindowsLiveAccessToken(const QString &accessToken);
116
117 bool autoAcceptSubscriptions() const;
118 void setAutoAcceptSubscriptions(bool);
119
120 bool autoReconnectionEnabled() const;
121 void setAutoReconnectionEnabled(bool);
122
123 bool useSASLAuthentication() const;
124 void setUseSASLAuthentication(bool);
125
126 bool useNonSASLAuthentication() const;
127 void setUseNonSASLAuthentication(bool);
128
129 bool ignoreSslErrors() const;
130 void setIgnoreSslErrors(bool);
131
132 QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
133 void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
134
135 QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
136 void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
137
138 QString saslAuthMechanism() const;
139 void setSaslAuthMechanism(const QString &mechanism);
140
141 QNetworkProxy networkProxy() const;
142 void setNetworkProxy(const QNetworkProxy& proxy);
143
144 int keepAliveInterval() const;
145 void setKeepAliveInterval(int secs);
146
147 int keepAliveTimeout() const;
148 void setKeepAliveTimeout(int secs);
149
150 QList<QSslCertificate> caCertificates() const;
151 void setCaCertificates(const QList<QSslCertificate> &);
152
153private:
154 QSharedDataPointer<QXmppConfigurationPrivate> d;
155};
156
157#endif // QXMPPCONFIGURATION_H
The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:49
StreamSecurityMode
Definition: QXmppConfiguration.h:55
@ TLSDisabled
No encryption even if the server offers it.
Definition: QXmppConfiguration.h:57
NonSASLAuthMechanism
Definition: QXmppConfiguration.h:67