Allows a client to register for RFCOMM channel open notifications for certain types of RFCOMM channels.
- macOS 10.6+
The callback to be called when a new RFCOMM channel is opened.
Client-supplied refCon to be passed to the callback.
RFCOMM channel ID to match a new RFCOMM channel. If the channel ID doesn't matter, 0 may be passed in.
The desired direction of the RFCOMM channel - kIOBluetoothUserNotificationChannelDirectionAny if the direction doesn't matter.
Returns an IOBluetoothUserNotificationRef representing the outstanding RFCOMM channel notification. To unregister the notification, call IOBluetoothUserNotificationUnregister() with the returned IOBluetoothUserNotificationRef. If an error is encountered creating the notification, NULL is returned. The returned IOBluetoothUserNotificationRef will be valid for as long as the notification is registered. It is not necessary to retain the result. Once the notification is unregistered, it will no longer be valid.
The given callback will be called whenever any RFCOMM channel is opened.