Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:11:39

0001 // This may look like C code, but it is really -*- C++ -*-
0002 //
0003 // Copyright @ 2018 ImageMagick Studio LLC, a non-profit organization
0004 // dedicated to making software imaging solutions freely available.
0005 //
0006 // Definition of the security policy.
0007 //
0008 
0009 #if !defined(Magick_SecurityPolicy_header)
0010 #define Magick_SecurityPolicy_header
0011 
0012 #include "Magick++/Include.h"
0013 #include <string>
0014 
0015 namespace Magick
0016 {
0017   class MagickPPExport SecurityPolicy
0018   {
0019   public:
0020 
0021     // The maximum number of significant digits to be printed.
0022     static bool precision(const int precision_);
0023 
0024     // Enables anonymous mapping for pixel cache.
0025     static bool anonymousCacheMemoryMap();
0026 
0027     // Enables anonymous virtual memory.
0028     static bool anonymousSystemMemoryMap();
0029 
0030     // The memory request limit in bytes.
0031     static bool maxMemoryRequest(const MagickSizeType limit_);
0032 
0033     // The number of passes to use when shredding files.
0034     static bool shred(const int passes_);
0035 
0036   private:
0037     SecurityPolicy(void);
0038 
0039     static bool setValue(const PolicyDomain domain_, const std::string name_,
0040       const std::string value_);
0041 
0042     template <typename T>
0043     static std::string toString(const T& value);
0044 
0045   }; // class SecurityPolicy
0046 
0047 } // Magick namespace
0048 
0049 #endif // Magick_SecurityPolicy_header