Changeset 3396

Show
Ignore:
Timestamp:
07/07/08 09:50:45 (1 month ago)
Author:
dgollub
Message:

Updated mock-sync discovery function to latest API changes.
The engine is going to register the available the sinks if they're
provided by OSyncPluginRessource configuration.

mock-sync plugin is special. It will always get the ressource
configuration by the config file - not by any discovery-methods.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tests/mock-plugin/mock_sync.c

    r3373 r3396  
    733733        osync_assert_msg(config, "No OSyncPluginConfig set for mock_discover!"); 
    734734 
     735        /* 
    735736        OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
    736737        osync_assert_msg(config, "No OSyncFormatEnv set for mock_discover!"); 
     738        */ 
    737739 
    738740        OSyncList *r = osync_plugin_config_get_ressources(config); 
     
    741743                OSyncObjTypeSink *sink; 
    742744 
    743                 OSyncList *o = osync_plugin_ressource_get_objformat_sinks(res); 
    744                 for (; o; o = o->next) { 
    745                         OSyncObjFormatSink *format_sink = (OSyncObjFormatSink *) o->data;  
    746                         const char *objformat_str = osync_objformat_sink_get_objformat(format_sink); 
    747                         OSyncObjFormat *objformat = osync_format_env_find_objformat(formatenv, objformat_str); 
    748                         const char *objtype = osync_objformat_get_objtype(objformat); 
    749  
    750                         osync_trace(TRACE_INTERNAL, "objtype: %s\n", objtype); 
    751  
    752                         /* Check for ObjType sink */ 
    753                         if ((sink = osync_plugin_info_find_objtype(info, objtype))) 
    754                                 osync_objtype_sink_set_available(sink, TRUE); 
    755                 } 
     745                const char *objtype = osync_plugin_ressource_get_objtype(res); 
     746                /* Check for ObjType sink */ 
     747                if ((sink = osync_plugin_info_find_objtype(info, objtype))) 
     748                        osync_objtype_sink_set_available(sink, TRUE); 
    756749        } 
    757750