Library
The I/O Kit framework implements non-kernel access to I/O Kit objects (drivers and nubs) through the device-interface mechanism.
Verschachtelte Klassen
static class
For an application to communicate with a device, the first thing it must do is create a connection between itself and the in-kernel object representing the device.
static class
An IOKit iterator handle.
static class
IOKitLib implements non-kernel task access to common IOKit object types - IORegistryEntry, IOService, IOIterator etc.
static class
The base class for all objects in the registry.
static class
The base class for most I/O Kit families, devices, and drivers.
Felder
static final double
static final double
static final int
static final int
static final int
Return value when attempting parent or child in registry and they do not exist
Create a matching dictionary that specifies an IOService
match based on BSD device name.
Returns the next object in an iteration.
int
Returns the mach port used to initiate communication with IOKit.
boolean
Performs an OSDynamicCast operation on an IOKit object.
int
Releases an object handle previously returned by IOKitLib
.
Returns a blob of Power Source information in an opaque CFTypeRef.
Returns a CFArray of Power Source handles, each of type CFTypeRef.
Returns a CFDictionary with readable information about the specific power source.
double
Returns the estimated seconds remaining until all power sources (battery and/or UPS's) are empty.
int
Create a CF dictionary representation of a registry entry's property table.
Create a CF representation of a registry entry's property.
int
Returns the first child of a registry entry in a plane.
int
Returns an iterator over a registry entry’s child entries in a plane.
int
Returns a name assigned to a registry entry.
int
Returns the first parent of a registry entry in a plane.
int
Returns an ID for the registry entry that is global to all tasks.
Create a CF representation of a registry entry's property.
Return a handle to the registry root.
int
Close a connection to an IOService and destroy the connect handle.
int
Returns the busyState of an IOService.
Look up a registered IOService object that matches a matching dictionary.
int
Look up registered IOService objects that match a matching dictionary.
Create a matching dictionary that specifies an IOService
class match.
Create a matching dictionary that specifies an IOService
name match.
int
A request to create a connection to an IOService.
static final int kIORegistryIterateRecursively
static final int kIORegistryIterateParents
static final int kIOReturnNoDevice
Return value when attempting parent or child in registry and they do not exist
static final double kIOPSTimeRemainingUnlimited
static final double kIOPSTimeRemainingUnknown
Returns the mach port used to initiate communication with IOKit.
bootstrapPort
- Pass 0 for the default.
port
- A pointer to the master port is returned. Multiple calls to IOMasterPort will not result in leaking ports (each call to IOMasterPort adds another send right to the port) but it is considered good programming practice to deallocate the port when you are finished with it using SystemB.mach_port_deallocate(int, int)
.
kern_return_t
error code.
Create a matching dictionary that specifies an IOService
class match.
name
- The class name. Class matching is successful on IOService
s of this class or any subclass.
null
on failure.
The dictionary is commonly passed to IOServiceGetMatchingServices(int, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.ptr.PointerByReference)
which will consume a reference, otherwise it should be released with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
by the caller.
Create a matching dictionary that specifies an IOService
name match.
name
- The IOService
name.
null
on failure.
The dictionary is commonly passed to IOServiceGetMatchingServices(int, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.ptr.PointerByReference)
which will consume a reference, otherwise it should be released with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
by the caller.
Create a matching dictionary that specifies an IOService
match based on BSD device name.
masterPort
- The master port obtained from IOMasterPort(int, com.sun.jna.ptr.IntByReference)
.
options
- No options are currently defined.
bsdName
- The BSD name.
null
on failure.
The dictionary is commonly passed to IOServiceGetMatchingServices(int, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.ptr.PointerByReference)
which will consume a reference, otherwise it should be released with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
by the caller.
Look up a registered IOService object that matches a matching dictionary.
masterPort
- The master port obtained from IOMasterPort(int, com.sun.jna.ptr.IntByReference)
.
matchingDictionary
- A CF dictionary containing matching information, of which one reference is always consumed by this function. IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching(java.lang.String)
, IOServiceNameMatching(java.lang.String)
, and IOBSDNameMatching(int, int, java.lang.String)
.
The service must be released by the caller.
Look up registered IOService objects that match a matching dictionary.
masterPort
- The master port obtained from IOMasterPort(int, com.sun.jna.ptr.IntByReference)
.
matchingDictionary
- A CF dictionary containing matching information, of which one reference is always consumed by this function. IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching(java.lang.String)
, IOServiceNameMatching(java.lang.String)
, and IOBSDNameMatching(int, int, java.lang.String)
.
iterator
- An iterator handle is returned on success, and should be released by the caller when the iteration is finished.
kern_return_t
error code.
Returns the next object in an iteration.
iterator
- An IOKit iterator handle.
Create a CF representation of a registry entry's property.
entry
- The registry entry handle whose property to copy.
key
- A CFString
specifying the property name.
allocator
- The CF allocator to use when creating the CF container.
options
- No options are currently defined.
The caller should release with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
.
Create a CF dictionary representation of a registry entry's property table.
entry
- The registry entry handle whose property table to copy.
properties
- A CFDictionary is created and returned the caller on success. The caller should release with CFRelease.
allocator
- The CF allocator to use when creating the CF containers.
options
- No options are currently defined.
kern_return_t
error code.
Create a CF representation of a registry entry's property.
entry
- The registry entry at which to start the search.
plane
- The name of an existing registry plane. Plane names are defined in IOKitKeys.h
, for example, kIOServicePlane
.
key
- A CFString
specifying the property name.
allocator
- The CF allocator to use when creating the CF container.
options
- kIORegistryIterateRecursively
may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)
call. kIORegistryIterateParents
may be set to iterate the parents of the entry, in place of the children.
Returns an ID for the registry entry that is global to all tasks.
entry
- The registry entry handle whose ID to look up.
id
- The resulting ID.
kern_return_t
error code.
Returns a name assigned to a registry entry.
entry
- The registry entry handle whose name to look up.
name
- The caller's buffer to receive the name. This must be a 128-byte buffer.
kern_return_t
error code.
Returns an iterator over a registry entry’s child entries in a plane.
entry
- The registry entry whose children to iterate over.
plane
- The name of an existing registry plane. Plane names are defined in IOKitKeys.h
, for example, kIOServicePlane
.
iter
- The created iterator over the children of the entry, on success. The iterator must be released when the iteration is finished.
kern_return_t
error code.
Returns the first child of a registry entry in a plane.
entry
- The registry entry whose child to look up.
plane
- The name of an existing registry plane. Plane names are defined in IOKitKeys.h
, for example, kIOServicePlane
.
child
- The first child of the registry entry, on success. The child must be released by the caller.
kern_return_t
error code.
Returns the first parent of a registry entry in a plane.
entry
- The registry entry whose parent to look up.
plane
- The name of an existing registry plane. Plane names are defined in IOKitKeys.h
, for example, kIOServicePlane
.
parent
- The first parent of the registry entry, on success. The parent must be released by the caller.
kern_return_t
error code.
Return a handle to the registry root.
masterPort
- The master port obtained from IOMasterPort(int, com.sun.jna.ptr.IntByReference)
.
IOObjectRelease(com.sun.jna.platform.mac.IOKit.IOObject)
by the caller, or 0 on failure.
Performs an OSDynamicCast operation on an IOKit object.
object
- An IOKit object.
className
- The name of the class.
Releases an object handle previously returned by IOKitLib
.
object
- The IOKit object to release.
kern_return_t
error code.
A request to create a connection to an IOService.
service
- The IOService object to open a connection to, usually obtained via the IOServiceGetMatchingServices(int, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef, com.sun.jna.ptr.PointerByReference)
API.
owningTask
- The mach task requesting the connection.
type
- A constant specifying the type of connection to be created, interpreted only by the IOService's family.
connect
- An io_connect_t
handle is returned on success, to be used with the IOConnectXXX APIs. It should be destroyed with IOServiceClose(com.sun.jna.platform.mac.IOKit.IOConnect)
.
IOService::newUserClient
.
Returns the busyState of an IOService.
service
- The IOService whose busyState to return.
busyState
- The busyState count is returned.
kern_return_t
error code.
Close a connection to an IOService and destroy the connect handle.
connect
- The connect handle created by IOServiceOpen. It will be destroyed by this function, and should not be released with IOObjectRelease.
kern_return_t
error code.
Returns a blob of Power Source information in an opaque CFTypeRef.
null
if errors were encountered, a CoreFoundation.CFTypeRef
otherwise.
Caller must CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
the return value when done accessing it.
Returns a CFArray of Power Source handles, each of type CFTypeRef.
blob
- Takes the CoreFoundation.CFTypeRef
returned by IOPSCopyPowerSourcesInfo()
null
if errors were encountered, otherwise a CFArray of CoreFoundation.CFTypeRef
s.
Caller must CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
the returned CoreFoundation.CFArrayRef
.
Returns a CFDictionary with readable information about the specific power source.
blob
- the CoreFoundation.CFTypeRef
returned by IOPSCopyPowerSourcesInfo()
ps
- One of the CoreFoundation.CFTypeRef
s in the CFArray returned by IOPSCopyPowerSourcesList(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
.
null
if an error was encountered, otherwise a CFDictionary.
Caller should NOT release the returned CFDictionary - it will be released as part of the CoreFoundation.CFTypeRef
returned by IOPSCopyPowerSourcesInfo()
.
double IOPSGetTimeRemainingEstimate()
Returns the estimated seconds remaining until all power sources (battery and/or UPS's) are empty.
kIOPSTimeRemainingUnknown
if the OS cannot determine the time remaining.
Returns kIOPSTimeRemainingUnlimited
if the system has an unlimited power source.
Otherwise returns a positive number indicating the time remaining in seconds until all power sources are depleted.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4