dav/sync.h

changeset 542
060a8cda7f62
parent 536
877f7c4a203b
child 544
9e85e1ec1155
equal deleted inserted replaced
541:e59a989d890d 542:060a8cda7f62
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2018 Olaf Wintermann. All rights reserved. 4 * Copyright 2019 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
201 int cmd_list_dirs(); 201 int cmd_list_dirs();
202 int cmd_check_repositories(); 202 int cmd_check_repositories();
203 203
204 char* create_locktoken_file(const char *syncdirname, const char *locktoken); 204 char* create_locktoken_file(const char *syncdirname, const char *locktoken);
205 205
206 /*
207 * if encryption is enabled, the crypto-hash is returned as hex string
208 * otherwise the content-hash is returned
209 */
210 char* sync_get_content_hash(DavResource *res);
211
212 /*
213 * if encryption is enabled, sets the crypto-hash property
214 * otherwise it sets the content-hash property
215 *
216 * hashdata must be raw sha256 data and 32 bytes long
217 */
218 void sync_set_content_hash(DavResource *res, const char *hashdata);
219
206 #ifdef __cplusplus 220 #ifdef __cplusplus
207 } 221 }
208 #endif 222 #endif
209 223
210 #endif /* SYNC_H */ 224 #endif /* SYNC_H */

mercurial