source: trunk/Cocoa/Pester/Source/PSAlarm.h@ 34

Last change on this file since 34 was 34, checked in by Nicholas Riley, 20 years ago

Changes for Pester 1.1d1.

File size: 1.3 KB
Line 
1//
2// PSAlarm.h
3// Pester
4//
5// Created by Nicholas Riley on Wed Oct 09 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
11typedef enum {
12 PSAlarmInvalid, PSAlarmInterval, PSAlarmDate, PSAlarmSet
13} PSAlarmType;
14
15extern NSString * const PSAlarmTimerSetNotification;
16extern NSString * const PSAlarmTimerExpiredNotification;
17
18// XXX figure out how to support reading old alarms
19
20@class PSAlert;
21
22@interface PSAlarm : NSObject <NSCoding> {
23 PSAlarmType alarmType;
24 NSCalendarDate *alarmDate;
25 NSTimeInterval alarmInterval;
26 NSString *alarmMessage;
27 NSString *invalidMessage;
28 NSTimer *timer;
29 NSMutableArray *alerts;
30}
31
32- (void)setInterval:(NSTimeInterval)anInterval;
33- (void)setForDateAtTime:(NSCalendarDate *)dateTime;
34- (void)setForDate:(NSDate *)date atTime:(NSDate *)time;
35- (void)setMessage:(NSString *)aMessage;
36- (void)addAlert:(PSAlert *)alert;
37- (void)removeAlerts;
38
39- (NSCalendarDate *)date;
40- (NSTimeInterval)interval;
41- (NSString *)message;
42- (NSArray *)alerts;
43
44- (NSString *)shortDateString;
45- (NSString *)timeString;
46- (NSString *)timeRemainingString;
47
48- (BOOL)isValid;
49- (NSString *)invalidMessage;
50
51- (NSComparisonResult)compare:(PSAlarm *)otherAlarm;
52
53- (BOOL)setTimer;
54- (void)cancel;
55
56@end
Note: See TracBrowser for help on using the repository browser.