|
||
class CSdpAgent : public CBase;
Makes Bluetooth service discovery protocol (SDP) requests to a remote device.
To make SDP requests,
Construct a CSdpAgent object with the Bluetooth address of the remote device to query.
Set the classes of service that you want to query for. The classes have predefined UUIDs, which you specify with CSdpAgent::SetRecordFilterL(const CSdpSearchPattern &)
.
Get results through CSdpAgent::NextRecordRequestL()
. Information on services is stored as records, which can be queried in turn for attribute values for the service through
CSdpAgent::AttributeRequestL(TSdpServRecordHandle,TSdpAttributeID)
.
A user of this class must implement MSdpAgentNotifier
to receive the responses to queries.
Note that queries are asynchronous, although this is hidden in the API. The implication is that the interface functions that receive responses are only called when the thread's active scheduler can schedule handling of the completion of the query.
CBase
-
Base class for all classes to be instantiated on the heap.
CSdpAgent
- Makes Bluetooth service discovery protocol (SDP) requests to a remote device.
Defined in CSdpAgent
:
AttributeRequestL(MSdpElementBuilder *,TSdpServRecordHandle,TSdpAttributeID)
Gets the specified attribute for a remote service.AttributeRequestL(MSdpElementBuilder *,TSdpServRecordHandle,const CSdpAttrIdMatchList &)
Gets the specified attributes for a remote service.AttributeRequestL(TSdpServRecordHandle,TSdpAttributeID)
Gets the specified attribute for a remote service.AttributeRequestL(TSdpServRecordHandle,const CSdpAttrIdMatchList &)
Gets the specified attributes for a remote service.Cancel()
Attempts to cancel an SDP Agent request.NewL(MSdpAgentNotifier &,const TBTDevAddr &)
Creates a new SDP Agent object.NewLC(MSdpAgentNotifier &,const TBTDevAddr &)
Creates a new SDP Agent object.NextRecordRequestL()
Gets a handle to the record for the next (or first) service on the remote device...SetAttributePredictorListL(const CSdpAttrIdMatchList &)
This does nothing! (It used to create a copy of an attribute match list supplied...SetRecordFilterL(const CSdpSearchPattern &)
Sets the classes of service to query for on the remote device.~CSdpAgent()
Destructor. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...MSdpAgentNotifier
Handles responses to Bluetooth Service Discovery Protocol queries.Capability: | LocalServices |
IMPORT_C static CSdpAgent* NewL(MSdpAgentNotifier &aNotifier, const TBTDevAddr &aDevAddr);
Creates a new SDP Agent object.
|
|
Capability: | LocalServices |
IMPORT_C static CSdpAgent* NewLC(MSdpAgentNotifier &aNotifier, const TBTDevAddr &aDevAddr);
Creates a new SDP Agent object.
Allocate and construct a service discovery agent, leaving the object on the cleanup stack.
|
|
Capability: | LocalServices |
IMPORT_C void SetRecordFilterL(const CSdpSearchPattern &aUUIDFilter);
Sets the classes of service to query for on the remote device.
Responses from the agent will only contain records for services that belong to the classes listed in aUUIDFilter. Service classes are represented as unique identifiers (UUIDs).
|
Interface status: | deprecated | |
Capability: | LocalServices |
IMPORT_C void SetAttributePredictorListL(const CSdpAttrIdMatchList &aMatchList);
This does nothing! (It used to create a copy of an attribute match list supplied, and place it in the CSdpAgentEng
object.)
|
Capability: | LocalServices |
IMPORT_C void NextRecordRequestL();
Gets a handle to the record for the next (or first) service on the remote device that matches the service class filter previously set.
The function is asynchronous: on completion, it calls NextRecordRequestComplete() on the MSdpAgentNotifier
interface passed in the CSdpAgent::NewL(MSdpAgentNotifier &,const TBTDevAddr &)
.
MSdpAgentNotifier::NextRecordRequestComplete(TInt,TSdpServRecordHandle,TInt)
Called when an service record request (CSdpAgent::NextRecordRequestComplete()) o...Capability: | LocalServices |
IMPORT_C void AttributeRequestL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID);
Gets the specified attribute for a remote service.
The function is asynchronous: on completion, it calls MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
.
If the attribute is found, the function passes it by also calling MSdpAgentNotifier::AttributeRequestResult(TSdpServRecordHandle,TSdpAttributeID,CSdpAttrValue *)
.
|
MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...MSdpAgentNotifier::AttributeRequestResult(TSdpServRecordHandle,TSdpAttributeID,CSdpAttrValue *)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...Capability: | LocalServices |
IMPORT_C void AttributeRequestL(TSdpServRecordHandle aHandle, const CSdpAttrIdMatchList &aMatchList);
Gets the specified attributes for a remote service.
The function is asynchronous: on completion, it calls MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
.
The function also calls MSdpAgentNotifier::AttributeRequestResult(TSdpServRecordHandle,TSdpAttributeID,CSdpAttrValue *)
for each attribute found.
|
MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...MSdpAgentNotifier::AttributeRequestResult(TSdpServRecordHandle,TSdpAttributeID,CSdpAttrValue *)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...Capability: | LocalServices |
IMPORT_C void AttributeRequestL(MSdpElementBuilder *aBuilder, TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID);
Gets the specified attribute for a remote service.
The function is asynchronous: on completion, it calls MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
.
If the attribute is found, the function calls aBuilder's interface to set the attribute ID and value.
|
MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...Capability: | LocalServices |
IMPORT_C void AttributeRequestL(MSdpElementBuilder *aBuilder, TSdpServRecordHandle aHandle, const CSdpAttrIdMatchList &aMatchList);
Gets the specified attributes for a remote service.
The function is asynchronous: on completion, it calls MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
.
As each attribute is found, the function calls aBuilder's interface to set the attribute ID and value.
|
MSdpAgentNotifier::AttributeRequestComplete(TSdpServRecordHandle,TInt)
Called when an attribute request (CSdpAgent::AttributeRequestL(TSdpServRecordHan...Capability: | LocalServices |
IMPORT_C void Cancel();
Attempts to cancel an SDP Agent request.
Calls cancel on active objects making request. Resets all variables associated with a request and its state.
NB The cancel operation will not, and cannot stop results from an SDP query being sent by the remote.