class RDscStore |
Represents a DSC client interface to manipulate the DSC(Dynamic Start-up Configuration) database. A thread uses this class to set up a connection with the DSC database.
Is used to store DSC items that contain the information needed to launch After Market Application (AMA).
Multiple DSCs can be stored in the DSC database identified by different DSC IDs. A default DSC Uid, KDefaultSymbianDsc, is provided.
All items within a DSC are unique. A duplicate item is defined as having the same filename and arguments as another already in that particular DSC.
Uses transaction mechanism provided by the data source to ensure that DSC items will be added in a consistent manner to maintain data integrity.
Requires PlatSec capabilities to add, delete DSC, and to read, add, update, or remove the items in a DSC.
Public Member Functions | |
---|---|
RDscStore() | |
IMPORT_C void | AddItemL(CDscItem &, TDscPosition) |
IMPORT_C void | AddItemL(CDscItem &) |
IMPORT_C void | Close() |
IMPORT_C void | CreateDscL(const TUid &, const TDesC &) |
IMPORT_C void | CreateDscL() |
IMPORT_C void | DeleteDscL(const TUid &) |
IMPORT_C void | DeleteItemL(const CDscItem &) |
IMPORT_C TBool | DscExistsL(const TUid &) |
IMPORT_C TBool | DscExistsL() |
IMPORT_C void | EnumClose() |
IMPORT_C void | EnumOpenLC(const TUid &) |
IMPORT_C void | EnumOpenLC() |
IMPORT_C CDscItem * | EnumReadNextL() |
IMPORT_C void | GetDscDescriptionL(const TUid &, TDes &) |
IMPORT_C void | GetMaxStringLength(TInt &) |
IMPORT_C TBool | IsOpened() |
IMPORT_C TBool | ItemExistsL(const CDscItem &) |
IMPORT_C void | OpenL() |
IMPORT_C void | ReadItemL(CDscItem &) |
IMPORT_C void | UpdateItemL(const CDscItem &) |
Private Member Functions | |
---|---|
RDscStore(const RDscStore &) | |
void | CheckDbIsOpenL() |
RDscStore & | operator=(const RDscStore &) |
Private Attributes | |
---|---|
CDscDatabase * | iDscDatabase |
TAny * | iSpare |
IMPORT_C void | AddItemL | ( | CDscItem & | aItem, |
TDscPosition | aPos | |||
) |
CDscItem & aItem | the item to be added to the database. At least DscId and Filename has to be set before calling this function. ItemId will be assigned by the database. |
TDscPosition aPos | the position in the DSC to add the item - either EFirst or ELast |
IMPORT_C void | AddItemL | ( | CDscItem & | aItem | ) |
Append an item to the end of a DSC RDscStore::AddItemL(CDscItem& aItem,TDscPosition aPos)
CDscItem & aItem |
IMPORT_C void | Close | ( | ) |
Close the connection with the DSC database RDbNamedDatabase RDbView RDbs
IMPORT_C void | CreateDscL | ( | const TUid & | aDscId, |
const TDesC & | aDescription | |||
) |
IMPORT_C void | CreateDscL | ( | ) |
Create a new DSC in the DSC database using the default DSC Id KDefaultSymbianDsc RDscStore::CreateDscL(const TUid& aDscId, const TDesC& aDescription)
IMPORT_C void | DeleteDscL | ( | const TUid & | aDscId | ) |
const TUid & aDscId | the ID of the DSC to be deleted |
IMPORT_C void | DeleteItemL | ( | const CDscItem & | aItem | ) |
Delete a DSC item matching specified DscId and ItemId, or specified DscId and Filename and ArgList. If ItemId is not set, will check existance using DscId and Filename+ArgList. No wildcards can be used in Filename or ArgList, only exact matching.
const CDscItem & aItem | item to be deleted |
IMPORT_C TBool | DscExistsL | ( | const TUid & | aDscId | ) | const |
const TUid & aDscId | the ID of the DSC being checked |
IMPORT_C TBool | DscExistsL | ( | ) | const |
Check the existance of DSC in the DSC database using the default dscId KDefaultSymbianDsc RDscStore::DscExistsL(const TUid& aDscId)
IMPORT_C void | EnumOpenLC | ( | const TUid & | aDscId | ) |
Open a DSC for enumeration. This function must be called before the items in the table can be enumerated using EnumReadNextL(). Only one DSC can be opened for enumeration at a time.
This function will create a read-lock on the database and push it onto the CleanupStack. Call CleanupStack::PopAndDestroy() to close the enumaration and release the database lock. No updates to the database is possible until the read-lock is released.
RDscStore client; client.OpenL(); CleanupClosePushL(client); client.EnumOpenLC(); while(CDscItem* item = client.EnumReadNextL()) { //Do something... delete item; item = NULL; } CleanupStack::PopAndDestroy(); //client.EnumClose() CleanupStack::PopAndDestroy(); //client.Close()
const TUid & aDscId | the ID of the DSC to be opened for enumeration |
IMPORT_C void | EnumOpenLC | ( | ) |
Open the default DSC for enumeration using default dscId KDefaultSymbianDsc RDscStore::EnumOpenLC(const TUid& aDscId)
IMPORT_C CDscItem * | EnumReadNextL | ( | ) |
Read the next item in the DSC opened for enumeration. An enumeration must have been opened by a call to EnumOpenLC(). The caller takes ownership of the returned object.
IMPORT_C void | GetDscDescriptionL | ( | const TUid & | aDscId, |
TDes & | aDescription | |||
) | const |
IMPORT_C void | GetMaxStringLength | ( | TInt & | aStringLength | ) | const |
TInt & aStringLength | The result is supplied via this integer. |
IMPORT_C TBool | ItemExistsL | ( | const CDscItem & | aItem | ) | const |
Check the existance of a DSC item in a DSC list. Uses DscId and ItemId within aItem to determine the item. If ItemId is not set, will check existance using DscId and Filename+Arguments. No wildcards can be used in filename or arguments, only exact matching.
const CDscItem & aItem | the item to be checked in the DSC database |
IMPORT_C void | OpenL | ( | ) |
IMPORT_C void | ReadItemL | ( | CDscItem & | aItem | ) |
Read an item from the DSC. Uses DscId and ItemId within aItem to determine the item. If ItemId is not set, will check existance using DscId and Filename+Arguments. No wildcards can be used in filename or arguments, only exact matching.
CDscItem & aItem | item to be retrieved |
IMPORT_C void | UpdateItemL | ( | const CDscItem & | aItem | ) |
Update an item in the DSC. Uses DscId and ItemId within aItem to determine the item. If ItemId is not set, will check existance using DscId and Filename+Arguments. No wildcards can be used in filename or arguments, only exact matching.
ItemId, Filename, ArgList and DscId cannot be updated.
const CDscItem & aItem | item to be updated |
RDscStore & | operator= | ( | const RDscStore & | ) | [private] |
const RDscStore & |
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.