You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(56) |
Apr
(109) |
May
(15) |
Jun
(3) |
Jul
(37) |
Aug
(96) |
Sep
(40) |
Oct
(4) |
Nov
(54) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(47) |
Feb
(30) |
Mar
(102) |
Apr
(120) |
May
(68) |
Jun
(54) |
Jul
(53) |
Aug
(122) |
Sep
(190) |
Oct
(71) |
Nov
(85) |
Dec
(108) |
2007 |
Jan
(72) |
Feb
(190) |
Mar
(53) |
Apr
(101) |
May
(145) |
Jun
(148) |
Jul
(167) |
Aug
(143) |
Sep
(23) |
Oct
(198) |
Nov
(223) |
Dec
(195) |
2008 |
Jan
(100) |
Feb
(129) |
Mar
(79) |
Apr
(77) |
May
(34) |
Jun
(95) |
Jul
(112) |
Aug
(160) |
Sep
(82) |
Oct
(124) |
Nov
(199) |
Dec
(355) |
2009 |
Jan
(436) |
Feb
(89) |
Mar
(298) |
Apr
(189) |
May
(33) |
Jun
(88) |
Jul
(105) |
Aug
(44) |
Sep
(181) |
Oct
(87) |
Nov
(75) |
Dec
(1) |
2010 |
Jan
(63) |
Feb
(21) |
Mar
(3) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(26) |
Aug
(37) |
Sep
(26) |
Oct
(15) |
Nov
(13) |
Dec
|
From: <svn...@op...> - 2009-03-28 19:13:04
|
Author: dgollub Date: Sat Mar 28 20:12:58 2009 New Revision: 5399 URL: http://www.opensync.org/changeset/5399 Log: Dropped legaacy include.h Modified: plugins/python-module/src/python_module.c Modified: plugins/python-module/src/python_module.c ============================================================================== --- plugins/python-module/src/python_module.c Sat Mar 28 20:12:31 2009 (r5398) +++ plugins/python-module/src/python_module.c Sat Mar 28 20:12:58 2009 (r5399) @@ -25,7 +25,6 @@ #include <Python.h> #include <opensync/opensync.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <signal.h> #include <glib.h> |
From: <svn...@op...> - 2009-03-28 19:12:42
|
Author: dgollub Date: Sat Mar 28 20:12:31 2009 New Revision: 5398 URL: http://www.opensync.org/changeset/5398 Log: Dropped legaacy include. Replaced opensync-merger.h with opensync-capabilities.h Modified: plugins/ldap-sync/src/ldap_plugin.h Modified: plugins/ldap-sync/src/ldap_plugin.h ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.h Sat Mar 28 20:10:58 2009 (r5397) +++ plugins/ldap-sync/src/ldap_plugin.h Sat Mar 28 20:12:31 2009 (r5398) @@ -50,11 +50,10 @@ #include <libxslt/xsltutils.h> #include <libxslt/transform.h> #include <opensync/opensync.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-helper.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-plugin.h> #include <opensync/opensync-time.h> #include <opensync/opensync-version.h> |
From: <svn...@op...> - 2009-03-28 19:11:07
|
Author: dgollub Date: Sat Mar 28 20:10:58 2009 New Revision: 5397 URL: http://www.opensync.org/changeset/5397 Log: Dropped legaacy include. Replace opensync-merger.h with opensync-capabilities.h Modified: plugins/syncml/src/syncml_common.h Modified: plugins/syncml/src/syncml_common.h ============================================================================== --- plugins/syncml/src/syncml_common.h Sat Mar 28 20:10:40 2009 (r5396) +++ plugins/syncml/src/syncml_common.h Sat Mar 28 20:10:58 2009 (r5397) @@ -27,7 +27,7 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> |
From: <svn...@op...> - 2009-03-28 19:10:44
|
Author: dgollub Date: Sat Mar 28 20:10:40 2009 New Revision: 5396 URL: http://www.opensync.org/changeset/5396 Log: Dropped legaacy include. Replace opensync-merger.h with opensync-capabilities.h Modified: plugins/opie-sync/src/opie_format.c plugins/opie-sync/src/opie_sync.c Modified: plugins/opie-sync/src/opie_format.c ============================================================================== --- plugins/opie-sync/src/opie_format.c Sat Mar 28 20:10:15 2009 (r5395) +++ plugins/opie-sync/src/opie_format.c Sat Mar 28 20:10:40 2009 (r5396) @@ -31,7 +31,7 @@ #include <opensync/opensync.h> #include <opensync/opensync-time.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-xmlformat.h> enum OpieTodoState { Modified: plugins/opie-sync/src/opie_sync.c ============================================================================== --- plugins/opie-sync/src/opie_sync.c Sat Mar 28 20:10:15 2009 (r5395) +++ plugins/opie-sync/src/opie_sync.c Sat Mar 28 20:10:40 2009 (r5396) @@ -25,7 +25,6 @@ #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-version.h> |
From: <svn...@op...> - 2009-03-28 19:10:25
|
Author: dgollub Date: Sat Mar 28 20:10:15 2009 New Revision: 5395 URL: http://www.opensync.org/changeset/5395 Log: Dropped legaacy include Modified: plugins/palm/src/palm_contact.c plugins/palm/src/palm_format.c plugins/palm/src/palm_sync.c Modified: plugins/palm/src/palm_contact.c ============================================================================== --- plugins/palm/src/palm_contact.c Sat Mar 28 20:09:27 2009 (r5394) +++ plugins/palm/src/palm_contact.c Sat Mar 28 20:10:15 2009 (r5395) @@ -24,7 +24,6 @@ #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> static OSyncChange *psyncContactCreate(PSyncEnv *env, PSyncEntry *entry, OSyncError **error) { Modified: plugins/palm/src/palm_format.c ============================================================================== --- plugins/palm/src/palm_format.c Sat Mar 28 20:09:27 2009 (r5394) +++ plugins/palm/src/palm_format.c Sat Mar 28 20:10:15 2009 (r5395) @@ -23,7 +23,7 @@ #include <opensync/opensync-time.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-serializer.h> static char *conv_enc_palm_to_xml(const char *text) { Modified: plugins/palm/src/palm_sync.c ============================================================================== --- plugins/palm/src/palm_sync.c Sat Mar 28 20:09:27 2009 (r5394) +++ plugins/palm/src/palm_sync.c Sat Mar 28 20:10:15 2009 (r5395) @@ -24,7 +24,6 @@ #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #define CATCOUNT 16 |
From: <svn...@op...> - 2009-03-28 19:09:32
|
Author: dgollub Date: Sat Mar 28 20:09:27 2009 New Revision: 5394 URL: http://www.opensync.org/changeset/5394 Log: Dropped legacy include opensync-context.h Replaced openysnc-merger.h with opensync-capabilities.h Modified: plugins/kdepim/src/datasource.h Modified: plugins/kdepim/src/datasource.h ============================================================================== --- plugins/kdepim/src/datasource.h Sat Mar 28 20:08:50 2009 (r5393) +++ plugins/kdepim/src/datasource.h Sat Mar 28 20:09:27 2009 (r5394) @@ -4,11 +4,10 @@ #include <qstringlist.h> #include <opensync/opensync.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> /* common parent class and shared code for all KDE Data sources/sinks */ class OSyncDataSource |
From: <svn...@op...> - 2009-03-28 19:08:55
|
Author: dgollub Date: Sat Mar 28 20:08:50 2009 New Revision: 5393 URL: http://www.opensync.org/changeset/5393 Log: Dropped legacy include. Modified: plugins/tomboy-sync/src/tomboy_sync.h Modified: plugins/tomboy-sync/src/tomboy_sync.h ============================================================================== --- plugins/tomboy-sync/src/tomboy_sync.h Sat Mar 28 20:07:41 2009 (r5392) +++ plugins/tomboy-sync/src/tomboy_sync.h Sat Mar 28 20:08:50 2009 (r5393) @@ -25,7 +25,6 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> |
From: <svn...@op...> - 2009-03-28 19:07:46
|
Author: dgollub Date: Sat Mar 28 20:07:41 2009 New Revision: 5392 URL: http://www.opensync.org/changeset/5392 Log: Dropped legacy incldue opensync-context.h and replaced openysnc-merger.h include with opensync-capabilities.h Modified: plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Modified: plugins/mozilla-sync/trunk/src/mozilla-sync.cpp ============================================================================== --- plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Sat Mar 28 20:07:06 2009 (r5391) +++ plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Sat Mar 28 20:07:41 2009 (r5392) @@ -69,10 +69,9 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> #include <opensync/opensync-version.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilitiesr.h> #include <opensync/opensync-xmlformat.h> #include "mozilla-xpcom.h" |
From: <svn...@op...> - 2009-03-28 19:07:17
|
Author: dgollub Date: Sat Mar 28 20:07:06 2009 New Revision: 5391 URL: http://www.opensync.org/changeset/5391 Log: Dropped legacy include. Modified: plugins/irmc-sync/src/irmc_sync.c Modified: plugins/irmc-sync/src/irmc_sync.c ============================================================================== --- plugins/irmc-sync/src/irmc_sync.c Sat Mar 28 20:06:10 2009 (r5390) +++ plugins/irmc-sync/src/irmc_sync.c Sat Mar 28 20:07:06 2009 (r5391) @@ -24,7 +24,6 @@ #include <opensync/opensync.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-group.h> |
From: <svn...@op...> - 2009-03-28 19:06:15
|
Author: dgollub Date: Sat Mar 28 20:06:10 2009 New Revision: 5390 URL: http://www.opensync.org/changeset/5390 Log: Dropped legacy include. Modified: plugins/gpe/src/gpe_sync.h Modified: plugins/gpe/src/gpe_sync.h ============================================================================== --- plugins/gpe/src/gpe_sync.h Sat Mar 28 20:05:57 2009 (r5389) +++ plugins/gpe/src/gpe_sync.h Sat Mar 28 20:06:10 2009 (r5390) @@ -32,7 +32,6 @@ #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-version.h> |
From: <svn...@op...> - 2009-03-28 19:06:07
|
Author: dgollub Date: Sat Mar 28 20:05:57 2009 New Revision: 5389 URL: http://www.opensync.org/changeset/5389 Log: Replaced legacy include opensync-merger.h with opensync-capabilities.h Modified: plugins/google-calendar/src/gcalendar.c Modified: plugins/google-calendar/src/gcalendar.c ============================================================================== --- plugins/google-calendar/src/gcalendar.c Sat Mar 28 20:05:25 2009 (r5388) +++ plugins/google-calendar/src/gcalendar.c Sat Mar 28 20:05:57 2009 (r5389) @@ -33,7 +33,7 @@ #include <opensync/opensync.h> #include <opensync/opensync-plugin.h> #include <opensync/opensync-helper.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-format.h> #include <opensync/opensync-xmlformat.h> #include <opensync/opensync-data.h> |
From: <svn...@op...> - 2009-03-28 19:05:32
|
Author: dgollub Date: Sat Mar 28 20:05:25 2009 New Revision: 5388 URL: http://www.opensync.org/changeset/5388 Log: Dropped legacy include of opensync-context.h Replaced opensycn-merger.h incldue with opensync-capabilities.h Modified: plugins/gnokii-sync/src/gnokii_calendar_format.c plugins/gnokii-sync/src/gnokii_contact_format.c plugins/gnokii-sync/src/gnokii_sync.h Modified: plugins/gnokii-sync/src/gnokii_calendar_format.c ============================================================================== --- plugins/gnokii-sync/src/gnokii_calendar_format.c Sat Mar 28 20:04:54 2009 (r5387) +++ plugins/gnokii-sync/src/gnokii_calendar_format.c Sat Mar 28 20:05:25 2009 (r5388) @@ -24,7 +24,7 @@ #include <opensync/opensync.h> #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-time.h> #include <opensync/opensync-xmlformat.h> Modified: plugins/gnokii-sync/src/gnokii_contact_format.c ============================================================================== --- plugins/gnokii-sync/src/gnokii_contact_format.c Sat Mar 28 20:04:54 2009 (r5387) +++ plugins/gnokii-sync/src/gnokii_contact_format.c Sat Mar 28 20:05:25 2009 (r5388) @@ -24,7 +24,7 @@ #include <opensync/opensync.h> #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-time.h> #include <opensync/opensync-xmlformat.h> Modified: plugins/gnokii-sync/src/gnokii_sync.h ============================================================================== --- plugins/gnokii-sync/src/gnokii_sync.h Sat Mar 28 20:04:54 2009 (r5387) +++ plugins/gnokii-sync/src/gnokii_sync.h Sat Mar 28 20:05:25 2009 (r5388) @@ -34,7 +34,6 @@ #include <opensync/opensync.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-version.h> |
From: <svn...@op...> - 2009-03-28 19:05:00
|
Author: dgollub Date: Sat Mar 28 20:04:54 2009 New Revision: 5387 URL: http://www.opensync.org/changeset/5387 Log: Removed opensync-context.h legacy include. Changed opensync-merger.h include to opensync-capabilties.h Modified: plugins/evolution2/src/evolution2_capabilities.c plugins/evolution2/src/evolution2_ebook.c plugins/evolution2/src/evolution2_ebook.h plugins/evolution2/src/evolution2_ecal.c plugins/evolution2/src/evolution2_ecal.h plugins/evolution2/src/evolution2_sync.c Modified: plugins/evolution2/src/evolution2_capabilities.c ============================================================================== --- plugins/evolution2/src/evolution2_capabilities.c Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_capabilities.c Sat Mar 28 20:04:54 2009 (r5387) @@ -19,7 +19,7 @@ */ #include <opensync/opensync.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <glib.h> Modified: plugins/evolution2/src/evolution2_ebook.c ============================================================================== --- plugins/evolution2/src/evolution2_ebook.c Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_ebook.c Sat Mar 28 20:04:54 2009 (r5387) @@ -21,7 +21,6 @@ #include <string.h> #include <opensync/opensync.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-helper.h> Modified: plugins/evolution2/src/evolution2_ebook.h ============================================================================== --- plugins/evolution2/src/evolution2_ebook.h Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_ebook.h Sat Mar 28 20:04:54 2009 (r5387) @@ -2,7 +2,7 @@ #define EBOOK_H #include <opensync/opensync.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-plugin.h> #include "evolution2_sync.h" Modified: plugins/evolution2/src/evolution2_ecal.c ============================================================================== --- plugins/evolution2/src/evolution2_ecal.c Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_ecal.c Sat Mar 28 20:04:54 2009 (r5387) @@ -22,7 +22,6 @@ #include <glib.h> #include <opensync/opensync.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-format.h> #include <opensync/opensync-helper.h> Modified: plugins/evolution2/src/evolution2_ecal.h ============================================================================== --- plugins/evolution2/src/evolution2_ecal.h Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_ecal.h Sat Mar 28 20:04:54 2009 (r5387) @@ -2,7 +2,7 @@ #define ECAL_H #include <opensync/opensync.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include "evolution2_sync.h" Modified: plugins/evolution2/src/evolution2_sync.c ============================================================================== --- plugins/evolution2/src/evolution2_sync.c Sat Mar 28 19:59:09 2009 (r5386) +++ plugins/evolution2/src/evolution2_sync.c Sat Mar 28 20:04:54 2009 (r5387) @@ -26,7 +26,7 @@ #include <opensync/opensync.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-merger.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-plugin.h> #include <opensync/opensync-version.h> |
From: <svn...@op...> - 2009-03-28 18:59:14
|
Author: dgollub Date: Sat Mar 28 19:59:09 2009 New Revision: 5386 URL: http://www.opensync.org/changeset/5386 Log: Drop legacy include. Modified: plugins/file-sync/src/file_sync.h Modified: plugins/file-sync/src/file_sync.h ============================================================================== --- plugins/file-sync/src/file_sync.h Sat Mar 28 19:57:03 2009 (r5385) +++ plugins/file-sync/src/file_sync.h Sat Mar 28 19:59:09 2009 (r5386) @@ -25,7 +25,6 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> |
From: <svn...@op...> - 2009-03-28 18:57:09
|
Author: dgollub Date: Sat Mar 28 19:57:03 2009 New Revision: 5385 URL: http://www.opensync.org/changeset/5385 Log: Include cleanup. Set #warning for legacy includes which get dropped before 0.39 release. Modified: trunk/opensync/archive/opensync_archive_internals.h trunk/opensync/client/opensync_client.c trunk/opensync/client/opensync_client_proxy.c trunk/opensync/db/opensync_db_internals.h trunk/opensync/engine/opensync_engine.c trunk/opensync/engine/opensync_obj_engine.c trunk/opensync/engine/opensync_sink_engine.h trunk/opensync/format/opensync_format_env.h trunk/opensync/group/opensync_member.c trunk/opensync/group/opensync_member.h trunk/opensync/helper/opensync_hashtable.h trunk/opensync/mapping/opensync_mapping_table.c trunk/opensync/opensync-context.h trunk/opensync/opensync-error.h trunk/opensync/opensync-merger.h trunk/opensync/opensync-plugin.h trunk/opensync/opensync-support.h trunk/opensync/opensync.h trunk/opensync/opensync_list.h trunk/opensync/plugin/opensync_context.c trunk/opensync/plugin/opensync_objtype_sink.c trunk/opensync/plugin/opensync_plugin_config.h trunk/opensync/plugin/opensync_plugin_info.c trunk/opensync/version/opensync_version.h trunk/tests/check_error.c trunk/tests/engine-tests/check_engine.c trunk/tests/engine-tests/check_engine_error.c trunk/tests/engine-tests/check_mapping_engine.c trunk/tests/mock-plugin/mock_format.c trunk/tests/mock-plugin/mock_sync.h trunk/tools/osyncplugin.c trunk/wrapper/opensync.i Modified: trunk/opensync/archive/opensync_archive_internals.h ============================================================================== --- trunk/opensync/archive/opensync_archive_internals.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/archive/opensync_archive_internals.h Sat Mar 28 19:57:03 2009 (r5385) @@ -25,8 +25,6 @@ #ifndef OPENSYNC_ARCHIVE_INTERNALS_H_ #define OPENSYNC_ARCHIVE_INTERNALS_H_ -#include <opensync/opensync_list.h> - /** * @defgroup OSyncArchiveInternalAPI OpenSync Archive Internals * @ingroup OSyncArchivePrivate Modified: trunk/opensync/client/opensync_client.c ============================================================================== --- trunk/opensync/client/opensync_client.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/client/opensync_client.c Sat Mar 28 19:57:03 2009 (r5385) @@ -21,7 +21,6 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-context.h" #include "opensync-plugin.h" #include "plugin/opensync_plugin_internals.h" #include "plugin/opensync_objtype_sink_internals.h" @@ -30,8 +29,6 @@ #include "opensync-helper.h" #include "helper/opensync_hashtable_internals.h" -#include "common/opensync_list.h" - #include "opensync-ipc.h" #include "ipc/opensync_serializer_internals.h" #include "ipc/opensync_message_internals.h" @@ -39,11 +36,10 @@ #include "opensync-format.h" +#include "opensync-capabilities.h" #include "opensync-version.h" #include "version/opensync_version_internals.h" -#include "opensync-merger.h" - #include "opensync-client.h" #include "opensync_client_internals.h" #include "opensync_client_private.h" Modified: trunk/opensync/client/opensync_client_proxy.c ============================================================================== --- trunk/opensync/client/opensync_client_proxy.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/client/opensync_client_proxy.c Sat Mar 28 19:57:03 2009 (r5385) @@ -29,9 +29,9 @@ #include "ipc/opensync_queue_internals.h" #include "plugin/opensync_objtype_sink_internals.h" +#include "opensync-capabilities.h" #include "opensync-group.h" #include "opensync-plugin.h" -#include "opensync-merger.h" #include "opensync-format.h" #include "opensync-version.h" Modified: trunk/opensync/db/opensync_db_internals.h ============================================================================== --- trunk/opensync/db/opensync_db_internals.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/db/opensync_db_internals.h Sat Mar 28 19:57:03 2009 (r5385) @@ -21,8 +21,6 @@ #ifndef _OPENSYNC_DB_H_ #define _OPENSYNC_DB_H_ -#include <opensync/opensync_list.h> - /** * @defgroup OSyncDB OpenSync Database Module * @ingroup OSyncPublic Modified: trunk/opensync/engine/opensync_engine.c ============================================================================== --- trunk/opensync/engine/opensync_engine.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/engine/opensync_engine.c Sat Mar 28 19:57:03 2009 (r5385) @@ -28,7 +28,6 @@ #include "opensync-format.h" #include "opensync-data.h" #include "opensync-plugin.h" -#include "opensync-merger.h" #include "opensync-xmlformat.h" #include "archive/opensync_archive_internals.h" Modified: trunk/opensync/engine/opensync_obj_engine.c ============================================================================== --- trunk/opensync/engine/opensync_obj_engine.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/engine/opensync_obj_engine.c Sat Mar 28 19:57:03 2009 (r5385) @@ -27,7 +27,6 @@ #include "opensync-data.h" #include "opensync-mapping.h" #include "opensync-format.h" -#include "opensync-merger.h" #include "opensync-plugin.h" #include "opensync-xmlformat.h" Modified: trunk/opensync/engine/opensync_sink_engine.h ============================================================================== --- trunk/opensync/engine/opensync_sink_engine.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/engine/opensync_sink_engine.h Sat Mar 28 19:57:03 2009 (r5385) @@ -22,8 +22,6 @@ #ifndef OPENSYNC_SINK_ENGINE_H_ #define OPENSYNC_SINK_ENGINE_H_ -#include <opensync/opensync_list.h> - /*! @brief Get list of OSyncMappingEntryEngines of the OSyncSinkEngine * * @param engine Pointer to an OSyncSinkEngine Modified: trunk/opensync/format/opensync_format_env.h ============================================================================== --- trunk/opensync/format/opensync_format_env.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/format/opensync_format_env.h Sat Mar 28 19:57:03 2009 (r5385) @@ -21,8 +21,6 @@ #ifndef _OPENSYNC_FORMAT_ENV_H_ #define _OPENSYNC_FORMAT_ENV_H_ -#include <opensync/opensync_list.h> - /** * @defgroup OSyncPublic OpenSync Public API * @brief The public API of opensync Modified: trunk/opensync/group/opensync_member.c ============================================================================== --- trunk/opensync/group/opensync_member.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/group/opensync_member.c Sat Mar 28 19:57:03 2009 (r5385) @@ -24,12 +24,12 @@ #include "opensync-plugin.h" #include "plugin/opensync_objtype_sink_internals.h" +#include "opensync-capabilities.h" #include "opensync-group.h" #include "opensync-format.h" #include "opensync_member_internals.h" #include "opensync_member_private.h" -#include "opensync-merger.h" #include "capabilities/opensync-capabilities_internals.h" #include "common/opensync_xml_internals.h" Modified: trunk/opensync/group/opensync_member.h ============================================================================== --- trunk/opensync/group/opensync_member.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/group/opensync_member.h Sat Mar 28 19:57:03 2009 (r5385) @@ -21,8 +21,6 @@ #ifndef _OPENSYNC_MEMBER_H_ #define _OPENSYNC_MEMBER_H_ -#include <opensync/opensync_list.h> - /** * @defgroup OSyncMemberAPI OpenSync Member * @ingroup OSyncGroup Modified: trunk/opensync/helper/opensync_hashtable.h ============================================================================== --- trunk/opensync/helper/opensync_hashtable.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/helper/opensync_hashtable.h Sat Mar 28 19:57:03 2009 (r5385) @@ -22,8 +22,6 @@ #ifndef OPENSYNC_HASHTABLE_H_ #define OPENSYNC_HASHTABLE_H_ -#include <opensync/opensync_list.h> - typedef void (*OSyncHashtableForEach) (const char *uid, const char *hash, void *user_data); /** Modified: trunk/opensync/mapping/opensync_mapping_table.c ============================================================================== --- trunk/opensync/mapping/opensync_mapping_table.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/mapping/opensync_mapping_table.c Sat Mar 28 19:57:03 2009 (r5385) @@ -22,7 +22,6 @@ #include "opensync_internals.h" #include "opensync-mapping.h" -#include "opensync-support.h" #include "opensync_mapping_table_internals.h" Modified: trunk/opensync/opensync-context.h ============================================================================== --- trunk/opensync/opensync-context.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync-context.h Sat Mar 28 19:57:03 2009 (r5385) @@ -1,2 +1,3 @@ /* FIXME: Legacy include. Will be dropped for 0.39 */ +#warning "FIXME: Legacy include. Will be dropped before the 0.39 relase. Adapt your incldue: <opensync/opensync-plugin.h>" #include "opensync/plugin/opensync_context.h" Modified: trunk/opensync/opensync-error.h ============================================================================== --- trunk/opensync/opensync-error.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync-error.h Sat Mar 28 19:57:03 2009 (r5385) @@ -1,3 +1,4 @@ /* FIXME: Legacy include of opensync-error.h. Will be dropped with 0.39 */ #include "opensync/common/opensync_error.h" +#warning "FIXME: Legacy include! adapt your include! Just include <opensync/opensync.h>" Modified: trunk/opensync/opensync-merger.h ============================================================================== --- trunk/opensync/opensync-merger.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync-merger.h Sat Mar 28 19:57:03 2009 (r5385) @@ -1,3 +1,3 @@ /* FIXME: Legacy include - will be dropped with 0.39 adapt your incldue to <opensync/opensync-capabilities.h> */ #include <opensync/opensync-capabilities.h> - +#warning "FIXME: Legacy include! Dropt his include and include <opensync/opensync-capabilities.h>" Modified: trunk/opensync/opensync-plugin.h ============================================================================== --- trunk/opensync/opensync-plugin.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync-plugin.h Sat Mar 28 19:57:03 2009 (r5385) @@ -23,6 +23,7 @@ OPENSYNC_BEGIN_DECLS +#include "plugin/opensync_context.h" #include "plugin/opensync_plugin.h" #include "plugin/opensync_plugin_env.h" #include "plugin/opensync_plugin_info.h" Modified: trunk/opensync/opensync-support.h ============================================================================== --- trunk/opensync/opensync-support.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync-support.h Sat Mar 28 19:57:03 2009 (r5385) @@ -1,4 +1,5 @@ /* FIXME: Drop opensync-support.h with 0.39 release */ +#warning "FIXME: Legacy include. Drop this include and include <opensync/opensync.h>" #include "opensync-common.h" #include "opensync-debug.h" #include "opensync.h" Modified: trunk/opensync/opensync.h ============================================================================== --- trunk/opensync/opensync.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync.h Sat Mar 28 19:57:03 2009 (r5385) @@ -271,7 +271,7 @@ OPENSYNC_END_DECLS -#include "opensync/opensync-support.h" -#include "opensync-error.h" +#include "opensync/opensync-common.h" +#include "opensync/opensync-debug.h" #endif Modified: trunk/opensync/opensync_list.h ============================================================================== --- trunk/opensync/opensync_list.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/opensync_list.h Sat Mar 28 19:57:03 2009 (r5385) @@ -1,2 +1,3 @@ /* FIXME: Legacy include. This file gets dropped with 0.39 */ #include "opensync/common/opensync_list.h" +#warning "FIXME: Legacy include. Adapt your include. Drop this include and include <opensync/opensync.h>" Modified: trunk/opensync/plugin/opensync_context.c ============================================================================== --- trunk/opensync/plugin/opensync_context.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/plugin/opensync_context.c Sat Mar 28 19:57:03 2009 (r5385) @@ -23,7 +23,7 @@ #include "opensync-data.h" -#include "opensync-context.h" +#include "opensync_context.h" #include "opensync_context_private.h" OSyncContext *osync_context_new(OSyncError **error) Modified: trunk/opensync/plugin/opensync_objtype_sink.c ============================================================================== --- trunk/opensync/plugin/opensync_objtype_sink.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/plugin/opensync_objtype_sink.c Sat Mar 28 19:57:03 2009 (r5385) @@ -21,9 +21,9 @@ #include "opensync.h" #include "opensync_internals.h" -#include "opensync-context.h" #include "opensync-format.h" #include "opensync-helper.h" +#include "opensync-plugin.h" #include "opensync/helper/opensync_anchor_internals.h" #include "opensync/helper/opensync_hashtable_internals.h" Modified: trunk/opensync/plugin/opensync_plugin_config.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_config.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/plugin/opensync_plugin_config.h Sat Mar 28 19:57:03 2009 (r5385) @@ -21,7 +21,6 @@ #ifndef _OPENSYNC_PLUGIN_CONFIG_H_ #define _OPENSYNC_PLUGIN_CONFIG_H_ -#include <opensync/opensync_list.h> /** \todo Review open OSyncPluginConfig documentation */ /** Modified: trunk/opensync/plugin/opensync_plugin_info.c ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/plugin/opensync_plugin_info.c Sat Mar 28 19:57:03 2009 (r5385) @@ -21,13 +21,12 @@ #include "opensync.h" #include "opensync_internals.h" +#include "opensync-capabilities.h" #include "opensync-format.h" #include "opensync-plugin.h" #include "opensync_plugin_info_private.h" -#include "opensync-merger.h" #include "opensync-version.h" -#include "opensync_list.h" OSyncPluginInfo *osync_plugin_info_new(OSyncError **error) { Modified: trunk/opensync/version/opensync_version.h ============================================================================== --- trunk/opensync/version/opensync_version.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/opensync/version/opensync_version.h Sat Mar 28 19:57:03 2009 (r5385) @@ -23,8 +23,6 @@ #ifndef OPENSYNC_VERSION_H_ #define OPENSYNC_VERSION_H_ -#include <opensync/opensync_list.h> - /** * @defgroup OSyncVersion OpenSync Version Module * @ingroup OSyncPublic Modified: trunk/tests/check_error.c ============================================================================== --- trunk/tests/check_error.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/check_error.c Sat Mar 28 19:57:03 2009 (r5385) @@ -1,5 +1,4 @@ #include "support.h" -#include <opensync/opensync-error.h> START_TEST (error_create) { Modified: trunk/tests/engine-tests/check_engine.c ============================================================================== --- trunk/tests/engine-tests/check_engine.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/engine-tests/check_engine.c Sat Mar 28 19:57:03 2009 (r5385) @@ -6,7 +6,7 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-client.h> #include <opensync/opensync-engine.h> -#include <opensync/opensync-context.h> +#include <opensync/opensync-plugin.h> #include "opensync/engine/opensync_engine_internals.h" #include "opensync/engine/opensync_engine_private.h" Modified: trunk/tests/engine-tests/check_engine_error.c ============================================================================== --- trunk/tests/engine-tests/check_engine_error.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/engine-tests/check_engine_error.c Sat Mar 28 19:57:03 2009 (r5385) @@ -12,7 +12,7 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-client.h> #include <opensync/opensync-engine.h> -#include <opensync/opensync-context.h> +#include <opensync/opensync-plugin.h> #include "../mock-plugin/mock_sync.h" Modified: trunk/tests/engine-tests/check_mapping_engine.c ============================================================================== --- trunk/tests/engine-tests/check_mapping_engine.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/engine-tests/check_mapping_engine.c Sat Mar 28 19:57:03 2009 (r5385) @@ -8,7 +8,7 @@ #include <opensync/opensync-format.h> #include <opensync/opensync-client.h> #include <opensync/opensync-engine.h> -#include <opensync/opensync-context.h> +#include <opensync/opensync-plugin.h> #include "opensync/engine/opensync_engine_internals.h" #include "opensync/engine/opensync_engine_private.h" Modified: trunk/tests/mock-plugin/mock_format.c ============================================================================== --- trunk/tests/mock-plugin/mock_format.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/mock-plugin/mock_format.c Sat Mar 28 19:57:03 2009 (r5385) @@ -20,7 +20,6 @@ #include <opensync/opensync.h> #include <opensync/opensync_internals.h> -#include <opensync/opensync-support.h> #include <opensync/opensync-serializer.h> #include <opensync/opensync-format.h> #include <glib.h> Modified: trunk/tests/mock-plugin/mock_sync.h ============================================================================== --- trunk/tests/mock-plugin/mock_sync.h Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tests/mock-plugin/mock_sync.h Sat Mar 28 19:57:03 2009 (r5385) @@ -30,7 +30,6 @@ #include <opensync/opensync.h> #include <opensync/opensync-format.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-context.h> #include <opensync/opensync-data.h> #include <opensync/opensync-helper.h> #include <opensync/opensync-version.h> Modified: trunk/tools/osyncplugin.c ============================================================================== --- trunk/tools/osyncplugin.c Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/tools/osyncplugin.c Sat Mar 28 19:57:03 2009 (r5385) @@ -35,8 +35,6 @@ #include <opensync/opensync-plugin.h> #include <opensync/opensync-format.h> -#include <opensync/opensync-context.h> - char *pluginpath = NULL; char *formatpath = NULL; char *pluginname = NULL; Modified: trunk/wrapper/opensync.i ============================================================================== --- trunk/wrapper/opensync.i Sat Mar 28 19:22:32 2009 (r5384) +++ trunk/wrapper/opensync.i Sat Mar 28 19:57:03 2009 (r5385) @@ -4,16 +4,13 @@ %{ #include <opensync/opensync.h> -#include <opensync/opensync-context.h> +#include <opensync/opensync-capabilities.h> #include <opensync/opensync-data.h> #include <opensync/opensync-engine.h> -#include <opensync/opensync-error.h> #include <opensync/opensync-format.h> #include <opensync/opensync-group.h> #include <opensync/opensync-helper.h> -#include <opensync/opensync-merger.h> #include <opensync/opensync-plugin.h> -#include <opensync/opensync-support.h> #include <opensync/opensync-version.h> #include <opensync/opensync-xmlformat.h> |
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) |
From: <svn...@op...> - 2009-03-28 18:16:13
|
Author: bricks Date: Sat Mar 28 19:16:08 2009 New Revision: 5383 URL: http://www.opensync.org/changeset/5383 Log: changed list pattern for all plugin related interfaces refs #975 Modified: trunk/opensync.sym trunk/opensync/client/opensync_client.c trunk/opensync/plugin/opensync_plugin_env.c trunk/opensync/plugin/opensync_plugin_env.h trunk/opensync/plugin/opensync_plugin_env_internals.h trunk/opensync/plugin/opensync_plugin_info.c trunk/opensync/plugin/opensync_plugin_info.h trunk/tests/engine-tests/check_engine_error.c trunk/tests/mock-plugin/mock_sync.c trunk/tools/osyncplugin.c trunk/wrapper/opensync-plugin.i Modified: trunk/opensync.sym ============================================================================== --- trunk/opensync.sym Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync.sym Sat Mar 28 19:16:08 2009 (r5383) @@ -529,10 +529,9 @@ osync_plugin_connection_usb_set_vendorid osync_plugin_discover osync_plugin_env_find_plugin +osync_plugin_env_get_plugins osync_plugin_env_load osync_plugin_env_new -osync_plugin_env_nth_plugin -osync_plugin_env_num_plugins osync_plugin_env_ref osync_plugin_env_register_plugin osync_plugin_env_unref @@ -551,10 +550,9 @@ osync_plugin_info_get_groupname osync_plugin_info_get_loop osync_plugin_info_get_main_sink +osync_plugin_info_get_objtypes osync_plugin_info_get_version osync_plugin_info_new -osync_plugin_info_nth_objtype -osync_plugin_info_num_objtypes osync_plugin_info_ref osync_plugin_info_set_capabilities osync_plugin_info_set_config Modified: trunk/opensync/client/opensync_client.c ============================================================================== --- trunk/opensync/client/opensync_client.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/client/opensync_client.c Sat Mar 28 19:16:08 2009 (r5383) @@ -30,6 +30,8 @@ #include "opensync-helper.h" #include "helper/opensync_hashtable_internals.h" +#include "common/opensync_list.h" + #include "opensync-ipc.h" #include "ipc/opensync_serializer_internals.h" #include "ipc/opensync_message_internals.h" @@ -575,8 +577,9 @@ const char *objtype = NULL; const char *preferred_format = NULL; OSyncList *o = NULL; + OSyncList *objtypesinks = NULL; + OSyncList *list; OSyncObjFormatSink *format_sink = NULL; - unsigned int n, num_sinks; osync_bool couldinit; osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, client, message, error); @@ -698,10 +701,10 @@ goto error; } - num_sinks = osync_plugin_info_num_objtypes(client->plugin_info); - for (n = 0; n < num_sinks; n++) { - - sink = osync_plugin_info_nth_objtype(client->plugin_info, n); + objtypesinks = osync_plugin_info_get_objtypes(client->plugin_info); + list = objtypesinks; + while (list) { + sink = (OSyncObjTypeSink*)list->data; if (!osync_objtype_sink_load_anchor(sink, client->plugin_info, error)) { goto error_finalize; } @@ -709,8 +712,9 @@ if (!osync_objtype_sink_load_hashtable(sink, client->plugin_info, error)) { goto error_finalize; } - + list = list->next; } + osync_list_free(objtypesinks); main_sink = osync_plugin_info_get_main_sink(client->plugin_info); if (main_sink) { @@ -745,6 +749,7 @@ error_free_message: osync_message_unref(reply); error_finalize: + osync_list_free(objtypesinks); osync_plugin_finalize(client->plugin, client->plugin_data); error: osync_free(enginepipe); @@ -816,10 +821,8 @@ static osync_bool _osync_client_handle_discover(OSyncClient *client, OSyncMessage *message, OSyncError **error) { OSyncMessage *reply = NULL; - unsigned int i = 0; OSyncPluginConfig *config = NULL; OSyncList *res = NULL; - unsigned int numobjs = 0; unsigned int avail = 0; OSyncObjTypeSink *sink = NULL; OSyncVersion *version = NULL; @@ -828,6 +831,8 @@ int size = 0; unsigned int num_res = 0; OSyncPluginResource *resource = NULL; + OSyncList *objtypesinks = NULL; + OSyncList *list; config = osync_plugin_info_get_config(client->plugin_info); res = osync_plugin_config_get_resources(config); @@ -846,24 +851,29 @@ else osync_message_write_int(reply, 0); - numobjs = osync_plugin_info_num_objtypes(client->plugin_info); - for (i = 0; i < numobjs; i++) { - sink = osync_plugin_info_nth_objtype(client->plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(client->plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (osync_objtype_sink_is_available(sink)) { avail++; } + list = list->next; } osync_message_write_uint(reply, avail); - for (i = 0; i < numobjs; i++) { - sink = osync_plugin_info_nth_objtype(client->plugin_info, i); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (osync_objtype_sink_is_available(sink)) { if (!osync_marshal_objtype_sink(reply, sink, error)) goto error_free_message; } + list = list->next; } - + osync_list_free(objtypesinks); + version = osync_plugin_info_get_version(client->plugin_info); if (version) { osync_message_write_int(reply, 1); @@ -909,6 +919,7 @@ return TRUE; error_free_message: + osync_list_free(objtypesinks); osync_message_unref(reply); error: osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); Modified: trunk/opensync/plugin/opensync_plugin_env.c ============================================================================== --- trunk/opensync/plugin/opensync_plugin_env.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/plugin/opensync_plugin_env.c Sat Mar 28 19:16:08 2009 (r5383) @@ -214,9 +214,9 @@ return osync_list_length(env->plugins); } -OSyncPlugin *osync_plugin_env_nth_plugin(OSyncPluginEnv *env, unsigned int nth) +OSyncList *osync_plugin_env_get_plugins(OSyncPluginEnv *env) { - return (OSyncPlugin *)osync_list_nth_data(env->plugins, nth); + return osync_list_copy(env->plugins); } osync_bool osync_plugin_env_plugin_is_usable(OSyncPluginEnv *env, const char *pluginname, OSyncError **error) Modified: trunk/opensync/plugin/opensync_plugin_env.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_env.h Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/plugin/opensync_plugin_env.h Sat Mar 28 19:16:08 2009 (r5383) @@ -101,26 +101,12 @@ */ OSYNC_EXPORT OSyncPlugin *osync_plugin_env_find_plugin(OSyncPluginEnv *env, const char *name); -/** @brief Returns the number of loaded plugins - * - * Returns the number of loaded plugins. 0 if used before initialization - * - * @param env Pointer to a OSyncPluginEnv environment - * @returns Number of plugins - * - */ -OSYNC_EXPORT unsigned int osync_plugin_env_num_plugins(OSyncPluginEnv *env); - -/** @brief Returns pointer to nth plugin - * - * Returns pointer to nth plugin - * - * @param env Pointer to a OSyncPluginEnv environment - * @param nth Which plugin to return - * @returns Pointer to plugin +/* @brief Get all plugins which are registered in the Plugin Env * + * @param env Pointer to a OSyncPluginEnv + * @return A shallow copy of the internal plugin list */ -OSYNC_EXPORT OSyncPlugin *osync_plugin_env_nth_plugin(OSyncPluginEnv *env, unsigned int nth); +OSYNC_EXPORT OSyncList *osync_plugin_env_get_plugins(OSyncPluginEnv *env); /*@}*/ Modified: trunk/opensync/plugin/opensync_plugin_env_internals.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_env_internals.h Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/plugin/opensync_plugin_env_internals.h Sat Mar 28 19:16:08 2009 (r5383) @@ -50,6 +50,18 @@ */ OSYNC_TEST_EXPORT osync_bool osync_plugin_env_plugin_is_usable(OSyncPluginEnv *env, const char *pluginname, OSyncError **error); +/** @brief Returns the number of loaded plugins + * + * TODO: This function isn't necessary anymore and can possibly be removed + * + * Returns the number of loaded plugins. 0 if used before initialization + * + * @param env Pointer to a OSyncPluginEnv environment + * @returns Number of plugins + * + */ +OSYNC_TEST_EXPORT unsigned int osync_plugin_env_num_plugins(OSyncPluginEnv *env); + /*@}*/ #endif /* _OPENSYNC_PLUGIN_ENV_INTERNALS_H_ */ Modified: trunk/opensync/plugin/opensync_plugin_info.c ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/plugin/opensync_plugin_info.c Sat Mar 28 19:16:08 2009 (r5383) @@ -27,6 +27,7 @@ #include "opensync-merger.h" #include "opensync-version.h" +#include "opensync_list.h" OSyncPluginInfo *osync_plugin_info_new(OSyncError **error) { @@ -171,16 +172,9 @@ osync_objtype_sink_ref(sink); } -unsigned int osync_plugin_info_num_objtypes(OSyncPluginInfo *info) -{ - osync_assert(info); - return osync_list_length(info->objtypes); -} - -OSyncObjTypeSink *osync_plugin_info_nth_objtype(OSyncPluginInfo *info, unsigned int nth) -{ +OSyncList *osync_plugin_info_get_objtypes(OSyncPluginInfo *info) { osync_assert(info); - return osync_list_nth_data(info->objtypes, nth); + return osync_list_copy(info->objtypes); } OSyncObjTypeSink *osync_plugin_info_get_main_sink(OSyncPluginInfo *info) Modified: trunk/opensync/plugin/opensync_plugin_info.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info.h Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/opensync/plugin/opensync_plugin_info.h Sat Mar 28 19:16:08 2009 (r5383) @@ -110,23 +110,13 @@ */ OSYNC_EXPORT void osync_plugin_info_add_objtype(OSyncPluginInfo *info, OSyncObjTypeSink *sink); -/** @brief Returns the number of added object types (sinks) - * - * @param info Pointer to the plugin info object - * @returns the number of object types in the plugin info - * - */ -OSYNC_EXPORT unsigned int osync_plugin_info_num_objtypes(OSyncPluginInfo *info); - -/** @brief Returns the nth added object type (sink) - * - * @param info Pointer to the plugin info object - * @param nth the index of the object type (sink) to return - * @returns the object type (sink) at the specified index +/** + * @brief Returns all Objtype Sinks as a list * + * @param Pointer to a OSyncPluginInfo + * @return A shallow copy of the internal objtype list */ -OSYNC_EXPORT OSyncObjTypeSink *osync_plugin_info_nth_objtype(OSyncPluginInfo *info, unsigned int nth); - +OSYNC_EXPORT OSyncList *osync_plugin_info_get_objtypes(OSyncPluginInfo *info); /** @brief Returns the Main Sink * Modified: trunk/tests/engine-tests/check_engine_error.c ============================================================================== --- trunk/tests/engine-tests/check_engine_error.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/tests/engine-tests/check_engine_error.c Sat Mar 28 19:16:08 2009 (r5383) @@ -130,8 +130,8 @@ mock_env *env = osync_try_malloc0(sizeof(mock_env), error); osync_assert(env); - - OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, 0); + OSyncList *objtypesinks = osync_plugin_info_get_objtypes(info); + OSyncObjTypeSink *sink = (OSyncObjTypeSink*)objtypesinks->data; osync_assert(sink); OSyncObjFormatSink *formatsink = osync_objformat_sink_new("mockformat1", error); @@ -147,6 +147,7 @@ osync_plugin_info_add_objtype(info, sink); osync_objtype_sink_unref(sink); + osync_list_free(objtypesinks); osync_trace(TRACE_EXIT, "%s: %p", __func__, env); return (void *)env; } Modified: trunk/tests/mock-plugin/mock_sync.c ============================================================================== --- trunk/tests/mock-plugin/mock_sync.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/tests/mock-plugin/mock_sync.c Sat Mar 28 19:16:08 2009 (r5383) @@ -607,15 +607,17 @@ /* Now we register the objtypes that we can sync. This plugin is special. It can * synchronize any objtype we configure it to sync and where a conversion * path to the file format can be found */ - int i, numobjs = osync_plugin_info_num_objtypes(info); - for (i = 0; i < numobjs; i++) { + OSyncList *objtypesinks = osync_plugin_info_get_objtypes(info); + OSyncList *list = objtypesinks; + while(list) { MockDir *dir = osync_try_malloc0(sizeof(MockDir), error); osync_assert(dir); dir->committed_all = TRUE; - OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, i); + OSyncObjTypeSink *sink = (OSyncObjTypeSink*)list->data; osync_assert(sink); + list = list->next; const char *objtype = osync_objtype_sink_get_name(sink); dir->res = osync_plugin_config_find_active_resource(config, objtype); @@ -723,7 +725,7 @@ #endif env->directories = g_list_append(env->directories, dir); } - + osync_list_free(objtypesinks); osync_trace(TRACE_EXIT, "%s: %p", __func__, env); return (void *)env; } Modified: trunk/tools/osyncplugin.c ============================================================================== --- trunk/tools/osyncplugin.c Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/tools/osyncplugin.c Sat Mar 28 19:16:08 2009 (r5383) @@ -448,23 +448,30 @@ static void *plugin_initialize(OSyncError **error) { - unsigned int n, num_sinks = osync_plugin_info_num_objtypes(plugin_info); + OSyncList *list; + OSyncList *objtypesinks = NULL; void *plugin_data; osync_bool couldinit; couldinit = osync_plugin_initialize(plugin, &(plugin_data), plugin_info, error); - - for (n = 0; n < num_sinks; n++) { - OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(plugin_info, n); - - if (!osync_objtype_sink_load_anchor(sink, plugin_info, error)) - return NULL; + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + OSyncObjTypeSink *sink = (OSyncObjTypeSink*)list->data; + if (!osync_objtype_sink_load_anchor(sink, plugin_info, error)) + goto error; if (!osync_objtype_sink_load_hashtable(sink, plugin_info, error)) - return NULL; + goto error; + + list = list->next; } + osync_list_free(objtypesinks); return plugin_data; +error: + osync_list_free(objtypesinks); + return NULL; } static void finalize_plugin(void **plugin_data) @@ -598,8 +605,9 @@ static osync_bool get_changes(Command *cmd, SyncType type, OSyncError **error) { - int num, i; OSyncObjTypeSink *sink = NULL; + OSyncList *list; + OSyncList *objtypesinks = NULL; const char *objtype = cmd->arg; if (objtype) { @@ -613,25 +621,28 @@ } else { /* all available objtypes */ - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; cmd->sink = sink; if (!get_changes_sink(cmd, sink, type, error)) goto error; + list = list->next; } - /* last but not least - the main sink */ if (get_main_sink()) - if (!get_changes_sink(cmd, get_main_sink(), type, error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -699,8 +710,9 @@ static osync_bool connect_plugin(Command *cmd, OSyncError **error) { - unsigned int i, num; OSyncObjTypeSink *sink = NULL; + OSyncList *objtypesinks = NULL; + OSyncList *list; const char *objtype = cmd->arg; if (objtype) { @@ -711,22 +723,27 @@ if (!connect_sink(cmd, sink, error)) goto error; } else { - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (!connect_sink(cmd, sink, error)) goto error; + list = list->next; } /* last but not least - the main sink */ if (get_main_sink()) if (!connect_sink(cmd, get_main_sink(), error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -790,8 +807,8 @@ static osync_bool disconnect(Command *cmd, OSyncError **error) { - - int i, num; + OSyncList *list; + OSyncList *objtypesinks = NULL; OSyncObjTypeSink *sink = NULL; const char *objtype = cmd->arg; @@ -803,22 +820,27 @@ if (!disconnect_sink(cmd, sink, error)) goto error; } else { - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (!disconnect_sink(cmd, sink, error)) goto error; + list = list->next; } /* last but not least - the main sink */ if (get_main_sink()) if (!disconnect_sink(cmd, get_main_sink(), error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -882,7 +904,8 @@ static osync_bool commit(Command *cmd, OSyncChange *change, OSyncError **error) { - int i, num; + OSyncList *list; + OSyncList *objtypesinks = NULL; OSyncObjTypeSink *sink = NULL; const char *objtype = cmd->arg; @@ -896,22 +919,27 @@ if (!commit_sink(cmd, sink, change, error)) goto error; } else { - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list){ + sink = (OSyncObjTypeSink*)list->data; if (!commit_sink(cmd, sink, change, error)) goto error; + list = list->next; } /* last but not least - the main sink */ if (get_main_sink()) if (!commit_sink(cmd, get_main_sink(), change, error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -998,7 +1026,8 @@ static osync_bool syncdone(Command *cmd, OSyncError **error) { - int i, num; + OSyncList *objtypesinks = NULL; + OSyncList *list; OSyncObjTypeSink *sink = NULL; const char *objtype = cmd->arg; @@ -1010,22 +1039,28 @@ if (!syncdone_sink(cmd, sink, error)) goto error; } else { - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (!syncdone_sink(cmd, sink, error)) goto error; + + list = list->next; } /* last but not least - the main sink */ if (get_main_sink()) if (!syncdone_sink(cmd, get_main_sink(), error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -1081,7 +1116,8 @@ static osync_bool committedall(Command *cmd, OSyncError **error) { - int i, num; + OSyncList *list; + OSyncList *objtypesinks = NULL; OSyncObjTypeSink *sink = NULL; const char *objtype = cmd->arg; @@ -1093,22 +1129,28 @@ if (!committedall_sink(cmd, sink, error)) goto error; } else { - num = osync_plugin_info_num_objtypes(plugin_info); - for (i=0; i < num; i++) { - sink = osync_plugin_info_nth_objtype(plugin_info, i); + objtypesinks = osync_plugin_info_get_objtypes(plugin_info); + list = objtypesinks; + while(list) { + sink = (OSyncObjTypeSink*)list->data; if (!committedall_sink(cmd, sink, error)) goto error; + + list = list->next; } /* last but not least - the main sink */ if (get_main_sink()) if (!committedall_sink(cmd, get_main_sink(), error)) goto error; + + osync_list_free(objtypesinks); } return TRUE; error: + osync_list_free(objtypesinks); return FALSE; } @@ -1216,8 +1258,8 @@ } static osync_bool plugin_list(OSyncError **error) { - int num; - int i; + OSyncList *plugins; + OSyncList *list; assert(!plugin_env); @@ -1233,12 +1275,15 @@ if (!osync_plugin_env_load(plugin_env, pluginpath, error)) goto error_free_formatenv; - num= osync_plugin_env_num_plugins(plugin_env); - for(i= 0; i < num; i++) { - OSyncPlugin* plugin= osync_plugin_env_nth_plugin(plugin_env, i); + plugins = osync_plugin_env_get_plugins(plugin_env); + list = plugins; + while(list) { + OSyncPlugin* plugin = (OSyncPlugin*)list->data; fprintf (stdout, "Name: %s\n", osync_plugin_get_name(plugin)); - fprintf (stdout, "Description: %s\n", osync_plugin_get_description(plugin)); - } + fprintf (stdout, "Description: %s\n", osync_plugin_get_description(plugin)); + list = list->next; + } + osync_list_free(plugins); return TRUE; error_free_formatenv: Modified: trunk/wrapper/opensync-plugin.i ============================================================================== --- trunk/wrapper/opensync-plugin.i Sat Mar 28 19:09:31 2009 (r5382) +++ trunk/wrapper/opensync-plugin.i Sat Mar 28 19:16:08 2009 (r5383) @@ -120,11 +120,14 @@ } int num_plugins() { - return osync_plugin_env_num_plugins(self); + OSyncList *plugins = osync_plugin_env_get_plugins(self); + return osync_list_length(plugins); } Plugin *nth_plugin(int nth) { - Plugin *plugin = osync_plugin_env_nth_plugin(self, nth); + OSyncList *plugins = osync_plugin_env_get_plugins(self); + + Plugin *plugin = (OSyncPlugin*)osync_list_nth_data(plugins, nth); if (plugin) osync_plugin_ref(plugin); return plugin; @@ -190,14 +193,20 @@ osync_plugin_info_add_objtype(self, sink); } - int num_objtypes() { - return osync_plugin_info_num_objtypes(self); + unsigned int num_objtypes() { + OSyncList *objtypesinks = osync_plugin_info_get_objtypes(self); + unsigned int num = osync_list_length(objtypesinks); + osync_list_free(objtypesinks); + return num; } ObjTypeSink *nth_objtype(int nth) { - ObjTypeSink *ret = osync_plugin_info_nth_objtype(self, nth); + /* TODO: return a list structure of phython */ + OSyncList *objtypesinks = osync_plugin_info_get_objtypes(self); + ObjTypeSink *ret = (ObjTypeSink*)osync_list_nth_data(objtypesinks, nth); if (ret) osync_objtype_sink_ref(ret); + osync_list_free(objtypesinks); return ret; } |
From: <svn...@op...> - 2009-03-28 18:09:35
|
Author: scriptor Date: Sat Mar 28 19:09:31 2009 New Revision: 5382 URL: http://www.opensync.org/changeset/5382 Log: Applied patches provided by Daniel Gollub for adjusting the LDAP plugin to API changes as laid out in http://opensync.org/changeset/5371 and http://opensync.org/changeset/5375 The build and a "make test" were successful on my machine after that. Modified: plugins/ldap-sync/src/CMakeLists.txt plugins/ldap-sync/src/ldap_connect.c plugins/ldap-sync/src/ldap_format.c plugins/ldap-sync/src/ldap_plugin.c plugins/ldap-sync/src/ldap_plugin.h Modified: plugins/ldap-sync/src/CMakeLists.txt ============================================================================== --- plugins/ldap-sync/src/CMakeLists.txt Sat Mar 28 18:45:34 2009 (r5381) +++ plugins/ldap-sync/src/CMakeLists.txt Sat Mar 28 19:09:31 2009 (r5382) @@ -22,7 +22,7 @@ # -LINK_DIRECTORIES( ${GLIB2_LIBRARY_DIRS} ${LIBXML2_LIBRARY_DIRS} ${LIBXSLT_LIBRARY_DIRS} ${LDAP_LIBRARY_DIRS} ${SASL2_LIBRARY_DIRS} ${GSSAPIV2_LIBRARY_DIRS}) +LINK_DIRECTORIES( ${OPENSYNC_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${LIBXML2_LIBRARY_DIRS} ${LIBXSLT_LIBRARY_DIRS} ${LDAP_LIBRARY_DIRS} ${SASL2_LIBRARY_DIRS} ${GSSAPIV2_LIBRARY_DIRS}) INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${OPENSYNC_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ${LIBXSLT_INCLUDE_DIRS} ${LDAP_INCLUDE_DIRS} ${SASL2_INCLUDE_DIRS} ${GSSAPIV2_INCLUDE_DIRS}) INCLUDE( Compiler ) Modified: plugins/ldap-sync/src/ldap_connect.c ============================================================================== --- plugins/ldap-sync/src/ldap_connect.c Sat Mar 28 18:45:34 2009 (r5381) +++ plugins/ldap-sync/src/ldap_connect.c Sat Mar 28 19:09:31 2009 (r5382) @@ -617,11 +617,6 @@ //Close all stuff you need to close ldap_plugin_do_disconnect(ctx, sinkenv, &error); - - //Close the hashtable - osync_hashtable_unref(sinkenv->hashtable); - - //Answer the call osync_context_report_success(ctx); osync_trace(TRACE_EXIT, "%s", __func__); @@ -658,8 +653,6 @@ osync_bool ldap_plugin_set_ldap_protocol (OSyncContext *ctx, OSyncPluginInfo *info, sink_environment *sinkenv, OSyncError **error) { int *ldap_version = NULL; - OSyncObjTypeSink *sink = NULL; - osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, ctx, info, sinkenv, error); @@ -675,14 +668,6 @@ goto error; } - - sink = (OSyncObjTypeSink *)osync_plugin_info_get_sink(info); - if (sink == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sink = NULL. Returning.\n", __FILE__, __LINE__); - goto error; - } - - if (sinkenv == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv = NULL. Returning.\n", __FILE__, __LINE__); goto error; @@ -2081,15 +2066,37 @@ */ osync_bool ldap_plugin_get_all_uids_from_hashtable(OSyncContext *ctx, sink_environment *sinkenv, GList **all_uids, OSyncError **error) { + OSyncHashTable *hashtable = NULL; + + osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, ctx, sinkenv, all_uids, error); if (all_uids == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get config data."); + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: Unable to get config data.", __FILE__, __LINE__); goto error; } - osync_hashtable_foreach(sinkenv->hashtable, ldap_plugin_add_uid_to_list, all_uids); + if (sinkenv == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv is NULL.", __FILE__, __LINE__); + goto error; + } + + if (sinkenv->sink == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv->sink is NULL. This sink must have been disabled. So %s() should not have been reached, at all.", __FILE__, __LINE__, __func__); + goto error; + } + + + // Get HashTable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + if (hashtable == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: hashtable is NULL.", __FILE__, __LINE__); + goto error; + } + + + osync_hashtable_foreach(hashtable, ldap_plugin_add_uid_to_list, all_uids); osync_trace(TRACE_EXIT, "%s", __func__); @@ -2559,6 +2566,16 @@ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p)", __func__, ctx, sinkenv, uids_hashtable, uids_ldap_server, differing_entries); + if (sinkenv == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv = NULL.\n", __FILE__, __LINE__); + goto error; + } + + if (sinkenv->sink == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv->sink = NULL. This sink must have been disabled. So %s() should not have been reached, at all.\n", __FILE__, __LINE__, __func__); + goto error; + } + if (uids_ldap_server == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: uids_ldap_server = NULL.\n", __FILE__, __LINE__); goto error; @@ -2578,6 +2595,7 @@ // On this occasion we compare the hash values to find any differences: char *actual_hash = NULL; char *theoretical_hash = NULL; + OSyncHashTable *hashtable = NULL; if (!ldap_plugin_get_hash_from_ldap_server(ctx, sinkenv, uid->data, &actual_hash, error)) { @@ -2588,7 +2606,17 @@ goto error; } - theoretical_hash = (char *)osync_hashtable_get_hash(sinkenv->hashtable, uid->data); + + // Get HashTable + osync_assert(sinkenv); + osync_assert(sinkenv->sink); + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + if (hashtable == NULL) { + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: hashtable = NULL. ", __FILE__, __LINE__); + goto error; + } + + theoretical_hash = (char *)osync_hashtable_get_hash(hashtable, uid->data); #ifdef DEBUG_fastsync ldap_plugin_printf("\nTheoretical hash: \"%s\"", theoretical_hash); Modified: plugins/ldap-sync/src/ldap_format.c ============================================================================== --- plugins/ldap-sync/src/ldap_format.c Sat Mar 28 18:45:34 2009 (r5381) +++ plugins/ldap-sync/src/ldap_format.c Sat Mar 28 19:09:31 2009 (r5382) @@ -1718,8 +1718,9 @@ const char *path = LDAP_PLUGIN_OPENSYNC_SCHEMASDIR; char fullpath[65535]; struct stat stat_buffer; - - + xmlSchemaValidCtxtPtr dtd = NULL; + xmlSchemaPtr xsd = NULL; + xmlSchemaParserCtxtPtr xsd_file = NULL; osync_trace(TRACE_ENTRY, "%s(%p, %i, %p, %p, %p)", __func__, input, inpsize, xmlcard, stylesheet_file, error); @@ -1784,19 +1785,19 @@ - xmlSchemaParserCtxtPtr xsd_file = xmlSchemaNewParserCtxt(fullpath); + xsd_file = xmlSchemaNewParserCtxt(fullpath); if (xsd_file == NULL) { osync_trace(TRACE_ERROR, "%s:%i: ERROR: xmlSchemaNewParserCtxt() has failed.\n", __FILE__, __LINE__); goto error; } - xmlSchemaPtr xsd = xmlSchemaParse(xsd_file); + xsd = xmlSchemaParse(xsd_file); if (xsd == NULL) { osync_trace(TRACE_ERROR, "%s:%i: ERROR: xmlSchemaParse() has failed.\n", __FILE__, __LINE__); goto error; } - xmlSchemaValidCtxtPtr dtd = xmlSchemaNewValidCtxt(xsd); + dtd = xmlSchemaNewValidCtxt(xsd); if (dtd == NULL) { osync_trace(TRACE_ERROR, "%s:%i: ERROR: xmlSchemaNewValidCtxt() has failed.\n", __FILE__, __LINE__); goto error; @@ -5252,7 +5253,7 @@ * */ -static void ldap_format_destroy_format1(char *input , size_t inpsize, void *user_data) +static void ldap_format_destroy_format1(char *input , unsigned int inpsize, void *user_data) { OSyncError *error = NULL; Modified: plugins/ldap-sync/src/ldap_plugin.c ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.c Sat Mar 28 18:45:34 2009 (r5381) +++ plugins/ldap-sync/src/ldap_plugin.c Sat Mar 28 19:09:31 2009 (r5382) @@ -384,6 +384,7 @@ osync_bool ldap_plugin_check_anchor_system(OSyncContext *ctx, sink_environment *sinkenv, OSyncError **error) { + char *timestamp = NULL; osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, ctx, sinkenv, error); @@ -409,7 +410,7 @@ } - char *timestamp = osync_anchor_retrieve(anchor, error); + timestamp = osync_anchor_retrieve(anchor, error); if (timestamp) { osync_trace(TRACE_INTERNAL, "Latest timestamp in anchordb is: %s (objtype: \"%s\")\n", timestamp, osync_objtype_sink_get_name(sinkenv->sink)); @@ -975,7 +976,6 @@ osync_trace(TRACE_INTERNAL, "sinkenv->sink = %p", sinkenv->sink); osync_trace(TRACE_INTERNAL, "sinkenv->objformat = %p", sinkenv->objformat); - osync_trace(TRACE_INTERNAL, "sinkenv->hashtable = %p", sinkenv->hashtable); if (sinkenv->servername) osync_trace(TRACE_INTERNAL, "sinkenv->servername = \"%s\"", sinkenv->servername); @@ -1138,11 +1138,10 @@ char *uid = NULL; OSyncChange *change = NULL; glist_container *to_be_reported = NULL; - + OSyncHashTable *hashtable = NULL; osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p)", __func__, ctx, sinkenv, slow_sync_requested, changetype_from_caller, list_to_be_reported, error); - if (ctx == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: ctx = NULL.", __FILE__, __LINE__); goto error; @@ -1179,6 +1178,9 @@ return TRUE; } + // Get HashTable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); // Make a new change for reporting change = osync_change_new(error); @@ -1249,7 +1251,7 @@ if (slow_sync_requested) { changetype_from_hashtable = OSYNC_CHANGE_TYPE_ADDED; } else { - changetype_from_hashtable = osync_hashtable_get_changetype(sinkenv->hashtable, change); + changetype_from_hashtable = osync_hashtable_get_changetype(hashtable, change); #ifdef DEBUG_fastsync ldap_plugin_printf("%s:%i: Fast sync: changetype from hashtable: %s", __FILE__, __LINE__, ldap_plugin_translate_changetype(changetype_from_hashtable)); ldap_plugin_printf("%s:%i: Fast sync: changetype from caller: %s", __FILE__, __LINE__, ldap_plugin_translate_changetype(changetype_from_caller)); @@ -1267,7 +1269,7 @@ ldap_plugin_printf("%s:%i: About to call osync_hashtable_update_change() for id = \"%s\" with changetype \"%s\"", __FILE__, __LINE__, uid, ldap_plugin_translate_changetype(changetype_from_hashtable)); #endif - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_change_unref(change); osync_trace(TRACE_EXIT, "%s", __func__); @@ -1366,7 +1368,7 @@ ldap_plugin_printf("%s:%i: About to call osync_hashtable_update_change() for id = \"%s\" with changetype \"%s\"", __FILE__, __LINE__, uid, ldap_plugin_translate_changetype(changetype_from_hashtable)); #endif - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); // Report this change to "the framework" @@ -1432,6 +1434,7 @@ OSyncFormatEnv *formatenv = NULL; OSyncList *uids = NULL; OSyncList *u = NULL; + OSyncHashTable *hashtable = NULL; @@ -1466,10 +1469,11 @@ + // Get HashTable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); - - - uids = osync_hashtable_get_deleted(sinkenv->hashtable); + uids = osync_hashtable_get_deleted(hashtable); for (u = uids; u; u = u->next) { OSyncChange *change = osync_change_new(error); if (!change) { @@ -1525,7 +1529,7 @@ ldap_plugin_printf("%s:%i:%s(): About to call osync_hashtable_update_change()", __FILE__, __LINE__, __func__); #endif - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_change_unref(change); } // for (i = 0; uids[i]; i++) @@ -1883,6 +1887,7 @@ osync_bool ldap_plugin_report_changes_to_be_kept_being_unmodified(OSyncContext *ctx, sink_environment *sinkenv, int slow_sync_requested, GList *unmodified_uids, OSyncError **error) { GList *list = NULL; + OSyncHashTable *hashtable = NULL; osync_trace(TRACE_ENTRY, "%s(%p, %p, %d, %p, %p)", __func__, ctx, sinkenv, slow_sync_requested, unmodified_uids, error); @@ -1913,9 +1918,9 @@ return TRUE; } - - - + // Get Hashtable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); if (unmodified_uids == NULL) { @@ -1941,7 +1946,7 @@ ldap_plugin_printf("%s:%i: About to call osync_hashtable_update_change() for id = \"%s\" with changetype OSYNC_CHANGE_TYPE_UNMODIFIED.", __FILE__, __LINE__, (char *)list->data); #endif - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_change_unref(change); } @@ -1985,6 +1990,8 @@ */ osync_bool ldap_plugin_do_get_changes(OSyncContext *ctx, sink_environment *sinkenv, int *slow_sync_requested, GList **ldaplist_added, GList **ldaplist_modified, GList **deleted_uids, GList **unmodified_uids, OSyncError **error) { + OSyncHashTable *hashtable = NULL; + osync_trace(TRACE_ENTRY, "%s(%p, %p, %d, %p, %p, %p, %p, %p)", __func__, ctx, sinkenv, slow_sync_requested, ldaplist_added, ldaplist_modified, deleted_uids, unmodified_uids, error); if (ctx == NULL) { @@ -2019,8 +2026,9 @@ goto error; } - - + // Get Hashtable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); // If you use opensync hashtables you can detect if you need @@ -2040,7 +2048,7 @@ // Tell hashtable about slow-sync: - if (!osync_hashtable_slowsync(sinkenv->hashtable, error)) { + if (!osync_hashtable_slowsync(hashtable, error)) { if (!osync_error_is_set(error)) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: osync_hashtable_slowsync() has failed.", __FILE__, __LINE__); } @@ -2622,6 +2630,7 @@ { gchar *dn = NULL; gchar *id = NULL; + OSyncHashTable *hashtable = NULL; @@ -2648,6 +2657,9 @@ goto error; } + // Get HashTable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); #ifdef DEBUG_ldapdata_to_server ldap_plugin_printf("%s:%i:%s: OSYNC_CHANGE_TYPE_DELETED", __FILE__, __LINE__, __func__); @@ -2674,7 +2686,7 @@ // Update hash if (*result == LDAP_SUCCESS && *result != LDAP_NO_SUCH_OBJECT) { - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); } else { ldap_plugin_compose_ldap_error_message(sinkenv, __FILE__, __LINE__, NULL, dn, change, *result, error); goto error; @@ -3691,6 +3703,7 @@ int result = LDAP_SUCCESS; OSyncError *error = NULL; sink_environment *sinkenv = NULL; + OSyncHashTable *hashtable = NULL; osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p)", __func__, sink, info, ctx, change, userdata); @@ -3749,6 +3762,9 @@ osync_trace(TRACE_INTERNAL, "%s: Is this sink (%s) enabled? %d", __func__, osync_objtype_sink_get_name(sinkenv->sink), osync_objtype_sink_is_enabled(sinkenv->sink)); } + // Get HashTable + hashtable = osync_objtype_sink_get_hashtable(sinkenv->sink); + osync_assert(hashtable); // Check for write permission if (!(sinkenv->ldap_write)) { @@ -3886,7 +3902,7 @@ } // if (result != LDAP_SUCCESS) - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); if (ldap_entries) { @@ -4012,13 +4028,6 @@ #endif - // Save hashtable - if (!osync_hashtable_save(sinkenv->hashtable, &error)) { - ldap_plugin_printf("%s:%i: ERROR: osync_hashtable_save() has failed.", __FILE__, __LINE__); - goto error; - } - - //Answer the call osync_context_report_success(ctx); // ldap_plugin_sync_done() osync_trace(TRACE_EXIT, "%s", __func__); @@ -4364,7 +4373,6 @@ goto error_free_db; } - osync_trace(TRACE_INTERNAL, "The configuration dir: %s", osync_plugin_info_get_configdir (info)); osync_trace(TRACE_INTERNAL, "The group name: %s", osync_plugin_info_get_groupname(info)); @@ -4406,31 +4414,8 @@ osync_objtype_sink_set_functions(sinkenv->sink, functions, sinkenv); - - - - // Establish hashtable - char *tablepath = g_strdup_printf("%s/hashtable.db", osync_plugin_info_get_configdir(info)); - sinkenv->hashtable = osync_hashtable_new(tablepath, osync_objtype_sink_get_name(sinkenv->sink), error); - g_free(tablepath); - tablepath = NULL; - - if (!sinkenv->hashtable) { - if (!osync_error_is_set(error)) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv->hashtable = NULL.\n", __FILE__, __LINE__); - } - - goto error_free_db; - } - - if (!osync_hashtable_load(sinkenv->hashtable, error)) { - if (!osync_error_is_set(error)) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: hashtable could not be loaded.\n", __FILE__, __LINE__); - } - - goto error_free_db; - } - + // Initialize hashtable system + osync_objtype_sink_enable_hashtable(sinkenv->sink, TRUE); // Initialize anchor system osync_objtype_sink_enable_anchor(sinkenv->sink, TRUE); Modified: plugins/ldap-sync/src/ldap_plugin.h ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.h Sat Mar 28 18:45:34 2009 (r5381) +++ plugins/ldap-sync/src/ldap_plugin.h Sat Mar 28 19:09:31 2009 (r5382) @@ -290,7 +290,6 @@ ///< as a void pointer. OSyncObjTypeSink *sink; ///< Reference to the "sink" OSyncObjFormat *objformat; ///< The corresponding format object for this sink. - OSyncHashTable *hashtable; ///< The hashtable for this particular sink. char *servername; ///< Hostname or IP of LDAP server int serverport; ///< Port number, on which runs server char *protocol; ///< Protocol (ldap or ldaps) |
From: <svn...@op...> - 2009-03-28 17:45:48
|
Author: dgollub Date: Sat Mar 28 18:45:34 2009 New Revision: 5381 URL: http://www.opensync.org/changeset/5381 Log: Fix build of wrapper. Got broken due to API changes on hashtable and the drop of osync_plugin_info_get_configdir(). Modified: trunk/wrapper/opensync-helper.i trunk/wrapper/opensync-plugin.i Modified: trunk/wrapper/opensync-helper.i ============================================================================== --- trunk/wrapper/opensync-helper.i Sat Mar 28 17:06:02 2009 (r5380) +++ trunk/wrapper/opensync-helper.i Sat Mar 28 18:45:34 2009 (r5381) @@ -32,25 +32,10 @@ } %} - -typedef struct {} HashTable; -%extend HashTable { - HashTable(const char *path, const char *objtype) { - Error *err = NULL; - HashTable *hashtable = osync_hashtable_new(path, objtype, &err); - if (raise_exception_on_error(err)) - return NULL; - else - return hashtable; - } - - ~HashTable() { - osync_hashtable_unref(self); - } - - bool load() { +%inline %{ + static bool hashtable_slowsync(OSyncHashTable *hashtable) { Error *err = NULL; - osync_hashtable_load(self, &err); + osync_hashtable_slowsync(hashtable, &err); if (raise_exception_on_error(err)) return FALSE; @@ -58,37 +43,17 @@ return TRUE; } - bool save() { - Error *err = NULL; - osync_hashtable_save(self, &err); - - if (raise_exception_on_error(err)) - return FALSE; - - return TRUE; - } - - bool slowsync() { - Error *err = NULL; - osync_hashtable_slowsync(self, &err); - - if (raise_exception_on_error(err)) - return FALSE; - - return TRUE; - } - - int num_entries() { - return osync_hashtable_num_entries(self); + static int hashtable_num_entries(OSyncHashTable *hashtable) { + return osync_hashtable_num_entries(hashtable); } - void update_change(Change *change) { - osync_hashtable_update_change(self, change); + void hashtable_update_change(OSyncHashTable *hashtable, Change *change) { + osync_hashtable_update_change(hashtable, change); } /* returns a list of deleted UIDs as strings */ - PyObject *get_deleted() { - OSyncList *uids = osync_hashtable_get_deleted(self); + static PyObject *hashtable_get_deleted(OSyncHashTable *hashtable) { + OSyncList *uids = osync_hashtable_get_deleted(hashtable); if (uids == NULL) { wrapper_exception("osync_hashtable_get_deleted failed"); return NULL; @@ -112,15 +77,7 @@ return ret; } - ChangeType get_changetype(Change *change) { - return osync_hashtable_get_changetype(self, change); + static ChangeType hashtable_get_changetype(OSyncHashTable *hashtable, Change *change) { + return osync_hashtable_get_changetype(hashtable, change); } - -%pythoncode %{ - # extend the SWIG-generated constructor, so that we can setup our list-wrapper classes - __oldinit = __init__ - def __init__(self, *args): - self.__oldinit(*args) - self.entries = _ListWrapper(self.num_entries, self.nth_entry) %} -} Modified: trunk/wrapper/opensync-plugin.i ============================================================================== --- trunk/wrapper/opensync-plugin.i Sat Mar 28 17:06:02 2009 (r5380) +++ trunk/wrapper/opensync-plugin.i Sat Mar 28 18:45:34 2009 (r5381) @@ -182,10 +182,6 @@ osync_plugin_info_set_configdir(self, configdir); } - const char *get_configdir() { - return osync_plugin_info_get_configdir(self); - } - ObjTypeSink *find_objtype(const char *name) { return osync_plugin_info_find_objtype(self, name); } @@ -261,7 +257,6 @@ %pythoncode %{ loop = property(get_loop, set_loop) config = property(get_config, set_config) - configdir = property(get_configdir, set_configdir) main_sink = property(get_main_sink, set_main_sink) format_env = property(get_format_env, set_format_env) sink = property(get_sink, set_sink) @@ -363,6 +358,14 @@ osync_objtype_sink_remove_objformat_sink(self, format_sink); } + OSyncAnchor *get_anchor() { + return osync_objtype_sink_get_anchor(self); + } + + OSyncHashTable *get_hashtable() { + return osync_objtype_sink_get_hashtable(self); + } + /* TODO: set_functions */ /* |
From: <svn...@op...> - 2009-03-28 16:06:10
|
Author: scriptor Date: Sat Mar 28 17:06:02 2009 New Revision: 5380 URL: http://www.opensync.org/changeset/5380 Log: Trying to remove tests/check_delete_and_fastsync, because this test file is not used, at all. tests/check_add_modify_delete_and_sync is being used, instead. Deleted: plugins/ldap-sync/tests/check_delete_and_fastsync |
From: <svn...@op...> - 2009-03-28 15:26:44
|
Author: dgollub Date: Sat Mar 28 16:26:33 2009 New Revision: 5379 URL: http://www.opensync.org/changeset/5379 Log: Fix regression of ipc_callback_break caused by r5360. refs #1039 comment:5 fixes #1039 Modified: trunk/tests/ipc-tests/check_ipc.c Modified: trunk/tests/ipc-tests/check_ipc.c ============================================================================== --- trunk/tests/ipc-tests/check_ipc.c Sat Mar 28 16:02:45 2009 (r5378) +++ trunk/tests/ipc-tests/check_ipc.c Sat Mar 28 16:26:33 2009 (r5379) @@ -1548,8 +1548,8 @@ END_TEST int stop_after = 500; -GCond *callback_handler2_cond; -GMutex *callback_handler2_mutex; +GCond *callback_handler2_cond = NULL; +GMutex *callback_handler2_mutex = NULL; void callback_handler2(OSyncMessage *message, void *user_data) { @@ -1565,9 +1565,11 @@ num_msgs++; - g_mutex_lock(callback_handler2_mutex); - g_cond_signal(callback_handler2_cond); - g_mutex_unlock(callback_handler2_mutex); + if (callback_handler2_mutex && callback_handler2_cond) { + g_mutex_lock(callback_handler2_mutex); + g_cond_signal(callback_handler2_cond); + g_mutex_unlock(callback_handler2_mutex); + } osync_trace(TRACE_EXIT, "%s", __func__); } @@ -1638,9 +1640,6 @@ osync_queue_create(client_queue, &error); fail_unless(error == NULL, NULL); char *data = "this is another test string"; - - callback_handler2_cond = g_cond_new(); - callback_handler2_mutex = g_mutex_new(); pid_t cpid = fork(); if (cpid == 0) { //Child @@ -1709,18 +1708,6 @@ osync_message_unref(message); - /* Send and process one by one and wait for the call - * of the server callback. This avoids that the pipe - * break (e.g. disconnect call) happens to early. - * - * With the disconnect call the queues get flushed - * and the callback_handler2 function would get - * immeditally the error messages. Which is not expected - * or designed in this testcase. - * - * (related) Fixes #1039 - */ - g_cond_wait(callback_handler2_cond, callback_handler2_mutex); } message = osync_queue_get_message(client_queue); @@ -1755,11 +1742,6 @@ osync_queue_unref(client_queue); osync_queue_unref(server_queue); - - g_mutex_free(callback_handler2_mutex); - g_cond_free(callback_handler2_cond); - callback_handler2_cond = NULL; - callback_handler2_mutex = NULL; destroy_testbed(testbed); } |
From: <svn...@op...> - 2009-03-28 15:02:56
|
Author: dgollub Date: Sat Mar 28 16:02:45 2009 New Revision: 5378 URL: http://www.opensync.org/changeset/5378 Log: Drop osync_plugin_info_get_configdir() from plugin interface to avoid that plugins directly access the filesystem of the configuration direcoty. This hopefully avoids an maintenance nightmare. osync_plugin_info_get_configdir() will not get replaced by any other function. fixes #1083 Modified: trunk/opensync.sym trunk/opensync/plugin/opensync_objtype_sink.c trunk/opensync/plugin/opensync_plugin_info.h trunk/opensync/plugin/opensync_plugin_info_internals.h Modified: trunk/opensync.sym ============================================================================== --- trunk/opensync.sym Sat Mar 28 15:49:50 2009 (r5377) +++ trunk/opensync.sym Sat Mar 28 16:02:45 2009 (r5378) @@ -547,7 +547,6 @@ osync_plugin_info_find_objtype osync_plugin_info_get_capabilities osync_plugin_info_get_config -osync_plugin_info_get_configdir osync_plugin_info_get_format_env osync_plugin_info_get_groupname osync_plugin_info_get_loop Modified: trunk/opensync/plugin/opensync_objtype_sink.c ============================================================================== --- trunk/opensync/plugin/opensync_objtype_sink.c Sat Mar 28 15:49:50 2009 (r5377) +++ trunk/opensync/plugin/opensync_objtype_sink.c Sat Mar 28 16:02:45 2009 (r5378) @@ -28,7 +28,7 @@ #include "opensync/helper/opensync_anchor_internals.h" #include "opensync/helper/opensync_hashtable_internals.h" -#include "opensync_plugin_info.h" /* due to osync_plugin_info_get_configdir() */ +#include "opensync_plugin_info_internals.h" /* due to osync_plugin_info_get_configdir() */ #include "opensync_objtype_sink.h" #include "opensync_objtype_sink_internals.h" Modified: trunk/opensync/plugin/opensync_plugin_info.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info.h Sat Mar 28 15:49:50 2009 (r5377) +++ trunk/opensync/plugin/opensync_plugin_info.h Sat Mar 28 16:02:45 2009 (r5378) @@ -93,15 +93,6 @@ */ OSYNC_EXPORT void osync_plugin_info_set_configdir(OSyncPluginInfo *info, const char *configdir); -/** @brief Returns the plugin configuration directory - * - * @param info Pointer to the plugin info object - * @returns the full path where configuration files for the plugin are stored - * - */ -OSYNC_EXPORT const char *osync_plugin_info_get_configdir(OSyncPluginInfo *info); - - /** @brief Find ObjTypeSink of corresponding Object Type in OSyncPluginInfo object * * @param info Pointer to the OSyncPluginInfo object Modified: trunk/opensync/plugin/opensync_plugin_info_internals.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info_internals.h Sat Mar 28 15:49:50 2009 (r5377) +++ trunk/opensync/plugin/opensync_plugin_info_internals.h Sat Mar 28 16:02:45 2009 (r5378) @@ -36,6 +36,14 @@ */ OSyncObjTypeSink *osync_plugin_info_get_sink(OSyncPluginInfo *info); +/** @brief Returns the plugin configuration directory + * + * @param info Pointer to the plugin info object + * @returns the full path where configuration files for the plugin are stored + * + */ +OSYNC_TEST_EXPORT const char *osync_plugin_info_get_configdir(OSyncPluginInfo *info); + /*@}*/ |
From: <svn...@op...> - 2009-03-28 14:50:03
|
Author: dgollub Date: Sat Mar 28 15:49:50 2009 New Revision: 5377 URL: http://www.opensync.org/changeset/5377 Log: Drop devinf_path. Plugins no longer have access to plugin's configuratuion path. #1083 refs #1083 Modified: plugins/syncml/src/syncml_common.c plugins/syncml/src/syncml_common.h Modified: plugins/syncml/src/syncml_common.c ============================================================================== --- plugins/syncml/src/syncml_common.c Sat Mar 28 15:18:21 2009 (r5376) +++ plugins/syncml/src/syncml_common.c Sat Mar 28 15:49:50 2009 (r5377) @@ -325,8 +325,6 @@ /* plugin config */ - if (env->devinf_path) - safe_cfree(&(env->devinf_path)); osync_trace(TRACE_INTERNAL, "%s - plugin configuration cleaned", __func__); /* Signal forgotten contexts */ @@ -807,9 +805,6 @@ osync_plugin_info_set_main_sink(info, mainsink); osync_objtype_sink_unref(mainsink); - /* prepare paths for callbacks */ - env->devinf_path = g_strdup_printf("%s/devinf.db", osync_plugin_info_get_configdir(info)); - /* set callbacks */ smlDataSyncRegisterEventCallback(env->dsObject1, _recv_event, env); smlDataSyncRegisterGetAlertTypeCallback(env->dsObject1, _get_alert_type, env); Modified: plugins/syncml/src/syncml_common.h ============================================================================== --- plugins/syncml/src/syncml_common.h Sat Mar 28 15:18:21 2009 (r5376) +++ plugins/syncml/src/syncml_common.h Sat Mar 28 15:49:50 2009 (r5377) @@ -100,7 +100,6 @@ /* environment data */ OSyncPluginInfo *pluginInfo; - char *devinf_path; GSource *source; GSourceFuncs *source_functions; |
From: <svn...@op...> - 2009-03-28 14:18:33
|
Author: dgollub Date: Sat Mar 28 15:18:21 2009 New Revision: 5376 URL: http://www.opensync.org/changeset/5376 Log: Blind hashtable API port. More port of plugin sink functions and anchor is required. Modified: plugins/gnokii-sync/src/gnokii_calendar.c plugins/gnokii-sync/src/gnokii_contact.c plugins/gnokii-sync/src/gnokii_sync.c plugins/gnokii-sync/src/gnokii_sync.h Modified: plugins/gnokii-sync/src/gnokii_calendar.c ============================================================================== --- plugins/gnokii-sync/src/gnokii_calendar.c Sat Mar 28 15:03:04 2009 (r5375) +++ plugins/gnokii-sync/src/gnokii_calendar.c Sat Mar 28 15:18:21 2009 (r5376) @@ -343,6 +343,7 @@ OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info); + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); gn_data *caldata = (gn_data *) malloc(sizeof(gn_data)); @@ -357,8 +358,7 @@ // check for slowsync and prepare the "event" hashtable if needed if (osync_objtype_sink_get_slowsync(sink)) { osync_trace(TRACE_INTERNAL, "slow sync"); - assert(sinkenv->hashtable); - if (!osync_hashtable_slowsync(sinkenv->hashtable, &error)) { + if (!osync_hashtable_slowsync(hashtable, &error)) { osync_context_report_osyncerror(ctx, error); osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error)); return; @@ -383,13 +383,13 @@ osync_change_set_hash(change, hash); g_free(hash); - OSyncChangeType type = osync_hashtable_get_changetype(sinkenv->hashtable, change); + OSyncChangeType type = osync_hashtable_get_changetype(hashtable, change); osync_change_set_changetype(change, type); /* Once hash and uid is set to change object - report it! Otherwise the hashtable will declare it as deleted. */ - //osync_hashtable_report(sinkenv->hashtable, change); - osync_hashtable_update_change(sinkenv->hashtable, change); + //osync_hashtable_report(hashtable, change); + osync_hashtable_update_change(hashtable, change); if (type == OSYNC_CHANGE_TYPE_UNMODIFIED) { /* Nothing to do. */ @@ -421,8 +421,8 @@ osync_trace(TRACE_INTERNAL, "number of calendar notes: %i", i - 1); - assert(sinkenv->hashtable); - OSyncList *u, *uids = osync_hashtable_get_deleted(sinkenv->hashtable); + assert(hashtable); + OSyncList *u, *uids = osync_hashtable_get_deleted(hashtable); for (u = uids; u; u = u->next) { OSyncChange *change = osync_change_new(&error); if (!change) { @@ -448,7 +448,7 @@ osync_change_set_data(change, odata); osync_data_unref(odata); - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_context_report_change(ctx, change); @@ -476,6 +476,7 @@ OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info); gnokii_sinkenv *sinkenv = osync_objtype_sink_get_userdata(sink); gnokii_environment *env = (gnokii_environment *) plugindata; + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); // Get changed calendar note OSyncData *data = osync_change_get_data(change); @@ -529,7 +530,7 @@ /////////// WORKAROUND for "dirty" modify /////////// osync_change_set_changetype(change, OSYNC_CHANGE_TYPE_DELETED); - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); // update the old UID with the followed UID for the hashtable // - is needed for new memory location @@ -545,7 +546,7 @@ osync_change_set_hash(change, hash); g_free(hash); - //osync_hashtable_update_change(sinkenv->hashtable, change); + //osync_hashtable_update_change(hashtable, change); /* osync_trace(TRACE_INTERNAL, "New CHANGE: %p UID: %s (%s) changetype: %i", @@ -565,7 +566,7 @@ osync_context_report_success(ctx); // update hashtable - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_trace(TRACE_EXIT, "%s", __func__); return; Modified: plugins/gnokii-sync/src/gnokii_contact.c ============================================================================== --- plugins/gnokii-sync/src/gnokii_contact.c Sat Mar 28 15:03:04 2009 (r5375) +++ plugins/gnokii-sync/src/gnokii_contact.c Sat Mar 28 15:18:21 2009 (r5376) @@ -391,6 +391,7 @@ gn_data *data = osync_try_malloc0(sizeof(gn_data), &error); OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info); + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); gnokii_sinkenv *sinkenv = osync_objtype_sink_get_userdata(sink); gnokii_environment *env = (gnokii_environment *) plugindata; @@ -400,7 +401,7 @@ // check for slowsync and prepare the "contact" hashtable if needed if (osync_objtype_sink_get_slowsync(sink)) { osync_trace(TRACE_INTERNAL, "slow sync"); - if (!osync_hashtable_slowsync(sinkenv->hashtable, &error)) { + if (!osync_hashtable_slowsync(hashtable, &error)) { osync_context_report_osyncerror(ctx, error); osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error)); return; @@ -468,12 +469,12 @@ g_free(hash); /* Once UID and HASH got set - report it! */ - //osync_hashtable_report(sinkenv->hashtable, change); + //osync_hashtable_report(hashtable, change); - OSyncChangeType type = osync_hashtable_get_changetype(sinkenv->hashtable, change); + OSyncChangeType type = osync_hashtable_get_changetype(hashtable, change); osync_change_set_changetype(change, type); - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); if (type == OSYNC_CHANGE_TYPE_UNMODIFIED) { /* Nothing to do. */ @@ -506,7 +507,7 @@ g_free(data); - OSyncList *u, *uids = osync_hashtable_get_deleted(sinkenv->hashtable); + OSyncList *u, *uids = osync_hashtable_get_deleted(hashtable); for (u = uids; u; u = u->next) { OSyncChange *change = osync_change_new(&error); if (!change) { @@ -534,7 +535,7 @@ osync_context_report_change(ctx, change); - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_change_unref(change); } @@ -561,6 +562,7 @@ OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info); gnokii_sinkenv *sinkenv = osync_objtype_sink_get_userdata(sink); gnokii_environment *env = (gnokii_environment *) plugindata; + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); // Get changed contact note osync_data_get_data(osync_change_get_data(change), &buf, NULL); @@ -618,7 +620,7 @@ osync_context_report_success(ctx); // update hashtable - osync_hashtable_update_change(sinkenv->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_trace(TRACE_EXIT, "%s", __func__); Modified: plugins/gnokii-sync/src/gnokii_sync.c ============================================================================== --- plugins/gnokii-sync/src/gnokii_sync.c Sat Mar 28 15:03:04 2009 (r5375) +++ plugins/gnokii-sync/src/gnokii_sync.c Sat Mar 28 15:18:21 2009 (r5376) @@ -32,11 +32,6 @@ while (env->sinks) { gnokii_sinkenv *sinkenv = env->sinks->data; - // close the hashtable - if (sinkenv->hashtable) { - osync_hashtable_unref(sinkenv->hashtable); - } - osync_objtype_sink_unref(sinkenv->sink); g_free(sinkenv); @@ -93,10 +88,6 @@ OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info); gnokii_sinkenv *sinkenv = osync_objtype_sink_get_userdata(sink); - // commit changes to persistent hahstable - if (!osync_hashtable_save(sinkenv->hashtable, &error)) - goto error; - // answer the call osync_context_report_success(ctx); @@ -180,11 +171,6 @@ gnokii_sinkenv *contact_sinkenv = NULL; gnokii_sinkenv *event_sinkenv = NULL; OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); - char *tablepath = g_strdup_printf("%s/hashtable.db", osync_plugin_info_get_configdir(info)); - if (!tablepath) { - osync_error_set(error, OSYNC_ERROR_IO_ERROR, "No memory left for Plugin initialization"); - goto error; - } /* create gnokii_environment which stores config and statemachine for libgnokii */ env = osync_try_malloc0(sizeof(gnokii_environment), error); @@ -247,12 +233,9 @@ env->sinks = g_list_append(env->sinks, contact_sinkenv); - contact_sinkenv->hashtable = osync_hashtable_new(tablepath, "contact", error); - if (!contact_sinkenv->hashtable) - goto error; + /* Request an hashtable from the framework. */ + osync_objtype_sink_enable_hashtable(contact_sinkenv->sink, TRUE); - if (!osync_hashtable_load(contact_sinkenv->hashtable, error)) - goto error; } else { osync_trace(TRACE_INTERNAL, "Contact sink is disable by configuration."); } @@ -283,13 +266,8 @@ goto error; } - event_sinkenv->hashtable = osync_hashtable_new(tablepath, "event", error); - - if (!event_sinkenv->hashtable) - goto error; - - if (!osync_hashtable_load(event_sinkenv->hashtable, error)) - goto error; + /* Request an hashtable from the framework. */ + osync_objtype_sink_enable_hashtable(event_sinkenv->sink, TRUE); env->sinks = g_list_append(env->sinks, event_sinkenv); } else { @@ -297,9 +275,6 @@ } /* end of event sink */ - /* Free Hashtable path */ - g_free(tablepath); - osync_trace(TRACE_EXIT, "%s: %p", __func__, env); return (void *)env; Modified: plugins/gnokii-sync/src/gnokii_sync.h ============================================================================== --- plugins/gnokii-sync/src/gnokii_sync.h Sat Mar 28 15:03:04 2009 (r5375) +++ plugins/gnokii-sync/src/gnokii_sync.h Sat Mar 28 15:18:21 2009 (r5376) @@ -50,7 +50,6 @@ typedef struct { OSyncObjFormat *objformat; OSyncObjTypeSink *sink; - OSyncHashTable *hashtable; } gnokii_sinkenv; #endif /* GNOKII_SYNC_H */ |
From: <svn...@op...> - 2009-03-28 14:03:16
|
Author: dgollub Date: Sat Mar 28 15:03:04 2009 New Revision: 5375 URL: http://www.opensync.org/changeset/5375 Log: Ported file-sync plugin to latest hasthable API change (#1082). fixes #1082 Modified: plugins/file-sync/src/file_sync.c plugins/file-sync/src/file_sync.h Modified: plugins/file-sync/src/file_sync.c ============================================================================== --- plugins/file-sync/src/file_sync.c Sat Mar 28 14:59:51 2009 (r5374) +++ plugins/file-sync/src/file_sync.c Sat Mar 28 15:03:04 2009 (r5375) @@ -30,9 +30,6 @@ if (dir->sink) osync_objtype_sink_unref(dir->sink); - if (dir->hashtable) - osync_hashtable_unref(dir->hashtable); - g_free(dir); } @@ -260,6 +257,7 @@ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, directory, subdir, ctx); OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(directory->sink); path = g_build_filename(directory->path, subdir, NULL); osync_trace(TRACE_INTERNAL, "path %s", path); @@ -310,10 +308,10 @@ osync_change_set_hash(change, hash); g_free(hash); - OSyncChangeType type = osync_hashtable_get_changetype(directory->hashtable, change); + OSyncChangeType type = osync_hashtable_get_changetype(hashtable, change); osync_change_set_changetype(change, type); - osync_hashtable_update_change(directory->hashtable, change); + osync_hashtable_update_change(hashtable, change); if (type == OSYNC_CHANGE_TYPE_UNMODIFIED) { g_free(filename); @@ -390,11 +388,13 @@ OSyncFileDir *dir = userdata; OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); + OSyncError *error = NULL; if (slow_sync) { osync_trace(TRACE_INTERNAL, "Slow sync requested"); - if (!osync_hashtable_slowsync(dir->hashtable, &error)) + if (!osync_hashtable_slowsync(hashtable, &error)) { osync_context_report_osyncerror(ctx, error); osync_trace(TRACE_EXIT_ERROR, "%s - %s", __func__, osync_error_print(&error)); @@ -407,7 +407,7 @@ osync_filesync_report_dir(dir, info, NULL, ctx); - OSyncList *u, *uids = osync_hashtable_get_deleted(dir->hashtable); + OSyncList *u, *uids = osync_hashtable_get_deleted(hashtable); for (u = uids; u; u = u->next) { OSyncChange *change = osync_change_new(&error); if (!change) { @@ -436,7 +436,7 @@ osync_context_report_change(ctx, change); - osync_hashtable_update_change(dir->hashtable, change); + osync_hashtable_update_change(hashtable, change); osync_change_unref(change); } @@ -451,6 +451,7 @@ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p)", __func__, sink, info, ctx, change, userdata); OSyncFileDir *dir = userdata; + OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink); char *filename = NULL, *tmp; @@ -476,7 +477,7 @@ } g_free(filename); - osync_hashtable_update_change(dir->hashtable, change); + osync_hashtable_update_change(hashtable, change); g_free(hash); osync_context_report_success(ctx); @@ -496,9 +497,6 @@ if (!osync_anchor_update(anchor, dir->path, &error)) goto error; - if (!osync_hashtable_save(dir->hashtable, &error)) - goto error; - osync_context_report_success(ctx); osync_trace(TRACE_EXIT, "%s", __func__); @@ -581,16 +579,8 @@ /* Request an anchor from the framework. */ osync_objtype_sink_enable_anchor(dir->sink, TRUE); - osync_trace(TRACE_INTERNAL, "The configdir: %s", osync_plugin_info_get_configdir(info)); - char *tablepath = g_strdup_printf("%s/hashtable.db", osync_plugin_info_get_configdir(info)); - dir->hashtable = osync_hashtable_new(tablepath, objtype, error); - g_free(tablepath); - - if (!dir->hashtable) - goto error_free_env; - - if (!osync_hashtable_load(dir->hashtable, error)) - goto error_free_env; + /* Request an hashtable from the framework. */ + osync_objtype_sink_enable_hashtable(dir->sink, TRUE); } if (pathes) { Modified: plugins/file-sync/src/file_sync.h ============================================================================== --- plugins/file-sync/src/file_sync.h Sat Mar 28 14:59:51 2009 (r5374) +++ plugins/file-sync/src/file_sync.h Sat Mar 28 15:03:04 2009 (r5375) @@ -45,7 +45,6 @@ OSyncObjFormat *objformat_output; const char *path; GDir *dir; - OSyncHashTable *hashtable; OSyncObjTypeSink *sink; osync_bool recursive; OSyncFileEnv *env; |