dav/sync.h

changeset 542
060a8cda7f62
parent 536
877f7c4a203b
child 544
9e85e1ec1155
--- a/dav/sync.h	Thu Mar 28 11:19:13 2019 +0100
+++ b/dav/sync.h	Thu Mar 28 11:54:27 2019 +0100
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 2018 Olaf Wintermann. All rights reserved.
+ * Copyright 2019 Olaf Wintermann. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -203,6 +203,20 @@
 
 char* create_locktoken_file(const char *syncdirname, const char *locktoken);
 
+/*
+ * if encryption is enabled, the crypto-hash is returned as hex string
+ * otherwise the content-hash is returned                 
+ */
+char* sync_get_content_hash(DavResource *res);
+
+/*
+ * if encryption is enabled, sets the crypto-hash property
+ * otherwise it sets the content-hash property
+ * 
+ * hashdata must be raw sha256 data and 32 bytes long
+ */
+void sync_set_content_hash(DavResource *res, const char *hashdata);
+
 #ifdef	__cplusplus
 }
 #endif

mercurial