doc
csync_util.h
Go to the documentation of this file.
1 /*
2  * libcsync -- a library to sync a directory with another
3  *
4  * Copyright (c) 2006 by Andreas Schneider <mail@cynapses.org>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _CSYNC_UTIL_H
22 #define _CSYNC_UTIL_H
23 
24 #include <stdint.h>
25 
26 #include "csync_private.h"
27 
28 const char *csync_instruction_str(enum csync_instructions_e instr);
29 
30 void csync_memstat_check(void);
31 
33 
35 
36 /* Normalize the uri to <host>/<path> */
37 uint64_t csync_create_statedb_hash(CSYNC *ctx);
38 
39 /* Calculate the md5 sum for a file given by filename.
40  * Caller has to free the memory. */
41 char* csync_file_md5(const char *filename);
42 
43 /* Create an md5 sum from a data pointer with a given length.
44  * Caller has to free the memory */
45 char* csync_buffer_md5(const char *str, int length);
46 
47 #endif /* _CSYNC_UTIL_H */
48 /* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */