The data for a service record is contained in attributes. Each attribute has a well-known ID, a type, and a value.
Attribute requests take service record handles found as a result of service searches and return attributes. You can limit the attributes returned to a specific attribute, or to a range of IDs.
As with a service search, service attribute search results are returned through asynchronous callbacks to an MSdpAgentNotifier interface, which the querier must implement.
The steps to read attributes are as follows:
Create a CSdpAttrIdMatchList object in which to specify the attributes to be retrieved (called the match list).
Start the query by calling CSdpAgent::AttributeRequestL() . As well as the match list, specify the record handle of interest.
Reading Remote Attributes
The following code fragements may be used, in an appropriate context, to query a remote device's SDP database for the attribute indicated by the attribute UUID. The steps are given here:
Create a match list.
The following code fragements assume agent is a CSdpAgent , and serviceHandle a service record handle
Add an attribute ID to match list.
Set the match list on the agent.
CSdpAgent::AttributeRequestL() is an overloaded function. Some of the overloads allow you to supply an MSdpElementBuilder object: if it is supplied, then the object will be called with each type found in the response.
The complete set of Service Discovery Agent tutorials are shown below:
Reading remote SDP service attributes - This document
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.