From df675cb39e96121fbd6fc8872fe63b3359643fa8 Mon Sep 17 00:00:00 2001 From: "daniel.boelzle%sun.com" Date: Mon, 11 Sep 2006 14:16:05 +0000 Subject: [PATCH] Bug 340949: error strings, logout upon shutdown --- calendar/providers/wcap/calWcapErrors.js | 46 +++++++++++------------ calendar/providers/wcap/calWcapSession.js | 1 + 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/calendar/providers/wcap/calWcapErrors.js b/calendar/providers/wcap/calWcapErrors.js index c03dd55f152..2bca796d978 100644 --- a/calendar/providers/wcap/calWcapErrors.js +++ b/calendar/providers/wcap/calWcapErrors.js @@ -134,28 +134,28 @@ const g_wcapErrorCodes = [ /* 3 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.", /* 4 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.", /* 5 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.", - /* 6 */ Components.interfaces.calIWcapErrors.WCAP_DELETE_EVENTS_BY_ID_FAILED, "Command failed.", + /* 6 */ Components.interfaces.calIWcapErrors.WCAP_DELETE_EVENTS_BY_ID_FAILED, "WCAP_DELETE_EVENTS_BY_ID_FAILED", /* 7 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.", - /* 8 */ Components.interfaces.calIWcapErrors.WCAP_SETCALPROPS_FAILED, "Command failed.", - /* 9 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_EVENTS_BY_ID_FAILED, "Command failed.", - /* 10 */ Components.interfaces.calIWcapErrors.WCAP_CREATECALENDAR_FAILED, "Command failed.", - /* 11 */ Components.interfaces.calIWcapErrors.WCAP_DELETECALENDAR_FAILED, "Command failed.", - /* 12 */ Components.interfaces.calIWcapErrors.WCAP_ADDLINK_FAILED, "Command failed.", - /* 13 */ Components.interfaces.calIWcapErrors.WCAP_FETCHBYDATERANGE_FAILED, "Command failed.", - /* 14 */ Components.interfaces.calIWcapErrors.WCAP_STOREEVENTS_FAILED, "Command failed.", - /* 15 */ Components.interfaces.calIWcapErrors.WCAP_STORETODOS_FAILED, "Command failed.", - /* 16 */ Components.interfaces.calIWcapErrors.WCAP_DELETE_TODOS_BY_ID_FAILED, "Command failed.", - /* 17 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_TODOS_BY_ID_FAILED, "Command failed.", + /* 8 */ Components.interfaces.calIWcapErrors.WCAP_SETCALPROPS_FAILED, "WCAP_SETCALPROPS_FAILED", + /* 9 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_EVENTS_BY_ID_FAILED, "WCAP_FETCH_EVENTS_BY_ID_FAILED", + /* 10 */ Components.interfaces.calIWcapErrors.WCAP_CREATECALENDAR_FAILED, "WCAP_CREATECALENDAR_FAILED", + /* 11 */ Components.interfaces.calIWcapErrors.WCAP_DELETECALENDAR_FAILED, "WCAP_DELETECALENDAR_FAILED", + /* 12 */ Components.interfaces.calIWcapErrors.WCAP_ADDLINK_FAILED, "WCAP_ADDLINK_FAILED", + /* 13 */ Components.interfaces.calIWcapErrors.WCAP_FETCHBYDATERANGE_FAILED, "WCAP_FETCHBYDATERANGE_FAILED", + /* 14 */ Components.interfaces.calIWcapErrors.WCAP_STOREEVENTS_FAILED, "WCAP_STOREEVENTS_FAILED", + /* 15 */ Components.interfaces.calIWcapErrors.WCAP_STORETODOS_FAILED, "WCAP_STORETODOS_FAILED", + /* 16 */ Components.interfaces.calIWcapErrors.WCAP_DELETE_TODOS_BY_ID_FAILED, "WCAP_DELETE_TODOS_BY_ID_FAILED", + /* 17 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_TODOS_BY_ID_FAILED, "WCAP_FETCH_TODOS_BY_ID_FAILED", /* 18 */ Components.interfaces.calIWcapErrors.WCAP_FETCHCOMPONENTS_FAILED_BAD_TZID, "Command failed to find correct tzid. Applies to fetchcomponents_by_range.wcap, fetchevents_by_id.wcap, fetchtodos_by_id.wcap.", - /* 19 */ Components.interfaces.calIWcapErrors.WCAP_SEARCH_CALPROPS_FAILED, "Command failed.", - /* 20 */ Components.interfaces.calIWcapErrors.WCAP_GET_CALPROPS_FAILED, "Command failed.", - /* 21 */ Components.interfaces.calIWcapErrors.WCAP_DELETECOMPONENTS_BY_RANGE_FAILED, "Command failed.", - /* 22 */ Components.interfaces.calIWcapErrors.WCAP_DELETEEVENTS_BY_RANGE_FAILED, "Command failed.", - /* 23 */ Components.interfaces.calIWcapErrors.WCAP_DELETETODOS_BY_RANGE_FAILED, "Command failed.", - /* 24 */ Components.interfaces.calIWcapErrors.WCAP_GET_ALL_TIMEZONES_FAILED, "Command failed.", + /* 19 */ Components.interfaces.calIWcapErrors.WCAP_SEARCH_CALPROPS_FAILED, "WCAP_SEARCH_CALPROPS_FAILED", + /* 20 */ Components.interfaces.calIWcapErrors.WCAP_GET_CALPROPS_FAILED, "WCAP_GET_CALPROPS_FAILED", + /* 21 */ Components.interfaces.calIWcapErrors.WCAP_DELETECOMPONENTS_BY_RANGE_FAILED, "WCAP_DELETECOMPONENTS_BY_RANGE_FAILED", + /* 22 */ Components.interfaces.calIWcapErrors.WCAP_DELETEEVENTS_BY_RANGE_FAILED, "WCAP_DELETEEVENTS_BY_RANGE_FAILED", + /* 23 */ Components.interfaces.calIWcapErrors.WCAP_DELETETODOS_BY_RANGE_FAILED, "WCAP_DELETETODOS_BY_RANGE_FAILED", + /* 24 */ Components.interfaces.calIWcapErrors.WCAP_GET_ALL_TIMEZONES_FAILED, "WCAP_GET_ALL_TIMEZONES_FAILED", /* 25 */ Components.interfaces.calIWcapErrors.WCAP_CREATECALENDAR_ALREADY_EXISTS_FAILED, "The command createcalendar.wcap failed. A calendar with that name already exists in the database.", - /* 26 */ Components.interfaces.calIWcapErrors.WCAP_SET_USERPREFS_FAILED, "Command failed.", - /* 27 */ Components.interfaces.calIWcapErrors.WCAP_CHANGE_PASSWORD_FAILED, "Command failed.", + /* 26 */ Components.interfaces.calIWcapErrors.WCAP_SET_USERPREFS_FAILED, "WCAP_SET_USERPREFS_FAILED", + /* 27 */ Components.interfaces.calIWcapErrors.WCAP_CHANGE_PASSWORD_FAILED, "WCAP_CHANGE_PASSWORD_FAILED", /* 28 */ Components.interfaces.calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR, "Command failed. The user is denied access to a calendar.", /* 29 */ Components.interfaces.calIWcapErrors.WCAP_CALENDAR_DOES_NOT_EXIST, "Command failed. The requested calendar does not exist in the database.", /* 30 */ Components.interfaces.calIWcapErrors.WCAP_ILLEGAL_CALID_NAME, "createcalendar.wcap failed. Invalid calid passed in.", @@ -164,13 +164,13 @@ const g_wcapErrorCodes = [ /* 33 */ Components.interfaces.calIWcapErrors.WCAP_CANNOT_SENT_EMAIL, "Command failed. Email notification failed. Usually caused by the server not being properly configured to send email. This can occur in storeevents.wcap, storetodos.wcap, deleteevents_by_id.wcap, deletetodos_by_id.wcap.", /* 34 */ Components.interfaces.calIWcapErrors.WCAP_CALENDAR_DISABLED, "Command failed. The calendar is disabled in the database.", /* 35 */ Components.interfaces.calIWcapErrors.WCAP_WRITE_IMPORT_FAILED, "Import failed when writing files to the server.", - /* 36 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_LAST_MODIFIED_FAILED, "Command failed.", + /* 36 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_LAST_MODIFIED_FAILED, "WCAP_FETCH_BY_LAST_MODIFIED_FAILED", /* 37 */ Components.interfaces.calIWcapErrors.WCAP_CAPI_NOT_SUPPORTED, "Failed trying to read from unsupported format calendar data.", /* 38 */ Components.interfaces.calIWcapErrors.WCAP_CALID_NOT_SPECIFIED, "Calendar ID was not specified.", - /* 39 */ Components.interfaces.calIWcapErrors.WCAP_GET_FREEBUSY_FAILED, "Command failed.", + /* 39 */ Components.interfaces.calIWcapErrors.WCAP_GET_FREEBUSY_FAILED, "WCAP_GET_FREEBUSY_FAILED", /* 40 */ Components.interfaces.calIWcapErrors.WCAP_STORE_FAILED_DOUBLE_BOOKED, "If double booking is not allowed in this calendar, storeevents.wcap fails with this error when attempting to store an event in a time slot that was already filled.", - /* 41 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_ALARM_RANGE_FAILED, "Command failed.", - /* 42 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_ATTENDEE_ERROR_FAILED, "Command failed.", + /* 41 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_ALARM_RANGE_FAILED, "WCAP_FETCH_BY_ALARM_RANGE_FAILED", + /* 42 */ Components.interfaces.calIWcapErrors.WCAP_FETCH_BY_ATTENDEE_ERROR_FAILED, "WCAP_FETCH_BY_ATTENDEE_ERROR_FAILED", /* 43 */ Components.interfaces.calIWcapErrors.WCAP_ATTENDEE_GROUP_EXPANSION_CLIPPED, "An LDAP group being expanded was too large and exceeded the maximum number allowed in an expansion. The expansion stopped at the specified maximum limit. The maximum limit defaults to 200. To change the maximum limit, set the server configuration preference calstore.group.attendee.maxsize.", /* 44 */ Components.interfaces.calIWcapErrors.WCAP_USERPREFS_ACCESS_DENIED, "Either the server does not allow this administrator access to get or modify user preferences, or the requester is not an administrator.", /* 45 */ Components.interfaces.calIWcapErrors.WCAP_NOT_ALLOWED_TO_REQUEST_PUBLISH, "The requester was not an organizer of the event, and, therefore, is not allowed to edit the component using the PUBLISH or REQUEST method.", diff --git a/calendar/providers/wcap/calWcapSession.js b/calendar/providers/wcap/calWcapSession.js index bbc3bbde3cd..0c2dd87b3db 100644 --- a/calendar/providers/wcap/calWcapSession.js +++ b/calendar/providers/wcap/calWcapSession.js @@ -189,6 +189,7 @@ calWcapSession.prototype = { this.logout(); } else if (topic == "quit-application") { + this.logout(); // xxx todo: valid upon notification? var observerService = Components.classes["@mozilla.org/observer-service;1"]