QWebSecurityOrigin Class Reference |
QWebSecurityOrigin ( const QWebSecurityOrigin & other ) | |
~QWebSecurityOrigin () | |
qint64 | databaseQuota () const |
qint64 | databaseUsage () const |
QList<QWebDatabase> | databases () const |
QString | host () const |
int | port () const |
QString | scheme () const |
void | setDatabaseQuota ( qint64 quota ) |
QWebSecurityOrigin & | operator= ( const QWebSecurityOrigin & other ) |
void | addLocalScheme ( const QString & scheme ) |
QList<QWebSecurityOrigin> | allOrigins () |
QStringList | localSchemes () |
void | removeLocalScheme ( const QString & scheme ) |
The QWebSecurityOrigin class defines a security boundary for web sites.
QWebSecurityOrigin provides access to the security domains defined by web sites. An origin consists of a host name, a scheme, and a port number. Web sites with the same security origin can access each other's resources for client-side scripting or databases.
For example the site http://www.example.com/my/page.html is allowed to share the same database as http://www.example.com/my/overview.html, or access each other's documents when used in HTML frame sets and JavaScript. At the same time it prevents http://www.malicious.com/evil.html from accessing http://www.example.com/'s resources, because they are of a different security origin.
Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a web page, and use host(), scheme() and port() to identify the security origin.
Use databases() to access the databases defined within a security origin. The disk usage of the origin's databases can be limited with setDatabaseQuota(). databaseQuota() and databaseUsage() report the current limit as well as the current usage.
For more information refer to the "Same origin policy" Wikipedia Article.
See also QWebFrame::securityOrigin().
Constructs a security origin from other.
Destroys the security origin.
Adds the given scheme to the list of schemes that are considered equivalent to the file: scheme. They are not subject to cross domain restrictions.
This function was introduced in Qt 4.6.
Returns a list of all security origins with a database quota defined.
Returns the quota for the databases in the security origin.
See also setDatabaseQuota().
Returns the number of bytes all databases in the security origin use on the disk.
Returns a list of all databases defined in the security origin.
Returns the host name defining the security origin.
Returns a list of all the schemes that were set by the application as local schemes,
This function was introduced in Qt 4.6.
See also addLocalScheme() and removeLocalScheme().
Returns the port number defining the security origin.
Removes the given scheme from the list of local schemes.
This function was introduced in Qt 4.6.
See also addLocalScheme().
Returns the scheme defining the security origin.
Sets the quota for the databases in the security origin to quota bytes.
If the quota is set to a value less than the current usage, the quota will remain and no data will be purged to meet the new quota. However, no new data can be added to databases in this origin.
See also databaseQuota().
Assigns the other security origin to this.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com