diff OrthancFramework/Sources/HttpServer/IWebDavBucket.h @ 4252:f047e2734655

fix webdav
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Oct 2020 17:13:35 +0200
parents 6c3721ff284c
children 2221051b42df
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/IWebDavBucket.h	Tue Oct 13 15:42:10 2020 +0200
+++ b/OrthancFramework/Sources/HttpServer/IWebDavBucket.h	Thu Oct 15 17:13:35 2020 +0200
@@ -38,6 +38,7 @@
 #include <pugixml.hpp>
 
 #include <list>
+#include <set>
 
 namespace Orthanc
 {
@@ -49,16 +50,13 @@
     class Resource : public boost::noncopyable
     {
     private:
-      std::string               name_;
+      std::string               displayName_;
       bool                      hasModificationTime_;
       boost::posix_time::ptime  creationTime_;
       boost::posix_time::ptime  modificationTime_;
 
-    protected:
-      void SetNameInternal(const std::string& name);
-
     public:
-      Resource();
+      Resource(const std::string& displayName);
 
       virtual ~Resource()
       {
@@ -68,9 +66,9 @@
 
       void SetModificationTime(const boost::posix_time::ptime& t);
 
-      const std::string& GetName() const
+      const std::string& GetDisplayName() const
       {
-        return name_;
+        return displayName_;
       }
 
       const boost::posix_time::ptime& GetCreationTime() const
@@ -95,7 +93,7 @@
       MimeType  mime_;
 
     public:
-      File(const std::string& name);
+      File(const std::string& displayName);
 
       void SetContentLength(uint64_t contentLength)
       {
@@ -127,9 +125,9 @@
     class Folder : public Resource
     {
     public:
-      Folder(const std::string& name)
+      Folder(const std::string& displayName) :
+        Resource(displayName)
       {
-        SetNameInternal(name);
       }
       
       virtual void Format(pugi::xml_node& node,
@@ -150,6 +148,8 @@
         return resources_.size();
       }
 
+      void ListDisplayNames(std::set<std::string>& target);
+
       void AddResource(Resource* resource);  // Takes ownership
 
       void Format(std::string& target,