From 6c95c6da0e9d40216e05109b5f4acb92c5ab5256 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 4 Mar 2003 20:59:13 +0000 Subject: call cal_client_get_cal_address instead of cal_client_get_email_address 2003-03-04 JP Rosevear * gui/itip-utils.c (itip_organizer_is_user): call cal_client_get_cal_address instead of cal_client_get_email_address * gui/dialogs/meeting-page.c (meeting_page_construct): ditto * pcs/cal.c (impl_Cal_get_cal_address): implement updated method name (cal_class_init): set method implementation * pcs/cal-backend.c (cal_backend_class_init): init get_cal_address virtual function (cal_backend_get_cal_address): call proper function * pcs/cal-backend.h: update proto, rename get_email_address virtual function to get_cal_address virtual function * pcs/cal-backend-file.c (cal_backend_file_class_init): match get_cal_address call (cal_backend_file_get_cal_address): rename from cal_backend_file_get_email_address * cal-client/cal-client.c: rename email_address private member to cal_address (cal_client_init): init cal_address (cal_client_destroy): free cal_address and properly free alarm_email_address (cal_client_get_cal_address): rename from cal_client_get_email_address and call proper corba function svn path=/trunk/; revision=20151 --- calendar/ChangeLog | 35 +++++++++++++++++++++++++++++++++-- calendar/cal-client/cal-client.c | 34 +++++++++++++++++----------------- calendar/cal-client/cal-client.h | 2 +- calendar/gui/dialogs/meeting-page.c | 2 +- calendar/gui/itip-utils.c | 2 +- calendar/idl/evolution-calendar.idl | 4 ++-- calendar/pcs/cal-backend-file.c | 6 +++--- calendar/pcs/cal-backend.c | 14 +++++++------- calendar/pcs/cal-backend.h | 4 ++-- calendar/pcs/cal.c | 16 ++++++++-------- 10 files changed, 75 insertions(+), 44 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7d82666b96..c9282317ba 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,8 +1,39 @@ -2003-02-05 JP Rosevear +2003-03-04 JP Rosevear + + * gui/itip-utils.c (itip_organizer_is_user): call + cal_client_get_cal_address instead of cal_client_get_email_address + + * gui/dialogs/meeting-page.c (meeting_page_construct): ditto + + * pcs/cal.c (impl_Cal_get_cal_address): implement updated method + name + (cal_class_init): set method implementation + + * pcs/cal-backend.c (cal_backend_class_init): init get_cal_address + virtual function + (cal_backend_get_cal_address): call proper function + + * pcs/cal-backend.h: update proto, rename get_email_address + virtual function to get_cal_address virtual function + + * pcs/cal-backend-file.c (cal_backend_file_class_init): match + get_cal_address call + (cal_backend_file_get_cal_address): rename from + cal_backend_file_get_email_address + + * cal-client/cal-client.c: rename email_address private member to + cal_address + (cal_client_init): init cal_address + (cal_client_destroy): free cal_address and properly free + alarm_email_address + (cal_client_get_cal_address): rename from + cal_client_get_email_address and call proper corba function + +2003-03-04 JP Rosevear * idl/evolution-calendar.idl: fix comment -2003-02-05 JP Rosevear +2003-03-04 JP Rosevear * gui/calendar-model.c (calendar_model_append_row): update FIXME note diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index 5fe10efcbc..1f76b5e210 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -48,7 +48,7 @@ struct _CalClientPrivate { char *uri; /* Email address associated with this calendar, or NULL */ - char *email_address; + char *cal_address; char *alarm_email_address; /* Scheduling info */ @@ -312,7 +312,7 @@ cal_client_init (CalClient *client, CalClientClass *klass) priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED; priv->uri = NULL; - priv->email_address = NULL; + priv->cal_address = NULL; priv->alarm_email_address = NULL; priv->capabilities = FALSE; priv->factories = NULL; @@ -449,13 +449,13 @@ cal_client_finalize (GObject *object) priv->uri = NULL; } - if (priv->email_address) { - g_free (priv->email_address); - priv->email_address = NULL; + if (priv->cal_address) { + g_free (priv->cal_address); + priv->cal_address = NULL; } if (priv->alarm_email_address) { - g_free (priv->email_address); - priv->email_address = NULL; + g_free (priv->alarm_email_address); + priv->alarm_email_address = NULL; } if (priv->capabilities) { g_free (priv->capabilities); @@ -1156,17 +1156,17 @@ cal_client_is_read_only (CalClient *client) } /** - * cal_client_get_email_address: + * cal_client_get_cal_address: * @client: A calendar client. * - * Queries the email address associated with a calendar client. + * Queries the calendar address associated with a calendar client. * - * Return value: The email address associated with the calendar that + * Return value: The calendar address associated with the calendar that * is loaded or being loaded, or %NULL if the client has not started a * load request yet or the calendar has no associated email address. **/ const char * -cal_client_get_email_address (CalClient *client) +cal_client_get_cal_address (CalClient *client) { CalClientPrivate *priv; @@ -1176,20 +1176,20 @@ cal_client_get_email_address (CalClient *client) priv = client->priv; g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, NULL); - if (priv->email_address == NULL) { + if (priv->cal_address == NULL) { CORBA_Environment ev; - CORBA_char *email_address; + CORBA_char *cal_address; CORBA_exception_init (&ev); - email_address = GNOME_Evolution_Calendar_Cal_getEmailAddress (priv->cal, &ev); + cal_address = GNOME_Evolution_Calendar_Cal_getCalAddress (priv->cal, &ev); if (!BONOBO_EX (&ev)) { - priv->email_address = g_strdup (email_address); - CORBA_free (email_address); + priv->cal_address = g_strdup (cal_address); + CORBA_free (cal_address); } CORBA_exception_free (&ev); } - return priv->email_address; + return priv->cal_address; } const char * diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h index d30982b2ab..a9d8d379b2 100644 --- a/calendar/cal-client/cal-client.h +++ b/calendar/cal-client/cal-client.h @@ -154,7 +154,7 @@ const char *cal_client_get_uri (CalClient *client); gboolean cal_client_is_read_only (CalClient *client); -const char *cal_client_get_email_address (CalClient *client); +const char *cal_client_get_cal_address (CalClient *client); const char *cal_client_get_alarm_email_address (CalClient *client); gboolean cal_client_get_one_alarm_only (CalClient *client); diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 1e5abe9a10..a1ac45f39c 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -748,7 +748,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingModel *emm, } /* Address information */ - backend_address = cal_client_get_email_address (client); + backend_address = cal_client_get_cal_address (client); priv->accounts = itip_addresses_get (); def_account = itip_addresses_get_default(); diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 61298fd4ed..51bdd73982 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -99,7 +99,7 @@ itip_organizer_is_user (CalComponent *comp, CalClient *client) if (cal_client_get_static_capability (client, "organizer-not-email-address")) { const char *email; - email = cal_client_get_email_address (client); + email = cal_client_get_cal_address (client); if (email && !g_strcasecmp (email, strip)) return TRUE; diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl index 5a72a5da6d..5feb0082ec 100644 --- a/calendar/idl/evolution-calendar.idl +++ b/calendar/idl/evolution-calendar.idl @@ -150,9 +150,9 @@ module Calendar { /* Information on the backend's capabilities */ string getStaticCapabilities (); - /* Return the email address associated with this calendar, + /* Return the cal address associated with this calendar, if any. */ - string getEmailAddress () + string getCalAddress () raises (NotFound); string getAlarmEmailAddress () diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 7310df2e4f..91081d77f0 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -78,7 +78,7 @@ static void cal_backend_file_finalize (GObject *object); static const char *cal_backend_file_get_uri (CalBackend *backend); static gboolean cal_backend_file_is_read_only (CalBackend *backend); -static const char *cal_backend_file_get_email_address (CalBackend *backend); +static const char *cal_backend_file_get_cal_address (CalBackend *backend); static const char *cal_backend_file_get_alarm_email_address (CalBackend *backend); static const char *cal_backend_file_get_static_capabilities (CalBackend *backend); static CalBackendOpenStatus cal_backend_file_open (CalBackend *backend, @@ -178,7 +178,7 @@ cal_backend_file_class_init (CalBackendFileClass *class) backend_class->get_uri = cal_backend_file_get_uri; backend_class->is_read_only = cal_backend_file_is_read_only; - backend_class->get_email_address = cal_backend_file_get_email_address; + backend_class->get_cal_address = cal_backend_file_get_cal_address; backend_class->get_alarm_email_address = cal_backend_file_get_alarm_email_address; backend_class->get_static_capabilities = cal_backend_file_get_static_capabilities; backend_class->open = cal_backend_file_open; @@ -432,7 +432,7 @@ cal_backend_file_is_read_only (CalBackend *backend) /* Get_email_address handler for the file backend */ static const char * -cal_backend_file_get_email_address (CalBackend *backend) +cal_backend_file_get_cal_address (CalBackend *backend) { /* A file backend has no particular email address associated * with it (although that would be a useful feature some day). diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 5e2074bad1..536501ce47 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -174,7 +174,7 @@ cal_backend_class_init (CalBackendClass *class) class->obj_removed = NULL; class->get_uri = NULL; - class->get_email_address = NULL; + class->get_cal_address = NULL; class->get_alarm_email_address = NULL; class->get_static_capabilities = NULL; class->open = NULL; @@ -265,22 +265,22 @@ cal_backend_get_uri (CalBackend *backend) } /** - * cal_backend_get_email_address: + * cal_backend_get_cal_address: * @backend: A calendar backend. * - * Queries the email address associated with a calendar backend, which + * Queries the cal address associated with a calendar backend, which * must already have an open calendar. * - * Return value: The email address associated with the calendar. + * Return value: The cal address associated with the calendar. **/ const char * -cal_backend_get_email_address (CalBackend *backend) +cal_backend_get_cal_address (CalBackend *backend) { g_return_val_if_fail (backend != NULL, NULL); g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - g_assert (CLASS (backend)->get_email_address != NULL); - return (* CLASS (backend)->get_email_address) (backend); + g_assert (CLASS (backend)->get_cal_address != NULL); + return (* CLASS (backend)->get_cal_address) (backend); } const char * diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h index ee11354252..ba73886bbd 100644 --- a/calendar/pcs/cal-backend.h +++ b/calendar/pcs/cal-backend.h @@ -95,7 +95,7 @@ struct _CalBackendClass { /* Virtual methods */ const char *(* get_uri) (CalBackend *backend); - const char *(* get_email_address) (CalBackend *backend); + const char *(* get_cal_address) (CalBackend *backend); const char *(* get_alarm_email_address) (CalBackend *backend); const char *(* get_static_capabilities) (CalBackend *backend); @@ -155,7 +155,7 @@ GType cal_backend_get_type (void); const char *cal_backend_get_uri (CalBackend *backend); -const char *cal_backend_get_email_address (CalBackend *backend); +const char *cal_backend_get_cal_address (CalBackend *backend); const char *cal_backend_get_alarm_email_address (CalBackend *backend); const char *cal_backend_get_static_capabilities (CalBackend *backend); diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c index 8171af4922..9040534940 100644 --- a/calendar/pcs/cal.c +++ b/calendar/pcs/cal.c @@ -80,26 +80,26 @@ impl_Cal_isReadOnly (PortableServer_Servant servant, /* Cal::getEmailAddress method */ static CORBA_char * -impl_Cal_getEmailAddress (PortableServer_Servant servant, +impl_Cal_getCalAddress (PortableServer_Servant servant, CORBA_Environment *ev) { Cal *cal; CalPrivate *priv; - const char *str_email_address; - CORBA_char *str_email_address_copy; + const char *str_cal_address; + CORBA_char *str_cal_address_copy; cal = CAL (bonobo_object_from_servant (servant)); priv = cal->priv; - str_email_address = cal_backend_get_email_address (priv->backend); - if (str_email_address == NULL) { + str_cal_address = cal_backend_get_cal_address (priv->backend); + if (str_cal_address == NULL) { bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound); return CORBA_OBJECT_NIL; } - str_email_address_copy = CORBA_string_dup (str_email_address); + str_cal_address_copy = CORBA_string_dup (str_cal_address); - return str_email_address_copy; + return str_cal_address_copy; } /* Cal::get_alarm_email_address method */ @@ -815,7 +815,7 @@ cal_class_init (CalClass *klass) /* Epv methods */ epv->_get_uri = impl_Cal_get_uri; epv->isReadOnly = impl_Cal_isReadOnly; - epv->getEmailAddress = impl_Cal_getEmailAddress; + epv->getCalAddress = impl_Cal_getCalAddress; epv->getAlarmEmailAddress = impl_Cal_getAlarmEmailAddress; epv->getStaticCapabilities = impl_Cal_getStaticCapabilities; epv->setMode = impl_Cal_setMode; -- cgit