aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-29 07:27:51 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-29 07:27:51 +0800
commit48ff93b64492c08d82e8452cb6b0e94b8582eb3e (patch)
treecc040d206fa875968c9753a18d510352295887c7 /calendar/cal-client/cal-client.c
parenta4789a176c9b256e018e31ac363ee9847da55500 (diff)
downloadgsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.gz
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.zst
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.zip
New function. We need this from code that dynamically updates from a
2000-08-28 Federico Mena Quintero <federico@helixcode.com> * cal-client/cal-client.c (cal_client_is_loaded): New function. We need this from code that dynamically updates from a client and could not have connected to the "cal_loaded" signal right after the client was created. * gui/calendar-model.c (load_objects): Do not try to load the objects if the client has not been loaded yet. (cal_loaded_cb): Check the status value. * gui/calendar-model.h (CalendarModel): Declare the private structure here so that gdb will give me love. * pcs/cal-factory.h (CalFactory): Likewise. * pcs/cal.h (Cal): Likewise. * cal-client/cal-listener.h (CalListener): Likewise. * cal-client/cal-client.h (CalClient): Likewise. * pcs/cal-backend.h (CalBackend): This no longer has a private structure, so remove it. * cal-util/Makefile.am (libcal_util_la_SOURCES): Removed the vCalendar and old iCalendar cruft. (libcal_utilinclude_HEADERS): Likewise. Removed the obsolete iCalendar test program. svn path=/trunk/; revision=5091
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r--calendar/cal-client/cal-client.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index b038c26752..d48a11a7f0 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -42,7 +42,7 @@ typedef enum {
} LoadState;
/* Private part of the CalClient structure */
-typedef struct {
+struct _CalClientPrivate {
/* Load state to avoid multiple loads */
LoadState load_state;
@@ -54,7 +54,7 @@ typedef struct {
/* The calendar client interface object we are contacting */
Evolution_Calendar_Cal cal;
-} CalClientPrivate;
+};
@@ -548,6 +548,27 @@ cal_client_create_calendar (CalClient *client, const char *str_uri)
return load_or_create (client, str_uri, FALSE);
}
+/**
+ * cal_client_is_loaded:
+ * @client: A calendar client.
+ *
+ * Queries whether a calendar client has been loaded successfully.
+ *
+ * Return value: TRUE if the client has been loaded, FALSE if it has not or if
+ * the loading process is not finished yet.
+ **/
+gboolean
+cal_client_is_loaded (CalClient *client)
+{
+ CalClientPrivate *priv;
+
+ g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+
+ priv = client->priv;
+ return (priv->load_state == LOAD_STATE_LOADED);
+}
+
/* Converts our representation of a calendar component type into its CORBA representation */
static Evolution_Calendar_CalObjType
corba_obj_type (CalObjType type)