comparison Plugins/Engine/OrthancPlugins.cpp @ 2140:aa4b8895cd23

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 16:12:47 +0100
parents dd609a99d39a
children 84d1d392a9ab
comparison
equal deleted inserted replaced
2139:764c9157301b 2140:aa4b8895cd23
2170 2170
2171 switch (service) 2171 switch (service)
2172 { 2172 {
2173 case _OrthancPluginService_GetOrthancPath: 2173 case _OrthancPluginService_GetOrthancPath:
2174 { 2174 {
2175 std::string s = Toolbox::GetPathToExecutable(); 2175 std::string s = SystemToolbox::GetPathToExecutable();
2176 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result = CopyString(s); 2176 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result = CopyString(s);
2177 return true; 2177 return true;
2178 } 2178 }
2179 2179
2180 case _OrthancPluginService_GetOrthancDirectory: 2180 case _OrthancPluginService_GetOrthancDirectory:
2181 { 2181 {
2182 std::string s = Toolbox::GetDirectoryOfExecutable(); 2182 std::string s = SystemToolbox::GetDirectoryOfExecutable();
2183 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result = CopyString(s); 2183 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result = CopyString(s);
2184 return true; 2184 return true;
2185 } 2185 }
2186 2186
2187 case _OrthancPluginService_GetConfigurationPath: 2187 case _OrthancPluginService_GetConfigurationPath:
2364 { 2364 {
2365 const _OrthancPluginReadFile& p = 2365 const _OrthancPluginReadFile& p =
2366 *reinterpret_cast<const _OrthancPluginReadFile*>(parameters); 2366 *reinterpret_cast<const _OrthancPluginReadFile*>(parameters);
2367 2367
2368 std::string content; 2368 std::string content;
2369 Toolbox::ReadFile(content, p.path); 2369 SystemToolbox::ReadFile(content, p.path);
2370 CopyToMemoryBuffer(*p.target, content.size() > 0 ? content.c_str() : NULL, content.size()); 2370 CopyToMemoryBuffer(*p.target, content.size() > 0 ? content.c_str() : NULL, content.size());
2371 2371
2372 return true; 2372 return true;
2373 } 2373 }
2374 2374
2375 case _OrthancPluginService_WriteFile: 2375 case _OrthancPluginService_WriteFile:
2376 { 2376 {
2377 const _OrthancPluginWriteFile& p = 2377 const _OrthancPluginWriteFile& p =
2378 *reinterpret_cast<const _OrthancPluginWriteFile*>(parameters); 2378 *reinterpret_cast<const _OrthancPluginWriteFile*>(parameters);
2379 Toolbox::WriteFile(p.data, p.size, p.path); 2379 SystemToolbox::WriteFile(p.data, p.size, p.path);
2380 return true; 2380 return true;
2381 } 2381 }
2382 2382
2383 case _OrthancPluginService_GetErrorDescription: 2383 case _OrthancPluginService_GetErrorDescription:
2384 { 2384 {