Attributes in a service record are set or altered by calling RSdpDatabase::UpdateAttributeL()
.
The following example adds an attribute with ID 102 hex (the attribute that specifies the service provider name in English) 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();
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.