libidav/methods.c

branch
dav-2
changeset 924
e1f053ba2c10
parent 921
3ffee649f0b1
--- a/libidav/methods.c	Mon Jul 06 20:29:54 2026 +0200
+++ b/libidav/methods.c	Tue Jul 07 21:52:33 2026 +0200
@@ -153,7 +153,7 @@
     return buf;
 }
 
-CxBuffer* create_propfind_request(DavSession *sn, CxList *properties, char *rootelm, DavBool nocrypt) {
+CxBuffer* create_propfind_request(DavSession *sn, CxList *properties, const char *rootelm, DavBool nocrypt) {
     CxBuffer *buf = cxBufferCreate(cxDefaultAllocator, NULL, 512, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND);
     cxstring s;
     
@@ -277,7 +277,7 @@
     return buf;
 }
 
-PropfindParser* create_propfind_parser(CxBuffer *response, char *url) {
+PropfindParser* create_propfind_parser(CxBuffer *response, const char *url) {
     PropfindParser *parser = malloc(sizeof(PropfindParser));
     if(!parser) {
         return NULL;
@@ -472,7 +472,7 @@
     return root;
 }
 
-DavResource* response2resource(DavSession *sn, ResponseTag *response, char *parent_path) {
+DavResource* response2resource(DavSession *sn, ResponseTag *response, const char *parent_path) {
     // create resource
     char *name = NULL;
     DavKey *key = NULL;
@@ -751,7 +751,7 @@
 
 CURLcode do_proppatch_request(
         DavSession *sn,
-        char *lock,
+        const char *lock,
         CxBuffer *request,
         CxBuffer *response)
 {       
@@ -929,7 +929,7 @@
     return s*n;
 }
 
-CURLcode do_put_request(DavSession *sn, char *lock, DavBool create, void *data, dav_read_func read_func, dav_seek_func seek_func, size_t length) {
+CURLcode do_put_request(DavSession *sn, const char *lock, DavBool create, void *data, dav_read_func read_func, dav_seek_func seek_func, size_t length) {
     CURL *handle = sn->handle;
     curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, NULL);
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 1L);
@@ -985,7 +985,7 @@
     return ret;
 }
 
-CURLcode do_delete_request(DavSession *sn, char *lock, CxBuffer *response) { 
+CURLcode do_delete_request(DavSession *sn, const char *lock, CxBuffer *response) { 
     CURL *handle = sn->handle;
     struct curl_slist *headers = NULL;
     if(lock) {
@@ -1010,7 +1010,7 @@
     return ret;
 }
 
-CURLcode do_mkcol_request(DavSession *sn, char *lock) {
+CURLcode do_mkcol_request(DavSession *sn, const char *lock) {
     CURL *handle = sn->handle;
     struct curl_slist *headers = NULL;
     if(lock) {
@@ -1213,7 +1213,7 @@
     return ret;
 }
 
-CURLcode do_unlock_request(DavSession *sn, char *locktoken) {   
+CURLcode do_unlock_request(DavSession *sn, const char *locktoken) {   
     CURL *handle = sn->handle;
     curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "UNLOCK");
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
@@ -1233,7 +1233,7 @@
     return ret;
 }
 
-CURLcode do_simple_request(DavSession *sn, const char *method, char *locktoken) {
+CURLcode do_simple_request(DavSession *sn, const char *method, const char *locktoken) {
     CURL *handle = sn->handle;
     curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, method);
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);

mercurial