Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.h @ 232:5368bbe813cf
refactoring of attachments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 30 Nov 2012 14:22:27 +0100 |
parents | 8098448bd827 |
children | c11273198cef |
comparison
equal
deleted
inserted
replaced
231:8098448bd827 | 232:5368bbe813cf |
---|---|
50 { | 50 { |
51 class ServerIndexListener; | 51 class ServerIndexListener; |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 | |
55 class ServerIndex : public boost::noncopyable | 56 class ServerIndex : public boost::noncopyable |
56 { | 57 { |
57 private: | 58 private: |
58 boost::mutex mutex_; | 59 boost::mutex mutex_; |
59 boost::thread flushThread_; | 60 boost::thread flushThread_; |
65 int64_t resourceId); | 66 int64_t resourceId); |
66 | 67 |
67 SeriesStatus GetSeriesStatus(int id); | 68 SeriesStatus GetSeriesStatus(int id); |
68 | 69 |
69 public: | 70 public: |
71 typedef std::list<FileInfo> Attachments; | |
72 | |
70 ServerIndex(ServerContext& context, | 73 ServerIndex(ServerContext& context, |
71 const std::string& dbPath); | 74 const std::string& dbPath); |
72 | 75 |
73 ~ServerIndex(); | 76 ~ServerIndex(); |
74 | 77 |
75 StoreStatus Store(const DicomMap& dicomSummary, | 78 StoreStatus Store(const DicomMap& dicomSummary, |
76 const std::string& fileUuid, | 79 const Attachments& attachments, |
77 uint64_t uncompressedFileSize, | |
78 const std::string& jsonUuid, | |
79 const std::string& remoteAet); | 80 const std::string& remoteAet); |
80 | 81 |
81 uint64_t GetTotalCompressedSize(); | 82 uint64_t GetTotalCompressedSize(); |
82 | 83 |
83 uint64_t GetTotalUncompressedSize(); | 84 uint64_t GetTotalUncompressedSize(); |
84 | 85 |
85 bool LookupResource(Json::Value& result, | 86 bool LookupResource(Json::Value& result, |
86 const std::string& publicId, | 87 const std::string& publicId, |
87 ResourceType expectedType); | 88 ResourceType expectedType); |
88 | 89 |
89 bool GetFile(std::string& fileUuid, | 90 bool LookupAttachment(FileInfo& attachment, |
90 CompressionType& compressionType, | 91 const std::string& instanceUuid, |
91 const std::string& instanceUuid, | 92 FileType contentType); |
92 AttachedFileType contentType); | |
93 | 93 |
94 void GetAllUuids(Json::Value& target, | 94 void GetAllUuids(Json::Value& target, |
95 ResourceType resourceType); | 95 ResourceType resourceType); |
96 | 96 |
97 bool DeleteResource(Json::Value& target, | 97 bool DeleteResource(Json::Value& target, |