Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPlugins.cpp @ 1296:179a3049b942
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 14:23:14 +0100 |
parents | 6e7e5ed91c2d |
children | 61ce8147f30d |
comparison
equal
deleted
inserted
replaced
1295:50632b89e294 | 1296:179a3049b942 |
---|---|
1173 | 1173 |
1174 void Free(void* buffer) const | 1174 void Free(void* buffer) const |
1175 { | 1175 { |
1176 if (buffer != NULL) | 1176 if (buffer != NULL) |
1177 { | 1177 { |
1178 params_.free_(buffer); | 1178 params_.free(buffer); |
1179 } | 1179 } |
1180 } | 1180 } |
1181 | 1181 |
1182 OrthancPluginContentType Convert(FileContentType type) const | 1182 OrthancPluginContentType Convert(FileContentType type) const |
1183 { | 1183 { |
1202 virtual void Create(const std::string& uuid, | 1202 virtual void Create(const std::string& uuid, |
1203 const void* content, | 1203 const void* content, |
1204 size_t size, | 1204 size_t size, |
1205 FileContentType type) | 1205 FileContentType type) |
1206 { | 1206 { |
1207 if (params_.create_(uuid.c_str(), content, size, Convert(type)) != 0) | 1207 if (params_.create(uuid.c_str(), content, size, Convert(type)) != 0) |
1208 { | 1208 { |
1209 throw OrthancException(ErrorCode_Plugin); | 1209 throw OrthancException(ErrorCode_Plugin); |
1210 } | 1210 } |
1211 } | 1211 } |
1212 | 1212 |
1215 FileContentType type) | 1215 FileContentType type) |
1216 { | 1216 { |
1217 void* buffer = NULL; | 1217 void* buffer = NULL; |
1218 int64_t size = 0; | 1218 int64_t size = 0; |
1219 | 1219 |
1220 if (params_.read_(&buffer, &size, uuid.c_str(), Convert(type)) != 0) | 1220 if (params_.read(&buffer, &size, uuid.c_str(), Convert(type)) != 0) |
1221 { | 1221 { |
1222 throw OrthancException(ErrorCode_Plugin); | 1222 throw OrthancException(ErrorCode_Plugin); |
1223 } | 1223 } |
1224 | 1224 |
1225 try | 1225 try |
1241 } | 1241 } |
1242 | 1242 |
1243 virtual void Remove(const std::string& uuid, | 1243 virtual void Remove(const std::string& uuid, |
1244 FileContentType type) | 1244 FileContentType type) |
1245 { | 1245 { |
1246 if (params_.remove_(uuid.c_str(), Convert(type)) != 0) | 1246 if (params_.remove(uuid.c_str(), Convert(type)) != 0) |
1247 { | 1247 { |
1248 throw OrthancException(ErrorCode_Plugin); | 1248 throw OrthancException(ErrorCode_Plugin); |
1249 } | 1249 } |
1250 } | 1250 } |
1251 }; | 1251 }; |