CNSmlDmDbHandler Class Reference
class CNSmlDmDbHandler : public CBase
|
Public Member Functions
|
|
~CNSmlDmDbHandler
()
|
IMPORT_C
TInt
|
AddMappingInfoL
(
TUint32
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C
TBool
|
CheckAclL
(const
TDesC8
&,
TNSmlDmCmdType
)
|
IMPORT_C
TInt
|
DefaultACLsToServerL
(const
TDesC8
&)
|
IMPORT_C
TInt
|
DeleteAclL
(const
TDesC8
&)
|
IMPORT_C
TInt
|
EraseServerIdL
(const
TDesC8
&)
|
IMPORT_C
TInt
|
GetAclL
(const
TDesC8
&,
CBufBase
&,
TBool
)
|
IMPORT_C
TInt
|
GetMappingInfoLC
(
TUint32
, const
TDesC8
&,
HBufC8
*&)
|
IMPORT_C
TInt
|
GetURISegmentListL
(
TUint32
, const
TDesC8
&,
CArrayFix
<
TSmlDmMappingInfo
> &)
|
IMPORT_C
CNSmlDmDbHandler
*
|
NewL
()
|
IMPORT_C
CNSmlDmDbHandler
*
|
NewLC
()
|
IMPORT_C
TInt
|
RemoveMappingInfoL
(
TUint32
, const
TDesC8
&,
TBool
)
|
IMPORT_C
TInt
|
RenameMappingL
(
TUint32
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C void
|
SetServerL
(const
TDesC8
&)
|
IMPORT_C
TInt
|
UpdateAclL
(const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C void
|
UpdateMappingInfoL
(
TUint32
, const
TDesC8
&,
CBufBase
&)
|
IMPORT_C
TInt
|
WriteAclInfoToDbL
()
|
IMPORT_C
TInt
|
WriteMappingInfoToDbL
()
|
Private Member Functions
|
void
|
ConstructL
()
|
void
|
CreateDatabaseL
(const
TDesC
&)
|
TInt
|
GetAclDataFromDbL
()
|
void
|
ReadAllURIMappingsFromDbL
()
|
void
|
ReadOneLineFromDbL
()
|
TInt
|
RenameAclL
(const
TDesC8
&, const
TDesC8
&)
|
TInt
|
SearchRowInDbL
(
TUint32
, const
TDesC8
&)
|
TInt
|
SearchUriL
(
TUint32
, const
TDesC8
&,
TNSmlDmSearchMethod
,
TInt
&,
RArray
<
TInt
> &)
|
void
|
UpdateInternalArrayL
(
TUint32
, const
TDesC8
&, const
TDesC8
&,
TNSmlDmMapOperation
,
TNSmlDmSearchMethod
, const
TDesC8
&)
|
void
|
UpdateRowInDbL
(
TUint32
, const
TDesC8
&, const
TDesC8
&,
TNSmlDmMapOperation
)
|
Constructor & Destructor Documentation
~CNSmlDmDbHandler()
IMPORT_C
|
~CNSmlDmDbHandler
|
(
|
)
|
|
Member Functions Documentation
AddMappingInfoL(TUint32, const TDesC8 &, const TDesC8 &)
Adds new mapping info to db
Parameters
TUint32
aAdapterId
|
Adapter id
|
const
TDesC8
& aURI
|
URI which is mapped with luid
|
const
TDesC8
& aLuid
|
Luid which is mapped with URI
|
CheckAclL(const TDesC8 &, TNSmlDmCmdType)
IMPORT_C
TBool
|
CheckAclL
|
(
|
const
TDesC8
&
|
aURI,
|
|
TNSmlDmCmdType
|
aCmdType
|
|
)
|
|
Check if current server has aacl rights for URI
Parameters
const
TDesC8
& aURI
|
URI for checking ACL
|
TNSmlDmCmdType
aCmdType
|
Type of command (add,..)
|
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
CreateDatabaseL(const TDesC &)
void
|
CreateDatabaseL
|
(
|
const
TDesC
&
|
aFullName
|
)
|
[private]
|
DefaultACLsToServerL(const TDesC8 &)
IMPORT_C
TInt
|
DefaultACLsToServerL
|
(
|
const
TDesC8
&
|
aURI
|
)
|
|
Set default acls to current server for certain URI
Parameters
const
TDesC8
& aURI
|
URI which acl is set to default for curren server
|
DeleteAclL(const TDesC8 &)
Delete ACL which is set to URI
Parameters
const
TDesC8
& aURI
|
URI from which the acl info must be deleted
|
EraseServerIdL(const TDesC8 &)
IMPORT_C
TInt
|
EraseServerIdL
|
(
|
const
TDesC8
&
|
aServerId
|
)
|
|
Erase server references from all the acls
GetAclDataFromDbL()
TInt
|
GetAclDataFromDbL
|
(
|
)
|
[private]
|
GetAclL(const TDesC8 &, CBufBase &, TBool)
Get ACL which is set for URI
Parameters
const
TDesC8
& aURI
|
URI for returning the ACL info
|
CBufBase
& aACL
|
Buffer for writing the found acl
|
TBool
aInherited = ETrue
|
If true, the inherited value is given if the ACL is not set to given URI
|
GetMappingInfoLC(TUint32, const TDesC8 &, HBufC8 *&)
Parameters
TUint32
aAdapterId
|
Adapter id
|
const
TDesC8
& aURI
|
URI for returning the mapped luid
|
HBufC8
*& aLuid
|
Buffer for writing the mapped luid
|
GetURISegmentListL(TUint32, const TDesC8 &, CArrayFix< TSmlDmMappingInfo > &)
Get list of mappings in certain level
NewLC()
Two-phased constructor, leaves pointer to cleanup stack
ReadAllURIMappingsFromDbL()
void
|
ReadAllURIMappingsFromDbL
|
(
|
)
|
[private]
|
ReadOneLineFromDbL()
void
|
ReadOneLineFromDbL
|
(
|
)
|
[private]
|
RemoveMappingInfoL(TUint32, const TDesC8 &, TBool)
Parameters
TUint32
aAdapterId
|
Adapter id
|
const
TDesC8
& aURI
|
URI which should be deleted from mappings
|
TBool
aChildAlso = ETrue
|
If true, also child uries are removed
|
RenameAclL(const TDesC8 &, const TDesC8 &)
RenameMappingL(TUint32, const TDesC8 &, const TDesC8 &)
Parameters
TUint32
aAdapterId
|
Adapter id
|
const
TDesC8
& aURI
|
URI which should be renamed
|
const
TDesC8
& aObject
|
New name, i.e. last uri segment
|
SearchRowInDbL(TUint32, const TDesC8 &)
SearchUriL(TUint32, const TDesC8 &, TNSmlDmSearchMethod, TInt &, RArray< TInt > &)
SetServerL(const TDesC8 &)
IMPORT_C void
|
SetServerL
|
(
|
const
TDesC8
&
|
aServerId
|
)
|
|
Sets server id. This is not stored, this is set at the beginning of session fro checkin acls
Parameters
const
TDesC8
& aServerId
|
Server identifier
|
UpdateAclL(const TDesC8 &, const TDesC8 &)
Parameters
const
TDesC8
& aURI
|
URI for updating the ACL info
|
const
TDesC8
& aACL
|
|
UpdateInternalArrayL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation, TNSmlDmSearchMethod, const TDesC8 &)
void
|
UpdateInternalArrayL
|
(
|
TUint32
|
aAdapterId,
|
|
const
TDesC8
&
|
aURI,
|
|
const
TDesC8
&
|
aLUID,
|
|
TNSmlDmMapOperation
|
aOperation,
|
|
TNSmlDmSearchMethod
|
aMethod,
|
|
const
TDesC8
&
|
aNwUri =
KNullDesC8
|
|
)
|
[private]
|
UpdateMappingInfoL(TUint32, const TDesC8 &, CBufBase &)
Clears the tree when child list is got from plug-in adapter
Parameters
TUint32
aAdapterId
|
Adapter id
|
const
TDesC8
& aURI
|
URI which should be renamed
|
CBufBase
& aCurrentList
|
List of children. The mappings which are not in list are removed
|
UpdateRowInDbL(TUint32, const TDesC8 &, const TDesC8 &, TNSmlDmMapOperation)
void
|
UpdateRowInDbL
|
(
|
TUint32
|
aAdapterId,
|
|
const
TDesC8
&
|
aURI,
|
|
const
TDesC8
&
|
aLUID,
|
|
TNSmlDmMapOperation
|
aOperation
|
|
)
|
[private]
|
WriteAclInfoToDbL()
IMPORT_C
TInt
|
WriteAclInfoToDbL
|
(
|
)
|
|
Write ACLs from memory to db
WriteMappingInfoToDbL()
IMPORT_C
TInt
|
WriteMappingInfoToDbL
|
(
|
)
|
|
Writes mappings from memory to database
Member Data Documentation
RPointerArray< HBufC8 > iAclURIs
TBool
iAclUpToDate
TBool
|
iAclUpToDate
|
[private]
|
RPointerArray< HBufC8 > iAcls
RPointerArray< CNSmlDmAdapterElement > iAdapters
RDbStoreDatabase
iDatabase
TBool
iPrepareView
TBool
|
iPrepareView
|
[private]
|
TBool
iURIMappingsReadFromDb
TBool
|
iURIMappingsReadFromDb
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.