QXmpp  Version: 1.10.4
QXmppCredentials.h
1 // SPDX-FileCopyrightText: 2024 Linus Jahn <lnj@kaidan.im>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPCREDENTIALS_H
6 #define QXMPPCREDENTIALS_H
7 
8 #include "QXmppGlobal.h"
9 
10 #include <optional>
11 
12 #include <QSharedDataPointer>
13 
14 struct QXmppCredentialsPrivate;
15 class QXmlStreamReader;
16 class QXmlStreamWriter;
17 
18 class QXMPP_EXPORT QXmppCredentials
19 {
20 public:
22  QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppCredentials)
23 
24  static std::optional<QXmppCredentials> fromXml(QXmlStreamReader &);
25  void toXml(QXmlStreamWriter &) const;
26 
28  bool operator==(const QXmppCredentials &other) const;
30  bool operator!=(const QXmppCredentials &other) const = default;
31 
32 private:
33  friend class QXmppConfiguration;
34 
35  QSharedDataPointer<QXmppCredentialsPrivate> d;
36 };
37 
38 #endif // QXMPPCREDENTIALS_H
The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:36
Stores different kinds of credentials used for authentication.
Definition: QXmppCredentials.h:18