csync_update.h

Go to the documentation of this file.
00001 /*
00002  * libcsync -- a library to sync a directory with another
00003  *
00004  * Copyright (c) 2008      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  * vim: ft=c.doxygen ts=2 sw=2 et cindent
00021  */
00022 
00023 #ifndef _CSYNC_UPDATE_H
00024 #define _CSYNC_UPDATE_H
00025 
00026 #include "csync.h"
00027 #include "vio/csync_vio_file_stat.h"
00028 
00029 /**
00030  * Types for files
00031  */
00032 enum csync_ftw_flags_e {
00033   CSYNC_FTW_FLAG_FILE,    /* Regular file.  */
00034   CSYNC_FTW_FLAG_DIR,   /* Directory.  */
00035   CSYNC_FTW_FLAG_DNR,   /* Unreadable directory.  */
00036   CSYNC_FTW_FLAG_NSTAT,   /* Unstatable file.  */
00037   CSYNC_FTW_FLAG_SLINK,   /* Symbolic link.  */
00038   CSYNC_FTW_FLAG_SPEC,    /* Special file (fifo, ...).  */
00039   /* These flags are only passed from the `nftw' function.  */
00040   CSYNC_FTW_FLAG_DP,    /* Directory, all subdirs have been visited. */
00041   CSYNC_FTW_FLAG_SLN    /* Symbolic link naming non-existing file.  */
00042 };
00043 
00044 typedef int (*csync_walker_fn) (CSYNC *ctx, const char *file, const csync_vio_file_stat_t *fs, enum csync_ftw_flags_e flag);
00045 
00046 int csync_walker(CSYNC *ctx, const char *file, const csync_vio_file_stat_t *fs, enum csync_ftw_flags_e flag);
00047 int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn, unsigned int depth);
00048 
00049 #endif /* _CSYNC_UPDATE_H */

Generated on Mon May 4 17:43:35 2009 for doc by  doxygen 1.5.6