diff Core/Toolbox.h @ 2063:ed383e7a6753

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Jul 2016 15:50:11 +0200
parents 54417b0831c4
children 272094362301
line wrap: on
line diff
--- a/Core/Toolbox.h	Sat Jul 02 15:09:03 2016 +0200
+++ b/Core/Toolbox.h	Mon Jul 04 15:50:11 2016 +0200
@@ -65,25 +65,35 @@
     void ToLowerCase(std::string& result,
                      const std::string& source);
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void ReadFile(std::string& content,
                   const std::string& path);
+#endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     bool ReadHeader(std::string& header,
                     const std::string& path,
                     size_t headerSize);
+#endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void WriteFile(const std::string& content,
                    const std::string& path);
+#endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void WriteFile(const void* content,
                    size_t size,
                    const std::string& path);
+#endif
 
 #if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void USleep(uint64_t microSeconds);
 #endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void RemoveFile(const std::string& path);
+#endif
 
     void SplitUriComponents(UriComponents& components,
                             const std::string& uri);
@@ -100,7 +110,9 @@
     std::string FlattenUri(const UriComponents& components,
                            size_t fromLevel = 0);
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     uint64_t GetFileSize(const std::string& path);
+#endif
 
 #if !defined(ORTHANC_ENABLE_MD5) || ORTHANC_ENABLE_MD5 == 1
     void ComputeMD5(std::string& result,
@@ -177,9 +189,13 @@
                         const std::string& source,
                         char separator);
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void MakeDirectory(const std::string& path);
+#endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     bool IsExistingFile(const std::string& path);
+#endif
 
 #if ORTHANC_PUGIXML_ENABLED == 1
     void JsonToXml(std::string& target,
@@ -201,7 +217,9 @@
 
     int GetProcessId();
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     bool IsRegularFile(const std::string& path);
+#endif
 
     FILE* OpenFile(const std::string& path,
                    FileMode mode);