0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 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 |
*
|
9
|
14 |
* Description:
|
0
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CMMPIPECONTROL_H
|
|
21 |
#define CMMPIPECONTROL_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <iscnokiadefinitions.h>
|
|
25 |
#include "cmmphonetsender.h"
|
|
26 |
#include "cmmphonetreceiver.h" // for mmmmessagereceiver
|
|
27 |
#include "nokiatsy_internal_variation.h"
|
|
28 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING
|
|
29 |
#include "pn_const_for_uicc.h"
|
|
30 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */
|
|
31 |
#include <pn_const.h>
|
|
32 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */
|
|
33 |
#include <pipeisi.h>
|
|
34 |
#include <pipe_sharedisi.h>
|
|
35 |
#include <ctsy/serviceapi/mmtsy_defaults.h>
|
|
36 |
#include "nokiatsy_internal_variation.h"
|
|
37 |
|
|
38 |
// CONSTANTS
|
|
39 |
const TUint8 KFirstPepType = PN_PEP_TYPE_COMMON; // First PEP type
|
9
|
40 |
const TUint8 KSecondPepType = PN_PEP_TYPE_COMMON; // Second PEP type
|
|
41 |
const TUint8 KFirstPepDevice = PN_DEV_OWN; // Device Id of first 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 |
|
0
|
45 |
const TUint8 KUnknownTransID = 0x00;
|
|
46 |
|
|
47 |
const TUint8 KInvalidPipeHandle = 0xFF;
|
|
48 |
|
|
49 |
// Maximum number of simultaneous PipeHandle supported by this phone.
|
|
50 |
const TInt KMmMaxNumberOfPipeHandles = KMmMaxNumberOfContexts;
|
|
51 |
|
|
52 |
#ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS
|
|
53 |
|
|
54 |
// Channel ID's
|
|
55 |
// Proxy Id's are taken from IscNokiaDefinitions.h file
|
|
56 |
const TUint8 KMmPacketContextProxy1_DOS = EIscNokiaMmTsy;
|
|
57 |
const TUint8 KMmPacketContextProxy2_DOS = EIscNokiaMmTsy;
|
|
58 |
const TUint8 KMmPacketContextProxy3_DOS = EIscNokiaMmTsy;
|
|
59 |
const TUint8 KMmPacketContextProxy4_DOS = EIscNokiaMmTsy;
|
|
60 |
const TUint8 KMmPacketContextProxy5_DOS = EIscNokiaMmTsy;
|
|
61 |
const TUint8 KMmPacketContextProxy6_DOS = EIscNokiaMmTsy;
|
|
62 |
const TUint8 KMmPacketContextProxy7_DOS = EIscNokiaMmTsy;
|
|
63 |
const TUint8 KMmPacketContextProxy8_DOS = EIscNokiaMmTsy;
|
|
64 |
const TUint8 KMmPacketContextProxy9_DOS = EIscNokiaMmTsy;
|
|
65 |
const TUint8 KMmPacketContextProxy10_DOS = EIscNokiaMmTsy;
|
|
66 |
const TUint8 KMmPacketContextProxy11_DOS = EIscNokiaMmTsy;
|
|
67 |
|
|
68 |
#else
|
|
69 |
|
|
70 |
const TUint8 KMmPacketContextProxy1_DOS = EIscNokiaNifPep0;
|
|
71 |
const TUint8 KMmPacketContextProxy2_DOS = EIscNokiaNifPep1;
|
|
72 |
const TUint8 KMmPacketContextProxy3_DOS = EIscNokiaNifPep2;
|
|
73 |
const TUint8 KMmPacketContextProxy4_DOS = EIscNokiaNifPep3;
|
|
74 |
const TUint8 KMmPacketContextProxy5_DOS = EIscNokiaNifPep4;
|
|
75 |
const TUint8 KMmPacketContextProxy6_DOS = EIscNokiaNifPep5;
|
|
76 |
const TUint8 KMmPacketContextProxy7_DOS = EIscNokiaNifPep6;
|
|
77 |
const TUint8 KMmPacketContextProxy8_DOS = EIscNokiaNifPep7;
|
|
78 |
const TUint8 KMmPacketContextProxy9_DOS = EIscNokiaNifPep8;
|
|
79 |
const TUint8 KMmPacketContextProxy10_DOS = EIscNokiaNifPep9;
|
|
80 |
const TUint8 KMmPacketContextProxy11_DOS = EIscNokiaNifPep10;
|
|
81 |
|
|
82 |
#endif // DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS
|
|
83 |
|
|
84 |
// Dummy transaction id
|
|
85 |
const TInt KDummyTrId = 0x0F;
|
|
86 |
|
|
87 |
// Last byte index
|
|
88 |
const TInt KLastByteIndex = 3;
|
|
89 |
|
|
90 |
// MACROS
|
|
91 |
// None
|
|
92 |
|
|
93 |
// DATA TYPES
|
|
94 |
// None
|
|
95 |
|
|
96 |
// FUNCTION PROTOTYPES
|
|
97 |
// None
|
|
98 |
|
|
99 |
// FORWARD DECLARATIONS
|
|
100 |
class TIsiReceiveC;
|
|
101 |
class CMmDataPackage;
|
|
102 |
class CMmPacketContextMessHandler;
|
|
103 |
class CMmPacketContextMesshandlerList;
|
|
104 |
|
|
105 |
// CLASS DECLARATION
|
|
106 |
// CMmPipeControl is used to create and send GSM-specific pipe control
|
|
107 |
// ISI messages to PhoNet via PhoNetSender. It also receives
|
|
108 |
// GSM-specific pipe control ISI messages from Phonet via PhoNetReceiver.
|
9
|
109 |
class CMmPipeControl : public CBase,
|
0
|
110 |
public MMmMessageReceiver
|
|
111 |
{
|
|
112 |
public: // Constructors and destructor.
|
9
|
113 |
|
0
|
114 |
/**
|
|
115 |
* NewL method is used to create a new instance of class.
|
|
116 |
* @param CMmPhoNetSender*: pointer to phonet sender
|
|
117 |
* @param CMmPhoNetReceiver*: pointer to phonet receiver
|
|
118 |
* @param CMmPacketContextMessHandler*: pointer to context message handler
|
|
119 |
* @param CMmPacketContextMesshandlerList*: pointer to context list
|
|
120 |
* @return CMmPipeControl*: pointer to the message handler
|
|
121 |
*/
|
|
122 |
static CMmPipeControl* NewL(
|
|
123 |
CMmPhoNetSender* aPhoNetSender,
|
|
124 |
CMmPhoNetReceiver* aPhoNetReceiver,
|
|
125 |
CMmPacketContextMessHandler* aMmPacketContextMessHandler,
|
|
126 |
CMmPacketContextMesshandlerList* aMmPacketContextMesshandlerList );
|
|
127 |
|
|
128 |
/**
|
|
129 |
* Destructor.
|
|
130 |
*/
|
|
131 |
~CMmPipeControl();
|
|
132 |
|
|
133 |
public: // New classes
|
9
|
134 |
|
0
|
135 |
// TPipeOperationInfo
|
|
136 |
class TPipeOperationInfo
|
|
137 |
{
|
|
138 |
public:
|
|
139 |
TUint8 iPipeHandle;
|
|
140 |
TUint8 iTransId;
|
|
141 |
};
|
|
142 |
|
|
143 |
public: // Functions from base classes
|
9
|
144 |
|
0
|
145 |
/**
|
|
146 |
* Isimsg received by PhonetReceiver.
|
|
147 |
* @param TIsiReceiveC, reference to the received message.
|
|
148 |
*/
|
9
|
149 |
void ReceiveMessageL( const TIsiReceiveC& aIsiMessage );
|
0
|
150 |
|
|
151 |
public: // New functions
|
|
152 |
|
|
153 |
/**
|
|
154 |
* Creates PnsPipeCreateReq ISI message and sends it to Phonet.
|
|
155 |
* @param aTransId: transaction Id
|
|
156 |
* @param aPipeState: pipe state
|
|
157 |
* @param aFirstPepObject: First PEP object Id
|
9
|
158 |
* @return error value: Symbian error code
|
0
|
159 |
*/
|
|
160 |
TInt PnsPipeCreateReq(
|
|
161 |
const TUint8 aTransId,
|
|
162 |
const TUint8 aPipeState,
|
|
163 |
const TUint8 aFirstPepObject ) const;
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Creates PnsPipeEnableReq ISI message and sends it to Phonet.
|
9
|
167 |
* @param aPipeHandle: pipe to be enabled
|
|
168 |
* @param aTransId: transaction Id
|
|
169 |
* @return error value: Symbian error code
|
0
|
170 |
*/
|
9
|
171 |
TInt PnsPipeEnableReq(
|
|
172 |
TUint8 aPipeHandle,
|
|
173 |
TUint8 aTransId ) const;
|
0
|
174 |
|
|
175 |
/**
|
|
176 |
* Creates PnsPipeResetReq ISI message and sends it to Phonet.
|
|
177 |
* @param aTransId: transaction Id
|
|
178 |
* @param aPipeHandle: pipe handle
|
|
179 |
* @param aStateAfterReset: pipe state after reset
|
9
|
180 |
* @return error value: Symbian error code
|
0
|
181 |
*/
|
|
182 |
TInt PnsPipeResetReq(
|
|
183 |
const TUint8 aTransId,
|
|
184 |
const TUint8 aPipeHandle,
|
|
185 |
const TUint8 aStateAfterReset );
|
|
186 |
|
|
187 |
/**
|
|
188 |
* Creates PnsPipeRemoveReq ISI message and sends it to Phonet.
|
|
189 |
* @param aTransId: transaction Id
|
|
190 |
* @param aPipeHandle: pipe handle
|
9
|
191 |
* @return error value: Symbian error code
|
0
|
192 |
*/
|
|
193 |
TInt PnsPipeRemoveReq(
|
|
194 |
const TUint8 aTransId,
|
|
195 |
const TUint8 aPipeHandle );
|
9
|
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 |
|
0
|
234 |
public: // Functions from base classes
|
|
235 |
// None
|
9
|
236 |
|
0
|
237 |
protected: // New functions
|
|
238 |
// None
|
|
239 |
|
|
240 |
protected: // Functions from base classes
|
|
241 |
// None
|
|
242 |
|
|
243 |
private: // New functions
|
|
244 |
|
|
245 |
/**
|
|
246 |
* C++ default constructor.
|
|
247 |
*/
|
|
248 |
CMmPipeControl();
|
|
249 |
|
|
250 |
/**
|
|
251 |
* By default EPOC constructor is private.
|
|
252 |
*/
|
|
253 |
void ConstructL();
|
|
254 |
|
|
255 |
/**
|
9
|
256 |
* PnsPipeCreate response.
|
0
|
257 |
* @param aIsiMessage, reference to the received message.
|
|
258 |
*/
|
|
259 |
void PnsPipeCreateResp( const TIsiReceiveC &aIsiMessage );
|
|
260 |
|
|
261 |
/**
|
|
262 |
* PnsPipeEnable response.
|
|
263 |
* @param aIsiMessage, reference to the received message.
|
|
264 |
*/
|
|
265 |
void PnsPipeEnableResp( const TIsiReceiveC& aIsiMessage );
|
|
266 |
|
|
267 |
/**
|
9
|
268 |
* PnsPipeReset response.
|
0
|
269 |
* @param aIsiMessage, reference to the received message.
|
|
270 |
*/
|
|
271 |
void PnsPipeResetResp( const TIsiReceiveC& aIsiMessage );
|
|
272 |
|
|
273 |
/**
|
9
|
274 |
* PnsPipeRemove response.
|
0
|
275 |
* @param aIsiMessage, reference to the received message.
|
|
276 |
*/
|
|
277 |
void PnsPipeRemoveResp( const TIsiReceiveC& aIsiMessage );
|
|
278 |
|
9
|
279 |
/**
|
|
280 |
* PnsPipeRedirect response.
|
0
|
281 |
* @param aIsiMessage, reference to the received message.
|
|
282 |
*/
|
9
|
283 |
void PnsPipeRedirectResp( const TIsiReceiveC& aIsiMessage );
|
0
|
284 |
|
|
285 |
/**
|
9
|
286 |
* PnsPepCtrl response.
|
|
287 |
* @param aIsiMessage, reference to the received message.
|
|
288 |
*/
|
|
289 |
void PnsPepCtrlResp( const TIsiReceiveC& aIsiMessage );
|
|
290 |
|
|
291 |
|
|
292 |
/**
|
|
293 |
* Initialize lists.
|
0
|
294 |
*/
|
|
295 |
void InitLists();
|
|
296 |
|
|
297 |
/**
|
9
|
298 |
* Set Pipe Handle.
|
0
|
299 |
* @param aPipeHandle: pipe handle
|
|
300 |
*/
|
|
301 |
void SetPipeHandle( const TUint8 aPipeHandle );
|
|
302 |
|
|
303 |
/**
|
9
|
304 |
* Set Transaction Id.
|
0
|
305 |
* @param aPipeHandle: pipe handle
|
|
306 |
* @param aTransId: transaction Id
|
|
307 |
*/
|
|
308 |
void SetTransactionId(
|
9
|
309 |
const TUint8 aPipeHandle,
|
0
|
310 |
const TUint8 aTransId );
|
|
311 |
|
|
312 |
/**
|
9
|
313 |
* Return Transaction Id.
|
0
|
314 |
* @param aPipeHandle: pipe handle
|
9
|
315 |
* @return TUint8, Transaction Id
|
0
|
316 |
*/
|
|
317 |
TUint8 TransactionId( const TUint8 aPipeHandle ) const;
|
|
318 |
|
|
319 |
/**
|
9
|
320 |
* Reset Pipe Handle.
|
0
|
321 |
* @param aPipeHandle: pipe handle
|
|
322 |
*/
|
|
323 |
void ResetPipeHandle( const TUint8 aPipeHandle );
|
|
324 |
|
|
325 |
/**
|
|
326 |
* If PipeHandle found returns True otherwise returns False.
|
|
327 |
* @param aPipeHandle: pipe handle
|
|
328 |
*/
|
|
329 |
TBool IsOperationCalled( const TUint8 aPipeHandle ) const;
|
|
330 |
|
9
|
331 |
#ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS
|
0
|
332 |
/**
|
|
333 |
* PnsPepConnect request.
|
|
334 |
* @param aIsiMessage, reference to the received message.
|
|
335 |
*/
|
|
336 |
void PnsPepConnectReq( const TIsiReceiveC& aIsiMessage );
|
|
337 |
|
|
338 |
/**
|
|
339 |
* PnsPepDisconnect request.
|
|
340 |
* @param aIsiMessage, reference to the received message.
|
|
341 |
*/
|
|
342 |
void PnsPepDisconnectReq( const TIsiReceiveC& aIsiMessage );
|
|
343 |
|
|
344 |
/**
|
9
|
345 |
* PnsPepReset request.
|
0
|
346 |
* @param aIsiMessage, reference to the received message.
|
|
347 |
*/
|
|
348 |
void PnsPepResetReq( const TIsiReceiveC& aIsiMessage );
|
|
349 |
|
|
350 |
/**
|
9
|
351 |
* PnsPepEnable request.
|
0
|
352 |
* @param aIsiMessage, reference to the received message.
|
|
353 |
*/
|
|
354 |
void PnsPepEnableReq( const TIsiReceiveC& aIsiMessage );
|
|
355 |
|
|
356 |
/**
|
9
|
357 |
* PnsPepConnect response.
|
0
|
358 |
* @param aTransId: transaction Id
|
|
359 |
* @param aPipeHandle: pipe handle
|
|
360 |
*/
|
|
361 |
void PnsPepConnectResp(
|
|
362 |
const TUint8 aTransId,
|
|
363 |
const TUint8 aPipeHandle );
|
|
364 |
|
|
365 |
/**
|
9
|
366 |
* PnsPepDisconnect response.
|
0
|
367 |
* @param aTransId: transaction Id
|
|
368 |
* @param aPipeHandle: pipe handle
|
|
369 |
*/
|
|
370 |
void PnsPepDisconnectResp(
|
|
371 |
const TUint8 aTransId,
|
|
372 |
const TUint8 aPipeHandle );
|
|
373 |
|
|
374 |
/**
|
|
375 |
* PnsPepReset response.
|
|
376 |
* @param aTransId: transaction Id
|
|
377 |
* @param aPipeHandle: pipe handle
|
|
378 |
*/
|
|
379 |
void PnsPepResetResp(
|
|
380 |
const TUint8 aTransId,
|
|
381 |
const TUint8 aPipeHandle );
|
|
382 |
|
|
383 |
/**
|
9
|
384 |
* PnsPepEnable response.
|
0
|
385 |
* @param aTransId: transaction Id
|
|
386 |
* @param aPipeHandle: pipe handle
|
|
387 |
*/
|
|
388 |
void PnsPepEnableResp(
|
|
389 |
const TUint8 aTransId,
|
|
390 |
const TUint8 aPipeHandle );
|
|
391 |
#endif // DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS
|
|
392 |
|
|
393 |
private: // Functions from base classes
|
|
394 |
// None
|
|
395 |
|
|
396 |
protected: // Data
|
|
397 |
// None
|
|
398 |
|
|
399 |
private: // Data
|
|
400 |
|
|
401 |
// A pointer to the context messhandler.
|
|
402 |
CMmPacketContextMessHandler* iContextMessHandler;
|
9
|
403 |
|
0
|
404 |
// Pointer to contextlist
|
|
405 |
CMmPacketContextMesshandlerList* iContextList;
|
|
406 |
|
|
407 |
// A pointer to the PhonetSender.
|
|
408 |
CMmPhoNetSender* iPhoNetSender;
|
9
|
409 |
|
0
|
410 |
// Pipe Operation Array contains TPipeOperation elements.
|
|
411 |
TPipeOperationInfo iPipeOperationArray[KMmMaxNumberOfPipeHandles];
|
|
412 |
|
|
413 |
// Device Id of second PEP.
|
|
414 |
TUint8 iSecondPepDeviceId;
|
|
415 |
|
|
416 |
// Object Id of second PEP.
|
|
417 |
TUint8 iSecondPepObjectId;
|
|
418 |
|
|
419 |
public: // Friend classes
|
|
420 |
// None
|
|
421 |
|
|
422 |
protected: // Friend classes
|
|
423 |
// None
|
|
424 |
|
|
425 |
private: // Friend classes
|
|
426 |
// None
|
|
427 |
|
|
428 |
};
|
|
429 |
|
|
430 |
#endif // CMMPIPECONTROL_H
|
9
|
431 |
|
0
|
432 |
// End of File
|