|
1 /* |
|
2 * Copyright (c) 2009 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 the License "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 * |
|
16 */ |
|
17 |
|
18 #ifndef _CMMPHONEBOOK_OPERATION_READ_H |
|
19 #define _CMMPHONEBOOK_OPERATION_READ_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <ctsy/pluginapi/cmmdatapackage.h> |
|
23 #include <e32base.h> |
|
24 #include "cmmphonebookstoreoperationbase.h" |
|
25 |
|
26 // CONSTANTS |
|
27 // None |
|
28 |
|
29 // MACROS |
|
30 // None |
|
31 |
|
32 // DATA TYPES |
|
33 // None |
|
34 |
|
35 // EXTERNAL DATA STRUCTURES |
|
36 // None |
|
37 |
|
38 // FUNCTION PROTOTYPES |
|
39 // None |
|
40 |
|
41 // CLASS DECLARATION |
|
42 /** |
|
43 * CMmPhoneBookOperationInit is used to create and send GSM-specific |
|
44 * PBStore ISI messages to PhoNet via PhoNetSender relating to read. |
|
45 */ |
|
46 class CMmPhoneBookOperationRead : public CMmPhoneBookStoreOperationBase |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * By default Symbian OS constructor is private. |
|
52 */ |
|
53 CMmPhoneBookOperationRead(); |
|
54 |
|
55 |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 * @return CMmPhoneBookOperationRead*: created object |
|
59 */ |
|
60 static CMmPhoneBookOperationRead* NewL( |
|
61 CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler, |
|
62 const CMmDataPackage* aDataPackage ); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 ~CMmPhoneBookOperationRead(); |
|
68 |
|
69 /** |
|
70 * This method created entry point to correct operation |
|
71 * @param TName aPhonebookType: |
|
72 * @param TInt aIpc: Identify number of request. |
|
73 * @return CMmPhoneBookStoreOperation*: pointer to operation. |
|
74 */ |
|
75 static CMmPhoneBookOperationRead* Build( |
|
76 TName aPhonebookType, |
|
77 TInt aIpc ); |
|
78 |
|
79 |
|
80 |
|
81 virtual TInt UICCHandleData3gADNReadReq( TInt /*aFileID*/, TInt /*aFileSFI*/) |
|
82 { |
|
83 TFLOGSTRING("TSY: CMmPhoneBookOperationInit::CreateReq - Return KErrNotSupported"); |
|
84 return KErrNotSupported; |
|
85 } |
|
86 |
|
87 |
|
88 virtual TInt HandleUICC3gADNRespL(const TInt /*aStatus*/, const TDes8& /*aFileData*/, const TInt /*aTransId*/) |
|
89 { |
|
90 TFLOGSTRING("TSY: CMmPhoneBookOperationInit::CreateReq - Return KErrNotSupported"); |
|
91 return KErrNotSupported; |
|
92 } |
|
93 private: |
|
94 |
|
95 |
|
96 /** |
|
97 * Class attributes are created in ConstructL. |
|
98 */ |
|
99 void ConstructL(); |
|
100 |
|
101 // Transmit |
|
102 |
|
103 /** |
|
104 * Separates different IPC requests for each other. |
|
105 * @param TInt aIpc: Identify number of request. |
|
106 * @param const CMmDataPackage* aDataPackage: Packaged data. |
|
107 * @return TInt: KErrNone or error value. |
|
108 */ |
|
109 TInt UICCCreateReq( TInt aIpc, const CMmDataPackage* aDataPackage ); |
|
110 |
|
111 /** |
|
112 * Constructs an ISI-message to read entry from SIM |
|
113 * @param |
|
114 * @return TInt: KErrNone or error value. |
|
115 */ |
|
116 TInt USimPbReqRead( TInt aRecordNo ); |
|
117 |
|
118 /** |
|
119 * Constructs Data to read entry from USIM ADN Phonebook |
|
120 * @param |
|
121 * @return TInt: KErrNone or error value. |
|
122 */ |
|
123 TInt UICCHandleDataADNReadReq( TUiccReadLinearFixed& aParams, TUint16 aFileID, TUint8 aFileSFI ); |
|
124 |
|
125 |
|
126 // Receive |
|
127 |
|
128 /** |
|
129 * Handles SimPbResp ISI -message |
|
130 * @param TIsiReceiveC& aIsiMessage |
|
131 * @param TBool& aComplete: Indicates if request can remove from |
|
132 * operationlist or not. |
|
133 * @return TInt: KErrNone or error value. |
|
134 */ |
|
135 TInt HandleUICCPbRespL( |
|
136 TBool &aComplete, |
|
137 TInt aStatus, |
|
138 const TDesC8 &aFileData, |
|
139 TInt aTransId); |
|
140 |
|
141 |
|
142 |
|
143 /** |
|
144 * Handles SimPbResp ISI -message |
|
145 * @param TInt aTagValue |
|
146 * @param TDes8& aFileData |
|
147 * @return TInt: KErrNone or error value. |
|
148 */ |
|
149 TInt UICCHandleDataADNReadResp( const TDesC8& aFileData); |
|
150 |
|
151 |
|
152 public: // Data |
|
153 // None |
|
154 |
|
155 protected: // Data |
|
156 // Attribute to hold the information how many entries left to read |
|
157 TInt iNumOfEntriesToRead; |
|
158 |
|
159 // Attribute to hold the information how many entries written into |
|
160 // array |
|
161 TInt iNumOfEntriesFilled; |
|
162 |
|
163 private: // Data |
|
164 // None |
|
165 |
|
166 // Attribute to check if Extension read is going on |
|
167 TBool iExtensionRead ; |
|
168 |
|
169 // Attribute to store the service type requested |
|
170 TInt iServiceType; |
|
171 |
|
172 // Attribute to store no of records for all EF |
|
173 |
|
174 TInt iNumOfPhoneBookRecords; |
|
175 |
|
176 |
|
177 |
|
178 }; |
|
179 |
|
180 #endif // _CMMPHONEBOOK_OPERATION_READ_H |
|
181 |
|
182 // End of file |