Mercurial > hg > orthanc-object-storage
annotate Common/BaseStorage.h @ 140:40efe821932a
fix LSB build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 01 Mar 2024 16:17:51 +0100 |
parents | d7295e8678d7 |
children | 3c7e0374f28e |
rev | line source |
---|---|
56
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
1 /** |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
2 * Cloud storage plugins for Orthanc |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
3 * Copyright (C) 2020-2021 Osimis S.A., Belgium |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
4 * |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
5 * This program is free software: you can redistribute it and/or |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
6 * modify it under the terms of the GNU Affero General Public License |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
7 * as published by the Free Software Foundation, either version 3 of |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
8 * the License, or (at your option) any later version. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
9 * |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, but |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
11 * WITHOUT ANY WARRANTY; without even the implied warranty of |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
13 * Affero General Public License for more details. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
14 * |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
15 * You should have received a copy of the GNU Affero General Public License |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
17 **/ |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
18 |
b922ae86bbe1
full static linking against AWS SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
20
diff
changeset
|
19 |
15 | 20 #pragma once |
21 | |
78 | 22 #include "IStorage.h" |
77 | 23 #include <boost/filesystem.hpp> |
24 | |
25 namespace fs = boost::filesystem; | |
15 | 26 |
78 | 27 class BaseStorage : public IStorage |
15 | 28 { |
20 | 29 bool enableLegacyStorageStructure_; |
30 std::string rootPath_; | |
15 | 31 |
32 protected: | |
33 | |
78 | 34 BaseStorage(const std::string& nameForLogs, bool enableLegacyStorageStructure): |
35 IStorage(nameForLogs), | |
15 | 36 enableLegacyStorageStructure_(enableLegacyStorageStructure) |
37 {} | |
38 | |
64
c4f56973a279
Fix reading/deleting DCM header files that were saved with plugin v 1.2.0 and Orthanc 1.9.3 which had a .unk extension
Alain Mazy <am@osimis.io>
parents:
56
diff
changeset
|
39 std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled, bool useAlternateExtension = false); |
15 | 40 |
41 public: | |
20 | 42 virtual void SetRootPath(const std::string& rootPath) |
43 { | |
44 rootPath_ = rootPath; | |
45 } | |
46 | |
15 | 47 static std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled, bool legacyFileStructure, const std::string& rootFolder); |
77 | 48 static fs::path GetOrthancFileSystemPath(const std::string& uuid, const std::string& fileSystemRootPath); |
15 | 49 |
70
16e419fe80c5
Google & Azure: Added the "EnableLegacyUnknownFiles" configuration option
Alain Mazy <am@osimis.io>
parents:
64
diff
changeset
|
50 static bool ReadCommonConfiguration(bool& enableLegacyStorageStructure, bool& storageContainsUnknownFiles, const OrthancPlugins::OrthancConfiguration& pluginSection); |
15 | 51 }; |