class CSdpAgentEng : public CBase |
Engine that actually implements the CSdpAgent facade funtionality.
Public Member Functions | |
---|---|
~CSdpAgentEng() | |
void | AttributeRequestL(TSdpServRecordHandle, const CSdpAttrIdMatchList &) |
void | AttributeRequestL(MSdpElementBuilder *, TSdpServRecordHandle, const CSdpAttrIdMatchList &) |
void | Cancel() |
void | ConstructL() |
CSdpAgentEng * | NewL(MSdpAgentNotifier &, TBTDevAddr) |
void | NextRecordRequestL() |
void | SetRecordFilterL(const CSdpSearchPattern &) |
Private Member Functions | |
---|---|
CSdpAgentEng(MSdpAgentNotifier &, TBTDevAddr) | |
void | HandleAttributeError(TInt) |
void | HandleAttributeResponseL(const TDesC8 &, const TDesC8 &) |
void | HandleServiceSearchError(TInt) |
void | HandleServiceSearchResponseL(TUint16, TUint16, const TDesC8 &, const TDesC8 &) |
void | ResetForNewAttributeRequest() |
void | ResetForNewRecordRequest() |
void | SendAttributeRequestL() |
TBool | TryToCompleteNextRecordRequest() |
Private Member Enumerations | |
---|---|
enum | TServiceSearchState { EIdle, ERequesting, EResultsReceived } |
CSdpAgentEng | ( | MSdpAgentNotifier & | aNotifier, |
TBTDevAddr | aDevAddr | ||
) | [private] |
Constructor: caches the results notifier and the remote device address to be used.
MSdpAgentNotifier & aNotifier | |
TBTDevAddr aDevAddr |
~CSdpAgentEng | ( | ) |
Creates a new SDP Agent Engine object.
The SDP Agent Engine is the class for the data member of the SDP Agent which actually does the work. (The SDP Agent is a facade class.)
void | AttributeRequestL | ( | TSdpServRecordHandle | aHandle, |
const CSdpAttrIdMatchList & | aMatchList | |||
) |
Retrieve attributes from a record on the remote server.
On completion, an up call on MSdpAgentNotifier::AttributeRequestComplete will occur. Each attribute found will be passed up through a call to MSdpAgentNotifier::AttributeRequestResult.
TSdpServRecordHandle aHandle | Record handle to retrieve attribute from |
const CSdpAttrIdMatchList & aMatchList | List Attribute IDs to retrieve. |
void | AttributeRequestL | ( | MSdpElementBuilder * | aBuilder, |
TSdpServRecordHandle | aHandle, | |||
const CSdpAttrIdMatchList & | aMatchList | |||
) |
Retrieve attributes from a record on the remote server.
On completion, an up call on MSdpAgentNotifier::AttributeRequestComplete will occur. As attributes are found, calls the MSdpElementBuilder class to describe the attribute. This will be of the form n * [AttrID:AttrVal], where n is the number of attributes actually found.
MSdpElementBuilder * aBuilder | Class implementing MSdpElementBuilder interface to handle the result |
TSdpServRecordHandle aHandle | Record handle to retrieve attribute from |
const CSdpAttrIdMatchList & aMatchList | List Attribute IDs to retrieve. |
void | ConstructL | ( | ) |
Sets ip basic requirements for SDP Agent.
Perform ipc connection with ESock.
Create active objects which look after requests.
Create a parser to parse responses. (A builder for the parser is provided at point of request.)
void | HandleAttributeError | ( | TInt | aError | ) | [private] |
Pass attribute error up to notifier.
TInt aError |
void | HandleAttributeResponseL | ( | const TDesC8 & | aAttributeList, |
const TDesC8 & | aContState | |||
) | [private] |
Up Called by Attribute Request Active Object "RunL" Parse out the attribute response, and handle accordingly.
void | HandleServiceSearchError | ( | TInt | aError | ) | [private] |
Pass service search error up to notifier - the handle supplied is simply a dummy ... the notifier needs to check for errors.
TInt aError |
void | HandleServiceSearchResponseL | ( | TUint16 | aTotalRecCount, |
TUint16 | aCurrentRecCount, | |||
const TDesC8 & | aRecHandles, | |||
const TDesC8 & | aContState | |||
) | [private] |
Upcall from service search requester.
CSdpAgentEng * | NewL | ( | MSdpAgentNotifier & | aNotifier, |
TBTDevAddr | aDevAddr | |||
) | [static] |
Creates a new SDP Agent Engine object.
The SDP Agent Engine is the class for the data member of the SDP Agent which actually does the work. (The SDP Agent is a facade class.)
MSdpAgentNotifier & aNotifier | |
TBTDevAddr aDevAddr |
void | NextRecordRequestL | ( | ) |
Retrieves the next record handle from the remote server, that matches the UUID filter previously set by SetRecordFileterL(). On completion, an upcall will occur on MSdpAgentNotifier::NextRecordRequestComplete().
void | SendAttributeRequestL | ( | ) | [private] |
Ask the active object which performs attribute requests to do just that.
The parameters used for the request are those currently stored as data members in this object. These will have been previousfly supplied by the user.
void | SetRecordFilterL | ( | const CSdpSearchPattern & | aUUIDFilter | ) |
This function creates a new COPY of a UUID filter from the UUID filter supplied, and places it in the CSdpAgentEng object.
If an old UUID filter list exists, it will be deleted. (A UUID filter is a list of UUIDs that must be contained in a service record in a remote database if the handle of that record is to be returned by a service search.)
const CSdpSearchPattern & aUUIDFilter |
TBool | TryToCompleteNextRecordRequest | ( | ) | [private] |
Checks whether it is necessary or not to ask remote device for more records.
SdpAgent collects as many of the remote device's record handles that conform to the record filter as it can on each service search request sent. Thus the SdpAgent will only perform a fresh service search if either the record filter has been changed (=> iBuiltRecordHandles->Count() returns 0) or the remote device returned a non "null" continuation state and all the record handles currently returned by the remote device have been processed.
CArrayFix< TSdpServRecordHandle > * | iBuiltRecHandles | [private] |
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.