comparison 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
comparison
equal deleted inserted replaced
1508:86394eb9f5bb 1509:0586ed8897f1
1095 boost::mutex::scoped_lock lock(mutex_); 1095 boost::mutex::scoped_lock lock(mutex_);
1096 db_.GetAllPublicIds(target, resourceType); 1096 db_.GetAllPublicIds(target, resourceType);
1097 } 1097 }
1098 1098
1099 1099
1100 void ServerIndex::GetAllUuids(std::list<std::string>& target,
1101 ResourceType resourceType,
1102 size_t since,
1103 size_t limit)
1104 {
1105 if (limit == 0)
1106 {
1107 target.clear();
1108 return;
1109 }
1110
1111 boost::mutex::scoped_lock lock(mutex_);
1112 db_.GetAllPublicIds(target, resourceType, since, limit);
1113 }
1114
1115
1100 template <typename T> 1116 template <typename T>
1101 static void FormatLog(Json::Value& target, 1117 static void FormatLog(Json::Value& target,
1102 const std::list<T>& log, 1118 const std::list<T>& log,
1103 const std::string& name, 1119 const std::string& name,
1104 bool done, 1120 bool done,