6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef _CMMPHONEBOOK_OPERATION_DELETE_H |
18 #ifndef CMMPHONEBOOKOPERATIONDELETE_H |
19 #define _CMMPHONEBOOK_OPERATION_DELETE_H |
19 #define CMMPHONEBOOKOPERATIONDELETE_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
22 #include <ctsy/pluginapi/cmmdatapackage.h> |
22 #include <ctsy/pluginapi/cmmdatapackage.h> |
23 #include <e32base.h> |
23 #include <e32base.h> |
|
24 |
24 #include "cmmphonebookstoreoperationbase.h" |
25 #include "cmmphonebookstoreoperationbase.h" |
25 |
26 |
26 // CONSTANTS |
27 // CONSTANTS |
27 // None |
28 //none |
28 |
29 |
29 // MACROS |
30 // MACROS |
30 // None |
31 //none |
31 |
32 |
32 // DATA TYPES |
33 // DATA TYPES |
33 // None |
34 //none |
34 |
35 |
35 // EXTERNAL DATA STRUCTURES |
36 // EXTERNAL DATA STRUCTURES |
36 // None |
37 enum TPBDeletePhases |
37 |
38 { |
38 // FUNCTION PROTOTYPES |
39 EPBDeletePhaseReadExtensions, |
39 // None |
40 EPBDeletePhaseReadEntry, |
40 |
41 EPBDeletePhaseDeleteExtension, |
41 // FORWARD DECLARATION |
42 EPBDeletePhase_Read_MBI_profile, |
42 // None |
43 EPBDeletePhase_delete_MBI_profile, |
|
44 EPBDeletePhaseDeleteEntry |
|
45 }; |
|
46 |
|
47 |
|
48 // FUNCTION PROTOTYPES |
|
49 //none |
43 |
50 |
44 // CLASS DECLARATION |
51 // CLASS DECLARATION |
45 /** |
52 /** |
46 * CMmPhoneBookOperationDelete is used to create and send GSM-specific |
53 * CMmPhoneBookOperationWrite is used to create and send GSM-specific |
47 * PBStore ISI messages to PhoNet via PhoNetSender relating to delete. |
54 * PBStore ISI messages to PhoNet via PhoNetSender relating to write. |
48 */ |
55 */ |
49 class CMmPhoneBookOperationDelete : public CMmPhoneBookStoreOperationBase |
56 class CMmPhoneBookOperationDelete |
|
57 : public CMmPhoneBookStoreOperationBase |
50 { |
58 { |
51 public: // Constructors and destructor |
59 public: // Constructors and destructor |
52 |
60 |
53 /** |
61 /** |
54 * Two-phased constructor. |
62 * Two-phased constructor. |
55 * @return CMmPhoneBookOperationDelete*: created object |
|
56 */ |
63 */ |
57 static CMmPhoneBookOperationDelete* NewL( |
64 static CMmPhoneBookOperationDelete* NewL( |
58 CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler, |
65 CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler, |
|
66 CMmUiccMessHandler* aUiccMessHandler, |
59 const CMmDataPackage* aDataPackage ); |
67 const CMmDataPackage* aDataPackage ); |
|
68 |
60 /** |
69 /** |
61 * Destructor. |
70 * Destructor. |
62 */ |
71 */ |
63 ~CMmPhoneBookOperationDelete(); |
72 ~CMmPhoneBookOperationDelete(); |
64 |
73 |
|
74 /** |
|
75 * This method creates entry point to correct operation |
|
76 * @param aPhonebookType PhoneBook type |
|
77 * @param aIpc IPC |
|
78 * @return Pointer to operation. |
|
79 */ |
|
80 static CMmPhoneBookOperationDelete* Build( |
|
81 TName aPhonebookType, |
|
82 TInt aIpc ); |
|
83 |
65 private: |
84 private: |
66 |
85 |
67 /** |
86 /** |
68 * By default Symbian OS constructor is private. |
87 * By default Symbian OS constructor is private. |
69 */ |
88 */ |
70 CMmPhoneBookOperationDelete(); |
89 CMmPhoneBookOperationDelete(); |
71 |
90 |
72 /** |
91 /** |
|
92 * Class attributes are created in ConstructL. |
|
93 */ |
|
94 //void ConstructL(); |
|
95 |
|
96 /** |
73 * Separates different IPC requests for each other. |
97 * Separates different IPC requests for each other. |
74 * @param TInt aIpc: Identify number of request. |
98 * |
75 * @param const CMmDataPackage* aDataPackage: Packaged data. |
99 * @param aIpc Identify number of request. |
76 * @return TInt: KErrNone or error value. |
100 * @param aDataPackage Packaged data. |
77 */ |
101 * @return KErrNone or error value. |
78 TInt CreateReq( TInt aIpc, const CMmDataPackage* aDataPackage ); |
102 */ |
79 |
103 TInt UICCCreateReq( |
80 /** |
104 TInt aIpc, |
81 * Handles SimPbResp ISI -message |
105 const CMmDataPackage* aDataPackage, |
82 * @param TIsiReceiveC& aIsiMessage |
106 TUint8 aTransId ); |
83 * @param TBool& aComplete: Indicates if request can remove from |
107 |
84 * operationlist or not. |
108 /** |
85 * @return TInt: KErrNone or error value. |
109 * Handles UICC response ISI -message |
86 */ |
110 * @param aStatus Status |
87 TInt HandleSimPbRespL( |
111 * @param aFileData File data |
88 const TIsiReceiveC& aIsiMessage, |
112 * @param aTransId Transaction ID |
89 TBool& aComplete ); |
113 * @return Is operation going to be deleted |
90 |
114 */ |
91 /** |
115 TBool HandleUICCPbRespL( |
92 * Handling delete response |
116 TInt aStatus, |
93 * @param TIsiReceiveC& aIsiMessage |
117 TUint8 aDetails, |
94 * @param TBool& aComplete: Indicates if request can remove from |
118 const TDesC8& aFileData, |
95 * operationlist or not. |
119 TInt aTransId ); |
96 * @return TInt: KErrNone or error value. |
120 |
97 */ |
121 /** |
98 TInt HandleDeleteResp( |
122 * Handles request to delete a phonebook entry |
99 const TIsiReceiveC& aIsiMessage, |
123 * @return KErrNone or error value |
100 TBool& aComplete ); |
124 */ |
101 |
125 TInt UiccPbReqDelete(); |
102 /** |
126 |
103 * Creates and sends ISI message in order to delete an entry from SIM |
127 /** |
104 * @param TInt16 aIndex: Location index |
128 * Creates and sends ISI message in order to delete an entry |
105 * @return TInt: KErrNone or error value. |
129 * @return KErrNone or error value |
106 */ |
130 */ |
107 TInt SimPbReqDelete( TInt16 aIndex ); |
131 TInt UiccPbReqDeleteEntry(); |
108 |
132 |
109 /** |
133 /** |
110 * Creates and sends ISI message in order to delete all entries from SIM |
134 * Creates and sends ISI message in order to delete an extension |
111 * @return TInt: KErrNone or error value. |
135 * @param aExtRecordNum Extension record number |
112 */ |
136 * @return KErrNone or error value |
113 TInt SimPbReqDeleteAll(); |
137 */ |
114 |
138 TInt UiccPbReqDeleteExt( TInt aExtRecordNum ); |
115 #ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
139 |
116 /** |
140 /** |
117 * Creates and sends ISI message in order to delete alphastring from SIM |
141 * Creates and sends ISI message in order to read an entry |
118 * @return TInt: KErrNone or error value |
142 * @return KErrNone or error value |
119 */ |
143 */ |
120 TInt SimDeleteAlphaStringReq(); |
144 TInt UiccPbReqReadEntry(); |
121 |
145 |
122 /** |
146 /** |
123 * Receives SIM_PB_RESP(SIM_PB_DELETE) ISI messages from phonet receiver |
147 * Handles phonebook entry data |
124 * @param TIsiReceiveC: reference to the received message. |
148 * @param aFileData File data |
125 * @return TInt: KErrNone or error code |
149 * @return KErrNone or error value |
126 */ |
150 */ |
127 TInt SimDeleteAlphaStringRespL( const TIsiReceiveC& aIsiMessage ); |
151 TInt HandleReadEntryResp( const TDesC8& aFileData ); |
128 #endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
152 |
129 |
153 /** |
130 public: // Data |
154 * Creates and sends ISI message in order to read an extension |
|
155 * @return KErrNone or error value |
|
156 */ |
|
157 TInt UiccPbReqReadExt( TUint8 aExtRecordNum ); |
|
158 |
|
159 /** |
|
160 * Handles phonebook extension data |
|
161 * @param aFileData File data |
|
162 * @return KErrNone or error value |
|
163 */ |
|
164 TInt HandleReadExtResp( const TDesC8& aFileData ); |
|
165 |
|
166 /** |
|
167 * Creates request to read MBI record |
|
168 * @return KErrNone or error value |
|
169 */ |
|
170 TInt UiccPbReqReadMBI(); |
|
171 |
|
172 /** |
|
173 * Handles phonebook extension data |
|
174 * @param aStatus |
|
175 * @param aDetails |
|
176 * @param aFileData File data |
|
177 * @return KErrNone or error value |
|
178 */ |
|
179 TInt HandleWriteMBIReadResp(TInt aStatus, TUint8 aDetails, const TDesC8& aFileData ); |
|
180 |
|
181 /** |
|
182 * Creates request to Delete MBI profile |
|
183 * @return KErrNone or error value |
|
184 */ |
|
185 TInt UiccPBReqDeleteMBIProfile(); |
|
186 |
|
187 |
|
188 public: // Data |
131 // None |
189 // None |
132 |
190 |
133 protected: // Data |
191 protected: // Data |
134 // None |
192 // none |
135 |
193 |
136 private: // Data |
194 private: // Data |
137 // None |
195 |
138 |
196 // Keep track on current delete phase |
|
197 TPBDeletePhases iCurrentDeletePhase; |
|
198 |
|
199 // Phone book entry to be deleted |
|
200 CPhoneBookStoreEntry* iPhoneBookEntry; |
|
201 |
|
202 // IPC number of operation |
|
203 TInt iIpc; |
|
204 |
|
205 // Number of entries |
|
206 TInt iNumOfEntries; |
|
207 |
|
208 // Number of extension records in entry |
|
209 TInt iNumOfExtensions; |
|
210 |
|
211 // Elementary file ID |
|
212 TUint16 iFileId; |
|
213 |
|
214 // Extension file ID |
|
215 TUint16 iFileIdExt; |
|
216 |
|
217 // Record number in phonebook to be deleted |
|
218 TInt iIndex; |
|
219 |
|
220 // Phonebook entry |
|
221 TPBEntry iEntry; |
|
222 |
|
223 // Transaction ID used in delete operations |
|
224 TUint8 iTransId; |
|
225 |
|
226 // Location index of phonebook type |
|
227 TUint8 iArrayIndex; |
|
228 |
|
229 // Information of location already read |
|
230 TBool iLocationFoundInPbList; |
|
231 |
|
232 // Array to store ext rexords to be deletet |
|
233 RArray<TInt> iExtRecordArrayToBeDelete; |
|
234 |
|
235 // Attribute to store MBI Profiletype |
|
236 TUint8 iMBIProfileType; |
139 }; |
237 }; |
140 |
238 |
141 #endif // _CMMPHONEBOOK_OPERATION_DELETE_H |
239 #endif // CMMPHONEBOOKOPERATIONDELETE_H |
142 |
240 |
143 // End of File |
241 // End of file |