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 * iOperator the pointer to the dps operator

~CDpsTransaction()

~CDpsTransaction ( )

Destructor

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

Second phase constructor.

ConvertVersion(TLex8 &, TDpsVersion &)

TInt ConvertVersion ( TLex8 & aParser,
TDpsVersion & aVersion
)

Converts the version in descriptor tpye to TDpsVersion type

Parameters

TLex8 & aParser the version in descriptor
TDpsVersion & aVersion

CreateEventReplyL(TDpsEvent, const TDpsResult &)

void CreateEventReplyL ( TDpsEvent aEvent,
const TDpsResult & aResult
) [private]

Creates the dps event reply.

Parameters

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

CreateRequestL(TMDpsOperation *)

void CreateRequestL ( TMDpsOperation * aOperation )

Creates the dps operation request

Parameters

TMDpsOperation * aOperation

CreateRequestReplyL(const TDpsArgArray &, const TDpsResult &)

void CreateRequestReplyL ( 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 & aArgs the dps argument from the dps xml script
const TDpsResult & result

Engine()

CDpsEngine * Engine ( ) [inline]

FileHandle()

CDpsFile * FileHandle ( ) [inline]

Filter(TDes8 &)

void Filter ( 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 & aScript the XML script to be filtered out

Generator()

CDpsXmlGenerator * Generator ( ) [inline]

HandleHostRequestError(TInt)

void HandleHostRequestError ( TInt aErr )

Parameters

TInt aErr

IsReply()

TBool IsReply ( ) [inline]

NewL(CDpsStateMachine *)

CDpsTransaction * NewL ( CDpsStateMachine * iOperator ) [static]

Two phase constructor

Parameters

CDpsStateMachine * iOperator the 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 & aPer the string of percentage to be parsed

ParseScriptL(TBool)

void ParseScriptL ( TBool aReply )

Parses dps operation script

Parameters

TBool aReply if 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 &)

void SubstitutePath ( 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]