1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QAUTHENTICATOR_H |
5 | #define QAUTHENTICATOR_H |
6 | |
7 | #include <QtNetwork/qtnetworkglobal.h> |
8 | #include <QtCore/qstring.h> |
9 | #include <QtCore/qvariant.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | |
14 | class QAuthenticatorPrivate; |
15 | class QUrl; |
16 | |
17 | class Q_NETWORK_EXPORT QAuthenticator |
18 | { |
19 | Q_GADGET |
20 | public: |
21 | QAuthenticator(); |
22 | ~QAuthenticator(); |
23 | |
24 | QAuthenticator(const QAuthenticator &other); |
25 | QAuthenticator &operator=(const QAuthenticator &other); |
26 | |
27 | bool operator==(const QAuthenticator &other) const; |
28 | inline bool operator!=(const QAuthenticator &other) const { return !operator==(other); } |
29 | |
30 | QString user() const; |
31 | void setUser(const QString &user); |
32 | |
33 | QString password() const; |
34 | void setPassword(const QString &password); |
35 | |
36 | QString realm() const; |
37 | void setRealm(const QString &realm); |
38 | |
39 | QVariant option(const QString &opt) const; |
40 | QVariantHash options() const; |
41 | void setOption(const QString &opt, const QVariant &value); |
42 | |
43 | bool isNull() const; |
44 | void detach(); |
45 | private: |
46 | friend class QAuthenticatorPrivate; |
47 | QAuthenticatorPrivate *d; |
48 | }; |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif |
53 |