diff OrthancServer/ServerContext.h @ 304:4eea080e6e7a

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Dec 2012 14:57:18 +0100
parents 4031f73fe0e4
children 2cef9c2d4148
line wrap: on
line diff
--- a/OrthancServer/ServerContext.h	Tue Dec 18 19:01:01 2012 +0100
+++ b/OrthancServer/ServerContext.h	Wed Dec 19 14:57:18 2012 +0100
@@ -87,12 +87,33 @@
 
     void RemoveFile(const std::string& fileUuid);
 
-    StoreStatus Store(const char* dicomFile,
+    StoreStatus Store(const char* dicomInstance,
                       size_t dicomSize,
                       const DicomMap& dicomSummary,
                       const Json::Value& dicomJson,
                       const std::string& remoteAet);
 
+    StoreStatus Store(std::string& resultPublicId,
+                      DcmFileFormat& dicomInstance,
+                      const char* dicomBuffer,
+                      size_t dicomSize);
+
+    StoreStatus Store(std::string& resultPublicId,
+                      DcmFileFormat& dicomInstance);
+
+    StoreStatus Store(std::string& resultPublicId,
+                      const char* dicomBuffer,
+                      size_t dicomSize);
+
+    StoreStatus Store(std::string& resultPublicId,
+                      const std::string& dicomContent)
+    {
+      if (dicomContent.size() == 0)
+        return Store(resultPublicId, NULL, 0);
+      else
+        return Store(resultPublicId, &dicomContent[0], dicomContent.size());
+    }
+
     void AnswerFile(RestApiOutput& output,
                     const std::string& instancePublicId,
                     FileContentType content);