ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference
|
IOBluetoothSDPUUID |
Inherits from: | NSData |
Declared In: |
An NSData subclass that represents a UUID as defined in the Bluetooth SDP spec.
The IOBluetoothSDPUUID class can represent a UUID of any valid size (16, 32 or 128 bits). It provides the ability to compare two UUIDs no matter what their size as well as the ability to promote the size of a UUID to a larger one.
Returns a pointer to the array of UUID bytes.
Returns an IOBluetoothSDPUUIDRef representation of the target IOBluetoothSDPUUID object.
Returns an IOBluetoothSDPUUID object matching the target UUID, but with the given number of bytes.
Initializes a new IOBluetoothSDPUUID object with the given bytes of the given length.
Initializes a new IOBluetoothSDPUUID object with the bytes in the given NSData.
Initializes a new 16-bit IOBluetoothSDPUUID with the given UUID16
Creates a new 32-bit IOBluetoothSDPUUID with the given UUID32
Compares the target IOBluetoothSDPUUID data with that of the given NSData parameter.
Compares the target IOBluetoothSDPUUID object with the given otherUUID object.
Returns the length (in bytes) of the UUID.
Creates a new 16-bit IOBluetoothSDPUUID with the given UUID16
Creates a new 32-bit IOBluetoothSDPUUID with the given UUID32
Creates a new IOBluetoothSDPUUID object with the given bytes of the given length.
Creates a new IOBluetoothSDPUUID object from the given NSData.
Method call to convert an IOBluetoothSDPUUIDRef into an IOBluetoothSDPUUID *.
bytes |
Returns a pointer to the array of UUID bytes.
- (const void *)bytes;
Returns a pointer to the array of UUID bytes.
This is one of the required NSData primitive methods.
getSDPUUIDRef |
Returns an IOBluetoothSDPUUIDRef representation of the target IOBluetoothSDPUUID object.
- (IOBluetoothSDPUUIDRef)getSDPUUIDRef;
Returns an IOBluetoothSDPUUIDRef representation of the target IOBluetoothSDPUUID object.
getUUIDWithLength: |
Returns an IOBluetoothSDPUUID object matching the target UUID, but with the given number of bytes.
- (IOBluetoothSDPUUID *)getUUIDWithLength:(unsigned)newLength;
newLength
The desired length for the UUID.
Returns an IOBluetoothSDPUUID object with the same data as the target but with the given length if it is possible to do so. Otherwise, nil is returned.
If the target object is the same length as newLength, it returns self. If newLength is greater it creates a new IOBluetoothSDPUUID object with the correct value for the given length. If newLength is smaller, it will attempt to create a new IOBluetoothSDPUUID that is smaller if the data matches the Bluetooth UUID base. This downconversion is currently unimplemented.
initWithBytes:length: |
Initializes a new IOBluetoothSDPUUID object with the given bytes of the given length.
- (id)initWithBytes:(const void *)bytes length:(unsigned)length;
bytes
An array of bytes representing the UUID.
length
The lenght of the array of bytes.
Returns self on success or nil on failure.
If the length is invalid for a UUID, nil is returned.
initWithData: |
Initializes a new IOBluetoothSDPUUID object with the bytes in the given NSData.
- (id)initWithData:(NSData *)data;
data
The NSData containing the UUID bytes.
Returns self on success or nil on failure.
If the length of the NSData is invalid for a UUID, nil is returned.
initWithUUID16: |
Initializes a new 16-bit IOBluetoothSDPUUID with the given UUID16
- (id)initWithUUID16:(BluetoothSDPUUID16)uuid16;
uuid16
A scalar representing a 16-bit UUID
Returns self.
initWithUUID32: |
Creates a new 32-bit IOBluetoothSDPUUID with the given UUID32
- (id)initWithUUID32:(BluetoothSDPUUID32)uuid32;
uuid32
A scalar representing a 32-bit UUID
Returns self.
isEqualToData: |
Compares the target IOBluetoothSDPUUID data with that of the given NSData parameter.
- (BOOL)isEqualToData:(NSData *)otherData;
otherData
An NSData object to be compared with the target.
Returns true if the UUID values of each object are equal. This includes the case where the sizes are different but the data itself is the same when the Bluetooth UUID base is applied.
This method will compare the bytes of the two objects even if the otherData parameter is not an IOBluetoothSDPUUID object.
isEqualToUUID: |
Compares the target IOBluetoothSDPUUID object with the given otherUUID object.
- (BOOL)isEqualToUUID:(IOBluetoothSDPUUID *)otherUUID;
otherUUID
The UUID object to be compared with the target.
Returns true if the UUID values of each object are equal. This includes the case where the sizes are different but the data itself is the same when the Bluetooth UUID base is applied.
This method will compare the two UUID values independent of their length.
length |
Returns the length (in bytes) of the UUID.
- (unsigned)length;
Returns the length (in bytes) of the UUID.
This is one of the required NSData primitive methods.
uuid16: |
Creates a new 16-bit IOBluetoothSDPUUID with the given UUID16
+ (IOBluetoothSDPUUID *)uuid16:(BluetoothSDPUUID16)uuid16;
uuid16
A scalar representing a 16-bit UUID
Returns the new IOBluetoothSDPUUID object.
uuid32: |
Creates a new 32-bit IOBluetoothSDPUUID with the given UUID32
+ (IOBluetoothSDPUUID *)uuid32:(BluetoothSDPUUID32)uuid32;
uuid32
A scalar representing a 32-bit UUID
Returns the new IOBluetoothSDPUUID object.
uuidWithBytes:length: |
Creates a new IOBluetoothSDPUUID object with the given bytes of the given length.
+ (IOBluetoothSDPUUID *)uuidWithBytes:(const void *)bytes length:(unsigned)length;
bytes
An array of bytes representing the UUID.
length
The length of the array of bytes.
Returns the new IOBluetoothSDPUUID object or nil on failure.
If the length is invalid for a UUID, nil is returned.
uuidWithData: |
Creates a new IOBluetoothSDPUUID object from the given NSData.
+ (IOBluetoothSDPUUID *)uuidWithData:(NSData *)data;
data
The NSData containing the UUID bytes.
Returns the new IOBluetoothSDPUUID object or nil on failure.
If the length of the NSData is invalid for a UUID, nil is returned.
withSDPUUIDRef: |
Method call to convert an IOBluetoothSDPUUIDRef into an IOBluetoothSDPUUID *.
+ (IOBluetoothSDPUUID *)withSDPUUIDRef:(IOBluetoothSDPUUIDRef)sdpUUIDRef;
sdpUUIDRef
IOBluetoothSDPUUIDRef for which an IOBluetoothSDPUUID * is desired.
Returns the IOBluetoothSDPUUID * for the given IOBluetoothSDPUUIDRef.
|
Last Updated: 2008-08-07