~osomon/oxide/ensure-files-exist

« back to all changes in this revision

Viewing changes to qt/quick/api/oxideqquickcookiemanager_p.h

  • Committer: Olivier Tilloy
  • Date: 2014-09-25 16:27:09 UTC
  • mfrom: (677.1.95 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20140925162709-h8bai0f1nfaf7cfy
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// vim:expandtab:shiftwidth=2:tabstop=2:
 
2
// Copyright (C) 2014 Canonical Ltd.
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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
 
17
 
 
18
#ifndef _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_
 
19
#define _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_
 
20
 
 
21
#include <QList>
 
22
#include <QObject>
 
23
#include <QNetworkCookie>
 
24
#include <QtGlobal>
 
25
#include <QVariant>
 
26
 
 
27
QT_BEGIN_NAMESPACE
 
28
class QUrl;
 
29
QT_END_NAMESPACE
 
30
 
 
31
class OxideQQuickCookieManagerPrivate;
 
32
class OxideQQuickWebContext;
 
33
 
 
34
class OxideQQuickCookieManager : public QObject {
 
35
  Q_OBJECT
 
36
 
 
37
  Q_ENUMS(RequestStatus)
 
38
 
 
39
  Q_DECLARE_PRIVATE(OxideQQuickCookieManager)
 
40
  Q_DISABLE_COPY(OxideQQuickCookieManager)
 
41
 
 
42
public:
 
43
  OxideQQuickCookieManager(OxideQQuickWebContext* webContext,
 
44
                           QObject* parent = NULL);
 
45
  virtual ~OxideQQuickCookieManager();
 
46
 
 
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();
 
52
 
 
53
  Q_INVOKABLE int deleteAllCookies();
 
54
 
 
55
Q_SIGNALS:
 
56
  void setCookiesResponse(int requestId, const QVariant& failedCookies);
 
57
  void getCookiesResponse(int requestId, const QVariant& cookies);
 
58
  void deleteCookiesResponse(int requestId, int numDeleted);
 
59
 
 
60
private:
 
61
  QScopedPointer<OxideQQuickCookieManagerPrivate> d_ptr;
 
62
};
 
63
 
 
64
#endif // _OXIDE_QT_QUICK_API_COOKIE_MANAGER_P_H_