CNSmlDmModule Class Reference

class CNSmlDmModule : public CBase

Inherits from

Public Member Functions
~CNSmlDmModule ()
IMPORT_C void AddObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt , TBool )
IMPORT_C void CommitTransactionL ()
IMPORT_C void CopyObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt )
void DeleteInTransactionL (const TDesC8 &, MNSmlDmModuleCallBack *)
IMPORT_C void DeleteObjectL (const TDesC8 &, TInt )
IMPORT_C void DisconnectFromOtherServers ()
void DoSetResultsL ( TInt , CBufBase &, const TDesC8 &, const TDesC8 &, TInt , TBool )
void DoSetStatusL ( TInt , TInt , TBool )
IMPORT_C void EndMessageL ()
IMPORT_C void ExecuteObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt , const TDesC8 &, TBool )
IMPORT_C void FetchObjectL (const TDesC8 &, const TDesC8 &, TInt , TInt , TBool )
void GetPropertyL (const TDesC8 &, const TDesC8 &, TInt , TInt , TInt )
IMPORT_C TInt IsDDFChangedL ()
IMPORT_C void MarkGenAlertsSentL ()
IMPORT_C void MarkGenAlertsSentL (const TDesC8 &)
IMPORT_C void MoreDataL ( CBufBase *&)
IMPORT_C CNSmlDmModule * NewL ( MNSmlDmModuleCallBack *)
IMPORT_C void RollBackL ()
IMPORT_C void SetServerL (const TDesC8 &)
IMPORT_C void StartTransactionL ()
IMPORT_C void UpdateObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt , TBool , TInt )
void UpdatePropertyL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt , TInt )
Private Member Functions
void ConstructL ()
TInt HandlePropertyResultsL ( TInt , CBufBase &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
MNSmlDmModuleCallBack * iCallBack
CNSmlDmCommandBuffer * iCommandBuffer
CNSmlDmDDF * iDDF
TInt iDDFCrc
TBool iInTransaction
TBool iInternalCommand
TInt iInternalStatusRef
RPointerArray < CNSmlGetPropertyElement > iPropResults

Constructor & Destructor Documentation

~CNSmlDmModule()

IMPORT_C ~CNSmlDmModule ( )

Destructor

Member Functions Documentation

AddObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TBool)

IMPORT_C void AddObjectL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
TInt aStatusRef,
TBool aLargeItem = EFalse
)

Add operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aObject Data
const TDesC8 & aType Mime type
TInt aStatusRef Reference to status element
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not

CommitTransactionL()

IMPORT_C void CommitTransactionL ( )

Commit Atomic operation

ConstructL()

void ConstructL ( ) [private]

Second phase constructor.

CopyObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt)

IMPORT_C void CopyObjectL ( const TDesC8 & aTargetURI,
const TDesC8 & aSourceURI,
const TDesC8 & aType,
TInt aStatusRef
)

Copy operation in DM protocoll.

Parameters

const TDesC8 & aTargetURI Target URI in command
const TDesC8 & aSourceURI Source URI in command
const TDesC8 & aType Mime type
TInt aStatusRef Reference to status element or not

DeleteInTransactionL(const TDesC8 &, MNSmlDmModuleCallBack *)

void DeleteInTransactionL ( const TDesC8 & aURI,
MNSmlDmModuleCallBack * aCallBack
)

Deletes te items added inside the atomic, in case that atomic fails

Parameters

const TDesC8 & aURI Target URI to be deleted
MNSmlDmModuleCallBack * aCallBack Temporary callback interface for internal commands -> status not given to agent

DeleteObjectL(const TDesC8 &, TInt)

IMPORT_C void DeleteObjectL ( const TDesC8 & aURI,
TInt aStatusRef
)

Delete operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
TInt aStatusRef Reference to status element

DisconnectFromOtherServers()

IMPORT_C void DisconnectFromOtherServers ( )

Closes the connections to callback server and host servers. Separate function is needed, since the disconnecting cannot be made after the active scheduler of the thread is stopped.

DoSetResultsL(TInt, CBufBase &, const TDesC8 &, const TDesC8 &, TInt, TBool)

void DoSetResultsL ( TInt aResultsRef,
CBufBase & aObject,
const TDesC8 & aType,
const TDesC8 & aFormat,
TInt aTotalSize,
TBool aSkipCmdBuf = EFalse
)

Sets the result to caller by using callback interface

Parameters

TInt aResultsRef Reference to result element
CBufBase & aObject Result data to be given
const TDesC8 & aType Mime type of object
const TDesC8 & aFormat Format of object, got from ddf
TInt aTotalSize Total size of object, in case of large object, this is different from aObject size
TBool aSkipCmdBuf = EFalse Indicates that status is given to agent despite existance of command buffer

DoSetStatusL(TInt, TInt, TBool)

void DoSetStatusL ( TInt aStatusRef,
TInt aStatusCode,
TBool aSkipCmdBuf = EFalse
)

The status is provided throug this function to caller

Parameters

TInt aStatusRef Reference to status element
TInt aStatusCode Status code to be given
TBool aSkipCmdBuf = EFalse Indicates that status is given to agent despite existance of command buffer

EndMessageL()

IMPORT_C void EndMessageL ( )

Indicates message ending

ExecuteObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, const TDesC8 &, TBool)

IMPORT_C void ExecuteObjectL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
TInt aStatusRef,
const TDesC8 & aCorrelator,
TBool aLargeItem = EFalse
)

Execute operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aObject Data
const TDesC8 & aType Mime type
TInt aStatusRef Reference to status element
const TDesC8 & aCorrelator Correlator received as an argument in the exec command.
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not

FetchObjectL(const TDesC8 &, const TDesC8 &, TInt, TInt, TBool)

IMPORT_C void FetchObjectL ( const TDesC8 & aURI,
const TDesC8 & aType,
TInt aResultsRef,
TInt aStatusRef,
TBool aAclPass = EFalse
)

Get operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aType Mime type
TInt aResultsRef Reference to result element
TInt aStatusRef Reference to status element
TBool aAclPass = EFalse Passes acl checking if true

GetPropertyL(const TDesC8 &, const TDesC8 &, TInt, TInt, TInt)

void GetPropertyL ( const TDesC8 & aURI,
const TDesC8 & aType,
TInt aOffset,
TInt aResultsRef,
TInt aStatusRef
)

Get property operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aType Mime type
TInt aOffset Property start offset in aURI
TInt aResultsRef Reference to result element
TInt aStatusRef Reference to status element

HandlePropertyResultsL(TInt, CBufBase &)

TInt HandlePropertyResultsL ( TInt aIndex,
CBufBase & aObject
) [private]

Sets the real property result in case that property fetched

Parameters

TInt aIndex Index in property result buffer
CBufBase & aObject Result data to be given

IsDDFChangedL()

IMPORT_C TInt IsDDFChangedL ( )

Returns a checksum of ddf versions. Checksum changes if the ddf changes

MarkGenAlertsSentL()

IMPORT_C void MarkGenAlertsSentL ( )

When the generic alerts are successfully sent to the remote server, the FOTA adapter needs to be informed about this. This command is chained through the DM engine.

MarkGenAlertsSentL(const TDesC8 &)

IMPORT_C void MarkGenAlertsSentL ( const TDesC8 & aURI )

Parameters

const TDesC8 & aURI

MoreDataL(CBufBase *&)

IMPORT_C void MoreDataL ( CBufBase *& aData )

Gets more data in case of largeobject

Parameters

CBufBase *& aData Reference to buffer where to add more data

NewL(MNSmlDmModuleCallBack *)

IMPORT_C CNSmlDmModule * NewL ( MNSmlDmModuleCallBack * aCallBack ) [static]

Two-phased constructor.

Parameters

MNSmlDmModuleCallBack * aCallBack Callback pointer

RollBackL()

IMPORT_C void RollBackL ( )

Rollback Atomic operation

SetServerL(const TDesC8 &)

IMPORT_C void SetServerL ( const TDesC8 & aServer )

Sets the server identifier

Parameters

const TDesC8 & aServer The server id of current session

StartTransactionL()

IMPORT_C void StartTransactionL ( )

Start Atomic operation

UpdateObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TBool, TInt)

IMPORT_C void UpdateObjectL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
TInt aStatusRef,
TBool aLargeItem = EFalse,
TInt aTotSizeOfLarge = 0
)

Replace operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aObject Data
const TDesC8 & aType Mime type
TInt aStatusRef Reference to status element
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not
TInt aTotSizeOfLarge = 0 The overall size of the large object. Sent with the first chunk.

UpdatePropertyL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TInt)

void UpdatePropertyL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
TInt aOffset,
TInt aStatusRef
)

Replace property operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
const TDesC8 & aObject Data
const TDesC8 & aType Mime type
TInt aOffset Property start offset in aURI
TInt aStatusRef Reference to status element

Member Data Documentation

MNSmlDmModuleCallBack * iCallBack

MNSmlDmModuleCallBack * iCallBack [private]

Pointer to module callback interface

CNSmlDmCommandBuffer * iCommandBuffer

CNSmlDmCommandBuffer * iCommandBuffer [private]

Pointer to command buffer. This is created when atomic starts

CNSmlDmDDF * iDDF

CNSmlDmDDF * iDDF [private]

Pointer to DDF

TInt iDDFCrc

TInt iDDFCrc [private]

DDF checsum

TBool iInTransaction

TBool iInTransaction [private]

Atomic operation is going on or not

TBool iInternalCommand

TBool iInternalCommand [private]

This is set true when command is internal, i.e. status not given to agent

TInt iInternalStatusRef

TInt iInternalStatusRef [private]

Internal status ref

RPointerArray< CNSmlGetPropertyElement > iPropResults

RPointerArray < CNSmlGetPropertyElement > iPropResults [private]

Property result buffer, new element is created for each get to prperty element