Mercurial > hg > orthanc
annotate OrthancFramework/Sources/HttpServer/IWebDavBucket.h @ 4226:7bd5eab3ba25
prototyping IWebDavBucket
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 04 Oct 2020 13:23:53 +0200 |
parents | |
children | 7fff7e683d65 |
rev | line source |
---|---|
4226
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public License |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * Lesser General Public License for more details. |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * License along with this program. If not, see |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * <http://www.gnu.org/licenses/>. |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #pragma once |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #if !defined(ORTHANC_ENABLE_PUGIXML) |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 # error The macro ORTHANC_ENABLE_PUGIXML must be defined |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 #endif |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 #if ORTHANC_ENABLE_PUGIXML != 1 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 # error XML support is required to use this file |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 #endif |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 #include "../Compatibility.h" |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 #include "../Enumerations.h" |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 #include <boost/date_time/posix_time/posix_time.hpp> |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 #include <boost/noncopyable.hpp> |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 #include <pugixml.hpp> |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 #include <list> |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 namespace Orthanc |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 class IWebDavBucket : public boost::noncopyable |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 public: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 class Resource : public boost::noncopyable |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 private: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 std::string name_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 bool hasModificationTime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 boost::posix_time::ptime creationTime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 boost::posix_time::ptime modificationTime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 protected: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 void SetNameInternal(const std::string& name); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 public: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 Resource(); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 virtual ~Resource() |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 void SetCreationTime(const boost::posix_time::ptime& t); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 void SetModificationTime(const boost::posix_time::ptime& t); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 const std::string& GetName() const |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 return name_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 const boost::posix_time::ptime& GetCreationTime() const |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 return creationTime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 const boost::posix_time::ptime& GetModificationTime() const |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 return modificationTime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 virtual void Format(pugi::xml_node& node, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 const std::string& parentPath) const; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 }; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 class File : public Resource |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 private: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 uint64_t contentLength_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 MimeType mime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 public: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 File(const std::string& name); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 void SetContentLength(uint64_t contentLength) |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 contentLength_ = contentLength; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 void SetMimeType(MimeType mime) |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 mime_ = mime; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 uint64_t GetContentLength() const |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 return contentLength_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 MimeType GetMimeType() const |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 return mime_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 virtual void Format(pugi::xml_node& node, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 const std::string& parentPath) const ORTHANC_OVERRIDE; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 }; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 class Folder : public Resource |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 public: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 Folder(const std::string& name) |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 SetNameInternal(name); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 virtual void Format(pugi::xml_node& node, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 const std::string& parentPath) const ORTHANC_OVERRIDE; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 }; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 class Collection : public boost::noncopyable |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 private: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 std::list<Resource*> resources_; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 public: |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 ~Collection(); |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 void AddResource(Resource* resource); // Takes ownership |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 void Format(std::string& target, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 const std::string& parentPath) const; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 }; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 virtual ~IWebDavBucket() |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 { |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 } |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 virtual bool ListCollection(Collection& collection, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 const std::vector<std::string>& path) = 0; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 virtual bool GetFileContent(std::string& content, |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 const std::vector<std::string>& path) = 0; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 }; |
7bd5eab3ba25
prototyping IWebDavBucket
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 } |