aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-db.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal-backend-db.c')
-rw-r--r--calendar/pcs/cal-backend-db.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/calendar/pcs/cal-backend-db.c b/calendar/pcs/cal-backend-db.c
index fca87bd9ab..d4773760f8 100644
--- a/calendar/pcs/cal-backend-db.c
+++ b/calendar/pcs/cal-backend-db.c
@@ -67,6 +67,7 @@ static void cal_backend_db_add_cal (CalBackend *backend, Cal *cal);
static CalBackendOpenStatus cal_backend_db_open (CalBackend *backend,
GnomeVFSURI *uri,
gboolean only_if_exists);
+static gboolean cal_backend_db_is_loaded (CalBackend *backend);
static int cal_backend_db_get_n_objects (CalBackend *backend, CalObjType type);
static char *cal_backend_db_get_object (CalBackend *backend, const char *uid);
@@ -150,6 +151,7 @@ cal_backend_db_class_init (CalBackendDBClass *klass)
backend_class->get_uri = cal_backend_db_get_uri;
backend_class->add_cal = cal_backend_db_add_cal;
backend_class->open = cal_backend_db_open;
+ backend_class->is_loaded = cal_backend_db_is_loaded;
backend_class->get_n_objects = cal_backend_db_get_n_objects;
backend_class->get_object = cal_backend_db_get_object;
backend_class->get_type_by_uid = cal_backend_db_get_type_by_uid;
@@ -589,6 +591,17 @@ cal_backend_db_open (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exi
return CAL_BACKEND_OPEN_SUCCESS;
}
+/* is_loaded handler for the DB backend */
+static gboolean
+cal_backend_db_is_loaded (CalBackend *backend)
+{
+ CalBackendDB *cbdb;
+
+ cbdb = CAL_BACKEND_DB (backend);
+
+ return (cbdb->priv->uri != NULL);
+}
+
/* get_n_objects handler for the DB backend */
static int
cal_backend_db_get_n_objects (CalBackend *backend, CalObjType type)
@@ -1445,7 +1458,8 @@ cal_backend_db_update_object (CalBackend *backend, const char *uid, const char *
return FALSE;
}
commit_transaction(tid);
-
+
+ cal_backend_obj_updated (CAL_BACKEND (cbdb), uid);
do_notify(cbdb, cal_notify_update, uid);
return TRUE;
}
@@ -1482,6 +1496,7 @@ cal_backend_db_remove_object (CalBackend *backend, const char *uid)
/* TODO: update history database */
commit_transaction(tid);
+ cal_backend_obj_removed (CAL_BACKEND (cbdb), uid);
do_notify(cbdb, cal_notify_remove, uid);
return TRUE;