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:
parent
758072173e
commit
44bc9157ee
2 changed files with 7 additions and 1 deletions
|
|
@ -45,6 +45,9 @@ HttpGet::HttpGet(QObject *parent)
|
||||||
setProxy(m_globalProxy);
|
setProxy(m_globalProxy);
|
||||||
m_usecache = false;
|
m_usecache = false;
|
||||||
m_cachedir = m_globalCache;
|
m_cachedir = m_globalCache;
|
||||||
|
|
||||||
|
m_serverTimestamp = QDateTime();
|
||||||
|
|
||||||
connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
|
connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
|
||||||
connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int)));
|
connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int)));
|
||||||
connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));
|
connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,10 @@ class HttpGet : public QObject
|
||||||
void setCache(bool);
|
void setCache(bool);
|
||||||
int httpResponse(void);
|
int httpResponse(void);
|
||||||
QByteArray readAll(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
|
void setDumbCache(bool b) //< disable checking of http header timestamp for caching
|
||||||
{ m_dumbCache = b; }
|
{ m_dumbCache = b; }
|
||||||
static void setGlobalCache(const QDir d) //< set global cache path
|
static void setGlobalCache(const QDir d) //< set global cache path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue