#ifndef _WEBDAV_PARSE_H_INCLUDE
#define _WEBDAV_PARSE_H_INCLUDE
#include <sys/types.h>
typedef struct
{
int context;
char *locktoken;
} webdav_parse_lock_struct_t;
struct webdav_parse_cachevalidators_struct
{
time_t last_modified;
char *entity_tag;
};
#define WEBDAV_MAX_URI_LEN (MAXPATHLEN * 3)
struct large_dirent
{
u_int32_t d_ino;
u_int16_t d_reclen;
u_int8_t d_type;
u_int8_t d_namlen;
char d_name[WEBDAV_MAX_URI_LEN];
u_int32_t d_name_URI_length;
};
typedef struct webdav_parse_opendir_element_tag
{
struct large_dirent dir_data;
struct timespec stattime;
u_quad_t statsize;
int appledoubleheadervalid;
char appledoubleheader[APPLEDOUBLEHEADER_LENGTH];
struct webdav_parse_opendir_element_tag *next;
} webdav_parse_opendir_element_t;
typedef struct
{
int error;
webdav_parse_opendir_element_t *head;
webdav_parse_opendir_element_t *tail;
} webdav_parse_opendir_struct_t;
typedef struct
{
size_t size;
char name[WEBDAV_MAX_URI_LEN];
} webdav_parse_opendir_text_t;
typedef struct
{
int id;
void *data_ptr;
} webdav_parse_opendir_return_t;
extern int parse_stat(char *xmlp, int xmlp_len, struct stat *statbuf);
extern int parse_statfs(char *xmlp, int xmlp_len, struct statfs *statfsbuf);
extern int parse_lock(char *xmlp, int xmlp_len, char **locktoken);
extern int parse_opendir(
UInt8 *xmlp,
CFIndex xmlp_len,
CFURLRef urlRef,
uid_t uid,
struct node_entry *parent_node);
extern int parse_file_count(char *xmlp, int xmlp_len, int *file_count);
extern int parse_cachevalidators(char *xmlp, int xmlp_len, time_t *last_modified, char **entity_tag);
#define WEBDAV_OPENDIR_ELEMENT 1
#define WEBDAV_OPENDIR_ELEMENT_LENGTH 2
#define WEBDAV_OPENDIR_ELEMENT_MODDATE 3
#define WEBDAV_OPENDIR_TEXT 4
#define WEBDAV_OPENDIR_APPLEDOUBLEHEADER 5
#define WEBDAV_OPENDIR_IGNORE 6
#define WEBDAV_STAT_IGNORE 1
#define WEBDAV_STAT_LENGTH 2
#define WEBDAV_STAT_MODDATE 3
#define WEBDAV_STATFS_IGNORE 1
#define WEBDAV_STATFS_QUOTA 2
#define WEBDAV_STATFS_QUOTAUSED 3
#define WEBDAV_LOCK_CONTINUE 1
#define WEBDAV_LOCK_TOKEN 1
#define WEBDAV_LOCK_HREF 2
#define WEBDAV_CACHEVALIDATORS_IGNORE 1
#define WEBDAV_CACHEVALIDATORS_MODDATE 2
#define WEBDAV_CACHEVALIDATORS_ETAG 3
#define WEBDAV_MAX_STATFS_SIZE 256
#define WEBDAV_MAX_STAT_SIZE 256
#endif