| 358 |
358 |
| 359 cxmutstr dav_property_key_a(const CxAllocator *a, const char *ns, const char *name) { |
359 cxmutstr dav_property_key_a(const CxAllocator *a, const char *ns, const char *name) { |
| 360 cxstring ns_str = cx_str(ns); |
360 cxstring ns_str = cx_str(ns); |
| 361 cxstring name_str = cx_str(name); |
361 cxstring name_str = cx_str(name); |
| 362 |
362 |
| 363 return cx_strcat_a(a, 4, ns_str, cx_str("\0"), name_str, cx_str("\0")); |
363 return cx_strcat_a(a, CX_NULLSTR, 4, ns_str, cx_str("\0"), name_str, cx_str("\0")); |
| 364 } |
364 } |
| 365 |
365 |
| 366 |
366 |
| 367 |
367 |
| 368 |
368 |
| 1506 CxBuffer *content = cxBufferCreate(cxDefaultAllocator, NULL, 2048, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
1506 CxBuffer *content = cxBufferCreate(cxDefaultAllocator, NULL, 2048, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
| 1507 |
1507 |
| 1508 // create an xml document containing all properties |
1508 // create an xml document containing all properties |
| 1509 CxMap *nsmap = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 8); |
1509 CxMap *nsmap = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 8); |
| 1510 cxSetDestructor(nsmap, free); |
1510 cxSetDestructor(nsmap, free); |
| 1511 cxMapPut(nsmap, cx_hash_key_str("DAV:"), strdup("D")); |
1511 cxMapPut(nsmap, "DAV:", strdup("D")); |
| 1512 |
1512 |
| 1513 cxBufferPutString(content, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); |
1513 cxBufferPutString(content, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); |
| 1514 cxBufferPutString(content, "<D:prop xmlns:D=\"DAV:\">\n"); |
1514 cxBufferPutString(content, "<D:prop xmlns:D=\"DAV:\">\n"); |
| 1515 |
1515 |
| 1516 CxMapIterator i = cxMapIteratorValues(properties); |
1516 CxMapIterator i = cxMapIteratorValues(properties); |