Mercurial > hg > svcore
diff data/fileio/RemoteFile.h @ 304:4fc6f49436b3
* Add support for remote files to image layer
author | Chris Cannam |
---|---|
date | Fri, 05 Oct 2007 15:52:52 +0000 |
parents | ce6f65ab3327 |
children | 96ef9746c560 |
line wrap: on
line diff
--- a/data/fileio/RemoteFile.h Fri Oct 05 13:26:47 2007 +0000 +++ b/data/fileio/RemoteFile.h Fri Oct 05 15:52:52 2007 +0000 @@ -21,6 +21,8 @@ #include <QString> #include <QTimer> +#include <map> + class QFtp; class QHttp; class QFile; @@ -47,6 +49,7 @@ void deleteLocalFile(); + static bool isRemote(QString fileOrUrl); static bool canHandleScheme(QUrl url); signals: @@ -63,6 +66,7 @@ void cancelled(); protected: + QUrl m_url; QFtp *m_ftp; QHttp *m_http; QFile *m_localFile; @@ -74,6 +78,13 @@ QProgressDialog *m_progressDialog; QTimer m_progressShowTimer; + typedef std::map<QUrl, int> RemoteRefCountMap; + typedef std::map<QUrl, QString> RemoteLocalMap; + static RemoteRefCountMap m_refCountMap; + static RemoteLocalMap m_remoteLocalMap; + static QMutex m_mapMutex; + bool m_referenced; + void cleanup(); QString createLocalFile(QUrl url);