pub unsafe extern "C-unwind" fn IOServiceGetMatchingServices(
main_port: mach_port_t,
matching: Option<CFRetained<CFDictionary>>,
existing: *mut io_iterator_t,
) -> kern_return_tlibc only.Expand description
Look up registered IOService objects that match a matching dictionary.
This is the preferred method of finding IOService objects currently registered by IOKit (that is, objects that have had their registerService() methods invoked). To find IOService objects that aren’t yet registered, use an iterator as created by IORegistryEntryCreateIterator(). IOServiceAddMatchingNotification can also supply this information and install a notification of new IOServices. The matching information used in the matching dictionary may vary depending on the class of service being looked up.
Parameter mainPort: The main port obtained from IOMainPort(). Pass kIOMainPortDefault to look up the default main port.
Parameter matching: A CF dictionary containing matching information, of which one reference is always consumed by this function (Note prior to the Tiger release there was a small chance that the dictionary might not be released if there was an error attempting to serialize the dictionary). IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
Parameter existing: An iterator handle, or NULL, is returned on success, and should be released by the caller when the iteration is finished. If NULL is returned, the iteration was successful but found no matching services.
Returns: A kern_return_t error code.