15
|
1 #pragma once
|
|
2
|
|
3 #include "IStoragePlugin.h"
|
|
4
|
|
5 class BaseStoragePlugin : public IStoragePlugin
|
|
6 {
|
20
|
7 bool enableLegacyStorageStructure_;
|
|
8 std::string rootPath_;
|
15
|
9
|
|
10 protected:
|
|
11
|
|
12 BaseStoragePlugin(bool enableLegacyStorageStructure):
|
|
13 enableLegacyStorageStructure_(enableLegacyStorageStructure)
|
|
14 {}
|
|
15
|
|
16 std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);
|
|
17
|
|
18 public:
|
20
|
19 virtual void SetRootPath(const std::string& rootPath)
|
|
20 {
|
|
21 rootPath_ = rootPath;
|
|
22 }
|
|
23
|
15
|
24 static std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled, bool legacyFileStructure, const std::string& rootFolder);
|
|
25 static std::string GetOrthancFileSystemPath(const std::string& uuid, const std::string& fileSystemRootPath);
|
|
26
|
|
27 static bool ReadCommonConfiguration(bool& enableLegacyStorageStructure, const OrthancPlugins::OrthancConfiguration& pluginSection);
|
|
28 };
|