view Common/BaseStoragePlugin.h @ 188:66501c80f1b0 1.0.0

closing branch 1.0.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Jun 2024 12:13:13 +0200
parents 2a02b21f0a19
children 968eb1c78aed
line wrap: on
line source

#pragma once

#include "IStoragePlugin.h"

class BaseStoragePlugin : public IStoragePlugin
{
  bool enableLegacyStorageStructure_;

protected:

  BaseStoragePlugin(bool enableLegacyStorageStructure):
    enableLegacyStorageStructure_(enableLegacyStorageStructure)
  {}

  std::string GetPath(const char* uuid, OrthancPluginContentType type, bool encryptionEnabled);

public:
  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);
};