CNSmlDmModule Class Reference

class CNSmlDmModule : public CBase

Inherits from

Public Member Functions
~CNSmlDmModule()
IMPORT_C voidAddObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TBool)
IMPORT_C voidCommitTransactionL()
IMPORT_C voidCopyObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt)
voidDeleteInTransactionL(const TDesC8 &, MNSmlDmModuleCallBack *)
IMPORT_C voidDeleteObjectL(const TDesC8 &, TInt)
IMPORT_C voidDisconnectFromOtherServers()
voidDoSetResultsL(TInt, CBufBase &, const TDesC8 &, const TDesC8 &, TInt, TBool)
voidDoSetStatusL(TInt, TInt, TBool)
IMPORT_C voidEndMessageL()
IMPORT_C voidExecuteObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, const TDesC8 &, TBool)
IMPORT_C voidFetchObjectL(const TDesC8 &, const TDesC8 &, TInt, TInt, TBool)
voidGetPropertyL(const TDesC8 &, const TDesC8 &, TInt, TInt, TInt)
IMPORT_C TIntIsDDFChangedL()
IMPORT_C voidMarkGenAlertsSentL()
IMPORT_C voidMarkGenAlertsSentL(const TDesC8 &)
IMPORT_C voidMoreDataL(CBufBase *&)
IMPORT_C CNSmlDmModule *NewL(MNSmlDmModuleCallBack *)
IMPORT_C voidRollBackL()
IMPORT_C voidSetServerL(const TDesC8 &)
IMPORT_C voidStartTransactionL()
IMPORT_C voidUpdateObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TBool, TInt)
voidUpdatePropertyL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, TInt)
Private Member Functions
voidConstructL()
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 voidAddObjectL(const TDesC8 &aURI,
const TDesC8 &aObject,
const TDesC8 &aType,
TIntaStatusRef,
TBoolaLargeItem = EFalse
)

Add operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aObjectData
const TDesC8 & aTypeMime type
TInt aStatusRefReference to status element
TBool aLargeItem = EFalseIndicates if object comes in multiple messages or not

CommitTransactionL()

IMPORT_C voidCommitTransactionL()

Commit Atomic operation

ConstructL()

voidConstructL()[private]

Second phase constructor.

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

IMPORT_C voidCopyObjectL(const TDesC8 &aTargetURI,
const TDesC8 &aSourceURI,
const TDesC8 &aType,
TIntaStatusRef
)

Copy operation in DM protocoll.

Parameters

const TDesC8 & aTargetURITarget URI in command
const TDesC8 & aSourceURISource URI in command
const TDesC8 & aTypeMime type
TInt aStatusRefReference to status element or not

DeleteInTransactionL(const TDesC8 &, MNSmlDmModuleCallBack *)

voidDeleteInTransactionL(const TDesC8 &aURI,
MNSmlDmModuleCallBack *aCallBack
)

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

Parameters

const TDesC8 & aURITarget URI to be deleted
MNSmlDmModuleCallBack * aCallBackTemporary callback interface for internal commands -> status not given to agent

DeleteObjectL(const TDesC8 &, TInt)

IMPORT_C voidDeleteObjectL(const TDesC8 &aURI,
TIntaStatusRef
)

Delete operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
TInt aStatusRefReference to status element

DisconnectFromOtherServers()

IMPORT_C voidDisconnectFromOtherServers()

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)

voidDoSetResultsL(TIntaResultsRef,
CBufBase &aObject,
const TDesC8 &aType,
const TDesC8 &aFormat,
TIntaTotalSize,
TBoolaSkipCmdBuf = EFalse
)

Sets the result to caller by using callback interface

Parameters

TInt aResultsRefReference to result element
CBufBase & aObjectResult data to be given
const TDesC8 & aTypeMime type of object
const TDesC8 & aFormatFormat of object, got from ddf
TInt aTotalSizeTotal size of object, in case of large object, this is different from aObject size
TBool aSkipCmdBuf = EFalseIndicates that status is given to agent despite existance of command buffer

DoSetStatusL(TInt, TInt, TBool)

voidDoSetStatusL(TIntaStatusRef,
TIntaStatusCode,
TBoolaSkipCmdBuf = EFalse
)

The status is provided throug this function to caller

Parameters

TInt aStatusRefReference to status element
TInt aStatusCodeStatus code to be given
TBool aSkipCmdBuf = EFalseIndicates that status is given to agent despite existance of command buffer

EndMessageL()

IMPORT_C voidEndMessageL()

Indicates message ending

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

IMPORT_C voidExecuteObjectL(const TDesC8 &aURI,
const TDesC8 &aObject,
const TDesC8 &aType,
TIntaStatusRef,
const TDesC8 &aCorrelator,
TBoolaLargeItem = EFalse
)

Execute operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aObjectData
const TDesC8 & aTypeMime type
TInt aStatusRefReference to status element
const TDesC8 & aCorrelatorCorrelator received as an argument in the exec command.
TBool aLargeItem = EFalseIndicates if object comes in multiple messages or not

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

IMPORT_C voidFetchObjectL(const TDesC8 &aURI,
const TDesC8 &aType,
TIntaResultsRef,
TIntaStatusRef,
TBoolaAclPass = EFalse
)

Get operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aTypeMime type
TInt aResultsRefReference to result element
TInt aStatusRefReference to status element
TBool aAclPass = EFalsePasses acl checking if true

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

voidGetPropertyL(const TDesC8 &aURI,
const TDesC8 &aType,
TIntaOffset,
TIntaResultsRef,
TIntaStatusRef
)

Get property operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aTypeMime type
TInt aOffsetProperty start offset in aURI
TInt aResultsRefReference to result element
TInt aStatusRefReference to status element

HandlePropertyResultsL(TInt, CBufBase &)

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

Sets the real property result in case that property fetched

Parameters

TInt aIndexIndex in property result buffer
CBufBase & aObjectResult data to be given

IsDDFChangedL()

IMPORT_C TIntIsDDFChangedL()

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

MarkGenAlertsSentL()

IMPORT_C voidMarkGenAlertsSentL()

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 voidMarkGenAlertsSentL(const TDesC8 &aURI)

Parameters

const TDesC8 & aURI

MoreDataL(CBufBase *&)

IMPORT_C voidMoreDataL(CBufBase *&aData)

Gets more data in case of largeobject

Parameters

CBufBase *& aDataReference to buffer where to add more data

NewL(MNSmlDmModuleCallBack *)

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

Two-phased constructor.

Parameters

MNSmlDmModuleCallBack * aCallBackCallback pointer

RollBackL()

IMPORT_C voidRollBackL()

Rollback Atomic operation

SetServerL(const TDesC8 &)

IMPORT_C voidSetServerL(const TDesC8 &aServer)

Sets the server identifier

Parameters

const TDesC8 & aServerThe server id of current session

StartTransactionL()

IMPORT_C voidStartTransactionL()

Start Atomic operation

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

IMPORT_C voidUpdateObjectL(const TDesC8 &aURI,
const TDesC8 &aObject,
const TDesC8 &aType,
TIntaStatusRef,
TBoolaLargeItem = EFalse,
TIntaTotSizeOfLarge = 0
)

Replace operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aObjectData
const TDesC8 & aTypeMime type
TInt aStatusRefReference to status element
TBool aLargeItem = EFalseIndicates if object comes in multiple messages or not
TInt aTotSizeOfLarge = 0The overall size of the large object. Sent with the first chunk.

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

voidUpdatePropertyL(const TDesC8 &aURI,
const TDesC8 &aObject,
const TDesC8 &aType,
TIntaOffset,
TIntaStatusRef
)

Replace property operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aObjectData
const TDesC8 & aTypeMime type
TInt aOffsetProperty start offset in aURI
TInt aStatusRefReference 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