qwebsecurityorigin.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _WEBSECURITYORIGIN_H_
00021 #define _WEBSECURITYORIGIN_H_
00022 
00023 #include <QtCore/qurl.h>
00024 #include <QtCore/qshareddata.h>
00025 
00026 #include "qwebkitglobal.h"
00027 
00028 namespace WebCore {
00029     class SecurityOrigin;
00030     class ChromeClientQt;
00031 }
00032 
00033 class QWebSecurityOriginPrivate;
00034 class QWebDatabase;
00035 class QWebFrame;
00036 
00037 class QWEBKIT_EXPORT QWebSecurityOrigin {
00038 public:
00039     static QList<QWebSecurityOrigin> allOrigins();
00040     static void addLocalScheme(const QString& scheme);
00041     static void removeLocalScheme(const QString& scheme);
00042     static QStringList localSchemes();
00043 
00044     ~QWebSecurityOrigin();
00045 
00046     QString scheme() const;
00047     QString host() const;
00048     int port() const;
00049 
00050     qint64 databaseUsage() const;
00051     qint64 databaseQuota() const;
00052 
00053     void setDatabaseQuota(qint64 quota);
00054 
00055     QList<QWebDatabase> databases() const;
00056 
00057     QWebSecurityOrigin(const QWebSecurityOrigin& other);
00058     QWebSecurityOrigin &operator=(const QWebSecurityOrigin& other);
00059 private:
00060     friend class QWebDatabase;
00061     friend class QWebFrame;
00062     friend class WebCore::ChromeClientQt;
00063     QWebSecurityOrigin(QWebSecurityOriginPrivate* priv);
00064 
00065 private:
00066     QExplicitlySharedDataPointer<QWebSecurityOriginPrivate> d;
00067 };
00068 
00069 #endif