libidav/resource.c

changeset 182
ca07f14f7bfe
parent 181
a8f8cdbf85df
child 185
cd42cccee550
equal deleted inserted replaced
181:a8f8cdbf85df 182:ca07f14f7bfe
27 */ 27 */
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 #include <stdlib.h> 30 #include <stdlib.h>
31 #include <string.h> 31 #include <string.h>
32 #include <stdbool.h>
32 #include <libxml/tree.h> 33 #include <libxml/tree.h>
33 34
34 #include "utils.h" 35 #include "utils.h"
35 #include "session.h" 36 #include "session.h"
36 #include "methods.h" 37 #include "methods.h"
891 return 1; 892 return 1;
892 } 893 }
893 } 894 }
894 895
895 int dav_copy(DavResource *res, char *newpath) { 896 int dav_copy(DavResource *res, char *newpath) {
896 return dav_cp_mv(res, newpath, 1, 0); 897 return dav_cp_mv(res, newpath, true, false);
897 } 898 }
898 899
899 int dav_move(DavResource *res, char *newpath) { 900 int dav_move(DavResource *res, char *newpath) {
900 return dav_cp_mv(res, newpath, 0, 0); 901 return dav_cp_mv(res, newpath, false, false);
902 }
903
904 int dav_copy_o(DavResource *res, char *newpath, DavBool override) {
905 return dav_cp_mv(res, newpath, true, override);
906 }
907
908 int dav_move_o(DavResource *res, char *newpath, DavBool override) {
909 return dav_cp_mv(res, newpath, false, override);
901 } 910 }
902 911
903 912
904 int resource_add_crypto_info(DavSession *sn, char *href, char *name, char *hash) { 913 int resource_add_crypto_info(DavSession *sn, char *href, char *name, char *hash) {
905 if(!DAV_IS_ENCRYPTED(sn)) { 914 if(!DAV_IS_ENCRYPTED(sn)) {

mercurial