Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancConfiguration.h @ 4944:f377d5643538 more-tags
new Warnings configuration + InstanceAvailability tag
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 17 Mar 2022 17:03:59 +0100 |
parents | 96a3e81eba90 |
children | dad71e6da406 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancConfiguration.h Wed Mar 16 09:50:33 2022 +0100 +++ b/OrthancServer/Sources/OrthancConfiguration.h Thu Mar 17 17:03:59 2022 +0100 @@ -31,6 +31,7 @@ #include <boost/filesystem.hpp> #include <boost/thread/shared_mutex.hpp> #include <boost/thread/lock_types.hpp> +#include <set> class DcmDataset; @@ -42,7 +43,15 @@ class ParsedDicomFile; class ServerIndex; class TemporaryFile; - + + enum Warnings + { + Warnings_None, + Warnings_001_TagsBeingReadFromStorage, + Warnings_002_InconsistentDicomTagsInDb, + }; + + class OrthancConfiguration : public boost::noncopyable { private: @@ -58,6 +67,7 @@ Modalities modalities_; Peers peers_; ServerIndex* serverIndex_; + std::set<Warnings> disabledWarnings_; OrthancConfiguration() : configurationFileArg_(NULL), @@ -153,7 +163,9 @@ // "SetServerIndex()" must have been called void LoadModalitiesAndPeers(); - + + void LoadWarnings(); + void RegisterFont(ServerResources::FileResourceId resource); bool LookupStringParameter(std::string& target, @@ -242,9 +254,10 @@ std::string GetDatabaseServerIdentifier() const; - bool IsInconsistentDicomTagsLogsEnabled() const; - - bool IsStorageAccessOnFindLogsEnabled() const; + bool IsWarningEnabled(Warnings warning) const + { + return disabledWarnings_.count(warning) == 0; + } static void DefaultExtractDicomSummary(DicomMap& target, const ParsedDicomFile& dicom);