Mercurial > hg > orthanc-object-storage
view Common/BaseStoragePlugin.h @ 47:1691da4ae9c3
merge patch-azure: 'create container if not exists' option
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 02 Apr 2021 09:30:52 +0200 |
parents | 968eb1c78aed |
children | b922ae86bbe1 |
line wrap: on
line source
#pragma once #include "IStoragePlugin.h" class BaseStoragePlugin : public IStoragePlugin { bool enableLegacyStorageStructure_; std::string rootPath_; protected: BaseStoragePlugin(bool enableLegacyStorageStructure): enableLegacyStorageStructure_(enableLegacyStorageStructure) {} std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled); public: virtual void SetRootPath(const std::string& rootPath) { rootPath_ = rootPath; } static std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled, bool legacyFileStructure, const std::string& rootFolder); static std::string GetOrthancFileSystemPath(const std::string& uuid, const std::string& fileSystemRootPath); static bool ReadCommonConfiguration(bool& enableLegacyStorageStructure, const OrthancPlugins::OrthancConfiguration& pluginSection); };