doc
csync_util.h
Go to the documentation of this file.
00001 /*
00002  * libcsync -- a library to sync a directory with another
00003  *
00004  * Copyright (c) 2006 by Andreas Schneider <mail@cynapses.org>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #ifndef _CSYNC_UTIL_H
00022 #define _CSYNC_UTIL_H
00023 
00024 #include <stdint.h>
00025 
00026 #include "csync_private.h"
00027 
00028 const char *csync_instruction_str(enum csync_instructions_e instr);
00029 
00030 void csync_memstat_check(void);
00031 
00032 int csync_merge_file_trees(CSYNC *ctx);
00033 
00034 int csync_unix_extensions(CSYNC *ctx);
00035 
00036 /* Normalize the uri to <host>/<path> */
00037 uint64_t csync_create_statedb_hash(CSYNC *ctx);
00038 
00039 /* Calculate the md5 sum for a file given by filename.
00040  * Caller has to free the memory. */
00041 char* csync_file_md5(const char *filename);
00042 
00043 /* Create an md5 sum from a data pointer with a given length.
00044  * Caller has to free the memory */
00045 char* csync_buffer_md5(const char *str, int length);
00046 
00047 #endif /* _CSYNC_UTIL_H */
00048 /* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */