From: <svn...@op...> - 2009-03-28 18:22:36
|
Author: dgollub Date: Sat Mar 28 19:22:32 2009 New Revision: 5384 URL: http://www.opensync.org/changeset/5384 Log: Remove OSyncArchive interfaces from public API. Deleted: trunk/opensync/archive/opensync_archive.h Modified: trunk/opensync.sym trunk/opensync/CMakeLists.txt trunk/opensync/archive/opensync_archive.c trunk/opensync/archive/opensync_archive_internals.h trunk/opensync/engine/opensync_engine.c trunk/opensync/engine/opensync_mapping_engine.c trunk/opensync/engine/opensync_mapping_entry_engine.c trunk/opensync/engine/opensync_obj_engine.c trunk/opensync/engine/opensync_sink_engine.c trunk/opensync/mapping/opensync_mapping_table.c trunk/opensync/opensync-archive.h trunk/tests/archive-tests/check_archive.c trunk/tests/support.c trunk/tests/support.h trunk/tools/osyncdump.c Modified: trunk/opensync.sym ============================================================================== --- trunk/opensync.sym Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync.sym Sat Mar 28 19:22:32 2009 (r5384) @@ -1,10 +1,6 @@ osync_anchor_compare osync_anchor_retrieve osync_anchor_update -osync_archive_load_changes -osync_archive_new -osync_archive_ref -osync_archive_unref osync_capabilities_assemble osync_capabilities_get_first osync_capabilities_new Modified: trunk/opensync/CMakeLists.txt ============================================================================== --- trunk/opensync/CMakeLists.txt Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/CMakeLists.txt Sat Mar 28 19:22:32 2009 (r5384) @@ -113,7 +113,6 @@ INSTALL( FILES opensync.h - opensync-archive.h opensync-capabilities.h opensync-client.h opensync-context.h Modified: trunk/opensync/archive/opensync_archive.c ============================================================================== --- trunk/opensync/archive/opensync_archive.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/archive/opensync_archive.c Sat Mar 28 19:22:32 2009 (r5384) @@ -26,7 +26,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-archive.h" #include "opensync_archive_private.h" #include "opensync_archive_internals.h" #include "db/opensync_db_internals.h" Modified: trunk/opensync/archive/opensync_archive_internals.h ============================================================================== --- trunk/opensync/archive/opensync_archive_internals.h Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/archive/opensync_archive_internals.h Sat Mar 28 19:22:32 2009 (r5384) @@ -35,6 +35,41 @@ */ /*@{*/ +/** + * @brief Creates a new archive object + * @param filename the full path to the archive database file + * @param error Pointer to an error struct + * @return The pointer to the newly allocated archive object or NULL in case of error + */ +OSYNC_TEST_EXPORT OSyncArchive *osync_archive_new(const char *filename, OSyncError **error); + +/** + * @brief Increments the reference counter + * @param archive The pointer to an archive object + */ +OSYNC_TEST_EXPORT OSyncArchive *osync_archive_ref(OSyncArchive *archive); + +/** + * @brief Decrement the reference counter. The archive object will + * be freed if there is no more reference to it. + * @param archive The pointer to an archive object + */ +OSYNC_TEST_EXPORT void osync_archive_unref(OSyncArchive *archive); + +/** + * @brief Loads all changes from group archive for a certain object type. + * + * @param archive The group archive + * @param objtype Requested object type + * @param ids List to store the archive (database) ids of each entry + * @param uids List to store uids of each entry + * @param mappingids List to store mappingids for each entry + * @param memberids List to store member IDs for each entry + * @param error Pointer to an error struct + * @return TRUE on when all changes successfully loaded otherwise FALSE + */ +OSYNC_TEST_EXPORT osync_bool osync_archive_load_changes(OSyncArchive *archive, const char *objtype, OSyncList **ids, OSyncList **uids, OSyncList **mappingids, OSyncList **memberids, OSyncError **error); + /** * @brief Stores data of an entry in the group archive database (blob). Modified: trunk/opensync/engine/opensync_engine.c ============================================================================== --- trunk/opensync/engine/opensync_engine.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/engine/opensync_engine.c Sat Mar 28 19:22:32 2009 (r5384) @@ -28,7 +28,6 @@ #include "opensync-format.h" #include "opensync-data.h" #include "opensync-plugin.h" -#include "opensync-archive.h" #include "opensync-merger.h" #include "opensync-xmlformat.h" Modified: trunk/opensync/engine/opensync_mapping_engine.c ============================================================================== --- trunk/opensync/engine/opensync_mapping_engine.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/engine/opensync_mapping_engine.c Sat Mar 28 19:22:32 2009 (r5384) @@ -22,7 +22,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-archive.h" #include "opensync-group.h" #include "opensync-engine.h" #include "opensync-client.h" Modified: trunk/opensync/engine/opensync_mapping_entry_engine.c ============================================================================== --- trunk/opensync/engine/opensync_mapping_entry_engine.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/engine/opensync_mapping_entry_engine.c Sat Mar 28 19:22:32 2009 (r5384) @@ -21,7 +21,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-archive.h" #include "opensync-group.h" #include "opensync-engine.h" #include "opensync-data.h" Modified: trunk/opensync/engine/opensync_obj_engine.c ============================================================================== --- trunk/opensync/engine/opensync_obj_engine.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/engine/opensync_obj_engine.c Sat Mar 28 19:22:32 2009 (r5384) @@ -21,7 +21,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-archive.h" #include "opensync-group.h" #include "opensync-engine.h" #include "opensync-client.h" Modified: trunk/opensync/engine/opensync_sink_engine.c ============================================================================== --- trunk/opensync/engine/opensync_sink_engine.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/engine/opensync_sink_engine.c Sat Mar 28 19:22:32 2009 (r5384) @@ -21,7 +21,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-archive.h" #include "opensync-group.h" #include "opensync-engine.h" #include "opensync-data.h" Modified: trunk/opensync/mapping/opensync_mapping_table.c ============================================================================== --- trunk/opensync/mapping/opensync_mapping_table.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/mapping/opensync_mapping_table.c Sat Mar 28 19:22:32 2009 (r5384) @@ -22,7 +22,6 @@ #include "opensync_internals.h" #include "opensync-mapping.h" -#include "opensync-archive.h" #include "opensync-support.h" #include "opensync_mapping_table_internals.h" Modified: trunk/opensync/opensync-archive.h ============================================================================== --- trunk/opensync/opensync-archive.h Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/opensync/opensync-archive.h Sat Mar 28 19:22:32 2009 (r5384) @@ -1,30 +1,2 @@ -/* - * libopensync - A synchronization framework - * Copyright (C) 2004-2005 Armin Bauer <arm...@op...> - * - * 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 OPENSYNCARCHIVE_H_ -#define OPENSYNCARCHIVE_H_ - -OPENSYNC_BEGIN_DECLS - -#include "archive/opensync_archive.h" - -OPENSYNC_END_DECLS - -#endif /*OPENSYNCARCHIVE_H_*/ +/* FIXME: Legacy include - will be dropped with 0.39 adapt your incldue. */ +#warning "FIXME: Legacy include! - will be dropped with 0.39 adapt your incldue" Modified: trunk/tests/archive-tests/check_archive.c ============================================================================== --- trunk/tests/archive-tests/check_archive.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/tests/archive-tests/check_archive.c Sat Mar 28 19:22:32 2009 (r5384) @@ -1,7 +1,6 @@ #include "support.h" #include <opensync/opensync.h> -#include <opensync/opensync-archive.h> #include "archive/opensync_archive_internals.h" Modified: trunk/tests/support.c ============================================================================== --- trunk/tests/support.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/tests/support.c Sat Mar 28 19:22:32 2009 (r5384) @@ -4,6 +4,7 @@ #endif #include "opensync/engine/opensync_engine_internals.h" +#include "opensync/archive/opensync_archive_internals.h" char *olddir = NULL; Modified: trunk/tests/support.h ============================================================================== --- trunk/tests/support.h Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/tests/support.h Sat Mar 28 19:22:32 2009 (r5384) @@ -7,7 +7,6 @@ #include <opensync/opensync_internals.h> #include <opensync/opensync-engine.h> #include <opensync/opensync-mapping.h> -#include <opensync/opensync-archive.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-format.h> #include <opensync/opensync-data.h> Modified: trunk/tools/osyncdump.c ============================================================================== --- trunk/tools/osyncdump.c Sat Mar 28 19:16:08 2009 (r5383) +++ trunk/tools/osyncdump.c Sat Mar 28 19:22:32 2009 (r5384) @@ -1,6 +1,5 @@ #include <opensync/opensync.h> #include <opensync/opensync-group.h> -#include <opensync/opensync-archive.h> #include <opensync/opensync-mapping.h> #include <opensync/opensync-helper.h> @@ -9,7 +8,6 @@ #include <string.h> #include <sys/types.h> //#include <sys/wait.h> -#include <sqlite3.h> #include <glib.h> @@ -31,9 +29,14 @@ static void dump_map_objtype(OSyncGroupEnv *env, const char *objtype, const char *groupname) { + printf("Dumping of mappings got temporarliy disabled\n"); + +/* FIXME: Temporarily disabled - OSyncArchive got removed from 0.40 API draft */ +#if 0 + OSyncError *error = NULL; OSyncGroup *group = osync_group_env_find_group(env, groupname); - + char *path = g_strdup_printf("%s/archive.db", osync_group_get_configdir(group)); OSyncArchive *archive = osync_archive_new(path, &error); OSyncList *ids = NULL; @@ -78,6 +81,7 @@ error: printf("ERROR: %s", osync_error_print(&error)); osync_error_unref(&error); +#endif } static void dump_map(OSyncGroupEnv *env, const char *groupname) |