Mercurial > hg > orthanc-webviewer
diff Plugin/Cache/CacheManager.cpp @ 23:7a0af291cc90
Synchronization with Orthanc mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 01 Jun 2015 11:52:28 +0200 |
parents | 02f7a0400a91 |
children | a6492d20b2a8 |
line wrap: on
line diff
--- a/Plugin/Cache/CacheManager.cpp Fri May 29 11:07:38 2015 +0200 +++ b/Plugin/Cache/CacheManager.cpp Mon Jun 01 11:52:28 2015 +0200 @@ -226,7 +226,7 @@ for (std::list<std::string>::const_iterator it = toRemove.begin(); it != toRemove.end(); it++) { - pimpl_->storage_.Remove(*it); + pimpl_->storage_.Remove(*it, Orthanc::FileContentType_Unknown); } pimpl_->bundles_[bundleIndex] = bundle; @@ -339,7 +339,7 @@ // Store the cached content on the disk const char* data = content.size() ? &content[0] : NULL; std::string uuid = Toolbox::GenerateUuid(); - pimpl_->storage_.Create(uuid, data, content.size()); + pimpl_->storage_.Create(uuid, data, content.size(), Orthanc::FileContentType_Unknown); bool ok = true; @@ -378,7 +378,7 @@ if (!ok) { // Error: Remove the stored file - pimpl_->storage_.Remove(uuid); + pimpl_->storage_.Remove(uuid, Orthanc::FileContentType_Unknown); } else { @@ -389,7 +389,7 @@ for (std::list<std::string>::const_iterator it = toRemove.begin(); it != toRemove.end(); it++) { - pimpl_->storage_.Remove(*it); + pimpl_->storage_.Remove(*it, Orthanc::FileContentType_Unknown); } } @@ -466,7 +466,7 @@ bool ok; try { - pimpl_->storage_.Read(content, uuid); + pimpl_->storage_.Read(content, uuid, Orthanc::FileContentType_Unknown); ok = (content.size() == size); } catch (std::runtime_error&) @@ -512,7 +512,7 @@ { transaction->Commit(); pimpl_->bundles_[bundleIndex] = bundle; - pimpl_->storage_.Remove(uuid); + pimpl_->storage_.Remove(uuid, Orthanc::FileContentType_Unknown); } } } @@ -558,7 +558,7 @@ SQLite::Statement s(pimpl_->db_, SQLITE_FROM_HERE, "SELECT fileUuid FROM Cache"); while (s.Step()) { - pimpl_->storage_.Remove(s.ColumnString(0)); + pimpl_->storage_.Remove(s.ColumnString(0), Orthanc::FileContentType_Unknown); } SQLite::Statement t(pimpl_->db_, SQLITE_FROM_HERE, "DELETE FROM Cache"); @@ -579,7 +579,7 @@ s.BindInt(0, bundle); while (s.Step()) { - pimpl_->storage_.Remove(s.ColumnString(0)); + pimpl_->storage_.Remove(s.ColumnString(0), Orthanc::FileContentType_Unknown); } SQLite::Statement t(pimpl_->db_, SQLITE_FROM_HERE, "DELETE FROM Cache WHERE bundle=?");