Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnetworkcookiejar.h
Go to the documentation of this file.
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 QNETWORKCOOKIEJAR_H
5#define QNETWORKCOOKIEJAR_H
6
7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtCore/QObject>
9#include <QtCore/QUrl>
10
12
13
14class QNetworkCookie;
15
17class Q_NETWORK_EXPORT QNetworkCookieJar: public QObject
18{
20public:
21 explicit QNetworkCookieJar(QObject *parent = nullptr);
22 virtual ~QNetworkCookieJar();
23
24 virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
25 virtual bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
26
27 virtual bool insertCookie(const QNetworkCookie &cookie);
28 virtual bool updateCookie(const QNetworkCookie &cookie);
29 virtual bool deleteCookie(const QNetworkCookie &cookie);
30
31protected:
32 QList<QNetworkCookie> allCookies() const;
33 void setAllCookies(const QList<QNetworkCookie> &cookieList);
34 virtual bool validateCookie(const QNetworkCookie &cookie, const QUrl &url) const;
35
36private:
37 Q_DECLARE_PRIVATE(QNetworkCookieJar)
38 Q_DISABLE_COPY(QNetworkCookieJar)
39};
40
42
43#endif
The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects.
The QNetworkCookie class holds one network cookie.
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
#define Q_OBJECT
QUrl url("example.com")
[constructor-url-reference]