|
From: Henrik /K. <he...@ka...> - 2009-10-29 15:55:53
|
Daniel Gollub wrote:
> On Tuesday 27 October 2009 06:07:50 pm Henrik /KaarPoSoft wrote:
> [...]
>
>> I am working on porting mozilla-sync to use OSYNC_START_TYPE_EXTERNAL.
>>
>
> Awesome!
>
> [...]
>
>> In fact, the engine (e.g. in osynctool) will initialize a proxy, and
>> this proxy will send the name of the plugin and the path to the plugin
>> directory to the external process.
>>
>
>
> By "plugin directory" you mean the member directory of the group - right?
>
> E.g. ~/.opensync/groupX/Y/
>
> This is at what the engine uses as argument to spawn for proxy. The function
> osync_client_proxy_spawn() is then creating two pipes in this member
> directory: pluginpipe and enginepipe
>
>
No, I do mean the PLUGIN directory.
static osync_bool _osync_client_handle_initialize(OSyncClient *client,
OSyncMessage *message, OSyncError **error):
osync_message_read_string(message, &enginepipe, error);
osync_message_read_string(message, &formatdir, error);
osync_message_read_string(message, &plugindir, error);
osync_message_read_string(message, &pluginname, error);
osync_message_read_string(message, &groupname, error);
osync_message_read_string(message, &configdir, error);
osync_message_read_int(message, &haspluginconfig, error);
>
> Why don't you try this:
>
> Just write a very tiny mozilla-sync which just contains the function
> "get_sync_info"?
>
> It just registers the plugin and set the start-type to
> OSYNC_START_TYPE_EXTERNAL.
>
> So this plugin (stub) is not using any mozilla API -> no mozilla dependecies
> .... Engine doesn't load those libraries.
>
>
> The plugin stub only does one thing: register the plugin to the OSyncPluginEnv
> ... and set the name and description of the plugin, as well as that the plugin
> is an external one and needs to be started via OSYNC_START_TYPE_EXTERNAL ...
>
This is exactly what I did.
> And your real "plugin" which is acutally a complete different process - or
> even an own application is implementing a full OSyncClient and OSyncPlugin
> environment? Completeyl without that get_sync_info() stuff ...
>
I could do that, but it would take a lot of coding to make my own
OSyncClient. That's why I simply use the full opensync library. That's
only 10 lines of code!
But if you have a proof-of-concept with a full stand-alone OSyncClient
without to much code, I will certainly have a look!
|