| Modifier and Type | Class and Description |
|---|---|
| public static class | IOKit.IOConnect
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. |
| public static class | IOKit.IOIterator
An IOKit iterator handle. |
| public static class | IOKit.IOObject
IOKitLib implements non-kernel task access to common IOKit object types - IORegistryEntry, IOService, IOIterator etc. These functions are generic - families may provide API that is more specific. |
| public static class | IOKit.IORegistryEntry
The base class for all objects in the registry. |
| public static class | IOKit.IOService
The base class for most I/O Kit families, devices, and drivers. |
| Modifier and Type | Field and Description |
|---|---|
| public static final IOKit | |
| public static final double | |
| public static final double | |
| public static final int | |
| public static final int | |
| public static final int | kIOReturnNoDevice
Return value when attempting parent or child in registry and they do not exist |
| Modifier and Type | Method and Description |
|---|---|
| public CoreFoundation. | Returns: The matching dictionary created, is returned on success, ornull on failure.
The dictionary is commonly passed to
The master port obtained from masterPort, int IOMasterPort.No options are currently defined. options, String The BSD name. bsdName)Create a matching dictionary that specifies an |
| public IOKit. | Returns: If the iterator handle is valid, the next element in the iteration is returned, otherwise zero is returned. The element should be released by the caller when it is finished.An IOKit iterator handle. iteratorReturns the next object in an iteration. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.Pass 0 for the default. bootstrapPort, IntByReference 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
port)SystemB#mach_port_deallocate.Returns the mach port used to initiate communication with IOKit. |
| public boolean | Returns: If the object handle is valid, and represents an object in the kernel that dynamic casts to the class true is returned, otherwise false.An IOKit object. object,The name of the class. className)Performs an OSDynamicCast operation on an IOKit object. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The IOKit object to release. objectReleases an object handle previously returned by |
| public CoreFoundation. | Returns: null if errors were encountered, a CFTypeRef
otherwise.
Caller must Returns a blob of Power Source information in an opaque CFTypeRef. |
| public CoreFoundation. | Returns: null if errors were encountered, otherwise a CFArray of
CFTypeRefs.
Caller must Takes the blobCFTypeRef returned by
IOPSCopyPowerSourcesInfoReturns a CFArray of Power Source handles, each of type CFTypeRef. |
| public CoreFoundation. | Returns: null if an error was encountered, otherwise a CFDictionary.
Caller should NOT release the returned CFDictionary - it will be
released as part of the the blob,CFTypeRef returned by
IOPSCopyPowerSourcesInfoOne of the psCFTypeRefs in the CFArray returned by
IOPSCopyPowerSourcesList.Returns a CFDictionary with readable information about the specific power source. |
| public double | Returns: ReturnskIOPSTimeRemainingUnknown if the OS cannot determine
the time remaining.
Returns Otherwise returns a positive number indicating the time remaining in seconds until all power sources are depleted. Returns the estimated seconds remaining until all power sources (battery and/or UPS's) are empty. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry handle whose property table to copy. entry,A CFDictionary is created and returned the caller on success. The
caller should release with CFRelease. properties, CoreFoundation.The CF allocator to use when creating the CF containers. allocator,No options are currently defined. options)Create a CF dictionary representation of a registry entry's property table. |
| public CoreFoundation. | Returns: A CF container is created and returned the caller on success.
The caller should release with The registry entry handle whose property to copy. entry,A key,CFString specifying the property name.The CF allocator to use when creating the CF container. allocator,No options are currently defined. options)Create a CF representation of a registry entry's property. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry whose child to look up. entry,The name of an existing registry plane. Plane names are defined in
plane, PointerByReference IOKitKeys.h, for example, kIOServicePlane.The first child of the registry entry, on success. The child must
be released by the caller. child)Returns the first child of a registry entry in a plane. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry whose children to iterate over. entry,The name of an existing registry plane. Plane names are defined in
plane, PointerByReference IOKitKeys.h, for example, kIOServicePlane.The created iterator over the children of the entry, on success.
The iterator must be released when the iteration is finished. iter)Returns an iterator over a registry entry’s child entries in a plane. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry handle whose name to look up. entry,The caller's buffer to receive the name. This must be a 128-byte
buffer. name)Returns a name assigned to a registry entry. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry whose parent to look up. entry,The name of an existing registry plane. Plane names are defined in
plane, PointerByReference IOKitKeys.h, for example, kIOServicePlane.The first parent of the registry entry, on success. The parent
must be released by the caller. parent)Returns the first parent of a registry entry in a plane. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The registry entry handle whose ID to look up. entry,The resulting ID. id)Returns an ID for the registry entry that is global to all tasks. |
| public CoreFoundation. | Returns: A CF container is created and returned the caller on success. The caller should release with CFRelease.The registry entry at which to start the search. entry,The name of an existing registry plane. Plane names are defined in
plane, CoreFoundation.IOKitKeys.h, for example, kIOServicePlane.A key,CFString specifying the property name.The CF allocator to use when creating the CF container. allocator,kIORegistryIterateRecursively may be set to recurse
automatically into the registry hierarchy. Without this option,
this method degenerates into the standard
IORegistryEntryCreateCFProperty call.
kIORegistryIterateParents may be set to iterate the
parents of the entry, in place of the children.Create a CF representation of a registry entry's property. |
| public IOKit. | Returns: A handle to the IORegistryEntry root instance, to be released withIOObjectRelease by the caller, or 0 on failure.The master port obtained from masterPort)IOMasterPort.Return a handle to the registry root. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The connect handle created by IOServiceOpen. It will be destroyed
by this function, and should not be released with IOObjectRelease. connectClose a connection to an IOService and destroy the connect handle. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The IOService whose busyState to return. service,The busyState count is returned. busyState)Returns the busyState of an IOService. |
| public IOKit. | Returns: The first service matched is returned on success.The service must be released by the caller. The master port obtained from masterPort, CoreFoundation.IOMasterPort.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 matchingDictionaryIOServiceMatching,
IOServiceNameMatching, and IOBSDNameMatching.Look up a registered IOService object that matches a matching dictionary. |
| public int | Returns: 0 if successful, otherwise akern_return_t error code.The master port obtained from masterPort, CoreFoundation.IOMasterPort.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 matchingDictionary,IOServiceMatching,
IOServiceNameMatching, and IOBSDNameMatching.An iterator handle is returned on success, and should be released
by the caller when the iteration is finished. iterator)Look up registered IOService objects that match a matching dictionary. |
| public CoreFoundation. | Returns: The matching dictionary created, is returned on success, ornull on failure.
The dictionary is commonly passed to
The class name. Class matching is successful on name)IOServices
of this class or any subclass.Create a matching dictionary that specifies an |
| public CoreFoundation. | Returns: The matching dictionary created, is returned on success, ornull on failure.
The dictionary is commonly passed to
The name)IOService name.Create a matching dictionary that specifies an |
| public int | Returns: A return code generated byIOService::newUserClient.The IOService object to open a connection to, usually obtained via
the service,IOServiceGetMatchingServices API.The mach task requesting the connection. owningTask, int A constant specifying the type of connection to be created,
interpreted only by the IOService's family. type, PointerByReference An connect)io_connect_t handle is returned on success, to be used
with the IOConnectXXX APIs. It should be destroyed with
IOServiceClose.A request to create a connection to an IOService. |