QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppConfiguration.h
1/*
2 * Copyright (C) 2008-2021 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#ifndef QXMPPCONFIGURATION_H
25#define QXMPPCONFIGURATION_H
26
27#include "QXmppGlobal.h"
28
29#include <QSharedDataPointer>
30#include <QString>
31
32class QNetworkProxy;
33class QSslCertificate;
34class QXmppConfigurationPrivate;
35
46
47class QXMPP_EXPORT QXmppConfiguration
48{
49public:
54 TLSEnabled = 0,
56 TLSRequired,
58 LegacySSL
59 };
60
65 NonSASLPlain = 0,
66 NonSASLDigest
67 };
68
73
77 QXmppConfiguration &operator=(const QXmppConfiguration &other);
78
79 QString host() const;
80 void setHost(const QString &);
81
82 QString domain() const;
83 void setDomain(const QString &);
84
85 int port() const;
86 void setPort(int);
87
88 QString user() const;
89 void setUser(const QString &);
90
91 QString password() const;
92 void setPassword(const QString &);
93
94 QString resource() const;
95 void setResource(const QString &);
96
97 QString jid() const;
98 void setJid(const QString &jid);
99
100 QString jidBare() const;
101
102 QString facebookAccessToken() const;
103 void setFacebookAccessToken(const QString &);
104
105 QString facebookAppId() const;
106 void setFacebookAppId(const QString &);
107
108 QString googleAccessToken() const;
109 void setGoogleAccessToken(const QString &accessToken);
110
111 QString windowsLiveAccessToken() const;
112 void setWindowsLiveAccessToken(const QString &accessToken);
113
114 bool autoAcceptSubscriptions() const;
115 void setAutoAcceptSubscriptions(bool);
116
117 bool autoReconnectionEnabled() const;
118 void setAutoReconnectionEnabled(bool);
119
120 bool useSASLAuthentication() const;
121 void setUseSASLAuthentication(bool);
122
123 bool useNonSASLAuthentication() const;
124 void setUseNonSASLAuthentication(bool);
125
126 bool ignoreSslErrors() const;
127 void setIgnoreSslErrors(bool);
128
129 QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
130 void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
131
132 QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
133 void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
134
135 QString saslAuthMechanism() const;
136 void setSaslAuthMechanism(const QString &mechanism);
137
138 QNetworkProxy networkProxy() const;
139 void setNetworkProxy(const QNetworkProxy &proxy);
140
141 int keepAliveInterval() const;
142 void setKeepAliveInterval(int secs);
143
144 int keepAliveTimeout() const;
145 void setKeepAliveTimeout(int secs);
146
147 QList<QSslCertificate> caCertificates() const;
148 void setCaCertificates(const QList<QSslCertificate> &);
149
150private:
151 QSharedDataPointer<QXmppConfigurationPrivate> d;
152};
153
154#endif // QXMPPCONFIGURATION_H
The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:48
StreamSecurityMode
Definition: QXmppConfiguration.h:53
@ TLSDisabled
No encryption even if the server offers it.
Definition: QXmppConfiguration.h:55
NonSASLAuthMechanism
Definition: QXmppConfiguration.h:64