DIRECTORY BasicTime USING [GMT], Rope USING [ROPE]; Remind: CEDAR DEFINITIONS = BEGIN MeetingType: TYPE = {none, meeting, command, seminar, protectedCmd}; MeetingRec: TYPE = RECORD[ uniqID: INT, type: MeetingType ¬ meeting, start: BasicTime.GMT, duration: CARD ¬ 60, -- minutes explanation: Rope.ROPE ¬ NIL, repeat: Repetitions ¬ once, nth: INT ¬ 0, reminders: RemindList ¬ NIL, more: Rope.ROPE ¬ NIL, -- pointer to more, usually a mail message iconLabel: Rope.ROPE ¬ NIL, iconFlavor: Rope.ROPE ¬ NIL, public: BOOL ¬ FALSE, other: REF ANY ¬ NIL]; Meeting: TYPE = REF MeetingRec; Repetitions: TYPE = {once, daily, weekdays, weekly, biweekly, monthly, yearly, nthWeekday, everyNthDay, everyNthWeek, everyNthMonth, other}; RemindList: TYPE ~ LIST OF Reminder; Reminder: TYPE ~ REF ReminderRecord; AlertReminder: TYPE ~ REF ReminderRecord[alert]; MailReminder: TYPE ~ REF ReminderRecord[mail]; ReminderRecord: TYPE ~ RECORD [ other: REF ANY ¬ NIL, variant: SELECT how: RemindStyle FROM alert => [start, stop: BasicTime.GMT], mail => [when: BasicTime.GMT, to: Rope.ROPE], ENDCASE]; RemindStyle: TYPE ~ {alert, mail}; AddMeeting: PROC[meeting: Meeting, closeDb: BOOLEAN ¬ TRUE, dbName: Rope.ROPE ¬ NIL] RETURNS [id: INT]; GetDefaultDbName: PROC RETURNS [Rope.ROPE]; CloseDb: PROC[dbName: Rope.ROPE ¬ NIL]; DeleteMeeting: PROC [start: BasicTime.GMT, id: INT, closeDb: BOOLEAN ¬ TRUE, dbName: Rope.ROPE ¬ NIL] RETURNS [BOOLEAN]; DeleteMeetingInRange: PROC [from, to: BasicTime.GMT, id: INT, closeDb: BOOLEAN ¬ TRUE, dbName: Rope.ROPE ¬ NIL] RETURNS [BOOLEAN]; DeleteAllMeetings: PROC[dbName: Rope.ROPE ¬ NIL] RETURNS [INT]; ListMeetings: PROC[ from, to: BasicTime.GMT, all: BOOLEAN ¬ FALSE, dbName: Rope.ROPE ¬ NIL] RETURNS [LIST OF Meeting]; RopeFromRepetition: PROC[rep: Repetitions] RETURNS [Rope.ROPE]; RepetitionFromRope: PROC[str: Rope.ROPE] RETURNS [Repetitions]; RopeFromMeetingType: PROC[type: MeetingType] RETURNS [Rope.ROPE]; MeetingTypeFromRope: PROC[str: Rope.ROPE] RETURNS [MeetingType]; NextOccurrence: PROC[repeat: Repetitions, nth: INT, time: BasicTime.GMT] RETURNS [BasicTime.GMT]; FirstOccurrenceAfter: PROC[repeat: Repetitions, nth: INT, init, now: BasicTime.GMT] RETURNS [BasicTime.GMT]; RegisterChangeProc: PROC[proc: PROC[data: REF], clientData: REF, ident: ATOM, dbName: Rope.ROPE ¬ NIL]; UnregisterChangeProc: PROC[ident: ATOM, dbName: Rope.ROPE ¬ NIL]; CompactDb: PROC[dbName: Rope.ROPE ¬ NIL]; BadData: ERROR; END. ά David Goldberg November 8, 1989 3:47:08 pm PST Copyright Σ 1992 by Xerox Corporation. All rights reserved. Theimer, September 10, 1990 1:56 pm PDT Last tweaked by Mike Spreitzer August 27, 1993 8:15 am PDT Willie-s, May 6, 1992 2:37 pm PDT Add meeting to database (uniqID field is ignored). Will create a database if needed. If dbName is NIL, then uses default database. The current implementation uses LoganBerry, and Remind.DfFile in the user profile is the default LoganBerry .df file. Normally closes db so that autoback will see the change mainly used to force an autobackup Delete this meeting. Returns true if it was found. When you only know a range of time in which the meeting starts, use this one. The range includes both endpoints. Delete all meetings; returns the number deleted. Return list of all meetings in the specified range. Atom is either $start or $stopReminding. Repeated meetings are listed with 'start' field set to the first occurence after from. If all is true, then repeated meetings are listed as many times as they occur in the range, otherwise they are listed just once. Stupid protocols may require implementing this with something that comminucates with a server as much information as a meeting per repetition within the given range. convert between enumerated type and rope convert between enumerated type and rope if a meeting occurs at time with repeat and nth, return time when it will occur next if a meeting occurs at init with repeat and nth, return first time >= now when it will occur when change in meeting database, call proc. Ident is label for use with UnRegister. unregister all procs registered under this ident compact the database Use SimpleFeedback instead Set the I/O stream to use for printing messages to the user. SetIOPrintStream: PROC [s: IO.STREAM]; Get the I/O stream to use for printing messages to the user. GetIOPrintStream: PROC [] RETURNS [s: IO.STREAM]; there is bad data in the database (I should provide a cleanup proc) Κn–(cedarcode) style•NewlineDelimiter ™code™.Kšœ Οeœ1™