0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-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 |
|
|
19 |
|
|
20 |
|
|
21 |
// INCLUDE FILES
|
|
22 |
#include "cmmpacketmesshandlercontextlist.h"
|
|
23 |
#include "cmmpacketservicemesshandler.h"
|
|
24 |
#include <gpdsisi.h>
|
|
25 |
#include "tsylogger.h"
|
|
26 |
#include "osttracedefinitions.h"
|
|
27 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
28 |
#include "cmmpacketmesshandlercontextlisttraces.h"
|
|
29 |
#endif
|
|
30 |
|
|
31 |
// EXTERNAL DATA STRUCTURES
|
|
32 |
//None
|
|
33 |
|
|
34 |
// EXTERNAL FUNCTION PROTOTYPES
|
|
35 |
//None
|
|
36 |
|
|
37 |
// CONSTANTS
|
|
38 |
//None
|
|
39 |
|
|
40 |
// MACROS
|
|
41 |
//None
|
|
42 |
|
|
43 |
// LOCAL CONSTANTS AND MACROS
|
|
44 |
//None
|
|
45 |
|
|
46 |
// MODULE DATA STRUCTURES
|
|
47 |
//None
|
|
48 |
|
|
49 |
// LOCAL FUNCTION PROTOTYPES
|
|
50 |
//None
|
|
51 |
|
|
52 |
// FORWARD DECLARATIONS
|
|
53 |
//None
|
|
54 |
|
|
55 |
// ============================= LOCAL FUNCTIONS ===============================
|
|
56 |
|
|
57 |
//None
|
|
58 |
|
|
59 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
60 |
|
|
61 |
// -----------------------------------------------------------------------------
|
|
62 |
// CMmPacketContextMesshandlerList::CMmPacketContextMesshandlerList
|
|
63 |
// C++ default constructor can NOT contain any code, that might leave.
|
|
64 |
// -----------------------------------------------------------------------------
|
|
65 |
//
|
|
66 |
CMmPacketContextMesshandlerList::CMmPacketContextMesshandlerList()
|
|
67 |
{
|
|
68 |
|
|
69 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::CMmPacketContextMesshandlerList");
|
|
70 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CMMPACKETCONTEXTMESSHANDLERLIST, "CMmPacketContextMesshandlerList::CMmPacketContextMesshandlerList" );
|
|
71 |
|
|
72 |
//None
|
|
73 |
}
|
|
74 |
|
|
75 |
// -----------------------------------------------------------------------------
|
|
76 |
// CMmPacketContextMesshandlerList::NewL
|
|
77 |
// Two-phased constructor.
|
|
78 |
// -----------------------------------------------------------------------------
|
|
79 |
//
|
|
80 |
CMmPacketContextMesshandlerList* CMmPacketContextMesshandlerList::NewL()
|
|
81 |
{
|
|
82 |
|
|
83 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::NewL");
|
|
84 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_NEWL, "CMmPacketContextMesshandlerList::NewL" );
|
|
85 |
|
|
86 |
CMmPacketContextMesshandlerList* const contextList =
|
|
87 |
new ( ELeave ) CMmPacketContextMesshandlerList();
|
|
88 |
|
|
89 |
CleanupStack::PushL( contextList );
|
|
90 |
contextList->ConstructL();
|
|
91 |
CleanupStack::Pop( contextList );
|
|
92 |
|
|
93 |
return contextList;
|
|
94 |
}
|
|
95 |
|
|
96 |
// -----------------------------------------------------------------------------
|
|
97 |
// CMmPacketContextMesshandlerList::ConstructL
|
|
98 |
// Symbian 2nd phase constructor can leave.
|
|
99 |
// -----------------------------------------------------------------------------
|
|
100 |
//
|
|
101 |
void CMmPacketContextMesshandlerList::ConstructL()
|
|
102 |
{
|
|
103 |
|
|
104 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::ConstructL");
|
|
105 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CONSTRUCTL, "CMmPacketContextMesshandlerList::ConstructL" );
|
|
106 |
|
|
107 |
InitAttributesAndLists();
|
|
108 |
}
|
|
109 |
|
|
110 |
// -----------------------------------------------------------------------------
|
|
111 |
// CMmPacketContextMesshandlerList::InitAttributesAndLists
|
|
112 |
// Initialize used lists and attributes.
|
|
113 |
// -----------------------------------------------------------------------------
|
|
114 |
//
|
|
115 |
void CMmPacketContextMesshandlerList::InitAttributesAndLists()
|
|
116 |
{
|
|
117 |
|
|
118 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::InitAttributesAndLists");
|
|
119 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_INITATTRIBUTESANDLISTS, "CMmPacketContextMesshandlerList::InitAttributesAndLists" );
|
|
120 |
|
|
121 |
// A list for defined proxy ids ( see IscNokiaDefinitions.h )
|
|
122 |
// Max number of supported contexts is limited to be 11
|
|
123 |
// Get defined proxy ids
|
|
124 |
const TUint8 definedProxyIds[KMmMaxNumberOfContexts] = {
|
|
125 |
KMmPacketContextProxy1_DOS, KMmPacketContextProxy2_DOS,
|
|
126 |
KMmPacketContextProxy3_DOS, KMmPacketContextProxy4_DOS,
|
|
127 |
KMmPacketContextProxy5_DOS, KMmPacketContextProxy6_DOS,
|
|
128 |
KMmPacketContextProxy7_DOS, KMmPacketContextProxy8_DOS,
|
|
129 |
KMmPacketContextProxy9_DOS, KMmPacketContextProxy10_DOS,
|
|
130 |
KMmPacketContextProxy11_DOS };
|
|
131 |
|
|
132 |
for ( TInt i = 0; i < KMmMaxNumberOfContexts; i++ )
|
|
133 |
{
|
|
134 |
iProxyIdList[i].iChannelId = definedProxyIds[i];
|
|
135 |
|
|
136 |
// Mark proxy id free
|
|
137 |
iProxyIdList[i].iIsFree = ETrue;
|
|
138 |
|
|
139 |
// Initialize context info list
|
|
140 |
iContextInfoArray[i].iContextId = GPDS_CID_VOID;
|
|
141 |
|
|
142 |
iContextInfoArray[i].iChannelId = KTUint8NotDefined;
|
|
143 |
|
|
144 |
iContextInfoArray[i].iContextName.Zero();
|
|
145 |
iContextInfoArray[i].iHostContextName.Zero();
|
|
146 |
iContextInfoArray[i].iPipeStatus = PN_PIPE_DISABLE;
|
|
147 |
iContextInfoArray[i].iPipeHandle = KInvalidPipeHandle;
|
|
148 |
iContextInfoArray[i].iCreateContextIdTransId = KTUint8NotDefined;
|
|
149 |
iContextInfoArray[i].iPipeCreateTransId = KTUint8NotDefined;
|
|
150 |
iContextInfoArray[i].iContextType = GPDS_CONT_TYPE_NORMAL ;
|
|
151 |
iContextInfoArray[i].iInitialiseStarted = EFalse;
|
|
152 |
iContextInfoArray[i].iContextConfigurationType = KTIntNotDefined;
|
|
153 |
iContextInfoArray[i].iActivationTraId = KTUint8NotDefined;
|
|
154 |
iContextInfoArray[i].iPipeResetTraId = KTUint8NotDefined;
|
|
155 |
iContextInfoArray[i].iDeleteTraId = KTUint8NotDefined;
|
|
156 |
iContextInfoArray[i].iChannelOpened = EFalse;
|
|
157 |
}
|
|
158 |
|
|
159 |
iNumberOfCreatedContexts = 0;
|
|
160 |
|
|
161 |
iDialUpContextId = GPDS_CID_VOID;
|
|
162 |
iDialUpContextName.Zero();
|
|
163 |
|
|
164 |
iSecondaryDialUpContextId = GPDS_CID_VOID;
|
|
165 |
iSecondaryDialUpContextName.Zero();
|
|
166 |
}
|
|
167 |
|
|
168 |
// -----------------------------------------------------------------------------
|
|
169 |
// CMmPacketContextMesshandlerList::~CMmPacketContextMesshandlerList
|
|
170 |
// Destructor, deletes all allocated resources.
|
|
171 |
// -----------------------------------------------------------------------------
|
|
172 |
//
|
|
173 |
CMmPacketContextMesshandlerList::~CMmPacketContextMesshandlerList()
|
|
174 |
{
|
|
175 |
|
|
176 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::~CMmPacketContextMesshandlerList" );
|
|
177 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CMMPACKETCONTEXTMESSHANDLERLIST, "CMmPacketContextMesshandlerList::~CMmPacketContextMesshandlerList" );
|
|
178 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
179 |
{
|
|
180 |
iContextInfoArray[i].iIscApi.Close();
|
|
181 |
}
|
|
182 |
}
|
|
183 |
|
|
184 |
// -----------------------------------------------------------------------------
|
|
185 |
// CMmPacketContextMesshandlerList::AddObject
|
|
186 |
// Adds new context info to the info list.
|
|
187 |
// Sets used proxy id reserved in proxy id list.
|
|
188 |
// -----------------------------------------------------------------------------
|
|
189 |
//
|
|
190 |
TInt CMmPacketContextMesshandlerList::AddObject(
|
|
191 |
const TInt aObjectId,
|
|
192 |
const TUint8 aChannelId,
|
|
193 |
const TInfoName& aContextName,
|
|
194 |
const TInfoName& aHostContextName )
|
|
195 |
{
|
|
196 |
|
|
197 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::AddObject. Object Id: %d", aObjectId );
|
|
198 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_ADDOBJECT, "CMmPacketContextMesshandlerList::AddObject;aObjectId=%d", aObjectId );
|
|
199 |
|
|
200 |
TInt ret( KErrArgument );
|
|
201 |
|
|
202 |
if( 0 != aContextName.Compare( KStringExternal ) ||
|
|
203 |
0 != aContextName.Compare( KStringExternal2 ) )
|
|
204 |
{
|
|
205 |
if ( KMmMaxNumberOfContexts > iNumberOfCreatedContexts )
|
|
206 |
{
|
|
207 |
// Find given proxy id from proxy id list
|
|
208 |
for ( TInt i = 0; i < KMmMaxNumberOfContexts; i++ )
|
|
209 |
{
|
|
210 |
if ( ( aChannelId == iProxyIdList[i].iChannelId ) &&
|
|
211 |
iProxyIdList[i].iIsFree )
|
|
212 |
{
|
|
213 |
iContextInfoArray[iNumberOfCreatedContexts].iChannelId =
|
|
214 |
aChannelId;
|
|
215 |
iContextInfoArray[iNumberOfCreatedContexts].iContextName =
|
|
216 |
aContextName;
|
|
217 |
iContextInfoArray[iNumberOfCreatedContexts].iHostContextName =
|
|
218 |
aHostContextName;
|
|
219 |
iContextInfoArray[iNumberOfCreatedContexts].iObjectId =
|
|
220 |
aObjectId;
|
|
221 |
// Set proxy id reserved
|
|
222 |
iProxyIdList[i].iIsFree = EFalse;
|
|
223 |
// Increase number of created contexts
|
|
224 |
iNumberOfCreatedContexts++;
|
|
225 |
// proxy id found, break
|
|
226 |
i = KMmMaxNumberOfContexts;
|
|
227 |
|
|
228 |
ret = KErrNone;
|
|
229 |
}
|
|
230 |
// no else
|
|
231 |
}
|
|
232 |
}
|
|
233 |
// no else
|
|
234 |
}
|
|
235 |
// no else
|
|
236 |
|
|
237 |
return ret;
|
|
238 |
}
|
|
239 |
|
|
240 |
// -----------------------------------------------------------------------------
|
|
241 |
// CMmPacketContextMesshandlerList::RemoveObject
|
|
242 |
// Removes context info from the info list.
|
|
243 |
// Sets used proxy id released in proxy id list.
|
|
244 |
// -----------------------------------------------------------------------------
|
|
245 |
//
|
|
246 |
TInt CMmPacketContextMesshandlerList::RemoveObject(
|
|
247 |
TUint8 aContextId )
|
|
248 |
{
|
|
249 |
|
|
250 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveObject. Context Id: %d", aContextId );
|
|
251 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_REMOVEOBJECT, "CMmPacketContextMesshandlerList::RemoveObject;aContextId=%hhu", aContextId );
|
|
252 |
|
|
253 |
// Set ret to KErrArgument to check that context is in list
|
|
254 |
TInt ret( KErrArgument );
|
|
255 |
|
|
256 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
257 |
{
|
|
258 |
// Find aContext from context info list
|
|
259 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
260 |
{
|
|
261 |
for ( TInt j = 0; j < KMmMaxNumberOfContexts; j++ )
|
|
262 |
{
|
|
263 |
if ( ( iContextInfoArray[i].iChannelId ==
|
|
264 |
iProxyIdList[j].iChannelId ) &&
|
|
265 |
( EFalse == iProxyIdList[j].iIsFree ) )
|
|
266 |
{
|
|
267 |
|
|
268 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveObject. Context Name: %S", &iContextInfoArray[i].iContextName );
|
|
269 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_REMOVEOBJECT, "CMmPacketContextMesshandlerList::RemoveObject;Context Name=%S", iContextInfoArray[i].iContextName );
|
|
270 |
// Release Proxy id
|
|
271 |
iProxyIdList[j].iIsFree = ETrue;
|
|
272 |
// Get index to last reserved cell in the list
|
|
273 |
const TInt lastContext( iNumberOfCreatedContexts - 1 );
|
|
274 |
// If not already last object
|
|
275 |
if ( i < lastContext )
|
|
276 |
{
|
|
277 |
// Replace object to be remove by last object
|
|
278 |
iContextInfoArray[i].iContextId =
|
|
279 |
iContextInfoArray[lastContext].iContextId;
|
|
280 |
iContextInfoArray[i].iChannelId =
|
|
281 |
iContextInfoArray[lastContext].iChannelId;
|
|
282 |
iContextInfoArray[i].iContextName =
|
|
283 |
iContextInfoArray[lastContext].iContextName;
|
|
284 |
iContextInfoArray[i].iHostContextName =
|
|
285 |
iContextInfoArray[lastContext].iHostContextName;
|
|
286 |
iContextInfoArray[i].iPipeStatus =
|
|
287 |
iContextInfoArray[lastContext].iPipeStatus;
|
|
288 |
iContextInfoArray[i].iPipeHandle =
|
|
289 |
iContextInfoArray[lastContext].iPipeHandle;
|
|
290 |
iContextInfoArray[i].iCreateContextIdTransId =
|
|
291 |
iContextInfoArray[lastContext].iCreateContextIdTransId;
|
|
292 |
iContextInfoArray[i].iPipeCreateTransId =
|
|
293 |
iContextInfoArray[lastContext].iPipeCreateTransId;
|
|
294 |
iContextInfoArray[i].iContextType =
|
|
295 |
iContextInfoArray[lastContext].iContextType;
|
|
296 |
iContextInfoArray[i].iInitialiseStarted =
|
|
297 |
iContextInfoArray[lastContext].iInitialiseStarted;
|
|
298 |
iContextInfoArray[i].iContextConfigurationType =
|
|
299 |
iContextInfoArray[lastContext].iContextConfigurationType;
|
|
300 |
iContextInfoArray[i].iActivationTraId =
|
|
301 |
iContextInfoArray[lastContext].iActivationTraId;
|
|
302 |
iContextInfoArray[i].iPipeResetTraId =
|
|
303 |
iContextInfoArray[lastContext].iPipeResetTraId;
|
|
304 |
iContextInfoArray[i].iDeleteTraId =
|
|
305 |
iContextInfoArray[lastContext].iDeleteTraId;
|
|
306 |
}
|
|
307 |
// no else
|
|
308 |
|
|
309 |
// Reset object information of the last object
|
|
310 |
iContextInfoArray[lastContext].iChannelId =
|
|
311 |
KTUint8NotDefined;
|
|
312 |
iContextInfoArray[lastContext].iContextName.Zero();
|
|
313 |
iContextInfoArray[lastContext].iContextId = GPDS_CID_VOID;
|
|
314 |
iContextInfoArray[lastContext].iHostContextName.Zero();
|
|
315 |
iContextInfoArray[lastContext].iPipeStatus =
|
|
316 |
PN_PIPE_DISABLE;
|
|
317 |
iContextInfoArray[lastContext].iPipeHandle =
|
|
318 |
KInvalidPipeHandle;
|
|
319 |
iContextInfoArray[lastContext].iCreateContextIdTransId =
|
|
320 |
KTUint8NotDefined;
|
|
321 |
iContextInfoArray[lastContext].iPipeCreateTransId =
|
|
322 |
KTUint8NotDefined;
|
|
323 |
iContextInfoArray[lastContext].iContextType =
|
|
324 |
GPDS_CONT_TYPE_NORMAL;
|
|
325 |
iContextInfoArray[lastContext].iInitialiseStarted = EFalse;
|
|
326 |
iContextInfoArray[lastContext].iContextConfigurationType =
|
|
327 |
KTIntNotDefined;
|
|
328 |
iContextInfoArray[lastContext].iActivationTraId =
|
|
329 |
KTUint8NotDefined;
|
|
330 |
iContextInfoArray[lastContext].iPipeResetTraId =
|
|
331 |
KTUint8NotDefined;
|
|
332 |
iContextInfoArray[lastContext].iDeleteTraId =
|
|
333 |
KTUint8NotDefined;
|
|
334 |
|
|
335 |
// Decrease number of created contexts
|
|
336 |
iNumberOfCreatedContexts--;
|
|
337 |
|
|
338 |
// Proxy id found, break
|
|
339 |
j = KMmMaxNumberOfContexts;
|
|
340 |
}
|
|
341 |
// no else
|
|
342 |
}
|
|
343 |
// aContext found, break
|
|
344 |
i = iNumberOfCreatedContexts;
|
|
345 |
}
|
|
346 |
// no else
|
|
347 |
}
|
|
348 |
|
|
349 |
return ret;
|
|
350 |
}
|
|
351 |
|
|
352 |
// -----------------------------------------------------------------------------
|
|
353 |
// CMmPacketContextMesshandlerList::NumberOfContexts
|
|
354 |
// This function returns the number of created contexts.
|
|
355 |
// -----------------------------------------------------------------------------
|
|
356 |
//
|
|
357 |
TInt CMmPacketContextMesshandlerList::NumberOfContexts() const
|
|
358 |
{
|
|
359 |
|
|
360 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::NumberOfContexts, %d", iNumberOfCreatedContexts );
|
|
361 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_NUMBEROFCONTEXTS, "CMmPacketContextMesshandlerList::NumberOfContexts;iNumberOfCreatedContexts=%d", iNumberOfCreatedContexts );
|
|
362 |
|
|
363 |
return iNumberOfCreatedContexts;
|
|
364 |
}
|
|
365 |
|
|
366 |
// -----------------------------------------------------------------------------
|
|
367 |
// CMmPacketContextMesshandlerList::GenerateNewContextNameAndProxyId
|
|
368 |
// Generates new proxy id.
|
|
369 |
// -----------------------------------------------------------------------------
|
|
370 |
//
|
|
371 |
TInt CMmPacketContextMesshandlerList::GenerateProxyId(
|
|
372 |
TUint8& aProxyId )
|
|
373 |
{
|
|
374 |
|
|
375 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GenerateProxyId");
|
|
376 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GENERATEPROXYID, "CMmPacketContextMesshandlerList::GenerateProxyId" );
|
|
377 |
|
|
378 |
TInt ret( KErrOverflow );
|
|
379 |
|
|
380 |
// Find first free proxy id from the list
|
|
381 |
for ( TInt i = 0; i < KMmMaxNumberOfContexts; i++ )
|
|
382 |
{
|
|
383 |
if ( iProxyIdList[i].iIsFree )
|
|
384 |
{
|
|
385 |
aProxyId = iProxyIdList[i].iChannelId;
|
|
386 |
|
|
387 |
// Proxy id selected, set ret to KErrNone
|
|
388 |
ret = KErrNone;
|
|
389 |
// Free proxy id found, break
|
|
390 |
i = KMmMaxNumberOfContexts;
|
|
391 |
}
|
|
392 |
// no else
|
|
393 |
}
|
|
394 |
|
|
395 |
return ret;
|
|
396 |
}
|
|
397 |
|
|
398 |
// -----------------------------------------------------------------------------
|
|
399 |
// CMmPacketContextMesshandlerList::SetContextId
|
|
400 |
// Sets context id to the context info list.
|
|
401 |
// -----------------------------------------------------------------------------
|
|
402 |
//
|
|
403 |
TInt CMmPacketContextMesshandlerList::SetContextId(
|
|
404 |
const TUint8 aContextId,
|
|
405 |
const TUint8 aTransactionId )
|
|
406 |
{
|
|
407 |
|
|
408 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetContextId. ContextId: %d", aContextId );
|
|
409 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETCONTEXTID, "CMmPacketContextMesshandlerList::SetContextId;aContextId=%hhu", aContextId );
|
|
410 |
|
|
411 |
TInt ret( KErrNotFound );
|
|
412 |
|
|
413 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
414 |
{
|
|
415 |
// Find object from the list
|
|
416 |
if ( aTransactionId == iContextInfoArray[i].iCreateContextIdTransId )
|
|
417 |
{
|
|
418 |
|
|
419 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetContextId. ContextName: %S", &iContextInfoArray[i].iContextName );
|
|
420 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETCONTEXTID, "CMmPacketContextMesshandlerList::SetContextId;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
421 |
// Set context id to the context info list
|
|
422 |
iContextInfoArray[i].iContextId = aContextId;
|
|
423 |
// Object found, return KErrNone
|
|
424 |
ret = KErrNone;
|
|
425 |
}
|
|
426 |
// no else
|
|
427 |
}
|
|
428 |
// Object not found, return KErrNotFound
|
|
429 |
return ret;
|
|
430 |
}
|
|
431 |
|
|
432 |
// -----------------------------------------------------------------------------
|
|
433 |
// CMmPacketContextMesshandlerList::GetContextNameByContextId
|
|
434 |
// This function returns context name by context id.
|
|
435 |
// -----------------------------------------------------------------------------
|
|
436 |
//
|
|
437 |
TInt CMmPacketContextMesshandlerList::GetContextNameByContextId(
|
|
438 |
const TUint8 aContextId,
|
|
439 |
TInfoName& aContextName )
|
|
440 |
{
|
|
441 |
|
|
442 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetContextNameByContextId. ContextId: %d", aContextId );
|
|
443 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTNAMEBYCONTEXTID, "CMmPacketContextMesshandlerList::GetContextNameByContextId;aContextId=%hhu", aContextId );
|
|
444 |
|
|
445 |
TInt ret( KErrArgument );
|
|
446 |
|
|
447 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
448 |
{
|
|
449 |
// Find object from the list
|
|
450 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
451 |
{
|
|
452 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetContextNameByContextId. ContextName: %S", &iContextInfoArray[i].iContextName );
|
|
453 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTNAMEBYCONTEXTID, "CMmPacketContextMesshandlerList::GetContextNameByContextId;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
454 |
// Set context name to aName
|
|
455 |
aContextName = iContextInfoArray[i].iContextName;
|
|
456 |
// Context id found, return KErrNone
|
|
457 |
ret = KErrNone;
|
|
458 |
i = iNumberOfCreatedContexts;
|
|
459 |
}
|
|
460 |
// no else
|
|
461 |
}
|
|
462 |
// Context id not found, return KErrArgument
|
|
463 |
return ret;
|
|
464 |
}
|
|
465 |
|
|
466 |
// -----------------------------------------------------------------------------
|
|
467 |
// CMmPacketContextMesshandlerList::PipeHandleByContextName
|
|
468 |
// This function returns pipehandle by context name.
|
|
469 |
// -----------------------------------------------------------------------------
|
|
470 |
//
|
|
471 |
TUint8 CMmPacketContextMesshandlerList::PipeHandleByContextName(
|
|
472 |
const TInfoName* aContextName )
|
|
473 |
{
|
|
474 |
|
|
475 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::PipeHandleByContextName");
|
|
476 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PIPEHANDLEBYCONTEXTNAME, "CMmPacketContextMesshandlerList::PipeHandleByContextName" );
|
|
477 |
|
|
478 |
TUint8 pipeHandle( KInvalidPipeHandle );
|
|
479 |
|
|
480 |
// Find context pipehandle from context info list
|
|
481 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
482 |
{
|
|
483 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
484 |
{
|
|
485 |
|
|
486 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::PipeHandleByContextName, PipeHandle: %d", iContextInfoArray[i].iPipeHandle );
|
|
487 |
OstTrace1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PIPEHANDLEBYCONTEXTNAME, "CMmPacketContextMesshandlerList::PipeHandleByContextName;PipeHandle=%d", iContextInfoArray[i].iPipeHandle );
|
|
488 |
// Return object from the context info list
|
|
489 |
pipeHandle = iContextInfoArray[i].iPipeHandle;
|
|
490 |
}
|
|
491 |
// no else
|
|
492 |
}
|
|
493 |
// Valid values to return are, 0x00, 0x01, 0xFF = KInvalidPipeHandle
|
|
494 |
return pipeHandle;
|
|
495 |
}
|
|
496 |
|
|
497 |
// -----------------------------------------------------------------------------
|
|
498 |
// CMmPacketContextMesshandlerList::ProxyIdByContextName
|
|
499 |
// This function returns proxy id by context name.
|
|
500 |
// -----------------------------------------------------------------------------
|
|
501 |
//
|
|
502 |
TUint8 CMmPacketContextMesshandlerList::ProxyIdByContextName(
|
|
503 |
const TInfoName* aContextName )
|
|
504 |
{
|
|
505 |
|
|
506 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::ProxyIdByContextName");
|
|
507 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYCONTEXTNAME, "CMmPacketContextMesshandlerList::ProxyIdByContextName" );
|
|
508 |
|
|
509 |
TUint8 proxyId( KTUint8NotDefined );
|
|
510 |
|
|
511 |
// Find context proxyId from context info list
|
|
512 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
513 |
{
|
|
514 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
515 |
{
|
|
516 |
|
|
517 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ProxyIdByContextName, ProxyId: %d", iContextInfoArray[i].iChannelId );
|
|
518 |
OstTrace1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYCONTEXTNAME, "CMmPacketContextMesshandlerList::ProxyIdByContextName;ProxyId=%d", iContextInfoArray[i].iChannelId );
|
|
519 |
|
|
520 |
proxyId = iContextInfoArray[i].iChannelId;
|
|
521 |
}
|
|
522 |
// no else
|
|
523 |
}
|
|
524 |
// Valid values to return are, 0x00, 0x01, 0xFF = Not defined
|
|
525 |
return proxyId;
|
|
526 |
}
|
|
527 |
|
|
528 |
TUint8 CMmPacketContextMesshandlerList::ProxyIdByPipeHandle(
|
|
529 |
TUint8 aPipeHandle
|
|
530 |
)
|
|
531 |
{
|
|
532 |
TFLOGSTRING2("TSY CMmPacketContextMesshandlerList::ProxyIdByPipeHandle 0x%x>", aPipeHandle );
|
|
533 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::ProxyIdByPipeHandle;aPipeHandle=%hhx", aPipeHandle );
|
|
534 |
|
|
535 |
TUint8 proxyId( KTUint8NotDefined );
|
|
536 |
// Find context proxyId from context info list
|
|
537 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
538 |
{
|
|
539 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
540 |
{
|
|
541 |
TFLOGSTRING3("TSY CMmPacketContextMesshandlerList::ProxyIdByPipeHandle found 0x%x for pipehandle 0x%x", proxyId, aPipeHandle );
|
|
542 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::ProxyIdByPipeHandle;proxyId=%hhx;aPipeHandle=%hhx", proxyId, aPipeHandle );
|
|
543 |
proxyId = iContextInfoArray[i].iChannelId;
|
|
544 |
i = iNumberOfCreatedContexts;
|
|
545 |
}
|
|
546 |
// no else
|
|
547 |
}
|
|
548 |
|
|
549 |
// Valid values to return are, 0x00, 0x01, 0xFF = Not defined
|
|
550 |
return proxyId;
|
|
551 |
}
|
|
552 |
|
|
553 |
// -----------------------------------------------------------------------------
|
|
554 |
// CMmPacketContextMesshandlerList::OpenChannel
|
|
555 |
// Opens channel with the specified id.
|
|
556 |
// -----------------------------------------------------------------------------
|
|
557 |
//
|
|
558 |
TInt CMmPacketContextMesshandlerList::OpenChannel( TUint8 aChannelId )
|
|
559 |
{
|
|
560 |
TFLOGSTRING2("TSY: MmPacketContextMesshandlerList::OpenChannel;aChannelId=%x", aChannelId);
|
|
561 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_OPENCHANNEL, "CMmPacketContextMesshandlerList::OpenChannel;aChannelId=%hhu", aChannelId );
|
|
562 |
TInt ret( KErrNotReady );
|
|
563 |
|
|
564 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++)
|
|
565 |
{
|
|
566 |
if ( aChannelId == iContextInfoArray[i].iChannelId )
|
|
567 |
{
|
|
568 |
if ( !iContextInfoArray[i].iChannelOpened )
|
|
569 |
{
|
|
570 |
TRequestStatus status( KRequestPending );
|
|
571 |
iContextInfoArray[i].iIscApi.Open( aChannelId, status );
|
|
572 |
User::WaitForRequest( status );
|
|
573 |
ret = status.Int();
|
|
574 |
if ( KErrNone == ret )
|
|
575 |
{
|
|
576 |
iContextInfoArray[i].iChannelOpened = ETrue;
|
|
577 |
}
|
|
578 |
}
|
|
579 |
else
|
|
580 |
{
|
|
581 |
ret = KErrAlreadyExists;
|
|
582 |
}
|
|
583 |
i = iNumberOfCreatedContexts;
|
|
584 |
}
|
|
585 |
}
|
|
586 |
|
|
587 |
return ret;
|
|
588 |
}
|
|
589 |
|
|
590 |
// -----------------------------------------------------------------------------
|
|
591 |
// CMmPacketContextMesshandlerList::CloseChannel
|
|
592 |
// Closes channel with the specified id.
|
|
593 |
// -----------------------------------------------------------------------------
|
|
594 |
//
|
|
595 |
TInt CMmPacketContextMesshandlerList::CloseChannel( TUint8 aChannelId )
|
|
596 |
{
|
|
597 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CloseChannel;aChannelId=%x", aChannelId);
|
|
598 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CLOSECHANNEL, "CMmPacketContextMesshandlerList::CloseChannel;aChannelId=%hhu", aChannelId );
|
|
599 |
TInt ret( KErrNotFound );
|
|
600 |
|
|
601 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
602 |
{
|
|
603 |
if ( aChannelId == iContextInfoArray[i].iChannelId )
|
|
604 |
{
|
|
605 |
// closing of closed channel is OK
|
|
606 |
iContextInfoArray[i].iIscApi.Close();
|
|
607 |
ret = KErrNone;
|
|
608 |
iContextInfoArray[i].iChannelOpened = EFalse;
|
|
609 |
i = iNumberOfCreatedContexts;
|
|
610 |
}
|
|
611 |
}
|
|
612 |
|
|
613 |
return ret;
|
|
614 |
}
|
|
615 |
|
|
616 |
// -----------------------------------------------------------------------------
|
|
617 |
// CMmPacketContextMesshandlerList::ContextNameByProxyId
|
|
618 |
// This function returns context name by proxy id.
|
|
619 |
// -----------------------------------------------------------------------------
|
|
620 |
//
|
|
621 |
TInt CMmPacketContextMesshandlerList::ContextNameByProxyId(
|
|
622 |
const TUint8 aProxyId,
|
|
623 |
TInfoName& aContextName )
|
|
624 |
{
|
|
625 |
|
|
626 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextNameByProxyId. ProxyId: %d", aProxyId );
|
|
627 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTNAMEBYPROXYID, "CMmPacketContextMesshandlerList::ContextNameByProxyId;aProxyId=%hhu", aProxyId );
|
|
628 |
|
|
629 |
TInt ret( KErrArgument );
|
|
630 |
|
|
631 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
632 |
{
|
|
633 |
if ( aProxyId == iContextInfoArray[i].iChannelId )
|
|
634 |
{
|
|
635 |
|
|
636 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextNameByProxyId. ContextName: %S", &iContextInfoArray[i].iContextName );
|
|
637 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTNAMEBYPROXYID, "CMmPacketContextMesshandlerList::ContextNameByProxyId;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
638 |
// Set context name to aName
|
|
639 |
aContextName = iContextInfoArray[i].iContextName;
|
|
640 |
// Context id found, return KErrNone
|
|
641 |
ret = KErrNone;
|
|
642 |
i = iNumberOfCreatedContexts;
|
|
643 |
}
|
|
644 |
// no else
|
|
645 |
}
|
|
646 |
return ret;
|
|
647 |
}
|
|
648 |
|
|
649 |
// -----------------------------------------------------------------------------
|
|
650 |
// CMmPacketContextMesshandlerList::GetContextTypeByName
|
|
651 |
// This function returns context type by context name.
|
|
652 |
// -----------------------------------------------------------------------------
|
|
653 |
//
|
|
654 |
TUint8 CMmPacketContextMesshandlerList::GetContextTypeByName(
|
|
655 |
const TInfoName* const aContextName )
|
|
656 |
{
|
|
657 |
|
|
658 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetContextTypeByName");
|
|
659 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTTYPEBYNAME, "CMmPacketContextMesshandlerList::GetContextTypeByName" );
|
|
660 |
|
|
661 |
TUint8 ret( GPDS_CONT_TYPE_NORMAL );
|
|
662 |
|
|
663 |
// Find context proxyId from context info list
|
|
664 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
665 |
{
|
|
666 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
667 |
{
|
|
668 |
// Return object from the context info list
|
|
669 |
// return iContextInfoArray[i].iContextType;
|
|
670 |
if( 0 != iContextInfoArray[i].iHostContextName.Length() )
|
|
671 |
{
|
|
672 |
ret = GPDS_CONT_TYPE_SEC;
|
|
673 |
}
|
|
674 |
// no else
|
|
675 |
|
|
676 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetContextTypeByName. ContextName: %S, ContextType: %d", &iContextInfoArray[i].iContextName, ret );
|
|
677 |
|
|
678 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTTYPEBYNAME, "CMmPacketContextMesshandlerList::GetContextTypeByName;ContextName=%S;ContextType=%hhu", iContextInfoArray[i].iContextName, ret );
|
|
679 |
}
|
|
680 |
// no else
|
|
681 |
}
|
|
682 |
|
|
683 |
return ret;
|
|
684 |
}
|
|
685 |
|
|
686 |
// -----------------------------------------------------------------------------
|
|
687 |
// CMmPacketContextMesshandlerList::SetCreateContextIdTransId
|
|
688 |
// Sets iCreateContextIdTransId of the specified context by context name.
|
|
689 |
// -----------------------------------------------------------------------------
|
|
690 |
//
|
|
691 |
TInt CMmPacketContextMesshandlerList::SetCreateContextIdTransId(
|
|
692 |
const TUint8 aTransactionId,
|
|
693 |
const TInfoName* aContextName )
|
|
694 |
{
|
|
695 |
|
|
696 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetCreateContextIdTransId");
|
|
697 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETCREATECONTEXTIDTRANSID, "CMmPacketContextMesshandlerList::SetCreateContextIdTransId" );
|
|
698 |
|
|
699 |
TInt ret( KErrNotFound );
|
|
700 |
|
|
701 |
// Find context proxyId from context info list
|
|
702 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
703 |
{
|
|
704 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
705 |
{
|
|
706 |
|
|
707 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetCreateContextIdTransId. ContextName: %S, IdTransId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
708 |
|
|
709 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETCREATECONTEXTIDTRANSID, "CMmPacketContextMesshandlerList::SetCreateContextIdTransId;ContextName=%S;aTransactionId=%d", iContextInfoArray[i].iContextName, aTransactionId );
|
|
710 |
// Return object from the context info list
|
|
711 |
iContextInfoArray[i].iCreateContextIdTransId = aTransactionId;
|
|
712 |
ret = KErrNone;
|
|
713 |
i = iNumberOfCreatedContexts;
|
|
714 |
}
|
|
715 |
// no else
|
|
716 |
}
|
|
717 |
|
|
718 |
return ret;
|
|
719 |
}
|
|
720 |
|
|
721 |
// -----------------------------------------------------------------------------
|
|
722 |
// CMmPacketContextMesshandlerList::SetPipeCreateTransId
|
|
723 |
// Sets iPipeCreateTransId of the specified context by context name.
|
|
724 |
// -----------------------------------------------------------------------------
|
|
725 |
//
|
|
726 |
TInt CMmPacketContextMesshandlerList::SetPipeCreateTransId(
|
|
727 |
const TUint8 aTransactionId,
|
|
728 |
const TInfoName* aContextName )
|
|
729 |
{
|
|
730 |
|
|
731 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetPipeCreateTransId");
|
|
732 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPECREATETRANSID, "CMmPacketContextMesshandlerList::SetPipeCreateTransId" );
|
|
733 |
|
|
734 |
TInt ret( KErrNotFound );
|
|
735 |
|
|
736 |
// Find context proxyId from context info list
|
|
737 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
738 |
{
|
|
739 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
740 |
{
|
|
741 |
|
|
742 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetPipeCreateTransId. ContextName: %S, CreateTransId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
743 |
|
|
744 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPECREATETRANSID, "CMmPacketContextMesshandlerList::SetPipeCreateTransId;ContextName=%S;aTransactionId=%hhu", iContextInfoArray[i].iContextName, aTransactionId );
|
|
745 |
// Return object from the context info list
|
|
746 |
iContextInfoArray[i].iPipeCreateTransId = aTransactionId;
|
|
747 |
ret = KErrNone;
|
|
748 |
i = iNumberOfCreatedContexts;
|
|
749 |
}
|
|
750 |
// no else
|
|
751 |
}
|
|
752 |
|
|
753 |
return ret;
|
|
754 |
}
|
|
755 |
|
|
756 |
// -----------------------------------------------------------------------------
|
|
757 |
// CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId
|
|
758 |
// Sets iGpdsLlConfigureTraId of the specified context by context Id.
|
|
759 |
// -----------------------------------------------------------------------------
|
|
760 |
//
|
|
761 |
TInt CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId(
|
|
762 |
const TUint8 aTransactionId,
|
|
763 |
const TUint8 aContextId )
|
|
764 |
{
|
|
765 |
|
|
766 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId. ContextId: %d", aContextId );
|
|
767 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETGPDSLLCONFIGURETRAID, "CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId;aContextId=%hhu", aContextId );
|
|
768 |
|
|
769 |
TInt ret( KErrNotFound );
|
|
770 |
|
|
771 |
// Find context proxyId from context info list
|
|
772 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
773 |
{
|
|
774 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
775 |
{
|
|
776 |
|
|
777 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId. ContextName: %S, L1ConfigureTransId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
778 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETGPDSLLCONFIGURETRAID, "CMmPacketContextMesshandlerList::SetGpdsLlConfigureTraId;ContextName=%S;aTransactionId=%hhu", iContextInfoArray[i].iContextName, aTransactionId );
|
|
779 |
|
|
780 |
// Return object from the context info list
|
|
781 |
iContextInfoArray[i].iGpdsLlConfigureTraId = aTransactionId;
|
|
782 |
ret = KErrNone;
|
|
783 |
i = iNumberOfCreatedContexts;
|
|
784 |
}
|
|
785 |
// no else
|
|
786 |
}
|
|
787 |
|
|
788 |
return ret;
|
|
789 |
}
|
|
790 |
|
|
791 |
// -----------------------------------------------------------------------------
|
|
792 |
// CMmPacketContextMesshandlerList::SetRemovePipeTraId
|
|
793 |
// Sets the iPipeRemoveTraId specified by pipe handle.
|
|
794 |
// -----------------------------------------------------------------------------
|
|
795 |
//
|
|
796 |
TInt CMmPacketContextMesshandlerList::SetRemovePipeTraId(
|
|
797 |
const TUint8 aTransactionId,
|
|
798 |
const TInt aPipeHandle )
|
|
799 |
{
|
|
800 |
|
|
801 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetRemovePipeTraId. PipeHandle: %d", aPipeHandle );
|
|
802 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETREMOVEPIPETRAID, "CMmPacketContextMesshandlerList::SetRemovePipeTraId;aPipeHandle=%d", aPipeHandle );
|
|
803 |
|
|
804 |
TInt ret( KErrNotFound );
|
|
805 |
|
|
806 |
// Find context proxyId from context info list
|
|
807 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
808 |
{
|
|
809 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
810 |
{
|
|
811 |
|
|
812 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetRemovePipeTraId. ContextName: %S, RemovePipeTraId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
813 |
OstTraceExt2( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_SETREMOVEPIPETRAID, "CMmPacketContextMesshandlerList::SetRemovePipeTraId;ContextName=%S;aTransactionId=%hhu", iContextInfoArray[i].iContextName, aTransactionId );
|
|
814 |
|
|
815 |
// Return object from the context info list
|
|
816 |
iContextInfoArray[i].iRemovePipeTraId = aTransactionId;
|
|
817 |
ret = KErrNone;
|
|
818 |
i = iNumberOfCreatedContexts;
|
|
819 |
}
|
|
820 |
// no else
|
|
821 |
}
|
|
822 |
|
|
823 |
return ret;
|
|
824 |
}
|
|
825 |
|
|
826 |
// -----------------------------------------------------------------------------
|
|
827 |
// CMmPacketContextMesshandlerList::SetActivationTraId
|
|
828 |
// Sets the iActivationTraId specified by context id.
|
|
829 |
// -----------------------------------------------------------------------------
|
|
830 |
//
|
|
831 |
TInt CMmPacketContextMesshandlerList::SetActivationTraId(
|
|
832 |
const TUint8 aContextId,
|
|
833 |
const TUint8 aTransactionId )
|
|
834 |
{
|
|
835 |
|
|
836 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetActivationTraId. ContextId: %d", aContextId );
|
|
837 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETACTIVATIONTRAID, "CMmPacketContextMesshandlerList::SetActivationTraId;aContextId=%hhu", aContextId );
|
|
838 |
|
|
839 |
TInt ret( KErrNotFound );
|
|
840 |
|
|
841 |
// Find context proxyId from context info list
|
|
842 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
843 |
{
|
|
844 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
845 |
{
|
|
846 |
|
|
847 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetActivationTraId. ContextName: %S, ActivationTraId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
848 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETACTIVATIONTRAID, "CMmPacketContextMesshandlerList::SetActivationTraId;ContextName=%S;aTransactionId=%hhu", iContextInfoArray[i].iContextName, aTransactionId );
|
|
849 |
|
|
850 |
// Return object from the context info list
|
|
851 |
iContextInfoArray[i].iActivationTraId = aTransactionId;
|
|
852 |
ret = KErrNone;
|
|
853 |
i = iNumberOfCreatedContexts;
|
|
854 |
}
|
|
855 |
// no else
|
|
856 |
}
|
|
857 |
|
|
858 |
return ret;
|
|
859 |
}
|
|
860 |
|
|
861 |
// -----------------------------------------------------------------------------
|
|
862 |
// CMmPacketContextMesshandlerList::GetAndResetActivationTraId
|
|
863 |
// Resets the iActivationTraId and returns saved iActivationTraId
|
|
864 |
// specified by context Id.
|
|
865 |
// -----------------------------------------------------------------------------
|
|
866 |
//
|
|
867 |
TUint8 CMmPacketContextMesshandlerList::GetAndResetActivationTraId(
|
|
868 |
const TUint8 aContextId )
|
|
869 |
{
|
|
870 |
|
|
871 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetAndResetActivationTraId. ContextId: %d", aContextId );
|
|
872 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETANDRESETACTIVATIONTRAID, "CMmPacketContextMesshandlerList::GetAndResetActivationTraId;aContextId=%hhu", aContextId );
|
|
873 |
|
|
874 |
TUint8 transId( KTUint8NotDefined );
|
|
875 |
|
|
876 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
877 |
{
|
|
878 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
879 |
{
|
|
880 |
// Return object from the context info list
|
|
881 |
transId = iContextInfoArray[i].iActivationTraId;
|
|
882 |
iContextInfoArray[i].iActivationTraId = KTUint8NotDefined;
|
|
883 |
|
|
884 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetAndResetActivationTraId. ContextName: %S, ActivationTraId: %d", &iContextInfoArray[i].iContextName, transId );
|
|
885 |
|
|
886 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETANDRESETACTIVATIONTRAID, "CMmPacketContextMesshandlerList::GetAndResetActivationTraId;ContextName=%S;transId=%hhu", iContextInfoArray[i].iContextName, transId );
|
|
887 |
}
|
|
888 |
// no else
|
|
889 |
}
|
|
890 |
|
|
891 |
return transId;
|
|
892 |
}
|
|
893 |
|
|
894 |
// -----------------------------------------------------------------------------
|
|
895 |
// CMmPacketContextMesshandlerList::SetDeletionTraId
|
|
896 |
// Sets the iDeleteTraId specified by context id.
|
|
897 |
// -----------------------------------------------------------------------------
|
|
898 |
//
|
|
899 |
TInt CMmPacketContextMesshandlerList::SetDeletionTraId(
|
|
900 |
const TUint8 aContextId,
|
|
901 |
const TUint8 aTransactionId )
|
|
902 |
{
|
|
903 |
|
|
904 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetDeletionTraId. ContextId: %d", aContextId );
|
|
905 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETDELETIONTRAID, "CMmPacketContextMesshandlerList::SetDeletionTraId;aContextId=%hhu", aContextId );
|
|
906 |
|
|
907 |
TInt ret( KErrNotFound );
|
|
908 |
|
|
909 |
// Find context proxyId from context info list
|
|
910 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
911 |
{
|
|
912 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
913 |
{
|
|
914 |
|
|
915 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetDeletionTraId. ContextName: %S, DeleteTraId: %d", &iContextInfoArray[i].iContextName, aTransactionId );
|
|
916 |
|
|
917 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETDELETIONTRAID, "CMmPacketContextMesshandlerList::SetDeletionTraId;ContextName=%S;aTransactionId=%hhu", iContextInfoArray[i].iContextName, aTransactionId );
|
|
918 |
// Return object from the context info list
|
|
919 |
iContextInfoArray[i].iDeleteTraId= aTransactionId;
|
|
920 |
ret = KErrNone;
|
|
921 |
i = iNumberOfCreatedContexts;
|
|
922 |
}
|
|
923 |
// no else
|
|
924 |
}
|
|
925 |
|
|
926 |
return ret;
|
|
927 |
}
|
|
928 |
|
|
929 |
// -----------------------------------------------------------------------------
|
|
930 |
// CMmPacketContextMesshandlerList::GetAndResetDeletionTraId
|
|
931 |
// Resets the iDeleteTraId and returns saved iDeleteTraId
|
|
932 |
// specified by context Id.
|
|
933 |
// -----------------------------------------------------------------------------
|
|
934 |
//
|
|
935 |
TUint8 CMmPacketContextMesshandlerList::GetAndResetDeletionTraId(
|
|
936 |
const TUint8 aContextId )
|
|
937 |
{
|
|
938 |
|
|
939 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetAndResetDeletionTraId. ContextId: %d", aContextId );
|
|
940 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETANDRESETDELETIONTRAID, "CMmPacketContextMesshandlerList::GetAndResetDeletionTraId;aContextId=%hhu", aContextId );
|
|
941 |
|
|
942 |
TUint8 transId( KTUint8NotDefined );
|
|
943 |
|
|
944 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
945 |
{
|
|
946 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
947 |
{
|
|
948 |
// Return object from the context info list
|
|
949 |
transId = iContextInfoArray[i].iDeleteTraId;
|
|
950 |
iContextInfoArray[i].iDeleteTraId = KTUint8NotDefined;
|
|
951 |
|
|
952 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetAndResetActivationTraId. ContextName: %S, DeleteTraId: %d", &iContextInfoArray[i].iContextName, transId );
|
|
953 |
|
|
954 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETANDRESETDELETIONTRAID, "CMmPacketContextMesshandlerList::GetAndResetDeletionTraId;ContextName=%s;transId=%hhu", iContextInfoArray[i].iContextName, transId );
|
|
955 |
}
|
|
956 |
// no else
|
|
957 |
}
|
|
958 |
|
|
959 |
return transId;
|
|
960 |
}
|
|
961 |
|
|
962 |
// -----------------------------------------------------------------------------
|
|
963 |
// CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle
|
|
964 |
// Gets create context id transaction id by pipehandle.
|
|
965 |
// -----------------------------------------------------------------------------
|
|
966 |
//
|
|
967 |
TUint8 CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle(
|
|
968 |
const TInt aPipeHandle )
|
|
969 |
{
|
|
970 |
|
|
971 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle. PipeHandle: %d", aPipeHandle );
|
|
972 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRANSIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle;aPipeHandle=%d", aPipeHandle );
|
|
973 |
|
|
974 |
TUint8 transId( KTUint8NotDefined );
|
|
975 |
|
|
976 |
// Find context pipehandle from context info list
|
|
977 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
978 |
{
|
|
979 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
980 |
{
|
|
981 |
// Return object from the context info list
|
|
982 |
transId = iContextInfoArray[i].iCreateContextIdTransId;
|
|
983 |
|
|
984 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle. ContextName: %S, CreateContextIdTransId: %d", &iContextInfoArray[i].iContextName, transId );
|
|
985 |
|
|
986 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRANSIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::CreateContextIdTransIdByPipeHandle;ContextName=%S;transId=%hhu", iContextInfoArray[i].iContextName, transId );
|
|
987 |
}
|
|
988 |
// no else
|
|
989 |
}
|
|
990 |
|
|
991 |
// Valid values to return are, 0x00, 0x01, 0xFF = Not defined
|
|
992 |
return transId;
|
|
993 |
}
|
|
994 |
|
|
995 |
// -----------------------------------------------------------------------------
|
|
996 |
// CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId
|
|
997 |
// Gets create context id transaction id by context id.
|
|
998 |
// -----------------------------------------------------------------------------
|
|
999 |
//
|
|
1000 |
TUint8 CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId(
|
|
1001 |
const TUint8 aContextId )
|
|
1002 |
{
|
|
1003 |
|
|
1004 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId. ContextId: %d", aContextId );
|
|
1005 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRAIDBYCONTEXTID, "CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId;aContextId=%hhu", aContextId );
|
|
1006 |
|
|
1007 |
TUint8 transId( KTUint8NotDefined );
|
|
1008 |
|
|
1009 |
// Find context pipehandle from context info list
|
|
1010 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1011 |
{
|
|
1012 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1013 |
{
|
|
1014 |
// Return object from the context info list
|
|
1015 |
transId = iContextInfoArray[i].iCreateContextIdTransId;
|
|
1016 |
|
|
1017 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId. ContextName: %S, CreateContextIdTransId: %d", &iContextInfoArray[i].iContextName, transId );
|
|
1018 |
|
|
1019 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRAIDBYCONTEXTID, "CMmPacketContextMesshandlerList::CreateContextIdTraIdByContextId;ContextName=%S;transId=%hhu", iContextInfoArray[i].iContextName, transId );
|
|
1020 |
}
|
|
1021 |
// no else
|
|
1022 |
}
|
|
1023 |
|
|
1024 |
// Valid values to return are, 0x00, 0x01, 0xFF = Not defined
|
|
1025 |
return transId;
|
|
1026 |
}
|
|
1027 |
|
|
1028 |
// -----------------------------------------------------------------------------
|
|
1029 |
// CMmPacketContextMesshandlerList::PipeHandleByContextId
|
|
1030 |
// Gets pipehandle specified by context Id.
|
|
1031 |
// -----------------------------------------------------------------------------
|
|
1032 |
//
|
|
1033 |
TUint8 CMmPacketContextMesshandlerList::PipeHandleByContextId(
|
|
1034 |
const TUint8 aContextId )
|
|
1035 |
{
|
|
1036 |
|
|
1037 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::PipeHandleByContextId. ContextId: %d", aContextId );
|
|
1038 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PIPEHANDLEBYCONTEXTID, "CMmPacketContextMesshandlerList::PipeHandleByContextId;aContextId=%hhu", aContextId );
|
|
1039 |
|
|
1040 |
TUint8 pipeHandle( KInvalidPipeHandle );
|
|
1041 |
|
|
1042 |
// Find context pipehandle from context info list
|
|
1043 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1044 |
{
|
|
1045 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1046 |
{
|
|
1047 |
// Return object from the context info list
|
|
1048 |
pipeHandle = iContextInfoArray[i].iPipeHandle;
|
|
1049 |
|
|
1050 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::PipeHandleByContextId. ContextName: %S, PipeHandle: %d", &iContextInfoArray[i].iContextName, pipeHandle );
|
|
1051 |
|
|
1052 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PIPEHANDLEBYCONTEXTID, "CMmPacketContextMesshandlerList::PipeHandleByContextId;ContextName=%S;pipeHandle=%hhu", iContextInfoArray[i].iContextName, pipeHandle );
|
|
1053 |
}
|
|
1054 |
// no else
|
|
1055 |
}
|
|
1056 |
|
|
1057 |
// Valid values to return are, 0x00, 0x01, 0xFF = KInvalidPipeHandle
|
|
1058 |
return pipeHandle;
|
|
1059 |
}
|
|
1060 |
|
|
1061 |
// -----------------------------------------------------------------------------
|
|
1062 |
// CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId
|
|
1063 |
// Checks if transaction id created early match with given.
|
|
1064 |
// -----------------------------------------------------------------------------
|
|
1065 |
//
|
|
1066 |
TInt CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId(
|
|
1067 |
const TUint8 aTransId )
|
|
1068 |
{
|
|
1069 |
|
|
1070 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId. TransId: %d", aTransId );
|
|
1071 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PIPECREATETRANSIDOKBYTRANSID, "CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId;aTransId=%hhu", aTransId );
|
|
1072 |
|
|
1073 |
TInt ret( KErrNotFound );
|
|
1074 |
|
|
1075 |
// Find context pipehandle from context info list
|
|
1076 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1077 |
{
|
|
1078 |
if ( aTransId == iContextInfoArray[i].iPipeCreateTransId )
|
|
1079 |
{
|
|
1080 |
|
|
1081 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId. TransId Matched");
|
|
1082 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PIPECREATETRANSIDOKBYTRANSID, "CMmPacketContextMesshandlerList::PipeCreateTransIdOkByTransId, TransId Matched" );
|
|
1083 |
|
|
1084 |
ret = KErrNone;
|
|
1085 |
}
|
|
1086 |
// no else
|
|
1087 |
}
|
|
1088 |
|
|
1089 |
return ret;
|
|
1090 |
}
|
|
1091 |
|
|
1092 |
// -----------------------------------------------------------------------------
|
|
1093 |
// CMmPacketContextMesshandlerList::CreateContextIdTraIdOK
|
|
1094 |
// Checks if transaction id created early match with given.
|
|
1095 |
// -----------------------------------------------------------------------------
|
|
1096 |
//
|
|
1097 |
TInt CMmPacketContextMesshandlerList::CreateContextIdTraIdOK(
|
|
1098 |
const TUint8 aTransId )
|
|
1099 |
{
|
|
1100 |
|
|
1101 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CreateContextIdTraIdOK. TransId: %d", aTransId );
|
|
1102 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRAIDOK, "CMmPacketContextMesshandlerList::CreateContextIdTraIdOK;aTransId=%hhu", aTransId );
|
|
1103 |
|
|
1104 |
TInt ret( KErrNotFound );
|
|
1105 |
|
|
1106 |
// Find context pipehandle from context info list
|
|
1107 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1108 |
{
|
|
1109 |
if ( aTransId == iContextInfoArray[i].iCreateContextIdTransId )
|
|
1110 |
{
|
|
1111 |
|
|
1112 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::CreateContextIdTraIdOK. TransId Matched");
|
|
1113 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CREATECONTEXTIDTRAIDOK, "CMmPacketContextMesshandlerList::CreateContextIdTraIdOK, TransId Matched" );
|
|
1114 |
|
|
1115 |
ret = KErrNone;
|
|
1116 |
}
|
|
1117 |
// no else
|
|
1118 |
}
|
|
1119 |
|
|
1120 |
return ret;
|
|
1121 |
}
|
|
1122 |
|
|
1123 |
// -----------------------------------------------------------------------------
|
|
1124 |
// CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK
|
|
1125 |
// Checks if transaction id created early match with given.
|
|
1126 |
// -----------------------------------------------------------------------------
|
|
1127 |
//
|
|
1128 |
TInt CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK(
|
|
1129 |
const TUint8 aTransId )
|
|
1130 |
{
|
|
1131 |
|
|
1132 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK. TransId: %d", aTransId );
|
|
1133 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GPDSLLCONFIGURETRAIDOK, "CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK;aTransId=%hhu", aTransId );
|
|
1134 |
|
|
1135 |
TInt ret( KErrNotFound );
|
|
1136 |
|
|
1137 |
// Find context pipehandle from context info list
|
|
1138 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1139 |
{
|
|
1140 |
if ( aTransId == iContextInfoArray[i].iGpdsLlConfigureTraId )
|
|
1141 |
{
|
|
1142 |
|
|
1143 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK. TransId Matched");
|
|
1144 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GPDSLLCONFIGURETRAIDOK, "CMmPacketContextMesshandlerList::GpdsLlConfigureTraIdOK, TransId Matched" );
|
|
1145 |
|
|
1146 |
ret = KErrNone;
|
|
1147 |
i= iNumberOfCreatedContexts;
|
|
1148 |
}
|
|
1149 |
// no else
|
|
1150 |
}
|
|
1151 |
|
|
1152 |
return ret;
|
|
1153 |
}
|
|
1154 |
|
|
1155 |
// -----------------------------------------------------------------------------
|
|
1156 |
// CMmPacketContextMesshandlerList::SetPipeHandle
|
|
1157 |
// Sets pipehandle specified by pipe create transaction Id.
|
|
1158 |
// -----------------------------------------------------------------------------
|
|
1159 |
//
|
|
1160 |
TInt CMmPacketContextMesshandlerList::SetPipeHandle(
|
|
1161 |
const TUint8 aTransactionId,
|
|
1162 |
const TUint8 aPipeHandle )
|
|
1163 |
{
|
|
1164 |
|
|
1165 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetPipeHandle. TransId: %d", aTransactionId );
|
|
1166 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPEHANDLE, "CMmPacketContextMesshandlerList::SetPipeHandle;aTransactionId=%hhu", aTransactionId );
|
|
1167 |
|
|
1168 |
TInt ret( KErrNotFound );
|
|
1169 |
|
|
1170 |
// Find context pipehandle from context info list
|
|
1171 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1172 |
{
|
|
1173 |
if ( aTransactionId == iContextInfoArray[i].iPipeCreateTransId )
|
|
1174 |
{
|
|
1175 |
|
|
1176 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetPipeHandle. ContextName: %S, PipeHandle: %d", &iContextInfoArray[i].iContextName, aPipeHandle );
|
|
1177 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPEHANDLE, "CMmPacketContextMesshandlerList::SetPipeHandle;ContextName=%S;aPipeHandle=%hhu", iContextInfoArray[i].iContextName, aPipeHandle );
|
|
1178 |
|
|
1179 |
iContextInfoArray[i].iPipeHandle = aPipeHandle;
|
|
1180 |
ret = KErrNone;
|
|
1181 |
}
|
|
1182 |
// no else
|
|
1183 |
}
|
|
1184 |
|
|
1185 |
return ret;
|
|
1186 |
}
|
|
1187 |
|
|
1188 |
// -----------------------------------------------------------------------------
|
|
1189 |
// CMmPacketContextMesshandlerList::SetPipeStatus
|
|
1190 |
// Sets pipe status specified by pipe handle.
|
|
1191 |
// -----------------------------------------------------------------------------
|
|
1192 |
//
|
|
1193 |
TBool CMmPacketContextMesshandlerList::SetPipeStatus(
|
|
1194 |
const TUint8 aPipeHandle,
|
|
1195 |
const TInt aPipeStatus )
|
|
1196 |
{
|
|
1197 |
|
|
1198 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetPipeStatus. PipeHandle: %d", aPipeHandle );
|
|
1199 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPESTATUS, "CMmPacketContextMesshandlerList::SetPipeStatus;aPipeHandle=%hhu", aPipeHandle );
|
|
1200 |
|
|
1201 |
TBool ret( EFalse );
|
|
1202 |
|
|
1203 |
// Find context pipehandle from context info list
|
|
1204 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1205 |
{
|
|
1206 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
1207 |
{
|
|
1208 |
|
|
1209 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetPipeStatus. ContextName: %S, PipeStatus: %d", &iContextInfoArray[i].iContextName, aPipeStatus );
|
|
1210 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPESTATUS, "CMmPacketContextMesshandlerList::SetPipeStatus;ContextName=%S;aPipeStatus=%d", iContextInfoArray[i].iContextName, aPipeStatus );
|
|
1211 |
|
|
1212 |
iContextInfoArray[i].iPipeStatus = aPipeStatus ;
|
|
1213 |
ret = ETrue;
|
|
1214 |
}
|
|
1215 |
// no else
|
|
1216 |
}
|
|
1217 |
|
|
1218 |
return ret;
|
|
1219 |
}
|
|
1220 |
|
|
1221 |
// -----------------------------------------------------------------------------
|
|
1222 |
// CMmPacketContextMesshandlerList::GetPipeStatus
|
|
1223 |
// Gets pipe status specified by context Id.
|
|
1224 |
// -----------------------------------------------------------------------------
|
|
1225 |
//
|
|
1226 |
TInt CMmPacketContextMesshandlerList::GetPipeStatus(
|
|
1227 |
const TUint8 aContextId )
|
|
1228 |
{
|
|
1229 |
|
|
1230 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetPipeStatus. ContextId: %d", aContextId );
|
|
1231 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETPIPESTATUS, "CMmPacketContextMesshandlerList::GetPipeStatus;aContextId=%hhu", aContextId );
|
|
1232 |
|
|
1233 |
TInt pipeStatus( PN_PIPE_DISABLE );
|
|
1234 |
|
|
1235 |
// Find context pipehandle from context info list
|
|
1236 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1237 |
{
|
|
1238 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1239 |
{
|
|
1240 |
pipeStatus = iContextInfoArray[i].iPipeStatus;
|
|
1241 |
|
|
1242 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetPipeStatus. ContextName: %S, PipeStatus: %d", &iContextInfoArray[i].iContextName, pipeStatus );
|
|
1243 |
|
|
1244 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETPIPESTATUS, "CMmPacketContextMesshandlerList::GetPipeStatus;ContextName=%S;pipeStatus=%d", iContextInfoArray[i].iContextName, pipeStatus );
|
|
1245 |
}
|
|
1246 |
// no else
|
|
1247 |
}
|
|
1248 |
|
|
1249 |
return pipeStatus;
|
|
1250 |
}
|
|
1251 |
|
|
1252 |
// -----------------------------------------------------------------------------
|
|
1253 |
// CMmPacketContextMesshandlerList::GetContextIdByContextName
|
|
1254 |
// Gets context Id specified by context name.
|
|
1255 |
// -----------------------------------------------------------------------------
|
|
1256 |
//
|
|
1257 |
TUint8 CMmPacketContextMesshandlerList::GetContextIdByContextName(
|
|
1258 |
TInfoName* const aContextName )
|
|
1259 |
{
|
|
1260 |
|
|
1261 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetContextIdByContextName");
|
|
1262 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTIDBYCONTEXTNAME, "CMmPacketContextMesshandlerList::GetContextIdByContextName" );
|
|
1263 |
|
|
1264 |
TUint contextId( GPDS_CID_VOID );
|
|
1265 |
|
|
1266 |
// Find name from context info list
|
|
1267 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1268 |
{
|
|
1269 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
1270 |
{
|
|
1271 |
|
|
1272 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetContextIdByContextName. ContextName: %S, ContextId: %d", &iContextInfoArray[i].iContextName, iContextInfoArray[i].iContextId );
|
|
1273 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTIDBYCONTEXTNAME, "CMmPacketContextMesshandlerList::GetContextIdByContextName;ContextName=%S;contextId=%d", iContextInfoArray[i].iContextName, iContextInfoArray[i].iContextId );
|
|
1274 |
|
|
1275 |
// Name found, return object
|
|
1276 |
contextId = iContextInfoArray[i].iContextId;
|
|
1277 |
}
|
|
1278 |
// no else
|
|
1279 |
}
|
|
1280 |
|
|
1281 |
return contextId;
|
|
1282 |
}
|
|
1283 |
|
|
1284 |
// -----------------------------------------------------------------------------
|
|
1285 |
// CMmPacketContextMesshandlerList::GetHostCidName
|
|
1286 |
// Gets host context name by context name.
|
|
1287 |
// -----------------------------------------------------------------------------
|
|
1288 |
//
|
|
1289 |
TInfoName CMmPacketContextMesshandlerList::GetHostCidName(
|
|
1290 |
TInfoName* aContextName ) const
|
|
1291 |
{
|
|
1292 |
|
|
1293 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetHostCidName");
|
|
1294 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETHOSTCIDNAME, "CMmPacketContextMesshandlerList::GetHostCidName" );
|
|
1295 |
|
|
1296 |
TInfoName hostName;
|
|
1297 |
hostName.Zero();
|
|
1298 |
|
|
1299 |
// Find name from context info list
|
|
1300 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1301 |
{
|
|
1302 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
1303 |
{
|
|
1304 |
|
|
1305 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetHostCidName. ContextName: %S, HostContextName: %S", &iContextInfoArray[i].iContextName, &iContextInfoArray[i].iHostContextName );
|
|
1306 |
|
|
1307 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETHOSTCIDNAME, "CMmPacketContextMesshandlerList::GetHostCidName;ContextName=%S;HostContextName=%S", iContextInfoArray[i].iContextName, iContextInfoArray[i].iHostContextName );
|
|
1308 |
// Name found
|
|
1309 |
hostName.Copy( iContextInfoArray[i].iHostContextName );
|
|
1310 |
}
|
|
1311 |
// no else
|
|
1312 |
}
|
|
1313 |
|
|
1314 |
return hostName;
|
|
1315 |
}
|
|
1316 |
|
|
1317 |
// -----------------------------------------------------------------------------
|
|
1318 |
// CMmPacketContextMesshandlerList::RemoveContextId
|
|
1319 |
// Reset Context id to GPDS_CID_VOID.
|
|
1320 |
// -----------------------------------------------------------------------------
|
|
1321 |
//
|
|
1322 |
TInt CMmPacketContextMesshandlerList::RemoveContextId(
|
|
1323 |
const TUint8 aContextId )
|
|
1324 |
{
|
|
1325 |
|
|
1326 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveContextId. ContextId: %d", aContextId );
|
|
1327 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_REMOVECONTEXTID, "CMmPacketContextMesshandlerList::RemoveContextId;aContextId=%hhu", aContextId );
|
|
1328 |
|
|
1329 |
TInt ret( KErrNotFound );
|
|
1330 |
|
|
1331 |
// Find name from context info list
|
|
1332 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1333 |
{
|
|
1334 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1335 |
{
|
|
1336 |
|
|
1337 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::RemoveContextId. ContextName: %S, ContextId: %d", &iContextInfoArray[i].iContextName, aContextId );
|
|
1338 |
|
|
1339 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_REMOVECONTEXTID, "CMmPacketContextMesshandlerList::RemoveContextId;ContextName=%S;aContextId=%hhu", iContextInfoArray[i].iContextName, aContextId );
|
|
1340 |
// Name found
|
|
1341 |
iContextInfoArray[i].iContextId = GPDS_CID_VOID;
|
|
1342 |
i = iNumberOfCreatedContexts;
|
|
1343 |
ret = KErrNone;
|
|
1344 |
}
|
|
1345 |
// no else
|
|
1346 |
}
|
|
1347 |
|
|
1348 |
//if dialup context
|
|
1349 |
if( KErrNotFound == ret )
|
|
1350 |
{
|
|
1351 |
if( aContextId == iDialUpContextId )
|
|
1352 |
{
|
|
1353 |
|
|
1354 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveContextId. Dial-Up Context, ContextId: %d", aContextId );
|
|
1355 |
OstTraceExt1( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_REMOVECONTEXTID, "CMmPacketContextMesshandlerList::RemoveContextId;Dial-Up Context, ContextId=%hhu", aContextId );
|
|
1356 |
iDialUpContextId = GPDS_CID_VOID;
|
|
1357 |
iDialUpContextName.Zero();
|
|
1358 |
ret = KErrNone;
|
|
1359 |
}
|
|
1360 |
// no else
|
|
1361 |
|
|
1362 |
if( aContextId == iSecondaryDialUpContextId )
|
|
1363 |
{
|
|
1364 |
|
|
1365 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveContextId. Secondary Dial-Up Context, ContextId: %d", aContextId );
|
|
1366 |
OstTraceExt1( TRACE_NORMAL, DUP3_CMMPACKETCONTEXTMESSHANDLERLIST_REMOVECONTEXTID, "CMmPacketContextMesshandlerList::RemoveContextId;Secondary Dial-Up Context, ContextId=%hhu", aContextId );
|
|
1367 |
iSecondaryDialUpContextId = GPDS_CID_VOID;
|
|
1368 |
iSecondaryDialUpContextName.Zero();
|
|
1369 |
ret = KErrNone;
|
|
1370 |
}
|
|
1371 |
// no else
|
|
1372 |
}
|
|
1373 |
// no else
|
|
1374 |
|
|
1375 |
return ret;
|
|
1376 |
}
|
|
1377 |
|
|
1378 |
// -----------------------------------------------------------------------------
|
|
1379 |
// CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus
|
|
1380 |
// Reset pipe handle and status by pipehandle.
|
|
1381 |
// -----------------------------------------------------------------------------
|
|
1382 |
//
|
|
1383 |
TInt CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus(
|
|
1384 |
const TUint8 aPipeHandle )
|
|
1385 |
{
|
|
1386 |
|
|
1387 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus. PipeHandle: %d", aPipeHandle );
|
|
1388 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_RESETPIPEHANDLEANDSTATUS, "CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus;aPipeHandle=%hhu", aPipeHandle );
|
|
1389 |
|
|
1390 |
TInt ret( KErrNotFound );
|
|
1391 |
|
|
1392 |
// Find name from context info list
|
|
1393 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1394 |
{
|
|
1395 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
1396 |
{
|
|
1397 |
|
|
1398 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus. ContextName: %S", &iContextInfoArray[i].iContextName );
|
|
1399 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_RESETPIPEHANDLEANDSTATUS, "CMmPacketContextMesshandlerList::ResetPipeHandleAndStatus;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
1400 |
|
|
1401 |
// Pipe found
|
|
1402 |
iContextInfoArray[i].iPipeHandle = KInvalidPipeHandle;
|
|
1403 |
iContextInfoArray[i].iPipeStatus = PN_PIPE_DISABLE;
|
|
1404 |
i = iNumberOfCreatedContexts;
|
|
1405 |
ret = KErrNone;
|
|
1406 |
}
|
|
1407 |
// no else
|
|
1408 |
}
|
|
1409 |
|
|
1410 |
return ret;
|
|
1411 |
}
|
|
1412 |
|
|
1413 |
// -----------------------------------------------------------------------------
|
|
1414 |
// CMmPacketContextMesshandlerList::SetInitialiseMember
|
|
1415 |
// Sets initialisation member for specific context identified by context Id.
|
|
1416 |
// -----------------------------------------------------------------------------
|
|
1417 |
//
|
|
1418 |
TBool CMmPacketContextMesshandlerList::SetInitialiseMember(
|
|
1419 |
const TUint8 aContextId,
|
|
1420 |
const TBool aFlag )
|
|
1421 |
{
|
|
1422 |
|
|
1423 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetInitialiseMember. ContextId: %d", aContextId );
|
|
1424 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETINITIALISEMEMBER, "CMmPacketContextMesshandlerList::SetInitialiseMember;aContextId=%hhu", aContextId );
|
|
1425 |
|
|
1426 |
TBool ret( EFalse );
|
|
1427 |
|
|
1428 |
// Find context pipehandle from context info list
|
|
1429 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1430 |
{
|
|
1431 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1432 |
{
|
|
1433 |
|
|
1434 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetInitialiseMember. ContextName: %S, InitialiseStarted: %d", &iContextInfoArray[i].iContextName, aFlag );
|
|
1435 |
|
|
1436 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETINITIALISEMEMBER, "CMmPacketContextMesshandlerList::SetInitialiseMember;ContextName=%S;aFlag=%hhu", iContextInfoArray[i].iContextName, aFlag );
|
|
1437 |
// Return object from the context info list
|
|
1438 |
iContextInfoArray[i].iInitialiseStarted = aFlag;
|
|
1439 |
ret = ETrue;
|
|
1440 |
}
|
|
1441 |
// no else
|
|
1442 |
}
|
|
1443 |
|
|
1444 |
return ret;
|
|
1445 |
}
|
|
1446 |
|
|
1447 |
// -----------------------------------------------------------------------------
|
|
1448 |
// CMmPacketContextMesshandlerList::GetInitialiseMember
|
|
1449 |
// Gets initialisation member for specific context identified by pipehandle.
|
|
1450 |
// -----------------------------------------------------------------------------
|
|
1451 |
//
|
|
1452 |
TBool CMmPacketContextMesshandlerList::GetInitialiseMember(
|
|
1453 |
const TInt aPipeHandle )
|
|
1454 |
{
|
|
1455 |
|
|
1456 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetInitialiseMember. PipeHandle: %d", aPipeHandle );
|
|
1457 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETINITIALISEMEMBER, "CMmPacketContextMesshandlerList::GetInitialiseMember;aPipeHandle=%d", aPipeHandle );
|
|
1458 |
|
|
1459 |
TBool ret( EFalse );
|
|
1460 |
|
|
1461 |
// Find name from context info list
|
|
1462 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1463 |
{
|
|
1464 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
1465 |
{
|
|
1466 |
|
|
1467 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetInitialiseMember. ContextName: %S, InitialiseStarted: %d", &iContextInfoArray[i].iContextName, iContextInfoArray[i].iInitialiseStarted );
|
|
1468 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETINITIALISEMEMBER, "CMmPacketContextMesshandlerList::GetInitialiseMember;ContextName=%S;InitialiseStarted=%hhu", iContextInfoArray[i].iContextName, iContextInfoArray[i].iInitialiseStarted );
|
|
1469 |
|
|
1470 |
ret = iContextInfoArray[i].iInitialiseStarted;
|
|
1471 |
}
|
|
1472 |
// no else
|
|
1473 |
}
|
|
1474 |
|
|
1475 |
return ret;
|
|
1476 |
}
|
|
1477 |
|
|
1478 |
// -----------------------------------------------------------------------------
|
|
1479 |
// CMmPacketContextMesshandlerList::ContextIdByPipeHandle
|
|
1480 |
// Gets contextId of the specified context by Pipehandle.
|
|
1481 |
// -----------------------------------------------------------------------------
|
|
1482 |
//
|
|
1483 |
TUint8 CMmPacketContextMesshandlerList::ContextIdByPipeHandle(
|
|
1484 |
const TInt aPipeHandle )
|
|
1485 |
{
|
|
1486 |
|
|
1487 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextIdByPipeHandle. PipeHandle: %d", aPipeHandle );
|
|
1488 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::ContextIdByPipeHandle;aPipeHandle=%d", aPipeHandle );
|
|
1489 |
|
|
1490 |
TUint8 contextId( GPDS_CID_VOID );
|
|
1491 |
|
|
1492 |
// Find context pipehandle from context info list
|
|
1493 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1494 |
{
|
|
1495 |
if ( aPipeHandle == iContextInfoArray[i].iPipeHandle )
|
|
1496 |
{
|
|
1497 |
|
|
1498 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextIdByPipeHandle. ContextId: %d", iContextInfoArray[i].iContextId );
|
|
1499 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTIDBYPIPEHANDLE, "CMmPacketContextMesshandlerList::ContextIdByPipeHandle;ContextId=%hhu", iContextInfoArray[i].iContextId );
|
|
1500 |
|
|
1501 |
// Return object from the context info list
|
|
1502 |
contextId = iContextInfoArray[i].iContextId;
|
|
1503 |
}
|
|
1504 |
// no else
|
|
1505 |
}
|
|
1506 |
|
|
1507 |
// Valid values to return are, 0x00, 0x01, 0xFF = GPDS_CID_VOID
|
|
1508 |
return contextId;
|
|
1509 |
}
|
|
1510 |
|
|
1511 |
// -----------------------------------------------------------------------------
|
|
1512 |
// CMmPacketContextMesshandlerList::SetContextConfigurationType
|
|
1513 |
// Sets configuration type by contextId.
|
|
1514 |
// -----------------------------------------------------------------------------
|
|
1515 |
//
|
|
1516 |
TBool CMmPacketContextMesshandlerList::SetContextConfigurationType(
|
|
1517 |
const TUint8 aContextId,
|
|
1518 |
const TInt aConfigType )
|
|
1519 |
{
|
|
1520 |
|
|
1521 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetContextConfigurationType. ContextId: %d", aContextId );
|
|
1522 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETCONTEXTCONFIGURATIONTYPE, "CMmPacketContextMesshandlerList::SetContextConfigurationType;aContextId=%hhu", aContextId );
|
|
1523 |
|
|
1524 |
TBool ret( EFalse );
|
|
1525 |
|
|
1526 |
// Find context pipehandle from context info list
|
|
1527 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1528 |
{
|
|
1529 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1530 |
{
|
|
1531 |
|
|
1532 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetContextConfigurationType. ContextName: %S, ConfigType: %d", &iContextInfoArray[i].iContextName, aConfigType );
|
|
1533 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETCONTEXTCONFIGURATIONTYPE, "CMmPacketContextMesshandlerList::SetContextConfigurationType;ContextName=%S;aConfigType=%d", iContextInfoArray[i].iContextName, aConfigType );
|
|
1534 |
|
|
1535 |
// Return object from the context info list
|
|
1536 |
iContextInfoArray[i].iContextConfigurationType = aConfigType;
|
|
1537 |
ret = ETrue;
|
|
1538 |
}
|
|
1539 |
// no else
|
|
1540 |
}
|
|
1541 |
|
|
1542 |
return ret;
|
|
1543 |
}
|
|
1544 |
|
|
1545 |
// -----------------------------------------------------------------------------
|
|
1546 |
// CMmPacketContextMesshandlerList::GetContextConfigurationType
|
|
1547 |
// Gets configuration type by contextId.
|
|
1548 |
// -----------------------------------------------------------------------------
|
|
1549 |
//
|
|
1550 |
TInt CMmPacketContextMesshandlerList::GetContextConfigurationType(
|
|
1551 |
const TUint8 aContextId )
|
|
1552 |
{
|
|
1553 |
|
|
1554 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetContextConfigurationType. ContextId: %d", aContextId );
|
|
1555 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTCONFIGURATIONTYPE, "CMmPacketContextMesshandlerList::GetContextConfigurationType;aContextId=%hhu", aContextId );
|
|
1556 |
|
|
1557 |
TInt ret( KTIntNotDefined );
|
|
1558 |
|
|
1559 |
// Find context pipehandle from context info list
|
|
1560 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1561 |
{
|
|
1562 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1563 |
{
|
|
1564 |
// Return object from the context info list
|
|
1565 |
ret = iContextInfoArray[i].iContextConfigurationType;
|
|
1566 |
|
|
1567 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetContextConfigurationType. ContextName: %S, ConfigType: %d", &iContextInfoArray[i].iContextName, ret );
|
|
1568 |
|
|
1569 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTCONFIGURATIONTYPE, "CMmPacketContextMesshandlerList::GetContextConfigurationType;ContextName=%S;ret=%d", iContextInfoArray[i].iContextName, ret );
|
|
1570 |
}
|
|
1571 |
// no else
|
|
1572 |
}
|
|
1573 |
|
|
1574 |
return ret;
|
|
1575 |
}
|
|
1576 |
|
|
1577 |
// -----------------------------------------------------------------------------
|
|
1578 |
// CMmPacketContextMesshandlerList::SaveConfig
|
|
1579 |
// Saves configuration for specific context.
|
|
1580 |
// -----------------------------------------------------------------------------
|
|
1581 |
//
|
|
1582 |
TInt CMmPacketContextMesshandlerList::SaveConfig(
|
|
1583 |
const TUint8 aContextId,
|
|
1584 |
const TInt aConfigurationType,
|
|
1585 |
RPacketContext::TContextConfigGPRS* aConfig,
|
|
1586 |
RPacketContext::TContextConfigR99_R4* aConfig99 )
|
|
1587 |
{
|
|
1588 |
|
|
1589 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SaveConfig");
|
|
1590 |
OstTrace0( TRACE_NORMAL, DUP3_CMMPACKETCONTEXTMESSHANDLERLIST_SAVECONFIG, "CMmPacketContextMesshandlerList::SaveConfig" );
|
|
1591 |
|
|
1592 |
TInt ret( KErrArgument );
|
|
1593 |
|
|
1594 |
// Find context pipehandle from context info list
|
|
1595 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1596 |
{
|
|
1597 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1598 |
{
|
|
1599 |
|
|
1600 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SaveConfig. ContextName: %S, ContextId: %d", &iContextInfoArray[i].iContextName, aContextId );
|
|
1601 |
|
|
1602 |
OstTraceExt2( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SAVECONFIG, "CMmPacketContextMesshandlerList::SaveConfig;ContextName=%S;aContextId=%hhu", iContextInfoArray[i].iContextName, aContextId );
|
|
1603 |
// Return object from the context info list
|
|
1604 |
if( TPacketDataConfigBase::KConfigGPRS == aConfigurationType )
|
|
1605 |
{
|
|
1606 |
|
|
1607 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SaveConfig. ConfigType: %d", aConfigurationType );
|
|
1608 |
|
|
1609 |
OstTrace1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SAVECONFIG, "CMmPacketContextMesshandlerList::SaveConfig;aConfigurationType=%d", aConfigurationType );
|
|
1610 |
iContextInfoArray[i].iConfig = *aConfig;
|
|
1611 |
iContextInfoArray[i].iContextConfigurationType =
|
|
1612 |
aConfigurationType;
|
|
1613 |
ret = KErrNone;
|
|
1614 |
}
|
|
1615 |
|
|
1616 |
else if( TPacketDataConfigBase::KConfigRel99Rel4 ==
|
|
1617 |
aConfigurationType )
|
|
1618 |
{
|
|
1619 |
|
|
1620 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SaveConfig. ConfigType: %d", aConfigurationType );
|
|
1621 |
|
|
1622 |
OstTrace1( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_SAVECONFIG, "CMmPacketContextMesshandlerList::SaveConfig;aConfigurationType=%d", aConfigurationType );
|
|
1623 |
iContextInfoArray[i].iConfig99 =
|
|
1624 |
*aConfig99;
|
|
1625 |
iContextInfoArray[i].iContextConfigurationType =
|
|
1626 |
aConfigurationType;
|
|
1627 |
ret = KErrNone;
|
|
1628 |
}
|
|
1629 |
// no else
|
|
1630 |
|
|
1631 |
i = iNumberOfCreatedContexts;
|
|
1632 |
}
|
|
1633 |
// no else
|
|
1634 |
}
|
|
1635 |
|
|
1636 |
return ret;
|
|
1637 |
}
|
|
1638 |
|
|
1639 |
// -----------------------------------------------------------------------------
|
|
1640 |
// CMmPacketContextMesshandlerList::SaveConfig
|
|
1641 |
// Get configuration for specific context by context Id and configuration type.
|
|
1642 |
// -----------------------------------------------------------------------------
|
|
1643 |
//
|
|
1644 |
TPacketDataConfigBase* CMmPacketContextMesshandlerList::GetConfig(
|
|
1645 |
const TUint8 aContextId,
|
|
1646 |
const TInt aConfigurationType )
|
|
1647 |
{
|
|
1648 |
|
|
1649 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetConfig");
|
|
1650 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONFIG, "CMmPacketContextMesshandlerList::GetConfig" );
|
|
1651 |
|
|
1652 |
TPacketDataConfigBase* config;
|
|
1653 |
config = NULL;
|
|
1654 |
|
|
1655 |
// Find context pipehandle from context info list
|
|
1656 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1657 |
{
|
|
1658 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1659 |
{
|
|
1660 |
|
|
1661 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetConfig. ContextName: %S, ContextId: %d", &iContextInfoArray[i].iContextName, aContextId );
|
|
1662 |
|
|
1663 |
OstTraceExt2( TRACE_NORMAL, DUP3_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONFIG, "CMmPacketContextMesshandlerList::GetConfig;ContextName=%S;aContextId=%hhu", iContextInfoArray[i].iContextName, aContextId );
|
|
1664 |
// Return object from the context info list
|
|
1665 |
if( TPacketDataConfigBase::KConfigGPRS == aConfigurationType )
|
|
1666 |
{
|
|
1667 |
|
|
1668 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetConfig. ConfigType: %d", aConfigurationType );
|
|
1669 |
|
|
1670 |
OstTrace1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONFIG, "CMmPacketContextMesshandlerList::GetConfig;aConfigurationType=%d", aConfigurationType );
|
|
1671 |
// Return object from the context info list
|
|
1672 |
config = &( iContextInfoArray[i].iConfig );
|
|
1673 |
}
|
|
1674 |
|
|
1675 |
else if( TPacketDataConfigBase::KConfigRel99Rel4 ==
|
|
1676 |
aConfigurationType )
|
|
1677 |
{
|
|
1678 |
|
|
1679 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetConfig. ConfigType: %d", aConfigurationType );
|
|
1680 |
OstTrace1( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONFIG, "CMmPacketContextMesshandlerList::GetConfig;aConfigurationType=%d", aConfigurationType );
|
|
1681 |
// Return object from the context info list
|
|
1682 |
config = &( iContextInfoArray[i].iConfig99 );
|
|
1683 |
}
|
|
1684 |
// no else
|
|
1685 |
}
|
|
1686 |
// no else
|
|
1687 |
}
|
|
1688 |
|
|
1689 |
return config;
|
|
1690 |
}
|
|
1691 |
|
|
1692 |
// -----------------------------------------------------------------------------
|
|
1693 |
// CMmPacketContextMesshandlerList::SetPipeResetTraId
|
|
1694 |
// Sets pipe reset transaction id for specific context by context Id.
|
|
1695 |
// -----------------------------------------------------------------------------
|
|
1696 |
//
|
|
1697 |
TInt CMmPacketContextMesshandlerList::SetPipeResetTraId(
|
|
1698 |
const TUint8 aContextId,
|
|
1699 |
const TUint8 aTransId )
|
|
1700 |
{
|
|
1701 |
|
|
1702 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetPipeResetTraId. ContextId: %d", aContextId );
|
|
1703 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPERESETTRAID, "CMmPacketContextMesshandlerList::SetPipeResetTraId;aContextId=%hhu", aContextId );
|
|
1704 |
|
|
1705 |
TInt ret( KErrNotFound );
|
|
1706 |
|
|
1707 |
// Find context pipehandle from context info list
|
|
1708 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1709 |
{
|
|
1710 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1711 |
{
|
|
1712 |
|
|
1713 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::SetPipeResetTraId. ContextName: %S, PipeResetTraId: %d", &iContextInfoArray[i].iContextName, aTransId );
|
|
1714 |
|
|
1715 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETPIPERESETTRAID, "CMmPacketContextMesshandlerList::SetPipeResetTraId;ContextName=%S;aTransId=%hhu", iContextInfoArray[i].iContextName, aTransId );
|
|
1716 |
// Return object from the context info list
|
|
1717 |
iContextInfoArray[i].iPipeResetTraId = aTransId;
|
|
1718 |
i = iNumberOfCreatedContexts;
|
|
1719 |
ret = KErrNone;
|
|
1720 |
}
|
|
1721 |
// no else
|
|
1722 |
}
|
|
1723 |
|
|
1724 |
return ret;
|
|
1725 |
}
|
|
1726 |
|
|
1727 |
// -----------------------------------------------------------------------------
|
|
1728 |
// CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId
|
|
1729 |
// Checks and resets pipe reset transaction id early saved.
|
|
1730 |
// -----------------------------------------------------------------------------
|
|
1731 |
//
|
|
1732 |
TInt CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId(
|
|
1733 |
const TUint8 aTransId )
|
|
1734 |
{
|
|
1735 |
|
|
1736 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId. TransId: %d", aTransId );
|
|
1737 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CHECKANDRESETPIPERESETTRAID, "CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId;aTransId=%hhu", aTransId );
|
|
1738 |
|
|
1739 |
TInt ret( KErrNotFound );
|
|
1740 |
|
|
1741 |
// Find context pipehandle from context info list
|
|
1742 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1743 |
{
|
|
1744 |
if ( aTransId == iContextInfoArray[i].iPipeResetTraId )
|
|
1745 |
{
|
|
1746 |
|
|
1747 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId. ContextName: %S", &iContextInfoArray[i].iContextName );
|
|
1748 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CHECKANDRESETPIPERESETTRAID, "CMmPacketContextMesshandlerList::CheckAndResetPipeResetTraId;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
1749 |
|
|
1750 |
ret = KErrNone;
|
|
1751 |
i = iNumberOfCreatedContexts;
|
|
1752 |
iContextInfoArray[i].iPipeResetTraId = KTUint8NotDefined;
|
|
1753 |
}
|
|
1754 |
// no else
|
|
1755 |
}
|
|
1756 |
|
|
1757 |
return ret;
|
|
1758 |
}
|
|
1759 |
|
|
1760 |
// -----------------------------------------------------------------------------
|
|
1761 |
// CMmPacketContextMesshandlerList::ProxyIdByContextId
|
|
1762 |
// Gets proxy Id specified by context Id.
|
|
1763 |
// -----------------------------------------------------------------------------
|
|
1764 |
//
|
|
1765 |
TUint8 CMmPacketContextMesshandlerList::ProxyIdByContextId(
|
|
1766 |
const TUint8 aContextId )
|
|
1767 |
{
|
|
1768 |
|
|
1769 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ProxyIdByContextId. ContextId: %d", aContextId );
|
|
1770 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYCONTEXTID, "CMmPacketContextMesshandlerList::ProxyIdByContextId;aContextId=%hhu", aContextId );
|
|
1771 |
|
|
1772 |
TUint channelId( KTUint8NotDefined );
|
|
1773 |
|
|
1774 |
// Find context proxyId from context info list
|
|
1775 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1776 |
{
|
|
1777 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
1778 |
{
|
|
1779 |
|
|
1780 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::ProxyIdByContextId. ContextName: %S, ChannelId: %d", &iContextInfoArray[i].iContextName, iContextInfoArray[i].iChannelId );
|
|
1781 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_PROXYIDBYCONTEXTID, "CMmPacketContextMesshandlerList::ProxyIdByContextId;ContextName=%S;ChannelId=%hhu", iContextInfoArray[i].iContextName, iContextInfoArray[i].iChannelId );
|
|
1782 |
|
|
1783 |
channelId = iContextInfoArray[i].iChannelId;
|
|
1784 |
}
|
|
1785 |
// no else
|
|
1786 |
}
|
|
1787 |
|
|
1788 |
// Valid values to return are, 0x00, 0x01, 0xFF = Not defined
|
|
1789 |
return channelId;
|
|
1790 |
|
|
1791 |
}
|
|
1792 |
|
|
1793 |
// -----------------------------------------------------------------------------
|
|
1794 |
// CMmPacketContextMesshandlerList::ProxyIdByContextId
|
|
1795 |
// Sets context Id and name for dial-up context.
|
|
1796 |
// -----------------------------------------------------------------------------
|
|
1797 |
//
|
|
1798 |
void CMmPacketContextMesshandlerList::SetDialUpContextId(
|
|
1799 |
const TUint8 aContextId )
|
|
1800 |
{
|
|
1801 |
|
|
1802 |
if( 0 == iDialUpContextName.Compare( KStringExternal ) )
|
|
1803 |
{
|
|
1804 |
|
|
1805 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetDialUpContextId iSecondaryDialUpContextName.");
|
|
1806 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETDIALUPCONTEXTID, "CMmPacketContextMesshandlerList::SetDialUpContextId, iSecondaryDialUpContextName" );
|
|
1807 |
|
|
1808 |
iSecondaryDialUpContextName = KStringExternal2;
|
|
1809 |
iSecondaryDialUpContextId = aContextId;
|
|
1810 |
}
|
|
1811 |
else
|
|
1812 |
{
|
|
1813 |
|
|
1814 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetDialUpContextId iDialUpContextId.");
|
|
1815 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETDIALUPCONTEXTID, "CMmPacketContextMesshandlerList::SetDialUpContextId, iDialUpContextId" );
|
|
1816 |
|
|
1817 |
iDialUpContextId = aContextId;
|
|
1818 |
iDialUpContextName = KStringExternal;
|
|
1819 |
}
|
|
1820 |
}
|
|
1821 |
|
|
1822 |
// -----------------------------------------------------------------------------
|
|
1823 |
// CMmPacketContextMesshandlerList::GetDialUpContextId
|
|
1824 |
// Gets context Id for dial-up context.
|
|
1825 |
// -----------------------------------------------------------------------------
|
|
1826 |
//
|
|
1827 |
TUint8 CMmPacketContextMesshandlerList::GetDialUpContextId()
|
|
1828 |
{
|
|
1829 |
|
|
1830 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetDialUpContextId");
|
|
1831 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETDIALUPCONTEXTID, "CMmPacketContextMesshandlerList::GetDialUpContextId" );
|
|
1832 |
|
|
1833 |
return iDialUpContextId;
|
|
1834 |
}
|
|
1835 |
|
|
1836 |
// -----------------------------------------------------------------------------
|
|
1837 |
// CMmPacketContextMesshandlerList::DialUpContextName
|
|
1838 |
// Gets dial-up context name specified by context Id.
|
|
1839 |
// -----------------------------------------------------------------------------
|
|
1840 |
//
|
|
1841 |
TInt CMmPacketContextMesshandlerList::DialUpContextName(
|
|
1842 |
const TUint8 aContextId,
|
|
1843 |
TInfoName& aContextName )
|
|
1844 |
{
|
|
1845 |
|
|
1846 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::DialUpContextName");
|
|
1847 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_DIALUPCONTEXTNAME, "CMmPacketContextMesshandlerList::DialUpContextName" );
|
|
1848 |
|
|
1849 |
TInt ret( KErrNotFound );
|
|
1850 |
|
|
1851 |
if( aContextId == iDialUpContextId )
|
|
1852 |
{
|
|
1853 |
|
|
1854 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::DialUpContextName. DialUpContextId: %d", aContextId );
|
|
1855 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_DIALUPCONTEXTNAME, "CMmPacketContextMesshandlerList::DialUpContextName;DialUpContextId=%hhu", aContextId );
|
|
1856 |
aContextName = iDialUpContextName;
|
|
1857 |
ret = KErrNone;
|
|
1858 |
}
|
|
1859 |
// no else
|
|
1860 |
|
|
1861 |
if( aContextId == iSecondaryDialUpContextId )
|
|
1862 |
{
|
|
1863 |
|
|
1864 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::DialUpContextName. SecondaryDialUpContextId: %d", aContextId );
|
|
1865 |
OstTraceExt1( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_DIALUPCONTEXTNAME, "CMmPacketContextMesshandlerList::DialUpContextName;DialUpContextName=%hhu", aContextId );
|
|
1866 |
aContextName = iSecondaryDialUpContextName;
|
|
1867 |
ret = KErrNone;
|
|
1868 |
}
|
|
1869 |
// no else
|
|
1870 |
|
|
1871 |
return ret;
|
|
1872 |
}
|
|
1873 |
|
|
1874 |
// -----------------------------------------------------------------------------
|
|
1875 |
// CMmPacketContextMesshandlerList::GetDialUpContextIdByName
|
|
1876 |
// Gets dial-up context id specified by context name.
|
|
1877 |
// -----------------------------------------------------------------------------
|
|
1878 |
//
|
|
1879 |
TUint8 CMmPacketContextMesshandlerList::GetDialUpContextIdByName(
|
|
1880 |
TInfoName* const aContextName )
|
|
1881 |
{
|
|
1882 |
|
|
1883 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetDialUpContextIdByName");
|
|
1884 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETDIALUPCONTEXTIDBYNAME, "CMmPacketContextMesshandlerList::GetDialUpContextIdByName" );
|
|
1885 |
|
|
1886 |
TUint8 contextId( GPDS_CID_VOID );
|
|
1887 |
|
|
1888 |
if ( *aContextName == iDialUpContextName )
|
|
1889 |
{
|
|
1890 |
|
|
1891 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetDialUpContextIdByName. DialUpContextId: %d", iDialUpContextId );
|
|
1892 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETDIALUPCONTEXTIDBYNAME, "CMmPacketContextMesshandlerList::GetDialUpContextIdByName;DialUpContextId=%hhu", contextId );
|
|
1893 |
// Name found, return object
|
|
1894 |
contextId = iDialUpContextId;
|
|
1895 |
}
|
|
1896 |
// no else
|
|
1897 |
|
|
1898 |
if ( *aContextName == iSecondaryDialUpContextName )
|
|
1899 |
{
|
|
1900 |
// Name found, return object
|
|
1901 |
contextId = iSecondaryDialUpContextId;
|
|
1902 |
|
|
1903 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetDialUpContextIdByName. SecondaryDialUpContextId: %d", contextId );
|
|
1904 |
|
|
1905 |
OstTraceExt1( TRACE_NORMAL, DUP2_CMMPACKETCONTEXTMESSHANDLERLIST_GETDIALUPCONTEXTIDBYNAME, "CMmPacketContextMesshandlerList::GetDialUpContextIdByName;SecondaryDialUpContextId=%hhu", contextId );
|
|
1906 |
}
|
|
1907 |
// no else
|
|
1908 |
|
|
1909 |
return contextId;
|
|
1910 |
|
|
1911 |
}
|
|
1912 |
|
|
1913 |
// -----------------------------------------------------------------------------
|
|
1914 |
// CMmPacketContextMesshandlerList::RemoveObjectByName
|
|
1915 |
// Removes buffered data belonging to a context specified by name.
|
|
1916 |
// -----------------------------------------------------------------------------
|
|
1917 |
//
|
|
1918 |
void CMmPacketContextMesshandlerList::RemoveObjectByName(
|
|
1919 |
TInfoName* aContextName )
|
|
1920 |
{
|
|
1921 |
|
|
1922 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::RemoveObjectByName");
|
|
1923 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_REMOVEOBJECTBYNAME, "CMmPacketContextMesshandlerList::RemoveObjectByName" );
|
|
1924 |
|
|
1925 |
// Set ret to KErrArgument to check that context is in list
|
|
1926 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
1927 |
{
|
|
1928 |
// Find aContext from context info list
|
|
1929 |
if ( *aContextName == iContextInfoArray[i].iContextName )
|
|
1930 |
{
|
|
1931 |
|
|
1932 |
for ( TInt j = 0; j < KMmMaxNumberOfContexts; j++ )
|
|
1933 |
{
|
|
1934 |
|
|
1935 |
if ( ( iContextInfoArray[i].iChannelId ==
|
|
1936 |
iProxyIdList[j].iChannelId ) && ( EFalse ==
|
|
1937 |
iProxyIdList[j].iIsFree ) )
|
|
1938 |
{
|
|
1939 |
|
|
1940 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::RemoveObjectByName. Context Name: %S", &iContextInfoArray[i].iContextName );
|
|
1941 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_REMOVEOBJECTBYNAME, "CMmPacketContextMesshandlerList::RemoveObjectByName;ContextName=%S", iContextInfoArray[i].iContextName );
|
|
1942 |
// Release Proxy id
|
|
1943 |
iProxyIdList[j].iIsFree = ETrue;
|
|
1944 |
|
|
1945 |
// Get index to last reserved cell in the list
|
|
1946 |
const TInt lastContext( iNumberOfCreatedContexts - 1 );
|
|
1947 |
|
|
1948 |
// If not already last object
|
|
1949 |
if ( i < lastContext )
|
|
1950 |
{
|
|
1951 |
// Replace object to be remove by last object
|
|
1952 |
iContextInfoArray[i].iContextId =
|
|
1953 |
iContextInfoArray[lastContext].iContextId;
|
|
1954 |
|
|
1955 |
iContextInfoArray[i].iChannelId =
|
|
1956 |
iContextInfoArray[lastContext].iChannelId;
|
|
1957 |
|
|
1958 |
iContextInfoArray[i].iContextName =
|
|
1959 |
iContextInfoArray[lastContext].iContextName;
|
|
1960 |
|
|
1961 |
iContextInfoArray[i].iHostContextName =
|
|
1962 |
iContextInfoArray[lastContext].iHostContextName;
|
|
1963 |
iContextInfoArray[i].iPipeStatus =
|
|
1964 |
iContextInfoArray[lastContext].iPipeStatus;
|
|
1965 |
iContextInfoArray[i].iPipeHandle =
|
|
1966 |
iContextInfoArray[lastContext].iPipeHandle;
|
|
1967 |
iContextInfoArray[i].iCreateContextIdTransId =
|
|
1968 |
iContextInfoArray[lastContext].iCreateContextIdTransId;
|
|
1969 |
iContextInfoArray[i].iPipeCreateTransId =
|
|
1970 |
iContextInfoArray[lastContext].iPipeCreateTransId;
|
|
1971 |
iContextInfoArray[i].iContextType =
|
|
1972 |
iContextInfoArray[lastContext].iContextType;
|
|
1973 |
iContextInfoArray[i].iInitialiseStarted =
|
|
1974 |
iContextInfoArray[lastContext].iInitialiseStarted;
|
|
1975 |
iContextInfoArray[i].iContextConfigurationType =
|
|
1976 |
iContextInfoArray[lastContext].iContextConfigurationType;
|
|
1977 |
iContextInfoArray[i].iActivationTraId =
|
|
1978 |
iContextInfoArray[lastContext].iActivationTraId;
|
|
1979 |
iContextInfoArray[i].iPipeResetTraId =
|
|
1980 |
iContextInfoArray[lastContext].iPipeResetTraId;
|
|
1981 |
iContextInfoArray[i].iDeleteTraId =
|
|
1982 |
iContextInfoArray[lastContext].iDeleteTraId;
|
|
1983 |
}
|
|
1984 |
// no else
|
|
1985 |
|
|
1986 |
// Reset object information of the last object
|
|
1987 |
iContextInfoArray[lastContext].iChannelId =
|
|
1988 |
KTUint8NotDefined;
|
|
1989 |
iContextInfoArray[lastContext].iContextName.Zero();
|
|
1990 |
iContextInfoArray[lastContext].iContextId = GPDS_CID_VOID;
|
|
1991 |
iContextInfoArray[lastContext].iHostContextName.Zero();
|
|
1992 |
iContextInfoArray[lastContext].iPipeStatus =
|
|
1993 |
PN_PIPE_DISABLE;
|
|
1994 |
iContextInfoArray[lastContext].iPipeHandle =
|
|
1995 |
KInvalidPipeHandle;
|
|
1996 |
iContextInfoArray[lastContext].iCreateContextIdTransId =
|
|
1997 |
KTUint8NotDefined;
|
|
1998 |
iContextInfoArray[lastContext].iPipeCreateTransId =
|
|
1999 |
KTUint8NotDefined;
|
|
2000 |
iContextInfoArray[lastContext].iContextType =
|
|
2001 |
GPDS_CONT_TYPE_NORMAL;
|
|
2002 |
iContextInfoArray[lastContext].iInitialiseStarted = EFalse;
|
|
2003 |
iContextInfoArray[lastContext].iContextConfigurationType =
|
|
2004 |
KTIntNotDefined;
|
|
2005 |
iContextInfoArray[lastContext].iActivationTraId =
|
|
2006 |
KTUint8NotDefined;
|
|
2007 |
iContextInfoArray[lastContext].iPipeResetTraId =
|
|
2008 |
KTUint8NotDefined;
|
|
2009 |
iContextInfoArray[lastContext].iDeleteTraId =
|
|
2010 |
KTUint8NotDefined;
|
|
2011 |
// Decrease number of created contexts
|
|
2012 |
iNumberOfCreatedContexts--;
|
|
2013 |
// Proxy id found, break
|
|
2014 |
j = KMmMaxNumberOfContexts;
|
|
2015 |
}
|
|
2016 |
// no else
|
|
2017 |
}
|
|
2018 |
|
|
2019 |
// aContext found, break
|
|
2020 |
i = iNumberOfCreatedContexts;
|
|
2021 |
}
|
|
2022 |
// no else
|
|
2023 |
}
|
|
2024 |
}
|
|
2025 |
|
|
2026 |
// -----------------------------------------------------------------------------
|
|
2027 |
// CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo
|
|
2028 |
// Adds DNS related information to context info array.
|
|
2029 |
// -----------------------------------------------------------------------------
|
|
2030 |
//
|
|
2031 |
TInt CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo(
|
|
2032 |
TUint8 aContextId )
|
|
2033 |
{
|
|
2034 |
|
|
2035 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo");
|
|
2036 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETDNSADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo" );
|
|
2037 |
|
|
2038 |
TInt ret( KErrNotFound );
|
|
2039 |
|
|
2040 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
2041 |
{
|
|
2042 |
// Find aContext from context info list
|
|
2043 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
2044 |
{
|
|
2045 |
|
|
2046 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo. ContextId: %d", aContextId );
|
|
2047 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETDNSADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::SetDNSAddressInfoToContextInfo;aContextId=%hhu", aContextId );
|
|
2048 |
|
|
2049 |
iContextInfoArray[i].iAddDNSAddress = ETrue;
|
|
2050 |
ret = KErrNone;
|
|
2051 |
}
|
|
2052 |
// no else
|
|
2053 |
}
|
|
2054 |
|
|
2055 |
return ret;
|
|
2056 |
}
|
|
2057 |
|
|
2058 |
// -----------------------------------------------------------------------------
|
|
2059 |
// CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo
|
|
2060 |
// Gets DNS related information from context info array.
|
|
2061 |
// -----------------------------------------------------------------------------
|
|
2062 |
//
|
|
2063 |
TBool CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo(
|
|
2064 |
TUint8 aContextId )
|
|
2065 |
{
|
|
2066 |
|
|
2067 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo");
|
|
2068 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETDNSADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo" );
|
|
2069 |
|
|
2070 |
TBool addDNSAddress( EFalse );
|
|
2071 |
|
|
2072 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
2073 |
{
|
|
2074 |
// Find aContext from context info list
|
|
2075 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
2076 |
{
|
|
2077 |
|
|
2078 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo. ContextId: %d, AddDNSAddress: %d", aContextId, iContextInfoArray[i].iAddDNSAddress );
|
|
2079 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETDNSADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::GetDNSAddressInfoToContextInfo;aContextId=%hhu;AddDNSAddress=%hhu", aContextId, iContextInfoArray[i].iAddDNSAddress );
|
|
2080 |
|
|
2081 |
addDNSAddress = iContextInfoArray[i].iAddDNSAddress;
|
|
2082 |
}
|
|
2083 |
// no else
|
|
2084 |
}
|
|
2085 |
|
|
2086 |
return addDNSAddress;
|
|
2087 |
}
|
|
2088 |
|
|
2089 |
// -----------------------------------------------------------------------------
|
|
2090 |
// CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo
|
|
2091 |
// Adds PCSCF related information to context info array.
|
|
2092 |
// -----------------------------------------------------------------------------
|
|
2093 |
//
|
|
2094 |
TInt CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo(
|
|
2095 |
TUint8 aContextId )
|
|
2096 |
{
|
|
2097 |
|
|
2098 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo");
|
|
2099 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_SETPCSCFADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo" );
|
|
2100 |
|
|
2101 |
TInt ret( KErrNotFound );
|
|
2102 |
|
|
2103 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
2104 |
{
|
|
2105 |
// Find aContext from context info list
|
|
2106 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
2107 |
{
|
|
2108 |
|
|
2109 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo. ContextId: %d", aContextId );
|
|
2110 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_SETPCSCFADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::SetPCSCFAddressInfoToContextInfo;aContextId=%hhu", aContextId );
|
|
2111 |
|
|
2112 |
iContextInfoArray[i].iAddPCSCFAddress = ETrue;
|
|
2113 |
ret = KErrNone;
|
|
2114 |
}
|
|
2115 |
// no else
|
|
2116 |
}
|
|
2117 |
|
|
2118 |
return ret;
|
|
2119 |
}
|
|
2120 |
|
|
2121 |
// -----------------------------------------------------------------------------
|
|
2122 |
// CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo
|
|
2123 |
// Gets PCSCF related information from context info array.
|
|
2124 |
// -----------------------------------------------------------------------------
|
|
2125 |
//
|
|
2126 |
TBool CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo(
|
|
2127 |
TUint8 aContextId )
|
|
2128 |
{
|
|
2129 |
|
|
2130 |
TFLOGSTRING("TSY: CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo");
|
|
2131 |
OstTrace0( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETPCSCFADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo" );
|
|
2132 |
|
|
2133 |
TBool addPCSCFAddress( EFalse );
|
|
2134 |
|
|
2135 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
2136 |
{
|
|
2137 |
// Find aContext from context info list
|
|
2138 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
2139 |
{
|
|
2140 |
|
|
2141 |
TFLOGSTRING3("TSY: CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo. ContextId: %d, AddPCSCFAddress: %d", aContextId, iContextInfoArray[i].iAddPCSCFAddress );
|
|
2142 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETPCSCFADDRESSINFOTOCONTEXTINFO, "CMmPacketContextMesshandlerList::GetPCSCFAddressInfoToContextInfo;aContextId=%hhu;AddPCSCFAddress=%hhu", aContextId, iContextInfoArray[i].iAddPCSCFAddress );
|
|
2143 |
|
|
2144 |
addPCSCFAddress = iContextInfoArray[i].iAddPCSCFAddress;
|
|
2145 |
}
|
|
2146 |
// no else
|
|
2147 |
}
|
|
2148 |
|
|
2149 |
return addPCSCFAddress;
|
|
2150 |
}
|
|
2151 |
|
|
2152 |
// -----------------------------------------------------------------------------
|
|
2153 |
// CMmPacketContextMesshandlerList::ContextIdByListIndex
|
|
2154 |
// Gets context id of the specified context by list index.
|
|
2155 |
// -----------------------------------------------------------------------------
|
|
2156 |
//
|
|
2157 |
TUint8 CMmPacketContextMesshandlerList::ContextIdByListIndex(
|
|
2158 |
const TInt aListIndex )
|
|
2159 |
{
|
|
2160 |
|
|
2161 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextIdByListIndex, Index: %d", aListIndex );
|
|
2162 |
OstTrace1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTIDBYLISTINDEX, "CMmPacketContextMesshandlerList::ContextIdByListIndex;aListIndex=%d", aListIndex );
|
|
2163 |
|
|
2164 |
TUint8 contextId( GPDS_CID_VOID );
|
|
2165 |
|
|
2166 |
if ( aListIndex < iNumberOfCreatedContexts )
|
|
2167 |
{
|
|
2168 |
// Return context id from the context info list
|
|
2169 |
contextId = iContextInfoArray[aListIndex].iContextId;
|
|
2170 |
|
|
2171 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::ContextIdByListIndex. ContextId: %d", contextId );
|
|
2172 |
|
|
2173 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_CONTEXTIDBYLISTINDEX, "CMmPacketContextMesshandlerList::ContextIdByListIndex;contextId=%hhu", contextId );
|
|
2174 |
}
|
|
2175 |
// no else
|
|
2176 |
|
|
2177 |
// Valid values to return are, 0x00, 0x01, 0xFF = GPDS_CID_VOID
|
|
2178 |
return contextId;
|
|
2179 |
}
|
|
2180 |
|
|
2181 |
// -----------------------------------------------------------------------------
|
|
2182 |
// CMmPacketContextMesshandlerList::GetContextTypeById
|
|
2183 |
// This function returns context type by context id.
|
|
2184 |
// -----------------------------------------------------------------------------
|
|
2185 |
//
|
|
2186 |
TUint8 CMmPacketContextMesshandlerList::GetContextTypeById(
|
|
2187 |
const TUint8 aContextId )
|
|
2188 |
{
|
|
2189 |
|
|
2190 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetContextTypeByName, ContextId: %d", aContextId );
|
|
2191 |
OstTraceExt1( TRACE_NORMAL, CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTTYPEBYID, "CMmPacketContextMesshandlerList::GetContextTypeById;aContextId=%hhu", aContextId );
|
|
2192 |
|
|
2193 |
TUint8 ret( GPDS_CONT_TYPE_NORMAL );
|
|
2194 |
|
|
2195 |
// Find context id from context info list
|
|
2196 |
for ( TInt i = 0; i < iNumberOfCreatedContexts; i++ )
|
|
2197 |
{
|
|
2198 |
if ( aContextId == iContextInfoArray[i].iContextId )
|
|
2199 |
{
|
|
2200 |
// if host context is defined => context is secondary context
|
|
2201 |
if( 0 != iContextInfoArray[i].iHostContextName.Length() )
|
|
2202 |
{
|
|
2203 |
ret = GPDS_CONT_TYPE_SEC;
|
|
2204 |
}
|
|
2205 |
// no else
|
|
2206 |
|
|
2207 |
TFLOGSTRING2("TSY: CMmPacketContextMesshandlerList::GetContextTypeById, ContextType: %d", ret );
|
|
2208 |
|
|
2209 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPACKETCONTEXTMESSHANDLERLIST_GETCONTEXTTYPEBYID, "CMmPacketContextMesshandlerList::GetContextTypeById;ContextType=%hhu", ret );
|
|
2210 |
}
|
|
2211 |
// no else
|
|
2212 |
}
|
|
2213 |
|
|
2214 |
return ret;
|
|
2215 |
}
|
|
2216 |
|
|
2217 |
// ========================== OTHER EXPORTED FUNCTIONS =========================
|
|
2218 |
|
|
2219 |
//None
|
|
2220 |
|
|
2221 |
|
|
2222 |
// End of File
|