comparison OrthancServer/ServerIndex.cpp @ 233:c11273198cef

rename
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Nov 2012 14:30:05 +0100
parents 5368bbe813cf
children 16a4ac70bd8a
comparison
equal deleted inserted replaced
232:5368bbe813cf 233:c11273198cef
546 case ResourceType_Instance: 546 case ResourceType_Instance:
547 { 547 {
548 result["Type"] = "Instance"; 548 result["Type"] = "Instance";
549 549
550 FileInfo attachment; 550 FileInfo attachment;
551 if (!db_->LookupAttachment(attachment, id, FileType_Dicom)) 551 if (!db_->LookupAttachment(attachment, id, FileContentType_Dicom))
552 { 552 {
553 throw OrthancException(ErrorCode_InternalError); 553 throw OrthancException(ErrorCode_InternalError);
554 } 554 }
555 555
556 result["FileSize"] = static_cast<unsigned int>(attachment.GetUncompressedSize()); 556 result["FileSize"] = static_cast<unsigned int>(attachment.GetUncompressedSize());
577 } 577 }
578 578
579 579
580 bool ServerIndex::LookupAttachment(FileInfo& attachment, 580 bool ServerIndex::LookupAttachment(FileInfo& attachment,
581 const std::string& instanceUuid, 581 const std::string& instanceUuid,
582 FileType contentType) 582 FileContentType contentType)
583 { 583 {
584 boost::mutex::scoped_lock lock(mutex_); 584 boost::mutex::scoped_lock lock(mutex_);
585 585
586 int64_t id; 586 int64_t id;
587 ResourceType type; 587 ResourceType type;
591 throw OrthancException(ErrorCode_InternalError); 591 throw OrthancException(ErrorCode_InternalError);
592 } 592 }
593 593
594 if (db_->LookupAttachment(attachment, id, contentType)) 594 if (db_->LookupAttachment(attachment, id, contentType))
595 { 595 {
596 assert(attachment.GetFileType() == contentType); 596 assert(attachment.GetContentType() == contentType);
597 return true; 597 return true;
598 } 598 }
599 else 599 else
600 { 600 {
601 return false; 601 return false;