+2005-10-19 Harish Krishnaswamy <kharish@novell.com>
+
+ Committing for Nathan Owens <pianocomp81@yahoo.com>
+
+ * libecal/e-cal.c: (e_cal_new_system_memos): added backend
+ support for Memos component. Finished implement VJOURNAL support
+ * libecal/e-cal.h: (e_cal_new_system_memos): added prototype
+ * tests/ecal/test-ecal.c: (test_new_system_memos): added memos test
+
2005-10-10 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #266144
return ecal;
}
+ECal *
+e_cal_new_system_memos (void)
+{
+ ECal *ecal;
+ char *uri;
+
+ uri = g_build_filename ("file://", g_get_home_dir (), ".evolution", "memos", "local", "system", NULL);
+ ecal = e_cal_new_from_uri (uri, E_CAL_SOURCE_TYPE_JOURNAL);
+ g_free (uri);
+
+ return ecal;
+}
+
/**
* e_cal_set_auth_func
* @ecal: A calendar client.
} else {
kind = icalcomponent_isa (tmp_icalcomp);
if ((kind == ICAL_VEVENT_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_EVENT) ||
- (kind == ICAL_VTODO_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_TODO)) {
+ (kind == ICAL_VTODO_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_TODO) ||
+ (kind == ICAL_VJOURNAL_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_JOURNAL)) {
*icalcomp = icalcomponent_new_clone (tmp_icalcomp);
} else if (kind == ICAL_VCALENDAR_COMPONENT) {
icalcomponent *subcomp = NULL;
case E_CAL_SOURCE_TYPE_TODO:
return get_sources (sources, "/apps/evolution/tasks/sources", error);
break;
+ case E_CAL_SOURCE_TYPE_JOURNAL:
+ return get_sources (sources, "/apps/evolution/memos/sources", error);
+ break;
default:
/* FIXME Fill in error */
return FALSE;
ECal *e_cal_new_from_uri (const gchar *uri, ECalSourceType type);
ECal *e_cal_new_system_calendar (void);
ECal *e_cal_new_system_tasks (void);
+ECal *e_cal_new_system_memos (void);
void e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data);
}
static char *
+test_new_system_memos()
+{
+ ECal *cal;
+ char *uri;
+ gboolean created;
+
+ cal = e_cal_new_system_memos ();
+ uri = g_build_filename (g_get_home_dir (), ".evolution", "memos", "local", "system", "journal.ics", NULL);
+ created = g_file_test (uri, G_FILE_TEST_EXISTS);
+ g_free (uri);
+
+ mu_assert ("Test creation of default system memos : Failed", created);
+
+ return NULL;
+}
+
+static char *
test_get_free_busy (ECal *client)
{
// TODO uses NULL for users and currently specific to file backend.
mu_run_test (test_new_system_calendar ());
mu_run_test (test_new_system_tasks ());
+ mu_run_test (test_new_system_memos ());
mu_run_test (test_set_uri (client, uri));
mu_run_test (test_get_source (client, uri));
mu_run_test (test_cal_loaded (client));