|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Postcard application's interface to central repository |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __POSTCARCENREP_H__ |
|
22 #define __POSTCARCENREP_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "PostcardPrivateCRKeys.h" |
|
27 |
|
28 class CPostcardCenRep : public CBase |
|
29 { |
|
30 |
|
31 public: // Constructors and destructor |
|
32 |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 * @return pointer to created CPostcardCenRep |
|
36 */ |
|
37 static CPostcardCenRep* NewL(); |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 ~CPostcardCenRep(); |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Get int data for a key |
|
48 * @param aKey Key to read data |
|
49 * @return Key value |
|
50 */ |
|
51 TInt Get(TUint32 aKey) const; |
|
52 |
|
53 /** |
|
54 * Get string data for a key |
|
55 * @param aKey Key to read data |
|
56 * @return Key value |
|
57 */ |
|
58 const TDesC& GetString(TUint32 aKey) const; |
|
59 |
|
60 /** |
|
61 * Get Postcard feature (variant) bits |
|
62 * @return Postcard variation bits |
|
63 */ |
|
64 TInt FeatureBits() const; |
|
65 |
|
66 private: // constructors |
|
67 CPostcardCenRep(); |
|
68 |
|
69 /** |
|
70 * EPOC constructor |
|
71 */ |
|
72 void ConstructL(); |
|
73 |
|
74 private: // data |
|
75 |
|
76 // Int and string data types are supported |
|
77 static const TInt8 iIsStringType[KPocaKeyCount]; |
|
78 |
|
79 // Data read from Postcard central repository is cached here |
|
80 union |
|
81 { |
|
82 TInt asInt; |
|
83 HBufC* asString; |
|
84 } iData[KPocaKeyCount]; |
|
85 |
|
86 // Postcard feature bits read from Muiu variant repository |
|
87 TInt iFeatureBits; |
|
88 }; |
|
89 |
|
90 #endif // __POSTCARCENREP_H__ |