Function

IOBluetoothRegisterForFilteredRFCOMMChannelOpenNotifications

Allows a client to register for RFCOMM channel open notifications for certain types of RFCOMM channels.

Declaration

IOBluetoothUserNotificationRef IOBluetoothRegisterForFilteredRFCOMMChannelOpenNotifications(IOBluetoothUserNotificationCallback callback, void *inRefCon, BluetoothRFCOMMChannelID channelID, IOBluetoothUserNotificationChannelDirection inDirection);

Parameters

callback

The callback to be called when a new RFCOMM channel is opened.

inRefCon

Client-supplied refCon to be passed to the callback.

channeLID

RFCOMM channel ID to match a new RFCOMM channel. If the channel ID doesn't matter, 0 may be passed in.

inDirection

The desired direction of the RFCOMM channel - kIOBluetoothUserNotificationChannelDirectionAny if the direction doesn't matter.

Return Value

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.

Discussion

The given callback will be called whenever any RFCOMM channel is opened.

See Also

Miscellaneous

IOBluetoothDeviceRegisterForDisconnectNotification

Allows a client to register for device disconnect notification.

IOBluetoothGetObjectIDFromArguments

Returns the BluetoothObjectID passed as an argument to an auto-launched app.

Deprecated
IOBluetoothIgnoreHIDDevice

Hints that the macOS Bluetooth software should ignore a HID device that connects up.

IOBluetoothL2CAPChannelRegisterForChannelCloseNotification

Allows a client to register for a channel close notification.

IOBluetoothRegisterForDeviceConnectNotifications

Allows a client to register for device connect notifications for any connection.

IOBluetoothRegisterForFilteredL2CAPChannelOpenNotifications

Allows a client to register for L2CAP channel open notifications for certain types of L2CAP channels.

IOBluetoothRegisterForL2CAPChannelOpenNotifications

Allows a client to register for L2CAP channel open notifications for any L2CAP channel.

IOBluetoothRegisterForRFCOMMChannelOpenNotifications

Allows a client to register for RFCOMM channel open notifications for any RFCOMM channel.

IOBluetoothRemoveIgnoredHIDDevice

The counterpart to the above IOBluetoothIgnoreHIDDevice() API.

IOBluetoothRFCOMMChannelRegisterForChannelCloseNotification

Allows a client to register for a channel close notification.

IOBluetoothUserNotificationUnregister

Unregisters the target notification.