From: <svn...@op...> - 2009-07-10 08:42:03
|
Author: bricks Date: Fri Jul 10 10:41:55 2009 New Revision: 5699 URL: http://www.opensync.org/changeset/5699 Log: added new merger api refs #1084 Added: branches/opensync-ticket1084/opensync/format/opensync_merger.h branches/opensync-ticket1084/opensync/format/opensync_merger_private.h Added: branches/opensync-ticket1084/opensync/format/opensync_merger.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/opensync-ticket1084/opensync/format/opensync_merger.h Fri Jul 10 10:41:55 2009 (r5699) @@ -0,0 +1,43 @@ +/* + * libopensync - A synchronization framework + * Copyright (C) 2009 Bjoern Ricks <bjo...@go...> + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef OPENSYNC_MERGER_H_ +#define OPENSYNC_MERGER_H_ + +/** + * @defgroup OSyncMergerAPI OpenSync Merger + * @ingroup OSyncFormat + * @brief Functions for merging formats + * + */ +/*@{*/ + +typedef void * (* OSyncMergerInitializeFunc) (OSyncError **error); +typedef void (* OSyncMergerFinalizeFunc) (void *user_data); + +OSYNC_EXPORT OSyncMerger *osync_merger_new(const char *objformat, const char *capsformat, OSyncError **error) ; + +OSYNC_EXPORT void osync_merger_set_initialize_func(OSyncMerger *merger, OSyncMergerInitializeFunc initialize_func); + +OSYNC_EXPORT void osync_merger_set_finalize_func(OSyncMerger *merger, OSyncMergerInitializeFunc finalize_func); + +/*@}*/ + +#endif /* OPENSYNC_MERGER_H_ */ Added: branches/opensync-ticket1084/opensync/format/opensync_merger_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/opensync-ticket1084/opensync/format/opensync_merger_private.h Fri Jul 10 10:41:55 2009 (r5699) @@ -0,0 +1,43 @@ +/* + * libopensync - A synchronization framework + * Copyright (C) 2009 Bjoern Ricks <bjo...@go...> + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef OPENSYNC_MERGER_PRIVATE_H_ +#define OPENSYNC_MERGER_PRIVATE_H_ + +/** + * @defgroup OSyncMergerrPrivateAPI OpenSync Merger Private + * @ingroup OSyncFormatPrivate + * @brief Private part for merging formats + * + */ +/*@{*/ + +struct OSyncMerger { + const char *objformat; + const char *capsformat; + int ref_count; + OSyncMergerInitializeFunc initialize_func; + OSyncFormatFinalizeFunc finalize_func; + void *user_data; +}; + +/*@}*/ + +#endif /* OPENSYNC_MERGER_PRIVATE_H_ */ |