mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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:
parent
0877a1a9f5
commit
5ef236869f
12 changed files with 206 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue