annotate OrthancServer/Sources/ServerToolbox.h @ 4704:f0038043fb97 openssl-3.x

removed OpenSSL license exception, as OpenSSL 3.0 was relicensed under Apache 2.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Jun 2021 07:37:20 +0200
parents ff8170d17d90
children 2e71a08eea15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
213
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1859
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1288
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
4 * Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4392
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
213
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * General Public License for more details.
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
4591
ff8170d17d90 moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
24 #include "Database/IDatabaseWrapper.h"
3083
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
25 #include "ServerEnumerations.h"
730
309e686b41e7 better logging about nonexistent tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
26
3083
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
27 #include <boost/noncopyable.hpp>
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
28 #include <list>
213
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 namespace Orthanc
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
3083
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
32 class ServerContext;
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
33 class IStorageArea;
683d572424b6 IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
34
2120
4b02ec79728a refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
35 namespace ServerToolbox
1668
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
36 {
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
37 bool FindOneChildInstance(int64_t& result,
4591
ff8170d17d90 moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
38 IDatabaseWrapper::ITransaction& transaction,
1668
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
39 int64_t resource,
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
40 ResourceType type);
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
41
4591
ff8170d17d90 moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
42 void ReconstructMainDicomTags(IDatabaseWrapper::ITransaction& transaction,
1668
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
43 IStorageArea& storageArea,
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
44 ResourceType level);
2121
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
45
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
46 void LoadIdentifiers(const DicomTag*& tags,
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
47 size_t& size,
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
48 ResourceType level);
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
49
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
50 bool IsIdentifier(const DicomTag& tag,
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
51 ResourceType level);
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
52
7e8889bc95c6 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2120
diff changeset
53 std::string NormalizeIdentifier(const std::string& value);
2209
e3fd5bc429a2 URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2123
diff changeset
54
e3fd5bc429a2 URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2123
diff changeset
55 void ReconstructResource(ServerContext& context,
e3fd5bc429a2 URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2123
diff changeset
56 const std::string& resource);
1668
de1413733c97 reconstructing main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
57 }
213
4ce7fdcc8879 access to tags, simplified-tags and file of an instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 }