src/server/public/webdav.h

branch
webdav
changeset 217
8ed14d76db42
parent 216
ce2866ec97f6
child 222
5f05e56cb8e2
equal deleted inserted replaced
216:ce2866ec97f6 217:8ed14d76db42
60 typedef struct WebdavResponse WebdavResponse; 60 typedef struct WebdavResponse WebdavResponse;
61 typedef struct WebdavResource WebdavResource; 61 typedef struct WebdavResource WebdavResource;
62 62
63 typedef struct WebdavVFSProperties WebdavVFSProperties; 63 typedef struct WebdavVFSProperties WebdavVFSProperties;
64 64
65 typedef struct WebdavOperation WebdavOperation;
66
65 typedef struct WSXmlData WSXmlData; 67 typedef struct WSXmlData WSXmlData;
66 typedef struct WSText WSText; 68 typedef struct WSText WSText;
67 69
68 typedef struct _xmlNs WSNamespace; 70 typedef struct _xmlNs WSNamespace;
69 typedef struct _xmlNode WSXmlNode; 71 typedef struct _xmlNode WSXmlNode;
203 uint32_t getetag:1; 205 uint32_t getetag:1;
204 uint32_t creationdate:1; 206 uint32_t creationdate:1;
205 }; 207 };
206 208
207 struct WebdavResponse { 209 struct WebdavResponse {
210 WebdavOperation *op;
211
208 WebdavResource* (*addresource)(WebdavResponse*, const char*); 212 WebdavResource* (*addresource)(WebdavResponse*, const char*);
209 }; 213 };
210 214
211 struct WebdavResource { 215 struct WebdavResource {
212 char *href; 216 char *href;
213 217
218 WSBool isclosed;
219
214 /* 220 /*
215 * int addprop(WebdavResource *res, WebdavProperty *property, int status); 221 * int addprop(WebdavResource *res, WebdavProperty *property, int status);
216 * 222 *
217 * Adds a property to the resource 223 * Adds a property to the resource
218 */ 224 */
219 int (*addproperty)(WebdavResource*, WebdavProperty*, int); 225 int (*addproperty)(WebdavResource*, WebdavProperty*, int);
226
227 /*
228 * int close(WebdavResource *res);
229 *
230 * Closes a resource object
231 */
232 int (*close)(WebdavResource*);
220 }; 233 };
221 234
222 struct WebdavBackend { 235 struct WebdavBackend {
223 /* 236 /*
224 * int propfind_init( 237 * int propfind_init(
236 /* 249 /*
237 * int propfind_do( 250 * int propfind_do(
238 * WebdavPropfindRequest *rq, 251 * WebdavPropfindRequest *rq,
239 * WebdavResponse *response, 252 * WebdavResponse *response,
240 * VFS_DIR parent, 253 * VFS_DIR parent,
241 * const char *path, 254 * WebdavResource *resource,
242 * struct stat *s); 255 * struct stat *s);
243 * 256 *
244 * This function is called for the requsted resource and for all children 257 * This function is called for the requsted resource and for all children
245 * if WS_PROPFIND_NO_VFS_CHILDREN is not set. 258 * if WS_PROPFIND_NO_VFS_CHILDREN is not set.
246 */ 259 */
247 int (*propfind_do)( 260 int (*propfind_do)(
248 WebdavPropfindRequest *, 261 WebdavPropfindRequest *,
249 WebdavResponse *, 262 WebdavResponse *,
250 VFS_DIR, 263 VFS_DIR,
251 const char *, 264 WebdavResource *,
252 struct stat *); 265 struct stat *);
253 266
254 /* 267 /*
255 * int propfind_finish(WebdavPropfindRequest *rq); 268 * int propfind_finish(WebdavPropfindRequest *rq);
256 * 269 *

mercurial