comparison Core/Toolbox.h @ 758:67e6400fca03 query-retrieve

integration mainline -> query-retrieve
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:34:09 +0200
parents 203157cb4fde
children 8cfc6119a5bd ecedd89055db
comparison
equal deleted inserted replaced
681:3bdb5db8e839 758:67e6400fca03
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the 8 * published by the Free Software Foundation, either version 3 of the
48 48
49 namespace Toolbox 49 namespace Toolbox
50 { 50 {
51 void ServerBarrier(); 51 void ServerBarrier();
52 52
53 void ToUpperCase(std::string& s); 53 void ToUpperCase(std::string& s); // Inplace version
54 54
55 void ToLowerCase(std::string& s); 55 void ToLowerCase(std::string& s); // Inplace version
56
57 void ToUpperCase(std::string& result,
58 const std::string& source);
59
60 void ToLowerCase(std::string& result,
61 const std::string& source);
56 62
57 void ReadFile(std::string& content, 63 void ReadFile(std::string& content,
58 const std::string& path); 64 const std::string& path);
59 65
60 void WriteFile(const std::string& content, 66 void WriteFile(const std::string& content,
61 const std::string& path); 67 const std::string& path);
62
63 void Sleep(uint32_t seconds);
64 68
65 void USleep(uint64_t microSeconds); 69 void USleep(uint64_t microSeconds);
66 70
67 void RemoveFile(const std::string& path); 71 void RemoveFile(const std::string& path);
68 72
79 83
80 uint64_t GetFileSize(const std::string& path); 84 uint64_t GetFileSize(const std::string& path);
81 85
82 void ComputeMD5(std::string& result, 86 void ComputeMD5(std::string& result,
83 const std::string& data); 87 const std::string& data);
88
89 void ComputeMD5(std::string& result,
90 const void* data,
91 size_t length);
84 92
85 void ComputeSHA1(std::string& result, 93 void ComputeSHA1(std::string& result,
86 const std::string& data); 94 const std::string& data);
87 95
88 bool IsSHA1(const std::string& str); 96 bool IsSHA1(const std::string& str);