1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
// Copyright (C) 2014 Canonical Ltd.
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License, or (at your option) any later version.
9
// This library is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// Lesser General Public License for more details.
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this library; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
#ifndef _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_
19
#define _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_
23
#include <QNetworkCookie>
31
class OxideQQuickCookieManagerPrivate;
32
class OxideQQuickWebContext;
34
class OxideQQuickCookieManager : public QObject {
37
Q_ENUMS(RequestStatus)
39
Q_DECLARE_PRIVATE(OxideQQuickCookieManager)
40
Q_DISABLE_COPY(OxideQQuickCookieManager)
43
OxideQQuickCookieManager(OxideQQuickWebContext* webContext,
44
QObject* parent = NULL);
45
virtual ~OxideQQuickCookieManager();
47
Q_INVOKABLE int setCookies(const QUrl& url, const QVariant& cookies);
48
Q_INVOKABLE int setNetworkCookies(const QUrl& url,
49
const QList<QNetworkCookie>& cookies);
50
Q_INVOKABLE int getCookies(const QUrl& url);
51
Q_INVOKABLE int getAllCookies();
53
Q_INVOKABLE int deleteAllCookies();
56
void setCookiesResponse(int requestId, const QVariant& failedCookies);
57
void getCookiesResponse(int requestId, const QVariant& cookies);
58
void deleteCookiesResponse(int requestId, int numDeleted);
61
QScopedPointer<OxideQQuickCookieManagerPrivate> d_ptr;
64
#endif // _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_