CCPLiwMap Class Reference

class CCPLiwMap : public CLiwMap

Base Map class for Publisher Registry and Content

cputils.dll
Since
S60 v5.0

Inherits from

Public Member Functions
~CCPLiwMap()
TBool ActivateActionSupport()
TBool AtL(TInt, TDes8 &)
TInt Count()
voidExternalizeL(RWriteStream &)
TBool FindL(const TDesC8 &, TLiwVariant &)
IMPORT_C CLiwDefaultList *GetActionTriggersLC()
TBool GetActivateInfo()
IMPORT_C TBoolGetProperty(const TDesC8 &, TInt32 &)
IMPORT_C TBoolGetPropertyL(const TDesC8 &, RBuf &)
IMPORT_C TBoolGetPropertyL(const TDesC8 &, RBuf8 &)
voidInsertL(const TDesC8 &, const TLiwVariant &)
IMPORT_C voidIsValidForActionL()
voidIsValidForAddL()
voidIsValidForDeleteL()
voidIsValidForGetListL()
IMPORT_C voidIsValidForNotificationL()
IMPORT_C CCPLiwMap *NewL(RDesReadStream &)
IMPORT_C CCPLiwMap *NewL(const CLiwGenericParamList &)
IMPORT_C CCPLiwMap *NewL(const CLiwMap &)
IMPORT_C HBufC8 *PackForServerLC()
voidRemove(const TDesC8 &)
IMPORT_C voidReset()
IMPORT_C voidSetSecurityL(const RMessage2 &)
TInt Size()
Protected Member Functions
CCPLiwMap()
TInt32 AddL(RSqlDatabase, CLiwDefaultList *)
TInt32 AddToDbL(RSqlDatabase, CLiwDefaultList *)
voidAppendFilterL(RBuf &, TUint &)
voidAppendGetListFilterL(RBuf &, TUint &)
voidAppendRemoveFilterL(RBuf &, TUint &)
voidAppendSortL(RBuf &, const TCPSortOrder &)
voidBindBinaryL(RSqlStatement &, TInt, const TDesC8 &)
voidBindInt64L(RSqlStatement &, TInt, TInt64)
voidBindIntL(RSqlStatement &, TInt, TInt)
voidBindTextL(RSqlStatement &, TInt, const TDesC &)
voidBindValueL(const RBuf &, RSqlStatement &)
voidCheckIdentifiersL()
TInt ColumnIndexL(RSqlStatement &, const TDesC &)
voidConstructGetListSelectL(RBuf &, TBool)
voidConstructL()
voidConstructRemoveSelectL(RBuf &, TBool)
voidConstructSelectIdL(RBuf &)
voidExtractParamL(const TLiwGenericParam &)
voidFetchIdL(RSqlDatabase, const TDesC &, TInt32 &)
voidFetchIdsL(TInt32, const TDesC &, CLiwDefaultMap *, RSqlDatabase)
voidFillChangeInfoMapL(RSqlStatement &, CLiwDefaultMap *)
TUint GetFilterL()
voidGetIdsOfRemovedEntriesL(RSqlDatabase, const TDesC &, CLiwDefaultList *)
TUint GetListL(RSqlDatabase, CLiwGenericParamList *, RArray< TInt32 > &)
TUint GetListL(RSqlDatabase, const TDesC &, CLiwGenericParamList *, RArray< TInt32 > &)
TCPSortOrder GetSortL()
TBool IsContentIdL()
TBool IsContentTypeL()
TBool IsFlag()
TBool IsGetListAllL(TUint)
TBool IsId()
voidIsProperOperationL(const TLiwVariant &)
TBool IsPropertyValidL(const TDesC8 &)
TBool IsPublisherNameL()
TBool IsTriggerL()
TBool IsTypePublisherL(const TLiwVariant &)
voidPrepareStmtforAddL(RSqlDatabase, RSqlStatement &, const TDesC &)
TBool PropertyExists(const TDesC8 &)
voidRemoveAllAttributeL(TUint &)
voidRemoveL(RSqlDatabase, CLiwDefaultList *)
voidRemoveL(RSqlDatabase, const TDesC &)
voidSaveQueryResultsIdsL(RSqlStatement &, CLiwDefaultList *)
voidSaveQueryResultsL(RSqlStatement &, CLiwGenericParamList &, RArray< TInt32 > &)
voidSetL(const CLiwGenericParamList &)
voidSetL(const CLiwMap &)
voidUpdateL(RSqlDatabase, TInt32, CLiwDefaultList *)
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()
CLiwContainer::CLiwContainer()
CLiwContainer::Close()
CLiwContainer::DecRef()
CLiwContainer::IncRef()
CLiwContainer::PushL()
CLiwContainer::~CLiwContainer()
CLiwMap::operator==(const CLiwMap &)const
Protected Member Enumerations
enumTCPProperties { EPublisher = 1, EContentType = 2, EContentId = 4, EFlag = 8 }
enumTCPSortOrder { ECPRecent = 1, ECPPublisher = 2, ECPContent = 4, ECPContentId = 8 }
Protected Attributes
CLiwGenericParamList *iMap
const CCPSecurityPolicy *iPolicy

