ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IOUPSPlugIn.h

Include Path:

<IOKit/ps>

Path:

/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/ps/IOUPSPlugIn.h

Includes:
<CoreFoundation/CoreFoundation.h>
<IOKit/IOCFPlugIn.h>

Overview

This header defines the software used by ioupsd in user space to communicate with UPS devices.

NOTE: A kernel extension should have the following key/value pair in its personality in order to be recognized by ioupsd:

    
        <key>UPSDevice</key>
        <true/>
        
    

To communicate with a UPS device, an instance of IOUPSPlugInInterface (a struct which is defined below) is created. The methods of IOUPSPlugInInterface allow ioupsd to communicate with the device.

To obtain an IOUPSPlugInInterface for a UPS device, use the function IOCreatePlugInInterfaceForService() defined in IOKit/IOCFPlugIn.h. (Note the "i" in "PlugIn" is always upper-case.) Quick usage reference:

The interface returned by IOCreatePlugInInterfaceForService() should be deallocated using IODestroyPlugInInterface(). Do not call Release() on it.



C Pseudoclasses

IOUPSPlugInInterface


Typedefs


IOUPSEventCallbackFunction


typedef void ( *IOUPSEventCallbackFunction) (
    void *target, 
    IOReturn result, 
    void *refcon, 
    void *sender, 
    CFDictionaryRef event);  
Fields
target

void * pointer to your data, often a pointer to an object.

result

Completion result of desired operation.

refcon

void * pointer to more data.

sender

Interface instance sending the completion routine.

event

CFDictionaryRef containing event data.

Discussion

Type and arguments of callout C function that is used when a completion routine is called. This function pointer is set via setEventCallback and is called when an event is available from the UPS.

#defines


kIOUPSPlugInInterfaceID


#define kIOUPSPlugInInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ 
    0x63, 0xf8, 0xbf, 0xc4, 0x26, 0xa0, 0x11, 0xd8, \ 
    0x88, 0xb4, 0x0, 0xa, 0x95, 0x8a, 0x2c, 0x78) 
Discussion

Interface ID for the IOUPSPlugInInterface. Corresponds to an available UPS device.


kIOUPSPlugInInterfaceID_v140


#define kIOUPSPlugInInterfaceID_v140 CFUUIDGetConstantUUIDWithBytes(NULL, \ 
    0xe6, 0xe, 0x7, 0x99, 0x9a, 0xa6, 0x49, 0xdf, \ 
    0xb5, 0x5b, 0xa5, 0xc9, 0x4b, 0xa0, 0x7a, 0x4a) 
Discussion

Interface ID for the IOUPSPlugInInterface. Corresponds to an available UPS device.


kIOUPSPlugInInterfaceID_v140


#define kIOUPSPlugInInterfaceID_v140 CFUUIDGetConstantUUIDWithBytes(NULL, \ 
    0xe6, 0xe, 0x7, 0x99, 0x9a, 0xa6, 0x49, 0xdf, \ 
    0xb5, 0x5b, 0xa5, 0xc9, 0x4b, 0xa0, 0x7a, 0x4a) 
Discussion

Interface ID for the IOUPSPlugInInterface. Corresponds to an available UPS device.


kIOUPSPlugInTypeID


#define kIOUPSPlugInTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \ 
    0x40, 0xa5, 0x7a, 0x4e, 0x26, 0xa0, 0x11, 0xd8, \ 
    0x92, 0x95, 0x00, 0x0a, 0x95, 0x8a, 0x2c, 0x78) 
Discussion

Type ID for the IOUPSPlugInInterface. Corresponds to an available UPS device.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2009-02-23