CNSmlDmDDF Class Reference

class CNSmlDmDDF : public CBase

DM DDF Handler

Since

Inherits from

Public Member Functions
~CNSmlDmDDF ()
void AddObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const TInt , TBool )
TBool CheckAclL (const TDesC8 &, TNSmlDmCmdType )
TAccess CheckURIL (const TDesC8 &, TNSmlDmCmdType )
void CommitAtomicL ()
void CopyObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt )
void DeleteObjectL (const TDesC8 &, const TInt )
void DisconnectFromOtherServers ()
void EndMessageL ()
void ExecuteObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt , const TDesC8 &, TBool )
void FetchObjectL (const TDesC8 &, const TDesC8 &, const TInt , const TInt , TBool )
void FetchObjectSizeL (const TDesC8 &, const TDesC8 &, const TInt , const TInt )
void GenerateDDFL ( CBufBase &)
TInt GetAclL (const TDesC8 &, CBufBase &)
TInt GetCaseSenseL (const TDesC8 &, CBufBase &)
HBufC8 * GetFormatAllocL (const TDesC8 &)
HBufC8 * GetLuidAllocL (const TDesC8 &)
TInt GetMimeTypeL (const TDesC8 &, CBufBase &)
TInt GetNameL (const TDesC8 &, CBufBase &)
TInt IsDDFChangedL ()
TNSmlDmDDFFormat IsLeafL (const TDesC8 &)
void MarkGenAlertsSentL ()
void MarkGenAlertsSentL (const TDesC8 &)
void MoreDataL ( CBufBase *&)
CNSmlDmDDF * NewL ( CNSmlDmModule &)
void RollbackAtomicL ()
void SetMappingL (const TDesC8 &, const TDesC8 &)
void SetResultsL ( TInt , CBufBase &, const TDesC8 &, TInt , TInt8 )
void SetServerL (const TDesC8 &)
void SetStatusL ( TInt , CSmlDmAdapter::TError)
void StartAtomicL ()
void UpdateAclL (const TDesC8 &, const TDesC8 &, const TInt )
void UpdateObjectL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const TInt , TBool , TInt )
Private Member Functions
CNSmlDmDDF ( CNSmlDmModule &)
TUriCheck CheckAdapterL (const TDesC8 &, TUint8 &)
void ConstructL ()
void DeleteandAddStatusRefsL ( TInt , MSmlDmAdapter::TError )
void RemoveEndAndBeginSlashes ( CBufBase &)
void UpdateAddNodeListL (const TDesC8 &)
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()
Public Member Enumerations
enum TAccess { EOk , ENotAccess , ENotExist }
Private Member Enumerations
enum TUriCheck { EPassAdapter , EBeforeAdapter , EUriNotFound }
Private Attributes
TUint32 iAdapterId
RPointerArray < CNSmlCallbackElement > iAddNodeStatusRefs
HBufC8 * iAddRootNodesList
RNSmlDMCallbackSession iDbSession
RPointerArray < CNSmlCallbackElement > iDeleteStatusRefs
CNSmlDmModule & iDmModule
CNSmlDmMgmtTree * iMgmtTree
TUint8 iOkSessions
RPointerArray < CNSmlCallbackElement > iResultRefs
TInt8 iResultSessionId
RArray < RNSmlDMDataSession > iSessionArray
TUint8 iSessionId

Constructor & Destructor Documentation

CNSmlDmDDF(CNSmlDmModule &)

CNSmlDmDDF ( CNSmlDmModule & aDmModule ) [private]

Constructor

Parameters

CNSmlDmModule & aDmModule

~CNSmlDmDDF()

~CNSmlDmDDF ( ) [virtual]

Destructor

Member Functions Documentation

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

void AddObjectL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
const 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
const TInt aStatusRef Reference to status element
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not

CheckAclL(const TDesC8 &, TNSmlDmCmdType)

TBool CheckAclL ( const TDesC8 & aURI,
TNSmlDmCmdType aCmdType
)

Check ACL rights.

Parameters

const TDesC8 & aURI Target URI in command
TNSmlDmCmdType aCmdType Command type or not

CheckAdapterL(const TDesC8 &, TUint8 &)

TUriCheck CheckAdapterL ( const TDesC8 & aURI,
TUint8 & aAccess
) [private]

Set the member variables point to correct plug-in adapter and correct host server and gets the access type of node

Parameters

const TDesC8 & aURI Target URI in command
TUint8 & aAccess Access type is written to this parameter

CheckURIL(const TDesC8 &, TNSmlDmCmdType)

TAccess CheckURIL ( const TDesC8 & aURI,
TNSmlDmCmdType aCmd
)

Checks URI and access type and set the member variables point to correct plug-in adapter and correct host server

Parameters

const TDesC8 & aURI Target URI in command
TNSmlDmCmdType aCmd

CommitAtomicL()

void CommitAtomicL ( )

Commit atomic indication

ConstructL()

void ConstructL ( ) [private]

Second phase constructor

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

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

DeleteObjectL(const TDesC8 &, const TInt)

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

Delete operation in DM protocoll

Parameters

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

DeleteandAddStatusRefsL(TInt, MSmlDmAdapter::TError)

void DeleteandAddStatusRefsL ( TInt aStatusRef,
MSmlDmAdapter::TError aErrorCode
) [private]

Cleans array of delete elements and updates the add node elements array

Parameters

TInt aStatusRef Reference information to status element
MSmlDmAdapter::TError aErrorCode Status code from plug-in adapter

DisconnectFromOtherServers()

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.

EndMessageL()

void EndMessageL ( )

Indicates message ending

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

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
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not

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

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

Get operation in DM protocoll

Parameters

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

FetchObjectSizeL(const TDesC8 &, const TDesC8 &, const TInt, const TInt)

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

Get size property operation in DM protocoll

Parameters

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

GenerateDDFL(CBufBase &)

void GenerateDDFL ( CBufBase & aObject )

Generates xml of ddf structure

Parameters

CBufBase & aObject Referencet to buffer where to generata ddf xml

GetAclL(const TDesC8 &, CBufBase &)

TInt GetAclL ( const TDesC8 & aURI,
CBufBase & aACL
)

Get ACL operation in DM protocoll

Parameters

const TDesC8 & aURI Target URI in command
CBufBase & aACL Reference to buffer where to write ACL data

GetCaseSenseL(const TDesC8 &, CBufBase &)

TInt GetCaseSenseL ( const TDesC8 & aURI,
CBufBase & aObject
)

Gets and allocates case sense in DDF

Parameters

const TDesC8 & aURI Target URI in command
CBufBase & aObject Reference to buffer where to write data

GetFormatAllocL(const TDesC8 &)

HBufC8 * GetFormatAllocL ( const TDesC8 & aURI )

Gets and allocates format in DDF

Parameters

const TDesC8 & aURI Target URI in command

GetLuidAllocL(const TDesC8 &)

HBufC8 * GetLuidAllocL ( const TDesC8 & aURI )

Gets and allocs luid mapped to aURI. Allocs KNullDesC8 if not exist. status to command

Parameters

const TDesC8 & aURI Uri to be serched

GetMimeTypeL(const TDesC8 &, CBufBase &)

TInt GetMimeTypeL ( const TDesC8 & aURI,
CBufBase & aObject
)

Gets and allocates format in DDF

Parameters

const TDesC8 & aURI Target URI in command
CBufBase & aObject Reference to buffer where to write data

GetNameL(const TDesC8 &, CBufBase &)

TInt GetNameL ( const TDesC8 & aURI,
CBufBase & aObject
)

Gets and allocates name in DDF

Parameters

const TDesC8 & aURI Target URI in command
CBufBase & aObject Reference to buffer where to write data

IsDDFChangedL()

TInt IsDDFChangedL ( )

Creates sessions to Host Servers, asks ddf:s and calculates checksum of all the ddf versions of plug-in adapters

IsLeafL(const TDesC8 &)

TNSmlDmDDFFormat IsLeafL ( const TDesC8 & aURI )

Checks if node is leaf or interior node

Parameters

const TDesC8 & aURI Target URI in command

MarkGenAlertsSentL()

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 &)

void MarkGenAlertsSentL ( const TDesC8 & aURI )

Parameters

const TDesC8 & aURI

MoreDataL(CBufBase *&)

void MoreDataL ( CBufBase *& aData )

Get more data in case of getting largeobject

Parameters

CBufBase *& aData Reference to buffer where to write data

NewL(CNSmlDmModule &)

CNSmlDmDDF * NewL ( CNSmlDmModule & aDmModule ) [static]

Two-phased constructor.

Parameters

CNSmlDmModule & aDmModule Reference to dmModule class

RemoveEndAndBeginSlashes(CBufBase &)

void RemoveEndAndBeginSlashes ( CBufBase & aObject ) const [private]

Removes end and begin slashes from aObject

Parameters

CBufBase & aObject Child list data from plug-in adapter

RollbackAtomicL()

void RollbackAtomicL ( )

Rollback atomic indication

SetMappingL(const TDesC8 &, const TDesC8 &)

void SetMappingL ( const TDesC8 & aURI,
const TDesC8 & aLUID
)

"Callback" method. This is called when plug-in adapter makes new new mapping, i.e. maps aLuid to aURI

Parameters

const TDesC8 & aURI Uri to be mapped
const TDesC8 & aLUID

SetResultsL(TInt, CBufBase &, const TDesC8 &, TInt, TInt8)

void SetResultsL ( TInt aResultsRef,
CBufBase & aObject,
const TDesC8 & aType,
TInt aTotalSize,
TInt8 aSessionId =  KErrNotFound
)

"Callback" method. This is called when plug-in adapter has given result to get command

Parameters

TInt aResultsRef
CBufBase & aObject Result data
const TDesC8 & aType Mime type of data
TInt aTotalSize Total size of data. In case of large object, this is different from aObject size.
TInt8 aSessionId =  KErrNotFound Id of host session, this is given in case of large object -> module keeps the information until whole item is read

SetServerL(const TDesC8 &)

void SetServerL ( const TDesC8 & aServerId )

Sets the server identifier

Parameters

const TDesC8 & aServerId

SetStatusL(TInt, CSmlDmAdapter::TError)

void SetStatusL ( TInt aStatusRef,
CSmlDmAdapter::TError aErrorCode
)

"Callback" method. This is called when plug-in adapter has given status to command

Parameters

TInt aStatusRef Reference information to status element
CSmlDmAdapter::TError aErrorCode Status code from plug-in adapter

StartAtomicL()

void StartAtomicL ( )

Start atomic indication

UpdateAclL(const TDesC8 &, const TDesC8 &, const TInt)

void UpdateAclL ( const TDesC8 & aURI,
const TDesC8 & aACL,
const TInt aStatusRef
)

Replace ACL operation in DM protocoll

Parameters

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

UpdateAddNodeListL(const TDesC8 &)

void UpdateAddNodeListL ( const TDesC8 & aURI ) [private]

Buffers the internal nodes added in a session

Parameters

const TDesC8 & aURI Target URI in command

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

void UpdateObjectL ( const TDesC8 & aURI,
const TDesC8 & aObject,
const TDesC8 & aType,
const 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
const TInt aStatusRef Reference to status element
TBool aLargeItem = EFalse Indicates if object comes in multiple messages or not
TInt aTotSizeOfLarge = 0

Member Enumerations Documentation

Enum TAccess

Enumerators

EOk
ENotAccess
ENotExist

Enum TUriCheck

Enumerators

EPassAdapter
EBeforeAdapter
EUriNotFound

Member Data Documentation

TUint32 iAdapterId

TUint32 iAdapterId [private]

Id of current plug-in adapter

RPointerArray< CNSmlCallbackElement > iAddNodeStatusRefs

RPointerArray < CNSmlCallbackElement > iAddNodeStatusRefs [private]

Array of add node elements, used for setting default acls to node, if the current server does not have acces rigths to it

HBufC8 * iAddRootNodesList

HBufC8 * iAddRootNodesList [private]

Reference of add commands separated by commas

RNSmlDMCallbackSession iDbSession

RNSmlDMCallbackSession iDbSession [private]

Tree database client

RPointerArray< CNSmlCallbackElement > iDeleteStatusRefs

RPointerArray < CNSmlCallbackElement > iDeleteStatusRefs [private]

Array of delete elements, used for cleaning the tree when succesfull delete is executed

CNSmlDmModule & iDmModule

CNSmlDmModule & iDmModule [private]

Reference to DM Module instance

CNSmlDmMgmtTree * iMgmtTree

CNSmlDmMgmtTree * iMgmtTree [private]

Pointer to tree dtd

TUint8 iOkSessions

TUint8 iOkSessions [private]

Status of host sessions

RPointerArray< CNSmlCallbackElement > iResultRefs

RPointerArray < CNSmlCallbackElement > iResultRefs [private]

Array of result elements, used for cleaning the tree when result is got from plug-in adapter

TInt8 iResultSessionId

TInt8 iResultSessionId [private]

Id of current host session in case of getting large object

RArray< RNSmlDMDataSession > iSessionArray

RArray < RNSmlDMDataSession > iSessionArray [private]

Array of host sessions

TUint8 iSessionId

TUint8 iSessionId [private]

Id of current host session