22
22
#include "cookie-store.h"
24
#include <QSqlDatabase>
26
28
class ChromeCookieStore : public CookieStore
31
Q_ENUMS(RequestStatus)
33
Q_PROPERTY(QUrl homepage READ homepage WRITE setHomepage NOTIFY homepageChanged)
29
34
Q_PROPERTY(QString dbPath READ dbPath WRITE setDbPath NOTIFY dbPathChanged)
35
Q_PROPERTY(QObject* oxideStoreBackend READ oxideStoreBackend WRITE setOxideStoreBackend NOTIFY oxideStoreBackendChanged)
39
// Possibly not the best way to do it, but mimics some oxide public API
40
// definition in order to make the type known to the QML type system so
41
// that the QObject can be called by string.
45
RequestStatusInternalFailure,
32
48
ChromeCookieStore(QObject* parent = 0);
34
51
void setDbPath(const QString& path);
35
52
QString dbPath() const;
55
void setHomepage(const QUrl& path);
56
QUrl homepage() const;
59
void setOxideStoreBackend(QObject* backend);
60
QObject* oxideStoreBackend() const;
62
// CookieStore overrides
37
63
QDateTime lastUpdateTimeStamp() const Q_DECL_OVERRIDE;
40
66
void dbPathChanged();
43
virtual Cookies doGetCookies() Q_DECL_OVERRIDE;
44
virtual bool doSetCookies(const Cookies& cookies) Q_DECL_OVERRIDE;
67
void oxideStoreBackendChanged();
68
void homepageChanged();
71
void oxideCookiesReceived(int requestId, const QVariant& cookies, RequestStatus status);
72
void oxideCookiesUpdated(int requestId, RequestStatus status);
75
virtual void doGetCookies() Q_DECL_OVERRIDE;
76
virtual void doSetCookies(const Cookies& cookies) Q_DECL_OVERRIDE;
53
84
#endif // CHROME_COOKIE_STORE_H