Falkon Develop
Cross-platform Qt-based web browser
qmlcookie.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2018 Anmol Gautam <tarptaeya@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#pragma once
19
20#include <QObject>
21#include <QDateTime>
22#include <QNetworkCookie>
23
27class QmlCookie : public QObject
28{
29 Q_OBJECT
30
34 Q_PROPERTY(QString domain READ domain CONSTANT)
35
36
39 Q_PROPERTY(QDateTime expirationDate READ expirationDate CONSTANT)
40
41
44 Q_PROPERTY(QString name READ name CONSTANT)
45
46
49 Q_PROPERTY(QString path READ path CONSTANT)
50
51
54 Q_PROPERTY(bool secure READ secure CONSTANT)
55
56
59 Q_PROPERTY(bool session READ session CONSTANT)
60
61
64 Q_PROPERTY(QString value READ value CONSTANT)
65public:
66 explicit QmlCookie(QNetworkCookie *cookie, QObject *parent = nullptr);
67
68private:
69 QNetworkCookie *m_cookie = nullptr;
70
71 QString domain() const;
72 QDateTime expirationDate() const;
73 QString name() const;
74 QString path() const;
75 bool secure() const;
76 bool session() const;
77 QString value() const;
78};
79
Q_DECLARE_METATYPE(FlashCookie)