CDpsTransaction Class Reference

class CDpsTransaction : public CBase

This class creates and parses dps operation (request and reply)

Inherits from

Constructor & Destructor Documentation

CDpsTransaction(CDpsStateMachine *)

CDpsTransaction(CDpsStateMachine *iOperator)[private]

Default constructor

Parameters

CDpsStateMachine * iOperatorthe pointer to the dps operator

~CDpsTransaction()

~CDpsTransaction()

Destructor

Member Functions Documentation

ConstructL()

voidConstructL()[private]

Second phase constructor.

ConvertVersion(TLex8 &, TDpsVersion &)

TInt ConvertVersion(TLex8 &aParser,
TDpsVersion &aVersion
)

Converts the version in descriptor tpye to TDpsVersion type

Parameters

TLex8 & aParserthe version in descriptor
TDpsVersion & aVersion

CreateEventReplyL(TDpsEvent, const TDpsResult &)

voidCreateEventReplyL(TDpsEventaEvent,
const TDpsResult &aResult
)[private]

Creates the dps event reply.

Parameters

TDpsEvent aEvent
const TDpsResult & aResultthe result of the reply. See Dps spec for detail result value

CreateRequestL(TMDpsOperation *)

voidCreateRequestL(TMDpsOperation *aOperation)

Creates the dps operation request

Parameters

TMDpsOperation * aOperation

CreateRequestReplyL(const TDpsArgArray &, const TDpsResult &)

voidCreateRequestReplyL(const TDpsArgArray &aArgs,
const TDpsResult &result
)[private]

Creates the dps request reply based on host dps request. There is only one dps request from host (others are from device) - GetFileID

Parameters

const TDpsArgArray & aArgsthe dps argument from the dps xml script
const TDpsResult & result

Engine()

CDpsEngine *Engine()[inline]

FileHandle()

CDpsFile *FileHandle()[inline]

Filter(TDes8 &)

voidFilter(TDes8 &aScript)[private]

Removes the unprintable chars (LF, CR, TAB and spaces) between two XML attributes. It seems sybmian XML framework does filter out these character even though they are not belong to the attribute. Some printers (Cannon) send Dps request (XML script) in human readable format, e.g. including LF, CR and spaces among XML attributes.

Parameters

TDes8 & aScriptthe XML script to be filtered out

Generator()

CDpsXmlGenerator *Generator()[inline]

HandleHostRequestError(TInt)

voidHandleHostRequestError(TIntaErr)

Parameters

TInt aErr

IsReply()

TBool IsReply()[inline]

NewL(CDpsStateMachine *)

CDpsTransaction *NewL(CDpsStateMachine *iOperator)[static]

Two phase constructor

Parameters

CDpsStateMachine * iOperatorthe pointer to dps operation object

Operator()

CDpsStateMachine *Operator()[inline]

ParsePercentage(const TDes8 &)

TInt ParsePercentage(const TDes8 &aPer)

Parses the string of percentage to integer

Parameters

const TDes8 & aPerthe string of percentage to be parsed

ParseScriptL(TBool)

voidParseScriptL(TBoolaReply)

Parses dps operation script

Parameters

TBool aReplyif the script is the reply from the host aReply is ETrue, otherwise the script must be the request from the device and aReply is EFalse

Parser()

CDpsXmlParser *Parser()[inline]

ResultErr()

TInt ResultErr()[inline]

SubstitutePath(TDes8 &)

voidSubstitutePath(TDes8 &aPath)[private]

Changes the file path for GetFileID request

Parameters

TDes8 & aPath

Member Data Documentation

CDpsFile * iFile

CDpsFile *iFile[private]

CDpsStateMachine * iOperator

CDpsStateMachine *iOperator[private]

TBool iReply

TBool iReply[private]

CDpsXmlGenerator * iXmlGen

CDpsXmlGenerator *iXmlGen[private]

CDpsXmlParser * iXmlPar

CDpsXmlParser *iXmlPar[private]