source: releases/Pester/1.1b4/Source/PSPowerManager.h@ 225

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

MoreSecurity, wakein.[hm]: Removed authenticated wake timer setting
code: it was unneeded and incomplete, but remains in case it needs to
be resurrected later.

PSPowerManager.[hm]: removed -authorize, exception, references to
MoreSecurity and wakein tool (-_execWakeToolWithRequestDictionary:).
Simplified writeDataProperty by using IOConnectSetCFProperty instead
of IOConnectSetCFProperties. Fixed logic error in override which
caused timer not to be set as needed.

PSTimer.m: Display alert panel if errors encountered while setting
wake time.

File size: 864 bytes
Line 
1//
2// PSPowerManager.h
3// Pester
4//
5// Created by Nicholas Riley on Mon Dec 23 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <IOKit/IOKitLib.h>
11
12extern NSString * const PSPowerManagerException;
13
14@interface PSPowerManager : NSObject {
15 id delegate;
16 io_connect_t root_port;
17 io_object_t notifier;
18}
19
20- (id)initWithDelegate:(id)aDelegate;
21
22+ (BOOL)autoWakeSupported;
23+ (NSDate *)wakeTime;
24+ (void)setWakeInterval:(unsigned long)wakeInterval;
25+ (void)setWakeTime:(NSDate *)time overrideIfEarlier:(BOOL)override;
26+ (void)clearWakeTime;
27
28@end
29
30@interface NSObject (PSPowerManagerDelegate)
31
32- (void)powerManagerWillDemandSleep:(PSPowerManager *)powerManager;
33- (BOOL)powerManagerShouldIdleSleep:(PSPowerManager *)powerManager;
34- (void)powerManagerDidWake:(PSPowerManager *)powerManager;
35
36@end
Note: See TracBrowser for help on using the repository browser.