Dear all,
I have created a kind of "proof-of-concept" for porting mozilla-sync to
use OSYNC_START_TYPE_EXTERNAL.
I post my approach here both to get the comments of the community, and
in the hope that it may help others.
What I did was actually quite simple, after all:
(1)
In get_sync_info I added
osync_plugin_set_start_type(pOSyncPlugin, OSYNC_START_TYPE_EXTERNAL);
(2)
In the plugin for Thunderbird (i.e *not* mozilla-sync, but the one that
runs inside Thunderbird) I added the necessary woodo to start up a new
thread to listen on the plugin pipe.
(3)
I stole the code from osplugin.c and the thread is simply doing this:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
OSyncError *error = NULL;
OSyncQueue *incoming = NULL;
OSyncQueue *outgoing = NULL;
OSyncClient *client = NULL;
client = osync_client_new(&error);
if (!client)
goto done;
/* Create connection pipes **/
incoming = osync_queue_new(pbz->mySzPathToPipe, &error);
if (!incoming)
goto error;
if (!osync_queue_create(incoming, &error))
goto error;
/* We now connect to our incoming queue */
if (!osync_queue_connect(incoming, OSYNC_QUEUE_RECEIVER, &error))
goto error;
if (!osync_client_set_incoming_queue(client, incoming, &error))
goto error;
osync_queue_unref(incoming);
osync_client_run_and_block(client);
osync_client_unref(client);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
As you may have seen in my other mails, there are still a couple of
outstanding issues.
/Henrik
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel