| 191 idav_ns.prefix = "idav"; |
191 idav_ns.prefix = "idav"; |
| 192 idav_ns.name = DAV_NS; |
192 idav_ns.name = DAV_NS; |
| 193 cxMapPut(namespaces, cx_hash_key_str("idav"), &idav_ns); |
193 cxMapPut(namespaces, cx_hash_key_str("idav"), &idav_ns); |
| 194 } |
194 } |
| 195 |
195 |
| 196 s = cx_str("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
196 cxBufferPutString(buf, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
| 197 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 198 |
197 |
| 199 // write root element and namespaces |
198 // write root element and namespaces |
| 200 cx_bprintf(buf, "<D:%s xmlns:D=\"DAV:\"", rootelm); |
199 cx_bprintf(buf, "<D:%s xmlns:D=\"DAV:\"", rootelm); |
| 201 |
200 |
| 202 CxMapIterator mapi = cxMapIteratorValues(namespaces); |
201 CxMapIterator mapi = cxMapIteratorValues(namespaces); |
| 203 cx_foreach(DavNamespace*, ns, mapi) { |
202 cx_foreach(DavNamespace*, ns, mapi) { |
| 204 s = cx_str(" xmlns:"); |
203 cxBufferPutString(buf, " xmlns:"); |
| 205 cxBufferWrite(s.ptr, 1, s.length, buf); |
204 cxBufferPutString(buf, ns->prefix); |
| 206 s = cx_str(ns->prefix); |
205 cxBufferPutString(buf, "=\""); |
| 207 cxBufferWrite(s.ptr, 1, s.length, buf); |
206 cxBufferPutString(buf, ns->name); |
| 208 s = cx_str("=\""); |
207 cxBufferPutString(buf, "\""); |
| 209 cxBufferWrite(s.ptr, 1, s.length, buf); |
208 } |
| 210 s = cx_str(ns->name); |
209 cxBufferPutString(buf, ">\n"); |
| 211 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 212 s = cx_str("\""); |
|
| 213 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 214 } |
|
| 215 s = cx_str(">\n"); |
|
| 216 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 217 |
210 |
| 218 // default properties |
211 // default properties |
| 219 s = cx_str("<D:prop>\n"); |
212 cxBufferPutString(buf, "<D:prop>\n"); |
| 220 cxBufferWrite(s.ptr, 1, s.length, buf); |
213 cxBufferPutString(buf, "<D:creationdate />\n<D:getlastmodified />\n"); |
| 221 |
214 cxBufferPutString(buf, "<D:getcontentlength />\n<D:getcontenttype />\n"); |
| 222 s = cx_str("<D:creationdate />\n<D:getlastmodified />\n"); |
215 |
| 223 cxBufferWrite(s.ptr, 1, s.length, buf); |
216 cxBufferPutString(buf, "<D:resourcetype />\n"); |
| 224 |
|
| 225 s = cx_str("<D:getcontentlength />\n<D:getcontenttype />\n"); |
|
| 226 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 227 |
|
| 228 s = cx_str("<D:resourcetype />\n"); |
|
| 229 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 230 |
217 |
| 231 // crypto properties |
218 // crypto properties |
| 232 if(DAV_CRYPTO(sn) && !nocrypt) { |
219 if(DAV_CRYPTO(sn) && !nocrypt) { |
| 233 if(add_crypto_name) { |
220 if(add_crypto_name) { |
| 234 cxBufferPut(buf, '<'); |
221 cxBufferPut(buf, '<'); |
| 235 cxBufferPutString(buf, crypto_ns); |
222 cxBufferPutString(buf, crypto_ns); |
| 236 s = cx_str(":crypto-name />\n"); |
223 cxBufferPutString(buf, ":crypto-name />\n"); |
| 237 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 238 } |
224 } |
| 239 if(add_crypto_key) { |
225 if(add_crypto_key) { |
| 240 cxBufferPut(buf, '<'); |
226 cxBufferPut(buf, '<'); |
| 241 cxBufferPutString(buf, crypto_ns); |
227 cxBufferPutString(buf, crypto_ns); |
| 242 s = cx_str(":crypto-key />\n"); |
228 cxBufferPutString(buf, ":crypto-key />\n"); |
| 243 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 244 } |
229 } |
| 245 if(add_crypto_hash) { |
230 if(add_crypto_hash) { |
| 246 cxBufferPut(buf, '<'); |
231 cxBufferPut(buf, '<'); |
| 247 cxBufferPutString(buf, crypto_ns); |
232 cxBufferPutString(buf, crypto_ns); |
| 248 s = cx_str(":crypto-hash />\n"); |
233 cxBufferPutString(buf, ":crypto-hash />\n"); |
| 249 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 250 } |
234 } |
| 251 } |
235 } |
| 252 |
236 |
| 253 // extra properties |
237 // extra properties |
| 254 if(properties) { |
238 if(properties) { |
| 255 CxIterator i = cxListIterator(properties); |
239 CxIterator i = cxListIterator(properties); |
| 256 cx_foreach(DavProperty*, prop, i) { |
240 cx_foreach(DavProperty*, prop, i) { |
| 257 s = cx_str("<"); |
241 cxBufferPutString(buf, "<"); |
| 258 cxBufferWrite(s.ptr, 1, s.length, buf); |
242 cxBufferPutString(buf, prop->ns->prefix); |
| 259 s = cx_str(prop->ns->prefix); |
243 cxBufferPutString(buf, ":"); |
| 260 cxBufferWrite(s.ptr, 1, s.length, buf); |
244 cxBufferPutString(buf, prop->name); |
| 261 s = cx_str(":"); |
245 cxBufferPutString(buf, " />\n"); |
| 262 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 263 s = cx_str(prop->name); |
|
| 264 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 265 s = cx_str(" />\n"); |
|
| 266 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 267 } |
246 } |
| 268 } |
247 } |
| 269 |
248 |
| 270 // end |
249 // end |
| 271 cx_bprintf(buf, "</D:prop>\n</D:%s>\n", rootelm); |
250 cx_bprintf(buf, "</D:prop>\n</D:%s>\n", rootelm); |
| 276 |
255 |
| 277 CxBuffer* create_basic_propfind_request(void) { |
256 CxBuffer* create_basic_propfind_request(void) { |
| 278 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
257 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
| 279 cxstring s; |
258 cxstring s; |
| 280 |
259 |
| 281 s = cx_str("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
260 cxBufferPutString(buf, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
| 282 cxBufferWrite(s.ptr, 1, s.length, buf); |
261 |
| 283 |
262 cxBufferPutString(buf, "<D:propfind xmlns:D=\"DAV:\" xmlns:i=\""); |
| 284 s = cx_str("<D:propfind xmlns:D=\"DAV:\" xmlns:i=\""); |
263 cxBufferPutString(buf, DAV_NS); |
| 285 cxBufferWrite(s.ptr, 1, s.length, buf); |
264 cxBufferPutString(buf, "\" >\n"); |
| 286 s = cx_str(DAV_NS); |
|
| 287 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 288 s = cx_str("\" >\n"); |
|
| 289 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 290 |
265 |
| 291 // properties |
266 // properties |
| 292 s = cx_str("<D:prop>\n"); |
267 cxBufferPutString(buf, "<D:prop>\n"); |
| 293 cxBufferWrite(s.ptr, 1, s.length, buf); |
268 cxBufferPutString(buf, "<D:resourcetype />\n"); |
| 294 s = cx_str("<D:resourcetype />\n"); |
269 cxBufferPutString(buf, "<i:crypto-key />\n"); |
| 295 cxBufferWrite(s.ptr, 1, s.length, buf); |
270 cxBufferPutString(buf, "<i:crypto-name />\n"); |
| 296 s = cx_str("<i:crypto-key />\n"); |
271 cxBufferPutString(buf, "<i:crypto-hash />\n"); |
| 297 cxBufferWrite(s.ptr, 1, s.length, buf); |
272 cxBufferPutString(buf, "</D:prop>\n"); |
| 298 s = cx_str("<i:crypto-name />\n"); |
|
| 299 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 300 s = cx_str("<i:crypto-hash />\n"); |
|
| 301 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 302 s = cx_str("</D:prop>\n"); |
|
| 303 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 304 |
273 |
| 305 // end |
274 // end |
| 306 s = cx_str("</D:propfind>\n"); |
275 cxBufferPutString(buf, "</D:propfind>\n"); |
| 307 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 308 |
276 |
| 309 return buf; |
277 return buf; |
| 310 } |
278 } |
| 311 |
279 |
| 312 PropfindParser* create_propfind_parser(CxBuffer *response, char *url) { |
280 PropfindParser* create_propfind_parser(CxBuffer *response, char *url) { |
| 849 } |
817 } |
| 850 } |
818 } |
| 851 } |
819 } |
| 852 } |
820 } |
| 853 |
821 |
| 854 s = cx_str("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
822 cxBufferPutString(buf, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
| 855 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 856 |
823 |
| 857 // write root element and namespaces |
824 // write root element and namespaces |
| 858 s = cx_str("<D:propertyupdate xmlns:D=\"DAV:\""); |
825 cxBufferPutString(buf, "<D:propertyupdate xmlns:D=\"DAV:\""); |
| 859 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 860 CxMapIterator mapi = cxMapIterator(namespaces); |
826 CxMapIterator mapi = cxMapIterator(namespaces); |
| 861 cx_foreach(CxMapEntry*, entry, mapi) { |
827 cx_foreach(CxMapEntry*, entry, mapi) { |
| 862 s = cx_str(" xmlns:"); |
828 cxBufferPutString(buf, " xmlns:"); |
| 863 cxBufferWrite(s.ptr, 1, s.length, buf); |
829 cxBufferPutString(buf, cx_str(entry->value)); |
| 864 s = cx_str(entry->value); |
830 cxBufferPutString(buf, "=\""); |
| 865 cxBufferWrite(s.ptr, 1, s.length, buf); |
831 cxBufferPutString(buf, cx_strn(entry->key->data, entry->key->len)); |
| 866 s = cx_str("=\""); |
832 cxBufferPutString(buf, "\""); |
| 867 cxBufferWrite(s.ptr, 1, s.length, buf); |
833 } |
| 868 s = cx_strn(entry->key->data, entry->key->len); |
834 cxBufferPutString(buf, ">\n"); |
| 869 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 870 s = cx_str("\""); |
|
| 871 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 872 } |
|
| 873 s = cx_str(">\n"); |
|
| 874 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 875 |
835 |
| 876 if(data->set) { |
836 if(data->set) { |
| 877 s = cx_str("<D:set>\n<D:prop>\n"); |
837 cxBufferPutString(buf, "<D:set>\n<D:prop>\n"); |
| 878 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 879 CxIterator i = cxListIterator(data->set); |
838 CxIterator i = cxListIterator(data->set); |
| 880 cx_foreach(DavProperty*, property, i) { |
839 cx_foreach(DavProperty*, property, i) { |
| 881 char *prefix = cxMapGet(namespaces, cx_hash_key_str(property->ns->name)); |
840 char *prefix = cxMapGet(namespaces, cx_hash_key_str(property->ns->name)); |
| 882 if(!prefix) { |
841 if(!prefix) { |
| 883 prefix = "D"; |
842 prefix = "D"; |
| 884 } |
843 } |
| 885 |
844 |
| 886 // begin tag |
845 // begin tag |
| 887 s = cx_str("<"); |
846 cxBufferPutString(buf, "<"); |
| 888 cxBufferWrite(s.ptr, 1, s.length, buf); |
847 cxBufferPutString(buf, prefix); |
| 889 s = cx_str(prefix); |
848 cxBufferPutString(buf, ":"); |
| 890 cxBufferWrite(s.ptr, 1, s.length, buf); |
849 cxBufferPutString(buf, property->name); |
| 891 s = cx_str(":"); |
850 cxBufferPutString(buf, ">"); |
| 892 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 893 s = cx_str(property->name); |
|
| 894 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 895 s = cx_str(">"); |
|
| 896 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 897 |
851 |
| 898 // content |
852 // content |
| 899 DavXmlNode *content = property->value; |
853 DavXmlNode *content = property->value; |
| 900 if(content->type == DAV_XML_TEXT && !content->next) { |
854 if(content->type == DAV_XML_TEXT && !content->next) { |
| 901 cxBufferWrite(content->content, 1, content->contentlength, buf); |
855 cxBufferWrite(content->content, 1, content->contentlength, buf); |
| 902 } else { |
856 } else { |
| 903 dav_print_node(buf, (cx_write_func)cxBufferWrite, namespaces, content); |
857 dav_print_node(buf, (cx_write_func)cxBufferWrite, namespaces, content); |
| 904 } |
858 } |
| 905 |
859 |
| 906 // end tag |
860 // end tag |
| 907 s = cx_str("</"); |
861 cxBufferPutString(buf, "</"); |
| 908 cxBufferWrite(s.ptr, 1, s.length, buf); |
862 cxBufferPutString(buf, prefix); |
| 909 s = cx_str(prefix); |
863 cxBufferPutString(buf, ":"); |
| 910 cxBufferWrite(s.ptr, 1, s.length, buf); |
864 cxBufferPutString(buf, property->name); |
| 911 s = cx_str(":"); |
865 cxBufferPutString(buf, ">\n"); |
| 912 cxBufferWrite(s.ptr, 1, s.length, buf); |
866 } |
| 913 s = cx_str(property->name); |
867 cxBufferPutString(buf, "</D:prop>\n</D:set>\n"); |
| 914 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 915 s = cx_str(">\n"); |
|
| 916 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 917 } |
|
| 918 s = cx_str("</D:prop>\n</D:set>\n"); |
|
| 919 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 920 } |
868 } |
| 921 if(data->remove) { |
869 if(data->remove) { |
| 922 s = cx_str("<D:remove>\n<D:prop>\n"); |
870 cxBufferPutString(buf, "<D:remove>\n<D:prop>\n"); |
| 923 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 924 CxIterator i = cxListIterator(data->remove); |
871 CxIterator i = cxListIterator(data->remove); |
| 925 cx_foreach(DavProperty*, property, i) { |
872 cx_foreach(DavProperty*, property, i) { |
| 926 char *prefix = cxMapGet(namespaces, cx_hash_key_str(property->ns->name)); |
873 char *prefix = cxMapGet(namespaces, cx_hash_key_str(property->ns->name)); |
| 927 |
874 |
| 928 s = cx_str("<"); |
875 cxBufferPutString(buf, "<"); |
| 929 cxBufferWrite(s.ptr, 1, s.length, buf); |
876 cxBufferPutString(buf, prefix); |
| 930 s = cx_str(prefix); |
877 cxBufferPutString(buf, ":"); |
| 931 cxBufferWrite(s.ptr, 1, s.length, buf); |
878 cxBufferPutString(buf, property->name); |
| 932 s = cx_str(":"); |
879 cxBufferPutString(buf, " />\n"); |
| 933 cxBufferWrite(s.ptr, 1, s.length, buf); |
880 } |
| 934 s = cx_str(property->name); |
881 cxBufferPutString(buf, "</D:prop>\n</D:remove>\n"); |
| 935 cxBufferWrite(s.ptr, 1, s.length, buf); |
882 } |
| 936 s = cx_str(" />\n"); |
883 |
| 937 cxBufferWrite(s.ptr, 1, s.length, buf); |
884 cxBufferPutString(buf, "</D:propertyupdate>\n"); |
| 938 } |
|
| 939 s = cx_str("</D:prop>\n</D:remove>\n"); |
|
| 940 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 941 } |
|
| 942 |
|
| 943 s = cx_str("</D:propertyupdate>\n"); |
|
| 944 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 945 |
885 |
| 946 // cleanup namespace map |
886 // cleanup namespace map |
| 947 cxMapFree(namespaces); |
887 cxMapFree(namespaces); |
| 948 |
888 |
| 949 return buf; |
889 return buf; |
| 951 |
891 |
| 952 CxBuffer* create_crypto_proppatch_request(DavSession *sn, DavKey *key, const char *name, const char *hash) { |
892 CxBuffer* create_crypto_proppatch_request(DavSession *sn, DavKey *key, const char *name, const char *hash) { |
| 953 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
893 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
| 954 cxstring s; |
894 cxstring s; |
| 955 |
895 |
| 956 s = cx_str("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
896 cxBufferPutString(buf, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
| 957 cxBufferWrite(s.ptr, 1, s.length, buf); |
897 |
| 958 |
898 cxBufferPutString(buf, "<D:propertyupdate xmlns:D=\"DAV:\" xmlns:idav=\"" DAV_NS "\">\n"); |
| 959 s = cx_str("<D:propertyupdate xmlns:D=\"DAV:\" xmlns:idav=\"" DAV_NS "\">\n"); |
899 |
| 960 cxBufferWrite(s.ptr, 1, s.length, buf); |
900 cxBufferPutString(buf, "<D:set>\n<D:prop>\n"); |
| 961 |
|
| 962 s = cx_str("<D:set>\n<D:prop>\n"); |
|
| 963 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 964 |
901 |
| 965 if(DAV_ENCRYPT_NAME(sn)) { |
902 if(DAV_ENCRYPT_NAME(sn)) { |
| 966 s = cx_str("<idav:crypto-name>"); |
903 cxBufferPutString(buf, "<idav:crypto-name>"); |
| 967 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 968 char *crname = aes_encrypt(name, strlen(name), key); |
904 char *crname = aes_encrypt(name, strlen(name), key); |
| 969 cxBufferPutString(buf, crname); |
905 cxBufferPutString(buf, crname); |
| 970 free(crname); |
906 free(crname); |
| 971 s = cx_str("</idav:crypto-name>\n"); |
907 cxBufferPutString(buf, "</idav:crypto-name>\n"); |
| 972 cxBufferWrite(s.ptr, 1, s.length, buf); |
908 } |
| 973 } |
909 |
| 974 |
910 cxBufferPutString(buf, "<idav:crypto-key>"); |
| 975 s = cx_str("<idav:crypto-key>"); |
|
| 976 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 977 cxBufferPutString(buf, key->name); |
911 cxBufferPutString(buf, key->name); |
| 978 s = cx_str("</idav:crypto-key>\n"); |
912 cxBufferPutString(buf, "</idav:crypto-key>\n"); |
| 979 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 980 |
913 |
| 981 if(hash) { |
914 if(hash) { |
| 982 s = cx_str("<idav:crypto-hash>"); |
915 cxBufferPutString(buf, "<idav:crypto-hash>"); |
| 983 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 984 cxBufferPutString(buf, hash); |
916 cxBufferPutString(buf, hash); |
| 985 s = cx_str("</idav:crypto-hash>\n"); |
917 cxBufferPutString(buf, "</idav:crypto-hash>\n"); |
| 986 cxBufferWrite(s.ptr, 1, s.length, buf); |
918 } |
| 987 } |
919 |
| 988 |
920 cxBufferPutString(buf, "</D:prop>\n</D:set>\n</D:propertyupdate>\n"); |
| 989 s = cx_str("</D:prop>\n</D:set>\n</D:propertyupdate>\n"); |
|
| 990 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 991 |
921 |
| 992 return buf; |
922 return buf; |
| 993 } |
923 } |
| 994 |
924 |
| 995 /* ----------------------------- PUT ----------------------------- */ |
925 /* ----------------------------- PUT ----------------------------- */ |
| 1168 |
1098 |
| 1169 CxBuffer* create_lock_request(void) { |
1099 CxBuffer* create_lock_request(void) { |
| 1170 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
1100 CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND); |
| 1171 cxstring s; |
1101 cxstring s; |
| 1172 |
1102 |
| 1173 s = cx_str("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
1103 cxBufferPutString(buf, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); |
| 1174 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 1175 |
1104 |
| 1176 s = cx_str("<D:lockinfo xmlns:D=\"DAV:\">\n" |
1105 s = cx_str("<D:lockinfo xmlns:D=\"DAV:\">\n" |
| 1177 "<D:lockscope><D:exclusive/></D:lockscope>\n" |
1106 "<D:lockscope><D:exclusive/></D:lockscope>\n" |
| 1178 "<D:locktype><D:write/></D:locktype>\n" |
1107 "<D:locktype><D:write/></D:locktype>\n" |
| 1179 "<D:owner><D:href>http://davutils.org/libidav/</D:href></D:owner>\n"); |
1108 "<D:owner><D:href>http://davutils.org/libidav/</D:href></D:owner>\n"); |
| 1180 cxBufferWrite(s.ptr, 1, s.length, buf); |
1109 cxBufferPutString(buf, s); |
| 1181 |
1110 |
| 1182 s = cx_str("</D:lockinfo>\n"); |
1111 cxBufferPutString(buf, "</D:lockinfo>\n"); |
| 1183 cxBufferWrite(s.ptr, 1, s.length, buf); |
|
| 1184 |
1112 |
| 1185 return buf; |
1113 return buf; |
| 1186 } |
1114 } |
| 1187 |
1115 |
| 1188 int parse_lock_response(DavSession *sn, CxBuffer *response, LockDiscovery *lock) { |
1116 int parse_lock_response(DavSession *sn, CxBuffer *response, LockDiscovery *lock) { |