35 #include <ctsy/serviceapi/mmtsy_defaults.h> |
35 #include <ctsy/serviceapi/mmtsy_defaults.h> |
36 #include "nokiatsy_internal_variation.h" |
36 #include "nokiatsy_internal_variation.h" |
37 |
37 |
38 // CONSTANTS |
38 // CONSTANTS |
39 const TUint8 KFirstPepType = PN_PEP_TYPE_COMMON; // First PEP type |
39 const TUint8 KFirstPepType = PN_PEP_TYPE_COMMON; // First PEP type |
40 const TUint8 KSecondPepType = PN_PEP_TYPE_GPRS; // Second PEP type |
40 const TUint8 KSecondPepType = PN_PEP_TYPE_COMMON; // Second PEP type |
41 const TUint8 KSecondPepDevice = 0x00; // Device Id of second PEP |
41 const TUint8 KFirstPepDevice = PN_DEV_OWN; // Device Id of first PEP |
42 const TUint8 KSecondPepObject = 0x33; // Object Id of second PEP |
42 const TUint8 KSecondPepDevice = PN_DEV_MODEM; // Device Id of second PEP |
|
43 const TUint8 KSecondPepObject = PN_OBJ_PEP_GPDS; // Object Id of second PEP |
|
44 |
43 const TUint8 KUnknownTransID = 0x00; |
45 const TUint8 KUnknownTransID = 0x00; |
44 |
46 |
45 const TUint8 KInvalidPipeHandle = 0xFF; |
47 const TUint8 KInvalidPipeHandle = 0xFF; |
46 |
48 |
47 // Maximum number of simultaneous PipeHandle supported by this phone. |
49 // Maximum number of simultaneous PipeHandle supported by this phone. |
48 const TInt KMmMaxNumberOfPipeHandles = KMmMaxNumberOfContexts; |
50 const TInt KMmMaxNumberOfPipeHandles = KMmMaxNumberOfContexts; |
49 |
|
50 const TUint8 KFirstPepDevice = PN_DEV_HOST; // Device Id of first PEP |
|
51 |
51 |
52 #ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
52 #ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
53 |
53 |
54 // Channel ID's |
54 // Channel ID's |
55 // Proxy Id's are taken from IscNokiaDefinitions.h file |
55 // Proxy Id's are taken from IscNokiaDefinitions.h file |
104 |
104 |
105 // CLASS DECLARATION |
105 // CLASS DECLARATION |
106 // CMmPipeControl is used to create and send GSM-specific pipe control |
106 // CMmPipeControl is used to create and send GSM-specific pipe control |
107 // ISI messages to PhoNet via PhoNetSender. It also receives |
107 // ISI messages to PhoNet via PhoNetSender. It also receives |
108 // GSM-specific pipe control ISI messages from Phonet via PhoNetReceiver. |
108 // GSM-specific pipe control ISI messages from Phonet via PhoNetReceiver. |
109 class CMmPipeControl : public CBase, |
109 class CMmPipeControl : public CBase, |
110 public MMmMessageReceiver |
110 public MMmMessageReceiver |
111 { |
111 { |
112 public: // Constructors and destructor. |
112 public: // Constructors and destructor. |
113 |
113 |
114 /** |
114 /** |
115 * NewL method is used to create a new instance of class. |
115 * NewL method is used to create a new instance of class. |
116 * @param CMmPhoNetSender*: pointer to phonet sender |
116 * @param CMmPhoNetSender*: pointer to phonet sender |
117 * @param CMmPhoNetReceiver*: pointer to phonet receiver |
117 * @param CMmPhoNetReceiver*: pointer to phonet receiver |
118 * @param CMmPacketContextMessHandler*: pointer to context message handler |
118 * @param CMmPacketContextMessHandler*: pointer to context message handler |
129 * Destructor. |
129 * Destructor. |
130 */ |
130 */ |
131 ~CMmPipeControl(); |
131 ~CMmPipeControl(); |
132 |
132 |
133 public: // New classes |
133 public: // New classes |
134 |
134 |
135 // TPipeOperationInfo |
135 // TPipeOperationInfo |
136 class TPipeOperationInfo |
136 class TPipeOperationInfo |
137 { |
137 { |
138 public: |
138 public: |
139 TUint8 iPipeHandle; |
139 TUint8 iPipeHandle; |
140 TUint8 iTransId; |
140 TUint8 iTransId; |
141 }; |
141 }; |
142 |
142 |
143 public: // Functions from base classes |
143 public: // Functions from base classes |
144 |
144 |
145 /** |
145 /** |
146 * Isimsg received by PhonetReceiver. |
146 * Isimsg received by PhonetReceiver. |
147 * @param TIsiReceiveC, reference to the received message. |
147 * @param TIsiReceiveC, reference to the received message. |
148 */ |
148 */ |
149 void ReceiveMessageL( const TIsiReceiveC& aIsiMessage ); |
149 void ReceiveMessageL( const TIsiReceiveC& aIsiMessage ); |
150 |
150 |
151 public: // New functions |
151 public: // New functions |
152 |
152 |
153 /** |
153 /** |
154 * Creates PnsPipeCreateReq ISI message and sends it to Phonet. |
154 * Creates PnsPipeCreateReq ISI message and sends it to Phonet. |
155 * @param aTransId: transaction Id |
155 * @param aTransId: transaction Id |
156 * @param aPipeState: pipe state |
156 * @param aPipeState: pipe state |
157 * @param aFirstPepObject: First PEP object Id |
157 * @param aFirstPepObject: First PEP object Id |
158 * @return error value: Symbian error code |
158 * @return error value: Symbian error code |
159 */ |
159 */ |
160 TInt PnsPipeCreateReq( |
160 TInt PnsPipeCreateReq( |
161 const TUint8 aTransId, |
161 const TUint8 aTransId, |
162 const TUint8 aPipeState, |
162 const TUint8 aPipeState, |
163 const TUint8 aFirstPepObject ) const; |
163 const TUint8 aFirstPepObject ) const; |
164 |
164 |
165 /** |
165 /** |
166 * Creates PnsPipeEnableReq ISI message and sends it to Phonet. |
166 * Creates PnsPipeEnableReq ISI message and sends it to Phonet. |
167 * @param aPackage: data package |
167 * @param aPipeHandle: pipe to be enabled |
168 * @return error value: Symbian error code |
168 * @param aTransId: transaction Id |
169 */ |
169 * @return error value: Symbian error code |
170 TInt PnsPipeEnableReq( const CMmDataPackage& aPackage ) const; |
170 */ |
|
171 TInt PnsPipeEnableReq( |
|
172 TUint8 aPipeHandle, |
|
173 TUint8 aTransId ) const; |
171 |
174 |
172 /** |
175 /** |
173 * Creates PnsPipeResetReq ISI message and sends it to Phonet. |
176 * Creates PnsPipeResetReq ISI message and sends it to Phonet. |
174 * @param aTransId: transaction Id |
177 * @param aTransId: transaction Id |
175 * @param aPipeHandle: pipe handle |
178 * @param aPipeHandle: pipe handle |
176 * @param aStateAfterReset: pipe state after reset |
179 * @param aStateAfterReset: pipe state after reset |
177 * @return error value: Symbian error code |
180 * @return error value: Symbian error code |
178 */ |
181 */ |
179 TInt PnsPipeResetReq( |
182 TInt PnsPipeResetReq( |
180 const TUint8 aTransId, |
183 const TUint8 aTransId, |
181 const TUint8 aPipeHandle, |
184 const TUint8 aPipeHandle, |
182 const TUint8 aStateAfterReset ); |
185 const TUint8 aStateAfterReset ); |
183 |
186 |
184 /** |
187 /** |
185 * Creates PnsPipeRemoveReq ISI message and sends it to Phonet. |
188 * Creates PnsPipeRemoveReq ISI message and sends it to Phonet. |
186 * @param aTransId: transaction Id |
189 * @param aTransId: transaction Id |
187 * @param aPipeHandle: pipe handle |
190 * @param aPipeHandle: pipe handle |
188 * @return error value: Symbian error code |
191 * @return error value: Symbian error code |
189 */ |
192 */ |
190 TInt PnsPipeRemoveReq( |
193 TInt PnsPipeRemoveReq( |
191 const TUint8 aTransId, |
194 const TUint8 aTransId, |
192 const TUint8 aPipeHandle ); |
195 const TUint8 aPipeHandle ); |
193 |
196 |
|
197 /** |
|
198 * Creates PnsPipeRedirectReq ISI message and sends it to Phonet. |
|
199 * @param aTransId: transaction Id |
|
200 * @param aPipeHandle: pipe handle |
|
201 * @param aOldPepDevId: Device ID to remove from |
|
202 * @param aOldPepObjId: Object ID to remove from |
|
203 * @param aReplacementPepDevId: Device ID to redirect to |
|
204 * @param aReplacementPepObjId: Object ID to redirect to |
|
205 * @return error value: Symbian error code |
|
206 */ |
|
207 TInt PnsPipeRedirectReq( |
|
208 TUint8 aTransId, |
|
209 TUint8 aPipeHandle, |
|
210 TUint8 aOldPepDevId, |
|
211 TUint8 aOldPepObjId, |
|
212 TUint8 aReplacementPepDevId, |
|
213 TUint8 aReplacementPepObjId); |
|
214 |
|
215 /** |
|
216 * Creates PnsPepCtrlReq ISI message and sends it to Phonet. |
|
217 * @param aDevId: device Id |
|
218 * @param aObjId: object Id |
|
219 * @param aTransId: transaction Id |
|
220 * @param aPipeHandle: pipe handle |
|
221 * @param aControlId: control id |
|
222 * @param aStatus: status code |
|
223 * @return error value: Symbian error code |
|
224 */ |
|
225 TInt PnsPepCtrlReq( |
|
226 TUint8 aDevId, |
|
227 TUint8 aObjId, |
|
228 TUint8 aTransId, |
|
229 TUint8 aPipeHandle, |
|
230 TUint8 aControlId, |
|
231 TUint8 aStatus, |
|
232 TUint8 aChannelId ); |
|
233 |
194 public: // Functions from base classes |
234 public: // Functions from base classes |
195 // None |
235 // None |
196 |
236 |
197 protected: // New functions |
237 protected: // New functions |
198 // None |
238 // None |
199 |
239 |
200 protected: // Functions from base classes |
240 protected: // Functions from base classes |
201 // None |
241 // None |
231 * @param aIsiMessage, reference to the received message. |
263 * @param aIsiMessage, reference to the received message. |
232 */ |
264 */ |
233 void PnsPipeEnableResp( const TIsiReceiveC& aIsiMessage ); |
265 void PnsPipeEnableResp( const TIsiReceiveC& aIsiMessage ); |
234 |
266 |
235 /** |
267 /** |
236 * PnsPipeReset response. |
268 * PnsPipeReset response. |
237 * @param aIsiMessage, reference to the received message. |
269 * @param aIsiMessage, reference to the received message. |
238 */ |
270 */ |
239 void PnsPipeResetResp( const TIsiReceiveC& aIsiMessage ); |
271 void PnsPipeResetResp( const TIsiReceiveC& aIsiMessage ); |
240 |
272 |
241 /** |
273 /** |
242 * PnsPipeRemove response. |
274 * PnsPipeRemove response. |
243 * @param aIsiMessage, reference to the received message. |
275 * @param aIsiMessage, reference to the received message. |
244 */ |
276 */ |
245 void PnsPipeRemoveResp( const TIsiReceiveC& aIsiMessage ); |
277 void PnsPipeRemoveResp( const TIsiReceiveC& aIsiMessage ); |
246 |
278 |
247 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
279 /** |
248 /** |
280 * PnsPipeRedirect response. |
249 * PnsNameQuery response. |
281 * @param aIsiMessage, reference to the received message. |
250 * @param aIsiMessage, reference to the received message. |
282 */ |
251 */ |
283 void PnsPipeRedirectResp( const TIsiReceiveC& aIsiMessage ); |
252 void PnsNameQueryResp( const TIsiReceiveC& aIsiMessage ); |
284 |
253 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
285 /** |
254 |
286 * PnsPepCtrl response. |
255 /** |
287 * @param aIsiMessage, reference to the received message. |
256 * Initialize lists. |
288 */ |
|
289 void PnsPepCtrlResp( const TIsiReceiveC& aIsiMessage ); |
|
290 |
|
291 |
|
292 /** |
|
293 * Initialize lists. |
257 */ |
294 */ |
258 void InitLists(); |
295 void InitLists(); |
259 |
296 |
260 /** |
297 /** |
261 * Set Pipe Handle. |
298 * Set Pipe Handle. |
262 * @param aPipeHandle: pipe handle |
299 * @param aPipeHandle: pipe handle |
263 */ |
300 */ |
264 void SetPipeHandle( const TUint8 aPipeHandle ); |
301 void SetPipeHandle( const TUint8 aPipeHandle ); |
265 |
302 |
266 /** |
303 /** |
267 * Set Transaction Id. |
304 * Set Transaction Id. |
268 * @param aPipeHandle: pipe handle |
305 * @param aPipeHandle: pipe handle |
269 * @param aTransId: transaction Id |
306 * @param aTransId: transaction Id |
270 */ |
307 */ |
271 void SetTransactionId( |
308 void SetTransactionId( |
272 const TUint8 aPipeHandle, |
309 const TUint8 aPipeHandle, |
273 const TUint8 aTransId ); |
310 const TUint8 aTransId ); |
274 |
311 |
275 /** |
312 /** |
276 * Return Transaction Id. |
313 * Return Transaction Id. |
277 * @param aPipeHandle: pipe handle |
314 * @param aPipeHandle: pipe handle |
278 * @return TUint8, Transaction Id |
315 * @return TUint8, Transaction Id |
279 */ |
316 */ |
280 TUint8 TransactionId( const TUint8 aPipeHandle ) const; |
317 TUint8 TransactionId( const TUint8 aPipeHandle ) const; |
281 |
318 |
282 /** |
319 /** |
283 * Reset Pipe Handle. |
320 * Reset Pipe Handle. |
284 * @param aPipeHandle: pipe handle |
321 * @param aPipeHandle: pipe handle |
285 */ |
322 */ |
286 void ResetPipeHandle( const TUint8 aPipeHandle ); |
323 void ResetPipeHandle( const TUint8 aPipeHandle ); |
287 |
324 |
288 /** |
325 /** |
289 * If PipeHandle found returns True otherwise returns False. |
326 * If PipeHandle found returns True otherwise returns False. |
290 * @param aPipeHandle: pipe handle |
327 * @param aPipeHandle: pipe handle |
291 */ |
328 */ |
292 TBool IsOperationCalled( const TUint8 aPipeHandle ) const; |
329 TBool IsOperationCalled( const TUint8 aPipeHandle ) const; |
293 |
330 |
294 #ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
331 #ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
295 /** |
332 /** |
296 * PnsPepConnect request. |
333 * PnsPepConnect request. |
297 * @param aIsiMessage, reference to the received message. |
334 * @param aIsiMessage, reference to the received message. |
298 */ |
335 */ |
299 void PnsPepConnectReq( const TIsiReceiveC& aIsiMessage ); |
336 void PnsPepConnectReq( const TIsiReceiveC& aIsiMessage ); |
303 * @param aIsiMessage, reference to the received message. |
340 * @param aIsiMessage, reference to the received message. |
304 */ |
341 */ |
305 void PnsPepDisconnectReq( const TIsiReceiveC& aIsiMessage ); |
342 void PnsPepDisconnectReq( const TIsiReceiveC& aIsiMessage ); |
306 |
343 |
307 /** |
344 /** |
308 * PnsPepReset request. |
345 * PnsPepReset request. |
309 * @param aIsiMessage, reference to the received message. |
346 * @param aIsiMessage, reference to the received message. |
310 */ |
347 */ |
311 void PnsPepResetReq( const TIsiReceiveC& aIsiMessage ); |
348 void PnsPepResetReq( const TIsiReceiveC& aIsiMessage ); |
312 |
349 |
313 /** |
350 /** |
314 * PnsPepEnable request. |
351 * PnsPepEnable request. |
315 * @param aIsiMessage, reference to the received message. |
352 * @param aIsiMessage, reference to the received message. |
316 */ |
353 */ |
317 void PnsPepEnableReq( const TIsiReceiveC& aIsiMessage ); |
354 void PnsPepEnableReq( const TIsiReceiveC& aIsiMessage ); |
318 |
355 |
319 /** |
356 /** |
320 * PnsPepConnect response. |
357 * PnsPepConnect response. |
321 * @param aTransId: transaction Id |
358 * @param aTransId: transaction Id |
322 * @param aPipeHandle: pipe handle |
359 * @param aPipeHandle: pipe handle |
323 */ |
360 */ |
324 void PnsPepConnectResp( |
361 void PnsPepConnectResp( |
325 const TUint8 aTransId, |
362 const TUint8 aTransId, |
326 const TUint8 aPipeHandle ); |
363 const TUint8 aPipeHandle ); |
327 |
364 |
328 /** |
365 /** |
329 * PnsPepDisconnect response. |
366 * PnsPepDisconnect response. |
330 * @param aTransId: transaction Id |
367 * @param aTransId: transaction Id |
331 * @param aPipeHandle: pipe handle |
368 * @param aPipeHandle: pipe handle |
332 */ |
369 */ |
333 void PnsPepDisconnectResp( |
370 void PnsPepDisconnectResp( |
334 const TUint8 aTransId, |
371 const TUint8 aTransId, |