1// qnetworkdiskcache.sip generated by MetaSIP
2//
3// This file is part of the QtNetwork Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QNetworkDiskCache : QAbstractNetworkCache
24{
25%TypeHeaderCode
26#include <qnetworkdiskcache.h>
27%End
28
29public:
30    explicit QNetworkDiskCache(QObject *parent /TransferThis/ = 0);
31    virtual ~QNetworkDiskCache();
32    QString cacheDirectory() const;
33    void setCacheDirectory(const QString &cacheDir);
34    qint64 maximumCacheSize() const;
35    void setMaximumCacheSize(qint64 size);
36    virtual qint64 cacheSize() const;
37    virtual QNetworkCacheMetaData metaData(const QUrl &url);
38    virtual void updateMetaData(const QNetworkCacheMetaData &metaData);
39    virtual QIODevice *data(const QUrl &url) /Factory/;
40    virtual bool remove(const QUrl &url);
41    virtual QIODevice *prepare(const QNetworkCacheMetaData &metaData);
42    virtual void insert(QIODevice *device);
43    QNetworkCacheMetaData fileMetaData(const QString &fileName) const;
44
45public slots:
46    virtual void clear();
47
48protected:
49    virtual qint64 expire();
50};
51