rem: onOperationDetail: function(aStatusCode, aResource, aOperation, aDetail, aClosure) { LOG("WebDavListener.onOperationDetail() called"); return; } 
add: reportListener.onOperationDetail = function(aStatusCode, aResource, aOperation, aDetail, aClosure) { var rv; var errString;     if (aResource.path == calendarDirUri.path) {   throw("XXX report result for calendar, not event\n"); }  var items = null;   if (aStatusCode == 200) {     if (aCount && count >= aCount) { return; } ++count;    var xSerializer = Components.classes ['@mozilla.org/xmlextras/xmlserializer;1'] .getService(Components.interfaces.nsIDOMSerializer);  var response = xSerializer.serializeToString(aDetail).replace(/\n\n/g, "\r\n"); var responseElement = new XML(response);    var C = new Namespace("urn:ietf:params:xml:ns:caldav"); var D = new Namespace("DAV:");   var calData = responseElement..C::["calendar-data"]; if (!calData.toString().length) { Components.utils.reportError( "Empty or non-existent <calendar-data> element returned" + " by CalDAV server for URI <" + aResource.spec + ">; ignoring"); return; } LOG("item result = \n" + calData); this.mICSService = Cc["@mozilla.org/calendar/ics-service;1"]. getService(Components.interfaces.calIICSService); var rootComp = this.mICSService.parseICS(calData);  var calComp; if (rootComp.componentType == 'VCALENDAR') { calComp = rootComp; } else { calComp = rootComp.getFirstSubcomponent('VCALENDAR'); }  var unexpandedItems = []; var uid2parent = {}; var excItems = [];  while (calComp) {  var prop = calComp.getFirstProperty("ANY"); while (prop) { thisCalendar.unmappedProperties.push(prop); prop = calComp.getNextProperty("ANY"); }  var subComp = calComp.getFirstSubcomponent("ANY"); while (subComp) {   try { var item = null; switch (subComp.componentType) { case "VEVENT": item = Cc["@mozilla.org/calendar/event;1"]. createInstance(Components.interfaces.calIEvent); break; case "VTODO": item = Cc["@mozilla.org/calendar/todo;1"]. createInstance(Components.interfaces.calITodo); break; case "VTIMEZONE":   break; default: this.unmappedComponents.push(subComp); } if (item != null) {  item.icalComponent = subComp;    var locationPath = decodeURIComponent(aResource.path) .substr(thisCalendar.mCalendarUri.path.length); item.setProperty("X-MOZ-LOCATIONPATH", locationPath);  var rid = item.recurrenceId; if (rid == null) { unexpandedItems.push( item ); if (item.recurrenceInfo != null) { uid2parent[item.id] = item; } } else { item.calendar = thisCalendar;   item.recurrenceInfo = null; excItems.push(item); } } } catch (ex) { this.mObserver.onError(ex.result, ex.toString()); } subComp = calComp.getNextSubcomponent("ANY"); } calComp = rootComp.getNextSubcomponent('VCALENDAR'); }   for each (var item in excItems) { var parent = uid2parent[item.id]; if (parent == null) { LOG( "no parent item for rid=" + item.recurrenceId ); } else { item.parentItem = parent; item.parentItem.recurrenceInfo.modifyException(item); } }   for each (var item in unexpandedItems) { item.calendar = thisCalendar; }   var iid; if(aOccurrences) { iid = Ci.calIItemBase; if (item.recurrenceInfo) { LOG("ITEM has recurrence: " + item + " (" + item.title + ")"); LOG("rangestart: " + aRangeStart.jsDate + " -> " + aRangeEnd.jsDate);  items = item.recurrenceInfo.getOccurrences(aRangeStart, aRangeEnd, 0, {}); } else {  items = [ item ]; } rv = Components.results.NS_OK; } else if (item.instanceof Ci.calIEvent) { iid = Ci.calIEvent; rv = Components.results.NS_OK; items = [ item ]; } else if (item.instanceof Ci.calITodo) { iid = Ci.calITodo; rv = Components.results.NS_OK; items = [ item ]; } else { errString = "Can't deduce item type based on query"; rv = Components.results.NS_ERROR_FAILURE; }  } else { 
context:     onOperationDetail: function(aStatusCode, aResource, aOperation, aDetail,                                aClosure) {        LOG("WebDavListener.onOperationDetail() called");        return;    }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/ad081eba9b6c0433f5ea3722c64344cf57e6f655/calDavCalendar.js/buggy/calendar/providers/caldav/calDavCalendar.js