#ifndef REQUESTPARSER_H
#define REQUESTPARSER_H
#include "../public/webdav.h"
#include <libxml/tree.h>
#include <cx/buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PROPFIND_PARSER_OK 0
#define PROPFIND_PARSER_NO_PROPFIND 1
#define PROPFIND_PARSER_NO_PROPERTIES 2
#define PROPFIND_PARSER_INVALID_REQUEST 3
#define PROPFIND_PARSER_OOM 4
#define PROPFIND_PARSER_ERROR 5
#define PROPPATCH_PARSER_OK 0
#define PROPPATCH_PARSER_NO_PROPERTYUPDATE 1
#define PROPPATCH_PARSER_NO_PROPERTIES 2
#define PROPPATCH_PARSER_INVALID_REQUEST 3
#define PROPPATCH_PARSER_DUPLICATE 4
#define PROPPATCH_PARSER_OOM 5
#define PROPPATCH_PARSER_ERROR 6
#define LOCK_PARSER_OK 0
#define LOCK_PARSER_NO_LOCKINFO 1
#define LOCK_PARSER_INVALID_REQUEST 2
#define LOCK_PARSER_UNKNOWN_ELEMENT 3
#define LOCK_PARSER_OOM 4
#define LOCK_PARSER_ERROR 5
WebdavProperty* prop_create(
pool_handle_t *pool,
WSNamespace *ns,
const char *name);
WebdavPropfindRequest* propfind_parse(
Session *sn,
Request *rq,
const char *buf,
size_t buflen,
int *error);
WebdavProppatchRequest* proppatch_parse(
Session *sn,
Request *rq,
const char *buf,
size_t buflen,
int *error);
WebdavProppatchRequest* webdav_parse_set(
Session *sn,
Request *rq,
const char *buf,
size_t buflen,
const char *rootns,
const char *rootname,
WSBool allowremove,
int *error);
WebdavLockRequest* lock_parse(
Session *sn,
Request *rq,
const char *buf,
size_t buflen,
int *error);
#ifdef __cplusplus
}
#endif
#endif