Platforms to show: All Mac Windows Linux Cross-Platform

Back to IOBluetoothSDPServiceRecordMBS class.

IOBluetoothSDPServiceRecordMBS.AttributeDataElement(attributeID as Integer) as IOBluetoothSDPDataElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the data element for the given attribute ID in the target service.

attributeID: The attribute ID of the desired attribute.

Returns the data element for the given attribute ID in the target service. If the service does not contain an attribute with the given ID, then nil is returned.

IOBluetoothSDPServiceRecordMBS.Constructor(dic as Dictionary, device as IOBluetoothDeviceMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an initialized IOBluetoothSDPServiceRecord with the attributes specified in the provided service dictionary.

Provide a pointer to an IOBlueotothDevice if you wish to associate the record to a specific IOBluetoothDevice.

IOBluetoothSDPServiceRecordMBS.hasServiceFromArray(uuids() as IOBluetoothSDPUUIDMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns true if any one of the UUIDs in the given array is found in the target service.

array: An array of IOBluetoothSDPUUID objects to search for in the target service.

Returns true if any of the given UUIDs are present in the service.

The given array should contain IOBluetoothSDPUUID objects. It is currently implemented such that it returns TRUE if any of the UUIDs are found. However in the future, it is likely that this will change to more closely match the functionality in the SDP spec so that it only returns TRUE if all of the given UUIDs are present. That way, both AND and OR comparisons can be implemented. Please make a note of this potential change.

IOBluetoothSDPServiceRecordMBS.matchesSearchArray(uuids() as IOBluetoothSDPUUIDMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns true any of the UUID arrays in the search array match the target service.

array: An Array of NSArrays of IOBluetoothSDPUUID objects.

Returns true if any of the UUID arrays match.

The given array should contain NSArray objects. Each sub-NSArray should contain IOBluetoothSDPUUID objects. In turn, each sub-NSArray gets passed to matchesUUIDArray If any of those returns true, then the search stops and true is returned. Essentially the master array contains the OR operations and each sub-array contains the AND operations.

NOTE: This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothSDPServiceRecordMBS.matchesUUID16(uuid16 as UInt16) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns true the UUID16 is found in the target service.

uuid16: A BluetoothSDPUUID16 to search for in the target service.

Returns true if the UUID16 is present in the service.

NOTE: This method is only available in macOS 10.7 or later.

IOBluetoothSDPServiceRecordMBS.matchesUUIDArray(uuids() as IOBluetoothSDPUUIDMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns true if ALL of the UUIDs in the given array is found in the target service.

array: An Array of IOBluetoothSDPUUID objects to search for in the target service.

Returns true if all of the given UUIDs are present in the service.

The given array should contain IOBluetoothSDPUUID objects. It only returns true if all of the UUIDs are found. This method is like hasServiceFromArray: except that it requires that all UUIDs match instead of any of them matching.

NOTE: This method is only available in macOS 10.2.4 (Bluetooth v1.1) or later.

IOBluetoothSDPServiceRecordMBS.removeServiceRecord

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Removes the service from the local SDP server.

Lasterror is set.

IOBluetoothSDPServiceRecordMBS.RFCOMMChannelID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Allows the discovery of the RFCOMM channel ID assigned to the service.

Returns the location that will get the found RFCOMM channel ID.

Lasterror is set to kIOReturnSuccess if the channel ID is found.

This method will search through the ProtoclDescriptorList attribute to find an entry with the RFCOMM UUID (UUID16: 0x0003). If one is found, it gets the second element of the data element sequence and sets the rfcommChannelID pointer to it. The channel ID only gets set when kIOReturnSuccess is returned.

Some examples using this method:

IOBluetoothSDPServiceRecordMBS.sortedAttributes as IOBluetoothSDPServiceAttributeMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns a sorted array of SDP attributes.

This method will walk all the elements of the service record and return an array of IOBluetoothSDPServiceAttribute objects sorted by attributeID.

The items on this page are in the following plugins: MBS Bluetooth Plugin.


The biggest plugin in space...