Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

IOBluetoothSDPDataElementMBS.withElementValue(value as variant) as IOBluetoothSDPDataElementMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Creates a new IOBluetoothSDPDataElement with the given value.
Notes:
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.

Feedback, Comments & Corrections

IOBluetoothSDPDataElementMBS.withType(type as Integer, SizeDescriptor as Integer, Size as Integer, Value as variant) as IOBluetoothSDPDataElementMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Bluetooth MBS Bluetooth Plugin 18.3 Yes No No Yes, macOS only No
Function: Creates a new IOBluetoothSDPDataElement with the given attributes.
Notes:
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.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins