From: Daniel G. <dg...@su...> - 2008-09-21 13:02:27
|
On Sunday 07 September 2008 19:33:12 Paul Eggleton wrote: > On Sunday 17 August 2008, Daniel Gollub wrote: > > - if you're plugin supports only a single objformat per objtype - just > > hardcode it. The discovery calls will take care that the > > OSyncPluginResource() will contain correct ObjFormat information. > > Make sure your discovery plugin function report all available > > resources! > > When you say "just hardcode it", do you mean in the config file or in code? > If you mean in the code, how is this done exactly? I meant in code. You already have this hardcoded in the opie-sync discovery function: --- static osync_bool opie_sync_discover(void *data, OSyncPluginInfo *info, OSyncError **error) { osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, data, info, error); OpiePluginEnv *env = (OpiePluginEnv *)data; osync_objtype_sink_set_available(env->contact_env->sink, TRUE); osync_objtype_sink_set_available(env->todo_env->sink, TRUE); osync_objtype_sink_set_available(env->event_env->sink, TRUE); osync_objtype_sink_set_available(env->note_env->sink, TRUE); [...] --- Attachted you'll find some tiny porting-patch to use the allocated sink from the engine. best regards, Daniel |