diff -r 5da2cf15eb44 -r b6f2462ee055 libidav/webdav.h --- a/libidav/webdav.h Mon Dec 18 16:24:32 2017 +0100 +++ b/libidav/webdav.h Mon Jan 01 19:53:36 2018 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2016 Olaf Wintermann. All rights reserved. + * Copyright 2018 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -288,8 +288,10 @@ DavXmlNode* dav_get_property_ns(DavResource *res, char *ns, char *name); char* dav_get_string_property(DavResource *res, char *name); char* dav_get_string_property_ns(DavResource *res, char *ns, char *name); -void dav_set_property(DavResource *res, char *name, char *value); -void dav_set_property_ns(DavResource *res, char *ns, char *name, char *value); +void dav_set_string_property(DavResource *res, char *name, char *value); +void dav_set_string_property_ns(DavResource *res, char *ns, char *name, char *value); +void dav_set_property(DavResource *res, char *name, DavXmlNode *value); +void dav_set_property_ns(DavResource *res, char *ns, char *name, DavXmlNode *value); void dav_remove_property(DavResource *res, char *name); void dav_remove_property_ns(DavResource *res, char *ns, char *name); @@ -307,10 +309,18 @@ // private int dav_propfind(DavSession *sn, DavResource *root, UcxBuffer *rqbuf); +/* ------------------------ xml functions ------------------------ */ char* dav_xml_getstring(DavXmlNode *node); DavBool dav_xml_isstring(DavXmlNode *node); DavXmlNode* dav_text_node(DavSession *sn, char *text); +DavXmlNode* dav_copy_node(DavXmlNode *node); + +DavXmlNode* dav_xml_createnode(const char *ns, const char *name); +DavXmlNode* dav_xml_createnode_with_text(const char *ns, const char *name, const char *text); +DavXmlNode* dav_xml_createtextnode(const char *text); +void dav_xml_add_child(DavXmlNode *node, DavXmlNode *child); + #ifdef __cplusplus } #endif