QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppConfiguration.h
1// SPDX-FileCopyrightText: 2009 Manjeet Dahiya <manjeetdahiya@gmail.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPCONFIGURATION_H
6#define QXMPPCONFIGURATION_H
7
8#include "QXmppGlobal.h"
9
10#include <QSharedDataPointer>
11#include <QString>
12
13class QNetworkProxy;
14class QSslCertificate;
15class QXmppConfigurationPrivate;
16
27
28class QXMPP_EXPORT QXmppConfiguration
29{
30public:
35 TLSEnabled = 0,
37 TLSRequired,
39 LegacySSL
40 };
41
46 NonSASLPlain = 0,
47 NonSASLDigest
48 };
49
54
58 QXmppConfiguration &operator=(const QXmppConfiguration &other);
59
60 QString host() const;
61 void setHost(const QString &);
62
63 QString domain() const;
64 void setDomain(const QString &);
65
66 int port() const;
67 void setPort(int);
68
69 QString user() const;
70 void setUser(const QString &);
71
72 QString password() const;
73 void setPassword(const QString &);
74
75 QString resource() const;
76 void setResource(const QString &);
77
78 QString jid() const;
79 void setJid(const QString &jid);
80
81 QString jidBare() const;
82
83 QString facebookAccessToken() const;
84 void setFacebookAccessToken(const QString &);
85
86 QString facebookAppId() const;
87 void setFacebookAppId(const QString &);
88
89 QString googleAccessToken() const;
90 void setGoogleAccessToken(const QString &accessToken);
91
92 QString windowsLiveAccessToken() const;
93 void setWindowsLiveAccessToken(const QString &accessToken);
94
95 bool autoAcceptSubscriptions() const;
96 void setAutoAcceptSubscriptions(bool);
97
98 bool autoReconnectionEnabled() const;
99 void setAutoReconnectionEnabled(bool);
100
101 bool useSASLAuthentication() const;
102 void setUseSASLAuthentication(bool);
103
104 bool useNonSASLAuthentication() const;
105 void setUseNonSASLAuthentication(bool);
106
107 bool ignoreSslErrors() const;
108 void setIgnoreSslErrors(bool);
109
110 QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
111 void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
112
113 QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
114 void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
115
116 QString saslAuthMechanism() const;
117 void setSaslAuthMechanism(const QString &mechanism);
118
119 QNetworkProxy networkProxy() const;
120 void setNetworkProxy(const QNetworkProxy &proxy);
121
122 int keepAliveInterval() const;
123 void setKeepAliveInterval(int secs);
124
125 int keepAliveTimeout() const;
126 void setKeepAliveTimeout(int secs);
127
128 QList<QSslCertificate> caCertificates() const;
129 void setCaCertificates(const QList<QSslCertificate> &);
130
131private:
132 QSharedDataPointer<QXmppConfigurationPrivate> d;
133};
134
135#endif // QXMPPCONFIGURATION_H
The QXmppConfiguration class holds configuration options.
Definition QXmppConfiguration.h:29
StreamSecurityMode
Definition QXmppConfiguration.h:34
@ TLSDisabled
No encryption even if the server offers it.
Definition QXmppConfiguration.h:36
NonSASLAuthMechanism
Definition QXmppConfiguration.h:45