Back to index

avfs  1.0.1
Classes | Defines | Typedefs | Functions
dav_207.h File Reference
#include "hip_xml.h"
#include "http_request.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dav_propname

Defines

#define DAV_ELM_207_first   (HIP_ELM_UNUSED)
#define DAV_ELM_multistatus   (DAV_ELM_207_first)
#define DAV_ELM_response   (DAV_ELM_207_first + 1)
#define DAV_ELM_responsedescription   (DAV_ELM_207_first + 2)
#define DAV_ELM_href   (DAV_ELM_207_first + 3)
#define DAV_ELM_propstat   (DAV_ELM_207_first + 4)
#define DAV_ELM_prop   (DAV_ELM_207_first + 5)
#define DAV_ELM_status   (DAV_ELM_207_first + 6)
#define DAV_ELM_207_UNUSED   (HIP_ELM_UNUSED + 100)

Typedefs

typedef struct dav_207_parser_s
typedef void *(* dav_207_start_response )(void *userdata, const char *href)
typedef void(* dav_207_end_response )(void *userdata, void *response, const char *status_line, const http_status *status, const char *description)
typedef void *(* dav_207_start_propstat )(void *userdata, void *response)
typedef void(* dav_207_end_propstat )(void *userdata, void *propstat, const char *status_line, const http_status *status, const char *description)

Functions

dav_207_parser * dav_207_create (hip_xml_parser *parser, void *userdata)
void dav_207_set_response_handlers (dav_207_parser *p, dav_207_start_response start, dav_207_end_response end)
void dav_207_set_propstat_handlers (dav_207_parser *p, dav_207_start_propstat start, dav_207_end_propstat end)
void dav_207_destroy (dav_207_parser *p)
int dav_accept_207 (void *userdata, http_req *req, http_status *status)
void * dav_207_get_current_propstat (dav_207_parser *p)
void * dav_207_get_current_response (dav_207_parser *p)
void dav_207_ignore_unknown (dav_207_parser *p)

Class Documentation

struct dav_propname

Definition at line 46 of file dav_207.h.

Class Members
const char * name
const char * nspace

Define Documentation

Definition at line 30 of file dav_207.h.

#define DAV_ELM_207_UNUSED   (HIP_ELM_UNUSED + 100)

Definition at line 40 of file dav_207.h.

#define DAV_ELM_href   (DAV_ELM_207_first + 3)

Definition at line 35 of file dav_207.h.

Definition at line 32 of file dav_207.h.

#define DAV_ELM_prop   (DAV_ELM_207_first + 5)

Definition at line 37 of file dav_207.h.

#define DAV_ELM_propstat   (DAV_ELM_207_first + 4)

Definition at line 36 of file dav_207.h.

#define DAV_ELM_response   (DAV_ELM_207_first + 1)

Definition at line 33 of file dav_207.h.

Definition at line 34 of file dav_207.h.

#define DAV_ELM_status   (DAV_ELM_207_first + 6)

Definition at line 38 of file dav_207.h.


Typedef Documentation

typedef void(* dav_207_end_propstat)(void *userdata, void *propstat, const char *status_line, const http_status *status, const char *description)

Definition at line 66 of file dav_207.h.

typedef void(* dav_207_end_response)(void *userdata, void *response, const char *status_line, const http_status *status, const char *description)

Definition at line 61 of file dav_207.h.

typedef struct dav_207_parser_s

Definition at line 43 of file dav_207.h.

typedef void*(* dav_207_start_propstat)(void *userdata, void *response)

Definition at line 65 of file dav_207.h.

typedef void*(* dav_207_start_response)(void *userdata, const char *href)

Definition at line 60 of file dav_207.h.


Function Documentation

dav_207_parser* dav_207_create ( hip_xml_parser *  parser,
void *  userdata 
)

Definition at line 247 of file dav_207.c.

{
    dav_207_parser *p = ne_calloc(sizeof *p);

    p->parser = parser;
    p->userdata = userdata;
    
    /* Add handler for the standard 207 elements */
    hip_xml_push_handler(parser, elements, check_context, 
                      start_element, end_element, p);
    
    return p;
}

Here is the call graph for this function:

void dav_207_destroy ( dav_207_parser *  p)

Definition at line 261 of file dav_207.c.

{
    free(p);
}
void* dav_207_get_current_propstat ( dav_207_parser *  p)

Definition at line 86 of file dav_207.c.

{
    return p->propstat;
}
void* dav_207_get_current_response ( dav_207_parser *  p)

Definition at line 81 of file dav_207.c.

{
    return p->response;
}
void dav_207_ignore_unknown ( dav_207_parser *  p)

Definition at line 235 of file dav_207.c.

{
    static const struct hip_xml_elm any_elms[] = {
       { "", "", HIP_ELM_unknown, HIP_XML_COLLECT },
       { NULL }
    };
    
    hip_xml_push_handler(p->parser, any_elms,
                      ignore_cc, NULL, NULL, NULL);
    
}

Here is the call graph for this function:

void dav_207_set_propstat_handlers ( dav_207_parser *  p,
dav_207_start_propstat  start,
dav_207_end_propstat  end 
)

Definition at line 73 of file dav_207.c.

{
    p->start_propstat = start;
    p->end_propstat = end;
}
void dav_207_set_response_handlers ( dav_207_parser *  p,
dav_207_start_response  start,
dav_207_end_response  end 
)

Definition at line 65 of file dav_207.c.

{
    p->start_response = start;
    p->end_response = end;
}
int dav_accept_207 ( void *  userdata,
http_req *  req,
http_status status 
)

Definition at line 266 of file dav_207.c.

{
    return (status->code == 207);
}