Back to index

avfs  1.0.1
Classes | Defines | Enumerations | Functions
dav.h File Reference
#include "passwords.h"
#include <ne_alloc.h>
#include <http_request.h>
#include <http_basic.h>
#include <dav_basic.h>
#include <dav_props.h>
#include <uri.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  av_dav_conn
 The DAV connection structure. More...
struct  av_dav_fdidat
struct  davdata
struct  av_dav_resource

Defines

#define DAV_PARAM_SEP   ':'
#define AV_MAX_DAV_CONNS   128

Enumerations

enum  av_dav_resource_type { resr_normal = 0, resr_collection, resr_reference, resr_error }
 DAV properties: "resources", ie. More...

Functions

void free_resource (struct av_dav_resource *res)
void free_resource_list (struct av_dav_resource *res)
int fetch_resource_list (struct av_dav_conn *conn, const char *uri, int depth, int include_target, struct av_dav_resource **reslist)

Class Documentation

struct av_dav_conn

The DAV connection structure.

Definition at line 23 of file dav.h.

Class Members
int isbusy
char * password
http_session * sesh
char * user
struct av_dav_fdidat

Definition at line 31 of file dav.h.

Collaboration diagram for av_dav_fdidat:
Class Members
struct uri * base_uri
int cursize
int error
int rdonly
char * remote
char * tmpname
struct davdata

Definition at line 40 of file dav.h.

struct av_dav_resource

Definition at line 55 of file dav.h.

Collaboration diagram for av_dav_resource:
Class Members
char * displayname
enum av_dav_resource_type
size_t size time_t modtime int
is_executable char
*error_reason int error_status
struct av_dav_resource *
next
char * uri

Define Documentation

#define AV_MAX_DAV_CONNS   128

Definition at line 16 of file dav.h.

#define DAV_PARAM_SEP   ':'

Definition at line 15 of file dav.h.


Enumeration Type Documentation

DAV properties: "resources", ie.

files or directories in DAVspeak.

Enumerator:
resr_normal 
resr_collection 
resr_reference 
resr_error 

Definition at line 48 of file dav.h.


Function Documentation

int fetch_resource_list ( struct av_dav_conn conn,
const char *  uri,
int  depth,
int  include_target,
struct av_dav_resource **  reslist 
)

Definition at line 217 of file dav_ls.c.

{
  dav_propfind_handler *pfh = dav_propfind_create(conn->sesh, uri, depth);
  int ret;
  struct fetch_context ctx = {0};
  
  *reslist = NULL;
  ctx.conn = conn;
  ctx.list = reslist;
  ctx.target = uri;
  ctx.include_target = include_target;

  dav_propfind_set_flat(pfh, flat_props);

  hip_xml_push_handler(dav_propfind_get_parser(pfh), complex_elms, 
             check_context, NULL, end_element, pfh);

  dav_propfind_set_complex(pfh, complex_props, create_private, NULL);

  ret = dav_propfind_named(pfh, results, &ctx);

  dav_propfind_destroy(pfh);

  return ret;
}

Here is the call graph for this function:

void free_resource ( struct av_dav_resource res)

Definition at line 195 of file dav_ls.c.

{
  HTTP_FREE(res->uri);
  HTTP_FREE(res->displayname);
  HTTP_FREE(res->error_reason);
  av_free(res);
}

Here is the call graph for this function:

void free_resource_list ( struct av_dav_resource res)

Definition at line 203 of file dav_ls.c.

{
  struct av_dav_resource *next;
  for (; res != NULL; res = next) {
    next = res->next;
    free_resource(res);
  }
}