/* tag: Scott Parish Sun Feb  2 13:03:45 2002 (dav-protocol.h)
 */
/* dav-protocol.h -
 *
 ****************************************************************
 * Copyright (C) 2002 Scott Parish
 * 
 * See the file "COPYING" for further information about
 * the copyright and warranty status of this work.
 */

#ifndef INCLUDE__DAV_PROTOCOL__PROTOCOL_H
#define INCLUDE__DAV_PROTOCOL__PROTOCOL_H

#include "hackerlab/machine/types.h"
#include "hackerlab/os/stdarg.h"
#include "hackerlab/mem/alloc-limits.h"

#define LISTING_FILE ".listing"


/* automatically generated __STDC__ prototypes */
extern char * abs_path (alloc_limits limits, char *path);
extern int handle_redirect (char **uri);
extern int dav_is_dir (alloc_limits limits, t_uchar **text, char *dir);
extern int redirect_confirm (void *userdata, const char *src, const char *dest) ;
extern void redirect_notify (void *userdata, const char *src, const char *dest) ;
extern int dav_client_connect_and_login (alloc_limits limits,
                                         int * errn,
                                         int * code,
                                         t_uchar ** text,
                                         long * text_len,
                                         t_uchar * protocol,
                                         t_uchar * host,
                                         t_uchar * program_name,
                                         t_uchar * program_version);
extern int dav_client_cwd (alloc_limits limits, int * errn, int * code, t_uchar ** text,
                           long * text_len, t_uchar * path);
extern int dav_client_cdup (alloc_limits limits,
                            int * errn,
                            int * code,
                            t_uchar ** text);
extern int dav_client_rename (alloc_limits limits,
                              int * errn,
                              int * code,
                              t_uchar ** text,
                              t_uchar * from,
                              t_uchar * to);
extern int dav_client_unlink (alloc_limits limits,
                              int * errn,
                              int * code,
                              t_uchar ** text,
                              t_uchar * path);
extern int dav_client_rmd (alloc_limits limits,
                           int * errn,
                           int * code,
                           t_uchar ** text,
                           t_uchar * path);
extern int dav_client_mkd (alloc_limits limits,
                           int * errn,
                           int * code,
                           t_uchar ** text,
                           t_uchar * path);
extern int dav_client_pwd (alloc_limits limits,
                           int * errn,
                           int * code,
                           t_uchar ** path);
extern int dav_client_list (alloc_limits limits, int *errn, int *code,
                            t_uchar ** text, int data_fd,
                            t_uchar * path, int longfmt);
extern int dav_client_get (alloc_limits limits, int *errn, int *code,
                           t_uchar ** text, int data_fd, t_uchar * path);
extern int dav_client_put (alloc_limits limits, int *errn, int *code,
                           t_uchar ** text, int data_fd, t_uchar * path);
#endif  /* INCLUDE__DAV_PROTOCOL__PROTOCOL_H */
