00001 /* 00002 * libcsync -- a library to sync a directory with another 00003 * 00004 * Copyright (c) 2012 by Klaas Freitag <freitag@owncloud.com> 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 /** 00022 * @file csync_dbtree.h 00023 * 00024 * @brief Private interface of csync 00025 * 00026 * @defgroup csyncdbtreeInternals csync statedb internals 00027 * @ingroup csyncInternalAPI 00028 * 00029 * @{ 00030 */ 00031 00032 #ifndef _CSYNC_DBTREE_H 00033 #define _CSYNC_DBTREE_H 00034 00035 #include "c_lib.h" 00036 #include "csync_private.h" 00037 #include "vio/csync_vio_handle.h" 00038 00039 /** 00040 * @brief Open a directory based on the statedb. 00041 * 00042 * This function reads the list of files within a directory from statedb and 00043 * builds up a list in memory. 00044 * 00045 * @param ctx The csync context. 00046 * @param name The directory name. 00047 * 00048 * @return 0 on success, less than 0 if an error occured with errno set. 00049 */ 00050 csync_vio_method_handle_t *csync_dbtree_opendir(CSYNC *ctx, const char *name); 00051 00052 int csync_dbtree_closedir(CSYNC *ctx, csync_vio_method_handle_t *dhandle); 00053 00054 csync_vio_file_stat_t *csync_dbtree_readdir(CSYNC *ctx, csync_vio_method_handle_t *dhandle); 00055 00056 /** 00057 * }@ 00058 */ 00059 #endif /* _CSYNC_DBTREE_H */ 00060 /* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */