<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14407</id>
	<title>Nabble - Opensync - Dev</title>
	<updated>2009-11-08T09:16:46Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Opensync---Dev-f14407.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Opensync---Dev-f14407.html" />
	<subtitle type="html">OpenSync</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26255721</id>
	<title>Re: osync_archive_save_ignored_conflict()</title>
	<published>2009-11-08T09:16:46Z</published>
	<updated>2009-11-08T09:16:46Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Sunday 08 November 2009 05:14:23 pm Daniel Gollub wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I guess it should look like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ----8&amp;lt;---
&lt;br&gt;&amp;gt; BEGIN TRANSACTION;
&lt;br&gt;&amp;gt; CREATE TABLE tbl_changelog (objtype VARCHAR(64) NOT NULL, memberid INTEGER
&lt;br&gt;&amp;gt; &amp;nbsp;NOT NULL, mappingid INTEGER NOT NULL, changetype INTEGER NOT NULL, PRIMARY
&lt;br&gt;&amp;gt; &amp;nbsp;KEY (objtype, memberid, &amp;nbsp;mappingid) );
&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',1,4,4);
&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',2,4,4);
&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',1,6,4);
&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',2,6,3);
&lt;br&gt;&amp;gt; COMMIT;
&lt;br&gt;&amp;gt; ----&amp;gt;8---
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;/div&gt;Find attachtd a proof of concept patch which is implementing this ...
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;&amp;nbsp;archive/opensync_archive.c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 31 +++++++++++++++--------------
&lt;br&gt;&amp;nbsp;archive/opensync_archive_internals.h &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 ++++---
&lt;br&gt;&amp;nbsp;engine/opensync_mapping_engine.c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 16 ++++++++++++++
&lt;br&gt;&amp;nbsp;engine/opensync_mapping_engine_internals.h | &amp;nbsp; &amp;nbsp;1 
&lt;br&gt;&amp;nbsp;engine/opensync_obj_engine.c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 12 +++++++----
&lt;br&gt;&amp;nbsp;mapping/opensync_mapping_entry_internals.h | &amp;nbsp; &amp;nbsp;2 +
&lt;br&gt;&amp;nbsp;6 files changed, 48 insertions(+), 22 deletions(-)
&lt;br&gt;&lt;br&gt;---
&lt;br&gt;&lt;br&gt;&lt;br&gt;Index: opensync/mapping/opensync_mapping_entry_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/mapping/opensync_mapping_entry_internals.h	(revision 5920)
&lt;br&gt;+++ opensync/mapping/opensync_mapping_entry_internals.h	(working copy)
&lt;br&gt;@@ -47,4 +47,6 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+long long int osync_mapping_entry_get_member_id(OSyncMappingEntry *entry);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#endif /*OPENSYNC_MAPPING_ENTRY_INTERNALS_H_*/
&lt;br&gt;Index: opensync/archive/opensync_archive.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/archive/opensync_archive.c	(revision 5926)
&lt;br&gt;+++ opensync/archive/opensync_archive.c	(working copy)
&lt;br&gt;@@ -94,7 +94,7 @@
&lt;br&gt;&amp;nbsp;		return TRUE;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	query = &amp;quot;CREATE TABLE tbl_changelog (objtype VARCHAR(64), id INTEGER, entryid INTEGER, changetype INTEGER, PRIMARY KEY (objtype, id) )&amp;quot;;
&lt;br&gt;+	query = &amp;quot;CREATE TABLE tbl_changelog (objtype VARCHAR(64) NOT NULL, memberid INTEGER NOT NULL, mappingid INTEGER NOT NULL, changetype INTEGER NOT NULL, PRIMARY KEY 
&lt;br&gt;(objtype, memberid, mappingid) )&amp;quot;;
&lt;br&gt;&amp;nbsp;	if (!osync_db_query(db, query, error)) {
&lt;br&gt;&amp;nbsp;		goto error;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;@@ -478,26 +478,27 @@
&lt;br&gt;&amp;nbsp;	return FALSE;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-osync_bool osync_archive_load_ignored_conflicts(OSyncArchive *archive, const char *objtype, OSyncList **ids, OSyncList **changetypes, OSyncError **error)
&lt;br&gt;+osync_bool osync_archive_load_ignored_conflicts(OSyncArchive *archive, const char *objtype, OSyncList **memberids, OSyncList **mappingids, OSyncList **changetypes, 
&lt;br&gt;OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncList *result = NULL, *row = NULL, *column = NULL;
&lt;br&gt;&amp;nbsp;	char *query = NULL;
&lt;br&gt;&amp;nbsp;	char *escaped_objtype = NULL;
&lt;br&gt;-	long long int id = 0;
&lt;br&gt;+	long long int mappingid = 0, memberid = 0;
&lt;br&gt;&amp;nbsp;	int changetype = 0;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %s, %p, %p)&amp;quot;, __func__, archive, objtype, ids, error);
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %s, %p, %p)&amp;quot;, __func__, archive, objtype, mappingids, error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_assert(archive);
&lt;br&gt;&amp;nbsp;	osync_assert(objtype);
&lt;br&gt;-	osync_assert(ids);
&lt;br&gt;+	osync_assert(memberids);
&lt;br&gt;+	osync_assert(mappingids);
&lt;br&gt;&amp;nbsp;	osync_assert(changetypes);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	if (!osync_archive_create_changelog(archive-&amp;gt;db, objtype, error))
&lt;br&gt;&amp;nbsp;		goto error;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	escaped_objtype = osync_db_sql_escape(objtype);
&lt;br&gt;-	query = osync_strdup_printf(&amp;quot;SELECT entryid, changetype FROM tbl_changelog WHERE objtype='%s' ORDER BY id&amp;quot;, escaped_objtype);
&lt;br&gt;+	query = osync_strdup_printf(&amp;quot;SELECT memberid, mappingid, changetype FROM tbl_changelog WHERE objtype='%s' ORDER BY mappingid&amp;quot;, escaped_objtype);
&lt;br&gt;&amp;nbsp;	osync_free(escaped_objtype);
&lt;br&gt;&amp;nbsp;	escaped_objtype = NULL;
&lt;br&gt;&amp;nbsp;	result = osync_db_query_table(archive-&amp;gt;db, query, error);
&lt;br&gt;@@ -511,13 +512,15 @@
&lt;br&gt;&amp;nbsp;	for (row = result; row; row = row-&amp;gt;next) { 
&lt;br&gt;&amp;nbsp;		column = row-&amp;gt;data;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-		id = g_ascii_strtoull(osync_list_nth_data(column, 0), NULL, 0);
&lt;br&gt;-		changetype = atoi(osync_list_nth_data(column, 1));
&lt;br&gt;+		memberid = g_ascii_strtoull(osync_list_nth_data(column, 0), NULL, 0);
&lt;br&gt;+		mappingid = atoi(osync_list_nth_data(column, 1));
&lt;br&gt;+		changetype = atoi(osync_list_nth_data(column, 2));
&lt;br&gt;&amp;nbsp;		
&lt;br&gt;-		*ids = osync_list_append((*ids), GINT_TO_POINTER((int)id));
&lt;br&gt;+		*memberids = osync_list_append((*memberids), GINT_TO_POINTER((int)memberid));
&lt;br&gt;+		*mappingids = osync_list_append((*mappingids), GINT_TO_POINTER((int)mappingid));
&lt;br&gt;&amp;nbsp;		*changetypes = osync_list_append((*changetypes), GINT_TO_POINTER((int)changetype));
&lt;br&gt;&amp;nbsp;		
&lt;br&gt;-		osync_trace(TRACE_INTERNAL, &amp;quot;Loaded ignored mapping with entryid %lli&amp;quot;, id);
&lt;br&gt;+		osync_trace(TRACE_INTERNAL, &amp;quot;Loaded ignored mapping with mappingid %lli&amp;quot;, mappingid);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_db_free_list(result);	
&lt;br&gt;@@ -529,11 +532,11 @@
&lt;br&gt;&amp;nbsp;	return FALSE;	
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int id, OSyncChangeType changetype, OSyncError **error)
&lt;br&gt;+osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int memberid, long long int mappingid, OSyncChangeType changetype, 
&lt;br&gt;OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	char *query = NULL;
&lt;br&gt;&amp;nbsp;	char *escaped_objtype = NULL;
&lt;br&gt;-	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %s, %lli, %p)&amp;quot;, __func__, archive, objtype, id, error);
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %s, %lli, %lli, %p)&amp;quot;, __func__, archive, objtype, memberid, mappingid, error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_assert(archive);
&lt;br&gt;&amp;nbsp;	osync_assert(objtype);
&lt;br&gt;@@ -542,7 +545,7 @@
&lt;br&gt;&amp;nbsp;		goto error;
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	escaped_objtype = osync_db_sql_escape(objtype);
&lt;br&gt;-	query = osync_strdup_printf(&amp;quot;INSERT INTO tbl_changelog (objtype, entryid, changetype) VALUES('%s', '%lli', '%i')&amp;quot;, escaped_objtype, id, changetype);
&lt;br&gt;+	query = osync_strdup_printf(&amp;quot;INSERT INTO tbl_changelog (objtype, memberid, mappingid, changetype) VALUES('%s', '%lli', '%lli', '%i')&amp;quot;, escaped_objtype, memberid, 
&lt;br&gt;mappingid, changetype);
&lt;br&gt;&amp;nbsp;	osync_free(escaped_objtype);
&lt;br&gt;&amp;nbsp;	escaped_objtype = NULL;
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;@@ -553,7 +556,7 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_free(query);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	osync_trace(TRACE_EXIT, &amp;quot;%s: %lli&amp;quot;, __func__, id);
&lt;br&gt;+	osync_trace(TRACE_EXIT, &amp;quot;%s: %lli&amp;quot;, __func__, mappingid);
&lt;br&gt;&amp;nbsp;	return TRUE;
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp; error:
&lt;br&gt;Index: opensync/archive/opensync_archive_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/archive/opensync_archive_internals.h	(revision 5926)
&lt;br&gt;+++ opensync/archive/opensync_archive_internals.h	(working copy)
&lt;br&gt;@@ -136,24 +136,26 @@
&lt;br&gt;&amp;nbsp; *
&lt;br&gt;&amp;nbsp; * @param archive The group archive
&lt;br&gt;&amp;nbsp; * @param objtype Requested object type 
&lt;br&gt;- * @param mappingsids List to store the archive (database) ids of each entry
&lt;br&gt;+ * @param memberids List to store the member ids of each entry
&lt;br&gt;+ * @param mappingsids List to store the mapping ids of each entry
&lt;br&gt;&amp;nbsp; * @param changetypes List to store the changetypes for each entry
&lt;br&gt;&amp;nbsp; * @param error Pointer to an error struct
&lt;br&gt;&amp;nbsp; * @return TRUE on when all changes successfully loaded otherwise FALSE
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;-osync_bool osync_archive_load_ignored_conflicts(OSyncArchive *archive, const char *objtype, OSyncList **mappingsids, OSyncList **changetypes, OSyncError **error);
&lt;br&gt;+osync_bool osync_archive_load_ignored_conflicts(OSyncArchive *archive, const char *objtype, OSyncList **memberids, OSyncList **mappingsids, OSyncList **changetypes, 
&lt;br&gt;OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;&amp;nbsp; * @brief Saves an entry in the ignored conflict list.
&lt;br&gt;&amp;nbsp; *
&lt;br&gt;&amp;nbsp; * @param archive The group archive
&lt;br&gt;&amp;nbsp; * @param objtype Reported object type of entry
&lt;br&gt;+ * @param memberid Member ID of entry 
&lt;br&gt;&amp;nbsp; * @param mappingid Mapping Entry ID of entry 
&lt;br&gt;&amp;nbsp; * @param changetype Changetype of entry 
&lt;br&gt;&amp;nbsp; * @param error Pointer to an error struct
&lt;br&gt;&amp;nbsp; * @return Returns TRUE on success, FALSE otherwise 
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;-osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int mappingid, OSyncChangeType changetype, OSyncError **error);
&lt;br&gt;+osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int memberid, long long int mappingid, OSyncChangeType changetype, 
&lt;br&gt;OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;&amp;nbsp; * @brief Deletes all ignored conflict entries of the changelog with the objtype.
&lt;br&gt;Index: opensync/engine/opensync_mapping_engine.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/engine/opensync_mapping_engine.c	(revision 5920)
&lt;br&gt;+++ opensync/engine/opensync_mapping_engine.c	(working copy)
&lt;br&gt;@@ -126,6 +126,20 @@
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+OSyncMappingEntryEngine *osync_mapping_engine_find_entry_by_memberid(OSyncMappingEngine *engine, long long int memberid)
&lt;br&gt;+{
&lt;br&gt;+	OSyncList *e;
&lt;br&gt;+	for (e = engine-&amp;gt;entries; e; e = e-&amp;gt;next) {
&lt;br&gt;+		OSyncMappingEntryEngine *entry = e-&amp;gt;data;
&lt;br&gt;+
&lt;br&gt;+		if (osync_mapping_entry_get_member_id(entry-&amp;gt;entry) == memberid)
&lt;br&gt;+			return entry;
&lt;br&gt;+	}
&lt;br&gt;+	
&lt;br&gt;+	return NULL;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;static OSyncMappingEntryEngine *_osync_mapping_engine_find_entry(OSyncMappingEngine *engine, OSyncChange *change)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncList *e;
&lt;br&gt;@@ -620,7 +634,7 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	for (c = engine-&amp;gt;entries; c; c = c-&amp;gt;next) {
&lt;br&gt;&amp;nbsp;		OSyncMappingEntryEngine *entry = c-&amp;gt;data;
&lt;br&gt;-		osync_archive_save_ignored_conflict(archive, objtype, id, osync_change_get_changetype(entry-&amp;gt;change), error);
&lt;br&gt;+		osync_archive_save_ignored_conflict(archive, objtype, osync_mapping_entry_get_member_id(entry-&amp;gt;entry), id, osync_change_get_changetype(entry-&amp;gt;change), error);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_status_update_mapping(engine-&amp;gt;parent-&amp;gt;parent, engine, OSYNC_ENGINE_MAPPING_EVENT_SOLVED, NULL);
&lt;br&gt;Index: opensync/engine/opensync_obj_engine.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/engine/opensync_obj_engine.c	(revision 5938)
&lt;br&gt;+++ opensync/engine/opensync_obj_engine.c	(working copy)
&lt;br&gt;@@ -767,8 +767,8 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;static osync_bool _inject_changelog_entries(OSyncObjEngine *engine, OSyncError **error) {
&lt;br&gt;&amp;nbsp;	OSyncList *ids = NULL;
&lt;br&gt;-	OSyncList *changetypes = NULL;
&lt;br&gt;-	OSyncList *j = NULL, *t = NULL;
&lt;br&gt;+	OSyncList *changetypes = NULL, *memberids = NULL;
&lt;br&gt;+	OSyncList *j = NULL, *t = NULL, *mid = NULL;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p)&amp;quot;, __func__, engine);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -776,12 +776,13 @@
&lt;br&gt;&amp;nbsp;	osync_assert(engine-&amp;gt;archive);
&lt;br&gt;&amp;nbsp;	osync_assert(engine-&amp;gt;objtype);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	if (!osync_archive_load_ignored_conflicts(engine-&amp;gt;archive, engine-&amp;gt;objtype, &amp;ids, &amp;changetypes, error)) {
&lt;br&gt;+	if (!osync_archive_load_ignored_conflicts(engine-&amp;gt;archive, engine-&amp;gt;objtype, &amp;memberids, &amp;ids, &amp;changetypes, error)) {
&lt;br&gt;&amp;nbsp;		osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, osync_error_print(error));
&lt;br&gt;&amp;nbsp;		return FALSE;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	t = changetypes;
&lt;br&gt;+	mid = memberids;
&lt;br&gt;&amp;nbsp;	for (j = ids; j; j = j-&amp;gt;next) {
&lt;br&gt;&amp;nbsp;		long long int id = (long long int)GPOINTER_TO_INT(j-&amp;gt;data);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -793,8 +794,10 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;			if (mapping_engine-&amp;gt;mapping == ignored_mapping) {
&lt;br&gt;&amp;nbsp;				OSyncList *m;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;				for (m = mapping_engine-&amp;gt;entries; m; m = m-&amp;gt;next) {
&lt;br&gt;-					OSyncMappingEntryEngine *entry = m-&amp;gt;data;
&lt;br&gt;+					long long int memberid = (long long int)GPOINTER_TO_INT(mid-&amp;gt;data);
&lt;br&gt;+					OSyncMappingEntryEngine *entry = osync_mapping_engine_find_entry_by_memberid(mapping_engine, memberid);
&lt;br&gt;&amp;nbsp;					OSyncChangeType changetype = (OSyncChangeType) t-&amp;gt;data;
&lt;br&gt;&amp;nbsp;					OSyncChange *ignored_change = osync_change_new(error);
&lt;br&gt;&amp;nbsp;					OSyncObjFormat *dummyformat = NULL;
&lt;br&gt;@@ -817,6 +820,7 @@
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;		t = t-&amp;gt;next;
&lt;br&gt;+		mid = mid-&amp;gt;next;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_list_free(ids);
&lt;br&gt;Index: opensync/engine/opensync_mapping_engine_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/engine/opensync_mapping_engine_internals.h	(revision 5920)
&lt;br&gt;+++ opensync/engine/opensync_mapping_engine_internals.h	(working copy)
&lt;br&gt;@@ -65,6 +65,7 @@
&lt;br&gt;&amp;nbsp;osync_bool osync_mapping_engine_check_conflict(OSyncMappingEngine *engine);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSyncMappingEntryEngine *osync_mapping_engine_get_entry(OSyncMappingEngine *engine, OSyncSinkEngine *sinkengine);
&lt;br&gt;+OSyncMappingEntryEngine *osync_mapping_engine_find_entry_by_memberid(OSyncMappingEngine *engine, long long int memberid);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSYNC_TEST_EXPORT unsigned int osync_mapping_engine_num_changes(OSyncMappingEngine *engine);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26255721&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26255721&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26255721/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/osync_archive_save_ignored_conflict%28%29-tp26240527p26255721.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26255142</id>
	<title>Re: osync_archive_save_ignored_conflict()</title>
	<published>2009-11-08T08:14:23Z</published>
	<updated>2009-11-08T08:14:23Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Saturday 07 November 2009 12:58:38 am Chris Frey wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In the opensync_archive_internals.h header, _save_ignored_conflict()
&lt;br&gt;&amp;gt; is documented as such:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /**
&lt;br&gt;&amp;gt; &amp;nbsp;* @brief Saves an entry in the ignored conflict list.
&lt;br&gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp;* @param archive The group archive
&lt;br&gt;&amp;gt; &amp;nbsp;* @param objtype Reported object type of entry
&lt;br&gt;&amp;gt; &amp;nbsp;* @param mappingid Mapping Entry ID of entry
&lt;/div&gt;&lt;/div&gt;That's correct.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;* @param changetype Changetype of entry
&lt;br&gt;&amp;gt; &amp;nbsp;* @param error Pointer to an error struct
&lt;br&gt;&amp;gt; &amp;nbsp;* @return Returns TRUE on success, FALSE otherwise
&lt;br&gt;&amp;gt; &amp;nbsp;*/
&lt;br&gt;&amp;gt; osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const
&lt;br&gt;&amp;gt; &amp;nbsp;char *objtype, long long int mappingid, OSyncChangeType changetype,
&lt;br&gt;&amp;gt; &amp;nbsp;OSyncError **error);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In opensync_archive.c, it is implemented like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const
&lt;br&gt;&amp;gt; &amp;nbsp;char *objtype, long long int id, OSyncChangeType changetype, OSyncError
&lt;br&gt;&amp;gt; &amp;nbsp;**error) {
&lt;br&gt;&amp;gt; [...]
&lt;/div&gt;&lt;/div&gt;maybe we should sync this up with the other declaration and call it &amp;quot;mappingid&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query = osync_strdup_printf(&amp;quot;INSERT INTO tbl_changelog (objtype,
&lt;br&gt;&amp;gt; &amp;nbsp;entryid, changetype) VALUES('%s', '%lli', '%i')&amp;quot;, escaped_objtype, id,
&lt;br&gt;&amp;gt; &amp;nbsp;changetype);
&lt;br&gt;&lt;br&gt;The tbl_changelog is indeed very confusing. There is one column left-over we
&lt;br&gt;doesn't us at all: &amp;quot;id&amp;quot;
&lt;br&gt;&lt;br&gt;And the &amp;quot;entryid&amp;quot; is also very confusing.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Isn't the entryid field used for the archive id's themselves, and not the
&lt;br&gt;&amp;gt; mapping ids?
&lt;br&gt;&lt;br&gt;Not quite sure which ID you mean for &amp;quot;archive id&amp;quot;.
&lt;br&gt;&lt;br&gt;FYI, the tbl_changelog is only used for handling &amp;quot;ignored&amp;quot; conflicts ...
&lt;br&gt;tbl_changes is used to store the &amp;quot;mappings&amp;quot;.
&lt;br&gt;tbl_archive stores only the entire entries of a change when merger/demerge
&lt;br&gt;gets used.
&lt;br&gt;&lt;br&gt;&lt;br&gt;While looking into this i found a bug in OpenSync which broke the support
&lt;br&gt;of &amp;quot;ignore conflicts&amp;quot;. Which is hopefully fixed now with r5950
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is a dump of the tbl_changes and tbl_changelog, which contains two
&lt;br&gt;conflicts which got ignored. (I used for that a group with two file-sync members)
&lt;br&gt;&lt;br&gt;----8&amp;lt;----
&lt;br&gt;BEGIN TRANSACTION;
&lt;br&gt;CREATE TABLE tbl_changes (objtype VARCHAR(64) NOT NULL, id INTEGER PRIMARY KEY AUTOINCREMENT, uid VARCHAR NOT NULL, memberid INTEGER NOT NULL, mappingid INTEGER NOT NULL, 
&lt;br&gt;objengine VARCHAR(64) NOT NULL );
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',67,'foo0',2,1,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',68,'foo3',2,2,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',69,'foo1',2,3,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',70,'test1.vcard',2,4,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',71,'foo5',2,5,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',72,'foo8',2,6,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',73,'foo4',2,7,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',74,'foo2',2,8,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',75,'foo6',2,9,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',76,'foo7',2,10,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',77,'foo9',2,11,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',78,'foo0',1,1,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',79,'foo3',1,2,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',80,'foo1',1,3,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',81,'test1.vcard',1,4,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',82,'foo5',1,5,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',84,'foo4',1,7,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',85,'foo2',1,8,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',86,'foo6',1,9,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',87,'foo7',1,10,'contact');
&lt;br&gt;INSERT INTO &amp;quot;tbl_changes&amp;quot; VALUES('contact',88,'foo9',1,11,'contact');
&lt;br&gt;COMMIT;
&lt;br&gt;dgollub@marvin:~&amp;gt; sqlite3 .config/opensync/0.40/group1/archive.db &amp;quot;.dump tbl_changelog&amp;quot; 
&lt;br&gt;BEGIN TRANSACTION;
&lt;br&gt;CREATE TABLE tbl_changelog (objtype VARCHAR(64), id INTEGER, entryid INTEGER, changetype INTEGER, PRIMARY KEY (objtype, id) );
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',NULL,4,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',NULL,4,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',NULL,6,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',NULL,6,3);
&lt;br&gt;COMMIT;
&lt;br&gt;----&amp;gt;8---
&lt;br&gt;&lt;br&gt;&lt;br&gt;(changetypes: 3 == deleted, 4 == modified)
&lt;br&gt;&lt;br&gt;And indeed this looks pretty strange - 4 tbl_changelog for 2 mappings ...
&lt;br&gt;&lt;br&gt;The information is missing which member was sending which changetype ...
&lt;br&gt;&lt;br&gt;I guess it should look like this:
&lt;br&gt;&lt;br&gt;&lt;br&gt;----8&amp;lt;---
&lt;br&gt;BEGIN TRANSACTION;
&lt;br&gt;CREATE TABLE tbl_changelog (objtype VARCHAR(64) NOT NULL, memberid INTEGER NOT NULL, mappingid INTEGER NOT NULL, changetype INTEGER NOT NULL, PRIMARY KEY (objtype, memberid, 
&lt;br&gt;mappingid) );
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',1,4,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',2,4,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',1,6,4);
&lt;br&gt;INSERT INTO &amp;quot;tbl_changelog&amp;quot; VALUES('contact',2,6,3);
&lt;br&gt;COMMIT;
&lt;br&gt;----&amp;gt;8---
&lt;br&gt;&lt;br&gt;&lt;br&gt;Does this sound sane?
&lt;br&gt;Does this address your question?
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26255142&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26255142&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26255142/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/osync_archive_save_ignored_conflict%28%29-tp26240527p26255142.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26240527</id>
	<title>osync_archive_save_ignored_conflict()</title>
	<published>2009-11-06T15:58:38Z</published>
	<updated>2009-11-06T15:58:38Z</updated>
	<author>
		<name>Chris Frey-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;In the opensync_archive_internals.h header, _save_ignored_conflict()
&lt;br&gt;is documented as such:
&lt;br&gt;&lt;br&gt;/**
&lt;br&gt;&amp;nbsp;* @brief Saves an entry in the ignored conflict list.
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* @param archive The group archive
&lt;br&gt;&amp;nbsp;* @param objtype Reported object type of entry
&lt;br&gt;&amp;nbsp;* @param mappingid Mapping Entry ID of entry 
&lt;br&gt;&amp;nbsp;* @param changetype Changetype of entry 
&lt;br&gt;&amp;nbsp;* @param error Pointer to an error struct
&lt;br&gt;&amp;nbsp;* @return Returns TRUE on success, FALSE otherwise 
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int mappingid, OSyncChangeType changetype, OSyncError **error);
&lt;br&gt;&lt;br&gt;&lt;br&gt;In opensync_archive.c, it is implemented like this:
&lt;br&gt;&lt;br&gt;osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int id, OSyncChangeType changetype, OSyncError **error)
&lt;br&gt;{
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query = osync_strdup_printf(&amp;quot;INSERT INTO tbl_changelog (objtype, entryid, changetype) VALUES('%s', '%lli', '%i')&amp;quot;, escaped_objtype, id, changetype);
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&lt;br&gt;Isn't the entryid field used for the archive id's themselves, and not the
&lt;br&gt;mapping ids?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;- Chris
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26240527&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/osync_archive_save_ignored_conflict%28%29-tp26240527p26240527.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26234511</id>
	<title>Re: wrong tagging</title>
	<published>2009-11-06T08:10:23Z</published>
	<updated>2009-11-06T08:10:23Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Friday 06 November 2009 05:00:01 pm Michael Bell wrote:
&lt;br&gt;&amp;gt; I discovered during svn update that the cmake directory of released
&lt;br&gt;&amp;gt; versions in osynctool/tags is a external link. This is a bug. If you
&lt;br&gt;&amp;gt; release a source then all content of the release must be static.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I fixed this for libsyncml a while ago. It is just a question of a
&lt;br&gt;&amp;gt; better documentation. I don't checked this for libopensync. I just
&lt;br&gt;&amp;gt; discovered the issue two minutes ago.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;This is fixed for all newly created tags. A post-commit hook will pin 
&lt;br&gt;externals to the revision when it got tagged.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Just did a test-tag to demonstrate the post-commit hook:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5947&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5947&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5948&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5948&lt;/a&gt;&amp;nbsp;(commit by the hook to pin the 
&lt;br&gt;svn:Externals property)
&lt;br&gt;&lt;br&gt;Michael, i already asked this on an OpenSync ticket, do you want to have the 
&lt;br&gt;same post-commit hook installed in libsyncml and libwbxml2 Subversion?
&lt;br&gt;The hook gets active as soon you copy a direcotry into */tags/$ ... the commit 
&lt;br&gt;takes a bit longer since on the subvesrion hosts an entire checkout of the tag 
&lt;br&gt;needs to be done to modify all externals properties ...
&lt;br&gt;&lt;br&gt;Check: &lt;a href=&quot;http://people.b1-systems.de/~gollub/pin-external-on-tag.sh&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.b1-systems.de/~gollub/pin-external-on-tag.sh&lt;/a&gt;&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26234511&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26234511&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26234511/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrong-tagging-tp26234345p26234511.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26234345</id>
	<title>wrong tagging</title>
	<published>2009-11-06T08:00:01Z</published>
	<updated>2009-11-06T08:00:01Z</updated>
	<author>
		<name>Michael Bell</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I discovered during svn update that the cmake directory of released
&lt;br&gt;versions in osynctool/tags is a external link. This is a bug. If you
&lt;br&gt;release a source then all content of the release must be static.
&lt;br&gt;&lt;br&gt;I fixed this for libsyncml a while ago. It is just a question of a
&lt;br&gt;better documentation. I don't checked this for libopensync. I just
&lt;br&gt;discovered the issue two minutes ago.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;- --
&lt;br&gt;___________________________________________________________________
&lt;br&gt;&lt;br&gt;Michael Bell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Humboldt-Universitaet zu Berlin
&lt;br&gt;&lt;br&gt;Tel.: +49 (0)30-2093 2482 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ZE Computer- und Medienservice
&lt;br&gt;Fax: &amp;nbsp;+49 (0)30-2093 2704 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unter den Linden 6
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26234345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bell@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; D-10099 Berlin
&lt;br&gt;___________________________________________________________________
&lt;br&gt;&lt;br&gt;PGP Fingerprint: 09E4 3D29 4156 2774 0F2C &amp;nbsp;C643 D8BD 1918 2030 5AAB
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.10 (GNU/Linux)
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEYEARECAAYFAkr0R/0ACgkQ2L0ZGCAwWqutLACgvem58cxp2OAvWVvyExZ30M8N
&lt;br&gt;5rsAnioLjKYLiHVTAaanxWfjR25fICti
&lt;br&gt;=Cs3Y
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26234345&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wrong-tagging-tp26234345p26234345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26230728</id>
	<title>Re: Fixed SyncML plugin commit limitation and reenabled pending limit in OpenSync</title>
	<published>2009-11-06T03:49:56Z</published>
	<updated>2009-11-06T03:49:56Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Friday 06 November 2009 12:46:09 pm Michael Bell wrote:
&lt;br&gt;&amp;gt; Does OpenSync trunk works?
&lt;br&gt;&lt;br&gt;Yes.
&lt;br&gt;&lt;br&gt;Only the merging and capabilities stuff is not completed.
&lt;br&gt;And the XMLFormat and vformat plugin still lacking some fields ...
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If yes, then I would migrate the SyncML plugin to libsyncml trunk on the
&lt;br&gt;&amp;gt; weekend. Additionally I would like to branch the actual code to have a
&lt;br&gt;&amp;gt; maintainable libsyncml 0.5.x port. My problem is that I don't know where
&lt;br&gt;&amp;gt; to place such a branch.
&lt;br&gt;&lt;br&gt;I'll take care about that...
&lt;br&gt;We already planned to have a trunk/branches/tags direcotry hierachy for 
&lt;br&gt;plugins. Will do that for SyncML plugin now.
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26230728&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26230728&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26230728/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--Introduced-osync_context_report_uid_update%28%29-in-sync_done%28%29-phase-tp26218124p26230728.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26230665</id>
	<title>Re: Fixed SyncML plugin commit limitation and reenabled pending limit in OpenSync</title>
	<published>2009-11-06T03:46:09Z</published>
	<updated>2009-11-06T03:46:09Z</updated>
	<author>
		<name>Michael Bell</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;Hi Daniel,
&lt;br&gt;&lt;br&gt;Daniel Gollub wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; The SyncML plugin is now able to write more then 4 entries without exceeding 
&lt;br&gt;&amp;gt; the pending limit and without deadlocking. Just committed approx. 50 entries 
&lt;br&gt;&amp;gt; at once to my test mobile (SyncML Data-Sync server implementation only 
&lt;br&gt;&amp;gt; tested):
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://opensync.org/changeset/5941&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5941&lt;/a&gt;&lt;br&gt;&lt;br&gt;Does OpenSync trunk works?
&lt;br&gt;&lt;br&gt;If yes, then I would migrate the SyncML plugin to libsyncml trunk on the
&lt;br&gt;weekend. Additionally I would like to branch the actual code to have a
&lt;br&gt;maintainable libsyncml 0.5.x port. My problem is that I don't know where
&lt;br&gt;to place such a branch.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;- --
&lt;br&gt;___________________________________________________________________
&lt;br&gt;&lt;br&gt;Michael Bell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Humboldt-Universitaet zu Berlin
&lt;br&gt;&lt;br&gt;Tel.: +49 (0)30-2093 2482 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ZE Computer- und Medienservice
&lt;br&gt;Fax: &amp;nbsp;+49 (0)30-2093 2704 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unter den Linden 6
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26230665&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.bell@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; D-10099 Berlin
&lt;br&gt;___________________________________________________________________
&lt;br&gt;&lt;br&gt;PGP Fingerprint: 09E4 3D29 4156 2774 0F2C &amp;nbsp;C643 D8BD 1918 2030 5AAB
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.10 (GNU/Linux)
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEUEARECAAYFAkr0DH4ACgkQ2L0ZGCAwWqtcHACdHsfzXH0vV7CP6qSu+HrlS3tb
&lt;br&gt;GLUAmOcG43lotXQI4ofFTE4EmwlHg5o=
&lt;br&gt;=8Z+w
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26230665&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--Introduced-osync_context_report_uid_update%28%29-in-sync_done%28%29-phase-tp26218124p26230665.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26221803</id>
	<title>Fixed SyncML plugin commit limitation and reenabled pending limit in OpenSync (was: Re: [trunk] Introduced osync_context_report_uid_update() in sync_done() phase)</title>
	<published>2009-11-05T12:34:43Z</published>
	<updated>2009-11-05T12:34:43Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;On Thursday 05 November 2009 05:40:29 pm Daniel Gollub wrote:
&lt;br&gt;[...]
&lt;br&gt;&amp;gt; This issue solves a well known problem of the SyncML plugin and the
&lt;br&gt;&amp;gt; &amp;nbsp;OpenSync IPC by deadlocking after 4 entries in a row get written to the
&lt;br&gt;&amp;gt; &amp;nbsp;SyncML-peer. This is not yet implemented in the SyncML plugin.
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;just reenabled the pending limit in OpenSync:
&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5942&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5942&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5858&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5858&lt;/a&gt;&amp;nbsp;was there a ticket for this change?
&lt;br&gt;&lt;br&gt;The SyncML plugin is now able to write more then 4 entries without exceeding 
&lt;br&gt;the pending limit and without deadlocking. Just committed approx. 50 entries 
&lt;br&gt;at once to my test mobile (SyncML Data-Sync server implementation only 
&lt;br&gt;tested):
&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5941&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5941&lt;/a&gt;&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221803&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221803&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26221803/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--Introduced-osync_context_report_uid_update%28%29-in-sync_done%28%29-phase-tp26218124p26221803.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26218124</id>
	<title>[trunk] Introduced osync_context_report_uid_update() in sync_done() phase</title>
	<published>2009-11-05T08:40:29Z</published>
	<updated>2009-11-05T08:40:29Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;just implemented the osync_context_report_uid_update() function for sync-
&lt;br&gt;plugins.
&lt;br&gt;&lt;br&gt;This functions allows to support protocols or synchronization-interfaces which 
&lt;br&gt;replace the initial UID after the change got comitted/written, and report them 
&lt;br&gt;after all changes got written.
&lt;br&gt;&lt;br&gt;There are already lots of plugins which overwrite the UID of an OSyncChange 
&lt;br&gt;during the commit() function. But this works only for protocols/interfaces 
&lt;br&gt;which provide the new UID immediately after the single write of a change.
&lt;br&gt;&lt;br&gt;Protocols like SyncML for example, maybe there are others as well, which 
&lt;br&gt;provide the information about a &amp;quot;mapping update&amp;quot; (or changed UIDs of just 
&lt;br&gt;written entries) after all changes got written.
&lt;br&gt;&lt;br&gt;Now we can handle this flawless with the introduction of 
&lt;br&gt;osync_context_report_uid_update().
&lt;br&gt;&lt;br&gt;Plugins can now call this function in the sync_done() function and report all 
&lt;br&gt;updated UIDs, by just providing the old-UID and the new-UID. OpenSync will 
&lt;br&gt;take care the mapping of the right entries doesn't get lost. OpenSync also 
&lt;br&gt;updates this information inside the hashtable - if used.
&lt;br&gt;&lt;br&gt;The interface looks like this:
&lt;br&gt;&lt;br&gt;void osync_context_report_uid_update(OSyncContext *ctx,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const char *olduid, const char *newuid);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;This issue solves a well known problem of the SyncML plugin and the OpenSync 
&lt;br&gt;IPC by deadlocking after 4 entries in a row get written to the SyncML-peer.
&lt;br&gt;This is not yet implemented in the SyncML plugin.
&lt;br&gt;&lt;br&gt;For more information see &lt;a href=&quot;http://opensync.org/ticket/1161&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/ticket/1161&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26218124&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26218124&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26218124/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--Introduced-osync_context_report_uid_update%28%29-in-sync_done%28%29-phase-tp26218124p26218124.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26179167</id>
	<title>Re: osync_engine_mapping_ignore_conflict and osync_bool osync_engine_mapping_use_latest</title>
	<published>2009-11-03T04:52:15Z</published>
	<updated>2009-11-03T04:52:15Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Tuesday 03 November 2009 01:18:24 pm Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; See also &lt;a href=&quot;http://opensync.org/ticket/1185&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/ticket/1185&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Can anybody explain what a plugin has to do in order to support those 
&lt;br&gt;&amp;gt; two conflict solutions?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I replied in the ticket-system.
&lt;br&gt;&lt;br&gt;Quick Summary:
&lt;br&gt;&lt;br&gt;To support conflict handler &amp;quot;ignore&amp;quot;: plugins need to implement the plugin 
&lt;br&gt;sink function: &amp;quot;read&amp;quot; (!= get_changes)
&lt;br&gt;&lt;br&gt;To support conflict handler use_latest .. the format plugins need to implement 
&lt;br&gt;the &amp;quot;revision&amp;quot; function.
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26179167&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26179167&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26179167/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/osync_engine_mapping_ignore_conflict-and-osync_bool-osync_engine_mapping_use_latest-tp26178817p26179167.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26178817</id>
	<title>osync_engine_mapping_ignore_conflict and osync_bool osync_engine_mapping_use_latest</title>
	<published>2009-11-03T04:18:24Z</published>
	<updated>2009-11-03T04:18:24Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;It seems that osync_engine_mapping_ignore_conflict and osync_bool 
&lt;br&gt;osync_engine_mapping_use_latest can only be used if the plugin works in 
&lt;br&gt;a certain way.
&lt;br&gt;&lt;br&gt;See also &lt;a href=&quot;http://opensync.org/ticket/1185&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/ticket/1185&lt;/a&gt;&lt;br&gt;&lt;br&gt;Can anybody explain what a plugin has to do in order to support those 
&lt;br&gt;two conflict solutions?
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Henrik
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26178817&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/osync_engine_mapping_ignore_conflict-and-osync_bool-osync_engine_mapping_use_latest-tp26178817p26178817.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26163345</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-02T04:56:13Z</published>
	<updated>2009-11-02T04:56:13Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Monday 02 November 2009 12:25:07 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; I have checked in my changes for the external plugin config file (r5906). &amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks a lot!
&lt;br&gt;&lt;br&gt;&amp;gt; Things still left to do (most important first):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1) Unit tests for the new code
&lt;br&gt;&lt;br&gt;Created a ticket for that:
&lt;br&gt;&lt;a href=&quot;http://opensync.org/ticket/1184&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/ticket/1184&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2) ExternalCommand support.
&lt;br&gt;&lt;br&gt;Implemented:
&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5914&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5914&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 3) Validation against XSD.
&lt;br&gt;&lt;br&gt;This is next on my TODO list ...
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As I mentioned, I am travelling on business for the next few weeks. &amp;nbsp;I 
&lt;br&gt;&amp;gt; probably won't get much time to look at this (or the timeout stuff) while
&lt;br&gt;&amp;gt; &amp;nbsp;I &amp;nbsp;am away.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Ok, i'll concentrate on the timeout stuff once the extenral stuff is completed 
&lt;br&gt;(very likely after the XSD got written). I need to introduce some more 
&lt;br&gt;interface for mapping update ... once this is done we can reenable the IPC 
&lt;br&gt;pendingLimit ... see &lt;a href=&quot;http://opensync.org/ticket/1161&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/ticket/1161&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks for your core contribution! ;)
&lt;br&gt;Wish you a safe trip!
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26163345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26163345&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26163345/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26163345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26156168</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T15:25:07Z</published>
	<updated>2009-11-01T15:25:07Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">Daniel,
&lt;br&gt;&lt;br&gt;I have checked in my changes for the external plugin config file (r5906). &amp;nbsp;
&lt;br&gt;Things still left to do (most important first):
&lt;br&gt;&lt;br&gt;1) Unit tests for the new code
&lt;br&gt;&lt;br&gt;2) ExternalCommand support.
&lt;br&gt;&lt;br&gt;3) Validation against XSD.
&lt;br&gt;&lt;br&gt;As I mentioned, I am travelling on business for the next few weeks. &amp;nbsp;I 
&lt;br&gt;probably won't get much time to look at this (or the timeout stuff) while I 
&lt;br&gt;am away.
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26156168&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26156168.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26155932</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T15:00:41Z</published>
	<updated>2009-11-01T15:00:41Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">On Sunday 01 November 2009 13:32:57 Daniel Gollub wrote:
&lt;br&gt;&amp;gt; On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; &amp;gt; 1) When I run the unittests, 17 of them fail. &amp;nbsp;I don't think any of them
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;are &amp;nbsp;related to these changes but is that expected at the moment?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No, actually they should fail.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Could you run: &amp;quot;make Experimental&amp;quot; so the testing resutls get uploaded to
&lt;br&gt;&amp;gt; the CDash dashboard .. so we can have a look on the logs?
&lt;br&gt;&lt;br&gt;I reverted my changes and re-ran the tests. &amp;nbsp;I got 18 failures. &amp;nbsp;I ran make 
&lt;br&gt;Experimental but I haven't had time to investigate the failures. &amp;nbsp;I note that 
&lt;br&gt;most of them failed with:
&lt;br&gt;&lt;br&gt;/home/Linux/opensync/trunk/tests/mock-plugin/mock_sync.c:241:E:mock_write: 
&lt;br&gt;Assertion &amp;quot;!g_file_test(filename, G_FILE_TEST_EXISTS)&amp;quot; failed
&lt;br&gt;&lt;br&gt;Any ideas?
&lt;br&gt;&lt;br&gt;Given that the same errors occur with or without my changes I am going to 
&lt;br&gt;check in my changes anyway.
&lt;br&gt;&lt;br&gt;By the way, I normally only run &amp;quot;make test&amp;quot; as I sort of presumed you didn't 
&lt;br&gt;want the dashboard full of random tests of developers while they are 
&lt;br&gt;debugging their code. &amp;nbsp;What are the guidelines for when we should run make 
&lt;br&gt;Experimental?
&lt;br&gt;&lt;br&gt;I find the CTest verbose logs fairly uninformative in many cases. &amp;nbsp;Is there 
&lt;br&gt;any way to use gdb to step through the test case code (and/or to debug the 
&lt;br&gt;OpenSync code)? &amp;nbsp;
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26155932&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26155932.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26153779</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T11:05:54Z</published>
	<updated>2009-11-01T11:05:54Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">Just a quick email reply for now -- hopefully I will get some time to actually 
&lt;br&gt;work on this later today. &amp;nbsp;
&lt;br&gt;&lt;br&gt;On Sunday 01 November 2009 13:32:57 Daniel Gollub wrote:
&lt;br&gt;&amp;gt; On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; &amp;gt; I have a first cut of the external plugin config file ready to check in
&lt;br&gt;&amp;gt; &amp;gt; (&lt;a href=&quot;http://opensync.pastebin.com/m38d98a95&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.pastebin.com/m38d98a95&lt;/a&gt;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks, will review your patch ASAP!
&lt;br&gt;&lt;br&gt;Thanks for your feedback, including in your other emails.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; 1) When I run the unittests, 17 of them fail. &amp;nbsp;I don't think any of them
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;are &amp;nbsp;related to these changes but is that expected at the moment?
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; If it is not expected I will have to do some more checking.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Would be great if you could check whats going wrong there ...
&lt;br&gt;&amp;gt; Those tests also fail if you revert your changes - right?
&lt;br&gt;&lt;br&gt;That is the first step in the &amp;quot;more checking&amp;quot; :-) &amp;nbsp;I will look into this later 
&lt;br&gt;this evening.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; 2) I have created an example external plugin config file in
&lt;br&gt;&amp;gt; &amp;gt; docs/examples/plugins/src. &amp;nbsp;Can the existing CMake macros be used to get
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;that &amp;nbsp;file installed into the plugin directory (which is where I am
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;looking for it -- I look for .xml files first, then .so files)? &amp;nbsp;I
&lt;br&gt;&amp;gt; &amp;gt; haven't tried it but I assume the macros like OPENSYNC_PLUGIN_INSTALL
&lt;br&gt;&amp;gt; &amp;gt; expect a .so file.
&lt;br&gt;&lt;br&gt;&amp;gt; I'll introduce a cmake macro called &amp;quot;OPENSYNC_EXTERNAL_PLUGIN_INSTALL&amp;quot; ...
&lt;br&gt;&lt;br&gt;Thanks, I will use that.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; 3) The XML format includes &amp;lt;ExternalCommand&amp;gt; but I currently ignore
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;it. &amp;nbsp;My &amp;nbsp;plan is that this should be saved in the plugin structure and
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;could be used as a default for the config option that Henrik is adding.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ok, fine with me.
&lt;br&gt;&lt;br&gt;I saw your other email on this. &amp;nbsp;I will try to get to this today but may not 
&lt;br&gt;have time. &amp;nbsp;I want to concentrate on getting the basic code working and 
&lt;br&gt;tested.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; 4) If the .xml and the .so are both present, they both get loaded and two
&lt;br&gt;&amp;gt; &amp;gt; plugins exist with the same name. &amp;nbsp;I thought of adding error checking to
&lt;br&gt;&amp;gt; &amp;gt; osync_plugin_set_name to fail if a plugin of the same name is already
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;loaded. &amp;nbsp; But I have just noticed that none of the osync_plugin_set_...
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;calls have OSyncError parameters. &amp;nbsp;Should they? &amp;nbsp;This would be an API
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;change (to a widely used API).
&lt;br&gt;&lt;br&gt;&amp;gt; Anyway, this is a different issue - independent of your planned changes ..
&lt;br&gt;&amp;gt; which should get fixed at some point. I'll create for that a ticket ... in
&lt;br&gt;&amp;gt; my opionoen it's not a blocker, since this could be avoided by distribution
&lt;br&gt;&amp;gt; with sane packaging ;)
&lt;br&gt;&lt;br&gt;OK. &amp;nbsp;I am not going to worry about this at the moment.
&lt;br&gt;&lt;br&gt;&amp;gt;From your other email:
&lt;br&gt;&lt;br&gt;&amp;gt; Is the drop of osync_module_unload() intended?
&lt;br&gt;&lt;br&gt;Yes, it is necessary. &amp;nbsp;The pseudo-plugin created by the new external plugin 
&lt;br&gt;code has no module-&amp;gt;module (it is NULL). &amp;nbsp;That seems reasonable to me as no 
&lt;br&gt;module has been loaded. &amp;nbsp;The only place that gets upset by this is 
&lt;br&gt;osync_module_unload() which asserts that module-&amp;gt;module exists. &amp;nbsp;That also 
&lt;br&gt;seems reasonable to me: you shouldn't be trying to unload a module if one was 
&lt;br&gt;never loaded.
&lt;br&gt;&lt;br&gt;Fortunately, osync_module_unref() already unloads the module if this is the 
&lt;br&gt;last reference and if module-&amp;gt;module is non-null (i.e. a module was actually 
&lt;br&gt;loaded). &amp;nbsp;So, it is never necessary to call osync_module_unload() 
&lt;br&gt;explicitly -- it will be unloaded automatically when the last reference is 
&lt;br&gt;dropped.
&lt;br&gt;&lt;br&gt;In fact, I would even argue it is a bug: the caller does not know that someone 
&lt;br&gt;else does not hold a reference and the module should not be unloaded until 
&lt;br&gt;the last reference is dropped.
&lt;br&gt;&lt;br&gt;So, yes it is deliberate. &amp;nbsp;The change to the comment was supposed to give a 
&lt;br&gt;hint!
&lt;br&gt;&lt;br&gt;As for ignoring the error on loading the external plugin, you are right that I 
&lt;br&gt;did it because that is the way the existing plugin code worked. &amp;nbsp;You are also 
&lt;br&gt;right that we should probably be making the error visible somewhere other 
&lt;br&gt;than the trace files and if we *really* want to ignore it we should be 
&lt;br&gt;freeing the error struct. &amp;nbsp;I will add the FIXME.
&lt;br&gt;&lt;br&gt;You mention that you will write an XSD (thanks -- another thing I have never 
&lt;br&gt;done!). &amp;nbsp;Should I validiate the XML file against the XSD before loading it? &amp;nbsp;
&lt;br&gt;I noticed that some other code (can't remember what, offhand, maybe config 
&lt;br&gt;file loading?) does that.
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26153779&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26153779.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26153375</id>
	<title>mozilla-sync - now with OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-11-01T10:17:50Z</published>
	<updated>2009-11-01T10:17:50Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Until now, the mozilla-sync plugin has been running inside the OpenSync 
&lt;br&gt;process, and accessing the mozilla data in a non-thread-safe way.
&lt;br&gt;&lt;br&gt;The mozilla-sync plugin is now replaced by a simple stub, running with 
&lt;br&gt;OSYNC_START_TYPE_EXTERNAL
&lt;br&gt;&lt;br&gt;This means, that the bulk of the work is now done in the blueZync 
&lt;br&gt;plugin, by calling thunderbird --mozilla-sync /path/to/pipe
&lt;br&gt;&lt;br&gt;The implementation is still not thread-safe, but with the threading 
&lt;br&gt;capabilities of Thunderbird 3, it will be possible to make a thread-safe 
&lt;br&gt;implementation for Thunderbird 3.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://bluezync.svn.sourceforge.net/viewvc/bluezync?view=rev&amp;revision=481&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bluezync.svn.sourceforge.net/viewvc/bluezync?view=rev&amp;revision=481&lt;/a&gt;&lt;br&gt;and
&lt;br&gt;&lt;a href=&quot;http://opensync.org/log/plugins/mozilla-sync/trunk/src?rev=5901**&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/log/plugins/mozilla-sync/trunk/src?rev=5901**&lt;/a&gt;&lt;br&gt;implements this behaviour.
&lt;br&gt;&lt;br&gt;(However, it currently only works for Thunderbird address-books, not for 
&lt;br&gt;sunbird and lightning. Also, it will not work with Debian ice*)
&lt;br&gt;&lt;br&gt;Build instructions:
&lt;br&gt;&lt;a href=&quot;http://bluezync.kaarposoft.dk/building.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bluezync.kaarposoft.dk/building.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26153375&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/mozilla-sync---now-with-OSYNC_START_TYPE_EXTERNAL-tp26153375p26153375.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26152107</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T07:46:04Z</published>
	<updated>2009-11-01T07:46:04Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; 3) The XML format includes &amp;lt;ExternalCommand&amp;gt; but I currently ignore
&lt;br&gt;&amp;gt; &amp;nbsp;it. &amp;nbsp;My &amp;nbsp;plan is that this should be saved in the plugin structure and
&lt;br&gt;&amp;gt; &amp;nbsp;could be used as a default for the config option that Henrik is adding.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I reserved a place in the code where you could make use of the ExternalCommand 
&lt;br&gt;form the XML EXternal Plugin file ...
&lt;br&gt;&lt;br&gt;See: 
&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5898/trunk/opensync/engine/opensync_engine.c&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5898/trunk/opensync/engine/opensync_engine.c&lt;/a&gt;&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26152107&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26152107&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26152107/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26152107.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26151455</id>
	<title>[trunk] ExternalCommand in the plugin configuration file</title>
	<published>2009-11-01T06:35:03Z</published>
	<updated>2009-11-01T06:35:03Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Plugins of type OSYNC_START_TYPE_EXTERNAL needs to be able to spawn an 
&lt;br&gt;external command to run the actual plugin code.
&lt;br&gt;&lt;br&gt;SVN -r 5896 allows a member to set an ExternalCommand in the plugin 
&lt;br&gt;configuration file.
&lt;br&gt;This command will be executed by the proxy to start up the external process.
&lt;br&gt;&lt;br&gt;The external_command should be a string in printf format, with one %s.
&lt;br&gt;Before the command is executed, a variant of printf will be called
&lt;br&gt;to replace the %s with the path to the plugin pipe.
&lt;br&gt;&lt;br&gt;Example:
&lt;br&gt;&amp;lt;ExternalPlugin&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;ExternalCommand&amp;gt;thunderbird -mozilla-sync %s&amp;lt;/ExternalCommand&amp;gt;
&lt;br&gt;&amp;lt;/ExternalPlugin&amp;gt;
&lt;br&gt;&lt;br&gt;Added to public API:
&lt;br&gt;osync_plugin_config_get_externalplugin
&lt;br&gt;osync_plugin_config_set_externalplugin
&lt;br&gt;osync_plugin_externalplugin_new
&lt;br&gt;osync_plugin_externalplugin_unref
&lt;br&gt;osync_plugin_externalplugin_ref
&lt;br&gt;osync_plugin_externalplugin_get_external_command
&lt;br&gt;osync_plugin_externalplugin_set_external_command
&lt;br&gt;(as well as the changed format for the plugin configuration file)
&lt;br&gt;&lt;br&gt;Changed internal interface:
&lt;br&gt;From
&lt;br&gt;&amp;nbsp; osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, 
&lt;br&gt;OSyncStartType type, const char *path, OSyncError **error)
&lt;br&gt;To
&lt;br&gt;&amp;nbsp; osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, 
&lt;br&gt;OSyncStartType type, const char *path, const char* external_command, 
&lt;br&gt;OSyncError **error)
&lt;br&gt;&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--ExternalCommand-in-the-plugin-configuration-file-tp26151455p26151455.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26151189</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T06:07:32Z</published>
	<updated>2009-11-01T06:07:32Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; I have a first cut of the external plugin config file ready to check in 
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://opensync.pastebin.com/m38d98a95&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.pastebin.com/m38d98a95&lt;/a&gt;). &amp;nbsp;But I have a couple of
&lt;br&gt;&amp;gt; &amp;nbsp;questions:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;------8&amp;lt;-----
&lt;br&gt;@@ -69,9 +71,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; env-&amp;gt;plugins = osync_list_remove(env-&amp;gt;plugins, env-
&lt;br&gt;&amp;gt;plugins-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Unload all modules */
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Unref (and so unload) all modules */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (env-&amp;gt;modules) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_module_unload(env-&amp;gt;modules-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_module_unref(env-&amp;gt;modules-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; env-&amp;gt;modules = osync_list_remove(env-&amp;gt;modules, env-
&lt;br&gt;&amp;gt;modules-&amp;gt;data);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;-----&amp;gt;8----
&lt;br&gt;&lt;br&gt;Is the drop of osync_module_unload() intended?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------8&amp;lt;----------
&lt;br&gt;@@ -117,6 +119,31 @@
&lt;br&gt;[...]
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!osync_plugin_env_load_module_xml(env, filename, error)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_trace(TRACE_ERROR, &amp;quot;Unable to load module: %s&amp;quot;, 
&lt;br&gt;osync_error_print(error));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; osync_free(filename);
&lt;br&gt;[...]
&lt;br&gt;----------&amp;gt;8--------------
&lt;br&gt;&lt;br&gt;You ignore the error, like it was done for the loading the shared-module
&lt;br&gt;plugins - right? Or is there any specific reason for that?
&lt;br&gt;&lt;br&gt;We should place here (and for the same place for shared-modules loading) a
&lt;br&gt;FIXME .. since we're leaking here a OSyncError-struct if an error get set.
&lt;br&gt;And also problems of loading a plugin is not visible as long you don't look
&lt;br&gt;into trace-files &amp;nbsp;... but that shouldn't block to apply your patch. I'll
&lt;br&gt;create a ticket for that issue ...
&lt;br&gt;&lt;br&gt;&lt;br&gt;Beside that this looks pretty perfect to me. I'll write a XSD (XML-Schema)
&lt;br&gt;for your XML file.
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151189&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151189&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26151189/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26151189.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26151066</id>
	<title>Re: [RFC][PATCH] External command in plugin configuration file</title>
	<published>2009-11-01T05:52:22Z</published>
	<updated>2009-11-01T05:52:22Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Saturday 31 October 2009 11:01:33 am Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; Following Daniel's checkin of the client and example code for external 
&lt;br&gt;&amp;gt; plugin, here is a patch (on -r5895) which allows a member to set an 
&lt;br&gt;&amp;gt; ExternalCommand in the plugin configuration file. This command will be 
&lt;br&gt;&amp;gt; executed by the proxy to start up the external process.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Your comments would be most appreciated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;One questions regarding the API:
&lt;br&gt;&lt;br&gt;osync_member_get_external_command()
&lt;br&gt;&lt;br&gt;Is there any reason to export this function to the public API? Our goal should 
&lt;br&gt;be to have only a small number of public API interfaces .. so it's easier to 
&lt;br&gt;maintain and to keep the API stable .. currently i don't see any reason to put 
&lt;br&gt;this inside opensync_member.h
&lt;br&gt;&lt;br&gt;Instead i would suggest to move this into osync_member_internals.h and use 
&lt;br&gt;OSYNC_TEST_EXPORT instead .. not OSYNC_EXPORT. So this function is still 
&lt;br&gt;avaibale for the osync_engine.c code and for unittests...
&lt;br&gt;&lt;br&gt;Beside this the patch looks pretty good to me ...
&lt;br&gt;&lt;br&gt;JFYI, we have a unit test to avoid API breaks - if you add new public 
&lt;br&gt;Interfaces you need to modifiy following file: trunk/opensync.sym
&lt;br&gt;&lt;br&gt;Just add by hand the function name - sorted. And test with:
&lt;br&gt;ctest -R symbol -V
&lt;br&gt;&lt;br&gt;Currently it fails with your patch, due to missing entries:
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----8&amp;lt;----
&lt;br&gt;332a333
&lt;br&gt;&amp;gt; osync_member_get_external_command &amp;lt;------------- IGNORE this!
&lt;br&gt;513a515
&lt;br&gt;&amp;gt; osync_plugin_config_get_externalplugin
&lt;br&gt;522a525
&lt;br&gt;&amp;gt; osync_plugin_config_set_externalplugin
&lt;br&gt;568a572,576
&lt;br&gt;&amp;gt; osync_plugin_externalplugin_get_external_command
&lt;br&gt;&amp;gt; osync_plugin_externalplugin_new
&lt;br&gt;&amp;gt; osync_plugin_externalplugin_ref
&lt;br&gt;&amp;gt; osync_plugin_externalplugin_set_external_command
&lt;br&gt;&amp;gt; osync_plugin_externalplugin_unref
&lt;br&gt;-- Process completed
&lt;br&gt;***Failed 
&lt;br&gt;&lt;br&gt;0% tests passed, 1 tests failed out of 1
&lt;br&gt;&lt;br&gt;The following tests FAILED:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 - symbols (Failed)
&lt;br&gt;-------&amp;gt;8----
&lt;br&gt;&lt;br&gt;So you need to add follwing lines to opensync.sym:
&lt;br&gt;&lt;br&gt;osync_plugin_config_get_externalplugin
&lt;br&gt;osync_plugin_config_set_externalplugin
&lt;br&gt;&lt;br&gt;osync_plugin_externalplugin_get_external_command
&lt;br&gt;osync_plugin_externalplugin_new
&lt;br&gt;osync_plugin_externalplugin_ref
&lt;br&gt;osync_plugin_externalplugin_set_external_command
&lt;br&gt;osync_plugin_externalplugin_unref
&lt;br&gt;&lt;br&gt;&lt;br&gt;Please move osync_member_get_external_command() to opensync_member_internals.h 
&lt;br&gt;and adapt opensync.sym commit your modifications.
&lt;br&gt;&lt;br&gt;Thanks for your contribution!
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151066&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151066&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26151066/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--External-command-in-plugin-configuration-file-tp26141075p26151066.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26151067</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-11-01T05:32:57Z</published>
	<updated>2009-11-01T05:32:57Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote:
&lt;br&gt;&amp;gt; I have a first cut of the external plugin config file ready to check in 
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://opensync.pastebin.com/m38d98a95&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.pastebin.com/m38d98a95&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks, will review your patch ASAP!
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; But I have a couple of
&lt;br&gt;&amp;gt; &amp;nbsp;questions:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1) When I run the unittests, 17 of them fail. &amp;nbsp;I don't think any of them
&lt;br&gt;&amp;gt; &amp;nbsp;are &amp;nbsp;related to these changes but is that expected at the moment?
&lt;br&gt;&lt;br&gt;No, actually they should fail.
&lt;br&gt;&lt;br&gt;Could you run: &amp;quot;make Experimental&amp;quot; so the testing resutls get uploaded to the 
&lt;br&gt;CDash dashboard .. so we can have a look on the logs?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://opensync.org/testing/index.php?project=OpenSync&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/testing/index.php?project=OpenSync&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The following tests FAILED:
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;&lt;br&gt;JFYI, you can also run those tests with:
&lt;br&gt;&lt;br&gt;ctest -V
&lt;br&gt;&lt;br&gt;-V makes things more verbose ...
&lt;br&gt;&lt;br&gt;If you only want to run specific tests you can use -R $regex to run only 
&lt;br&gt;specifc tests - e.g.:
&lt;br&gt;&lt;br&gt;ctest -V -R sync_
&lt;br&gt;&lt;br&gt;Will run all tests including &amp;quot;sync_&amp;quot;
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If it is not expected I will have to do some more checking.
&lt;br&gt;&lt;br&gt;Would be great if you could check whats going wrong there ...
&lt;br&gt;Those tests also fail if you revert your changes - right?
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2) I have created an example external plugin config file in 
&lt;br&gt;&amp;gt; docs/examples/plugins/src. &amp;nbsp;Can the existing CMake macros be used to get
&lt;br&gt;&amp;gt; &amp;nbsp;that &amp;nbsp;file installed into the plugin directory (which is where I am
&lt;br&gt;&amp;gt; &amp;nbsp;looking for it -- I look for .xml files first, then .so files)? &amp;nbsp;I haven't
&lt;br&gt;&amp;gt; &amp;nbsp;tried it but I assume the macros like OPENSYNC_PLUGIN_INSTALL expect a .so
&lt;br&gt;&amp;gt; &amp;nbsp;file.
&lt;br&gt;&lt;br&gt;OSYNC_PLUGIN_INSTALL is quite simple ... it doesn't check for *.so
&lt;br&gt;&lt;br&gt;-----8&amp;lt;----
&lt;br&gt;## Install plugin
&lt;br&gt;MACRO( OPENSYNC_PLUGIN_INSTALL _pluginName )
&lt;br&gt;&amp;nbsp; INSTALL( TARGETS ${_pluginName} DESTINATION ${OPENSYNC_PLUGINDIR} )
&lt;br&gt;ENDMACRO( OPENSYNC_PLUGIN_INSTALL )
&lt;br&gt;----&amp;gt;8------
&lt;br&gt;&lt;br&gt;So you could point this to a .xml file ... but maybe we should introduce a new 
&lt;br&gt;macro for such configuration file. Maybe one day we want to change the 
&lt;br&gt;location of this kind config file .. so we just need to change the central 
&lt;br&gt;macro, and don't have to fix all plugins. What do you think?
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I really don't know CMake -- can anyone advise how to get my .xml file 
&lt;br&gt;&amp;gt; installed into the plugin directory?
&lt;br&gt;&lt;br&gt;I'll introduce a cmake macro called &amp;quot;OPENSYNC_EXTERNAL_PLUGIN_INSTALL&amp;quot; ...
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The new code seems to work but there are a few things that still need to
&lt;br&gt;&amp;gt; &amp;nbsp;be &amp;nbsp;done:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 3) The XML format includes &amp;lt;ExternalCommand&amp;gt; but I currently ignore
&lt;br&gt;&amp;gt; &amp;nbsp;it. &amp;nbsp;My &amp;nbsp;plan is that this should be saved in the plugin structure and
&lt;br&gt;&amp;gt; &amp;nbsp;could be used as a default for the config option that Henrik is adding.
&lt;br&gt;&lt;br&gt;Ok, fine with me.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 4) If the .xml and the .so are both present, they both get loaded and two 
&lt;br&gt;&amp;gt; plugins exist with the same name. &amp;nbsp;I thought of adding error checking to &amp;nbsp;
&lt;br&gt;&amp;gt; osync_plugin_set_name to fail if a plugin of the same name is already
&lt;br&gt;&amp;gt; &amp;nbsp;loaded. &amp;nbsp; But I have just noticed that none of the osync_plugin_set_...
&lt;br&gt;&amp;gt; &amp;nbsp;calls have OSyncError parameters. &amp;nbsp;Should they? &amp;nbsp;This would be an API
&lt;br&gt;&amp;gt; &amp;nbsp;change (to a widely used API).
&lt;br&gt;&lt;br&gt;Actually the file-name of a plugin doesn't have to be the name of the plugin 
&lt;br&gt;in the Plugin Enviroment. e.g.: syncml.so spawns 4 plugins, non called 
&lt;br&gt;&amp;quot;syncml&amp;quot;.
&lt;br&gt;&lt;br&gt;But i see your point with osync_plugin_set_name() .. and having multiple 
&lt;br&gt;plugins with the same name. This problem is already present ... even without 
&lt;br&gt;your modification.
&lt;br&gt;&lt;br&gt;What we could do, without breaking the api to handle this:
&lt;br&gt;&lt;br&gt;We could let osync_plugin_env_load() fail if there are multiple plugins with 
&lt;br&gt;the same name in the env-&amp;gt;plugins list. Or we could let 
&lt;br&gt;osync_plugin_env_register_plugin() fail ... but this function get called by 
&lt;br&gt;the plugins any maybe not get handled by the plugin. We could do checks in 
&lt;br&gt;both function to be sure ...
&lt;br&gt;&lt;br&gt;Anyway, this is a different issue - independent of your planned changes .. 
&lt;br&gt;which should get fixed at some point. I'll create for that a ticket ... in my 
&lt;br&gt;opionoen it's not a blocker, since this could be avoided by distribution with 
&lt;br&gt;sane packaging ;)
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 5) There is no unittest for this code yet.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm not sure if I will get time to work on this further on Sunday -- I
&lt;br&gt;&amp;gt; &amp;nbsp;will &amp;nbsp;check it in by the end of Sunday.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Ok, cool. Thanks for your contribution!
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151067&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26151067&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26151067/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26151067.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26147427</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-10-31T17:39:24Z</published>
	<updated>2009-10-31T17:39:24Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">On Friday 30 October 2009 21:49:22 Daniel Gollub wrote:
&lt;br&gt;&amp;gt; Currently, there is need of stub plugin, which registers the plugin to the
&lt;br&gt;&amp;gt; OpenSync environment. As Graham already suggested in a seperated thread,
&lt;br&gt;&amp;gt; we'll very likely change it - so there is only need to write a simple
&lt;br&gt;&amp;gt; configuration file to register external plugins.
&lt;br&gt;&lt;br&gt;I have a first cut of the external plugin config file ready to check in 
&lt;br&gt;(&lt;a href=&quot;http://opensync.pastebin.com/m38d98a95&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.pastebin.com/m38d98a95&lt;/a&gt;). &amp;nbsp;But I have a couple of questions:
&lt;br&gt;&lt;br&gt;1) When I run the unittests, 17 of them fail. &amp;nbsp;I don't *think* any of them are 
&lt;br&gt;related to these changes but is that expected at the moment?
&lt;br&gt;&lt;br&gt;The following tests FAILED:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;36 - filter_sync_deny_all (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 176 - lock_dual_sync_engine_lock (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 206 - mapping_engine_same_similar_conflict (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 207 - mapping_engine_same_similar_conflict2 (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 208 - mapping_engine_same_similar_conflict_multi (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 227 - multisync_dual_new (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 228 - multisync_triple_new (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 239 - multisync_conflict_data_duplicate (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 240 - multisync_conflict_data_duplicate2 (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 246 - sync_easy_conflict (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 247 - sync_easy_new_mapping (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 248 - sync_easy_conflict_duplicate (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 249 - sync_easy_conflict_abort (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 250 - sync_conflict_duplicate2 (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 251 - sync_conflict_delay (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 - sync_large (Failed)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 261 - sync_initial_slow_sync (Failed)
&lt;br&gt;&lt;br&gt;If it is not expected I will have to do some more checking.
&lt;br&gt;&lt;br&gt;2) I have created an example external plugin config file in 
&lt;br&gt;docs/examples/plugins/src. &amp;nbsp;Can the existing CMake macros be used to get that 
&lt;br&gt;file installed into the plugin directory (which is where I am looking for 
&lt;br&gt;it -- I look for .xml files first, then .so files)? &amp;nbsp;I haven't tried it but I 
&lt;br&gt;assume the macros like OPENSYNC_PLUGIN_INSTALL expect a .so file.
&lt;br&gt;&lt;br&gt;I really don't know CMake -- can anyone advise how to get my .xml file 
&lt;br&gt;installed into the plugin directory?
&lt;br&gt;&lt;br&gt;The new code seems to work but there are a few things that still need to be 
&lt;br&gt;done:
&lt;br&gt;&lt;br&gt;3) The XML format includes &amp;lt;ExternalCommand&amp;gt; but I currently ignore it. &amp;nbsp;My 
&lt;br&gt;plan is that this should be saved in the plugin structure and could be used 
&lt;br&gt;as a default for the config option that Henrik is adding.
&lt;br&gt;&lt;br&gt;4) If the .xml and the .so are both present, they both get loaded and two 
&lt;br&gt;plugins exist with the same name. &amp;nbsp;I thought of adding error checking to &amp;nbsp;
&lt;br&gt;osync_plugin_set_name to fail if a plugin of the same name is already loaded. &amp;nbsp;
&lt;br&gt;But I have just noticed that none of the osync_plugin_set_... calls have 
&lt;br&gt;OSyncError parameters. &amp;nbsp;Should they? &amp;nbsp;This would be an API change (to a 
&lt;br&gt;widely used API).
&lt;br&gt;&lt;br&gt;5) There is no unittest for this code yet.
&lt;br&gt;&lt;br&gt;I'm not sure if I will get time to work on this further on Sunday -- I will 
&lt;br&gt;check it in by the end of Sunday.
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26147427&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26147427.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26141075</id>
	<title>[RFC][PATCH] External command in plugin configuration file</title>
	<published>2009-10-31T03:01:33Z</published>
	<updated>2009-10-31T03:01:33Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;Following Daniel's checkin of the client and example code for external 
&lt;br&gt;plugin, here is a patch (on -r5895) which allows a member to set an 
&lt;br&gt;ExternalCommand in the plugin configuration file. This command will be 
&lt;br&gt;executed by the proxy to start up the external process.
&lt;br&gt;&lt;br&gt;Your comments would be most appreciated.
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;&lt;br /&gt;Index: misc/schemas/plugin_config.xsd
&lt;br&gt;===================================================================
&lt;br&gt;--- misc/schemas/plugin_config.xsd	(revision 5895)
&lt;br&gt;+++ misc/schemas/plugin_config.xsd	(working copy)
&lt;br&gt;@@ -9,6 +9,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Connection&amp;quot; type=&amp;quot;Connection&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Localization&amp;quot; type=&amp;quot;Localization&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Resources&amp;quot; type=&amp;quot;Resources&amp;quot;/&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;ExternalPlugin&amp;quot; type=&amp;quot;ExternalPlugin&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:attribute name=&amp;quot;version&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;@@ -164,4 +165,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:all&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp;&amp;lt;xsd:complexType name=&amp;quot;ExternalPlugin&amp;quot;&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;&amp;lt;xsd:all&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;1&amp;quot; name=&amp;quot;ExternalCommand&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:all&amp;gt;
&lt;br&gt;+ &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;&amp;lt;/xsd:schema&amp;gt;
&lt;br&gt;Index: opensync/opensync-plugin.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/opensync-plugin.h	(revision 5895)
&lt;br&gt;+++ opensync/opensync-plugin.h	(working copy)
&lt;br&gt;@@ -33,6 +33,7 @@
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_connection.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_localization.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_resource.h&amp;quot;
&lt;br&gt;+#include &amp;quot;plugin/opensync_plugin_externalplugin.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_objtype_sink.h&amp;quot;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OPENSYNC_END_DECLS
&lt;br&gt;Index: opensync/group/opensync_member.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/group/opensync_member.c	(revision 5895)
&lt;br&gt;+++ opensync/group/opensync_member.c	(working copy)
&lt;br&gt;@@ -832,6 +832,18 @@
&lt;br&gt;&amp;nbsp;	return new_list;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+const char *osync_member_get_external_command(OSyncMember *member)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(member);
&lt;br&gt;+	OSyncError *error;
&lt;br&gt;+	OSyncPluginConfig *config = osync_member_get_config_or_default(member, &amp;error);
&lt;br&gt;+	if (config) {
&lt;br&gt;+		OSyncPluginExternalPlugin *externalplugin = osync_plugin_config_get_externalplugin(config);
&lt;br&gt;+		if (externalplugin) return osync_plugin_externalplugin_get_external_command(externalplugin);
&lt;br&gt;+	}
&lt;br&gt;+	return NULL;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;osync_bool osync_member_objtype_enabled(OSyncMember *member, const char *objtype)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncObjTypeSink *sink = NULL;
&lt;br&gt;Index: opensync/group/opensync_member.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/group/opensync_member.h	(revision 5895)
&lt;br&gt;+++ opensync/group/opensync_member.h	(working copy)
&lt;br&gt;@@ -334,6 +334,25 @@
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT osync_bool osync_member_plugin_is_uptodate(OSyncMember *member);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/** @brief Returns the external command of a member
&lt;br&gt;+ *
&lt;br&gt;+ * If the plugin is of type OSYNC_START_TYPE_EXTERNAL, an external command can be executed by OpenSync.
&lt;br&gt;+ * The external_command should be a string in printf format, with one %s.
&lt;br&gt;+ * Before the command is executed, a variant of printf will be called
&lt;br&gt;+ * to replace the %s with the path to the plugin pipe.
&lt;br&gt;+ * The resulting command will be exectued with the glib function
&lt;br&gt;+ * g_spawn_command_line_async.
&lt;br&gt;+ *
&lt;br&gt;+ * The external command is specified in the plugin configuration file for the member, e.g.
&lt;br&gt;+ * &amp;lt;ExternalPlugin&amp;gt;&amp;lt;ExternalCommand&amp;gt;the command&amp;lt;/ExternalCommand&amp;gt;&amp;lt;/ExternalPlugin&amp;gt;
&lt;br&gt;+ * 
&lt;br&gt;+ * @param plugin Pointer to the plugin
&lt;br&gt;+ * @returns External command of the plugin
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT const char *osync_member_get_external_command(OSyncMember *member);
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#endif /* _OPENSYNC_MEMBER_H_ */
&lt;br&gt;Index: opensync/plugin/opensync_plugin_externalplugin_private.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_externalplugin_private.h	(revision 0)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_externalplugin_private.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,49 @@
&lt;br&gt;+/*
&lt;br&gt;+ * libopensync - A synchronization framework
&lt;br&gt;+ * Copyright (C) 2009 &amp;nbsp;Henrik Kaare Poulsen
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is free software; you can redistribute it and/or
&lt;br&gt;+ * modify it under the terms of the GNU Lesser General Public
&lt;br&gt;+ * License as published by the Free Software Foundation; either
&lt;br&gt;+ * version 2.1 of the License, or (at your option) any later version.
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is distributed in the hope that it will be useful,
&lt;br&gt;+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+ * Lesser General Public License for more details.
&lt;br&gt;+ * 
&lt;br&gt;+ * You should have received a copy of the GNU Lesser General Public
&lt;br&gt;+ * License along with this library; if not, write to the Free Software
&lt;br&gt;+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 &amp;nbsp;USA
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+#ifndef _OPENSYNC_PLUGIN_EXTERNALPLUGIN_PRIVATE_H_
&lt;br&gt;+#define _OPENSYNC_PLUGIN_EXTERNALPLUGIN_PRIVATE_H_
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @defgroup OSyncPluginExternalPluginPrivateAPI OpenSync Plugin ExternalPlugin Private
&lt;br&gt;+ * @ingroup OSyncPluginPrivate
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+/*@{*/
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @brief Gives information for plugin of type OSYNC_START_TYPE_EXTERNAL
&lt;br&gt;+ **/
&lt;br&gt;+struct OSyncPluginExternalPlugin {
&lt;br&gt;+	/** Command to be executed to start the external process.
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp;In printf format; should have one %s
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp;which will be replaced with
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp;the path of the plugin pipe to the client process
&lt;br&gt;+	*/
&lt;br&gt;+	char *external_command;
&lt;br&gt;+
&lt;br&gt;+	/** Object reference counting */
&lt;br&gt;+	int ref_count;
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+/*@}*/
&lt;br&gt;+
&lt;br&gt;+#endif /* _OPENSYNC_PLUGIN_EXTERNALPLUGIN_PRIVATE_H_ */
&lt;br&gt;+
&lt;br&gt;Index: opensync/plugin/opensync_plugin_externalplugin.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_externalplugin.c	(revision 0)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_externalplugin.c	(revision 0)
&lt;br&gt;@@ -0,0 +1,75 @@
&lt;br&gt;+/*
&lt;br&gt;+ * libopensync - A synchronization framework
&lt;br&gt;+ * Copyright (C) 2009 &amp;nbsp;Henrik Kaare Poulsen
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is free software; you can redistribute it and/or
&lt;br&gt;+ * modify it under the terms of the GNU Lesser General Public
&lt;br&gt;+ * License as published by the Free Software Foundation; either
&lt;br&gt;+ * version 2.1 of the License, or (at your option) any later version.
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is distributed in the hope that it will be useful,
&lt;br&gt;+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+ * Lesser General Public License for more details.
&lt;br&gt;+ * 
&lt;br&gt;+ * You should have received a copy of the GNU Lesser General Public
&lt;br&gt;+ * License along with this library; if not, write to the Free Software
&lt;br&gt;+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 &amp;nbsp;USA
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+#include &amp;quot;opensync.h&amp;quot;
&lt;br&gt;+#include &amp;quot;opensync_internals.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+#include &amp;quot;opensync-plugin.h&amp;quot;
&lt;br&gt;+#include &amp;quot;opensync_plugin_externalplugin_private.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+OSyncPluginExternalPlugin *osync_plugin_externalplugin_new(OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin = osync_try_malloc0(sizeof(OSyncPluginExternalPlugin), error);
&lt;br&gt;+	if (!externalplugin)
&lt;br&gt;+		return NULL;
&lt;br&gt;+
&lt;br&gt;+	externalplugin-&amp;gt;ref_count = 1;
&lt;br&gt;+
&lt;br&gt;+	return externalplugin;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+OSyncPluginExternalPlugin *osync_plugin_externalplugin_ref(OSyncPluginExternalPlugin *externalplugin)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(externalplugin);
&lt;br&gt;+	
&lt;br&gt;+	g_atomic_int_inc(&amp;(externalplugin-&amp;gt;ref_count));
&lt;br&gt;+
&lt;br&gt;+	return externalplugin;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+void osync_plugin_externalplugin_unref(OSyncPluginExternalPlugin *externalplugin)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(externalplugin);
&lt;br&gt;+	
&lt;br&gt;+	if (g_atomic_int_dec_and_test(&amp;(externalplugin-&amp;gt;ref_count))) {
&lt;br&gt;+		if (externalplugin-&amp;gt;external_command)
&lt;br&gt;+			osync_free(externalplugin-&amp;gt;external_command);
&lt;br&gt;+		osync_free(externalplugin);
&lt;br&gt;+	}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+const char *osync_plugin_externalplugin_get_external_command(OSyncPluginExternalPlugin *externalplugin)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(externalplugin);
&lt;br&gt;+	return externalplugin-&amp;gt;external_command;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+void osync_plugin_externalplugin_set_external_command(OSyncPluginExternalPlugin *externalplugin, const char *external_command)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(externalplugin);
&lt;br&gt;+
&lt;br&gt;+	if (externalplugin-&amp;gt;external_command)
&lt;br&gt;+		osync_free(externalplugin-&amp;gt;external_command);
&lt;br&gt;+
&lt;br&gt;+	externalplugin-&amp;gt;external_command = osync_strdup(external_command);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config_private.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config_private.h	(revision 5895)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config_private.h	(working copy)
&lt;br&gt;@@ -44,6 +44,8 @@
&lt;br&gt;&amp;nbsp;	OSyncPluginLocalization *localization;
&lt;br&gt;&amp;nbsp;	/** List of resource configurations */
&lt;br&gt;&amp;nbsp;	OSyncList *resources;
&lt;br&gt;+	/** External plugin configuration */
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	/** Flags to store supported config options */
&lt;br&gt;&amp;nbsp;	OSyncPluginConfigSupportedFlags supported;
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config.c	(revision 5895)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config.c	(working copy)
&lt;br&gt;@@ -33,6 +33,7 @@
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_connection_internals.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_localization_private.h&amp;quot;	/* FIXME: direct access to private header */
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_resource_private.h&amp;quot;		/* FIXME: direct access to private header */
&lt;br&gt;+#include &amp;quot;opensync_plugin_externalplugin_private.h&amp;quot;	/* FIXME: direct access to private header */
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_config_private.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_config_internals.h&amp;quot;
&lt;br&gt;@@ -209,6 +210,47 @@
&lt;br&gt;&amp;nbsp;	return FALSE;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+static osync_bool _osync_plugin_config_parse_externalplugin(OSyncPluginConfig *config, xmlNode *cur, OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin = NULL;
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, config, cur, error);
&lt;br&gt;+
&lt;br&gt;+	if (cur == NULL) { // don't set externalplugin if ExternalPlugin tag is empty
&lt;br&gt;+		osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+		return TRUE;	
&lt;br&gt;+	}
&lt;br&gt;+	
&lt;br&gt;+	externalplugin = osync_plugin_externalplugin_new(error);
&lt;br&gt;+	if (!externalplugin)
&lt;br&gt;+		goto error;
&lt;br&gt;+
&lt;br&gt;+	for (; cur != NULL; cur = cur-&amp;gt;next) {
&lt;br&gt;+		char *str = NULL;
&lt;br&gt;+		if (cur-&amp;gt;type != XML_ELEMENT_NODE)
&lt;br&gt;+			continue;
&lt;br&gt;+
&lt;br&gt;+		str = (char*)xmlNodeGetContent(cur);
&lt;br&gt;+		if (!str)
&lt;br&gt;+			continue;
&lt;br&gt;+
&lt;br&gt;+		if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;ExternalCommand&amp;quot;)) {
&lt;br&gt;+			osync_plugin_externalplugin_set_external_command(externalplugin, str);
&lt;br&gt;+		}
&lt;br&gt;+
&lt;br&gt;+		osync_xml_free(str);
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	osync_plugin_config_set_externalplugin(config, externalplugin);
&lt;br&gt;+	osync_plugin_externalplugin_unref(externalplugin);
&lt;br&gt;+	
&lt;br&gt;+	osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+	return TRUE;
&lt;br&gt;+
&lt;br&gt;+ error:
&lt;br&gt;+	osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, osync_error_print(error));
&lt;br&gt;+	return FALSE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;static osync_bool _osync_plugin_config_parse_connection_bluetooth(OSyncPluginConnection *conn, xmlNode *cur, OSyncError **error) {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, conn, cur, error);
&lt;br&gt;@@ -728,6 +770,9 @@
&lt;br&gt;&amp;nbsp;		} else if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;Resources&amp;quot;)) {
&lt;br&gt;&amp;nbsp;			config-&amp;gt;supported |= OPENSYNC_PLUGIN_CONFIG_RESOURCES;
&lt;br&gt;&amp;nbsp;			ret = _osync_plugin_config_parse_resources(config, cur-&amp;gt;xmlChildrenNode, error);
&lt;br&gt;+		} else if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;ExternalPlugin&amp;quot;)) {
&lt;br&gt;+			config-&amp;gt;supported |= OPENSYNC_PLUGIN_CONFIG_EXTERNALPLUGIN;
&lt;br&gt;+			ret = _osync_plugin_config_parse_externalplugin(config, cur-&amp;gt;xmlChildrenNode, error);
&lt;br&gt;&amp;nbsp;		} else {
&lt;br&gt;&amp;nbsp;			osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, &amp;quot;Unknown configuration field \&amp;quot;%s\&amp;quot;&amp;quot;, cur-&amp;gt;name);
&lt;br&gt;&amp;nbsp;			goto error;
&lt;br&gt;@@ -824,6 +869,28 @@
&lt;br&gt;&amp;nbsp;	return FALSE;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+static osync_bool _osync_plugin_config_assemble_externalplugin(xmlNode *cur, OSyncPluginExternalPlugin *externalplugin, OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	const char *external_command;
&lt;br&gt;+	xmlNode *node = NULL;
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, cur, externalplugin, error);
&lt;br&gt;+
&lt;br&gt;+	node = xmlNewChild(cur, NULL, (xmlChar*)&amp;quot;ExternalPlugin&amp;quot;, NULL);
&lt;br&gt;+	if (!node) {
&lt;br&gt;+		osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;No memory left to assemble configuration.&amp;quot;);
&lt;br&gt;+		goto error;
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	if ((external_command = osync_plugin_externalplugin_get_external_command(externalplugin)))
&lt;br&gt;+		xmlNewChild(node, NULL, (xmlChar*)&amp;quot;ExternalCommand&amp;quot;, (xmlChar*)external_command);
&lt;br&gt;+
&lt;br&gt;+	osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+	return TRUE;
&lt;br&gt;+ error:
&lt;br&gt;+	osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, osync_error_print(error));
&lt;br&gt;+	return FALSE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;static osync_bool _osync_plugin_config_assemble_connection(xmlNode *cur, OSyncPluginConnection *conn, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	char *str;
&lt;br&gt;@@ -1308,6 +1375,9 @@
&lt;br&gt;&amp;nbsp;			config-&amp;gt;resources = osync_list_remove(config-&amp;gt;resources, res);
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+		if (config-&amp;gt;externalplugin)
&lt;br&gt;+			osync_plugin_externalplugin_unref(config-&amp;gt;externalplugin);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;		if (config-&amp;gt;schemadir)
&lt;br&gt;&amp;nbsp;			osync_free(config-&amp;gt;schemadir);
&lt;br&gt;&amp;nbsp;			
&lt;br&gt;@@ -1330,6 +1400,7 @@
&lt;br&gt;&amp;nbsp;	OSyncPluginConnection *conn;
&lt;br&gt;&amp;nbsp;	OSyncPluginAuthentication *auth;
&lt;br&gt;&amp;nbsp;	OSyncPluginLocalization *local;
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin;
&lt;br&gt;&amp;nbsp;	OSyncList *resources;
&lt;br&gt;&amp;nbsp;	OSyncList *options;
&lt;br&gt;&amp;nbsp;	char *version_str = NULL;
&lt;br&gt;@@ -1382,6 +1453,11 @@
&lt;br&gt;&amp;nbsp;		if (!_osync_plugin_config_assemble_resources(doc-&amp;gt;children, resources, error))
&lt;br&gt;&amp;nbsp;			goto error_and_free;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	/* ExternalPlugin */
&lt;br&gt;+	if ((externalplugin = osync_plugin_config_get_externalplugin(config)))
&lt;br&gt;+		if (!_osync_plugin_config_assemble_externalplugin(doc-&amp;gt;children, externalplugin, error))
&lt;br&gt;+			goto error_and_free;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	xmlSaveFormatFile(path, doc, 1);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_xml_free_doc(doc);
&lt;br&gt;@@ -1567,7 +1643,27 @@
&lt;br&gt;&amp;nbsp;	return NULL;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/* External Plugin */
&lt;br&gt;+OSyncPluginExternalPlugin *osync_plugin_config_get_externalplugin(OSyncPluginConfig *config)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(config);
&lt;br&gt;+	return config-&amp;gt;externalplugin;
&lt;br&gt;+}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+void osync_plugin_config_set_externalplugin(OSyncPluginConfig *config, OSyncPluginExternalPlugin *externalplugin)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(config);
&lt;br&gt;+	
&lt;br&gt;+	if (config-&amp;gt;externalplugin) {
&lt;br&gt;+		osync_plugin_externalplugin_unref(config-&amp;gt;externalplugin);
&lt;br&gt;+		config-&amp;gt;externalplugin = NULL;
&lt;br&gt;+	}
&lt;br&gt;+	
&lt;br&gt;+	if (externalplugin) {
&lt;br&gt;+		config-&amp;gt;externalplugin = osync_plugin_externalplugin_ref(externalplugin);
&lt;br&gt;+	}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;OSyncPluginConnection *osync_plugin_config_get_connection(OSyncPluginConfig *config)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_assert(config);
&lt;br&gt;Index: opensync/plugin/opensync_plugin_externalplugin.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_externalplugin.h	(revision 0)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_externalplugin.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,87 @@
&lt;br&gt;+/*
&lt;br&gt;+ * libopensync - A synchronization framework
&lt;br&gt;+ * Copyright (C) 2009 &amp;nbsp;Henrik Kaare Poulsen
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is free software; you can redistribute it and/or
&lt;br&gt;+ * modify it under the terms of the GNU Lesser General Public
&lt;br&gt;+ * License as published by the Free Software Foundation; either
&lt;br&gt;+ * version 2.1 of the License, or (at your option) any later version.
&lt;br&gt;+ * 
&lt;br&gt;+ * This library is distributed in the hope that it will be useful,
&lt;br&gt;+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+ * Lesser General Public License for more details.
&lt;br&gt;+ * 
&lt;br&gt;+ * You should have received a copy of the GNU Lesser General Public
&lt;br&gt;+ * License along with this library; if not, write to the Free Software
&lt;br&gt;+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 &amp;nbsp;USA
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+#ifndef _OPENSYNC_PLUGIN_EXTERNALPLUGIN_H_
&lt;br&gt;+#define _OPENSYNC_PLUGIN_EXTERNALPLUGIN_H_
&lt;br&gt;+
&lt;br&gt;+/**
&lt;br&gt;+ * @defgroup OSyncPluginExternalPluginAPI OpenSync Plugin ExternalPlugin
&lt;br&gt;+ * @ingroup OSyncPlugin
&lt;br&gt;+ * @brief Functions for configuring external plugin 
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+/*@{*/
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+/** @brief Create a new OSyncPluginExternalPlugin object
&lt;br&gt;+ *
&lt;br&gt;+ * @param error Pointer to an error struct
&lt;br&gt;+ * @returns the newly created object, or NULL in case of an error.
&lt;br&gt;+ *
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT OSyncPluginExternalPlugin *osync_plugin_externalplugin_new(OSyncError **error);
&lt;br&gt;+
&lt;br&gt;+/** @brief Decrease the reference count on an OSyncPluginExternalPlugin object
&lt;br&gt;+ * 
&lt;br&gt;+ * @param external_plugin Pointer to the OSyncPluginExternalPlugin object
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT void osync_plugin_externalplugin_unref(OSyncPluginExternalPlugin *external_plugin);
&lt;br&gt;+
&lt;br&gt;+/** @brief Increase the reference count on an OSyncPluginExternalPlugin object
&lt;br&gt;+ * 
&lt;br&gt;+ * @param external_plugin Pointer to the OSyncPluginExternalPlugin object
&lt;br&gt;+ * @returns The OSyncPluginExternalPlugin object passed in
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT OSyncPluginExternalPlugin *osync_plugin_externalplugin_ref(OSyncPluginExternalPlugin *external_plugin);
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+/** @brief Get the command to start the external plugin process
&lt;br&gt;+ *
&lt;br&gt;+ * @param external_plugin Pointer to the OSyncPluginExternalPlugin object
&lt;br&gt;+ * @returns the external command or NULL if not set
&lt;br&gt;+ *
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT const char *osync_plugin_externalplugin_get_external_command(OSyncPluginExternalPlugin *external_plugin);
&lt;br&gt;+
&lt;br&gt;+/** @brief Set the command to start the external plugin process
&lt;br&gt;+ *
&lt;br&gt;+ * If the plugin is of type OSYNC_START_TYPE_EXTERNAL, an external command can be executed by OpenSync.
&lt;br&gt;+ * The external_command should be a string in printf format, with one %s.
&lt;br&gt;+ * Before the command is executed, a variant of printf will be called
&lt;br&gt;+ * to replace the %s with the path to the plugin pipe.
&lt;br&gt;+ * The resulting command will be exectued with the glib function
&lt;br&gt;+ * g_spawn_command_line_async.
&lt;br&gt;+ * 
&lt;br&gt;+ * Example: &amp;quot;thunderbird -mozilla-sync %s&amp;quot;
&lt;br&gt;+ *
&lt;br&gt;+ * @param external_plugin Pointer to the OSyncPluginExternalPlugin object
&lt;br&gt;+ * @param external_command The external command to set
&lt;br&gt;+ *
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT void osync_plugin_externalplugin_set_external_command(OSyncPluginExternalPlugin *external_plugin, const char *external_command);
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+/*@}*/
&lt;br&gt;+
&lt;br&gt;+#endif /*_OPENSYNC_PLUGIN_EXTERNALPLUGIN_H_*/
&lt;br&gt;+
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config.h	(revision 5895)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config.h	(working copy)
&lt;br&gt;@@ -47,7 +47,9 @@
&lt;br&gt;&amp;nbsp;	/** Resources */
&lt;br&gt;&amp;nbsp;	OPENSYNC_PLUGIN_CONFIG_RESOURCES	= (1 &amp;lt;&amp;lt; 3),
&lt;br&gt;&amp;nbsp;	/** Connection options */
&lt;br&gt;-	OPENSYNC_PLUGIN_CONFIG_CONNECTION	= (1 &amp;lt;&amp;lt; 4)
&lt;br&gt;+	OPENSYNC_PLUGIN_CONFIG_CONNECTION	= (1 &amp;lt;&amp;lt; 4),
&lt;br&gt;+	/** External Plugin */
&lt;br&gt;+	OPENSYNC_PLUGIN_CONFIG_EXTERNALPLUGIN	= (1 &amp;lt;&amp;lt; 5)
&lt;br&gt;&amp;nbsp;} OSyncPluginConfigSupportedFlag;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/** @brief Set of OSyncPluginConfigSupportedFlags
&lt;br&gt;@@ -217,6 +219,21 @@
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT void osync_plugin_config_set_connection(OSyncPluginConfig *config, OSyncPluginConnection *connection);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/* External Plugin */
&lt;br&gt;+/**@brief Get the external plugin settings from a config
&lt;br&gt;+ *
&lt;br&gt;+ * @param config An OSyncPluginConfig
&lt;br&gt;+ * @returns an OSyncPluginExternalPlugin with the details of the external plugin or NULL if no external plugin settings configured
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT OSyncPluginExternalPlugin *osync_plugin_config_get_externalplugin(OSyncPluginConfig *config);
&lt;br&gt;+
&lt;br&gt;+/**@brief Set the external plugin configuration
&lt;br&gt;+ *
&lt;br&gt;+ * @param config An OSyncPluginConfig
&lt;br&gt;+ * @param authentication The new external plugin settings as an OSyncPluginExternalPlugin
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT void osync_plugin_config_set_externalplugin(OSyncPluginConfig *config, OSyncPluginExternalPlugin *externalplugin);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#endif /*_OPENSYNC_PLUGIN_CONFIG_H_*/
&lt;br&gt;Index: opensync/CMakeLists.txt
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/CMakeLists.txt	(revision 5895)
&lt;br&gt;+++ opensync/CMakeLists.txt	(working copy)
&lt;br&gt;@@ -60,6 +60,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_info.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_localization.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_resource.c
&lt;br&gt;+ &amp;nbsp; plugin/opensync_plugin_externalplugin.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_objtype_sink.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; version/opensync_version.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlformat/opensync_xmlfield.c
&lt;br&gt;Index: opensync/opensync.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/opensync.h	(revision 5895)
&lt;br&gt;+++ opensync/opensync.h	(working copy)
&lt;br&gt;@@ -222,6 +222,7 @@
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginConnection OSyncPluginConnection;
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginLocalization OSyncPluginLocalization;
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginResource OSyncPluginResource;
&lt;br&gt;+typedef struct OSyncPluginExternalPlugin OSyncPluginExternalPlugin;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/* Engine component */
&lt;br&gt;&amp;nbsp;typedef struct OSyncEngine OSyncEngine;
&lt;br&gt;Index: opensync/engine/opensync_engine.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/engine/opensync_engine.c	(revision 5895)
&lt;br&gt;+++ opensync/engine/opensync_engine.c	(working copy)
&lt;br&gt;@@ -773,7 +773,11 @@
&lt;br&gt;&amp;nbsp;	osync_client_proxy_set_context(proxy, engine-&amp;gt;context);
&lt;br&gt;&amp;nbsp;	osync_client_proxy_set_change_callback(proxy, _osync_engine_receive_change, engine);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	if (!osync_client_proxy_spawn(proxy, osync_plugin_get_start_type(plugin), osync_member_get_configdir(member), error))
&lt;br&gt;+	const char *external_command=NULL;
&lt;br&gt;+	if (osync_plugin_get_start_type(plugin)==OSYNC_START_TYPE_EXTERNAL)
&lt;br&gt;+		external_command=osync_member_get_external_command(member);
&lt;br&gt;+
&lt;br&gt;+	if (!osync_client_proxy_spawn(proxy, osync_plugin_get_start_type(plugin), osync_member_get_configdir(member), external_command, error))
&lt;br&gt;&amp;nbsp;		goto error_free_proxy;
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	engine-&amp;gt;busy = TRUE;
&lt;br&gt;Index: opensync/client/opensync_client_proxy_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client_proxy_internals.h	(revision 5895)
&lt;br&gt;+++ opensync/client/opensync_client_proxy_internals.h	(working copy)
&lt;br&gt;@@ -44,7 +44,7 @@
&lt;br&gt;&amp;nbsp;void osync_client_proxy_set_change_callback(OSyncClientProxy *proxy, change_cb cb, void *userdata);
&lt;br&gt;&amp;nbsp;OSyncMember *osync_client_proxy_get_member(OSyncClientProxy *proxy);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-OSYNC_TEST_EXPORT osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, OSyncError **error);
&lt;br&gt;+OSYNC_TEST_EXPORT osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, const char* external_command, OSyncError **error);
&lt;br&gt;&amp;nbsp;OSYNC_TEST_EXPORT osync_bool osync_client_proxy_shutdown(OSyncClientProxy *proxy, OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSYNC_TEST_EXPORT osync_bool osync_client_proxy_initialize(OSyncClientProxy *proxy, initialize_cb callback, void *userdata, const char *formatdir, const char *plugindir, const char *plugin, const char *groupname, const char *configdir, OSyncPluginConfig *config, OSyncError **error);
&lt;br&gt;Index: opensync/client/opensync_client_proxy.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client_proxy.c	(revision 5895)
&lt;br&gt;+++ opensync/client/opensync_client_proxy.c	(working copy)
&lt;br&gt;@@ -952,7 +952,7 @@
&lt;br&gt;&amp;nbsp;	return proxy-&amp;gt;member;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, OSyncError **error)
&lt;br&gt;+osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, const char* external_command, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncQueue *read1 = NULL;
&lt;br&gt;&amp;nbsp;	OSyncQueue *read2 = NULL;
&lt;br&gt;@@ -1080,6 +1080,22 @@
&lt;br&gt;&amp;nbsp;			goto error;
&lt;br&gt;&amp;nbsp;	} else {
&lt;br&gt;&amp;nbsp;		name = osync_strdup_printf(&amp;quot;%s%cpluginpipe&amp;quot;, path, G_DIR_SEPARATOR);
&lt;br&gt;+	
&lt;br&gt;+		if (external_command) {
&lt;br&gt;+			char *command = osync_strdup_printf(external_command, name);
&lt;br&gt;+			osync_trace(TRACE_INTERNAL, &amp;quot;g_spawn_command_line_async(%s)&amp;quot;, command);
&lt;br&gt;+			GError *gerror = NULL;
&lt;br&gt;+			gboolean f = g_spawn_command_line_async(command, &amp;gerror);
&lt;br&gt;+			if (!f) {
&lt;br&gt;+				osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;Unable to g_spawn_command_line_async(%s): %s&amp;quot;, command, gerror-&amp;gt;message);
&lt;br&gt;+				g_error_free (gerror);
&lt;br&gt;+				osync_free(command);
&lt;br&gt;+				goto error;
&lt;br&gt;+			}
&lt;br&gt;+			osync_free(command);
&lt;br&gt;+		}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;		proxy-&amp;gt;outgoing = osync_queue_new(name, error);
&lt;br&gt;&amp;nbsp;		osync_free(name);
&lt;br&gt;&amp;nbsp;		if (!proxy-&amp;gt;outgoing)
&lt;br&gt;Index: tests/client-tests/check_proxy.c
&lt;br&gt;===================================================================
&lt;br&gt;--- tests/client-tests/check_proxy.c	(revision 5895)
&lt;br&gt;+++ tests/client-tests/check_proxy.c	(working copy)
&lt;br&gt;@@ -39,7 +39,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	fail_unless(osync_client_proxy_shutdown(proxy, &amp;error), NULL);
&lt;br&gt;@@ -110,7 +110,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;@@ -159,7 +159,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;@@ -225,7 +225,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26141075&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--External-command-in-plugin-configuration-file-tp26141075p26141075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26141058</id>
	<title>Re: [trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-10-31T02:57:37Z</published>
	<updated>2009-10-31T02:57:37Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Great!
&lt;br&gt;&lt;br&gt;Thanks a lot Daniel.
&lt;br&gt;Works like a charm!
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;&lt;br&gt;Daniel Gollub wrote:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; finally we have an example implementation for OSYNC_START_TYPE_EXTERNAL.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26141058&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26141058.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26137387</id>
	<title>[trunk] OSYNC_START_TYPE_EXTERNAL example / OSyncClient API changes</title>
	<published>2009-10-30T14:49:22Z</published>
	<updated>2009-10-30T14:49:22Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&lt;br&gt;finally we have an example implementation for OSYNC_START_TYPE_EXTERNAL.
&lt;br&gt;&lt;br&gt;What this OSYNC_START_TYPE_EXTERNAL about?
&lt;br&gt;&lt;br&gt;This allows to write (standalone) userspace applications which act as OpenSync 
&lt;br&gt;plugin. You can use this for example if you try to gather data from an 
&lt;br&gt;existing application, which doesn't provides any public interface - e.g. an 
&lt;br&gt;extension of an application which communicates with OpenSync.
&lt;br&gt;&lt;br&gt;Currently, there is need of stub plugin, which registers the plugin to the 
&lt;br&gt;OpenSync environment. As Graham already suggested in a seperated thread, we'll 
&lt;br&gt;very likely change it - so there is only need to write a simple configuration 
&lt;br&gt;file to register external plugins.
&lt;br&gt;&lt;br&gt;Additionally we'll add some configuration options so OpenSync can spawn such 
&lt;br&gt;external process if they haven't be launced yet. For now such applications 
&lt;br&gt;have to be started manually ...
&lt;br&gt;&lt;br&gt;See:
&lt;br&gt;&lt;a href=&quot;http://opensync.org/browser/trunk/docs/examples/plugins/src/external_demo.c&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/browser/trunk/docs/examples/plugins/src/external_demo.c&lt;/a&gt;&lt;br&gt;and
&lt;br&gt;&lt;a href=&quot;http://opensync.org/changeset/5895&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://opensync.org/changeset/5895&lt;/a&gt;&lt;br&gt;&lt;br&gt;-------8&amp;lt;-------
&lt;br&gt;$ ./example_external_demo ~/.config/opensync/0.40/group6/1/pluginpipe &amp;
&lt;br&gt;[1] 10841
&lt;br&gt;$
&lt;br&gt;[EXTERNAL-DEMO]: OSyncPlugin:0x40159d OSyncClient:0x603040
&lt;br&gt;[EXTERNAL-DEMO]: Starting (blocking) OSyncClient ...
&lt;br&gt;$
&lt;br&gt;$ osynctool --sync external
&lt;br&gt;Synchronizing group &amp;quot;external&amp;quot;
&lt;br&gt;[EXTERNAL-DEMO]: initialize
&lt;br&gt;data sink of member 2 of type file-sync just connected
&lt;br&gt;Main sink of member 2 of type file-sync just connected
&lt;br&gt;data sink of member 1 of type external-demo just connected
&lt;br&gt;Main sink of member 1 of type external-demo just connected
&lt;br&gt;All clients connected or error
&lt;br&gt;[EXTERNAL-DEMO]: get_changes slow_sync: no
&lt;br&gt;data sink of member 2 of type file-sync just sent all changes
&lt;br&gt;data sink of member 1 of type external-demo just sent all changes
&lt;br&gt;Main sink of member 1 of type external-demo just sent all changes
&lt;br&gt;Main sink of member 2 of type file-sync just sent all changes
&lt;br&gt;[...]
&lt;br&gt;The sync was successful
&lt;br&gt;data sink of member 1 of type external-demo just disconnected
&lt;br&gt;Main sink of member 1 of type external-demo just disconnected
&lt;br&gt;data sink of member 2 of type file-sync just disconnected
&lt;br&gt;Main sink of member 2 of type file-sync just disconnected
&lt;br&gt;All clients have disconnected
&lt;br&gt;[EXTERNAL-DEMO]: OSyncClient completed.
&lt;br&gt;[1]+ Done ./example_external_demo ~/.config/opensync/0.40/group6/1/pluginpipe
&lt;br&gt;$ 
&lt;br&gt;--------&amp;gt;8-----------
&lt;br&gt;&lt;br&gt;This required changes on the OSyncClient API:
&lt;br&gt;&lt;br&gt;osync_client_{get,set}_{plugin,pipe_path} got added to the public API. Which 
&lt;br&gt;are used to write an external plugin (see reference implementation).
&lt;br&gt;&lt;br&gt;An public interface which shouldn't be widely used yet got changed:
&lt;br&gt;osync_client_run_and_block() got an additional parameter (OSyncError **) and 
&lt;br&gt;changed the return value from void to osync_bool. (Should be very trivial to 
&lt;br&gt;port).
&lt;br&gt;&lt;br&gt;If there are any questions regarding this changes, don't hesistate to ask on 
&lt;br&gt;the opensync-devel Mailinglist.
&lt;br&gt;&lt;br&gt;Thanks to Henrik and Graham for their feedback and help to get this working!
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26137387&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26137387&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26137387/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-trunk--OSYNC_START_TYPE_EXTERNAL-example---OSyncClient-API-changes-tp26137387p26137387.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133744</id>
	<title>Re: [RFC][PATCH] OSYNC_START_TYPE_EXTERNAL * new patch *</title>
	<published>2009-10-30T10:11:16Z</published>
	<updated>2009-10-30T10:11:16Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Just for reference, the external process basically boils down to this 
&lt;br&gt;function:
&lt;br&gt;&lt;br&gt;&lt;br&gt;static int run_plugin(BZOpenSyncPlugin *pbz) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_trace(TRACE_ENTRY, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; OSyncError *error = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; OSyncQueue *incoming = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; OSyncQueue *outgoing = NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; OSyncClient *client = NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; client = osync_client_new(&amp;error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!client)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto done;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_client_set_overriding_plugin_dir(client, pbz-&amp;gt;mySzPathToLib);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /* Create connection pipes **/
&lt;br&gt;&amp;nbsp; &amp;nbsp; incoming = osync_queue_new(pbz-&amp;gt;mySzPathToPipe, &amp;error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!incoming)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto error;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!osync_queue_create(incoming, &amp;error))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto error;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; /* We now connect to our incoming queue */
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!osync_queue_connect(incoming, OSYNC_QUEUE_RECEIVER, &amp;error))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto error;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!osync_client_set_incoming_queue(client, incoming, &amp;error))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto error;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_queue_unref(incoming);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_client_run_and_block(client);
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_client_unref(client);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; printf(&amp;quot;blueZync synchronization client thread complete\n&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;&amp;nbsp; &amp;nbsp; return NS_OK;
&lt;br&gt;&lt;br&gt;&amp;nbsp;error:
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_client_unref(client);
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp;done: &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, 
&lt;br&gt;osync_error_print(&amp;error));
&lt;br&gt;&amp;nbsp; &amp;nbsp; fprintf(stderr, &amp;quot;Unable to initialize environment: %s\n&amp;quot;, 
&lt;br&gt;osync_error_print(&amp;error));
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_error_unref(&amp;error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; return NS_ERROR_FAILURE;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;Henrik /KaarPoSoft wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have earlier provided a patch so a plugin of type 
&lt;br&gt;&amp;gt; OSYNC_START_TYPE_EXTERNAL can set 
&lt;br&gt;&amp;gt; osync_plugin_set_start_external_command.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, after some thought, I actually think it should be on the 
&lt;br&gt;&amp;gt; OSyncPluginConfig.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In this way, different members can have different external commands 
&lt;br&gt;&amp;gt; with the same plugin.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I.e. the config for mozilla-sync plugin could specify thunderbird or 
&lt;br&gt;&amp;gt; sunbird or even the Debian ice-*.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Please find attached a combined patch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Comments?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Henrik
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133744&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--OSYNC_START_TYPE_EXTERNAL-tp26102126p26133744.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133669</id>
	<title>Re: [RFC][PATCH] OSYNC_START_TYPE_EXTERNAL * new patch *</title>
	<published>2009-10-30T10:05:38Z</published>
	<updated>2009-10-30T10:05:38Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I have earlier provided a patch so a plugin of type 
&lt;br&gt;OSYNC_START_TYPE_EXTERNAL can set osync_plugin_set_start_external_command.
&lt;br&gt;&lt;br&gt;However, after some thought, I actually think it should be on the 
&lt;br&gt;OSyncPluginConfig.
&lt;br&gt;&lt;br&gt;In this way, different members can have different external commands with 
&lt;br&gt;the same plugin.
&lt;br&gt;&lt;br&gt;I.e. the config for mozilla-sync plugin could specify thunderbird or 
&lt;br&gt;sunbird or even the Debian ice-*.
&lt;br&gt;&lt;br&gt;Please find attached a combined patch.
&lt;br&gt;&lt;br&gt;Comments?
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;Index: misc/schemas/plugin_config.xsd
&lt;br&gt;===================================================================
&lt;br&gt;--- misc/schemas/plugin_config.xsd	(revision 5882)
&lt;br&gt;+++ misc/schemas/plugin_config.xsd	(working copy)
&lt;br&gt;@@ -9,6 +9,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Connection&amp;quot; type=&amp;quot;Connection&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Localization&amp;quot; type=&amp;quot;Localization&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;Resources&amp;quot; type=&amp;quot;Resources&amp;quot;/&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;ExternalPlugin&amp;quot; type=&amp;quot;ExternalPlugin&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:attribute name=&amp;quot;version&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;@@ -164,4 +165,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:all&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp;&amp;lt;xsd:complexType name=&amp;quot;ExternalPlugin&amp;quot;&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;&amp;lt;xsd:all&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsd:element maxOccurs=&amp;quot;1&amp;quot; minOccurs=&amp;quot;1&amp;quot; name=&amp;quot;ExternalCommand&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;&amp;lt;/xsd:all&amp;gt;
&lt;br&gt;+ &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;&amp;lt;/xsd:schema&amp;gt;
&lt;br&gt;Index: opensync/opensync-plugin.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/opensync-plugin.h	(revision 5882)
&lt;br&gt;+++ opensync/opensync-plugin.h	(working copy)
&lt;br&gt;@@ -33,6 +33,7 @@
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_connection.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_localization.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_plugin_resource.h&amp;quot;
&lt;br&gt;+#include &amp;quot;plugin/opensync_plugin_externalplugin.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;plugin/opensync_objtype_sink.h&amp;quot;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OPENSYNC_END_DECLS
&lt;br&gt;Index: opensync/group/opensync_member.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/group/opensync_member.c	(revision 5882)
&lt;br&gt;+++ opensync/group/opensync_member.c	(working copy)
&lt;br&gt;@@ -832,6 +832,18 @@
&lt;br&gt;&amp;nbsp;	return new_list;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+const char *osync_member_get_external_command(OSyncMember *member)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(member);
&lt;br&gt;+	OSyncError *error;
&lt;br&gt;+	OSyncPluginConfig *config = osync_member_get_config_or_default(member, &amp;error);
&lt;br&gt;+	if (config) {
&lt;br&gt;+		OSyncPluginExternalPlugin *externalplugin = osync_plugin_config_get_externalplugin(config);
&lt;br&gt;+		if (externalplugin) return osync_plugin_externalplugin_get_external_command(externalplugin);
&lt;br&gt;+	}
&lt;br&gt;+	return NULL;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;osync_bool osync_member_objtype_enabled(OSyncMember *member, const char *objtype)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncObjTypeSink *sink = NULL;
&lt;br&gt;Index: opensync/group/opensync_member.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/group/opensync_member.h	(revision 5882)
&lt;br&gt;+++ opensync/group/opensync_member.h	(working copy)
&lt;br&gt;@@ -334,6 +334,25 @@
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT osync_bool osync_member_plugin_is_uptodate(OSyncMember *member);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/** @brief Returns the external command of a member
&lt;br&gt;+ *
&lt;br&gt;+ * If the plugin is of type OSYNC_START_TYPE_EXTERNAL, an external command can be executed by OpenSync.
&lt;br&gt;+ * The external_command should be a string in printf format, with one %s.
&lt;br&gt;+ * Before the command is executed, a variant of printf will be called
&lt;br&gt;+ * to replace the %s with the path to the plugin pipe.
&lt;br&gt;+ * The resulting command will be exectued with the glib function
&lt;br&gt;+ * g_spawn_command_line_async.
&lt;br&gt;+ *
&lt;br&gt;+ * The external command is specified in the plugin configuration file for the member, e.g.
&lt;br&gt;+ * &amp;lt;ExternalPlugin&amp;gt;&amp;lt;ExternalCommand&amp;gt;the command&amp;lt;/ExternalCommand&amp;gt;&amp;lt;/ExternalPlugin&amp;gt;
&lt;br&gt;+ * 
&lt;br&gt;+ * @param plugin Pointer to the plugin
&lt;br&gt;+ * @returns External command of the plugin
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT const char *osync_member_get_external_command(OSyncMember *member);
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#endif /* _OPENSYNC_MEMBER_H_ */
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config_private.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config_private.h	(revision 5882)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config_private.h	(working copy)
&lt;br&gt;@@ -44,6 +44,8 @@
&lt;br&gt;&amp;nbsp;	OSyncPluginLocalization *localization;
&lt;br&gt;&amp;nbsp;	/** List of resource configurations */
&lt;br&gt;&amp;nbsp;	OSyncList *resources;
&lt;br&gt;+	/** External plugin configuration */
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	/** Flags to store supported config options */
&lt;br&gt;&amp;nbsp;	OSyncPluginConfigSupportedFlags supported;
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config.c	(revision 5882)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config.c	(working copy)
&lt;br&gt;@@ -33,6 +33,7 @@
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_connection_internals.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_localization_private.h&amp;quot;	/* FIXME: direct access to private header */
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_resource_private.h&amp;quot;		/* FIXME: direct access to private header */
&lt;br&gt;+#include &amp;quot;opensync_plugin_externalplugin_private.h&amp;quot;	/* FIXME: direct access to private header */
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_config_private.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;opensync_plugin_config_internals.h&amp;quot;
&lt;br&gt;@@ -209,6 +210,47 @@
&lt;br&gt;&amp;nbsp;	return FALSE;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+static osync_bool _osync_plugin_config_parse_externalplugin(OSyncPluginConfig *config, xmlNode *cur, OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin = NULL;
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, config, cur, error);
&lt;br&gt;+
&lt;br&gt;+	if (cur == NULL) { // don't set externalplugin if ExternalPlugin tag is empty
&lt;br&gt;+		osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+		return TRUE;	
&lt;br&gt;+	}
&lt;br&gt;+	
&lt;br&gt;+	externalplugin = osync_plugin_externalplugin_new(error);
&lt;br&gt;+	if (!externalplugin)
&lt;br&gt;+		goto error;
&lt;br&gt;+
&lt;br&gt;+	for (; cur != NULL; cur = cur-&amp;gt;next) {
&lt;br&gt;+		char *str = NULL;
&lt;br&gt;+		if (cur-&amp;gt;type != XML_ELEMENT_NODE)
&lt;br&gt;+			continue;
&lt;br&gt;+
&lt;br&gt;+		str = (char*)xmlNodeGetContent(cur);
&lt;br&gt;+		if (!str)
&lt;br&gt;+			continue;
&lt;br&gt;+
&lt;br&gt;+		if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;ExternalCommand&amp;quot;)) {
&lt;br&gt;+			osync_plugin_externalplugin_set_external_command(externalplugin, str);
&lt;br&gt;+		}
&lt;br&gt;+
&lt;br&gt;+		osync_xml_free(str);
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	osync_plugin_config_set_externalplugin(config, externalplugin);
&lt;br&gt;+	osync_plugin_externalplugin_unref(externalplugin);
&lt;br&gt;+	
&lt;br&gt;+	osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+	return TRUE;
&lt;br&gt;+
&lt;br&gt;+ error:
&lt;br&gt;+	osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, osync_error_print(error));
&lt;br&gt;+	return FALSE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;static osync_bool _osync_plugin_config_parse_connection_bluetooth(OSyncPluginConnection *conn, xmlNode *cur, OSyncError **error) {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, conn, cur, error);
&lt;br&gt;@@ -728,6 +770,9 @@
&lt;br&gt;&amp;nbsp;		} else if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;Resources&amp;quot;)) {
&lt;br&gt;&amp;nbsp;			config-&amp;gt;supported |= OPENSYNC_PLUGIN_CONFIG_RESOURCES;
&lt;br&gt;&amp;nbsp;			ret = _osync_plugin_config_parse_resources(config, cur-&amp;gt;xmlChildrenNode, error);
&lt;br&gt;+		} else if (!xmlStrcmp(cur-&amp;gt;name, (const xmlChar *)&amp;quot;ExternalPlugin&amp;quot;)) {
&lt;br&gt;+			config-&amp;gt;supported |= OPENSYNC_PLUGIN_CONFIG_EXTERNALPLUGIN;
&lt;br&gt;+			ret = _osync_plugin_config_parse_externalplugin(config, cur-&amp;gt;xmlChildrenNode, error);
&lt;br&gt;&amp;nbsp;		} else {
&lt;br&gt;&amp;nbsp;			osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, &amp;quot;Unknown configuration field \&amp;quot;%s\&amp;quot;&amp;quot;, cur-&amp;gt;name);
&lt;br&gt;&amp;nbsp;			goto error;
&lt;br&gt;@@ -824,6 +869,28 @@
&lt;br&gt;&amp;nbsp;	return FALSE;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+static osync_bool _osync_plugin_config_assemble_externalplugin(xmlNode *cur, OSyncPluginExternalPlugin *externalplugin, OSyncError **error)
&lt;br&gt;+{
&lt;br&gt;+	const char *external_command;
&lt;br&gt;+	xmlNode *node = NULL;
&lt;br&gt;+	osync_trace(TRACE_ENTRY, &amp;quot;%s(%p, %p, %p)&amp;quot;, __func__, cur, externalplugin, error);
&lt;br&gt;+
&lt;br&gt;+	node = xmlNewChild(cur, NULL, (xmlChar*)&amp;quot;ExternalPlugin&amp;quot;, NULL);
&lt;br&gt;+	if (!node) {
&lt;br&gt;+		osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;No memory left to assemble configuration.&amp;quot;);
&lt;br&gt;+		goto error;
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	if ((external_command = osync_plugin_externalplugin_get_external_command(externalplugin)))
&lt;br&gt;+		xmlNewChild(node, NULL, (xmlChar*)&amp;quot;ExternalCommand&amp;quot;, (xmlChar*)external_command);
&lt;br&gt;+
&lt;br&gt;+	osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;+	return TRUE;
&lt;br&gt;+ error:
&lt;br&gt;+	osync_trace(TRACE_EXIT_ERROR, &amp;quot;%s: %s&amp;quot;, __func__, osync_error_print(error));
&lt;br&gt;+	return FALSE;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;static osync_bool _osync_plugin_config_assemble_connection(xmlNode *cur, OSyncPluginConnection *conn, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	char *str;
&lt;br&gt;@@ -1308,6 +1375,9 @@
&lt;br&gt;&amp;nbsp;			config-&amp;gt;resources = osync_list_remove(config-&amp;gt;resources, res);
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+		if (config-&amp;gt;externalplugin)
&lt;br&gt;+			osync_plugin_externalplugin_unref(config-&amp;gt;externalplugin);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;		if (config-&amp;gt;schemadir)
&lt;br&gt;&amp;nbsp;			osync_free(config-&amp;gt;schemadir);
&lt;br&gt;&amp;nbsp;			
&lt;br&gt;@@ -1330,6 +1400,7 @@
&lt;br&gt;&amp;nbsp;	OSyncPluginConnection *conn;
&lt;br&gt;&amp;nbsp;	OSyncPluginAuthentication *auth;
&lt;br&gt;&amp;nbsp;	OSyncPluginLocalization *local;
&lt;br&gt;+	OSyncPluginExternalPlugin *externalplugin;
&lt;br&gt;&amp;nbsp;	OSyncList *resources;
&lt;br&gt;&amp;nbsp;	OSyncList *options;
&lt;br&gt;&amp;nbsp;	char *version_str = NULL;
&lt;br&gt;@@ -1382,6 +1453,11 @@
&lt;br&gt;&amp;nbsp;		if (!_osync_plugin_config_assemble_resources(doc-&amp;gt;children, resources, error))
&lt;br&gt;&amp;nbsp;			goto error_and_free;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	/* ExternalPlugin */
&lt;br&gt;+	if ((externalplugin = osync_plugin_config_get_externalplugin(config)))
&lt;br&gt;+		if (!_osync_plugin_config_assemble_externalplugin(doc-&amp;gt;children, externalplugin, error))
&lt;br&gt;+			goto error_and_free;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	xmlSaveFormatFile(path, doc, 1);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	osync_xml_free_doc(doc);
&lt;br&gt;@@ -1567,7 +1643,27 @@
&lt;br&gt;&amp;nbsp;	return NULL;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/* External Plugin */
&lt;br&gt;+OSyncPluginExternalPlugin *osync_plugin_config_get_externalplugin(OSyncPluginConfig *config)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(config);
&lt;br&gt;+	return config-&amp;gt;externalplugin;
&lt;br&gt;+}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+void osync_plugin_config_set_externalplugin(OSyncPluginConfig *config, OSyncPluginExternalPlugin *externalplugin)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(config);
&lt;br&gt;+	
&lt;br&gt;+	if (config-&amp;gt;externalplugin) {
&lt;br&gt;+		osync_plugin_externalplugin_unref(config-&amp;gt;externalplugin);
&lt;br&gt;+		config-&amp;gt;externalplugin = NULL;
&lt;br&gt;+	}
&lt;br&gt;+	
&lt;br&gt;+	if (externalplugin) {
&lt;br&gt;+		config-&amp;gt;externalplugin = osync_plugin_externalplugin_ref(externalplugin);
&lt;br&gt;+	}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;OSyncPluginConnection *osync_plugin_config_get_connection(OSyncPluginConfig *config)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_assert(config);
&lt;br&gt;Index: opensync/plugin/opensync_plugin_config.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/plugin/opensync_plugin_config.h	(revision 5882)
&lt;br&gt;+++ opensync/plugin/opensync_plugin_config.h	(working copy)
&lt;br&gt;@@ -47,7 +47,9 @@
&lt;br&gt;&amp;nbsp;	/** Resources */
&lt;br&gt;&amp;nbsp;	OPENSYNC_PLUGIN_CONFIG_RESOURCES	= (1 &amp;lt;&amp;lt; 3),
&lt;br&gt;&amp;nbsp;	/** Connection options */
&lt;br&gt;-	OPENSYNC_PLUGIN_CONFIG_CONNECTION	= (1 &amp;lt;&amp;lt; 4)
&lt;br&gt;+	OPENSYNC_PLUGIN_CONFIG_CONNECTION	= (1 &amp;lt;&amp;lt; 4),
&lt;br&gt;+	/** External Plugin */
&lt;br&gt;+	OPENSYNC_PLUGIN_CONFIG_EXTERNALPLUGIN	= (1 &amp;lt;&amp;lt; 5)
&lt;br&gt;&amp;nbsp;} OSyncPluginConfigSupportedFlag;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/** @brief Set of OSyncPluginConfigSupportedFlags
&lt;br&gt;@@ -217,6 +219,21 @@
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT void osync_plugin_config_set_connection(OSyncPluginConfig *config, OSyncPluginConnection *connection);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/* External Plugin */
&lt;br&gt;+/**@brief Get the external plugin settings from a config
&lt;br&gt;+ *
&lt;br&gt;+ * @param config An OSyncPluginConfig
&lt;br&gt;+ * @returns an OSyncPluginExternalPlugin with the details of the external plugin or NULL if no external plugin settings configured
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT OSyncPluginExternalPlugin *osync_plugin_config_get_externalplugin(OSyncPluginConfig *config);
&lt;br&gt;+
&lt;br&gt;+/**@brief Set the external plugin configuration
&lt;br&gt;+ *
&lt;br&gt;+ * @param config An OSyncPluginConfig
&lt;br&gt;+ * @param authentication The new external plugin settings as an OSyncPluginExternalPlugin
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT void osync_plugin_config_set_externalplugin(OSyncPluginConfig *config, OSyncPluginExternalPlugin *externalplugin);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/*@}*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#endif /*_OPENSYNC_PLUGIN_CONFIG_H_*/
&lt;br&gt;Index: opensync/CMakeLists.txt
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/CMakeLists.txt	(revision 5882)
&lt;br&gt;+++ opensync/CMakeLists.txt	(working copy)
&lt;br&gt;@@ -60,6 +60,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_info.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_localization.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_plugin_resource.c
&lt;br&gt;+ &amp;nbsp; plugin/opensync_plugin_externalplugin.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; plugin/opensync_objtype_sink.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; version/opensync_version.c
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlformat/opensync_xmlfield.c
&lt;br&gt;Index: opensync/opensync.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/opensync.h	(revision 5882)
&lt;br&gt;+++ opensync/opensync.h	(working copy)
&lt;br&gt;@@ -213,6 +213,7 @@
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginConnection OSyncPluginConnection;
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginLocalization OSyncPluginLocalization;
&lt;br&gt;&amp;nbsp;typedef struct OSyncPluginResource OSyncPluginResource;
&lt;br&gt;+typedef struct OSyncPluginExternalPlugin OSyncPluginExternalPlugin;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/* Engine component */
&lt;br&gt;&amp;nbsp;typedef struct OSyncEngine OSyncEngine;
&lt;br&gt;Index: opensync/engine/opensync_engine.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/engine/opensync_engine.c	(revision 5882)
&lt;br&gt;+++ opensync/engine/opensync_engine.c	(working copy)
&lt;br&gt;@@ -773,7 +773,11 @@
&lt;br&gt;&amp;nbsp;	osync_client_proxy_set_context(proxy, engine-&amp;gt;context);
&lt;br&gt;&amp;nbsp;	osync_client_proxy_set_change_callback(proxy, _osync_engine_receive_change, engine);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	if (!osync_client_proxy_spawn(proxy, osync_plugin_get_start_type(plugin), osync_member_get_configdir(member), error))
&lt;br&gt;+	const char *external_command=NULL;
&lt;br&gt;+	if (osync_plugin_get_start_type(plugin)==OSYNC_START_TYPE_EXTERNAL)
&lt;br&gt;+		external_command=osync_member_get_external_command(member);
&lt;br&gt;+
&lt;br&gt;+	if (!osync_client_proxy_spawn(proxy, osync_plugin_get_start_type(plugin), osync_member_get_configdir(member), external_command, error))
&lt;br&gt;&amp;nbsp;		goto error_free_proxy;
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	engine-&amp;gt;busy = TRUE;
&lt;br&gt;Index: opensync/client/opensync_client.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client.h	(revision 5882)
&lt;br&gt;+++ opensync/client/opensync_client.h	(working copy)
&lt;br&gt;@@ -25,6 +25,29 @@
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT OSyncClient *osync_client_ref(OSyncClient *client);
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT void osync_client_unref(OSyncClient *client);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/** @brief Set the directory from which the client shall load plugins
&lt;br&gt;+ * 
&lt;br&gt;+ * In general, the &amp;quot;overriding_plugin_dir&amp;quot; does not need to be set.
&lt;br&gt;+ * However, if a plugin has start type OSYNC_START_TYPE_EXTERNAL,
&lt;br&gt;+ * and wishes to load a different plugin library in the external process,
&lt;br&gt;+ * but still use the OSyncClient code, then osync_client_set_overriding_plugin_dir
&lt;br&gt;+ * can be called to instruct OpenSync to look for the plugin library
&lt;br&gt;+ * in an alternative location.
&lt;br&gt;+ * 
&lt;br&gt;+ * @param plugin Pointer to the client
&lt;br&gt;+ * @param overriding_plugin_dir The directory from which the client shall load plugins
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT void osync_client_set_overriding_plugin_dir(OSyncClient *client, char *overriding_plugin_dir);
&lt;br&gt;+
&lt;br&gt;+/** @brief Get the directory from which the client will load plugins
&lt;br&gt;+ * 
&lt;br&gt;+ * @param client Pointer to the client
&lt;br&gt;+ * @returns The directory from which the client will load plugins
&lt;br&gt;+ * 
&lt;br&gt;+ */
&lt;br&gt;+OSYNC_EXPORT char *osync_client_get_overriding_plugin_dir(OSyncClient *client);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT osync_bool osync_client_set_incoming_queue(OSyncClient *client, OSyncQueue *incoming, OSyncError **error);
&lt;br&gt;&amp;nbsp;OSYNC_EXPORT osync_bool osync_client_set_outgoing_queue(OSyncClient *client, OSyncQueue *outgoing, OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Index: opensync/client/opensync_client_proxy_internals.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client_proxy_internals.h	(revision 5882)
&lt;br&gt;+++ opensync/client/opensync_client_proxy_internals.h	(working copy)
&lt;br&gt;@@ -44,7 +44,7 @@
&lt;br&gt;&amp;nbsp;void osync_client_proxy_set_change_callback(OSyncClientProxy *proxy, change_cb cb, void *userdata);
&lt;br&gt;&amp;nbsp;OSyncMember *osync_client_proxy_get_member(OSyncClientProxy *proxy);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-OSYNC_TEST_EXPORT osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, OSyncError **error);
&lt;br&gt;+OSYNC_TEST_EXPORT osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, const char* external_command, OSyncError **error);
&lt;br&gt;&amp;nbsp;OSYNC_TEST_EXPORT osync_bool osync_client_proxy_shutdown(OSyncClientProxy *proxy, OSyncError **error);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;OSYNC_TEST_EXPORT osync_bool osync_client_proxy_initialize(OSyncClientProxy *proxy, initialize_cb callback, void *userdata, const char *formatdir, const char *plugindir, const char *plugin, const char *groupname, const char *configdir, OSyncPluginConfig *config, OSyncError **error);
&lt;br&gt;Index: opensync/client/opensync_client_private.h
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client_private.h	(revision 5882)
&lt;br&gt;+++ opensync/client/opensync_client_private.h	(working copy)
&lt;br&gt;@@ -32,6 +32,7 @@
&lt;br&gt;&amp;nbsp;	OSyncPluginInfo *plugin_info;
&lt;br&gt;&amp;nbsp;	OSyncPluginEnv *plugin_env;
&lt;br&gt;&amp;nbsp;	OSyncFormatEnv *format_env;
&lt;br&gt;+	char *overriding_plugin_dir;
&lt;br&gt;&amp;nbsp;	void *plugin_data;
&lt;br&gt;&amp;nbsp;	OSyncThread *thread;
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;Index: opensync/client/opensync_client.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client.c	(revision 5882)
&lt;br&gt;+++ opensync/client/opensync_client.c	(working copy)
&lt;br&gt;@@ -684,7 +684,14 @@
&lt;br&gt;&amp;nbsp;		osync_queue_unref(outgoing);
&lt;br&gt;&amp;nbsp;		osync_trace(TRACE_INTERNAL, &amp;quot;done connecting to engine&amp;quot;);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;-	
&lt;br&gt;+
&lt;br&gt;+	char *overriding_plugin_dir = osync_client_get_overriding_plugin_dir(client);
&lt;br&gt;+	osync_trace(TRACE_INTERNAL, &amp;quot;overriding_plugin_dir=[%s]&amp;quot;, overriding_plugin_dir);
&lt;br&gt;+	if (overriding_plugin_dir) {
&lt;br&gt;+		osync_free(plugindir);
&lt;br&gt;+		plugindir=osync_strdup(overriding_plugin_dir);
&lt;br&gt;+	}	
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	if (!client-&amp;gt;plugin) {
&lt;br&gt;&amp;nbsp;		client-&amp;gt;plugin_env = osync_plugin_env_new(error);
&lt;br&gt;&amp;nbsp;		if (!client-&amp;gt;plugin_env)
&lt;br&gt;@@ -1699,12 +1706,29 @@
&lt;br&gt;&amp;nbsp;		if (client-&amp;gt;thread)
&lt;br&gt;&amp;nbsp;			osync_thread_unref(client-&amp;gt;thread);
&lt;br&gt;&amp;nbsp;		
&lt;br&gt;+		if (client-&amp;gt;overriding_plugin_dir)
&lt;br&gt;+			osync_free(client-&amp;gt;overriding_plugin_dir);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;		osync_free(client);
&lt;br&gt;&amp;nbsp;		
&lt;br&gt;&amp;nbsp;		osync_trace(TRACE_EXIT, &amp;quot;%s&amp;quot;, __func__);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+void osync_client_set_overriding_plugin_dir(OSyncClient *client, char *overriding_plugin_dir)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(client);
&lt;br&gt;+	if (client-&amp;gt;overriding_plugin_dir)
&lt;br&gt;+		osync_free(client-&amp;gt;overriding_plugin_dir);
&lt;br&gt;+	client-&amp;gt;overriding_plugin_dir = osync_strdup(overriding_plugin_dir);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+char *osync_client_get_overriding_plugin_dir(OSyncClient *client)
&lt;br&gt;+{
&lt;br&gt;+	osync_assert(client);
&lt;br&gt;+	return client-&amp;gt;overriding_plugin_dir;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;osync_bool osync_client_set_incoming_queue(OSyncClient *client, OSyncQueue *incoming, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	osync_queue_set_message_handler(incoming, _osync_client_message_handler, client);
&lt;br&gt;Index: opensync/client/opensync_client_proxy.c
&lt;br&gt;===================================================================
&lt;br&gt;--- opensync/client/opensync_client_proxy.c	(revision 5882)
&lt;br&gt;+++ opensync/client/opensync_client_proxy.c	(working copy)
&lt;br&gt;@@ -952,7 +952,7 @@
&lt;br&gt;&amp;nbsp;	return proxy-&amp;gt;member;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, OSyncError **error)
&lt;br&gt;+osync_bool osync_client_proxy_spawn(OSyncClientProxy *proxy, OSyncStartType type, const char *path, const char* external_command, OSyncError **error)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;	OSyncQueue *read1 = NULL;
&lt;br&gt;&amp;nbsp;	OSyncQueue *read2 = NULL;
&lt;br&gt;@@ -1080,6 +1080,22 @@
&lt;br&gt;&amp;nbsp;			goto error;
&lt;br&gt;&amp;nbsp;	} else {
&lt;br&gt;&amp;nbsp;		name = osync_strdup_printf(&amp;quot;%s%cpluginpipe&amp;quot;, path, G_DIR_SEPARATOR);
&lt;br&gt;+	
&lt;br&gt;+		if (external_command) {
&lt;br&gt;+			char *command = osync_strdup_printf(external_command, name);
&lt;br&gt;+			osync_trace(TRACE_INTERNAL, &amp;quot;g_spawn_command_line_async(%s)&amp;quot;, command);
&lt;br&gt;+			GError *gerror = NULL;
&lt;br&gt;+			gboolean f = g_spawn_command_line_async(command, &amp;gerror);
&lt;br&gt;+			if (!f) {
&lt;br&gt;+				osync_error_set(error, OSYNC_ERROR_GENERIC, &amp;quot;Unable to g_spawn_command_line_async(%s): %s&amp;quot;, command, gerror-&amp;gt;message);
&lt;br&gt;+				g_error_free (gerror);
&lt;br&gt;+				osync_free(command);
&lt;br&gt;+				goto error;
&lt;br&gt;+			}
&lt;br&gt;+			osync_free(command);
&lt;br&gt;+		}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;		proxy-&amp;gt;outgoing = osync_queue_new(name, error);
&lt;br&gt;&amp;nbsp;		osync_free(name);
&lt;br&gt;&amp;nbsp;		if (!proxy-&amp;gt;outgoing)
&lt;br&gt;Index: tests/client-tests/check_proxy.c
&lt;br&gt;===================================================================
&lt;br&gt;--- tests/client-tests/check_proxy.c	(revision 5882)
&lt;br&gt;+++ tests/client-tests/check_proxy.c	(working copy)
&lt;br&gt;@@ -39,7 +39,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	fail_unless(osync_client_proxy_shutdown(proxy, &amp;error), NULL);
&lt;br&gt;@@ -110,7 +110,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;@@ -159,7 +159,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;@@ -225,7 +225,7 @@
&lt;br&gt;&amp;nbsp;	fail_unless(proxy != NULL, NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, &amp;error), NULL);
&lt;br&gt;+	fail_unless(osync_client_proxy_spawn(proxy, OSYNC_START_TYPE_THREAD, NULL, NULL, &amp;error), NULL);
&lt;br&gt;&amp;nbsp;	fail_unless(error == NULL, NULL);
&lt;br&gt;&amp;nbsp;	
&lt;br&gt;&amp;nbsp;	OSyncPluginConfig *config = simple_plugin_config(NULL, &amp;quot;data1&amp;quot;, &amp;quot;mockobjtype1&amp;quot;, &amp;quot;mockformat1&amp;quot;, NULL);
&lt;br&gt;&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26133669&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--OSYNC_START_TYPE_EXTERNAL-tp26102126p26133669.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26116760</id>
	<title>Re: [RFC] Different libraries for	OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T09:49:00Z</published>
	<updated>2009-10-29T09:49:00Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Graham Cobb wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thursday 29 October 2009 15:55:40 Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Daniel Gollub wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; And your real &amp;quot;plugin&amp;quot; which is acutally a complete different process -
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; or even an own application is implementing a full OSyncClient and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; OSyncPlugin environment? Completeyl without that get_sync_info() stuff
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I could do that, but it would take a lot of coding to make my own
&lt;br&gt;&amp;gt;&amp;gt; OSyncClient. That's why I simply use the full opensync library. That's
&lt;br&gt;&amp;gt;&amp;gt; only 10 lines of code!
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think that is what I have been trying to suggest (badly) -- thanks for the 
&lt;br&gt;&amp;gt; clarification Daniel.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But, of course, Henrik, you shouldn't have to implement your own OSyncClient. &amp;nbsp;
&lt;br&gt;&amp;gt; What we have to do is to make the client code and plugin support code usable 
&lt;br&gt;&amp;gt; from your process, without bringing in all the rest of OpenSync. &amp;nbsp;That may be 
&lt;br&gt;&amp;gt; harder than it looks because some functions that plugins call may assume the 
&lt;br&gt;&amp;gt; whole OpenSync environment is present.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;Any hints on how to do that would be appreciated!
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26116760&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--Different-libraries-for-OSYNC_START_TYPE_EXTERNAL-tp26081462p26116760.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26116741</id>
	<title>Re: [RFC][PATCH] OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T09:47:35Z</published>
	<updated>2009-10-29T09:47:35Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Graham Cobb wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thursday 29 October 2009 15:48:33 Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; As I wrote in a different thread, I am not sure if my way of
&lt;br&gt;&amp;gt;&amp;gt; implementing the external process is the intended one. I am simply
&lt;br&gt;&amp;gt;&amp;gt; running the same kind of client that would have been running inside
&lt;br&gt;&amp;gt;&amp;gt; osynctool, by calling the same opensync libraries. That means that
&lt;br&gt;&amp;gt;&amp;gt; without osync_client_get_overriding_plugin_dir the opensync library
&lt;br&gt;&amp;gt;&amp;gt; would load the slim mozilla-sync plugin which was intended for
&lt;br&gt;&amp;gt;&amp;gt; osynctool/engine, not the new fat mozilla-sync plugin intended for the
&lt;br&gt;&amp;gt;&amp;gt; external process.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There seem to be two possible solutions:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1) The &amp;quot;thin&amp;quot; plugin could just be replaced with a configuration file. &amp;nbsp;What 
&lt;br&gt;&amp;gt; does OpenSync need to know about external process plugins? &amp;nbsp;Presumably pretty 
&lt;br&gt;&amp;gt; much just the fact that they are external and how to contact them.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Should we add a config file to supply that info? &amp;nbsp;Then opensync would just not 
&lt;br&gt;&amp;gt; attempt to load any plugin for which it had already read a config file.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;Good idea. Daniel, your call!
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2) Or, the fat plugin could not really be a plugin. &amp;nbsp;It could be completely up 
&lt;br&gt;&amp;gt; to the caller of opensync in the external process to have the plugin code 
&lt;br&gt;&amp;gt; loaded (presumably statically linked into the executable) and opensync, when 
&lt;br&gt;&amp;gt; invoked to just create a client, would not load **any** plugins. &amp;nbsp;There would 
&lt;br&gt;&amp;gt; have to be a function to call to register a plugin by passing in the 
&lt;br&gt;&amp;gt; get_plugin_info address.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I **think** this second option was how the original external code worked, but 
&lt;br&gt;&amp;gt; I haven't checked the code so I might be completely wrong.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;Could you point me to where to find &amp;quot;the original external code&amp;quot;?
&lt;br&gt;I have not been able to find any implementation of an external 
&lt;br&gt;process/plugin - except for osplugin.
&lt;br&gt;&amp;gt; I am keen to keep the external client code as minimal as possible. &amp;nbsp;In 
&lt;br&gt;&amp;gt; particular, if we are every going to make IPC and timeout work properly I 
&lt;br&gt;&amp;gt; certainly don't want two full IPC instances communicating -- there are enough 
&lt;br&gt;&amp;gt; queues as it is!
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;I don't think this approach introduces any new queues.
&lt;br&gt;I believe there are two bidirectional queues in any case (engine and 
&lt;br&gt;plugin), it is just a question of whether they are accessed from 
&lt;br&gt;different threads in the same thread of from different processes.
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26116741&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--OSYNC_START_TYPE_EXTERNAL-tp26102126p26116741.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26116499</id>
	<title>Re: [RFC] Different libraries for OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T09:35:39Z</published>
	<updated>2009-10-29T09:35:39Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">On Thursday 29 October 2009 15:55:40 Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; Daniel Gollub wrote:
&lt;br&gt;&amp;gt; &amp;gt; And your real &amp;quot;plugin&amp;quot; which is acutally a complete different process -
&lt;br&gt;&amp;gt; &amp;gt; or even an own application is implementing a full OSyncClient and
&lt;br&gt;&amp;gt; &amp;gt; OSyncPlugin environment? Completeyl without that get_sync_info() stuff
&lt;br&gt;&amp;gt; &amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I could do that, but it would take a lot of coding to make my own
&lt;br&gt;&amp;gt; OSyncClient. That's why I simply use the full opensync library. That's
&lt;br&gt;&amp;gt; only 10 lines of code!
&lt;br&gt;&lt;br&gt;I think that is what I have been trying to suggest (badly) -- thanks for the 
&lt;br&gt;clarification Daniel.
&lt;br&gt;&lt;br&gt;But, of course, Henrik, you shouldn't have to implement your own OSyncClient. &amp;nbsp;
&lt;br&gt;What we have to do is to make the client code and plugin support code usable 
&lt;br&gt;from your process, without bringing in all the rest of OpenSync. &amp;nbsp;That may be 
&lt;br&gt;harder than it looks because some functions that plugins call may assume the 
&lt;br&gt;whole OpenSync environment is present.
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26116499&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--Different-libraries-for-OSYNC_START_TYPE_EXTERNAL-tp26081462p26116499.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26116326</id>
	<title>Re: [RFC][PATCH] OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T09:23:53Z</published>
	<updated>2009-10-29T09:23:53Z</updated>
	<author>
		<name>Graham Cobb-4</name>
	</author>
	<content type="html">On Thursday 29 October 2009 15:48:33 Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; As I wrote in a different thread, I am not sure if my way of
&lt;br&gt;&amp;gt; implementing the external process is the intended one. I am simply
&lt;br&gt;&amp;gt; running the same kind of client that would have been running inside
&lt;br&gt;&amp;gt; osynctool, by calling the same opensync libraries. That means that
&lt;br&gt;&amp;gt; without osync_client_get_overriding_plugin_dir the opensync library
&lt;br&gt;&amp;gt; would load the slim mozilla-sync plugin which was intended for
&lt;br&gt;&amp;gt; osynctool/engine, not the new fat mozilla-sync plugin intended for the
&lt;br&gt;&amp;gt; external process.
&lt;br&gt;&lt;br&gt;There seem to be two possible solutions:
&lt;br&gt;&lt;br&gt;1) The &amp;quot;thin&amp;quot; plugin could just be replaced with a configuration file. &amp;nbsp;What 
&lt;br&gt;does OpenSync need to know about external process plugins? &amp;nbsp;Presumably pretty 
&lt;br&gt;much just the fact that they are external and how to contact them.
&lt;br&gt;&lt;br&gt;Should we add a config file to supply that info? &amp;nbsp;Then opensync would just not 
&lt;br&gt;attempt to load any plugin for which it had already read a config file.
&lt;br&gt;&lt;br&gt;2) Or, the fat plugin could not really be a plugin. &amp;nbsp;It could be completely up 
&lt;br&gt;to the caller of opensync in the external process to have the plugin code 
&lt;br&gt;loaded (presumably statically linked into the executable) and opensync, when 
&lt;br&gt;invoked to just create a client, would not load **any** plugins. &amp;nbsp;There would 
&lt;br&gt;have to be a function to call to register a plugin by passing in the 
&lt;br&gt;get_plugin_info address.
&lt;br&gt;&lt;br&gt;I **think** this second option was how the original external code worked, but 
&lt;br&gt;I haven't checked the code so I might be completely wrong.
&lt;br&gt;&lt;br&gt;I am keen to keep the external client code as minimal as possible. &amp;nbsp;In 
&lt;br&gt;particular, if we are every going to make IPC and timeout work properly I 
&lt;br&gt;certainly don't want two full IPC instances communicating -- there are enough 
&lt;br&gt;queues as it is!
&lt;br&gt;&lt;br&gt;Graham
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26116326&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--OSYNC_START_TYPE_EXTERNAL-tp26102126p26116326.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26115798</id>
	<title>Re: [RFC] Different libraries for OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T08:55:40Z</published>
	<updated>2009-10-29T08:55:40Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Daniel Gollub wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tuesday 27 October 2009 06:07:50 pm Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I am working on porting mozilla-sync to use OSYNC_START_TYPE_EXTERNAL.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Awesome!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; In fact, the engine (e.g. in osynctool) will initialize a proxy, and
&lt;br&gt;&amp;gt;&amp;gt; this proxy will send the name of the plugin and the path to the plugin
&lt;br&gt;&amp;gt;&amp;gt; directory to the external process.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; By &amp;quot;plugin directory&amp;quot; you mean the member directory of the group - right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; E.g. ~/.opensync/groupX/Y/
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is at what the engine uses as argument to spawn for proxy. The function 
&lt;br&gt;&amp;gt; osync_client_proxy_spawn() is then creating two pipes in this member 
&lt;br&gt;&amp;gt; directory: pluginpipe and enginepipe
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;No, I do mean the PLUGIN directory.
&lt;br&gt;static osync_bool _osync_client_handle_initialize(OSyncClient *client, 
&lt;br&gt;OSyncMessage *message, OSyncError **error):
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;enginepipe, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;formatdir, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;plugindir, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;pluginname, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;groupname, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_string(message, &amp;configdir, error);
&lt;br&gt;&amp;nbsp; &amp;nbsp; osync_message_read_int(message, &amp;haspluginconfig, error);
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Why don't you try this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just write a very tiny mozilla-sync which just contains the function 
&lt;br&gt;&amp;gt; &amp;quot;get_sync_info&amp;quot;?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It just registers the plugin and set the start-type to 
&lt;br&gt;&amp;gt; OSYNC_START_TYPE_EXTERNAL.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So this plugin (stub) is not using any mozilla API -&amp;gt; no mozilla dependecies 
&lt;br&gt;&amp;gt; .... Engine doesn't load those libraries.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The plugin stub only does one thing: register the plugin to the OSyncPluginEnv 
&lt;br&gt;&amp;gt; ... and set the name and description of the plugin, as well as that the plugin 
&lt;br&gt;&amp;gt; is an external one and needs to be started via OSYNC_START_TYPE_EXTERNAL ...
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;This is exactly what I did.
&lt;br&gt;&amp;gt; And your real &amp;quot;plugin&amp;quot; which is acutally a complete different process - or 
&lt;br&gt;&amp;gt; even an own application is implementing a full OSyncClient and OSyncPlugin 
&lt;br&gt;&amp;gt; environment? Completeyl without that get_sync_info() stuff ...
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;I could do that, but it would take a lot of coding to make my own 
&lt;br&gt;OSyncClient. That's why I simply use the full opensync library. That's 
&lt;br&gt;only 10 lines of code!
&lt;br&gt;&lt;br&gt;But if you have a proof-of-concept with a full stand-alone OSyncClient 
&lt;br&gt;without to much code, I will certainly have a look!
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26115798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--Different-libraries-for-OSYNC_START_TYPE_EXTERNAL-tp26081462p26115798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26115665</id>
	<title>Re: [RFC][PATCH] OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T08:48:33Z</published>
	<updated>2009-10-29T08:48:33Z</updated>
	<author>
		<name>Henrik /KaarPoSoft-2</name>
	</author>
	<content type="html">Daniel Gollub wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wednesday 28 October 2009 10:04:43 pm Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Please let me know if anybody objects to me checking in the attached
&lt;br&gt;&amp;gt;&amp;gt; combined patch for all the issues I have raised about
&lt;br&gt;&amp;gt;&amp;gt; OSYNC_START_TYPE_EXTERNAL so far.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I like the command_start addition .. this is somethign which was really 
&lt;br&gt;&amp;gt; missing. Could you explain how you use this for mozilla-sync?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Do you start mozilla if it isn't already started? Or do you trigger the sync 
&lt;br&gt;&amp;gt; via an additional command? Or both?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;If you call the &amp;quot;thunderbird&amp;quot; program, it will start a new process if it 
&lt;br&gt;is not already running. I thunderbird is already running, it will simply 
&lt;br&gt;hand off the command line parameters to the already running instance.
&lt;br&gt;&lt;br&gt;The opensync client is triggered by the -mozilla-sync command line 
&lt;br&gt;option which I added to thunderbird.
&lt;br&gt;&lt;br&gt;The sync itself can be triggered by running the engine from osynctool or 
&lt;br&gt;from inside the blueZync plugin to Thunderbird.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm still not convinced why there is need to overwrite the plugindir ... or 
&lt;br&gt;&amp;gt; maybe i didn't understand the problem. Unfortuantely exactly for the new API 
&lt;br&gt;&amp;gt; function to override the path the API documentation is missing why this is 
&lt;br&gt;&amp;gt; needed ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; +OSYNC_EXPORT void osync_client_set_overriding_plugin_dir(OSyncClient *client, 
&lt;br&gt;&amp;gt; char *overriding_plugin_dir);
&lt;br&gt;&amp;gt; +OSYNC_EXPORT char *osync_client_get_overriding_plugin_dir(OSyncClient 
&lt;br&gt;&amp;gt; *client);
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;As I wrote in a different thread, I am not sure if my way of 
&lt;br&gt;implementing the external process is the intended one. I am simply 
&lt;br&gt;running the same kind of client that would have been running inside 
&lt;br&gt;osynctool, by calling the same opensync libraries. That means that 
&lt;br&gt;without osync_client_get_overriding_plugin_dir the opensync library 
&lt;br&gt;would load the slim mozilla-sync plugin which was intended for 
&lt;br&gt;osynctool/engine, not the new fat mozilla-sync plugin intended for the 
&lt;br&gt;external process.
&lt;br&gt;&lt;br&gt;/Henrik
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26115665&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--PATCH--OSYNC_START_TYPE_EXTERNAL-tp26102126p26115665.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26114060</id>
	<title>Re: [RFC] Do not clone-demerge-compare, just compare taking capabilities into account</title>
	<published>2009-10-29T07:22:36Z</published>
	<updated>2009-10-29T07:22:36Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Saturday 24 October 2009 04:13:33 pm Henrik /KaarPoSoft wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Dear all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Following up on a previous thread on this list:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; The current logic in _osync_obj_engine_mapping_find is:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Clone (i.e. make a complete copy of) change1. Demerge fields from the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; clone which are not in caps2.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Clone (i.e. make a complete copy of) change2. Demerge fields from the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; clone which are not in caps1.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Compare the two cloned objects.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; To me this seems unnecessarily complicated and incurs a performance
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;penalty. Why is this not implemented as a more &amp;quot;intelligent&amp;quot; compare
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;function, which takes capabilities into account?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is pretty new code and more or less just a proof of concept. If you
&lt;br&gt;&amp;gt; &amp;gt; came up with a more efficient solution, let me know. This was the last
&lt;br&gt;&amp;gt; &amp;gt; thing i was working on ... it's not completed.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; OK, here is a suggestion:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In &amp;nbsp;_osync_obj_engine_mapping_find in opensync_obj_engine.c we currently
&lt;br&gt;&amp;gt; &amp;nbsp;have something which boils down to:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; clone_change1 =
&lt;br&gt;&amp;gt; &amp;nbsp;_osync_obj_engine_clone_and_demerge_change(sinkengine-&amp;gt;engine, caps2,
&lt;br&gt;&amp;gt; &amp;nbsp;change1, error); clone_change2 =
&lt;br&gt;&amp;gt; &amp;nbsp;_osync_obj_engine_clone_and_demerge_change(sinkengine-&amp;gt;engine, caps1,
&lt;br&gt;&amp;gt; &amp;nbsp;change2, error); change1 = clone_change1;
&lt;br&gt;&amp;gt; change2 = clone_change2;
&lt;br&gt;&amp;gt; tmp_result = osync_change_compare(change1, change2, error);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This could be replaced with
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; tmp_result = osync_change_compare(change1, change2, caps1, caps2, error);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; osync_change_compare and thus osync_data_compare and
&lt;br&gt;&amp;gt; &amp;nbsp;osync_objformat_compare and maybe other functions would require trivial
&lt;br&gt;&amp;gt; &amp;nbsp;changes.
&lt;/div&gt;&lt;/div&gt;Actually i hesistate to make OSyncChange OSyncData more complex ... since you 
&lt;br&gt;could perfeclty use this function without capabilities and stuff like that.
&lt;br&gt;&lt;br&gt;This would als require to break the API.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It would then boil down to modifying functions like osync_objformat_compare
&lt;br&gt;&amp;gt; &amp;nbsp;to take capabilities into account (not trivial).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As far as I can see, this would be a far more efficient solution.
&lt;br&gt;&lt;br&gt;&lt;br&gt;And i don't see the advantage of performance here? You would then end up again 
&lt;br&gt;in calling osync_obj_engine_clone_and_demerge .. .but jsut in a different 
&lt;br&gt;place.
&lt;br&gt;&lt;br&gt;I guess if you want to reduce the numbers of clone and demerges then you need 
&lt;br&gt;to work higher in the stack ... e.g. at the place where 
&lt;br&gt;_osync_obj_engine_clone_and_dmerge gets called today ... and try to demerge 
&lt;br&gt;every change only once and reuse it until a mapping got found.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The drawback is of course that it needs coding work (=time).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, as demerge_xmlformat needs heavy work anyway, I think this may be
&lt;br&gt;&amp;gt; &amp;nbsp;a good time to consider replacing clone-demerge-compare with a compare
&lt;br&gt;&amp;gt; &amp;nbsp;taking capabilities into account.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What do you all think about this proposal?
&lt;br&gt;&lt;br&gt;I guess we should post-pone this ... this is &amp;quot;just&amp;quot; a perforamance 
&lt;br&gt;improvments, which we could still do later without breaking the API. Currently 
&lt;br&gt;we should concentrating in getting things working ASAP, before making them 
&lt;br&gt;fast ... later we can still think about how to make synchronization work with 
&lt;br&gt;O(1) ;)
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /Henrik
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PS: This was about demerge. I have not quite figured merge out, maybe
&lt;br&gt;&amp;gt; &amp;nbsp;somebody more knowledgeable than me could comment on this...
&lt;br&gt;&lt;br&gt;Merge is currently not active (due to API changes, trivial porting required.)
&lt;br&gt;But the merge process is less complex, since you don't have to deal with 
&lt;br&gt;different combination of capabilities and changes/data.
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26114060&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26114060&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26114060/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--Do-not-clone-demerge-compare%2C-just-compare-taking-capabilities-into-account-tp26039378p26114060.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26113932</id>
	<title>Re: [RFC] Using OSYNC_START_TYPE_EXTERNAL</title>
	<published>2009-10-29T07:14:57Z</published>
	<updated>2009-10-29T07:14:57Z</updated>
	<author>
		<name>Daniel Gollub-3</name>
	</author>
	<content type="html">On Sunday 25 October 2009 10:59:55 pm Henrik /KaarPoSoft wrote:
&lt;br&gt;&amp;gt; We could add a function called osync_plugin_set_start_external_command 
&lt;br&gt;&amp;gt; in opensync_plugin to be called from get_sync_info:
&lt;br&gt;&lt;br&gt;Ok, thats pretty cool! This is defenitly missing in OpenSync.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This function could be passed a string in printf format (e.g. 
&lt;br&gt;&amp;gt; &amp;quot;start-external-process %s&amp;quot;), and osync_client_proxy_spawn could call 
&lt;br&gt;&amp;gt; g_strdup_printf with the pipe name as an argument, and execute the 
&lt;br&gt;&amp;gt; resulting command with g_spawn_command_line_async.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I do not know about other external processes, but with blueZync plugin 
&lt;br&gt;&amp;gt; installed, if you launch &amp;quot;thunderbird --mozilla-sync=/path/to/pipe&amp;quot; it 
&lt;br&gt;&amp;gt; will create a new thunderbird instance if one is not already running, 
&lt;br&gt;&amp;gt; otherwise it will connect to the running thunderbird, which is exactly 
&lt;br&gt;&amp;gt; what we need.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Comments on this would be most appreciated.
&lt;/div&gt;&lt;/div&gt;Checked your patch (different thread), looks pretty promosing!
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Daniel Gollub &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Geschaeftsfuehrer: Ralph Dehner
&lt;br&gt;FOSS Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Unternehmenssitz: &amp;nbsp;Vohburg
&lt;br&gt;B1 Systems GmbH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Amtsgericht: &amp;nbsp; &amp;nbsp; &amp;nbsp; Ingolstadt
&lt;br&gt;Mobil: +49-(0)-160 47 73 970 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Handelsregister: &amp;nbsp; HRB 3537
&lt;br&gt;EMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26113932&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gollub@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.b1-systems.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.b1-systems.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
&lt;br&gt;&lt;a href=&quot;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pgpkeys.pca.dfn.de/pks/lookup?op=get&amp;search=0xED14B95C2F8CA78D&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Opensync-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26113932&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Opensync-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/opensync-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/opensync-devel&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26113932/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--Using-OSYNC_START_TYPE_EXTERNAL-tp26052274p26113932.html" />
</entry>

</feed>
