|
From: Daniel G. <go...@b1...> - 2009-10-24 12:49:46
|
On Friday 23 October 2009 08:25:29 pm Henrik /KaarPoSoft wrote:
> 2) Convince OpenSync to talk to this socket, instead of OpenSync's
> normal sub-thread/sub-process
>
>
> I still have only limited knowledge of OpenSync, so I don't know:
> - how to convince OpenSync to talk to the Thunderbird socket, instead of
> to an OpenSync plugin.
> - which messages in which format to send or receive
> - how to do this in Thunderbird
>
OpenSync plugins can be written as a seperated process, which is already
running. E.g. inside Mozilla. And communicate via FIFO
The plugin start-type is called OSYNC_START_TYPE_EXTERNAL - but AFAIK you
still need to use the OpenSync API, for proper communcation via this socket.
The only existing plugin-code running as external i could found is inside some
testcases:
tests/engine-tests/check_engine.c
-----8<-------
debug->plugin = osync_plugin_new(&error);
osync_plugin_set_name(debug->plugin, "mock-sync-foo");
osync_plugin_set_longname(debug->plugin, "Mock Sync Plugin");
osync_plugin_set_description(debug->plugin, "This is a pseudo plugin");
osync_plugin_set_start_type(debug->plugin, OSYNC_START_TYPE_EXTERNAL);
osync_plugin_set_config_type(debug->plugin, OSYNC_PLUGIN_NO_CONFIGURATION);
debug->client1 = osync_client_new(&error);
char *pipe_path = g_strdup_printf("%s/configs/group/1/pluginpipe", testbed);
osync_client_run_external(debug->client1, pipe_path, debug->plugin, &error);
---->8--------
Maybe this helps some how ... if you're interested in give this a try - let me
know. So we can build up a proof of concept up. We need something like that
anyway as reference implementation.
Best Regards,
Daniel
--
Daniel Gollub Geschaeftsfuehrer: Ralph Dehner
FOSS Developer Unternehmenssitz: Vohburg
B1 Systems GmbH Amtsgericht: Ingolstadt
Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537
EMail: go...@b1... http://www.b1-systems.de
Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D
|