CNSmlDmDbHandler Class Reference

class CNSmlDmDbHandler : public CBase

CNSmlDmDbHandler is interface to physical tree db database

Since

Inherits from

Public Member Functions
~CNSmlDmDbHandler()
IMPORT_C TIntAddMappingInfoL(TUint32, const TDesC8 &, const TDesC8 &)
IMPORT_C TBoolCheckAclL(const TDesC8 &, TNSmlDmCmdType)
IMPORT_C TIntDefaultACLsToServerL(const TDesC8 &)
IMPORT_C TIntDeleteAclL(const TDesC8 &)
IMPORT_C TIntEraseServerIdL(const TDesC8 &)
IMPORT_C TIntGetAclL(const TDesC8 &, CBufBase &, TBool)
IMPORT_C TIntGetMappingInfoLC(TUint32, const TDesC8 &, HBufC8 *&)
IMPORT_C TIntGetURISegmentListL(TUint32, const TDesC8 &, CArrayFix< TSmlDmMappingInfo > &)
IMPORT_C CNSmlDmDbHandler *NewL()
IMPORT_C CNSmlDmDbHandler *NewLC()
IMPORT_C TIntRemoveMappingInfoL(TUint32, const TDesC8 &, TBool)
IMPORT_C TIntRenameMappingL(TUint32, const TDesC8 &, const TDesC8 &)
IMPORT_C voidSetServerL(const TDesC8 &)
IMPORT_C TIntUpdateAclL(const TDesC8 &, const TDesC8 &)
IMPORT_C voidUpdateMappingInfoL(TUint32, const TDesC8 &, CBufBase &)
IMPORT_C TIntWriteAclInfoToDbL()
IMPORT_C TIntWriteMappingInfoToDbL()
Private Member Functions
voidConstructL()
voidCreateDatabaseL(const TDesC &)
TInt GetAclDataFromDbL()
voidReadAllURIMappingsFromDbL()
voidReadOneLineFromDbL()
TInt RenameAclL(const TDesC8 &, const TDesC8 &)
TInt SearchRowInDbL(TUint32, const TDesC8 &)
TInt SearchUriL(TUint32, const TDesC8 &, TNSmlDmSearchMethod, TInt &, RArray< TInt > &)
voidUpdateInternalArrayL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation, TNSmlDmSearchMethod, const TDesC8 &)
voidUpdateRowInDbL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation)
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
RPointerArray< HBufC8 >iAclURIs
TBool iAclUpToDate
RPointerArray< HBufC8 >iAcls
RPointerArray< CNSmlDmAdapterElement >iAdapters
RDbStoreDatabase iDatabase
CFileStore *iFileStore
RFs iFsSession
TBool iPrepareView
HBufC8 *iServer
TBool iURIMappingsReadFromDb
RDbView iView

Constructor & Destructor Documentation

~CNSmlDmDbHandler()

IMPORT_C~CNSmlDmDbHandler()

Destructor

Member Functions Documentation

AddMappingInfoL(TUint32, const TDesC8 &, const TDesC8 &)

IMPORT_C TIntAddMappingInfoL(TUint32aAdapterId,
const TDesC8 &aURI,
const TDesC8 &aLuid
)

Adds new mapping info to db

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI which is mapped with luid
const TDesC8 & aLuidLuid which is mapped with URI

CheckAclL(const TDesC8 &, TNSmlDmCmdType)

IMPORT_C TBoolCheckAclL(const TDesC8 &aURI,
TNSmlDmCmdTypeaCmdType
)

Check if current server has aacl rights for URI

Parameters

const TDesC8 & aURIURI for checking ACL
TNSmlDmCmdType aCmdTypeType of command (add,..)

ConstructL()

voidConstructL()[private]

CreateDatabaseL(const TDesC &)

voidCreateDatabaseL(const TDesC &aFullName)[private]

Parameters

const TDesC & aFullName

DefaultACLsToServerL(const TDesC8 &)

IMPORT_C TIntDefaultACLsToServerL(const TDesC8 &aURI)

Set default acls to current server for certain URI

Parameters

const TDesC8 & aURIURI which acl is set to default for curren server

DeleteAclL(const TDesC8 &)

IMPORT_C TIntDeleteAclL(const TDesC8 &aURI)

Delete ACL which is set to URI

Parameters

const TDesC8 & aURIURI from which the acl info must be deleted

EraseServerIdL(const TDesC8 &)

IMPORT_C TIntEraseServerIdL(const TDesC8 &aServerId)

Erase server references from all the acls

Parameters

const TDesC8 & aServerId

GetAclDataFromDbL()

TInt GetAclDataFromDbL()[private]

GetAclL(const TDesC8 &, CBufBase &, TBool)

IMPORT_C TIntGetAclL(const TDesC8 &aURI,
CBufBase &aACL,
TBoolaInherited = ETrue
)

Get ACL which is set for URI

Parameters

const TDesC8 & aURIURI for returning the ACL info
CBufBase & aACLBuffer for writing the found acl
TBool aInherited = ETrueIf true, the inherited value is given if the ACL is not set to given URI

GetMappingInfoLC(TUint32, const TDesC8 &, HBufC8 *&)

IMPORT_C TIntGetMappingInfoLC(TUint32aAdapterId,
const TDesC8 &aURI,
HBufC8 *&aLuid
)

Get mapping info from db

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI for returning the mapped luid
HBufC8 *& aLuidBuffer for writing the mapped luid

GetURISegmentListL(TUint32, const TDesC8 &, CArrayFix< TSmlDmMappingInfo > &)

IMPORT_C TIntGetURISegmentListL(TUint32aAdapterId,
const TDesC8 &aURI,
CArrayFix< TSmlDmMappingInfo > &aURISegList
)

Get list of mappings in certain level

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI which should be renamed
CArrayFix< TSmlDmMappingInfo > & aURISegListReference to list where to write list of mappings

NewL()

IMPORT_C CNSmlDmDbHandler *NewL()[static]

Two-phased constructor

NewLC()

IMPORT_C CNSmlDmDbHandler *NewLC()[static]

Two-phased constructor, leaves pointer to cleanup stack

ReadAllURIMappingsFromDbL()

voidReadAllURIMappingsFromDbL()[private]

ReadOneLineFromDbL()

voidReadOneLineFromDbL()[private]

RemoveMappingInfoL(TUint32, const TDesC8 &, TBool)

IMPORT_C TIntRemoveMappingInfoL(TUint32aAdapterId,
const TDesC8 &aURI,
TBoolaChildAlso = ETrue
)

Removes mapping info

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI which should be deleted from mappings
TBool aChildAlso = ETrueIf true, also child uries are removed

RenameAclL(const TDesC8 &, const TDesC8 &)

TInt RenameAclL(const TDesC8 &aURI,
const TDesC8 &aNewURI
)[private]

Parameters

const TDesC8 & aURI
const TDesC8 & aNewURI

RenameMappingL(TUint32, const TDesC8 &, const TDesC8 &)

IMPORT_C TIntRenameMappingL(TUint32aAdapterId,
const TDesC8 &aURI,
const TDesC8 &aObject
)

Renames mapping info

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI which should be renamed
const TDesC8 & aObjectNew name, i.e. last uri segment

SearchRowInDbL(TUint32, const TDesC8 &)

TInt SearchRowInDbL(TUint32aAdapterId,
const TDesC8 &aURI
)[private]

Parameters

TUint32 aAdapterId
const TDesC8 & aURI

SearchUriL(TUint32, const TDesC8 &, TNSmlDmSearchMethod, TInt &, RArray< TInt > &)

TInt SearchUriL(TUint32aAdapterId,
const TDesC8 &aURI,
TNSmlDmSearchMethodaSearchMethod,
TInt &aAdIndex,
RArray< TInt > &aUriIndex
)[private]

Parameters

TUint32 aAdapterId
const TDesC8 & aURI
TNSmlDmSearchMethod aSearchMethod
TInt & aAdIndex
RArray< TInt > & aUriIndex

SetServerL(const TDesC8 &)

IMPORT_C voidSetServerL(const TDesC8 &aServerId)

Sets server id. This is not stored, this is set at the beginning of session fro checkin acls

Parameters

const TDesC8 & aServerIdServer identifier

UpdateAclL(const TDesC8 &, const TDesC8 &)

IMPORT_C TIntUpdateAclL(const TDesC8 &aURI,
const TDesC8 &aACL
)

Update ACL for URI

Parameters

const TDesC8 & aURIURI for updating the ACL info
const TDesC8 & aACL

UpdateInternalArrayL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation, TNSmlDmSearchMethod, const TDesC8 &)

voidUpdateInternalArrayL(TUint32aAdapterId,
const TDesC8 &aURI,
const TDesC8 &aLUID,
TNSmlDmMapOperationaOperation,
TNSmlDmSearchMethodaMethod,
const TDesC8 &aNwUri =  KNullDesC8
)[private]

Parameters

TUint32 aAdapterId
const TDesC8 & aURI
const TDesC8 & aLUID
TNSmlDmMapOperation aOperation
TNSmlDmSearchMethod aMethod
const TDesC8 & aNwUri =  KNullDesC8

UpdateMappingInfoL(TUint32, const TDesC8 &, CBufBase &)

IMPORT_C voidUpdateMappingInfoL(TUint32aAdapterId,
const TDesC8 &aURI,
CBufBase &aCurrentList
)

Clears the tree when child list is got from plug-in adapter

Parameters

TUint32 aAdapterIdAdapter id
const TDesC8 & aURIURI which should be renamed
CBufBase & aCurrentListList of children. The mappings which are not in list are removed

UpdateRowInDbL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation)

voidUpdateRowInDbL(TUint32aAdapterId,
const TDesC8 &aURI,
const TDesC8 &aLUID,
TNSmlDmMapOperationaOperation
)[private]

Parameters

TUint32 aAdapterId
const TDesC8 & aURI
const TDesC8 & aLUID
TNSmlDmMapOperation aOperation

WriteAclInfoToDbL()

IMPORT_C TIntWriteAclInfoToDbL()

Write ACLs from memory to db

WriteMappingInfoToDbL()

IMPORT_C TIntWriteMappingInfoToDbL()

Writes mappings from memory to database

Member Data Documentation

RPointerArray< HBufC8 > iAclURIs

RPointerArray< HBufC8 >iAclURIs[private]

TBool iAclUpToDate

TBool iAclUpToDate[private]

RPointerArray< HBufC8 > iAcls

RPointerArray< HBufC8 >iAcls[private]

RPointerArray< CNSmlDmAdapterElement > iAdapters

RPointerArray< CNSmlDmAdapterElement >iAdapters[private]

RDbStoreDatabase iDatabase

RDbStoreDatabase iDatabase[private]

CFileStore * iFileStore

CFileStore *iFileStore[private]

RFs iFsSession

RFs iFsSession[private]

TBool iPrepareView

TBool iPrepareView[private]

HBufC8 * iServer

HBufC8 *iServer[private]

TBool iURIMappingsReadFromDb

TBool iURIMappingsReadFromDb[private]

RDbView iView

RDbView iView[private]