View Javadoc
1   /**
2    * Oshi (https://github.com/dblock/oshi)
3    * 
4    * Copyright (c) 2010 - 2015 The Oshi Project Team
5    * 
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Eclipse Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/epl-v10.html
10   * 
11   * Contributors:
12   * dblock[at]dblock[dot]org
13   * alessandro[at]perucchi[dot]org
14   * widdis[at]gmail[dot]com
15   * https://github.com/dblock/oshi/graphs/contributors
16   */
17  package oshi.software.os.mac.local;
18  
19  import oshi.software.os.mac.local.CoreFoundation.CFArrayRef;
20  import oshi.software.os.mac.local.CoreFoundation.CFDictionaryRef;
21  import oshi.software.os.mac.local.CoreFoundation.CFStringRef;
22  import oshi.software.os.mac.local.CoreFoundation.CFTypeRef;
23  
24  import com.sun.jna.Library;
25  import com.sun.jna.Native;
26  
27  /**
28   * Power Supply stats
29   * 
30   * @author widdis[at]gmail[dot]com
31   */
32  public interface IOKit extends Library {
33  	IOKit INSTANCE = (IOKit) Native.loadLibrary("IOKit", IOKit.class);
34  
35  	public static final CFStringRef IOPS_NAME_KEY = CFStringRef
36  			.toCFString("Name");
37  	public static final CFStringRef IOPS_IS_PRESENT_KEY = CFStringRef
38  			.toCFString("Is Present");
39  	public static final CFStringRef IOPS_CURRENT_CAPACITY_KEY = CFStringRef
40  			.toCFString("Current Capacity");
41  	public static final CFStringRef IOPS_MAX_CAPACITY_KEY = CFStringRef
42  			.toCFString("Max Capacity");
43  
44  	CFTypeRef IOPSCopyPowerSourcesInfo();
45  
46  	CFArrayRef IOPSCopyPowerSourcesList(CFTypeRef blob);
47  
48  	CFDictionaryRef IOPSGetPowerSourceDescription(CFTypeRef blob, CFTypeRef ps);
49  
50  	double IOPSGetTimeRemainingEstimate();
51  }