Changeset 3406

Show
Ignore:
Timestamp:
07/07/08 11:19:47 (2 months ago)
Author:
dgollub
Message:

Changed signature of osync_plugin_config_file_load() to use a custom
path for schema directory. Removed the internal
_osync_plugin_config_file_load() function.

Adapted check_plugin_config() testcase to API change.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/opensync/plugin/opensync_plugin_config.c

    r3394 r3406  
    547547} 
    548548 
    549 osync_bool _osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, const char *schemadir, OSyncError **error) 
     549osync_bool osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, const char *schemadir, OSyncError **error) 
    550550{ 
    551551        osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p)", __func__, config, __NULLSTR(path), __NULLSTR(schemadir), error); 
     
    908908 
    909909        return config; 
    910 } 
    911  
    912 osync_bool osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, OSyncError **error) 
    913 { 
    914         return _osync_plugin_config_file_load(config, path, NULL, error); 
    915910} 
    916911 
  • trunk/opensync/plugin/opensync_plugin_config.h

    r3394 r3406  
    2626OSYNC_EXPORT OSyncPluginConfig *osync_plugin_config_ref(OSyncPluginConfig *config); 
    2727 
    28 OSYNC_EXPORT osync_bool osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, OSyncError **error); 
     28OSYNC_EXPORT osync_bool osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, const char *schemadir, OSyncError **error); 
    2929OSYNC_EXPORT osync_bool osync_plugin_config_file_save(OSyncPluginConfig *config, const char *path, OSyncError **error); 
    3030 
  • trunk/opensync/plugin/opensync_plugin_config_internals.h

    r3311 r3406  
    4242}; 
    4343 
    44 osync_bool _osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, const char *schemadir, OSyncError **error); 
    45  
    4644#endif /*_OPENSYNC_PLUGIN_CONFIG_INTERNALS_H_*/ 
    4745 
  • trunk/tests/plugin-tests/check_plugin_config.c

    r3393 r3406  
    581581        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    582582        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    583         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     583        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    584584        g_free(config_file); 
    585585 
     
    654654        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    655655        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    656         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     656        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    657657        g_free(config_file); 
    658658 
     
    697697        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    698698        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    699         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     699        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    700700        g_free(config_file); 
    701701 
     
    745745        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    746746        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    747         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     747        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    748748        g_free(config_file); 
    749749 
     
    798798        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    799799        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    800         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     800        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    801801        g_free(config_file); 
    802802 
     
    845845        char *config_file = g_strdup_printf("%s/dummy_config.xml", testbed); 
    846846        fail_unless(osync_plugin_config_file_save(config, config_file, &error), "%s", osync_error_print(&error)); 
    847         fail_unless(_osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
     847        fail_unless(osync_plugin_config_file_load(reloaded_config, config_file, testbed, &error), NULL); 
    848848        g_free(config_file); 
    849849