diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-65F8675F-FF08-5707-BA5B-BF3B4B779393.dita --- a/Symbian3/PDK/Source/GUID-65F8675F-FF08-5707-BA5B-BF3B4B779393.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-65F8675F-FF08-5707-BA5B-BF3B4B779393.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,49 +1,49 @@ - - - - - -Handling -SDP results -

Clients that make service and attribute queries through CSdpAgent must -implement the MSdpAgentNotifier interface -to handle the responses.

-
How to create an object to handle inquiry results

There -are two kinds of results that require handling, they are:

    -
  • Service Search Results, -and

  • -
  • Attribute Read Results

  • -

We will examine a simple handling example for both kinds below.

Note: -Queries are asynchronous.

-
Handling service search results

When a service -search request completes, it calls the NextRecordRequestComplete():

virtual void NextRecordRequestComplete(TInt aError, TSdpServRecordHandle aHandle, TInt aTotalRecordsCount)

aHandle gives the service record handle of the matching -service, and can be used in a subsequent attribute query. aTotalRecordsCount gives -the total number of matching records.

-
Handling attribute read results

When an attribute -request completes, each single attribute is returned with its attribute ID -using AttributeRequestResult().

virtual void AttributeRequestResult(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, CSdpAttrValue* aAttrValue)

The ID of the attribute is given in aAttrID, and the -attribute value itself in aAttrValue. You can find the type -of the attribute through aAttrValue->Type(), cast aAttrValue on -this base to the correct subclass of CSdpAttrValue: -for example, if the type is ETypeBoolean, -you can cast aAttrValue to a CSdpAttrValueBoolean.

When -there are no more attributes to be returned, AttributeRequestComplete() is -called.

-
Where Next?

The complete set of Service Discovery -Agent tutorials are shown below:

    -
  • Querying -the SDP database

  • -
  • Reading -remote SDP service attributes

  • -
  • Handling SDP query -results - This document

  • -

Also refer to the Bluetooth -Service Discovery Agent Overview and the Bluetooth -SDP Overview for additional background information.

+ + + + + +Handling +SDP results +

Clients that make service and attribute queries through CSdpAgent must +implement the MSdpAgentNotifier interface +to handle the responses.

+
How to create an object to handle inquiry results

There +are two kinds of results that require handling, they are:

    +
  • Service Search Results, +and

  • +
  • Attribute Read Results

  • +

We will examine a simple handling example for both kinds below.

Note: +Queries are asynchronous.

+
Handling service search results

When a service +search request completes, it calls the NextRecordRequestComplete():

virtual void NextRecordRequestComplete(TInt aError, TSdpServRecordHandle aHandle, TInt aTotalRecordsCount)

aHandle gives the service record handle of the matching +service, and can be used in a subsequent attribute query. aTotalRecordsCount gives +the total number of matching records.

+
Handling attribute read results

When an attribute +request completes, each single attribute is returned with its attribute ID +using AttributeRequestResult().

virtual void AttributeRequestResult(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, CSdpAttrValue* aAttrValue)

The ID of the attribute is given in aAttrID, and the +attribute value itself in aAttrValue. You can find the type +of the attribute through aAttrValue->Type(), cast aAttrValue on +this base to the correct subclass of CSdpAttrValue: +for example, if the type is ETypeBoolean, +you can cast aAttrValue to a CSdpAttrValueBoolean.

When +there are no more attributes to be returned, AttributeRequestComplete() is +called.

+
Where Next?

The complete set of Service Discovery +Agent tutorials are shown below:

    +
  • Querying +the SDP database

  • +
  • Reading +remote SDP service attributes

  • +
  • Handling SDP query +results - This document

  • +

Also refer to the Bluetooth +Service Discovery Agent Overview and the Bluetooth +SDP Overview for additional background information.

\ No newline at end of file