comparison Core/FileStorage/StorageAccessor.cpp @ 232:5368bbe813cf

refactoring of attachments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Nov 2012 14:22:27 +0100
parents e7432706b354
children c11273198cef
comparison
equal deleted inserted replaced
231:8098448bd827 232:5368bbe813cf
32 32
33 #include "StorageAccessor.h" 33 #include "StorageAccessor.h"
34 34
35 namespace Orthanc 35 namespace Orthanc
36 { 36 {
37 std::string StorageAccessor::Write(const std::vector<uint8_t>& content) 37 FileInfo StorageAccessor::Write(const std::vector<uint8_t>& content,
38 FileType type)
38 { 39 {
39 if (content.size() == 0) 40 if (content.size() == 0)
40 { 41 {
41 return WriteInternal(NULL, 0); 42 return WriteInternal(NULL, 0, type);
42 } 43 }
43 else 44 else
44 { 45 {
45 return WriteInternal(&content[0], content.size()); 46 return WriteInternal(&content[0], content.size(), type);
46 } 47 }
47 } 48 }
48 49
49 std::string StorageAccessor::Write(const std::string& content) 50 FileInfo StorageAccessor::Write(const std::string& content,
51 FileType type)
50 { 52 {
51 if (content.size() == 0) 53 if (content.size() == 0)
52 { 54 {
53 return WriteInternal(NULL, 0); 55 return WriteInternal(NULL, 0, type);
54 } 56 }
55 else 57 else
56 { 58 {
57 return WriteInternal(&content[0], content.size()); 59 return WriteInternal(&content[0], content.size(), type);
58 } 60 }
59 } 61 }
60 } 62 }