1
0
Fork 0
forked from len0rd/rockbox

Extend http class to allow retrieving of the server timestamp once a file has been downloaded.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17680 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-06-02 19:29:54 +00:00
parent 758072173e
commit 44bc9157ee
2 changed files with 7 additions and 1 deletions

View file

@ -45,6 +45,9 @@ HttpGet::HttpGet(QObject *parent)
setProxy(m_globalProxy);
m_usecache = false;
m_cachedir = m_globalCache;
m_serverTimestamp = QDateTime();
connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int)));
connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));

View file

@ -43,7 +43,10 @@ class HttpGet : public QObject
void setCache(bool);
int httpResponse(void);
QByteArray readAll(void);
bool isCached() { return m_cached; }
bool isCached()
{ return m_cached; }
QDateTime timestamp(void)
{ return m_serverTimestamp; }
void setDumbCache(bool b) //< disable checking of http header timestamp for caching
{ m_dumbCache = b; }
static void setGlobalCache(const QDir d) //< set global cache path