comparison OrthancServer/Sources/ServerContext.cpp @ 5579:77570cce8855 find-refactoring

removed redundant FindResponse::resourceId_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 27 Apr 2024 11:31:39 +0200
parents b0b5546f1b9f
children 4ad301c35f6e
comparison
equal deleted inserted replaced
5577:9e74e761b108 5579:77570cce8855
2716 2716
2717 return elapsed.total_seconds(); 2717 return elapsed.total_seconds();
2718 } 2718 }
2719 2719
2720 void ServerContext::AppendFindResponse(Json::Value& target, 2720 void ServerContext::AppendFindResponse(Json::Value& target,
2721 ResourceType level,
2721 const FindResponse::Item& item, 2722 const FindResponse::Item& item,
2722 DicomToJsonFormat format, 2723 DicomToJsonFormat format,
2723 const std::set<DicomTag>& requestedTags, 2724 const std::set<DicomTag>& requestedTags,
2724 bool allowStorageAccess) 2725 bool allowStorageAccess)
2725 { 2726 {
2726 // convert to ExpandedResource to re-use the serialization code TODO-FIND: check if this is the right way to do. shouldn't we copy the code and finally get rid of ExpandedResource ? 2727 // convert to ExpandedResource to re-use the serialization code TODO-FIND: check if this is the right way to do. shouldn't we copy the code and finally get rid of ExpandedResource ?
2727 ExpandedResource resource(item); 2728 ExpandedResource resource(level, item);
2728 2729
2729 ExpandResourceFlags expandFlags = ExpandResourceFlags_None; 2730 ExpandResourceFlags expandFlags = ExpandResourceFlags_None;
2730 if (item.HasResponseContent(FindRequest::ResponseContent_Children)) 2731 if (item.HasResponseContent(FindRequest::ResponseContent_Children))
2731 { 2732 {
2732 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeChildren); 2733 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeChildren);