|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __DSCSTORE_H__ |
|
17 #define __DSCSTORE_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <dscstoredefs.h> |
|
21 #include <startupproperties.h> |
|
22 |
|
23 class CDscItem; |
|
24 class CDscDatabase; |
|
25 |
|
26 /** |
|
27 Represents a DSC client interface to manipulate the DSC(Dynamic Start-up Configuration) database. A thread uses this class to |
|
28 set up a connection with the DSC database. |
|
29 |
|
30 Is used to store DSC items that contain the information needed to launch After Market Application (AMA). |
|
31 |
|
32 Multiple DSCs can be stored in the DSC database identified by different DSC IDs. A default DSC Uid, KDefaultSymbianDsc, |
|
33 is provided. |
|
34 |
|
35 All items within a DSC are unique. A duplicate item is defined as having the same filename and |
|
36 arguments as another already in that particular DSC. |
|
37 |
|
38 Uses transaction mechanism provided by the data source to ensure that DSC items will be added in a consistent manner |
|
39 to maintain data integrity. |
|
40 |
|
41 Requires PlatSec capabilities to add, delete DSC, and to read, add, update, or remove the items in a DSC. |
|
42 |
|
43 @publishedPartner |
|
44 @released |
|
45 */ |
|
46 NONSHARABLE_CLASS (RDscStore) |
|
47 { |
|
48 |
|
49 public: |
|
50 IMPORT_C RDscStore(); |
|
51 |
|
52 IMPORT_C void OpenL(); |
|
53 IMPORT_C void Close(); |
|
54 IMPORT_C TBool IsOpened() const; |
|
55 |
|
56 IMPORT_C void CreateDscL(const TUid& aDscId, const TDesC& aDescription); |
|
57 IMPORT_C void CreateDscL(); |
|
58 IMPORT_C void DeleteDscL(const TUid& aDscId); |
|
59 IMPORT_C TBool DscExistsL(const TUid& aDscId) const; |
|
60 IMPORT_C TBool DscExistsL() const; |
|
61 IMPORT_C void GetDscDescriptionL(const TUid &aDscId, TDes& aDescription) const; |
|
62 IMPORT_C void AddItemL(CDscItem& aItem,TDscPosition aPos); |
|
63 IMPORT_C void AddItemL(CDscItem& aItem); |
|
64 IMPORT_C TBool ItemExistsL( const CDscItem& aItem) const; |
|
65 IMPORT_C void EnumOpenLC(const TUid& aDscId); |
|
66 IMPORT_C void EnumOpenLC(); |
|
67 IMPORT_C CDscItem* EnumReadNextL(); |
|
68 IMPORT_C void EnumClose(); |
|
69 IMPORT_C void ReadItemL(CDscItem& aItem); |
|
70 IMPORT_C void UpdateItemL(const CDscItem& aItem); |
|
71 IMPORT_C void DeleteItemL(const CDscItem& aItem); |
|
72 IMPORT_C void GetMaxStringLength( TInt& aStringLength ) const; |
|
73 |
|
74 private: |
|
75 // declare copy constructor and assign operator as private to avoid copy |
|
76 RDscStore(const RDscStore&); |
|
77 RDscStore& operator=(const RDscStore&); |
|
78 void CheckDbIsOpenL() const; |
|
79 |
|
80 private: |
|
81 CDscDatabase* iDscDatabase; |
|
82 TAny * iSpare; |
|
83 }; |
|
84 |
|
85 #endif |