|
1 // Copyright (c) 2004-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 __COEDATASTORAGE_H__ |
|
17 #define __COEDATASTORAGE_H__ |
|
18 |
|
19 #include <coemain.h> |
|
20 |
|
21 class CBufBase; |
|
22 class CBufFlat; |
|
23 class CRepository; |
|
24 class CColorList; |
|
25 |
|
26 /** @internalTechnology */ |
|
27 class CCoeDataStorage : public CBase |
|
28 { |
|
29 public: |
|
30 IMPORT_C static CCoeDataStorage& GetL(CCoeEnv& aCoeEnv); |
|
31 IMPORT_C static CCoeDataStorage* NewL(); |
|
32 IMPORT_C virtual ~CCoeDataStorage(); |
|
33 IMPORT_C void GetInstalledFepIdL(TDes& aFepId); |
|
34 IMPORT_C void SetInstalledFepIdL(const TDesC& aFepId); |
|
35 IMPORT_C void GetFepAttributeL(TUid aAttributeUid, TDes8& aAttributeData); |
|
36 IMPORT_C void SetFepAttributeL(TUid aAttributeUid, const TDesC8& aAttributeData); |
|
37 IMPORT_C CColorList* GetSystemColorListL(); |
|
38 IMPORT_C CBufBase* GetSystemColorListBufferL(); |
|
39 IMPORT_C void SetSystemColorListL(const CColorList& aColors); |
|
40 IMPORT_C void SetSystemColorListFromBufferL(const TDesC8& aBuffer); |
|
41 IMPORT_C CColorList* PopulateColorArrayL(); |
|
42 |
|
43 public: // but not exported |
|
44 CRepository& FepFrameworkRepositoryL(); |
|
45 private: |
|
46 NONSHARABLE_CLASS(COwner) : public CCoeStatic |
|
47 { |
|
48 public: |
|
49 enum {ECoeStaticUid=0x10202b3d}; |
|
50 public: |
|
51 COwner(CCoeDataStorage* aDataStorage); |
|
52 virtual ~COwner(); |
|
53 inline CCoeDataStorage* DataStorage() {return iDataStorage;} |
|
54 private: |
|
55 CCoeDataStorage* const iDataStorage; |
|
56 }; |
|
57 private: |
|
58 inline CCoeDataStorage() {} |
|
59 CRepository& FepSpecificSettingsRepositoryL(); |
|
60 CRepository& SystemColorListRepositoryL(); |
|
61 CBufFlat* GetSystemColorListBufferLC(TBool& aExists); |
|
62 private: |
|
63 CRepository* iFepFrameworkRepository; |
|
64 CRepository* iFepSpecificSettingsRepository; |
|
65 CRepository* iSystemColorListRepository; |
|
66 }; |
|
67 |
|
68 #endif // __COEDATASTORAGE_H__ |