source: releases/Pester/1.0/Source/PSAlarm.h@ 632

Last change on this file since 632 was 28, checked in by Nicholas Riley, 22 years ago

Pester 1.0

File size: 1.1 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@interface PSAlarm : NSObject <NSCoding> {
19 PSAlarmType alarmType;
20 NSCalendarDate *alarmDate;
21 NSTimeInterval alarmInterval;
22 NSString *alarmMessage;
23 NSString *invalidMessage;
24 NSTimer *timer;
25}
26
27- (void)setInterval:(NSTimeInterval)anInterval;
28- (void)setForDateAtTime:(NSCalendarDate *)dateTime;
29- (void)setForDate:(NSDate *)date atTime:(NSDate *)time;
30- (void)setMessage:(NSString *)aMessage;
31
32- (NSCalendarDate *)date;
33- (NSTimeInterval)interval;
34- (NSString *)message;
35
36- (NSString *)shortDateString;
37- (NSString *)timeString;
38- (NSString *)timeRemainingString;
39
40- (BOOL)isValid;
41- (NSString *)invalidMessage;
42
43- (NSComparisonResult)compare:(PSAlarm *)otherAlarm;
44
45- (BOOL)setTimer;
46- (void)cancel;
47
48@end
Note: See TracBrowser for help on using the repository browser.