Updating kdepim plugin

View: New views
17 Messages — Rating Filter:   Alert me  

Updating kdepim plugin

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

A user on the Barry mailing list was interested in trying a Barry+kdepim
test, and the kdepim plugin didn't compile against the latest SVN.

Here is a series of patches which makes kdepim compile on my system.
I don't have commit access to the kdepim plugin, or I'd have committed them.

Is the kdepim plugin still the recommended way of working with Kontact?

Thanks,
- Chris


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 1/6] Updated for osync_plugin_info_num_objtypes API change

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/kdepim_sync.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/kdepim_sync.cpp b/src/kdepim_sync.cpp
index 1bfc5f1..0139c3f 100644
--- a/src/kdepim_sync.cpp
+++ b/src/kdepim_sync.cpp
@@ -146,11 +146,14 @@ void *kde_initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **er
 
 osync_bool kde_discover(OSyncPluginInfo *info, void *userdata, OSyncError **error)
 {
+ OSyncList *l, *list = NULL;
  osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, userdata, info, error);
 
- int num_objtypes = osync_plugin_info_num_objtypes(info);
- for (int n = 0; n < num_objtypes; n++)
- osync_objtype_sink_set_available(osync_plugin_info_nth_objtype(info, n), TRUE);
+ list = osync_plugin_info_get_objtype_sinks(info);
+ for (l=list; l; l = l->next) {
+ OSyncObjTypeSink *sink = (OSyncObjTypeSink *) l->data;
+ osync_objtype_sink_set_available(sink, TRUE);
+ }
 
         // set information about the peer (KDE itself)
         {
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 2/6] Updated for osync_objtype_sink_set_functions() API change

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/datasource.cpp |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/datasource.cpp b/src/datasource.cpp
index 7fbacb3..3ba94d9 100644
--- a/src/datasource.cpp
+++ b/src/datasource.cpp
@@ -80,15 +80,13 @@ bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSy
     return true;
   }
 
-  OSyncObjTypeSinkFunctions functions;
-  memset(&functions, 0, sizeof(functions));
-  functions.connect     = connect_wrapper;
-  functions.disconnect  = disconnect_wrapper;
-  functions.get_changes = get_changes_wrapper;
-  functions.commit      = commit_wrapper;
-  functions.sync_done   = sync_done_wrapper;
-
-  osync_objtype_sink_set_functions(sink, functions, this);
+  osync_objtype_sink_set_connect_func(sink, connect_wrapper);
+  osync_objtype_sink_set_disconnect_func(sink, disconnect_wrapper);
+  osync_objtype_sink_set_get_changes_func(sink, get_changes_wrapper);
+  osync_objtype_sink_set_commit_func(sink, commit_wrapper);
+  osync_objtype_sink_set_sync_done_func(sink, sync_done_wrapper);
+
+  osync_objtype_sink_set_userdata(sink, this);
 
   // Request an anchor from the framework.
   osync_objtype_sink_enable_anchor(sink, TRUE);
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 3/6] Updated for anchor/state_db and anchor key/value API changes

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/datasource.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/datasource.cpp b/src/datasource.cpp
index 3ba94d9..6d1eb13 100644
--- a/src/datasource.cpp
+++ b/src/datasource.cpp
@@ -88,8 +88,8 @@ bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSy
 
   osync_objtype_sink_set_userdata(sink, this);
 
-  // Request an anchor from the framework.
-  osync_objtype_sink_enable_anchor(sink, TRUE);
+  // Request a state_db from the framework.
+  osync_objtype_sink_enable_state_db(sink, TRUE);
 
   const char *configdir = osync_plugin_info_get_configdir(info);
   QString tablepath = QString("%1/hashtable.db").arg(configdir);
@@ -132,12 +132,12 @@ void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
 
   // Detection mechanismn if this is the first sync
   OSyncError *error = NULL;
-  osync_bool anchormatch = FALSE;
+  osync_bool statematch = FALSE;
 
   OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
-  OSyncAnchor *anchor = osync_objtype_sink_get_anchor(sink);
+  OSyncSinkStateDB *state_db = osync_objtype_sink_get_state_db(sink);
 
-  if ( !osync_anchor_compare(anchor, "true", &anchormatch, &error) )
+  if ( !osync_sink_state_equal(state_db, "done", "true", &statematch, &error) )
   {
     osync_context_report_osyncerror(ctx, error);
     osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(&error));
@@ -145,7 +145,7 @@ void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
     return;
   }
 
