Mercurial > hg > orthanc
annotate OrthancFramework/Sources/HttpServer/WebDavStorage.h @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | 2221051b42df |
children | d9473bd5ed43 |
rev | line source |
---|---|
4230 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Lesser General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Lesser General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Lesser General Public | |
18 * License along with this program. If not, see | |
19 * <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "IWebDavBucket.h" | |
27 | |
28 #include <boost/thread/recursive_mutex.hpp> | |
29 | |
30 namespace Orthanc | |
31 { | |
32 class WebDavStorage : public IWebDavBucket | |
33 { | |
34 private: | |
35 class StorageFile; | |
36 class StorageFolder; | |
37 | |
38 StorageFolder* LookupParentFolder(const std::vector<std::string>& path); | |
39 | |
40 boost::shared_ptr<StorageFolder> root_; // PImpl | |
41 boost::recursive_mutex mutex_; | |
42 bool isMemory_; | |
43 | |
44 public: | |
4253 | 45 explicit WebDavStorage(bool isMemory); |
4230 | 46 |
47 virtual bool IsExistingFolder(const std::vector<std::string>& path) ORTHANC_OVERRIDE; | |
48 | |
49 virtual bool ListCollection(Collection& collection, | |
50 const std::vector<std::string>& path) ORTHANC_OVERRIDE; | |
51 | |
52 virtual bool GetFileContent(MimeType& mime, | |
53 std::string& content, | |
54 boost::posix_time::ptime& modificationTime, | |
55 const std::vector<std::string>& path) ORTHANC_OVERRIDE; | |
56 | |
57 virtual bool StoreFile(const std::string& content, | |
58 const std::vector<std::string>& path) ORTHANC_OVERRIDE; | |
59 | |
60 virtual bool CreateFolder(const std::vector<std::string>& path) ORTHANC_OVERRIDE; | |
61 | |
4232
688435755466
added DELETE in WebDAV, first working virtual filesystem
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4230
diff
changeset
|
62 virtual bool DeleteItem(const std::vector<std::string>& path) ORTHANC_OVERRIDE; |
688435755466
added DELETE in WebDAV, first working virtual filesystem
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4230
diff
changeset
|
63 |
4230 | 64 virtual void Start() ORTHANC_OVERRIDE |
65 { | |
66 } | |
67 | |
68 virtual void Stop() ORTHANC_OVERRIDE | |
69 { | |
70 } | |
4239
c8754c4c1862
upload DICOM using WebDAV
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4232
diff
changeset
|
71 |
c8754c4c1862
upload DICOM using WebDAV
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4232
diff
changeset
|
72 void RemoveEmptyFolders(); |
4230 | 73 }; |
74 } |