IONotificationPortCreate(_:)
Creates and returns a notification object for receiving IOKit notifications of new devices or state changes.
Declaration
func IONotificationPortCreate(_ mainPort: mach_port_t) -> IONotificationPortRef!Parameters
- masterPort:
The primary port obtained from 1514652 Iomasterport. Pass Kiomasterportdefault to look up the default primary port.
Return Value
A reference to the notification object.
Discussion
Creates the notification object to receive notifications from IOKit of new device arrivals or state changes. The notification object can be supply a CFRunLoopSource, or mach_port_t to be used to listen for events.
See Also
Miscellaneous
IOBSDNameMatching(_:_:_:)IOConnectAddClient(_:_:)IOConnectAddRef(_:)IOConnectGetService(_:_:)IOConnectMapMemory(_:_:_:_:_:_:)IOConnectMapMemory64(_:_:_:_:_:_:)IOConnectRelease(_:)IOConnectSetCFProperties(_:_:)IOConnectSetCFProperty(_:_:_:)IOConnectSetNotificationPort(_:_:_:_:)IOConnectUnmapMemory(_:_:_:_:)IOConnectUnmapMemory64(_:_:_:_:)IOCreateReceivePort(_:_:)IODispatchCalloutFromMessage(_:_:_:)IOIteratorIsValid(_:)IOIteratorNext(_:)IOIteratorReset(_:)IOKitGetBusyState(_:_:)IOKitWaitQuiet(_:_:)IOMasterPort(_:_:)IONotificationPortDestroy(_:)IONotificationPortGetMachPort(_:)IONotificationPortGetRunLoopSource(_:)IONotificationPortSetDispatchQueue(_:_:)IOObjectConformsTo(_:_:)IOObjectCopyBundleIdentifierForClass(_:)IOObjectCopyClass(_:)IOObjectCopySuperclassForClass(_:)IOObjectGetClass(_:_:)IOObjectGetKernelRetainCount(_:)IOObjectGetRetainCount(_:)IOObjectGetUserRetainCount(_:)IOObjectIsEqualTo(_:_:)IOObjectRelease(_:)IOObjectRetain(_:)IORegistryCreateIterator(_:_:_:_:)IORegistryEntryCreateCFProperties(_:_:_:_:)IORegistryEntryCreateCFProperty(_:_:_:_:)IORegistryEntryCreateIterator(_:_:_:_:)IORegistryEntryFromPath(_:_:)IORegistryEntryGetChildEntry(_:_:_:)IORegistryEntryGetChildIterator(_:_:_:)IORegistryEntryGetLocationInPlane(_:_:_:)IORegistryEntryGetName(_:_:)IORegistryEntryGetNameInPlane(_:_:_:)IORegistryEntryGetParentEntry(_:_:_:)IORegistryEntryGetParentIterator(_:_:_:)IORegistryEntryGetPath(_:_:_:)IORegistryEntryGetRegistryEntryID(_:_:)IORegistryEntryIDMatching(_:)IORegistryEntryInPlane(_:_:)IORegistryEntrySearchCFProperty(_:_:_:_:_:)IORegistryEntrySetCFProperties(_:_:)IORegistryEntrySetCFProperty(_:_:_:)IORegistryGetRootEntry(_:)IORegistryIteratorEnterEntry(_:)IORegistryIteratorExitEntry(_:)IOServiceAddInterestNotification(_:_:_:_:_:_:)IOServiceAddMatchingNotification(_:_:_:_:_:_:)IOServiceClose(_:)IOServiceGetBusyState(_:_:)IOServiceGetMatchingService(_:_:)IOServiceGetMatchingServices(_:_:_:)IOServiceMatching(_:)IOServiceMatchPropertyTable(_:_:_:)IOServiceNameMatching(_:)IOServiceOpen(_:_:_:_:)IOServiceRequestProbe(_:_:)IOServiceWaitQuiet(_:_:)