|
1 /* |
|
2 * Copyright (c) 2002-2007 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: A store that doesn't have a cache in the TSY side. |
|
15 * Uses ETel RMobilePhoneBookStore |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef VPBKSIMSTOREIMPL_CBASICSTORE_H |
|
22 #define VPBKSIMSTOREIMPL_CBASICSTORE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "CStoreBase.h" |
|
26 #include <etelmm.h> |
|
27 |
|
28 namespace VPbkSimStoreImpl { |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * A store that doesn't have a cache in the TSY side. |
|
34 * Uses ETel RMobilePhoneBookStore |
|
35 * |
|
36 */ |
|
37 NONSHARABLE_CLASS(CBasicStore) : public CStoreBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CBasicStore(); |
|
45 |
|
46 public: // New functions |
|
47 |
|
48 /** |
|
49 * Returns the ETel phonebook store |
|
50 * @return the ETel phonebook store |
|
51 */ |
|
52 inline RMobilePhoneBookStore& ETelStore(); |
|
53 |
|
54 public: // Functions from base classes |
|
55 |
|
56 /** |
|
57 * From MVPbkSimCntStore |
|
58 */ |
|
59 MVPbkSimStoreOperation* SaveL( const TDesC8& aData, TInt& aSimIndex, |
|
60 MVPbkSimContactObserver& aObserver ); |
|
61 |
|
62 /** |
|
63 * From MVPbkSimCntStore |
|
64 */ |
|
65 MVPbkSimStoreOperation* DeleteL( RVPbkStreamedIntArray& aSimIndexes, |
|
66 MVPbkSimContactObserver& aObserver ); |
|
67 |
|
68 /** |
|
69 * From MVPbkSimCntStore |
|
70 */ |
|
71 TInt GetGsmStoreProperties( |
|
72 TVPbkGsmStoreProperty& aGsmProperties ) const; |
|
73 |
|
74 /** |
|
75 * From MVPbkSimCntStore |
|
76 */ |
|
77 TInt GetUSimStoreProperties( |
|
78 TVPbkUSimStoreProperty& aUSimProperties ) const; |
|
79 |
|
80 /** |
|
81 * From CStoreBase |
|
82 */ |
|
83 RMobilePhoneStore& ETelStoreBase(); |
|
84 |
|
85 /** |
|
86 * From CStoreBase |
|
87 */ |
|
88 RMobilePhoneStore::TMobilePhoneStoreInfoV1& ETelStoreInfo(); |
|
89 |
|
90 /** |
|
91 * From CStoreBase |
|
92 */ |
|
93 TDes8& ETelStoreInfoPackge(); |
|
94 |
|
95 /** |
|
96 * From CStoreBase |
|
97 */ |
|
98 void OpenETelStoreL(); |
|
99 |
|
100 /** |
|
101 * From CStoreBase |
|
102 */ |
|
103 void CloseETelStore(); |
|
104 |
|
105 /** |
|
106 * From CStoreBase |
|
107 */ |
|
108 MVPbkSimCommand* CreateInitCommandL( |
|
109 MVPbkSimCommandObserver& aObserver ); |
|
110 |
|
111 /** |
|
112 * From CStoreBase |
|
113 */ |
|
114 MVPbkSimCommand* CreateUpdateCommandL( TInt aSimIndex ); |
|
115 |
|
116 /** |
|
117 * From CStoreBase |
|
118 */ |
|
119 MVPbkSimCommand* CreateUpdateCommandUsingRefL( TInt& aSimIndexRef ); |
|
120 |
|
121 protected: // New functions |
|
122 |
|
123 /** |
|
124 * Adds a read command to the command chain. |
|
125 * @param aCmdChain the command chain. |
|
126 * @param aFromSimIndex the first sim index or KErrNotFound if |
|
127 * the command should read all contacts. |
|
128 * @param aToSimIndex the last sim index or KErrNotFound if |
|
129 * the command should read all contacts. |
|
130 */ |
|
131 void AddMultipleReadCmdToChainL( CCompositeCmdBase& aCmdChain, |
|
132 TInt aFromSimIndex, TInt aToSimIndex ); |
|
133 |
|
134 protected: |
|
135 |
|
136 /** |
|
137 * C++ constructor. |
|
138 * @param aPhone an open phone subsession |
|
139 * @param aIdentifier the store identifier |
|
140 */ |
|
141 CBasicStore( TStoreParams& aParams ); |
|
142 |
|
143 /** |
|
144 * By default Symbian 2nd phase constructor is private. |
|
145 */ |
|
146 void ConstructL(); |
|
147 |
|
148 private: // Data |
|
149 /// The ETel store |
|
150 RMobilePhoneBookStore iETelStore; |
|
151 /// Multimode ETel phone book info structure. |
|
152 RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iETelStoreInfo; |
|
153 /// A package for the ETel phonebook info |
|
154 RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg iETelInfoPckg; |
|
155 }; |
|
156 |
|
157 // INLINE FUNCTIONS |
|
158 inline RMobilePhoneBookStore& CBasicStore::ETelStore() |
|
159 { |
|
160 return iETelStore; |
|
161 } |
|
162 } // namespace VPbkSimStoreImpl |
|
163 #endif // VPBKSIMSTOREIMPL_CBASICSTORE_H |
|
164 |
|
165 // End of File |