-  if ( !anchormatch )
+  if ( !statematch )
   {
     osync_trace(TRACE_INTERNAL, "Setting slow-sync for %s", objtype);
     osync_objtype_sink_set_slowsync(sink, TRUE);
@@ -165,9 +165,9 @@ void OSyncDataSource::sync_done(OSyncPluginInfo *info, OSyncContext *ctx)
   OSyncError *error = NULL;
 
   OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
-  OSyncAnchor *anchor = osync_objtype_sink_get_anchor(sink);
+  OSyncSinkStateDB *state_db = osync_objtype_sink_get_state_db(sink);
 
-  if ( !osync_anchor_update(anchor, "true", &error) )
+  if ( !osync_sink_state_set(state_db, "done", "true", &error) )
   {
     osync_context_report_osyncerror(ctx, error);
     osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(&error));
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 4/6] Updated for osync_context_report_slowsync() API change

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/datasource.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/datasource.cpp b/src/datasource.cpp
index 6d1eb13..238fdda 100644
--- a/src/datasource.cpp
+++ b/src/datasource.cpp
@@ -148,7 +148,7 @@ void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
   if ( !statematch )
   {
     osync_trace(TRACE_INTERNAL, "Setting slow-sync for %s", objtype);
-    osync_objtype_sink_set_slowsync(sink, TRUE);
+    osync_context_report_slowsync(ctx);
   }
   osync_context_report_success(ctx);
 
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 5/6] A number of related 0.4x API changes

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


- hashtable API change
- added OSyncObjTypeSink *sink to C++ wrapper class member args
- added osync_bool slow_sync to args as well
---
 src/datasource.cpp |   46 +++++++++++++------------------------------
 src/datasource.h   |   17 +++++++--------
 src/kaddrbook.cpp  |   20 +++++++++---------
 src/kaddrbook.h    |    8 +++---
 src/kcal.cpp       |   54 ++++++++++++++++++++++++++-------------------------
 src/kcal.h         |   22 ++++++++++----------
 src/knotes.cpp     |   19 +++++++++--------
 src/knotes.h       |    8 +++---
 8 files changed, 89 insertions(+), 105 deletions(-)

diff --git a/src/datasource.cpp b/src/datasource.cpp
index 238fdda..1ebdbc9 100644
--- a/src/datasource.cpp
+++ b/src/datasource.cpp
@@ -1,6 +1,7 @@
 /**
  * @author Andrew Baumann <andrewb@...>
  * changed to 0.40 API by Martin Koller <kollix@...>
+ * some additional 0.40 API updates by Chris Frey <cdfrey@...>
  */
 
 #include <stdlib.h>
@@ -16,7 +17,7 @@ static void connect_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSync
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
   OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
-  obj->connect(info, ctx);
+  obj->connect(sink, info, ctx);
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
@@ -26,7 +27,7 @@ static void disconnect_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OS
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
   OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
-  obj->disconnect(info, ctx);
+  obj->disconnect(sink, info, ctx);
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
@@ -37,7 +38,7 @@ static void get_changes_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info,
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
   OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
-  obj->get_changes(info, ctx);
+  obj->get_changes(sink, info, ctx, slow_sync);
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
@@ -48,7 +49,7 @@ static void commit_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info,
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx, chg);
   OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
-  obj->commit(info, ctx, chg);
+  obj->commit(sink, info, ctx, chg);
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
@@ -58,7 +59,7 @@ static void sync_done_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSy
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __PRETTY_FUNCTION__, sink, userdata, info, ctx);
   OSyncDataSource *obj = static_cast<OSyncDataSource *>(userdata);
-  obj->sync_done(info, ctx);
+  obj->sync_done(sink, info, ctx);
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
@@ -91,18 +92,8 @@ bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSy
   // Request a state_db from the framework.
   osync_objtype_sink_enable_state_db(sink, TRUE);
 
-  const char *configdir = osync_plugin_info_get_configdir(info);
-  QString tablepath = QString("%1/hashtable.db").arg(configdir);
-  hashtable = osync_hashtable_new(QFile::encodeName(tablepath), objtype, error);
-  if ( !hashtable ) {
-    osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(error));
-    return false;
-  }
-  if ( !osync_hashtable_load(hashtable, error) )
-  {
-    osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(error));
-    return false;
-  }
+  // Request a hashtable from the framework
+  osync_objtype_sink_enable_hashtable(sink, TRUE);
 
   // NOTE: advanced options are per plugin; currently we read the FilterCategory
   // for each Resource (later this could be separated by Resource via a different name, etc.)
@@ -126,7 +117,7 @@ bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSy
 
 //--------------------------------------------------------------------------------
 
-void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
+void OSyncDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
@@ -134,7 +125,6 @@ void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
   OSyncError *error = NULL;
   osync_bool statematch = FALSE;
 
-  OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
   OSyncSinkStateDB *state_db = osync_objtype_sink_get_state_db(sink);
 
   if ( !osync_sink_state_equal(state_db, "done", "true", &statematch, &error) )
@@ -157,14 +147,13 @@ void OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void OSyncDataSource::sync_done(OSyncPluginInfo *info, OSyncContext *ctx)
+void OSyncDataSource::sync_done(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
   // Detection mechanismn if this is the first sync
   OSyncError *error = NULL;
 
-  OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
   OSyncSinkStateDB *state_db = osync_objtype_sink_get_state_db(sink);
 
   if ( !osync_sink_state_set(state_db, "done", "true", &error) )
@@ -176,19 +165,12 @@ void OSyncDataSource::sync_done(OSyncPluginInfo *info, OSyncContext *ctx)
   }
   osync_context_report_success(ctx);
 
-  if ( hashtable && !osync_hashtable_save(hashtable, &error) )
-  {
-    osync_context_report_osyncerror(ctx, error);
-    osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(&error));
-    osync_error_unref(&error);
-  }
-
   osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
 //--------------------------------------------------------------------------------
 
