CNSmlDmDDF Class Reference

class CNSmlDmDDF : public CBase

DM DDF Handler

Since

Inherits from

Public Member Functions
~CNSmlDmDDF()
voidAddObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const TInt, TBool)
TBool CheckAclL(const TDesC8 &, TNSmlDmCmdType)
TAccess CheckURIL(const TDesC8 &, TNSmlDmCmdType)
voidCommitAtomicL()
voidCopyObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt)
voidDeleteObjectL(const TDesC8 &, const TInt)
voidDisconnectFromOtherServers()
voidEndMessageL()
voidExecuteObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, TInt, const TDesC8 &, TBool)
voidFetchObjectL(const TDesC8 &, const TDesC8 &, const TInt, const TInt, TBool)
voidFetchObjectSizeL(const TDesC8 &, const TDesC8 &, const TInt, const TInt)
voidGenerateDDFL(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 &)
voidMarkGenAlertsSentL()
voidMarkGenAlertsSentL(const TDesC8 &)
voidMoreDataL(CBufBase *&)
CNSmlDmDDF *NewL(CNSmlDmModule &)
voidRollbackAtomicL()
voidSetMappingL(const TDesC8 &, const TDesC8 &)
voidSetResultsL(TInt, CBufBase &, const TDesC8 &, TInt, TInt8)
voidSetServerL(const TDesC8 &)
voidSetStatusL(TInt, CSmlDmAdapter::TError)
voidStartAtomicL()
voidUpdateAclL(const TDesC8 &, const TDesC8 &, const TInt)
voidUpdateObjectL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const TInt, TBool, TInt)
Private Member Functions
CNSmlDmDDF(CNSmlDmModule &)
TUriCheck CheckAdapterL(const TDesC8 &, TUint8 &)
voidConstructL()
voidDeleteandAddStatusRefsL(TInt, MSmlDmAdapter::TError)
voidRemoveEndAndBeginSlashes(CBufBase &)
voidUpdateAddNodeListL(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
enumTAccess { EOk, ENotAccess, ENotExist }
Private Member Enumerations
enumTUriCheck { 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)

voidAddObjectL(const TDesC8 &aURI,
const TDesC8 &aObject,
const TDesC8 &aType,
const TIntaStatusRef,
TBoolaLargeItem = EFalse
)

Add operation in DM protocoll

Parameters

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

CheckAclL(const TDesC8 &, TNSmlDmCmdType)

TBool CheckAclL(const TDesC8 &aURI,
TNSmlDmCmdTypeaCmdType
)

Check ACL rights.

Parameters

const TDesC8 & aURITarget URI in command
TNSmlDmCmdType aCmdTypeCommand 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 & aURITarget URI in command
TUint8 & aAccessAccess type is written to this parameter

CheckURIL(const TDesC8 &, TNSmlDmCmdType)

TAccess CheckURIL(const TDesC8 &aURI,
TNSmlDmCmdTypeaCmd
)

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

Parameters

const TDesC8 & aURITarget URI in command
TNSmlDmCmdType aCmd

CommitAtomicL()

voidCommitAtomicL()

Commit atomic indication

ConstructL()

voidConstructL()[private]

Second phase constructor

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

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

DeleteObjectL(const TDesC8 &, const TInt)

voidDeleteObjectL(const TDesC8 &aURI,
const TIntaStatusRef
)

Delete operation in DM protocoll

Parameters

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

DeleteandAddStatusRefsL(TInt, MSmlDmAdapter::TError)

voidDeleteandAddStatusRefsL(TIntaStatusRef,
MSmlDmAdapter::TErroraErrorCode
)[private]

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

Parameters

TInt aStatusRefReference information to status element
MSmlDmAdapter::TError aErrorCodeStatus code from plug-in adapter

DisconnectFromOtherServers()

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.

EndMessageL()

voidEndMessageL()

Indicates message ending

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

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 & aCorrelator
TBool aLargeItem = EFalseIndicates if object comes in multiple messages or not

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

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

Get operation in DM protocoll

Parameters

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

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

voidFetchObjectSizeL(const TDesC8 &aURI,
const TDesC8 &aType,
const TIntaResultsRef,
const TIntaStatusRef
)

Get size property operation in DM protocoll

Parameters

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

GenerateDDFL(CBufBase &)

voidGenerateDDFL(CBufBase &aObject)

Generates xml of ddf structure

Parameters

CBufBase & aObjectReferencet 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 & aURITarget URI in command
CBufBase & aACLReference 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 & aURITarget URI in command
CBufBase & aObjectReference to buffer where to write data

GetFormatAllocL(const TDesC8 &)

HBufC8 *GetFormatAllocL(const TDesC8 &aURI)

Gets and allocates format in DDF

Parameters

const TDesC8 & aURITarget 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 & aURIUri to be serched

GetMimeTypeL(const TDesC8 &, CBufBase &)

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

Gets and allocates format in DDF

Parameters

const TDesC8 & aURITarget URI in command
CBufBase & aObjectReference 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 & aURITarget URI in command
CBufBase & aObjectReference 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 & aURITarget URI in command

MarkGenAlertsSentL()

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

voidMarkGenAlertsSentL(const TDesC8 &aURI)

Parameters

const TDesC8 & aURI

MoreDataL(CBufBase *&)

voidMoreDataL(CBufBase *&aData)

Get more data in case of getting largeobject

Parameters

CBufBase *& aDataReference to buffer where to write data

NewL(CNSmlDmModule &)

CNSmlDmDDF *NewL(CNSmlDmModule &aDmModule)[static]

Two-phased constructor.

Parameters

CNSmlDmModule & aDmModuleReference to dmModule class

RemoveEndAndBeginSlashes(CBufBase &)

voidRemoveEndAndBeginSlashes(CBufBase &aObject)const [private]

Removes end and begin slashes from aObject

Parameters

CBufBase & aObjectChild list data from plug-in adapter

RollbackAtomicL()

voidRollbackAtomicL()

Rollback atomic indication

SetMappingL(const TDesC8 &, const TDesC8 &)

voidSetMappingL(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 & aURIUri to be mapped
const TDesC8 & aLUID

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

voidSetResultsL(TIntaResultsRef,
CBufBase &aObject,
const TDesC8 &aType,
TIntaTotalSize,
TInt8aSessionId =  KErrNotFound
)

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

Parameters

TInt aResultsRef
CBufBase & aObjectResult data
const TDesC8 & aTypeMime type of data
TInt aTotalSizeTotal 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 &)

voidSetServerL(const TDesC8 &aServerId)

Sets the server identifier

Parameters

const TDesC8 & aServerId

SetStatusL(TInt, CSmlDmAdapter::TError)

voidSetStatusL(TIntaStatusRef,
CSmlDmAdapter::TErroraErrorCode
)

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

Parameters

TInt aStatusRefReference information to status element
CSmlDmAdapter::TError aErrorCodeStatus code from plug-in adapter

StartAtomicL()

voidStartAtomicL()

Start atomic indication

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

voidUpdateAclL(const TDesC8 &aURI,
const TDesC8 &aACL,
const TIntaStatusRef
)

Replace ACL operation in DM protocoll

Parameters

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

UpdateAddNodeListL(const TDesC8 &)

voidUpdateAddNodeListL(const TDesC8 &aURI)[private]

Buffers the internal nodes added in a session

Parameters

const TDesC8 & aURITarget URI in command

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

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

Replace operation in DM protocoll

Parameters

const TDesC8 & aURITarget URI in command
const TDesC8 & aObjectData
const TDesC8 & aTypeMime type
const TInt aStatusRefReference to status element
TBool aLargeItem = EFalseIndicates 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