/* Scheduler.h - header for the scheduler for Popup.app Copyright (C) 2003, 2004 Rob Burns December,13 2003 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #ifndef _SCHEDULER_H_ #define _SCHEDULER_H_ #ifdef __APPLE__ #import #include "GNUstep.h" #else #include #include #endif @class StackModel; @class QuizController; @class CardModel; @interface Scheduler : NSObject { NSMutableArray *state; NSMutableArray *schedule; StackModel *cardStack; NSDate *nextQuiz; NSTimer *clock; } - (id) init; // **************** // Property methods // **************** - (NSArray *) state; - (void) setState: (NSArray *)aState; - (void) setCardStack: (StackModel *)aStack; - (NSMutableDictionary *) entryForCard: (CardModel *)aCard; - (void) setNumberOfCards: (int) number inEntry: (NSMutableDictionary *) anEntry; - (void) incrementCardsInEntry: (NSMutableDictionary *)anEntry; - (void) decrementCardsInEntry: (NSMutableDictionary *)anEntry; - (BOOL) hasSlotZero; - (NSArray *) schedule; - (NSArray *) stateFileRep; // ************** // Action methods // ************** - (void) processQuiz: (QuizController *)aQuiz; - (void) updateNextQuizDate; - (void) createSlotZero; - (void) quizAlert: (id) sender; // ***************************************** // NSOutlineView DataSource Protocol Methods // ***************************************** - (id) outlineView: (NSOutlineView *) outlineView child: (int) index ofItem: (id) item; - (BOOL) outlineView: (NSOutlineView *) outlineView isItemExpandable: (id) item; - (int) outlineView: (NSOutlineView *) outlineView numberOfChildrenOfItem: (id) item; - (id) outlineView: (NSOutlineView *) outlineView objectValueForTableColumn: (NSTableColumn *) tableColumn byItem: (id)item; @end #endif // _SCHEDULER_H_