5 // Some versions of libical use a ring buffer for the following
6 // functions, for which the library manages memory. Somewhere along
7 // the line, this was fixed so that the application was responsible
8 // for freeing the strings returned by these functions. A warning
9 // was added to the header that would display if HANDLE_LIBICAL_MEMORY
12 // Even newer versions of evolution-data-server, which this plugin
13 // depends on, get rid of some of these functions, while newer
14 // versions of libical add _r variants that implement the
15 // application-free functinality.
17 // Since this plugin does not use these functions, we disable the
18 // warning by defining HANDLE_LIBICAL_MEMORY, then include the
19 // headers, and then purposely break the troublesome functions
20 // so that if a programmer tries to use them later on, he'll know
21 // to handle them with care.
23 #define HANDLE_LIBICAL_MEMORY 1
25 #include <opensync/opensync.h>
27 #include <libecal/e-cal.h>
28 #include <libebook/e-book.h>
29 #include <libedataserver/e-data-server-util.h>
31 #define icalreqstattype_as_string() See_evolution2_sync_h_for_note
32 #define icalproperty_as_ical_string() See_evolution2_sync_h_for_note
33 #define icalproperty_get_parameter_as_string() See_evolution2_sync_h_for_note
34 #define icalproperty_get_value_as_string() See_evolution2_sync_h_for_note
35 #define icallangbind_property_eval_string() See_evolution2_sync_h_for_note
36 #define icalperiodtype_as_ical_string() See_evolution2_sync_h_for_note
37 #define icaltime_as_ical_string() See_evolution2_sync_h_for_note
38 #define icalvalue_as_ical_string() See_evolution2_sync_h_for_note
39 #define icalcomponent_as_ical_string() See_evolution2_sync_h_for_note
40 #define e_cal_component_get_recurid_as_string() See_evolution2_sync_h_for_note
43 #define STR_URI_KEY "uri_"
46 typedef struct OSyncEvoCalendar
{
50 const char *change_id
;
51 ECalSourceType source_type
;
52 icalcomponent_kind ical_component
;
54 OSyncObjTypeSink
*sink
;
55 OSyncObjFormat
*format
;
58 typedef struct OSyncEvoEnv
{
61 const char *addressbook_path
;
63 OSyncObjTypeSink
*contact_sink
;
64 OSyncObjFormat
*contact_format
;
68 OSyncPluginInfo
*pluginInfo
;
71 ESource
*evo2_find_source(ESourceList
*list
, const char *uri
);