-bool OSyncDataSource::report_change(OSyncPluginInfo *info, OSyncContext *ctx,
+bool OSyncDataSource::report_change(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx,
                                     QString uid, QString data, QString hash, OSyncObjFormat *objformat)
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %s, (data), (hash), %p)", __PRETTY_FUNCTION__,
@@ -209,6 +191,7 @@ bool OSyncDataSource::report_change(OSyncPluginInfo *info, OSyncContext *ctx,
   osync_change_set_uid(change, uid.utf8());
   osync_change_set_hash(change, hash.utf8());
 
+  OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
   OSyncChangeType changetype = osync_hashtable_get_changetype(hashtable, change);
   osync_change_set_changetype(change, changetype);
 
@@ -246,11 +229,12 @@ bool OSyncDataSource::report_change(OSyncPluginInfo *info, OSyncContext *ctx,
 
 //--------------------------------------------------------------------------------
 
-bool OSyncDataSource::report_deleted(OSyncPluginInfo *info, OSyncContext *ctx, OSyncObjFormat *objformat)
+bool OSyncDataSource::report_deleted(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncObjFormat *objformat)
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __PRETTY_FUNCTION__, info, ctx, objformat);
 
   OSyncError *error = NULL;
+  OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
   OSyncList *u, *uids  = osync_hashtable_get_deleted(hashtable);
   OSyncChange *change = NULL;
 
@@ -296,8 +280,6 @@ error:
 
 OSyncDataSource::~OSyncDataSource()
 {
-  if (hashtable)
-    osync_hashtable_unref(hashtable);
 }
 
 //--------------------------------------------------------------------------------
diff --git a/src/datasource.h b/src/datasource.h
index cf30507..b7c4c8c 100644
--- a/src/datasource.h
+++ b/src/datasource.h
@@ -15,7 +15,7 @@ class OSyncDataSource
  friend class KCalSharedResource;
 
  public:
- OSyncDataSource(const char *objtype) : objtype(objtype), hashtable(0) {}
+ OSyncDataSource(const char *objtype) : objtype(objtype) {}
  virtual ~OSyncDataSource();
 
                 const char *getObjType() const { return objtype; }
@@ -24,11 +24,11 @@ class OSyncDataSource
  virtual bool initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error);
 
  /* these map to opensync's per-sink callbacks */
- virtual void connect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void disconnect(OSyncPluginInfo *info, OSyncContext *ctx) = 0;
- virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx) = 0;
- virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg) = 0;
- virtual void sync_done(OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx) = 0;
+ virtual void get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync) = 0;
+ virtual void commit(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg) = 0;
+ virtual void sync_done(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
 
  // return true if at least one item in the given list is included in the categories member
  bool has_category(const QStringList &list) const;
@@ -37,12 +37,11 @@ class OSyncDataSource
 
  protected:
  const char *objtype;
- OSyncHashTable *hashtable;
  QStringList categories;
 
  /* utility functions for subclasses */
- bool report_change(OSyncPluginInfo *info, OSyncContext *ctx, QString uid, QString data, QString hash, OSyncObjFormat *objformat);
- bool report_deleted(OSyncPluginInfo *info, OSyncContext *ctx, OSyncObjFormat *objformat);
+ bool report_change(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, QString uid, QString data, QString hash, OSyncObjFormat *objformat);
+ bool report_deleted(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncObjFormat *objformat);
 };
 
 #endif // KDEPIM_OSYNC_DATASOURCE_H
diff --git a/src/kaddrbook.cpp b/src/kaddrbook.cpp
index b4ec1ec..da38536 100644
--- a/src/kaddrbook.cpp
+++ b/src/kaddrbook.cpp
@@ -54,7 +54,7 @@ QString KContactDataSource::calc_hash(KABC::Addressee &e)
 
 //--------------------------------------------------------------------------------
 
-void KContactDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
+void KContactDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
@@ -70,14 +70,14 @@ void KContactDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
  return;
  }
 
- OSyncDataSource::connect(info, ctx);
+ OSyncDataSource::connect(sink, info, ctx);
 
  osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
 //--------------------------------------------------------------------------------
 
-void KContactDataSource::disconnect(OSyncPluginInfo *info, OSyncContext *ctx)
+void KContactDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
@@ -101,15 +101,14 @@ void KContactDataSource::disconnect(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KContactDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
+void KContactDataSource::get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
  OSyncError *error = NULL;
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
 
- OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
-
- if (osync_objtype_sink_get_slowsync(sink)) {
+ if (slow_sync) {
  osync_trace(TRACE_INTERNAL, "Got slow-sync, resetting hashtable");
  if (!osync_hashtable_slowsync(hashtable, &error)) {
  osync_context_report_osyncerror(ctx, error);
@@ -132,7 +131,7 @@ void KContactDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  // only vcard3.0 exports Categories
  QString data = converter.createVCard(*it, KABC::VCardConverter::v3_0);
 
- if (!report_change(info, ctx, it->uid(), data, calc_hash(*it), objformat)) {
+ if (!report_change(sink, info, ctx, it->uid(), data, calc_hash(*it), objformat)) {
 
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Failed to get changes");
  osync_trace(TRACE_EXIT_ERROR, "%s", __PRETTY_FUNCTION__);
@@ -140,7 +139,7 @@ void KContactDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  }
  }
 
- if (!report_deleted(info, ctx, objformat)) {
+ if (!report_deleted(sink, info, ctx, objformat)) {
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Failed detecting deleted changes.");
  osync_trace(TRACE_EXIT_ERROR, "%s", __PRETTY_FUNCTION__);
  return;
@@ -152,7 +151,7 @@ void KContactDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KContactDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
+void KContactDataSource::commit(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, ctx, chg);
  KABC::VCardConverter converter;
@@ -224,6 +223,7 @@ void KContactDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChang
  }
  }
 
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
  osync_hashtable_update_change(hashtable, chg);
 
  osync_context_report_success(ctx);
diff --git a/src/kaddrbook.h b/src/kaddrbook.h
index a51c7cb..689a0d7 100644
--- a/src/kaddrbook.h
+++ b/src/kaddrbook.h
@@ -33,10 +33,10 @@ class KContactDataSource : public OSyncDataSource
  KContactDataSource() : OSyncDataSource("contact"), addressbookptr(0), modified(false), ticket(0) {};
  virtual ~KContactDataSource() {};
 
- virtual void connect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void disconnect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
+ virtual void connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync);
+ virtual void commit(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
 
  private:
  QString calc_hash(KABC::Addressee &e);
diff --git a/src/kcal.cpp b/src/kcal.cpp
index 5f00dcc..3608ea6 100644
--- a/src/kcal.cpp
+++ b/src/kcal.cpp
@@ -175,7 +175,9 @@ bool KCalSharedResource::commit(OSyncDataSource *dsobj, OSyncContext *ctx, OSync
  * This function exists because the logic for converting the events or to-dos
  * is the same, only the objtype and format is different.
  */
-bool KCalSharedResource::report_incidence(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx,
+bool KCalSharedResource::report_incidence(OSyncDataSource *dsobj,
+                                          OSyncObjTypeSink *sink,
+                                          OSyncPluginInfo *info, OSyncContext *ctx,
                                           KCal::Incidence *e, OSyncObjFormat *objformat)
 {
  /* Build a local calendar for the incidence data */
@@ -186,12 +188,12 @@ bool KCalSharedResource::report_incidence(OSyncDataSource *dsobj, OSyncPluginInf
  KCal::ICalFormat format;
  QString data = format.toString(&cal);
 
- return dsobj->report_change(info, ctx, e->uid(), data, calc_hash(e), objformat);
+ return dsobj->report_change(sink, info, ctx, e->uid(), data, calc_hash(e), objformat);
 }
 
 //--------------------------------------------------------------------------------
 
-bool KCalSharedResource::get_event_changes(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx)
+bool KCalSharedResource::get_event_changes(OSyncDataSource *dsobj, OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info);
  OSyncObjFormat *objformat = osync_format_env_find_objformat(formatenv, "vevent20");
@@ -210,7 +212,7 @@ bool KCalSharedResource::get_event_changes(OSyncDataSource *dsobj, OSyncPluginIn
  if ( (*i)->uid().contains("KABC_Birthday") || (*i)->uid().contains("KABC_Anniversary") )
  continue;
 
- if (!report_incidence(dsobj, info, ctx, *i, objformat))
+ if (!report_incidence(dsobj, sink, info, ctx, *i, objformat))
  return false;
  }
 
@@ -219,7 +221,7 @@ bool KCalSharedResource::get_event_changes(OSyncDataSource *dsobj, OSyncPluginIn
 
 //--------------------------------------------------------------------------------
 
-bool KCalSharedResource::get_todo_changes(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx)
+bool KCalSharedResource::get_todo_changes(OSyncDataSource *dsobj, OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info);
  OSyncObjFormat *objformat = osync_format_env_find_objformat(formatenv, "vtodo20");
@@ -230,7 +232,7 @@ bool KCalSharedResource::get_todo_changes(OSyncDataSource *dsobj, OSyncPluginInf
  if ( ! dsobj->has_category((*i)->categories()) )
  continue;
 
- if (!report_incidence(dsobj, info, ctx, *i, objformat))
+ if (!report_incidence(dsobj, sink, info, ctx, *i, objformat))
  return false;
  }
 
@@ -239,23 +241,23 @@ bool KCalSharedResource::get_todo_changes(OSyncDataSource *dsobj, OSyncPluginInf
 
 //--------------------------------------------------------------------------------
 
-void KCalEventDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
+void KCalEventDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  if (kcal->open(ctx))
-          OSyncDataSource::connect(info, ctx);
+          OSyncDataSource::connect(sink, info, ctx);
 }
 
 //--------------------------------------------------------------------------------
 
-void KCalTodoDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
+void KCalTodoDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  if (kcal->open(ctx))
- OSyncDataSource::connect(info, ctx);
+ OSyncDataSource::connect(sink, info, ctx);
 }
 
 //--------------------------------------------------------------------------------
 
-void KCalEventDataSource::disconnect(OSyncPluginInfo *, OSyncContext *ctx)
+void KCalEventDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
 {
  if (kcal->close(ctx))
  osync_context_report_success(ctx);
@@ -263,7 +265,7 @@ void KCalEventDataSource::disconnect(OSyncPluginInfo *, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KCalTodoDataSource::disconnect(OSyncPluginInfo *, OSyncContext *ctx)
+void KCalTodoDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
 {
  if (kcal->close(ctx))
  osync_context_report_success(ctx);
@@ -271,15 +273,14 @@ void KCalTodoDataSource::disconnect(OSyncPluginInfo *, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KCalEventDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
+void KCalEventDataSource::get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
  OSyncError *error = NULL;
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
 
- OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info);
-
- if (osync_objtype_sink_get_slowsync(sink)) {
+ if (slow_sync) {
  osync_trace(TRACE_INTERNAL, "Got slow-sync, resetting hashtable");
  if (!osync_hashtable_slowsync(hashtable, &error)) {
  osync_context_report_osyncerror(ctx, error);
@@ -288,7 +289,7 @@ void KCalEventDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  }
  }
 
- if (!kcal->get_event_changes(this, info, ctx)) {
+ if (!kcal->get_event_changes(this, sink, info, ctx)) {
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Error while reciving latest changes.");
  osync_trace(TRACE_EXIT_ERROR, "%s: error in get_todo_changes", __PRETTY_FUNCTION__);
  return;
@@ -297,7 +298,7 @@ void KCalEventDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info);
  OSyncObjFormat *objformat = osync_format_env_find_objformat(formatenv, "vevent20");
 
- if (!report_deleted(info, ctx, objformat)) {
+ if (!report_deleted(sink, info, ctx, objformat)) {
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Error while detecting latest changes.");
  osync_trace(TRACE_EXIT_ERROR, "%s", __PRETTY_FUNCTION__);
  return;
@@ -309,18 +310,17 @@ void KCalEventDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KCalTodoDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
+void KCalTodoDataSource::get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
  OSyncError *error = NULL;
 
- OSyncObjTypeSink *sink = osync_plugin_info_get_sink(info);
-
  OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info);
  OSyncObjFormat *objformat = osync_format_env_find_objformat(formatenv, "vtodo20");
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
 
- if (osync_objtype_sink_get_slowsync(sink)) {
+ if (slow_sync) {
  osync_trace(TRACE_INTERNAL, "Got slow-sync");
  if (!osync_hashtable_slowsync(hashtable, &error)) {
  osync_context_report_osyncerror(ctx, error);
@@ -330,13 +330,13 @@ void KCalTodoDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
 
  }
 
- if (!kcal->get_todo_changes(this, info, ctx)) {
+ if (!kcal->get_todo_changes(this, sink, info, ctx)) {
  osync_trace(TRACE_EXIT_ERROR, "%s: error in get_todo_changes", __PRETTY_FUNCTION__);
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Error while detecting latest changes.");
  return;
  }
 
- if (!report_deleted(info, ctx, objformat)) {
+ if (!report_deleted(sink, info, ctx, objformat)) {
  osync_trace(TRACE_EXIT_ERROR, "%s", __PRETTY_FUNCTION__);
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Error while detecting deleted entries.");
  return;
@@ -348,24 +348,26 @@ void KCalTodoDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KCalEventDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
+void KCalEventDataSource::commit(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
 {
  // We use the same function for events and to-do
  if (!kcal->commit(this, ctx, chg))
  return;
 
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
  osync_hashtable_update_change(hashtable, chg);
  osync_context_report_success(ctx);
 }
 
 //--------------------------------------------------------------------------------
 
-void KCalTodoDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
+void KCalTodoDataSource::commit(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
 {
  // We use the same function for calendar and to-do
  if (!kcal->commit(this, ctx, chg))
  return;
 
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
  osync_hashtable_update_change(hashtable, chg);
  osync_context_report_success(ctx);
 }
diff --git a/src/kcal.h b/src/kcal.h
index 1d53891..d3b9082 100644
--- a/src/kcal.h
+++ b/src/kcal.h
@@ -35,15 +35,15 @@ class KCalSharedResource
  KCalSharedResource() : calendar(0), refcount(0) { }
  bool open(OSyncContext *ctx);
  bool close(OSyncContext *ctx);
- bool get_event_changes(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx);
- bool get_todo_changes(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx);
+ bool get_event_changes(OSyncDataSource *dsobj, OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ bool get_todo_changes(OSyncDataSource *dsobj, OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
  bool commit(OSyncDataSource *dsobj, OSyncContext *ctx, OSyncChange *chg);
 
  private:
  KCal::CalendarResources *calendar;
  int refcount;
 
- bool report_incidence(OSyncDataSource *dsobj, OSyncPluginInfo *info, OSyncContext *ctx,
+ bool report_incidence(OSyncDataSource *dsobj, OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx,
                                       KCal::Incidence *e, OSyncObjFormat *objformat);
 };
 
@@ -55,10 +55,10 @@ class KCalEventDataSource : public OSyncDataSource
  KCalEventDataSource(KCalSharedResource *kcal) : OSyncDataSource("event"), kcal(kcal) {};
  virtual ~KCalEventDataSource() {};
 
- virtual void connect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void disconnect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
+ virtual void connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync);
+ virtual void commit(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
 
  private:
  KCalSharedResource *kcal;
@@ -72,10 +72,10 @@ class KCalTodoDataSource : public OSyncDataSource
  KCalTodoDataSource(KCalSharedResource *kcal) : OSyncDataSource("todo"), kcal(kcal) {};
  virtual ~KCalTodoDataSource() {};
 
- virtual void connect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void disconnect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
+ virtual void connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync);
+ virtual void commit(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
 
  private:
  KCalSharedResource *kcal;
diff --git a/src/knotes.cpp b/src/knotes.cpp
index bbce782..b98e883 100644
--- a/src/knotes.cpp
+++ b/src/knotes.cpp
@@ -36,7 +36,7 @@ SOFTWARE IS DISCLAIMED.
 
 //--------------------------------------------------------------------------------
 
-void KNotesDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
+void KNotesDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
@@ -68,14 +68,14 @@ void KNotesDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx)
 
  kn_iface = new KNotesIface_stub("knotes", "KNotesIface");
 
- OSyncDataSource::connect(info, ctx);
+ OSyncDataSource::connect(sink, info, ctx);
 
  osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
 }
 
 //--------------------------------------------------------------------------------
 
-void KNotesDataSource::disconnect(OSyncPluginInfo *, OSyncContext *ctx)
+void KNotesDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
 
@@ -125,7 +125,7 @@ static QString strip_html(QString input)
 
 //--------------------------------------------------------------------------------
 
-void KNotesDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
+void KNotesDataSource::get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync)
 {
  osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
  QMap <KNoteID_t,QString> fNotes;
@@ -139,8 +139,8 @@ void KNotesDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  return;
  }
 
- OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, objtype);
- if (osync_objtype_sink_get_slowsync(sink)) {
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
+ if (slow_sync) {
  osync_trace(TRACE_INTERNAL, "Got slow-sync, resetting hashtable");
  if (!osync_hashtable_slowsync(hashtable, &error)) {
  osync_context_report_osyncerror(ctx, error);
@@ -161,7 +161,7 @@ void KNotesDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  hash_value.update(data.utf8());
  QString hash = hash_value.base64Digest();
 
- if ( !report_change(info, ctx, uid, data, hash, objformat) ) {
+ if ( !report_change(sink, info, ctx, uid, data, hash, objformat) ) {
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Failed to get changes");
  osync_trace(TRACE_EXIT_ERROR, "%s", __PRETTY_FUNCTION__);
  return;
@@ -170,7 +170,7 @@ void KNotesDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
  hash_value.reset();
  }
 
- if (!report_deleted(info, ctx, objformat)) {
+ if (!report_deleted(sink, info, ctx, objformat)) {
  osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Failed detecting deleted changes.");
  osync_trace(TRACE_EXIT_ERROR, "%s", __func__);
  return;
@@ -182,7 +182,7 @@ void KNotesDataSource::get_changes(OSyncPluginInfo *info, OSyncContext *ctx)
 
 //--------------------------------------------------------------------------------
 
-void KNotesDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
+void KNotesDataSource::commit(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx, OSyncChange *chg)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, ctx, chg);
  OSyncChangeType type = osync_change_get_changetype(chg);
@@ -258,6 +258,7 @@ void KNotesDataSource::commit(OSyncPluginInfo *, OSyncContext *ctx, OSyncChange
  }*/
  }
 
+ OSyncHashTable *hashtable = osync_objtype_sink_get_hashtable(sink);
  osync_hashtable_update_change(hashtable, chg);
  osync_context_report_success(ctx);
  osync_trace(TRACE_EXIT, "%s", __func__);
diff --git a/src/knotes.h b/src/knotes.h
index 39e225f..8c4d2d6 100644
--- a/src/knotes.h
+++ b/src/knotes.h
@@ -57,10 +57,10 @@ class KNotesDataSource : public OSyncDataSource
  KNotesDataSource() : OSyncDataSource("note") {};
  virtual ~KNotesDataSource() {};
 
- virtual void connect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void disconnect(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx);
- virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
+ virtual void connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx);
+ virtual void get_changes(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, osync_bool slow_sync);
+ virtual void commit(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
 
  private:
  DCOPClient *kn_dcop;
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 6/6] Get rid of unused variable compiler warnings

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/datasource.cpp |    2 +-
 src/kaddrbook.cpp  |    2 +-
 src/kcal.cpp       |    4 ++--
 src/knotes.cpp     |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/datasource.cpp b/src/datasource.cpp
index 1ebdbc9..d504438 100644
--- a/src/datasource.cpp
+++ b/src/datasource.cpp
@@ -68,7 +68,7 @@ static void sync_done_wrapper(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSy
 //--------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------
 
-bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error)
+bool OSyncDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **)
 {
   osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, plugin, info);
 
diff --git a/src/kaddrbook.cpp b/src/kaddrbook.cpp
index da38536..f7ea87a 100644
--- a/src/kaddrbook.cpp
+++ b/src/kaddrbook.cpp
@@ -77,7 +77,7 @@ void KContactDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info,
 
 //--------------------------------------------------------------------------------
 
-void KContactDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OSyncContext *ctx)
+void KContactDataSource::disconnect(OSyncObjTypeSink *, OSyncPluginInfo *info, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
 
diff --git a/src/kcal.cpp b/src/kcal.cpp
index 3608ea6..882564b 100644
--- a/src/kcal.cpp
+++ b/src/kcal.cpp
@@ -257,7 +257,7 @@ void KCalTodoDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info,
 
 //--------------------------------------------------------------------------------
 
-void KCalEventDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
+void KCalEventDataSource::disconnect(OSyncObjTypeSink *, OSyncPluginInfo *, OSyncContext *ctx)
 {
  if (kcal->close(ctx))
  osync_context_report_success(ctx);
@@ -265,7 +265,7 @@ void KCalEventDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *,
 
 //--------------------------------------------------------------------------------
 
-void KCalTodoDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
+void KCalTodoDataSource::disconnect(OSyncObjTypeSink *, OSyncPluginInfo *, OSyncContext *ctx)
 {
  if (kcal->close(ctx))
  osync_context_report_success(ctx);
diff --git a/src/knotes.cpp b/src/knotes.cpp
index b98e883..b39d86e 100644
--- a/src/knotes.cpp
+++ b/src/knotes.cpp
@@ -75,7 +75,7 @@ void KNotesDataSource::connect(OSyncObjTypeSink *sink, OSyncPluginInfo *info, OS
 
 //--------------------------------------------------------------------------------
 
-void KNotesDataSource::disconnect(OSyncObjTypeSink *sink, OSyncPluginInfo *, OSyncContext *ctx)
+void KNotesDataSource::disconnect(OSyncObjTypeSink *, OSyncPluginInfo *, OSyncContext *ctx)
 {
  osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
 
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

[PATCH 7] Fixed OSyncList* leak from osync_plugin_info_get_objtype_sinks()

by Chris Frey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


---
 src/kdepim_sync.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/kdepim_sync.cpp b/src/kdepim_sync.cpp
index 0139c3f..a413eaa 100644
--- a/src/kdepim_sync.cpp
+++ b/src/kdepim_sync.cpp
@@ -154,6 +154,7 @@ osync_bool kde_discover(OSyncPluginInfo *info, void *userdata, OSyncError **erro
  OSyncObjTypeSink *sink = (OSyncObjTypeSink *) l->data;
  osync_objtype_sink_set_available(sink, TRUE);
  }
+ osync_list_free(list);
 
         // set information about the peer (KDE itself)
         {
--
1.6.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: Updating kdepim plugin

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:22:08 pm Chris Frey wrote:
[...]
> Here is a series of patches which makes kdepim compile on my system.
> I don't have commit access to the kdepim plugin, or I'd have committed
> them.

I CC'd Martin Koller - he was looking into kdepim-sync lately. Maybe he can
give some comments on those patches. I'll review them as well.

> Is the kdepim plugin still the recommended way of working with Kontact?

For KDE3 - yes.
There is/was the plan to have an akondai-sync plugin für KDE4.

Thanks for the patches!

Best Regards,
Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 1/6] Updated for osync_plugin_info_num_objtypes API change

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:22:48 pm Chris Frey wrote:

> ---
>  src/kdepim_sync.cpp |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/kdepim_sync.cpp b/src/kdepim_sync.cpp
> index 1bfc5f1..0139c3f 100644
> --- a/src/kdepim_sync.cpp
> +++ b/src/kdepim_sync.cpp
> @@ -146,11 +146,14 @@ void *kde_initialize(OSyncPlugin *plugin,
> OSyncPluginInfo *info, OSyncError **er
>
>  osync_bool kde_discover(OSyncPluginInfo *info, void *userdata, OSyncError
> **error) {
> + OSyncList *l, *list = NULL;
>   osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, userdata, info,
> error);
>
> - int num_objtypes = osync_plugin_info_num_objtypes(info);
> - for (int n = 0; n < num_objtypes; n++)
> - osync_objtype_sink_set_available(osync_plugin_info_nth_objtype(info, n),
> TRUE); + list = osync_plugin_info_get_objtype_sinks(info);
> + for (l=list; l; l = l->next) {
> + OSyncObjTypeSink *sink = (OSyncObjTypeSink *) l->data;
> + osync_objtype_sink_set_available(sink, TRUE);
> + }

Here is a osync_list_free of *list missing.
(We should mention the free call in the API documentaiton)

Beside that it looks good.

>
>          // set information about the peer (KDE itself)
>          {

Best Regards,
Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 2/6] Updated for osync_objtype_sink_set_functions() API change

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:23:38 pm Chris Frey wrote:
> ---
>  src/datasource.cpp |   16 +++++++---------

This one looks perfectly fine.

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 3/6] Updated for anchor/state_db and anchor key/value API changes

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:24:17 pm Chris Frey wrote:
> ---
>  src/datasource.cpp |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
[...]

> -  if ( !osync_anchor_compare(anchor, "true", &anchormatch, &error) )
> +  if ( !osync_sink_state_equal(state_db, "done", "true", &statematch,
> &error) ) {
>      osync_context_report_osyncerror(ctx, error);
>      osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__,
> osync_error_print(&error)); @@ -145,7 +145,7 @@ void
> OSyncDataSource::connect(OSyncPluginInfo *info, OSyncContext *ctx) return;
>    }
>
> -  if ( !anchormatch )
> +  if ( !statematch )
>    {
>      osync_trace(TRACE_INTERNAL, "Setting slow-sync for %s", objtype);
>      osync_objtype_sink_set_slowsync(sink, TRUE);
> @@ -165,9 +165,9 @@ void OSyncDataSource::sync_done(OSyncPluginInfo *info,
[...]

> -  if ( !osync_anchor_update(anchor, "true", &error) )
> +  if ( !osync_sink_state_set(state_db, "done", "true", &error) )
>    {
>      osync_context_report_osyncerror(ctx, error);
>      osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__,
> osync_error_print(&error));

The porting looks fine. But the Anchor use in general looked and still looks
bit strange. Actually i would only trigger a slow-sync if the sync-done would
no be called. Which is not necessary todo - since on any sync error (expect
disconnect error - iirc) the engine would trigger on the next sync a slow-sync
anyway. Instead of a anchor which just checks if the previous sync was
successful, there whould be added an anchor which checks if the
rescoure/datastore got replaced or reseted.

But yeah - the patch looks fine and does the right porting.

Best Regards,
Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 4/6] Updated for osync_context_report_slowsync() API change

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:24:48 pm Chris Frey wrote:
> ---
>  src/datasource.cpp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Perfect.

-Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 5/6] A number of related 0.4x API changes

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 09 April 2009 11:25:38 pm Chris Frey wrote:

> - hashtable API change
> - added OSyncObjTypeSink *sink to C++ wrapper class member args
> - added osync_bool slow_sync to args as well
> ---
>  src/datasource.cpp |   46 +++++++++++++------------------------------
>  src/datasource.h   |   17 +++++++--------
>  src/kaddrbook.cpp  |   20 +++++++++---------
>  src/kaddrbook.h    |    8 +++---
>  src/kcal.cpp       |   54
> ++++++++++++++++++++++++++------------------------- src/kcal.h         |  
> 22 ++++++++++----------
>  src/knotes.cpp     |   19 +++++++++--------
>  src/knotes.h       |    8 +++---
>  

Didn't find anything to complain on my brief review ;)
Perfect!

-Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 7] Fixed OSyncList* leak from osync_plugin_info_get_objtype_sinks()

by Daniel Gollub-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 10 April 2009 12:28:49 am Chris Frey wrote:
> ---
>  src/kdepim_sync.cpp |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Perfect - i bothered about that already in a  previous mail - just ignore that
mail.

I guess all the patches are perfectly to commit.

Martin, i hope you don't mind - i'll give Chris commit access to kdepim-sync.
Chris, please check back with opensync-devel@ on more complex patches. I guess
you can always commit porting patches right away to SVN.

Thanks for your contribution!

Best Regards,
Daniel

--
Daniel Gollub                        Geschaeftsfuehrer: Ralph Dehner
FOSS Developer                       Unternehmenssitz:  Vohburg
B1 Systems GmbH                      Amtsgericht:       Ingolstadt
Mobil: +49-(0)-160 47 73 970         Handelsregister:   HRB 3537
EMail: gollub@...          http://www.b1-systems.de

Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: [PATCH 7] Fixed OSyncList* leak from osync_plugin_info_get_objtype_sinks()

by Martin Koller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 11 April 2009, Daniel Gollub wrote:

> Martin, i hope you don't mind - i'll give Chris commit access to kdepim-sync.

Fine with me.

--
MfG,      ()  ascii ribbon campaign - against html mail
Martin    /\                        - against microsoft attachments

WARUM KÖNNEN PINGUINE NICHT FLIEGEN ?
 was nicht fliegt kann auch nicht abstürzen

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

Re: Updating kdepim plugin

by Adam Williamson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 2009-04-11 at 10:58 +0200, Daniel Gollub wrote:

> On Thursday 09 April 2009 11:22:08 pm Chris Frey wrote:
> [...]
> > Here is a series of patches which makes kdepim compile on my system.
> > I don't have commit access to the kdepim plugin, or I'd have committed
> > them.
>
> I CC'd Martin Koller - he was looking into kdepim-sync lately. Maybe he can
> give some comments on those patches. I'll review them as well.
>
> > Is the kdepim plugin still the recommended way of working with Kontact?
>
> For KDE3 - yes.
> There is/was the plan to have an akondai-sync plugin für KDE4.

The miraculous Kevin Kofler has actually ported the kdepim plugin to KDE
4 as a stopgap measure, and - somewhat improbably - it actually *works*.
At least it did in the quick and dirty test I threw at it, syncing my
data from Evolution to KDE 4. Details in the thread 'opensync downgrade
to 0.22' on the fedora-devel-list redhat.com mailing list, patch is:

http://cvs.fedoraproject.org/viewvc/rpms/libopensync-plugin-kdepim/devel/libopensync-plugin-kdepim-0.22-kde4.patch?view=log

Fedora 11 and Mandriva 2009 Spring will be shipping with this patched
version of the plugin.
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Fedora Talk: adamwill AT fedoraproject DOT org
http://www.happyassassin.net


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel