src/server/webdav/operation.h

branch
webdav
changeset 252
5653a9626cc0
parent 247
1df803e06076
child 415
d938228c382e
--- a/src/server/webdav/operation.h	Sat Jul 11 17:58:00 2020 +0200
+++ b/src/server/webdav/operation.h	Fri Jul 24 08:00:11 2020 +0200
@@ -30,6 +30,8 @@
 #define OPERATION_H
 
 #include "../public/webdav.h"
+#include <ucx/list.h>
+#include <ucx/map.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,6 +40,9 @@
 typedef int(*response_close_func)(WebdavOperation *, WebdavResource *);
 
 typedef struct WebdavVFSOperation WebdavVFSOperation;
+
+typedef struct WebdavCopy         WebdavCopy;
+typedef struct CopyResource       CopyResource;
     
 struct WebdavOperation {
     WebdavBackend          *dav;
@@ -68,6 +73,23 @@
     int                    stat_errno;
 };
 
+struct WebdavCopy {
+    WebdavResponse response;
+    Session *sn;
+    Request *rq;
+    CopyResource *current;
+    
+    char *src_href;
+    char *src_path;
+    char *dst_href;
+    char *dst_path;
+};
+
+struct CopyResource {
+    WebdavResource resource;
+    UcxMap *properties;
+};
+
 enum WebdavVFSOpType {
     WEBDAV_VFS_MKDIR = 0,
     WEBDAV_VFS_DELETE
@@ -159,6 +181,16 @@
 
 int webdav_vfs_unlink(WebdavVFSOperation *op);
 
+
+WebdavCopy* webdav_copy_create(
+        Session *sn,
+        Request *rq,
+        VFSContext *vfs,
+        char *from_href,
+        char *from_path,
+        char *to_href,
+        char *to_path);
+
 #ifdef __cplusplus
 }
 #endif

mercurial