From: Daniel G. <dg...@su...> - 2006-08-09 08:57:36
|
On Wednesday 09 August 2006 10:28, Paul Eggleton wrote: > Ah, perhaps that explains my problems trying to develop the Opie plugin. So > you shouldn't try to pass a structure as change data anymore? I guess thats the reason. You will still be able to pass a struct as change but you need to serialize all pointers of this struct. But the structs of the the opie-sync plugin are very heavy to serialize. The contact_data (in opie_comms.h) for example have more then 40 pointers which have to be serialized. You have to write marshall and demarshall functions for each object type and register them with: (Example from formats/file.c in trunk of libopensync): osync_env_format_set_marshall_func(env, "file", marshall_file); osync_env_format_set_demarshall_func(env, "file", demarshall_file); The de/marshall functions of the formats/file.c are maybe a good reference how this is working. But the file struct only have one pointer not 40 ;) (For further questions/discusson we should maybe move this to opensync-devel) best regards, Daniel |