comparison OrthancServer/Sources/ServerIndex.h @ 4558:2f4d7ec9b993 db-changes

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Mar 2021 16:58:35 +0100
parents 456ed3fcff81
children 19b1921aee06
comparison
equal deleted inserted replaced
4557:b6d4b735eb4d 4558:2f4d7ec9b993
153 bool hasTransferSyntax, 153 bool hasTransferSyntax,
154 DicomTransferSyntax transferSyntax, 154 DicomTransferSyntax transferSyntax,
155 bool hasPixelDataOffset, 155 bool hasPixelDataOffset,
156 uint64_t pixelDataOffset); 156 uint64_t pixelDataOffset);
157 157
158 void GetGlobalStatistics(/* out */ uint64_t& diskSize,
159 /* out */ uint64_t& uncompressedSize,
160 /* out */ uint64_t& countPatients,
161 /* out */ uint64_t& countStudies,
162 /* out */ uint64_t& countSeries,
163 /* out */ uint64_t& countInstances);
164
165 bool DeleteResource(Json::Value& target /* out */, 158 bool DeleteResource(Json::Value& target /* out */,
166 const std::string& uuid, 159 const std::string& uuid,
167 ResourceType expectedType); 160 ResourceType expectedType);
168 161
169 void GetChanges(Json::Value& target,
170 int64_t since,
171 unsigned int maxResults);
172
173 void GetLastChange(Json::Value& target);
174
175 void LogExportedResource(const std::string& publicId, 162 void LogExportedResource(const std::string& publicId,
176 const std::string& remoteModality); 163 const std::string& remoteModality);
177
178 void GetExportedResources(Json::Value& target,
179 int64_t since,
180 unsigned int maxResults);
181
182 void GetLastExportedResource(Json::Value& target);
183 164
184 bool IsProtectedPatient(const std::string& publicId); 165 bool IsProtectedPatient(const std::string& publicId);
185 166
186 void SetProtectedPatient(const std::string& publicId, 167 void SetProtectedPatient(const std::string& publicId,
187 bool isProtected); 168 bool isProtected);
333 size_t limit) 314 size_t limit)
334 { 315 {
335 return db_.GetAllPublicIds(target, resourceType, since, limit); 316 return db_.GetAllPublicIds(target, resourceType, since, limit);
336 } 317 }
337 318
319 void GetChanges(std::list<ServerIndexChange>& target /*out*/,
320 bool& done /*out*/,
321 int64_t since,
322 uint32_t maxResults)
323 {
324 db_.GetChanges(target, done, since, maxResults);
325 }
326
338 void GetChildrenPublicId(std::list<std::string>& target, 327 void GetChildrenPublicId(std::list<std::string>& target,
339 int64_t id) 328 int64_t id)
340 { 329 {
341 db_.GetChildrenPublicId(target, id); 330 db_.GetChildrenPublicId(target, id);
342 } 331 }
343 332
333 void GetExportedResources(std::list<ExportedResource>& target /*out*/,
334 bool& done /*out*/,
335 int64_t since,
336 uint32_t maxResults)
337 {
338 return db_.GetExportedResources(target, done, since, maxResults);
339 }
340
341 void GetLastChange(std::list<ServerIndexChange>& target /*out*/)
342 {
343 db_.GetLastChange(target);
344 }
345
346 void GetLastExportedResource(std::list<ExportedResource>& target /*out*/)
347 {
348 return db_.GetLastExportedResource(target);
349 }
350
351 int64_t GetLastChangeIndex()
352 {
353 return db_.GetLastChangeIndex();
354 }
355
344 void GetMainDicomTags(DicomMap& map, 356 void GetMainDicomTags(DicomMap& map,
345 int64_t id) 357 int64_t id)
346 { 358 {
347 db_.GetMainDicomTags(map, id); 359 db_.GetMainDicomTags(map, id);
360 }
361
362 uint64_t GetResourceCount(ResourceType resourceType)
363 {
364 return db_.GetResourceCount(resourceType);
365 }
366
367 uint64_t GetTotalCompressedSize()
368 {
369 return db_.GetTotalCompressedSize();
370 }
371
372 uint64_t GetTotalUncompressedSize()
373 {
374 return db_.GetTotalUncompressedSize();
348 } 375 }
349 376
350 bool LookupAttachment(FileInfo& attachment, 377 bool LookupAttachment(FileInfo& attachment,
351 int64_t id, 378 int64_t id,
352 FileContentType contentType) 379 FileContentType contentType)
440 void GetAllUuids(std::list<std::string>& target, 467 void GetAllUuids(std::list<std::string>& target,
441 ResourceType resourceType, 468 ResourceType resourceType,
442 size_t since, 469 size_t since,
443 size_t limit); 470 size_t limit);
444 471
472 void GetGlobalStatistics(/* out */ uint64_t& diskSize,
473 /* out */ uint64_t& uncompressedSize,
474 /* out */ uint64_t& countPatients,
475 /* out */ uint64_t& countStudies,
476 /* out */ uint64_t& countSeries,
477 /* out */ uint64_t& countInstances);
478
445 bool LookupAttachment(FileInfo& attachment, 479 bool LookupAttachment(FileInfo& attachment,
446 const std::string& instancePublicId, 480 const std::string& instancePublicId,
447 FileContentType contentType); 481 FileContentType contentType);
482
483 void GetChanges(Json::Value& target,
484 int64_t since,
485 unsigned int maxResults);
486
487 void GetLastChange(Json::Value& target);
488
489 void GetExportedResources(Json::Value& target,
490 int64_t since,
491 unsigned int maxResults);
492
493 void GetLastExportedResource(Json::Value& target);
494
448 }; 495 };
449 } 496 }