Changeset 3637

Show
Ignore:
Timestamp:
09/05/08 06:27:32 (3 months ago)
Author:
prahal
Message:

Upgrade of the evolution2 plugin to new API for sinks. And fix for long standing segfault
at unload (by use of "dont_free" symbol visible to opensync module loader).

Location:
plugins/evolution2/src
Files:
1 removed
7 modified

Legend:

Unmodified
Added
Removed
  • plugins/evolution2/src/evo2-sync

    r2815 r3637  
    11<?xml version="1.0"?> 
    2 <config> 
    3   <address_path>default</address_path> 
    4   <calendar_path>default</calendar_path> 
    5   <memos_path>default</memos_path> 
    6   <tasks_path>default</tasks_path> 
     2<config version="1.0"> 
     3  <Resources> 
     4    <Resource> 
     5      <Enabled>1</Enabled> 
     6      <Formats> 
     7        <Format> 
     8          <Config>VCARD_EXTENSION=Evolution</Config> 
     9          <Name>vcard21</Name> 
     10        </Format> 
     11        <Format> 
     12          <Config>VCARD_EXTENSION=Evolution</Config> 
     13          <Name>vcard30</Name> 
     14        </Format> 
     15      </Formats> 
     16      <ObjType>contact</ObjType> 
     17      <Url>default</Url>  
     18    </Resource> 
     19    <Resource> 
     20      <Enabled>1</Enabled> 
     21      <Formats> 
     22        <Format> 
     23          <Name>vevent20</Name> 
     24        </Format> 
     25      </Formats> 
     26      <ObjType>event</ObjType> 
     27      <Url>default</Url>  
     28    </Resource> 
     29    <Resource> 
     30      <Enabled>1</Enabled> 
     31      <Formats> 
     32        <Format> 
     33          <Name>vtodo20</Name> 
     34        </Format> 
     35      </Formats> 
     36      <ObjType>todo</ObjType> 
     37      <Url>default</Url>  
     38    </Resource> 
     39    <Resource> 
     40      <Enabled>1</Enabled> 
     41      <Formats> 
     42        <Format> 
     43          <Name>vjournal</Name> 
     44        </Format> 
     45      </Formats> 
     46      <ObjType>note</ObjType> 
     47      <Url>default</Url>  
     48    </Resource> 
     49  </Resources> 
    750</config> 
  • plugins/evolution2/src/evolution2_ebook.c

    r3082 r3637  
    4343                } 
    4444                 
    45                 if (!(source = evo2_find_source(sources, env->addressbook_path))) { 
     45                if (!(source = evo2_find_source(sources, g_strdup(env->addressbook_path)))) { 
    4646                        osync_error_set(&error, OSYNC_ERROR_GENERIC, "Error finding source \"%s\"", env->addressbook_path); 
    4747                        goto error; 
     
    302302} 
    303303 
     304 
    304305osync_bool evo2_ebook_initialize(OSyncEvoEnv *env, OSyncPluginInfo *info, OSyncError **error) 
    305306{ 
    306         OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
    307         env->contact_format = osync_format_env_find_objformat(formatenv, "vcard30"); 
    308         if (!env->contact_format) { 
    309                 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find vcard30 object format. vformat plugin installed?"); 
     307        OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, "contact"); 
     308        if (!sink) 
    310309                return FALSE; 
    311         } 
    312         osync_objformat_set_config(env->contact_format, "VCARD_EXTENSION=Evolution"); 
    313          
    314          
    315         env->contact_sink = osync_objtype_sink_new("contact", error); 
    316         if (!env->contact_sink) 
     310        osync_bool sinkEnabled = osync_objtype_sink_is_enabled(sink); 
     311        osync_trace(TRACE_INTERNAL, "%s: enabled => %d", __func__, sinkEnabled); 
     312        if (!sinkEnabled) 
    317313                return FALSE; 
    318314         
    319         osync_objtype_sink_add_objformat_with_config(env->contact_sink, "vcard30", "VCARD_EXTENSION=Evolution"); 
    320         osync_objtype_sink_add_objformat_with_config(env->contact_sink, "vcard21", "VCARD_EXTENSION=Evolution"); 
    321          
    322         /* All sinks have the same functions of course */ 
    323315        OSyncObjTypeSinkFunctions functions; 
    324316        memset(&functions, 0, sizeof(functions)); 
     
    328320        functions.commit = evo2_ebook_modify; 
    329321        functions.sync_done = evo2_ebook_sync_done; 
    330          
    331         /* We pass the OSyncFileDir object to the sink, so we dont have to look it up 
    332          * again once the functions are called */ 
    333         osync_objtype_sink_set_functions(env->contact_sink, functions, NULL); 
    334         osync_plugin_info_add_objtype(info, env->contact_sink); 
     322 
     323        OSyncPluginConfig *config = osync_plugin_info_get_config(info); 
     324        OSyncPluginResource *resource = osync_plugin_config_find_active_resource(config, "contact"); 
     325        env->addressbook_path = osync_plugin_resource_get_url(resource); 
     326        if(!env->addressbook_path) { 
     327                osync_error_set(error,OSYNC_ERROR_GENERIC, "Addressbook url not set"); 
     328                return FALSE; 
     329        } 
     330        OSyncList *objformatsinks = osync_plugin_resource_get_objformat_sinks(resource); 
     331        osync_bool hasObjFormat = FALSE; 
     332        OSyncList *r; 
     333        for(r = objformatsinks;r;r = r->next) { 
     334                OSyncObjFormatSink *objformatsink = r->data; 
     335                if(!strcmp("vcard30", osync_objformat_sink_get_objformat(objformatsink))) { hasObjFormat = TRUE; break;} 
     336        } 
     337        if (!hasObjFormat) { 
     338                osync_error_set(error, OSYNC_ERROR_GENERIC, "Format vcard30 not set."); 
     339                return FALSE; 
     340        } 
     341 
     342        OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
     343        env->contact_format = osync_format_env_find_objformat(formatenv, "vcard30"); 
     344 
     345        env->contact_sink = sink; 
     346 
     347        osync_objtype_sink_set_functions(sink, functions, NULL); 
    335348        return TRUE; 
    336349} 
     350 
  • plugins/evolution2/src/evolution2_ecal.c

    r2340 r3637  
    4343                } 
    4444                 
    45                 if (!(source = evo2_find_source(sources, env->calendar_path))) { 
     45                if (!(source = evo2_find_source(sources, g_strdup(env->calendar_path)))) { 
    4646                        osync_error_set(&error, OSYNC_ERROR_GENERIC, "Error finding source \"%s\"", env->calendar_path); 
    4747                        goto error; 
     
    311311osync_bool evo2_ecal_initialize(OSyncEvoEnv *env, OSyncPluginInfo *info, OSyncError **error) 
    312312{ 
    313         OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
    314         env->calendar_format = osync_format_env_find_objformat(formatenv, "vevent20"); 
    315  
    316         if (!env->calendar_format) { 
    317                 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find vevent20 object format. vformat plugin installed?"); 
     313        OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, "event"); 
     314        if (!sink) 
    318315                return FALSE; 
    319         } 
    320  
    321  
    322         env->calendar_sink = osync_objtype_sink_new("event", error); 
    323         if (!env->calendar_sink){ 
    324                 printf("calendar sink failed to initialize\n"); 
     316        osync_bool sinkEnabled = osync_objtype_sink_is_enabled(sink); 
     317        osync_trace(TRACE_INTERNAL, "%s: enabled => %d", __func__, sinkEnabled); 
     318        if (!sinkEnabled) 
    325319                return FALSE; 
    326         } 
    327  
    328         osync_objtype_sink_add_objformat(env->calendar_sink, "vevent20"); 
    329  
    330         /* All sinks have the same functions of course */ 
     320 
    331321        OSyncObjTypeSinkFunctions functions; 
    332322        memset(&functions, 0, sizeof(functions)); 
     
    337327        functions.sync_done = evo2_ecal_sync_done; 
    338328 
    339         /* We pass the OSyncFileDir object to the sink, so we dont have to look it up 
    340          * again once the functions are called */ 
     329        OSyncPluginConfig *config = osync_plugin_info_get_config(info); 
     330        OSyncPluginResource *resource = osync_plugin_config_find_active_resource(config, "event"); 
     331        env->calendar_path = osync_plugin_resource_get_url(resource); 
     332        if(!env->calendar_path) { 
     333                osync_error_set(error,OSYNC_ERROR_GENERIC, "Calendar url not set"); 
     334                return FALSE; 
     335        } 
     336        OSyncList *objformatsinks = osync_plugin_resource_get_objformat_sinks(resource); 
     337        osync_bool hasObjFormat = FALSE; 
     338        OSyncList *r; 
     339        for(r = objformatsinks;r;r = r->next) { 
     340                OSyncObjFormatSink *objformatsink = r->data; 
     341                if(!strcmp("vevent20", osync_objformat_sink_get_objformat(objformatsink))) { hasObjFormat = TRUE; break;} 
     342        } 
     343        if (!hasObjFormat) { 
     344                osync_error_set(error, OSYNC_ERROR_GENERIC, "Format vevent20 not set."); 
     345                return FALSE; 
     346        } 
     347 
     348        OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
     349        env->calendar_format = osync_format_env_find_objformat(formatenv, "vevent20"); 
     350 
     351        env->calendar_sink = sink; 
     352 
    341353        osync_objtype_sink_set_functions(env->calendar_sink, functions, NULL); 
    342         osync_plugin_info_add_objtype(info, env->calendar_sink); 
    343354        return TRUE; 
    344355} 
  • plugins/evolution2/src/evolution2_etodo.c

    r2340 r3637  
    4343                } 
    4444                 
    45                 if (!(source = evo2_find_source(sources, env->tasks_path))) { 
     45                if (!(source = evo2_find_source(sources, g_strdup(env->tasks_path)))) { 
    4646                        osync_error_set(&error, OSYNC_ERROR_GENERIC, "Error finding source \"%s\"", env->tasks_path); 
    4747                        goto error; 
     
    311311osync_bool evo2_etodo_initialize(OSyncEvoEnv *env, OSyncPluginInfo *info, OSyncError **error) 
    312312{ 
    313         OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
    314         env->tasks_format = osync_format_env_find_objformat(formatenv, "vtodo20"); 
    315  
    316         if (!env->tasks_format) { 
    317                 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find vtodo20 object format. vformat plugin installed?"); 
     313        OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, "todo"); 
     314        if (!sink) 
    318315                return FALSE; 
    319         } 
    320  
    321  
    322         env->tasks_sink = osync_objtype_sink_new("todo", error); 
    323         if (!env->tasks_sink){ 
    324                 printf("tasks sink failed to initialize\n"); 
     316        osync_bool sinkEnabled = osync_objtype_sink_is_enabled(sink); 
     317        osync_trace(TRACE_INTERNAL, "%s: enabled => %d", __func__, sinkEnabled); 
     318        if (!sinkEnabled) 
    325319                return FALSE; 
    326         } 
    327  
    328         osync_objtype_sink_add_objformat(env->tasks_sink, "vtodo20"); 
    329  
    330         /* All sinks have the same functions of course */ 
     320 
    331321        OSyncObjTypeSinkFunctions functions; 
    332322        memset(&functions, 0, sizeof(functions)); 
     
    337327        functions.sync_done = evo2_etodo_sync_done; 
    338328 
    339         /* We pass the OSyncFileDir object to the sink, so we dont have to look it up 
    340          * again once the functions are called */ 
     329        OSyncPluginConfig *config = osync_plugin_info_get_config(info); 
     330        OSyncPluginResource *resource = osync_plugin_config_find_active_resource(config, "todo"); 
     331        env->tasks_path = osync_plugin_resource_get_url(resource); 
     332        if(!env->tasks_path) { 
     333                osync_error_set(error,OSYNC_ERROR_GENERIC, "Tasks url not set"); 
     334                return FALSE; 
     335        } 
     336        OSyncList *objformatsinks = osync_plugin_resource_get_objformat_sinks(resource); 
     337        osync_bool hasObjFormat = FALSE; 
     338        OSyncList *r; 
     339        for(r = objformatsinks;r;r = r->next) { 
     340                OSyncObjFormatSink *objformatsink = r->data; 
     341                if(!strcmp("vtodo20", osync_objformat_sink_get_objformat(objformatsink))) { hasObjFormat = TRUE; break;} 
     342        } 
     343        if (!hasObjFormat) { 
     344                osync_error_set(error, OSYNC_ERROR_GENERIC, "Format vtodo20 not set."); 
     345                return FALSE; 
     346        } 
     347 
     348        OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
     349        env->tasks_format = osync_format_env_find_objformat(formatenv, "vtodo20"); 
     350 
     351        env->tasks_sink = sink; 
     352 
    341353        osync_objtype_sink_set_functions(env->tasks_sink, functions, NULL); 
    342         osync_plugin_info_add_objtype(info, env->tasks_sink); 
    343354        return TRUE; 
    344355} 
  • plugins/evolution2/src/evolution2_memo.c

    r2794 r3637  
    4343                } 
    4444                 
    45                 if (!(source = evo2_find_source(sources, env->memos_path))) { 
     45                if (!(source = evo2_find_source(sources, g_strdup(env->memos_path)))) { 
    4646                        osync_error_set(&error, OSYNC_ERROR_GENERIC, "Error finding source \"%s\"", env->memos_path); 
    4747                        goto error; 
     
    311311osync_bool evo2_memo_initialize(OSyncEvoEnv *env, OSyncPluginInfo *info, OSyncError **error) 
    312312{ 
    313         OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
    314         env->memos_format = osync_format_env_find_objformat(formatenv, "vjournal"); 
    315  
    316         if (!env->memos_format) { 
    317                 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find vjournal object format. vformat plugin installed?"); 
     313        OSyncObjTypeSink *sink = osync_plugin_info_find_objtype(info, "note"); 
     314        if (!sink) 
    318315                return FALSE; 
    319         } 
    320  
    321  
    322         env->memos_sink = osync_objtype_sink_new("note", error); 
    323         if (!env->memos_sink){ 
    324                 printf("memos sink failed to initialize\n"); 
     316        osync_bool sinkEnabled = osync_objtype_sink_is_enabled(sink); 
     317        osync_trace(TRACE_INTERNAL, "%s: enabled => %d", __func__, sinkEnabled); 
     318        if (!sinkEnabled) 
    325319                return FALSE; 
    326         } 
    327  
    328         osync_objtype_sink_add_objformat(env->memos_sink, "vjournal"); 
    329  
    330         /* All sinks have the same functions of course */ 
     320 
    331321        OSyncObjTypeSinkFunctions functions; 
    332322        memset(&functions, 0, sizeof(functions)); 
     
    337327        functions.sync_done = evo2_memo_sync_done; 
    338328 
    339         /* We pass the OSyncFileDir object to the sink, so we dont have to look it up 
    340          * again once the functions are called */ 
     329        OSyncPluginConfig *config = osync_plugin_info_get_config(info); 
     330        OSyncPluginResource *resource = osync_plugin_config_find_active_resource(config, "note"); 
     331        env->memos_path = osync_plugin_resource_get_url(resource); 
     332        if(!env->memos_path) { 
     333                osync_error_set(error,OSYNC_ERROR_GENERIC, "Memo url not set"); 
     334                return FALSE; 
     335        } 
     336        OSyncList *objformatsinks = osync_plugin_resource_get_objformat_sinks(resource); 
     337        osync_bool hasObjFormat = FALSE; 
     338        OSyncList *r; 
     339        for(r = objformatsinks;r;r = r->next) { 
     340                OSyncObjFormatSink *objformatsink = r->data; 
     341                if(!strcmp("vjournal", osync_objformat_sink_get_objformat(objformatsink))) { hasObjFormat = TRUE; break;} 
     342        } 
     343        if (!hasObjFormat) { 
     344                osync_error_set(error, OSYNC_ERROR_GENERIC, "Format vjournal not set."); 
     345                return FALSE; 
     346        } 
     347 
     348        OSyncFormatEnv *formatenv = osync_plugin_info_get_format_env(info); 
     349        env->memos_format = osync_format_env_find_objformat(formatenv, "vjournal"); 
     350 
     351        env->memos_sink = sink; 
     352 
    341353        osync_objtype_sink_set_functions(env->memos_sink, functions, NULL); 
    342         osync_plugin_info_add_objtype(info, env->memos_sink); 
    343354        return TRUE; 
    344355} 
  • plugins/evolution2/src/evolution2_sync.c

    r2952 r3637  
    2424static void free_env(OSyncEvoEnv *env) 
    2525{ 
    26         if (env->addressbook_path) 
    27                 g_free(env->addressbook_path); 
    28                  
    29         if (env->calendar_path) 
    30                 g_free(env->calendar_path); 
    31                  
    32         if (env->tasks_path) 
    33                 g_free(env->tasks_path); 
    34  
    3526        if (env->contact_sink) 
    3627                osync_objtype_sink_unref(env->contact_sink); 
     
    197188} 
    198189 
    199 /*Load the state from a xml file and return it in the conn struct*/ 
    200 static osync_bool evo2_parse_settings(OSyncEvoEnv *env, const char *data, OSyncError **error) 
    201 { 
    202         xmlDocPtr doc; 
    203         xmlNodePtr cur; 
    204  
    205         //set defaults 
    206         env->addressbook_path = NULL; 
    207         env->calendar_path = NULL; 
    208         env->memos_path = NULL; 
    209         env->tasks_path = NULL; 
    210  
    211         doc = xmlParseMemory(data, strlen(data)); 
    212  
    213         if (!doc)  
    214                 return FALSE; 
    215          
    216  
    217         cur = xmlDocGetRootElement(doc); 
    218  
    219         if (!cur) { 
    220                 xmlFreeDoc(doc); 
    221                 return FALSE; 
    222         } 
    223  
    224         if (xmlStrcmp(cur->name, (xmlChar*)"config")) { 
    225                 xmlFreeDoc(doc); 
    226                 return FALSE; 
    227         } 
    228  
    229         cur = cur->xmlChildrenNode; 
    230  
    231         while (cur != NULL) { 
    232                 char *str = (char*)xmlNodeGetContent(cur); 
    233                 if (str) { 
    234                         if (!xmlStrcmp(cur->name, (const xmlChar *)"address_path")) { 
    235                                 env->addressbook_path = g_strdup(str); 
    236                         } 
    237                         if (!xmlStrcmp(cur->name, (const xmlChar *)"calendar_path")) { 
    238                                 env->calendar_path = g_strdup(str); 
    239                         } 
    240                         if (!xmlStrcmp(cur->name, (const xmlChar *)"memos_path")) { 
    241                                 env->memos_path = g_strdup(str);         
    242                         } 
    243                         if (!xmlStrcmp(cur->name, (const xmlChar *)"tasks_path")) { 
    244                                 env->tasks_path = g_strdup(str);         
    245                         } 
    246                         xmlFree(str); 
    247                 } 
    248                 cur = cur->next; 
    249         } 
    250  
    251         xmlFreeDoc(doc); 
    252         return TRUE; 
    253 } 
    254  
    255190/* In initialize, we get the config for the plugin. Here we also must register 
    256191 * all _possible_ objtype sinks. */ 
     
    262197        if (!env) 
    263198                goto error; 
     199 
     200        env->pluginInfo = info; 
    264201                 
    265202        osync_trace(TRACE_INTERNAL, "Setting change id: %s", osync_plugin_info_get_groupname(info)); 
     
    267204        env->change_id = g_strdup(osync_plugin_info_get_groupname(info)); 
    268205         
    269         osync_trace(TRACE_INTERNAL, "The config: %s", osync_plugin_info_get_config(info)); 
    270          
    271         if (!evo2_parse_settings(env, osync_plugin_info_get_config(info), error)) 
    272                 goto error_free_env; 
     206        osync_trace(TRACE_INTERNAL, "The config: %p", osync_plugin_info_get_config(info)); 
    273207         
    274208        if (!evo2_ebook_initialize(env, info, error)) 
    275209                goto error_free_env; 
    276          
     210 
    277211        if (!evo2_ecal_initialize(env, info, error)) 
    278212                goto error_free_env; 
     
    299233        OSyncEvoEnv *env = data; 
    300234 
    301         if (env->contact_sink) 
    302                 osync_objtype_sink_unref(env->contact_sink); 
    303  
    304         if (env->calendar_sink) 
    305                 osync_objtype_sink_unref(env->calendar_sink); 
    306  
    307         if (env->memos_sink) 
    308                 osync_objtype_sink_unref(env->memos_sink); 
    309  
    310         if (env->tasks_sink) 
    311                 osync_objtype_sink_unref(env->tasks_sink); 
    312  
     235        /* cleanup OpenSync stuff */ 
     236        if (env->pluginInfo) { 
     237                osync_plugin_info_unref(env->pluginInfo); 
     238                env->pluginInfo = NULL; 
     239        } 
     240        osync_trace(TRACE_INTERNAL, "%s - plugin info cleaned", __func__); 
     241 
     242        /* Final cleanup */ 
    313243        free_env(env); 
    314244        osync_trace(TRACE_EXIT, "%s", __func__); 
     
    321251        osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, data, info, error); 
    322252         
     253/* 
    323254        GError* gerror = NULL; 
    324255        GList* fields = NULL; 
    325256        OSyncEvoEnv *env = (OSyncEvoEnv *)data; 
    326          
    327         if (env->addressbook_path) 
    328                 osync_objtype_sink_set_available(env->contact_sink, TRUE); 
    329          
    330         if (env->calendar_path) 
    331                 osync_objtype_sink_set_available(env->calendar_sink, TRUE); 
    332          
    333         if (env->memos_path) 
    334                 osync_objtype_sink_set_available(env->memos_sink, TRUE); 
    335          
    336         if (env->tasks_path) 
    337                 osync_objtype_sink_set_available(env->tasks_sink, TRUE); 
    338          
     257*/       
     258        int i, numobjs = osync_plugin_info_num_objtypes(info); 
     259        for (i = 0; i < numobjs; i++) { 
     260                OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, i); 
     261                g_assert(sink); 
     262 
     263                osync_objtype_sink_set_available(sink, TRUE); 
     264        } 
     265 
    339266        OSyncVersion *version = osync_version_new(error); 
    340267        osync_version_set_plugin(version, "Evolution"); 
     
    382309        return TRUE; 
    383310 
     311/* 
    384312error_free_book: 
    385313                g_object_unref(env->addressbook); 
     314*/ 
    386315error: 
    387316        osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(error)); 
     
    398327        osync_plugin_set_longname(plugin, "Evolution 2.x"); 
    399328        osync_plugin_set_description(plugin, "Address book, calendar and task list of Evolution 2"); 
    400         osync_plugin_set_config_type(plugin, OSYNC_PLUGIN_OPTIONAL_CONFIGURATION); 
    401         /** 
    402          * Bug 477227 – libebook isn't designed to be loaded and unloaded 
    403          * see: http://bugzilla.gnome.org/show_bug.cgi?id=477227 
    404          * see: http://mail.gnome.org/archives/evolution-hackers/2007-September/msg00027.html 
    405          * also the other EDS client libraries; so we start the plugin in a own process. 
    406          */ 
    407         osync_plugin_set_start_type(plugin, OSYNC_START_TYPE_PROCESS); 
    408329         
    409330        osync_plugin_set_initialize(plugin, evo2_initialize); 
     
    426347        return 1; 
    427348} 
     349 
     350/** 
     351 * Bug 477227 – libebook isn't designed to be loaded and unloaded 
     352 * see: http://bugzilla.gnome.org/show_bug.cgi?id=477227 
     353 * see: http://mail.gnome.org/archives/evolution-hackers/2007-September/msg00027.html 
     354 * also the other EDS client libraries; so prevent unloading this module as the api provides  
     355 * this facility which is the same as would be the g_module_make_resident that is : 
     356 * "Any future g_module_close() calls on the module will be ignored.". 
     357 */ 
     358int dont_free(void) 
     359{ 
     360        return 1; 
     361} 
  • plugins/evolution2/src/evolution2_sync.h

    r2794 r3637  
    3434        char *change_id; 
    3535         
    36         char *addressbook_path; 
     36        const char *addressbook_path; 
    3737        EBook *addressbook; 
    3838        OSyncObjTypeSink *contact_sink; 
    3939        OSyncObjFormat *contact_format; 
    4040         
    41         char *calendar_path; 
     41        const char *calendar_path; 
    4242        ECal *calendar; 
    4343        OSyncObjTypeSink *calendar_sink; 
    4444        OSyncObjFormat *calendar_format; 
    4545         
    46         char *memos_path; 
     46        const char *memos_path; 
    4747        ECal *memos; 
    4848        OSyncObjTypeSink *memos_sink; 
    4949        OSyncObjFormat *memos_format; 
    5050         
    51         char *tasks_path; 
     51        const char *tasks_path; 
    5252        ECal *tasks; 
    5353        OSyncObjTypeSink *tasks_sink; 
    5454        OSyncObjFormat *tasks_format; 
    55          
     55 
     56        OSyncPluginInfo *pluginInfo;     
    5657} OSyncEvoEnv; 
    5758