Platforms to show: All Mac Windows Linux Cross-Platform

Back to IOBluetoothSDPDataElementMBS class.

IOBluetoothSDPDataElementMBS.withElementValue(value as variant) as IOBluetoothSDPDataElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new IOBluetoothSDPDataElement with the given value.

element: The data element value of one of the specified types.

Returns the newly allocated data element object. Returns nil if there was an error parsing the element value. The returned IOBluetoothSDPDataElement object has been autoreleased, so it is not necessary for the caller to release it. If the object is to be referenced and kept around, retain should be called.

The value must follow the format listed above and must be an instance of memory block, String, number, Array, Dictionary, IOBluetoothSDPUUID.

IOBluetoothSDPDataElementMBS.withType(type as Integer, SizeDescriptor as Integer, Size as Integer, Value as variant) as IOBluetoothSDPDataElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Bluetooth MBS Bluetooth Plugin 18.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new IOBluetoothSDPDataElement with the given attributes.

typeDescriptor: The type descriptor for the data element.
sizeDescriptor: The size descriptor for the data element (verify it matches the size parameter).
size: The size of the data element in bytes (make sure it is a valid size for the given size descriptor).
value: The raw value itself. This must be the base string, number, array or memoryblock objects. It may not be Dictionary. If a dictionary format is present, use other Constructor.

Returns the newly allocated data element object. Returns nil if an error is encountered (not likely due to the limited error checking currently done).

Warning - be careful using this method. There is next to no error checking done on the attributes. It is entirely possible to construct an invalid data element. It is recommended that Constructor be used instead of this one.

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


The biggest plugin in space...