From 43954ebab536060e26eeb3b6a84a43c261b25342 Mon Sep 17 00:00:00 2001 From: "vladimir%pobox.com" Date: Mon, 29 Nov 2004 22:40:40 +0000 Subject: [PATCH] calendar: updated calIRecurrenceInfo idl, notpartofthebuild git-svn-id: svn://10.0.0.236/trunk@165910 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/calendar/base/public/Makefile.in | 1 + .../base/public/calIRecurrenceInfo.idl | 63 +++++++++++++------ 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/mozilla/calendar/base/public/Makefile.in b/mozilla/calendar/base/public/Makefile.in index 3baf3a14204..d4455a48b28 100644 --- a/mozilla/calendar/base/public/Makefile.in +++ b/mozilla/calendar/base/public/Makefile.in @@ -51,6 +51,7 @@ XPIDLSRCS = calIDateTime.idl \ calIEvent.idl \ calICalendar.idl \ calIICSService.idl \ + calIRecurrenceInfo.idl \ $(NULL) EXPORTS = calBaseCID.h diff --git a/mozilla/calendar/base/public/calIRecurrenceInfo.idl b/mozilla/calendar/base/public/calIRecurrenceInfo.idl index 03a723659d1..3a65a5cd939 100644 --- a/mozilla/calendar/base/public/calIRecurrenceInfo.idl +++ b/mozilla/calendar/base/public/calIRecurrenceInfo.idl @@ -38,9 +38,7 @@ #include "nsISupports.idl" -interface nsIArray; -interface nsIMutableArray; - +interface calIItemBase; interface calIDateTime; interface calIItemOccurrence; @@ -58,22 +56,47 @@ interface calIRecurrenceInfo : nsISupports // clone always returns a mutable event calIItemBase clone(); - // // // recurrence // - const long CAL_ITEM_RECUR_TYPE_NONE = 0; - const long CAL_ITEM_RECUR_TYPE_MINUTELY = 1; - const long CAL_ITEM_RECUR_TYPE_HOURLY = 2; - const long CAL_ITEM_RECUR_TYPE_DAILY = 3; - const long CAL_ITEM_RECUR_TYPE_MONTHLY = 4; - const long CAL_ITEM_RECUR_TYPE_YEARLY = 5; + + const long CAL_RECUR_INVALID = 0; + const long CAL_RECUR_SECONDLY = 1; + const long CAL_RECUR_MINUTELY = 2; + const long CAL_RECUR_HOURLY = 3; + const long CAL_RECUR_DAILY = 4; + const long CAL_RECUR_WEEKLY = 5; + const long CAL_RECUR_MONTHLY = 6; + const long CAL_RECUR_YEARLY = 7; attribute long recurType; - attribute calIDateTime recurEnd; // if null, then forever - // array of calIDateTime - attribute nsIArray recurrenceExceptions; - // rest of recurrence in properties (?) + + // setting either of these attributes calculates the other. + // recurCount of -1 or null recurEnd means "forever" + attribute long recurCount; + attribute calIDateTime recurEnd; + + // skip every N + attribute long interval; + + // the components defining the recurrence + const long CAL_RECUR_BYSECOND = 8; + const long CAL_RECUR_BYMINUTE = 9; + const long CAL_RECUR_BYHOUR = 10; + const long CAL_RECUR_BYDAY = 11; + const long CAL_RECUR_BYMONTHDAY = 12; + const long CAL_RECUR_BYWEEKNO = 13; + const long CAL_RECUR_BYMONTH = 14; + const long CAL_RECUR_BYSETPOS = 15; + + void getComponent (in long aComponentType, + out unsigned long aCount, [array,size_is(aCount),retval] out long aValues); + void setComponent (in long aComponentType, + in unsigned long aCount, [array,size_is(aCount)] in long aValues); + + // exceptions + void getExceptions (out unsigned long aCount, [array,size_is(aCount),retval] out calIDateTime aDates); + void setExceptions (in unsigned long aCount, [array, size_is(aCount)] in calIDateTime aDates); // return the next display item for this event, // where the start time is >= aStartTime @@ -84,8 +107,12 @@ interface calIRecurrenceInfo : nsISupports calIItemOccurrence getPreviousOccurrence (in calIDateTime aStartTime); // return array of calIItemOccurrence representing all - // occurances of this event between start and end. - nsIArray getAllOccurrences (in calIDateTime aStartTime, - in calIDateTime aEndTime); -}; + // occurrences of this event between start and end. + void getOccurrences (in calIDateTime aStartTime, + in calIDateTime aEndTime, + out unsigned long aCount, [array,size_is(aCount),retval] out calIItemOccurrence aItems); + // return array of calIItemOccurrence representing all + // occurrences of this event. + void getAllOccurrences (out unsigned long aCount, [array,size_is(aCount),retval] out calIItemOccurrence aItems); +};