|
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: An own number store, contains the contacts in the MSISDN file |
|
15 * in (U)SIM |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef VPBKSIMSTOREIMPL_COWNNUMBERSTORE_H |
|
22 #define VPBKSIMSTOREIMPL_COWNNUMBERSTORE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "CStoreBase.h" |
|
26 |
|
27 namespace VPbkSimStoreImpl { |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * An own number store, contains the contacts in the MSISDN file in (U)SIM |
|
33 * |
|
34 */ |
|
35 NONSHARABLE_CLASS(COwnNumberStore) : public CStoreBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aParams the store parameters |
|
42 * @return a new instance of this class |
|
43 */ |
|
44 static COwnNumberStore* NewL( TStoreParams& aParams ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~COwnNumberStore(); |
|
50 |
|
51 public: // Functions from base classes |
|
52 |
|
53 /** |
|
54 * From CStoreBase |
|
55 */ |
|
56 const TDesC& ETelName() const; |
|
57 |
|
58 /** |
|
59 * From CStoreBase |
|
60 */ |
|
61 void CompleteSATRefresh( |
|
62 MSimRefreshCompletion& aSimRefreshCompletion ); |
|
63 |
|
64 /** |
|
65 * From MVPbkSimCntStore |
|
66 */ |
|
67 MVPbkSimStoreOperation* SaveL( const TDesC8& aData, TInt& aSimIndex, |
|
68 MVPbkSimContactObserver& aObserver ); |
|
69 |
|
70 /** |
|
71 * From MVPbkSimCntStore |
|
72 */ |
|
73 MVPbkSimStoreOperation* DeleteL( RVPbkStreamedIntArray& aSimIndexes, |
|
74 MVPbkSimContactObserver& aObserver ); |
|
75 |
|
76 /** |
|
77 * From MVPbkSimCntStore |
|
78 */ |
|
79 TInt GetGsmStoreProperties( |
|
80 TVPbkGsmStoreProperty& aGsmProperties ) const; |
|
81 |
|
82 /** |
|
83 * From MVPbkSimCntStore |
|
84 */ |
|
85 TInt GetUSimStoreProperties( |
|
86 TVPbkUSimStoreProperty& aUSimProperties ) const; |
|
87 |
|
88 /** |
|
89 * From MSimRefreshObject |
|
90 */ |
|
91 TUint32 ElementaryFiles(); |
|
92 |
|
93 private: // Functions from base classes |
|
94 |
|
95 /** |
|
96 * From CStoreBase |
|
97 */ |
|
98 RMobilePhoneStore& ETelStoreBase(); |
|
99 |
|
100 /** |
|
101 * From CStoreBase |
|
102 */ |
|
103 RMobilePhoneStore::TMobilePhoneStoreInfoV1& ETelStoreInfo(); |
|
104 |
|
105 /** |
|
106 * From CStoreBase |
|
107 */ |
|
108 TDes8& ETelStoreInfoPackge(); |
|
109 |
|
110 /** |
|
111 * From CStoreBase |
|
112 */ |
|
113 void OpenETelStoreL(); |
|
114 |
|
115 /** |
|
116 * From CStoreBase |
|
117 */ |
|
118 void CloseETelStore(); |
|
119 |
|
120 /** |
|
121 * From CStoreBase |
|
122 */ |
|
123 MVPbkSimCommand* CreateInitCommandL( |
|
124 MVPbkSimCommandObserver& aObserver ); |
|
125 |
|
126 /** |
|
127 * From CStoreBase |
|
128 */ |
|
129 MVPbkSimCommand* CreateUpdateCommandL( TInt aSimIndex ); |
|
130 |
|
131 /** |
|
132 * From CStoreBase |
|
133 */ |
|
134 MVPbkSimCommand* CreateUpdateCommandUsingRefL( TInt& aSimIndexRef ); |
|
135 |
|
136 private: |
|
137 |
|
138 /** |
|
139 * C++ default constructor. |
|
140 */ |
|
141 COwnNumberStore( TStoreParams& aParams ); |
|
142 |
|
143 /** |
|
144 * By default Symbian 2nd phase constructor is private. |
|
145 */ |
|
146 void ConstructL(); |
|
147 |
|
148 private: // New functions |
|
149 /// Converts contact to ETel own number contact |
|
150 void ConvertToOwnNumberContactL( const TDesC8& aData, |
|
151 RMobileONStore::TMobileONEntryV1& aONContact ); |
|
152 |
|
153 private: // Data |
|
154 /// The ETel own number store |
|
155 RMobileONStore iETelStore; |
|
156 /// Multimode ETel ON phone book info structure. |
|
157 RMobileONStore::TMobileONStoreInfoV1 iETelStoreInfo; |
|
158 /// A package for the ETel phonebook info |
|
159 RMobileONStore::TMobileONStoreInfoV1Pckg iETelInfoPckg; |
|
160 }; |
|
161 } // namespace VPbkSimStoreImpl |
|
162 #endif // VPBKSIMSTOREIMPL_COWNNUMBERSTORE_H |
|
163 |
|
164 // End of File |