Constructor & Destructor Documentation

CCPLiwMap()

CCPLiwMap()[protected]

C++ default constructor.

~CCPLiwMap()

~CCPLiwMap()[virtual]

Destructor.

Member Functions Documentation

ActivateActionSupport()

TBool ActivateActionSupport()const [pure virtual]

AddL(RSqlDatabase, CLiwDefaultList *)

TInt32 AddL(RSqlDatabaseaSqlDb,
CLiwDefaultList *aNotificationList = 0
)const [protected, pure virtual]

Adds to database current content

Parameters

RSqlDatabase aSqlDbhandle to database
CLiwDefaultList * aNotificationList = 0list of notifications to fill in when something was actually changed in dataabse

AddToDbL(RSqlDatabase, CLiwDefaultList *)

TInt32 AddToDbL(RSqlDatabaseaSqlDb,
CLiwDefaultList *aNotificationList = 0
)const [protected, pure virtual]

Performs actuall add operation

Parameters

RSqlDatabase aSqlDbhandle to database
CLiwDefaultList * aNotificationList = 0list of notifications to fill in when something was actually changed in dataabse

AppendFilterL(RBuf &, TUint &)

voidAppendFilterL(RBuf &aQuery,
TUint &aFilter
)const [protected, virtual]

Appends filter as strings to SQL query according to aFilter

Parameters

RBuf & aQuerySQL query
TUint & aFilteras enum

AppendGetListFilterL(RBuf &, TUint &)

voidAppendGetListFilterL(RBuf &aQuery,
TUint &aFilter
)const [protected]

Appends GetList filter as strings to SQL query according to aFilter

Parameters

RBuf & aQuerySQL query
TUint & aFilteras enum

AppendRemoveFilterL(RBuf &, TUint &)

voidAppendRemoveFilterL(RBuf &aQuery,
TUint &aFilter
)const [protected]

Appends Remove filter as strings to SQL query according to aFilter

Parameters

RBuf & aQuerySQL query
TUint & aFilteras enum

AppendSortL(RBuf &, const TCPSortOrder &)

voidAppendSortL(RBuf &aQuery,
const TCPSortOrder &aSort
)const [protected, pure virtual]

Appends sorting criteria as strings to SQL query according to aSort

Parameters

RBuf & aQuerySQL query
const TCPSortOrder & aSortsort filter as TInt

AtL(TInt, TDes8 &)

TBool AtL(TIntaIndex,
TDes8 &aFndKey
)const [virtual]

Returns the key stored at a specified index.

Parameters

TInt aIndexthe index of the key to be found
TDes8 & aFndKeythe key found at the passed index

BindBinaryL(RSqlStatement &, TInt, const TDesC8 &)

voidBindBinaryL(RSqlStatement &aStmt,
TIntaParameterIndex,
const TDesC8 &aParameterText
)const [protected]

Leaves if aParameterIndex is negative-error value or in case of binding error.

Parameters

RSqlStatement & aStmt
TInt aParameterIndex
const TDesC8 & aParameterText

BindInt64L(RSqlStatement &, TInt, TInt64)

voidBindInt64L(RSqlStatement &aStmt,
TIntaParameterIndex,
TInt64aParameterValue
)const [protected]

Leaves if aParameterIndex is negative-error value or in case of binding error.

Parameters

RSqlStatement & aStmt
TInt aParameterIndex
TInt64 aParameterValue

BindIntL(RSqlStatement &, TInt, TInt)

voidBindIntL(RSqlStatement &aStmt,
TIntaParameterIndex,
TIntaParameterValue
)const [protected]

Leaves if aParameterIndex is negative-error value or in case of binding error.

Parameters

RSqlStatement & aStmt
TInt aParameterIndex
TInt aParameterValue

BindTextL(RSqlStatement &, TInt, const TDesC &)

voidBindTextL(RSqlStatement &aStmt,
TIntaParameterIndex,
const TDesC &aParameterText
)const [protected]

Leaves if aParameterIndex is negative-error value or in case of binding error.

Parameters

RSqlStatement & aStmt
TInt aParameterIndex
const TDesC & aParameterText

BindValueL(const RBuf &, RSqlStatement &)

voidBindValueL(const RBuf &aQuery,
RSqlStatement &aStmt
)const [protected]

Binds value to query

Parameters

const RBuf & aQuerySQL query
RSqlStatement & aStmt

CheckIdentifiersL()

voidCheckIdentifiersL()const [protected]

Leaves if publisher, content type od content_id is not descriptor type.

ColumnIndexL(RSqlStatement &, const TDesC &)

TInt ColumnIndexL(RSqlStatement &aStmt,
const TDesC &aColumnName
)const [protected]

Leaves if column index return value is negative.

Parameters

RSqlStatement & aStmt
const TDesC & aColumnName

ConstructGetListSelectL(RBuf &, TBool)

voidConstructGetListSelectL(RBuf &aQuery,
TBoolaGet = ETrue
)const [protected]

Contructs SQL query to select entries for GetList

Parameters

RBuf & aQuerySQL query
TBool aGet = ETrue

ConstructL()

voidConstructL()[protected]

Perform the second phase construction of a CCPLiwMap object.

ConstructRemoveSelectL(RBuf &, TBool)

voidConstructRemoveSelectL(RBuf &aQuery,
TBoolaGet = ETrue
)const [protected]

Contructs SQL query to select entries for Remove

Parameters

RBuf & aQuerySQL query
TBool aGet = ETrue

ConstructSelectIdL(RBuf &)

voidConstructSelectIdL(RBuf &aQuery)const [protected]

Contructs SQL query to select entry

Parameters

RBuf & aQuerySQL query

Count()

TInt Count()const [virtual]

Returns the number of key-value pair stored in the map collection.

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aOutputStream)const [virtual]

The container managed data values can be serialized to an output stream.

Parameters

RWriteStream & aOutputStreamthe output stream to which the data will be streamed

ExtractParamL(const TLiwGenericParam &)

voidExtractParamL(const TLiwGenericParam &aParam)[protected]

Extracts a param and appends it to the internal list

Parameters

const TLiwGenericParam & aParama param to extract

FetchIdL(RSqlDatabase, const TDesC &, TInt32 &)

voidFetchIdL(RSqlDatabaseaSqlDb,
const TDesC &aQuery,
TInt32 &aId
)const [protected]

Fetches Id from database

Parameters

RSqlDatabase aSqlDbhandle to database
const TDesC & aQuerySQL query
TInt32 & aIdid entry from database

FetchIdsL(TInt32, const TDesC &, CLiwDefaultMap *, RSqlDatabase)

voidFetchIdsL(TInt32aId,
const TDesC &aQuery,
CLiwDefaultMap *aMap,
RSqlDatabaseaSqlDb
)const [protected]

Fetches Ids (Publisher, ContentType, ContentId) from database

Parameters

TInt32 aIdid entry in database
const TDesC & aQuerySQL query
CLiwDefaultMap * aMapmap to insert Ids
RSqlDatabase aSqlDbhandle to database

FillChangeInfoMapL(RSqlStatement &, CLiwDefaultMap *)

voidFillChangeInfoMapL(RSqlStatement &aStmt,
CLiwDefaultMap *aMap
)const [protected, virtual]

Fills change info map with proper values aStmt

Parameters

RSqlStatement & aStmthandle to SQL statement
CLiwDefaultMap * aMap

FindL(const TDesC8 &, TLiwVariant &)

TBool FindL(const TDesC8 &aKey,
TLiwVariant &aValue
)const [virtual]

Finds a value stored in the map collection based on the key.

Parameters

const TDesC8 & aKeythe key to be searched
TLiwVariant & aValue

GetActionTriggersLC()

IMPORT_C CLiwDefaultList *GetActionTriggersLC()const

Return list of action triggers from main map Note that these are not triggers from action map

GetActivateInfo()

TBool GetActivateInfo()const [pure virtual]

GetFilterL()

TUint GetFilterL()const [protected]

Check Get properties

GetIdsOfRemovedEntriesL(RSqlDatabase, const TDesC &, CLiwDefaultList *)

voidGetIdsOfRemovedEntriesL(RSqlDatabaseaSqlDb,
const TDesC &aQuery,
CLiwDefaultList *aList
)const [protected]

Gets Ids (Id, Publisher, ContentType, ContentId) of removed entries from database

Parameters

RSqlDatabase aSqlDbhandle to database
const TDesC & aQuerySQL query
CLiwDefaultList * aListList with ids

GetListL(RSqlDatabase, CLiwGenericParamList *, RArray< TInt32 > &)

TUint GetListL(RSqlDatabaseaSqlDb,
CLiwGenericParamList *aList,
RArray< TInt32 > &aItemsToDelete
)const [protected, pure virtual]

Fetches entries from database

Parameters

RSqlDatabase aSqlDbhandle to database
CLiwGenericParamList * aListtarget list for enntries
RArray< TInt32 > & aItemsToDeleteids of entries for removal - they were found to be expired

GetListL(RSqlDatabase, const TDesC &, CLiwGenericParamList *, RArray< TInt32 > &)

TUint GetListL(RSqlDatabaseaSqlDb,
const TDesC &aQuery,
CLiwGenericParamList *aList,
RArray< TInt32 > &aItemsToDelete
)const [protected]

Fetches entries from database

Parameters

RSqlDatabase aSqlDbhandle to database
const TDesC & aQueryaQuery SQL query
CLiwGenericParamList * aListtarget list for enntries
RArray< TInt32 > & aItemsToDeleteids of entries for removal - they were found to be expired

GetProperty(const TDesC8 &, TInt32 &)

IMPORT_C TBoolGetProperty(const TDesC8 &aProperty,
TInt32 &aResult
)const

Fetches value for property(key) from internal map

Parameters

const TDesC8 & aPropertyname of the property ( key )
TInt32 & aResulttarget integer for fetching operation

GetPropertyL(const TDesC8 &, RBuf &)

IMPORT_C TBoolGetPropertyL(const TDesC8 &aProperty,
RBuf &aResult
)const

Fetches value for property(key) from internal map

Parameters

const TDesC8 & aPropertyname of the property ( key )
RBuf & aResulttarget descriptor for fetching operation

GetPropertyL(const TDesC8 &, RBuf8 &)

IMPORT_C TBoolGetPropertyL(const TDesC8 &aProperty,
RBuf8 &aResult
)const

Fetches value for property(key) from internal map

Parameters

const TDesC8 & aPropertyname of the property ( key )
RBuf8 & aResulttarget binary for fetching operation

GetSortL()

TCPSortOrder GetSortL()const [protected]

Check and return sort order

InsertL(const TDesC8 &, const TLiwVariant &)

voidInsertL(const TDesC8 &aKey,
const TLiwVariant &aValue
)[virtual]

Inserts a key-value pair element to the map collection. If the specified key already exists, it will be removed from the collection and the new key-value pair will be added to the map.

Parameters

const TDesC8 & aKeythe key to be stored
const TLiwVariant & aValuethe value associated with the key to be stored

IsContentIdL()

TBool IsContentIdL()const [protected]

Check if ContentId is set

IsContentTypeL()

TBool IsContentTypeL()const [protected]

Check if ContentType is set

IsFlag()

TBool IsFlag()const [protected]

Check if Flag is present

IsGetListAllL(TUint)

TBool IsGetListAllL(TUintaFilter)const [protected]

Checks if GetList for all items should be done

Parameters

TUint aFilterflag describing which ids are set

IsId()

TBool IsId()const [protected]

Checks if Id property is present in internal map

IsProperOperationL(const TLiwVariant &)

voidIsProperOperationL(const TLiwVariant &aValue)const [protected]

Checks if operation value is proper

Parameters

const TLiwVariant & aValuecontains operation value

IsPropertyValidL(const TDesC8 &)

TBool IsPropertyValidL(const TDesC8 &aProperty)const [protected]

Returns ETrue if a property has valid name and type

Parameters

const TDesC8 & aPropertyproperty name

IsPublisherNameL()

TBool IsPublisherNameL()const [protected]

Check if Publisher name is set

IsTriggerL()

TBool IsTriggerL()const [protected]

Check if ActionTrigger is set

IsTypePublisherL(const TLiwVariant &)

TBool IsTypePublisherL(const TLiwVariant &aVariant)[protected, static]

Checks a type a map

Parameters

const TLiwVariant & aVariantvariant containing a map type

IsValidForActionL()

IMPORT_C voidIsValidForActionL()const

Leaves when Execute Action operation is not possible due to missing of some parameter

IsValidForAddL()

voidIsValidForAddL()const [virtual]

Leaves when Add data operation is not possible due to missing of some parameter

IsValidForDeleteL()

voidIsValidForDeleteL()const [pure virtual]

Check if IDs are valid for Delete operation

IsValidForGetListL()

voidIsValidForGetListL()const [pure virtual]

Check if IDs are valid for GetList operation

IsValidForNotificationL()

IMPORT_C voidIsValidForNotificationL()const

Leaves when RequestNotification operation is not possible due to missing of some parameter

NewL(RDesReadStream &)

IMPORT_C CCPLiwMap *NewL(RDesReadStream &aStream)[static]

Two-phased constructor.

Parameters

RDesReadStream & aStream

NewL(const CLiwGenericParamList &)

IMPORT_C CCPLiwMap *NewL(const CLiwGenericParamList &aList)[static]

Two-phased constructor.

Parameters

const CLiwGenericParamList & aList

NewL(const CLiwMap &)

IMPORT_C CCPLiwMap *NewL(const CLiwMap &aMap)[static]

Two-phased constructor.

Parameters

const CLiwMap & aMap

PackForServerLC()

IMPORT_C HBufC8 *PackForServerLC()const

Used by client to serialize this object

PrepareStmtforAddL(RSqlDatabase, RSqlStatement &, const TDesC &)

voidPrepareStmtforAddL(RSqlDatabaseaSqlDb,
RSqlStatement &aStmt,
const TDesC &aQuery
)const [protected, virtual]

Prepares SQL query for Add operation

Parameters

RSqlDatabase aSqlDbhandle to database
RSqlStatement & aStmthandle to SQL statement
const TDesC & aQuerySQL query

PropertyExists(const TDesC8 &)

TBool PropertyExists(const TDesC8 &aProperty)const [protected]

Checks if property(key) is present in internal map

Parameters

const TDesC8 & aProperty

Remove(const TDesC8 &)

voidRemove(const TDesC8 &aKey)[virtual]

Removes a key from the map collection.

Parameters

const TDesC8 & aKeythe key to be removed from the map

RemoveAllAttributeL(TUint &)

voidRemoveAllAttributeL(TUint &aFilter)const [protected]

Removes attributes with "All" value from map

Parameters

TUint & aFilterfilter bit will be reset if any attribute == "all"

RemoveL(RSqlDatabase, CLiwDefaultList *)

voidRemoveL(RSqlDatabaseaSqlDb,
CLiwDefaultList *aNotificationList = 0
)const [protected, pure virtual]

Removes entries from database

Parameters

RSqlDatabase aSqlDbhandle to database
CLiwDefaultList * aNotificationList = 0list of notifications to fill in when something was actually changed in dataabse

RemoveL(RSqlDatabase, const TDesC &)

voidRemoveL(RSqlDatabaseaSqlDb,
const TDesC &aQuery
)const [protected]

Removes entries from database

Parameters

RSqlDatabase aSqlDbhandle to database
const TDesC & aQuerySQL query

Reset()

IMPORT_C voidReset()const

Reset map

SaveQueryResultsIdsL(RSqlStatement &, CLiwDefaultList *)

voidSaveQueryResultsIdsL(RSqlStatement &aStmt,
CLiwDefaultList *aList
)const [protected]

Saves Ids (Id, Publisher, ContentType, ContentId) from database

Parameters

RSqlStatement & aStmt
CLiwDefaultList * aListList with ids

SaveQueryResultsL(RSqlStatement &, CLiwGenericParamList &, RArray< TInt32 > &)

voidSaveQueryResultsL(RSqlStatement &aStmt,
CLiwGenericParamList &aList,
RArray< TInt32 > &aItemsToDelete
)const [protected, pure virtual]

Saves results from query to SQLite Server

Parameters

RSqlStatement & aStmthandle to SQL statement
CLiwGenericParamList & aListtarget list for enntries
RArray< TInt32 > & aItemsToDeleteids of entries for removal - they were found to be expired

SetL(const CLiwGenericParamList &)

voidSetL(const CLiwGenericParamList &aInParamList)[protected]

Sets all parameters according to provided list

Parameters

const CLiwGenericParamList & aInParamList

SetL(const CLiwMap &)

voidSetL(const CLiwMap &aMap)[protected]

Sets all parameters according to provided list

Parameters

const CLiwMap & aMapmap with parameters

SetSecurityL(const RMessage2 &)

IMPORT_C voidSetSecurityL(const RMessage2 &aMessage)

Setter for security policy

Parameters

const RMessage2 & aMessage

Size()

TInt Size()const [virtual]

Returns the size of the collection. The size is calculated based on the total numer of key-value elements and the size of each pair in the collection

UpdateL(RSqlDatabase, TInt32, CLiwDefaultList *)

voidUpdateL(RSqlDatabaseaSqlDb,
TInt32aId,
CLiwDefaultList *aNotificationList = 0
)const [protected, pure virtual]

Updates entry in database

Parameters

RSqlDatabase aSqlDbhandle to database
TInt32 aId
CLiwDefaultList * aNotificationList = 0list of notifications to fill in when something was actually changed in dataabse

Member Enumerations Documentation

Enum TCPProperties

Enum defining the properties of filter.

Enumerators

EPublisher = 1
EContentType = 2
EContentId = 4
EFlag = 8

Enum TCPSortOrder

Enum defining the sort ordering.

Enumerators

ECPRecent = 1
ECPPublisher = 2
ECPContent = 4
ECPContentId = 8

Member Data Documentation

CLiwGenericParamList * iMap

CLiwGenericParamList *iMap[protected]

const CCPSecurityPolicy * iPolicy

const CCPSecurityPolicy *iPolicy[protected]