Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/IDatabaseWrapper.h @ 5225:5874e5dd9a38
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 03 Apr 2023 22:31:32 +0200 |
parents | 450ac804d3af |
children | df39c7583a49 |
comparison
equal
deleted
inserted
replaced
5224:feba2b0e91bc | 5225:5874e5dd9a38 |
---|---|
40 | 40 |
41 | 41 |
42 class IDatabaseWrapper : public boost::noncopyable | 42 class IDatabaseWrapper : public boost::noncopyable |
43 { | 43 { |
44 public: | 44 public: |
45 struct CreateInstanceResult | 45 struct CreateInstanceResult : public boost::noncopyable |
46 { | 46 { |
47 bool isNewPatient_; | 47 bool isNewPatient_; |
48 bool isNewStudy_; | 48 bool isNewStudy_; |
49 bool isNewSeries_; | 49 bool isNewSeries_; |
50 int64_t patientId_; | 50 int64_t patientId_; |
92 virtual void GetAllPublicIds(std::list<std::string>& target, | 92 virtual void GetAllPublicIds(std::list<std::string>& target, |
93 ResourceType resourceType) = 0; | 93 ResourceType resourceType) = 0; |
94 | 94 |
95 virtual void GetAllPublicIds(std::list<std::string>& target, | 95 virtual void GetAllPublicIds(std::list<std::string>& target, |
96 ResourceType resourceType, | 96 ResourceType resourceType, |
97 size_t since, | 97 int64_t since, |
98 size_t limit) = 0; | 98 uint32_t limit) = 0; |
99 | 99 |
100 virtual void GetChanges(std::list<ServerIndexChange>& target /*out*/, | 100 virtual void GetChanges(std::list<ServerIndexChange>& target /*out*/, |
101 bool& done /*out*/, | 101 bool& done /*out*/, |
102 int64_t since, | 102 int64_t since, |
103 uint32_t maxResults) = 0; | 103 uint32_t limit) = 0; |
104 | 104 |
105 virtual void GetChildrenInternalId(std::list<int64_t>& target, | 105 virtual void GetChildrenInternalId(std::list<int64_t>& target, |
106 int64_t id) = 0; | 106 int64_t id) = 0; |
107 | 107 |
108 virtual void GetChildrenPublicId(std::list<std::string>& target, | 108 virtual void GetChildrenPublicId(std::list<std::string>& target, |
109 int64_t id) = 0; | 109 int64_t id) = 0; |
110 | 110 |
111 virtual void GetExportedResources(std::list<ExportedResource>& target /*out*/, | 111 virtual void GetExportedResources(std::list<ExportedResource>& target /*out*/, |
112 bool& done /*out*/, | 112 bool& done /*out*/, |
113 int64_t since, | 113 int64_t since, |
114 uint32_t maxResults) = 0; | 114 uint32_t limit) = 0; |
115 | 115 |
116 virtual void GetLastChange(std::list<ServerIndexChange>& target /*out*/) = 0; | 116 virtual void GetLastChange(std::list<ServerIndexChange>& target /*out*/) = 0; |
117 | 117 |
118 virtual void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) = 0; | 118 virtual void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) = 0; |
119 | 119 |
128 | 128 |
129 virtual uint64_t GetTotalCompressedSize() = 0; | 129 virtual uint64_t GetTotalCompressedSize() = 0; |
130 | 130 |
131 virtual uint64_t GetTotalUncompressedSize() = 0; | 131 virtual uint64_t GetTotalUncompressedSize() = 0; |
132 | 132 |
133 virtual bool IsExistingResource(int64_t internalId) = 0; | |
134 | |
135 virtual bool IsProtectedPatient(int64_t internalId) = 0; | 133 virtual bool IsProtectedPatient(int64_t internalId) = 0; |
136 | 134 |
137 virtual void ListAvailableAttachments(std::set<FileContentType>& target, | 135 virtual void ListAvailableAttachments(std::set<FileContentType>& target, |
138 int64_t id) = 0; | 136 int64_t id) = 0; |
139 | 137 |
140 virtual void LogChange(int64_t internalId, | 138 virtual void LogChange(ChangeType changeType, |
141 const ServerIndexChange& change) = 0; | 139 ResourceType resourceType, |
140 int64_t internalId, | |
141 const std::string& publicId, /* only for compatibility with V1 and V2 plugins */ | |
142 const std::string& date) = 0; | |
142 | 143 |
143 virtual void LogExportedResource(const ExportedResource& resource) = 0; | 144 virtual void LogExportedResource(const ExportedResource& resource) = 0; |
144 | 145 |
145 virtual bool LookupAttachment(FileInfo& attachment, | 146 virtual bool LookupAttachment(FileInfo& attachment, |
146 int64_t& revision, | 147 int64_t& revision, |
197 | 198 |
198 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, | 199 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, |
199 std::list<std::string>* instancesId, // Can be NULL if not needed | 200 std::list<std::string>* instancesId, // Can be NULL if not needed |
200 const std::vector<DatabaseConstraint>& lookup, | 201 const std::vector<DatabaseConstraint>& lookup, |
201 ResourceType queryLevel, | 202 ResourceType queryLevel, |
202 size_t limit) = 0; | 203 uint32_t limit) = 0; |
203 | 204 |
204 // Returns "true" iff. the instance is new and has been inserted | 205 // Returns "true" iff. the instance is new and has been inserted |
205 // into the database. If "false" is returned, the content of | 206 // into the database. If "false" is returned, the content of |
206 // "result" is undefined, but "instanceId" must be properly | 207 // "result" is undefined, but "instanceId" must be properly |
207 // set. This method must also tag the parent patient as the most | 208 // set. This method must also tag the parent patient as the most |