aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-01-20 22:18:38 +0800
committerDan Winship <danw@src.gnome.org>2003-01-20 22:18:38 +0800
commit6974f9169918ed0145d93f276a6165e0189daec4 (patch)
tree1b6861d739f03629e42b867ba2dd5b6e2286c7a8 /calendar/pcs/cal-backend.h
parentdd5c34148a1d8f8170c0ba5b2033cbfd67e78a5c (diff)
downloadgsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar.gz
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar.bz2
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar.lz
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar.xz
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.tar.zst
gsoc2013-evolution-6974f9169918ed0145d93f276a6165e0189daec4.zip
Move some non-file-backend-specific stuff from cal-backend-file here so it
* pcs/cal-backend.c: Move some non-file-backend-specific stuff from cal-backend-file here so it can be shared with other backends. (CalBackendPrivate): add this, containing the categories hashes and the (formerly public) clients list. (cal_backend_init, cal_backend_finalize): Handle backend->priv. (cal_destroy_cb): Simplify this (and redo it as a weak notify func) (cal_backend_add_cal): Keep a weak ref on the cal rather than connecting to its "destroy" signal. Call notify_categories_changed to let the new cal know about them. (get_object): Default implementation of cal_backend_get_object. that calls cal_component_get_as_string on the return value of cal_backend_get_object_component. (cal_backend_notify_mode, cal_backend_notify_update, cal_backend_notify_remove, cal_backend_notify_error): Notify each Cal about something. (cal_backend_ref_categories, cal_backend_unref_categories): Maintain a list of categories that are used by components in the backend, and trigger categories_changed notifications as needed. * pcs/cal-backend-file.c: Remove stuff that was moved to CalBackend (notify funcs, category handling, get_object implementation) svn path=/trunk/; revision=19524
Diffstat (limited to 'calendar/pcs/cal-backend.h')
-rw-r--r--calendar/pcs/cal-backend.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
index b0790e8e73..b20e04bdb6 100644
--- a/calendar/pcs/cal-backend.h
+++ b/calendar/pcs/cal-backend.h
@@ -73,9 +73,12 @@ typedef enum {
CAL_BACKEND_GET_ALARMS_INVALID_RANGE
} CalBackendGetAlarmsForObjectResult;
+typedef struct _CalBackendPrivate CalBackendPrivate;
+
struct _CalBackend {
GObject object;
- GList *clients;
+
+ CalBackendPrivate *priv;
};
struct _CalBackendClass {
@@ -213,6 +216,15 @@ void cal_backend_opened (CalBackend *backend, CalBackendOpenStatus status);
void cal_backend_obj_updated (CalBackend *backend, const char *uid);
void cal_backend_obj_removed (CalBackend *backend, const char *uid);
+void cal_backend_notify_mode (CalBackend *backend,
+ GNOME_Evolution_Calendar_Listener_SetModeStatus status,
+ GNOME_Evolution_Calendar_CalMode mode);
+void cal_backend_notify_update (CalBackend *backend, const char *uid);
+void cal_backend_notify_remove (CalBackend *backend, const char *uid);
+void cal_backend_notify_error (CalBackend *backend, const char *message);
+void cal_backend_ref_categories (CalBackend *backend, GSList *categories);
+void cal_backend_unref_categories (CalBackend *backend, GSList *categories);
+
G_END_DECLS