Mercurial > hg > orthanc
annotate OrthancServer/ServerIndex.h @ 1296:179a3049b942
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 14:23:14 +0100 |
parents | 6e7e5ed91c2d |
children | 501432928727 |
rev | line source |
---|---|
0 | 1 /** |
62 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1286
diff
changeset
|
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics |
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1286
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
0 | 5 * |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
136 | 10 * |
11 * In addition, as a special exception, the copyright holders of this | |
12 * program give permission to link the code of its release with the | |
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
14 * that use the same license as the "OpenSSL" library), and distribute | |
15 * the linked executables. You must obey the GNU General Public License | |
16 * in all respects for all of the code used other than "OpenSSL". If you | |
17 * modify file(s) with this exception, you may extend this exception to | |
18 * your version of the file(s), but you are not obligated to do so. If | |
19 * you do not wish to do so, delete this exception statement from your | |
20 * version. If you delete this exception statement from all source files | |
21 * in the program, then also delete it here. | |
0 | 22 * |
23 * This program is distributed in the hope that it will be useful, but | |
24 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
26 * General Public License for more details. | |
27 * | |
28 * You should have received a copy of the GNU General Public License | |
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
30 **/ | |
31 | |
32 | |
33 #pragma once | |
34 | |
35 #include <boost/thread.hpp> | |
220 | 36 #include <boost/noncopyable.hpp> |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
37 #include "../Core/Cache/LeastRecentlyUsedIndex.h" |
0 | 38 #include "../Core/SQLite/Connection.h" |
39 #include "../Core/DicomFormat/DicomMap.h" | |
179 | 40 #include "../Core/DicomFormat/DicomInstanceHasher.h" |
183 | 41 #include "ServerEnumerations.h" |
0 | 42 |
1247 | 43 #include "IDatabaseWrapper.h" |
186
f68c039b0571
preparing refactoring of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
183
diff
changeset
|
44 |
0 | 45 |
62 | 46 namespace Orthanc |
0 | 47 { |
226
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
48 class ServerContext; |
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
49 |
0 | 50 namespace Internals |
51 { | |
202 | 52 class ServerIndexListener; |
0 | 53 } |
54 | |
220 | 55 class ServerIndex : public boost::noncopyable |
0 | 56 { |
1002
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
57 public: |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
58 typedef std::list<FileInfo> Attachments; |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
59 typedef std::map< std::pair<ResourceType, MetadataType>, std::string> MetadataMap; |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
60 |
0 | 61 private: |
278
771f12042be9
more efficient determination of storage size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
62 class Transaction; |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
63 class UnstableResourcePayload; |
278
771f12042be9
more efficient determination of storage size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
64 |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
65 bool done_; |
0 | 66 boost::mutex mutex_; |
206
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
67 boost::thread flushThread_; |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
68 boost::thread unstableResourcesMonitorThread_; |
0 | 69 |
202 | 70 std::auto_ptr<Internals::ServerIndexListener> listener_; |
1247 | 71 IDatabaseWrapper& db_; |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
72 LeastRecentlyUsedIndex<int64_t, UnstableResourcePayload> unstableResources_; |
180
626777d01dc4
use of hashes to index dicom objects
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
179
diff
changeset
|
73 |
278
771f12042be9
more efficient determination of storage size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
74 uint64_t currentStorageSize_; |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
75 uint64_t maximumStorageSize_; |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
76 unsigned int maximumPatients_; |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
77 |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
78 static void FlushThread(ServerIndex* that); |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
79 |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
80 static void UnstableResourcesMonitorThread(ServerIndex* that); |
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
81 |
202 | 82 void MainDicomTagsToJson(Json::Value& result, |
83 int64_t resourceId); | |
198
663cc6c46d0a
before refactoring of ServerIndex::GetXXX
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
197
diff
changeset
|
84 |
585 | 85 SeriesStatus GetSeriesStatus(int64_t id); |
199 | 86 |
268
4bc02e2254ec
preparing ServerIndex for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
238
diff
changeset
|
87 bool IsRecyclingNeeded(uint64_t instanceSize); |
4bc02e2254ec
preparing ServerIndex for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
238
diff
changeset
|
88 |
4bc02e2254ec
preparing ServerIndex for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
238
diff
changeset
|
89 void Recycle(uint64_t instanceSize, |
4bc02e2254ec
preparing ServerIndex for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
238
diff
changeset
|
90 const std::string& newPatientId); |
4bc02e2254ec
preparing ServerIndex for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
238
diff
changeset
|
91 |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
92 void StandaloneRecycling(); |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
93 |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
94 void MarkAsUnstable(int64_t id, |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
95 Orthanc::ResourceType type, |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
96 const std::string& publicId); |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
97 |
646 | 98 void GetStatisticsInternal(/* out */ uint64_t& compressedSize, |
99 /* out */ uint64_t& uncompressedSize, | |
100 /* out */ unsigned int& countStudies, | |
101 /* out */ unsigned int& countSeries, | |
102 /* out */ unsigned int& countInstances, | |
103 /* in */ int64_t id, | |
104 /* in */ ResourceType type); | |
105 | |
1238 | 106 bool GetMetadataAsInteger(int64_t& result, |
1237 | 107 int64_t id, |
108 MetadataType type); | |
109 | |
110 void LogChange(int64_t internalId, | |
111 ChangeType changeType, | |
112 ResourceType resourceType, | |
113 const std::string& publicId) | |
114 { | |
115 ServerIndexChange change(changeType, resourceType, publicId); | |
1247 | 116 db_.LogChange(internalId, change); |
1237 | 117 } |
118 | |
119 uint64_t IncrementGlobalSequenceInternal(GlobalProperty property); | |
120 | |
1286 | 121 void SetMainDicomTags(int64_t resource, |
122 const DicomMap& tags); | |
1237 | 123 |
0 | 124 public: |
226
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
125 ServerIndex(ServerContext& context, |
1247 | 126 IDatabaseWrapper& database); |
0 | 127 |
206
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
128 ~ServerIndex(); |
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
129 |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
130 uint64_t GetMaximumStorageSize() const |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
131 { |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
132 return maximumStorageSize_; |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
133 } |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
134 |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
135 uint64_t GetMaximumPatientCount() const |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
136 { |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
137 return maximumPatients_; |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
138 } |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
139 |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
140 // "size == 0" means no limit on the storage size |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
141 void SetMaximumStorageSize(uint64_t size); |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
142 |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
143 // "count == 0" means no limit on the number of patients |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
144 void SetMaximumPatientCount(unsigned int count); |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
145 |
1006
649d47854314
proper handling of metadata in Store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1004
diff
changeset
|
146 StoreStatus Store(std::map<MetadataType, std::string>& instanceMetadata, |
649d47854314
proper handling of metadata in Store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1004
diff
changeset
|
147 const DicomMap& dicomSummary, |
1002
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
148 const Attachments& attachments, |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
149 const std::string& remoteAet, |
1006
649d47854314
proper handling of metadata in Store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1004
diff
changeset
|
150 const MetadataMap& metadata); |
0 | 151 |
238 | 152 void ComputeStatistics(Json::Value& target); |
0 | 153 |
212 | 154 bool LookupResource(Json::Value& result, |
155 const std::string& publicId, | |
156 ResourceType expectedType); | |
0 | 157 |
232
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
231
diff
changeset
|
158 bool LookupAttachment(FileInfo& attachment, |
5368bbe813cf
refactoring of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
231
diff
changeset
|
159 const std::string& instanceUuid, |
233 | 160 FileContentType contentType); |
0 | 161 |
162 void GetAllUuids(Json::Value& target, | |
190 | 163 ResourceType resourceType); |
0 | 164 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1139
diff
changeset
|
165 bool DeleteResource(Json::Value& target /* out */, |
212 | 166 const std::string& uuid, |
167 ResourceType expectedType); | |
0 | 168 |
1247 | 169 void GetChanges(Json::Value& target, |
0 | 170 int64_t since, |
171 unsigned int maxResults); | |
231 | 172 |
1247 | 173 void GetLastChange(Json::Value& target); |
237
16a4ac70bd8a
last change and export
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
233
diff
changeset
|
174 |
231 | 175 void LogExportedResource(const std::string& publicId, |
176 const std::string& remoteModality); | |
177 | |
1247 | 178 void GetExportedResources(Json::Value& target, |
231 | 179 int64_t since, |
180 unsigned int maxResults); | |
237
16a4ac70bd8a
last change and export
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
233
diff
changeset
|
181 |
1247 | 182 void GetLastExportedResource(Json::Value& target); |
237
16a4ac70bd8a
last change and export
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
233
diff
changeset
|
183 |
272
337c506461d2
protection from rest api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
269
diff
changeset
|
184 bool IsProtectedPatient(const std::string& publicId); |
337c506461d2
protection from rest api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
269
diff
changeset
|
185 |
337c506461d2
protection from rest api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
269
diff
changeset
|
186 void SetProtectedPatient(const std::string& publicId, |
337c506461d2
protection from rest api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
269
diff
changeset
|
187 bool isProtected); |
304 | 188 |
714
6a1dbba0cca7
new implementation of C-Find handler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
702
diff
changeset
|
189 void GetChildren(std::list<std::string>& result, |
6a1dbba0cca7
new implementation of C-Find handler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
702
diff
changeset
|
190 const std::string& publicId); |
6a1dbba0cca7
new implementation of C-Find handler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
702
diff
changeset
|
191 |
304 | 192 void GetChildInstances(std::list<std::string>& result, |
193 const std::string& publicId); | |
194 | |
306
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
195 void SetMetadata(const std::string& publicId, |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
196 MetadataType type, |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
197 const std::string& value); |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
198 |
438 | 199 void DeleteMetadata(const std::string& publicId, |
200 MetadataType type); | |
201 | |
306
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
202 bool LookupMetadata(std::string& target, |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
203 const std::string& publicId, |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
204 MetadataType type); |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
205 |
739 | 206 void ListAvailableMetadata(std::list<MetadataType>& target, |
436
d51186bf7602
read access to metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
413
diff
changeset
|
207 const std::string& publicId); |
d51186bf7602
read access to metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
413
diff
changeset
|
208 |
1002
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
209 bool GetMetadata(Json::Value& target, |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
210 const std::string& publicId); |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
211 |
697
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
212 void ListAvailableAttachments(std::list<FileContentType>& target, |
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
213 const std::string& publicId, |
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
214 ResourceType expectedType); |
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
215 |
306
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
216 bool LookupParent(std::string& target, |
326d5a4a5af3
modification of instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
304
diff
changeset
|
217 const std::string& publicId); |
310 | 218 |
219 uint64_t IncrementGlobalSequence(GlobalProperty sequence); | |
315 | 220 |
221 void LogChange(ChangeType changeType, | |
222 const std::string& publicId); | |
413
47d63c941902
clearing /exports and /changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
223 |
47d63c941902
clearing /exports and /changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
224 void DeleteChanges(); |
47d63c941902
clearing /exports and /changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
225 |
47d63c941902
clearing /exports and /changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
226 void DeleteExportedResources(); |
440
23e5b35e3c5c
statistics for patient/studies/series/instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
438
diff
changeset
|
227 |
23e5b35e3c5c
statistics for patient/studies/series/instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
438
diff
changeset
|
228 void GetStatistics(Json::Value& target, |
23e5b35e3c5c
statistics for patient/studies/series/instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
438
diff
changeset
|
229 const std::string& publicId); |
521 | 230 |
646 | 231 void GetStatistics(/* out */ uint64_t& compressedSize, |
232 /* out */ uint64_t& uncompressedSize, | |
233 /* out */ unsigned int& countStudies, | |
234 /* out */ unsigned int& countSeries, | |
235 /* out */ unsigned int& countInstances, | |
236 const std::string& publicId); | |
237 | |
1162 | 238 void LookupIdentifier(std::list<std::string>& result, |
239 const DicomTag& tag, | |
240 const std::string& value, | |
241 ResourceType type); | |
615 | 242 |
1162 | 243 void LookupIdentifier(std::list<std::string>& result, |
244 const DicomTag& tag, | |
245 const std::string& value); | |
521 | 246 |
1162 | 247 void LookupIdentifier(std::list< std::pair<ResourceType, std::string> >& result, |
248 const std::string& value); | |
699
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
249 |
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
250 StoreStatus AddAttachment(const FileInfo& attachment, |
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
251 const std::string& publicId); |
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
252 |
702
7592a48e97e4
delete custom attachment
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
699
diff
changeset
|
253 void DeleteAttachment(const std::string& publicId, |
7592a48e97e4
delete custom attachment
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
699
diff
changeset
|
254 FileContentType type); |
1218
efece308018e
report database version in /system
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1177
diff
changeset
|
255 |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1247
diff
changeset
|
256 void SetGlobalProperty(GlobalProperty property, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1247
diff
changeset
|
257 const std::string& value); |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1247
diff
changeset
|
258 |
1218
efece308018e
report database version in /system
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1177
diff
changeset
|
259 std::string GetGlobalProperty(GlobalProperty property, |
efece308018e
report database version in /system
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1177
diff
changeset
|
260 const std::string& defaultValue); |
0 | 261 }; |
262 } |