annotate Common/BaseStoragePlugin.h @ 20:968eb1c78aed

Added 'RootPath' configuration
author Alain Mazy
date Mon, 07 Sep 2020 14:12:49 +0200
parents 2a02b21f0a19
children b922ae86bbe1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
1 #pragma once
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
2
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
3 #include "IStoragePlugin.h"
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
4
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
5 class BaseStoragePlugin : public IStoragePlugin
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
6 {
20
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
7 bool enableLegacyStorageStructure_;
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
8 std::string rootPath_;
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
9
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
10 protected:
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
11
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
12 BaseStoragePlugin(bool enableLegacyStorageStructure):
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
13 enableLegacyStorageStructure_(enableLegacyStorageStructure)
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
14 {}
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
16 std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
17
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
18 public:
20
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
19 virtual void SetRootPath(const std::string& rootPath)
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
20 {
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
21 rootPath_ = rootPath;
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
22 }
968eb1c78aed Added 'RootPath' configuration
Alain Mazy
parents: 15
diff changeset
23
15
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
24 static std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled, bool legacyFileStructure, const std::string& rootFolder);
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
25 static std::string GetOrthancFileSystemPath(const std::string& uuid, const std::string& fileSystemRootPath);
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
26
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
27 static bool ReadCommonConfiguration(bool& enableLegacyStorageStructure, const OrthancPlugins::OrthancConfiguration& pluginSection);
2a02b21f0a19 migration + storage structure
Alain Mazy
parents:
diff changeset
28 };