nextcloud-desktop/src/csync.h
Andreas Schneider ff7e28f82c Completly hide the csync structure for the user of the library.
So it easier to change the API/ABI.
2008-02-29 11:41:15 +01:00

93 lines
2.1 KiB
C

/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2006-2008 by Andreas Schneider <mail@cynapses.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* vim: ft=c.doxygen ts=2 sw=2 et cindent
*/
/**
* @file csync.h
*
* @brief Application developer interface for csync.
*
* @defgroup csyncPublicAPI csync public API
*
* @{
*/
#ifndef _CSYNC_H
#define _CSYNC_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* csync version information
*/
#define CSYNC_VERSION_MAJOR 0
#define CSYNC_VERSION_MINOR 1
#define CSYNC_VERSION_PATCH 0
#define CSYNC_VERSION_STRING "csync version 0.1.0"
/*
* csync file declarations
*/
#define CSYNC_CONF_DIR ".csync"
#define CSYNC_CONF_FILE "csync.conf"
#define CSYNC_LOG_FILE "csync_log.conf"
#define CSYNC_EXCLUDE_FILE "csync_exclude.conf"
#define CSYNC_JOURNAL_FILE "csync_journal.db"
#define CSYNC_LOCK_FILE "lock"
/*
* Forward declarations
*/
struct csync_s; typedef struct csync_s CSYNC;
/**
* @brief Allocate a csync context.
*
* @param ctx context variable to allocate
*
* @return 0 on success, less than 0 if an error occured with errno set.
*/
int csync_create(CSYNC **csync);
int csync_init(CSYNC *ctx);
int csync_update(CSYNC *ctx);
int csync_reconcile(CSYNC *ctx);
int csync_propagate(CSYNC *ctx);
int csync_destroy(CSYNC *ctx);
const char *csync_version(void);
#ifdef __cplusplus
}
#endif
/**
* }@
*/
#endif /* _CSYNC_H */