Last change
on this file since 35 was 34, checked in by Nicholas Riley, 22 years ago |
Changes for Pester 1.1d1.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[24] | 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 |
|
---|
| 11 | typedef enum {
|
---|
[26] | 12 | PSAlarmInvalid, PSAlarmInterval, PSAlarmDate, PSAlarmSet
|
---|
[24] | 13 | } PSAlarmType;
|
---|
| 14 |
|
---|
[26] | 15 | extern NSString * const PSAlarmTimerSetNotification;
|
---|
| 16 | extern NSString * const PSAlarmTimerExpiredNotification;
|
---|
| 17 |
|
---|
[34] | 18 | // XXX figure out how to support reading old alarms
|
---|
| 19 |
|
---|
| 20 | @class PSAlert;
|
---|
| 21 |
|
---|
[26] | 22 | @interface PSAlarm : NSObject <NSCoding> {
|
---|
[24] | 23 | PSAlarmType alarmType;
|
---|
| 24 | NSCalendarDate *alarmDate;
|
---|
| 25 | NSTimeInterval alarmInterval;
|
---|
| 26 | NSString *alarmMessage;
|
---|
| 27 | NSString *invalidMessage;
|
---|
[26] | 28 | NSTimer *timer;
|
---|
[34] | 29 | NSMutableArray *alerts;
|
---|
[24] | 30 | }
|
---|
| 31 |
|
---|
| 32 | - (void)setInterval:(NSTimeInterval)anInterval;
|
---|
[26] | 33 | - (void)setForDateAtTime:(NSCalendarDate *)dateTime;
|
---|
[24] | 34 | - (void)setForDate:(NSDate *)date atTime:(NSDate *)time;
|
---|
| 35 | - (void)setMessage:(NSString *)aMessage;
|
---|
[34] | 36 | - (void)addAlert:(PSAlert *)alert;
|
---|
| 37 | - (void)removeAlerts;
|
---|
[24] | 38 |
|
---|
[28] | 39 | - (NSCalendarDate *)date;
|
---|
[24] | 40 | - (NSTimeInterval)interval;
|
---|
[26] | 41 | - (NSString *)message;
|
---|
[34] | 42 | - (NSArray *)alerts;
|
---|
[24] | 43 |
|
---|
[28] | 44 | - (NSString *)shortDateString;
|
---|
| 45 | - (NSString *)timeString;
|
---|
| 46 | - (NSString *)timeRemainingString;
|
---|
| 47 |
|
---|
[24] | 48 | - (BOOL)isValid;
|
---|
| 49 | - (NSString *)invalidMessage;
|
---|
| 50 |
|
---|
[28] | 51 | - (NSComparisonResult)compare:(PSAlarm *)otherAlarm;
|
---|
| 52 |
|
---|
[26] | 53 | - (BOOL)setTimer;
|
---|
[28] | 54 | - (void)cancel;
|
---|
[26] | 55 |
|
---|
[24] | 56 | @end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.