1223011Sjilles/* 2223011Sjilles * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved. 3223011Sjilles * 4223011Sjilles * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5223011Sjilles * 6223011Sjilles * This file contains Original Code and/or Modifications of Original Code 7223011Sjilles * as defined in and that are subject to the Apple Public Source License 8223011Sjilles * Version 2.0 (the 'License'). You may not use this file except in 9223011Sjilles * compliance with the License. The rights granted to you under the License 10223011Sjilles * may not be used to create, or enable the creation or redistribution of, 11223011Sjilles * unlawful or unlicensed copies of an Apple operating system, or to 12223011Sjilles * circumvent, violate, or enable the circumvention or violation of, any 13223011Sjilles * terms of an Apple operating system software license agreement. 14223011Sjilles * 15223011Sjilles * Please obtain a copy of the License at 16223011Sjilles * http://www.opensource.apple.com/apsl/ and read it before using this file. 17223011Sjilles * 18223011Sjilles * The Original Code and all software distributed under the License are 19223011Sjilles * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20223011Sjilles * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21223011Sjilles * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22223011Sjilles * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23223011Sjilles * Please see the License for the specific language governing rights and 24223011Sjilles * limitations under the License. 25 * 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 */ 28#include <libkern/c++/OSObject.h> 29#include <IOKit/IOReturn.h> 30 31class IOPMPowerSource; 32 33class IOPMPowerSourceList : public OSObject 34{ 35 OSDeclareDefaultStructors(IOPMPowerSourceList) 36 private: 37 // pointer to first power source in list 38 IOPMPowerSource *firstItem; 39 40 // how many power sources are in the list 41 unsigned long length; 42 43 public: 44 void initialize(void); 45 void free(void); 46 47 unsigned long numberOfItems(void); 48 IOReturn addToList(IOPMPowerSource *newPowerSource); 49 IOReturn removeFromList(IOPMPowerSource *theItem); 50 51 IOPMPowerSource *firstInList(void); 52 IOPMPowerSource *nextInList(IOPMPowerSource *currentItem); 53}; 54 55