libidav/webdav.h

changeset 361
b6f2462ee055
parent 355
5da2cf15eb44
child 371
604e7e335b3b
equal deleted inserted replaced
355:5da2cf15eb44 361:b6f2462ee055
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2016 Olaf Wintermann. All rights reserved. 4 * Copyright 2018 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
286 286
287 DavXmlNode* dav_get_property(DavResource *res, char *name); 287 DavXmlNode* dav_get_property(DavResource *res, char *name);
288 DavXmlNode* dav_get_property_ns(DavResource *res, char *ns, char *name); 288 DavXmlNode* dav_get_property_ns(DavResource *res, char *ns, char *name);
289 char* dav_get_string_property(DavResource *res, char *name); 289 char* dav_get_string_property(DavResource *res, char *name);
290 char* dav_get_string_property_ns(DavResource *res, char *ns, char *name); 290 char* dav_get_string_property_ns(DavResource *res, char *ns, char *name);
291 void dav_set_property(DavResource *res, char *name, char *value); 291 void dav_set_string_property(DavResource *res, char *name, char *value);
292 void dav_set_property_ns(DavResource *res, char *ns, char *name, char *value); 292 void dav_set_string_property_ns(DavResource *res, char *ns, char *name, char *value);
293 void dav_set_property(DavResource *res, char *name, DavXmlNode *value);
294 void dav_set_property_ns(DavResource *res, char *ns, char *name, DavXmlNode *value);
293 void dav_remove_property(DavResource *res, char *name); 295 void dav_remove_property(DavResource *res, char *name);
294 void dav_remove_property_ns(DavResource *res, char *ns, char *name); 296 void dav_remove_property_ns(DavResource *res, char *ns, char *name);
295 297
296 DavPropName* dav_get_property_names(DavResource *res, size_t *count); 298 DavPropName* dav_get_property_names(DavResource *res, size_t *count);
297 299
305 int dav_get_content(DavResource *res, void *stream, dav_write_func write_func); 307 int dav_get_content(DavResource *res, void *stream, dav_write_func write_func);
306 308
307 // private 309 // private
308 int dav_propfind(DavSession *sn, DavResource *root, UcxBuffer *rqbuf); 310 int dav_propfind(DavSession *sn, DavResource *root, UcxBuffer *rqbuf);
309 311
312 /* ------------------------ xml functions ------------------------ */
310 char* dav_xml_getstring(DavXmlNode *node); 313 char* dav_xml_getstring(DavXmlNode *node);
311 DavBool dav_xml_isstring(DavXmlNode *node); 314 DavBool dav_xml_isstring(DavXmlNode *node);
312 DavXmlNode* dav_text_node(DavSession *sn, char *text); 315 DavXmlNode* dav_text_node(DavSession *sn, char *text);
313 316
317 DavXmlNode* dav_copy_node(DavXmlNode *node);
318
319 DavXmlNode* dav_xml_createnode(const char *ns, const char *name);
320 DavXmlNode* dav_xml_createnode_with_text(const char *ns, const char *name, const char *text);
321 DavXmlNode* dav_xml_createtextnode(const char *text);
322 void dav_xml_add_child(DavXmlNode *node, DavXmlNode *child);
323
314 #ifdef __cplusplus 324 #ifdef __cplusplus
315 } 325 }
316 #endif 326 #endif
317 327
318 #endif /* WEBDAV_H */ 328 #endif /* WEBDAV_H */

mercurial