Falkon Develop
Cross-platform Qt-based web browser
QmlCookies Class Reference

The class exposing Cookies API to QML. More...

#include <qmlcookies.h>

Inheritance diagram for QmlCookies:

Signals

void changed (const QVariantMap &map)
 The signal emitted when a cookie is added or removed. More...
 

Public Member Functions

 QmlCookies (QObject *parent=nullptr)
 
Q_INVOKABLE QmlCookieget (const QVariantMap &map)
 Get a cookie. More...
 
Q_INVOKABLE QList< QObject * > getAll (const QVariantMap &map)
 Get all cookies matching a criteria. More...
 
Q_INVOKABLE void set (const QVariantMap &map)
 Set a cookie. More...
 
Q_INVOKABLE void remove (const QVariantMap &map)
 Remove a cookie. More...
 

Detailed Description

The class exposing Cookies API to QML.

Definition at line 26 of file qmlcookies.h.

Constructor & Destructor Documentation

◆ QmlCookies()

QmlCookies::QmlCookies ( QObject *  parent = nullptr)
explicit

Definition at line 25 of file qmlcookies.cpp.

Member Function Documentation

◆ changed

void QmlCookies::changed ( const QVariantMap &  map)
signal

The signal emitted when a cookie is added or removed.

Parameters
AJavaScript object containing
  • cookie: Object of type QmlCookie, which is added or removed
  • removed: Bool representing if the cookie is removed

◆ get()

QmlCookie * QmlCookies::get ( const QVariantMap &  map)

Get a cookie.

Parameters
AJavaScript object containing
  • name: String representing the name of the cookie
  • url: String representing the url of the cookie
Returns
Cookie of type QmlCookie if such cookie exists, else null

Definition at line 62 of file qmlcookies.cpp.

◆ getAll()

QList< QObject * > QmlCookies::getAll ( const QVariantMap &  map)

Get all cookies matching a criteria.

Parameters
AJavaScript object containing
  • name: String representing the name of the cookie
  • url: String representing the url of the cookie
  • path: String representing the path of the cookie
  • secure: Bool representing if the cookie is secure
  • session: Bool representing if the cookie is a session cookie
Returns
List containing cookies, each of type QmlCookie

Definition at line 68 of file qmlcookies.cpp.

◆ remove()

void QmlCookies::remove ( const QVariantMap &  map)

Remove a cookie.

Parameters
AJavaScript object containing
  • name: String representing the name of the cookie
  • url: String representing the url of the cookie

Definition at line 110 of file qmlcookies.cpp.

◆ set()

void QmlCookies::set ( const QVariantMap &  map)

Set a cookie.

Parameters
AJavaScript object containing
  • name: String representing the name of the cookie
  • url: String representing the name of the cookie
  • path: String representing the path of the cookie
  • secure: Bool representing if the cookie is secure
  • expirationDate: A JavaScript Date object, representing the expiration date of the cookie
  • httpOnly: Bool representing if the cookie is httpOnly
  • value: String representing the value of the cookie

Definition at line 90 of file qmlcookies.cpp.


The documentation for this class was generated from the following files: