CSdpRequesterBase Class Reference

class CSdpRequesterBase : public CActive

Inherits from

Constructor & Destructor Documentation

CSdpRequesterBase(RSdpSession &, CSdpAgentEng &)

CSdpRequesterBase(RSdpSession &aSdpSession,
CSdpAgentEng &aParent
)[protected]

Constructor: This is where ESock session and the CSdpAgentEng parent are provided. Other member variables are given default values.

Parameters

RSdpSession & aSdpSession
CSdpAgentEng & aParent

~CSdpRequesterBase()

~CSdpRequesterBase()

Destructor: Deletes buffer for responses. Ensures we are disconnected.

Member Functions Documentation

ConnectL()

voidConnectL()[private]

Ask to connect to remote device address currently set-up in this active object. Note that we ensure that we are disconnected first...we could be connected to a different device.

Disconnect()

voidDisconnect()[private]

Bring down a currently existing connection.

DoCancel()

voidDoCancel()[protected, virtual]

Cancels current asynchronous request. This will be either an SDP query being performed through ESock or, if this CSdpRequesterBase is in the idle state, a timer (set-up to perform a disconnection after a defined length of time).

IssueRequestL()

voidIssueRequestL()[protected, pure virtual]

NewRequestL(const TBTDevAddr &)

voidNewRequestL(const TBTDevAddr &aRemDev)[protected]

Attempts to connect to the remote device. This is the first thing to do on receipt of a new request.

Parameters

const TBTDevAddr & aRemDev

RequestCompleteL()

voidRequestCompleteL()[protected, pure virtual]

Reset()

voidReset()[protected, virtual]

RetrieveResponseL()

voidRetrieveResponseL()[protected]

The initial response to a search or attribute request contains a buffer size. To obtain the actual result, the response buffer has to be made big enough, and then have the actual result copied into it from the server. RetrieveResponseL() does just this.

RunL()

voidRunL()[private, virtual]
Runs state machine. If no errors then:
	state disconnected		->		state requesting
									The request was stored before
									connection, and now is made.
	state requesting		->		state idle.
									The request has completed. See
									if any further requests come in
									over a brief period.
	state idle				->		state disconnected 
									if idle state interrupted by new request,
									this is notional - the RunL is immediately
									called again to set state to requesting
									and issue the actual request.
	

Member Enumerations Documentation

Enum TConnectState

Enumerators

EDisconnected
ERequesting
EIdle

Member Data Documentation

RTimer iIdleTimer

RTimer iIdleTimer[private]

CSdpAgentEng & iParent

CSdpAgentEng &iParent[protected]

TBTDevAddr iRemoteAddress

TBTDevAddr iRemoteAddress[protected]

RSdpAgent iRequester

RSdpAgent iRequester[protected]

TPtr8 iResponse

TPtr8 iResponse[protected]

HBufC8 * iResponseHBuf

HBufC8 *iResponseHBuf[private]

TInt iResultSize

TInt iResultSize[protected]

TInt iRetryCount

TInt iRetryCount[private]

RSdpSession & iSdpSession

RSdpSession &iSdpSession[protected]

TConnectState iState

TConnectState iState[protected]