Implement download caching. Set the folder for the cache data in the configuration dialog. Caching is disabled per default and defaults to the systems temp folder.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14476 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2007-08-27 17:40:35 +00:00
parent 0877a1a9f5
commit 5ef236869f
12 changed files with 206 additions and 19 deletions

View file

@ -21,8 +21,8 @@
#ifndef HTTPGET_H
#define HTTPGET_H
#include <QFile>
#include <QHttp>
#include <QtCore>
#include <QtNetwork>
class QUrl;
@ -38,8 +38,11 @@ class HttpGet : public QObject
QHttp::Error error(void);
QString errorString(void);
void setFile(QFile*);
void setCache(QDir);
void setCache(bool);
int httpResponse(void);
QByteArray readAll(void);
bool isCached() { return cached; }
public slots:
void abort(void);
@ -65,6 +68,10 @@ class HttpGet : public QObject
QByteArray dataBuffer;
bool outputToBuffer;
QString query;
bool m_usecache;
QDir m_cachedir;
QString cachefile;
bool cached;
};
#endif