Service records are made up of attributes that collectively describe the service.
Attributes in a service record are set or altered by calling RSdpDatabase::UpdateAttributeL().
Example
The following example adds an attribute with ID 0x0102, the attribute that specifies the service provider name (0x0002 for the ProviderName attribute plus the language base offset, which for the primary language is 0x0100), in the service record identified by recordHandle
:
// Assumes sdpSubSession is an open subsession to the database, // and recordHandle is the service record _LIT8(KProvName,"Symbian Ltd."); CSdpAttrValueString* attrVal = CSdpAttrValueString::NewStringL(KProvName); CleanupStack::PushL(attrVal); sdpSubSession.UpdateAttributeL(recordHandle, 0x0102, *attrVal); CleanupStack::PopAndDestroy();
Note
UpdateAttributeL()
places no constraints on the contents of service records, and allows attributes of any value or content. You should ensure that the correct attribute IDs are used.
The complete set of Service Discovery Database tutorials are shown below:
Also refer to the Bluetooth Service Discovery Database overview and the Bluetooth SDP Overview for additional background information.