Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.cpp @ 1509:0586ed8897f1
limit and since arguments while retrieving DICOM resources in the REST API
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Aug 2015 10:01:59 +0200 |
parents | f967bdf8534e |
children | d6a93e12b1c1 |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp Fri Aug 07 20:14:49 2015 +0200 +++ b/OrthancServer/ServerIndex.cpp Mon Aug 10 10:01:59 2015 +0200 @@ -1097,6 +1097,22 @@ } + void ServerIndex::GetAllUuids(std::list<std::string>& target, + ResourceType resourceType, + size_t since, + size_t limit) + { + if (limit == 0) + { + target.clear(); + return; + } + + boost::mutex::scoped_lock lock(mutex_); + db_.GetAllPublicIds(target, resourceType, since, limit); + } + + template <typename T> static void FormatLog(Json::Value& target, const std::list<T>& log,