ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference

 


IOBluetoothSDPServiceAttribute

Inherits from:

NSObject

Declared In:

Overview

IOBluetoothSDPServiceAttribute represents a single SDP service attribute.

Discussion

A service attribute contains two components: an attribute ID and a data element.



Methods

-getAttributeID

Returns the attribute ID for the target service attribute.

-getDataElement

Returns the data element for the target service attribute.

-getIDDataElement

Returns the data element representing the attribute ID for the target service attribute.

-initWithID:attributeElement:

Initializes a new service attribute with the given ID and data element.

-initWithID:attributeElementValue:

Initializes a new service attribute with the given ID and element value.

+withID:attributeElement:

Creates a new service attribute with the given ID and data element.

+withID:attributeElementValue:

Creates a new service attribute with the given ID and element value.


getAttributeID


Returns the attribute ID for the target service attribute.

- (BluetoothSDPServiceAttributeID)getAttributeID; 
Return Value

Returns the attribute ID for the target service attribute.


getDataElement


Returns the data element for the target service attribute.

- (IOBluetoothSDPDataElement *)getDataElement; 
Return Value

Returns the data element for the target service attribute.


getIDDataElement


Returns the data element representing the attribute ID for the target service attribute.

- (IOBluetoothSDPDataElement *)getIDDataElement; 
Return Value

Returns the data element representing the attribute ID for the target service attribute.


initWithID:attributeElement:


Initializes a new service attribute with the given ID and data element.

- (id)initWithID:(BluetoothSDPServiceAttributeID)newAttributeID 
        attributeElement:(IOBluetoothSDPDataElement *)attributeElement; 
Parameters
newAttributeID

The attribute ID of the new service attribute.

attributeElement

The data element of the new service attribute.

Return Value

Returns self if successful. Returns nil if there was an error.


initWithID:attributeElementValue:


Initializes a new service attribute with the given ID and element value.

- (id)initWithID:(BluetoothSDPServiceAttributeID)newAttributeID 
        attributeElementValue:(NSObject *)attributeElementValue; 
Parameters
newAttributeID

The attribute ID of the new service attribute.

attributeElementValue

The data element value of the new service attribute

Return Value

Returns self if successful. Returns nil if there was an error parsing the element value.

Discussion

See +[IOBluetoothSDPDataElement withElementValue:] for a description of the types that may be passed in as the attributeElementValue.


withID:attributeElement:


Creates a new service attribute with the given ID and data element.

+ (IOBluetoothSDPServiceAttribute *)withID:(BluetoothSDPServiceAttributeID)newAttributeID 
        attributeElement:(IOBluetoothSDPDataElement *)attributeElement; 
Parameters
newAttributeID

The attribute ID of the new service attribute.

attributeElement

The data element of the new service attribute.

Return Value

Returns the newly allocated service attribute object. Returns nil if there was an error. 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.


withID:attributeElementValue:


Creates a new service attribute with the given ID and element value.

+ (IOBluetoothSDPServiceAttribute *)withID:(BluetoothSDPServiceAttributeID)newAttributeID 
        attributeElementValue:(NSObject *)attributeElementValue; 
Parameters
newAttributeID

The attribute ID of the new service attribute.

attributeElementValue

The data element value of the new service attribute

Return Value

Returns the newly allocated service attribute 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.

Discussion

See +[IOBluetoothSDPDataElement withElementValue:] for a description of the types that may be passed in as the attributeElementValue.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-08-07