|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contains the global definitions needed across the ceddump module/exe |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file ceddumper.cpp |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include <e32cons.h> |
|
24 #include <e32std.h> |
|
25 #include <bacline.h> |
|
26 #include "ceddumper.h" |
|
27 #include "ceddumpglobals.h" |
|
28 #include "dbdef.h" |
|
29 #include <etelpckt.h> |
|
30 #include <etelqos.h> |
|
31 #include <faxdefn.h> |
|
32 #include <networking/panroles.h> |
|
33 #include <nifvar_internal.h> |
|
34 #include <commsdat_internal.h> |
|
35 #include <commsdattypesv1_1_partner.h> |
|
36 #include <commsdattypesv1_1_internal.h> |
|
37 |
|
38 #include <comms-infras/commsdatschema.h> |
|
39 |
|
40 using namespace CommsDat; |
|
41 |
|
42 //_LIT(Comma, ", "); commented out because not used |
|
43 _LIT(APPLICATIONNAME,"CommsDat Database Dump Utility"); |
|
44 _LIT(APPLICATIONVERSION,"1.1"); |
|
45 |
|
46 /* This holds the column value */ |
|
47 TBuf<MAX_COL_LONG_VAL_LEN> globalValueBuffer; |
|
48 |
|
49 #define Hidden _S("Hidden=Yes") |
|
50 #define Private _S("Private=Yes") |
|
51 #define ProtectedWrite _S("ProtectedWrite=Yes") |
|
52 #define ProtectedRead _S("ProtectedRead=Yes") |
|
53 |
|
54 #define KLinkPrefix _L("Link.") |
|
55 #define KLinkSeparator _L(".") |
|
56 #define TableNameTag _L("Table") |
|
57 |
|
58 const TText* const gAtttibutesArray[]= |
|
59 { |
|
60 Hidden, |
|
61 Private, |
|
62 ProtectedWrite, |
|
63 ProtectedRead, |
|
64 NO_MORE_RECORDS |
|
65 }; |
|
66 |
|
67 CCedDumper::~CCedDumper() |
|
68 { |
|
69 delete iFileDumper; |
|
70 delete iDbSession; |
|
71 delete iConsole; |
|
72 delete iTable; |
|
73 |
|
74 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
75 delete iR99ConversionRecordsHead; |
|
76 // no need to delete iR99ConversionRecordsCurrent since it is always linked to the head. |
|
77 #endif |
|
78 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
79 } |
|
80 |
|
81 /*static*/ CCedDumper* CCedDumper::NewL() |
|
82 { |
|
83 CCedDumper* dumper = new (ELeave) CCedDumper; |
|
84 CleanupStack::PushL(dumper); |
|
85 dumper->ConstructL(); |
|
86 CleanupStack::Pop(dumper); |
|
87 return dumper; |
|
88 } |
|
89 |
|
90 void CCedDumper::ConstructL() |
|
91 { |
|
92 iConsole = Console::NewL(_L("Ceddump Tool"),TSize(KConsFullScreen,KConsFullScreen)); |
|
93 |
|
94 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
95 iR99Conversion = EFalse; |
|
96 #endif |
|
97 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
98 |
|
99 iUseHexFormat = EFalse; |
|
100 iTemplateRecordBase = NULL; |
|
101 |
|
102 #ifdef __TOOLS2__ |
|
103 // ROHID support is enabled via command line parameter for TOOLS2 |
|
104 iROHIDSupport = EFalse; |
|
105 #else |
|
106 // For other platforms it depends on the __COMMDB_ROHID_SUPPORT__ macro |
|
107 #ifdef __COMMDB_ROHID_SUPPORT__ |
|
108 iROHIDSupport = ETrue; |
|
109 #else |
|
110 iROHIDSupport = EFalse; |
|
111 #endif |
|
112 #endif |
|
113 } |
|
114 |
|
115 TInt CCedDumper::ProcessCommandLineL() |
|
116 { |
|
117 TInt ret = KErrNone; |
|
118 |
|
119 /* Check for command line parameters*/ |
|
120 if(ParseCommandLine()) |
|
121 { |
|
122 /* connect to file system */ |
|
123 iFileDumper = CFileDump::NewL(iCfgFileName, TPtrC(APPLICATIONNAME), TPtrC(APPLICATIONVERSION), ETrue, iConsole); |
|
124 if (!iFileDumper->IsInitialised()) |
|
125 { |
|
126 iConsole->Printf(_L("Failed to open the output file [%S]\n"), &iCfgFileName ); |
|
127 #ifndef __TOOLS2__ |
|
128 iConsole->Printf(_L("\nPress any key to finish")); |
|
129 iConsole->Getch(); |
|
130 #endif |
|
131 ret = KErrArgument; |
|
132 } |
|
133 else |
|
134 { |
|
135 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
136 iDbSession = CMDBSession::NewL(KCDVersion1_2); |
|
137 #else |
|
138 iDbSession = CMDBSession::NewL(KCDVersion1_1); |
|
139 #endif |
|
140 if (iROHIDSupport) |
|
141 { |
|
142 iDbSession->SetAttributeMask(ECDHidden | ECDPrivate | ECDProtectedWrite |ECDNoWriteButDelete ); |
|
143 } |
|
144 else |
|
145 { |
|
146 iDbSession->SetAttributeMask(ECDHidden); |
|
147 } |
|
148 } |
|
149 } |
|
150 else |
|
151 { |
|
152 HelpDump(); |
|
153 ret = KErrArgument; |
|
154 } |
|
155 return ret; |
|
156 } |
|
157 |
|
158 /** |
|
159 Prints basic help information to the emulator window including command switches |
|
160 */ |
|
161 void CCedDumper::HelpDump() |
|
162 { |
|
163 iConsole->Printf(_L("Creates Comms Database Configuration File")); |
|
164 |
|
165 TBuf<MAX_ARG_LEN> buffer; |
|
166 |
|
167 buffer = (_L("\n\nCEDDUMP ")); |
|
168 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
169 buffer += (_L("[-CR99] ")); |
|
170 #endif |
|
171 |
|
172 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
173 buffer += (_L("[-x] ")); |
|
174 #endif |
|
175 |
|
176 #ifdef __TOOLS2__ |
|
177 buffer += (_L("[-rohid] ")); |
|
178 #endif |
|
179 |
|
180 buffer += (_L("[-o [path]filename]")); |
|
181 iConsole->Printf(_L("%S"), &buffer); |
|
182 |
|
183 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
184 iConsole->Printf(_L("\n -CR99 Performs the conversion of R97/98 QoS GPRS parameters to R99")); |
|
185 iConsole->Printf(_L("\n Assumes R97/98 parameters are stored in commsdat database")); |
|
186 #endif // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
187 |
|
188 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
189 iConsole->Printf(_L("\n -x UIDs are output in hex format")); |
|
190 #endif |
|
191 |
|
192 #ifdef __TOOLS2__ |
|
193 iConsole->Printf(_L("\n -rohid The readonly and hidden attributes are output to the configuration file")); |
|
194 #endif |
|
195 iConsole->Printf(_L("\n -o Specifies an output configuration file for CEDDUMP. Defaults to '%s'"), DEFAULTCFGFILENAME); |
|
196 |
|
197 #ifndef __TOOLS2__ |
|
198 iConsole->Printf(_L("\n\nPress any key to finish")); |
|
199 iConsole->Getch(); |
|
200 #endif |
|
201 } |
|
202 |
|
203 /* This method validates CommandLine parameters */ |
|
204 TBool CCedDumper::ParseCommandLine() |
|
205 { |
|
206 |
|
207 TBool ret = EFalse; |
|
208 iCfgFileName = DEFAULTCFGFILENAME; |
|
209 CCommandLineArguments *pCmd = NULL; |
|
210 TRAP_IGNORE (pCmd = CCommandLineArguments::NewL()); |
|
211 |
|
212 #ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
213 TBool bOutFound = EFalse; |
|
214 #endif |
|
215 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
216 |
|
217 |
|
218 if(pCmd) |
|
219 { |
|
220 TBuf<MAX_ARG_LEN> arg; |
|
221 TInt i = 0; |
|
222 |
|
223 /* check all arguments for switches */ |
|
224 |
|
225 while( ++i < pCmd->Count() ) |
|
226 { |
|
227 arg = pCmd->Arg(i); |
|
228 arg.UpperCase(); |
|
229 |
|
230 if ( arg.FindF(_L("-H")) != KErrNotFound ) |
|
231 { |
|
232 delete pCmd; |
|
233 return ret; |
|
234 } |
|
235 |
|
236 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
237 // set up a flag to make an conversion of QoS GPRS values from R97/98 to R99/R4 |
|
238 if (arg.FindF(_L("-CR99"))!= KErrNotFound ) |
|
239 { |
|
240 iR99Conversion = ETrue; |
|
241 } |
|
242 #endif |
|
243 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
244 // Output UIDs in hex format? |
|
245 // |
|
246 if (arg.FindF(_L("-X")) != KErrNotFound) |
|
247 { |
|
248 iUseHexFormat = ETrue; |
|
249 } |
|
250 |
|
251 /* Specification of an output file*/ |
|
252 if ( arg.FindF(_L("-O")) != KErrNotFound ) |
|
253 { |
|
254 if( i != pCmd->Count()-1 ) |
|
255 { |
|
256 iCfgFileName = pCmd->Arg(++i); |
|
257 #ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
258 bOutFound = ETrue; |
|
259 #endif |
|
260 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
261 continue; |
|
262 } |
|
263 else |
|
264 { |
|
265 iConsole->Printf(_L("Argument missing after '-o' switch")); |
|
266 iConsole->Printf(_L("\n\nPress any key to finish")); |
|
267 iConsole->Getch(); |
|
268 delete pCmd; |
|
269 return ret; |
|
270 } |
|
271 } |
|
272 |
|
273 #ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
274 if ( !bOutFound ) |
|
275 { |
|
276 iCfgFileName = pCmd->Arg(i); |
|
277 bOutFound = ETrue; |
|
278 continue; |
|
279 } |
|
280 #endif |
|
281 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
282 #ifdef __TOOLS2__ |
|
283 // Output Read Only Hidden columns |
|
284 // |
|
285 if (arg.FindF(_L("-ROHID")) != KErrNotFound) |
|
286 { |
|
287 iROHIDSupport = ETrue; |
|
288 } |
|
289 #endif |
|
290 } |
|
291 if (iCfgFileName.Length() > 0) |
|
292 ret = ETrue; |
|
293 |
|
294 } |
|
295 delete pCmd; |
|
296 return ret; |
|
297 } |
|
298 |
|
299 void CCedDumper::PrintError(TInt error) |
|
300 { |
|
301 iConsole->Printf(_L("Utility failed with error=%d\n"), error); |
|
302 iConsole->Getch(); |
|
303 } |
|
304 |
|
305 void CCedDumper::DumpContents() |
|
306 { |
|
307 |
|
308 TInt loop = 0; |
|
309 TBuf<MAX_COL_NAME_LEN> tempTable; |
|
310 |
|
311 /* tableArray holds all the table names */ |
|
312 tempTable = tableArray[loop]; |
|
313 |
|
314 iConsole->Printf(_L("Processing table: [%S]"), &tempTable); |
|
315 /* This loops through all the tables */ |
|
316 while(tempTable.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
317 { |
|
318 // Get the record type |
|
319 TRAPD(ret, GetRecordTypeL(elementIdArray[loop])); /* Create a record set for table */ |
|
320 if(ret!=KErrNone) |
|
321 { |
|
322 iConsole->Printf(_L("(unsupported)")); |
|
323 } |
|
324 else |
|
325 { |
|
326 iTemplateRecordBase = NULL; |
|
327 // Retrieve the table |
|
328 TRAP(ret,(iTable->LoadL(*iDbSession)));/* Loads all the records of particular record type */ |
|
329 |
|
330 if(ret!=KErrNone) |
|
331 { |
|
332 iConsole->Printf(_L("\n ERROR: Unable to process table %S, error %d. Continuing...\n"), &tempTable, ret); |
|
333 } |
|
334 else |
|
335 { |
|
336 iFileDumper->WriteTableHeader(tempTable);/* Write Table header in the output file */ |
|
337 //boo WriteTableAttributes(tempTable);/* logs table attributes : _TABLE [ Priveat = Yes, ....] */ |
|
338 TRAP(ret, WriteTemplateAndRecordsL());/*Logs template and other records within a Record type */ |
|
339 if(ret!=KErrNone) |
|
340 { |
|
341 iConsole->Printf(_L("\n ERROR: Unable to WriteTemplateAndRecords for table %S, error %d. Continuing...\n"), &tempTable, ret); |
|
342 } |
|
343 } |
|
344 } |
|
345 /* Go to next Record type ( Table) */ |
|
346 loop++; |
|
347 tempTable = tableArray[loop]; |
|
348 delete iTable; |
|
349 iTable = NULL; |
|
350 ResetAllAttrubuteFlags();/* Reset attribute flags to EFalse */ |
|
351 if(tempTable.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
352 { |
|
353 iConsole->Printf(_L(" [%S]"), &tempTable); |
|
354 } |
|
355 } |
|
356 |
|
357 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
358 if (iR99Conversion) |
|
359 { |
|
360 WriteR99Conversion(); |
|
361 } |
|
362 #endif |
|
363 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
364 iConsole->Printf(_L(" All done.\n")); |
|
365 } |
|
366 |
|
367 |
|
368 void CCedDumper::WriteTableAttributes(TDesC &/*aTempTable*/) |
|
369 { |
|
370 TPtrC column; |
|
371 TPtrC value; |
|
372 |
|
373 column.Set(_L("Hidden")); |
|
374 if(iRecordBase->IsSetAttribute(ECDHidden)) |
|
375 { |
|
376 value.Set(_L("TRUE")); |
|
377 iFileDumper->WriteColumnValue(column, value); |
|
378 } |
|
379 else |
|
380 { |
|
381 value.Set(_L("FALSE")); |
|
382 iFileDumper->WriteColumnValue(column, value); |
|
383 } |
|
384 |
|
385 column.Set(_L("ReadOnly")); |
|
386 if(iRecordBase->IsSetAttribute(ECDNoWriteButDelete)) |
|
387 { |
|
388 value.Set(_L("TRUE")); |
|
389 iFileDumper->WriteColumnValue(column, value); |
|
390 } |
|
391 else |
|
392 { |
|
393 value.Set(_L("FALSE")); |
|
394 iFileDumper->WriteColumnValue(column, value); |
|
395 } |
|
396 |
|
397 /* TBuf<MAX_COL_LONG_VAL_LEN> buf; |
|
398 TPtrC column; |
|
399 buf= (_S("_TABLE[")); |
|
400 |
|
401 //boo iFileDumper->WriteTableHeader(aTempTable);// Write Table header in the output file |
|
402 |
|
403 //boo iFileDumper->WriteAttributeSectionHeader(); // Write Attribute section header : ADD_ATTRIBUTES |
|
404 |
|
405 // Get status of all the attributes for table |
|
406 |
|
407 if(iTable->IsSetAttribute(ECDHidden)) |
|
408 { |
|
409 iIsHiddenSet = ETrue; |
|
410 buf.Append((TPtrC)Hidden); |
|
411 buf.Append(Comma); |
|
412 } |
|
413 |
|
414 if(iTable->IsSetAttribute(ECDPrivate)) |
|
415 { |
|
416 iIsPrivateSet = ETrue; |
|
417 buf.Append((TPtrC)Private); |
|
418 buf.Append(Comma); |
|
419 } |
|
420 |
|
421 if(iTable->IsSetAttribute(ECDNoWriteButDelete)) |
|
422 { |
|
423 iIsProtectedReadSet = ETrue; |
|
424 buf.Append((TPtrC)ProtectedRead); |
|
425 buf.Append(Comma); |
|
426 } |
|
427 |
|
428 if(iTable->IsSetAttribute(ECDProtectedWrite)) |
|
429 { |
|
430 iIsProtectedWriteSet = ETrue; |
|
431 buf.Append((TPtrC)ProtectedWrite); |
|
432 buf.Append(Comma); |
|
433 } |
|
434 |
|
435 |
|
436 buf.Append(_L("]")); |
|
437 column.Set(buf); |
|
438 |
|
439 iFileDumper->WriteAttributes(column);// Finally logs the table attributes |
|
440 |
|
441 iFileDumper->WriteSectionFooter(1);// Log the section footer : ADD_END |
|
442 */ |
|
443 } |
|
444 |
|
445 |
|
446 |
|
447 void CCedDumper::WriteTemplateAndRecordsL() |
|
448 { |
|
449 TInt numSections; |
|
450 TBuf<MAX_COL_LONG_VAL_LEN> buf; |
|
451 TPtrC column; |
|
452 TInt i = 0; |
|
453 TBuf<MAX_COL_NAME_LEN> tempColumn; |
|
454 tempColumn = gAtttibutesArray[i]; |
|
455 |
|
456 numSections=iTable->iRecords.Count(); /* No Of Sections within a single Record */ |
|
457 |
|
458 /* Loops through all the recorsd within a particular record type */ |
|
459 for(TInt iRecord = 0; iRecord < numSections; iRecord++ ) |
|
460 { |
|
461 #ifndef __TOOLS2__ |
|
462 TInt boo = iTable->iRecords[iRecord]->RecordId(); |
|
463 #endif |
|
464 iTable->iRecords[iRecord]->Attributes(); |
|
465 |
|
466 |
|
467 if (!iROHIDSupport) |
|
468 { |
|
469 if( (iTable->iRecords[iRecord]->RecordId() != 0) && |
|
470 ((iTable->iRecords[iRecord]->Attributes() & ECDHidden) == ECDHidden) ) |
|
471 { |
|
472 continue; |
|
473 } |
|
474 } |
|
475 |
|
476 |
|
477 iFileDumper->WriteSectionHeader(iTable->iRecords[iRecord]->RecordId()); |
|
478 |
|
479 /* if (iTable->iRecords[iRecord]->RecordId() == 0) // The record with the zeroth id is template Record |
|
480 { |
|
481 buf= (_S("_TEMPLATE[")); |
|
482 } |
|
483 else // for all other records |
|
484 { |
|
485 buf= (_S("_RECORD[")); |
|
486 } |
|
487 */ |
|
488 iRecordBase = iTable->iRecords[iRecord]; |
|
489 /* |
|
490 // Get status of all the attributes of a record/template |
|
491 if(iRecordBase->IsSetAttribute(ECDHidden) && !(iIsHiddenSet)) |
|
492 { |
|
493 iIsHiddenSet = ETrue; |
|
494 buf.Append((TPtrC)Hidden); |
|
495 buf.Append(Comma); |
|
496 } |
|
497 |
|
498 if(iRecordBase->IsSetAttribute(ECDPrivate) && !(iIsPrivateSet)) |
|
499 { |
|
500 iIsHiddenSet = ETrue; |
|
501 buf.Append((TPtrC)Private); |
|
502 buf.Append(Comma); |
|
503 } |
|
504 |
|
505 if(iRecordBase->IsSetAttribute(ECDNoWriteButDelete) && !(iIsProtectedReadSet)) |
|
506 { |
|
507 iIsProtectedReadSet = ETrue; |
|
508 buf.Append((TPtrC)ProtectedRead); |
|
509 buf.Append(Comma); |
|
510 } |
|
511 |
|
512 if(iRecordBase->IsSetAttribute(ECDProtectedWrite) && !(iIsProtectedWriteSet)) |
|
513 { |
|
514 iIsProtectedWriteSet = ETrue; |
|
515 buf.Append((TPtrC)ProtectedWrite); |
|
516 buf.Append(Comma); |
|
517 } |
|
518 |
|
519 buf.Append(_L("]")); |
|
520 column.Set(buf); |
|
521 |
|
522 iFileDumper->WriteAttributes(column); */ |
|
523 |
|
524 if (0 == iTable->iRecords[iRecord]->RecordId()) |
|
525 { |
|
526 /* There is a template record in the table. Let's have a pointer to it and if some other |
|
527 * fields in another record in the table contains the very same information ceddump won't |
|
528 * print it - as it's already in the template record. |
|
529 */ |
|
530 iTemplateRecordBase = iTable->iRecords[iRecord]; |
|
531 } |
|
532 |
|
533 GetColumnAttributeAndValuesL(iRecord);/* Get all the column names with their attributes and values */ |
|
534 |
|
535 iFileDumper->WriteSectionFooter(iTable->iRecords[iRecord]->RecordId()); |
|
536 |
|
537 }/* End of for Loop -- Looping through all records */ |
|
538 |
|
539 } |
|
540 |
|
541 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
542 |
|
543 TPtrC FieldAnalyzer(const TPtrC& aFieldName) |
|
544 { |
|
545 const TUint KFieldNameSeperator = '#'; |
|
546 TInt pos = aFieldName.Locate(TChar(KFieldNameSeperator)); |
|
547 |
|
548 if (pos != KErrNotFound) |
|
549 { |
|
550 return (aFieldName.Left(pos)); |
|
551 } |
|
552 |
|
553 return aFieldName; |
|
554 } |
|
555 |
|
556 #endif //SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
557 |
|
558 |
|
559 /* |
|
560 * This function is for resolving the inconsistent table names in CommsDat and CommDB - unfortunatly CED and CEDDUMP is using |
|
561 * the CommDB variant. :((((( |
|
562 * Please note: As long as the naming for the new follows the rule, which is to have the same name in the CommsDat and CommDB components, |
|
563 * this function doesn't need to be modified. |
|
564 */ |
|
565 void CCedDumper::ResolveCommsDatTableNameVariant_to_CommdbTableNameVariant(RBuf& aCommsdatTableName) |
|
566 { |
|
567 if (TPtrC(KCDTypeNameWLANServiceExt) == aCommsdatTableName) /*name from commsdat*/ |
|
568 { |
|
569 aCommsdatTableName.ReAllocL(TPtrC(WLAN_SERVICE_EXTENSIONS).Length()); |
|
570 aCommsdatTableName = WLAN_SERVICE_EXTENSIONS; /*name from commdb*/ |
|
571 } |
|
572 else if (TPtrC(KCDTypeNameAccessPoint) == aCommsdatTableName) /*name from commsdat*/ |
|
573 { |
|
574 aCommsdatTableName.ReAllocL(TPtrC(ACCESS_POINT_TABLE).Length()); |
|
575 aCommsdatTableName = ACCESS_POINT_TABLE; /*name from commdb*/ |
|
576 } |
|
577 else if (TPtrC(KCDTypeNameIapPrioritySelectionPolicy) == aCommsdatTableName) /*name from commsdat*/ |
|
578 { |
|
579 aCommsdatTableName.ReAllocL(TPtrC(IAP_PRIORITY_SELECTION_POLICY_TABLE).Length()); |
|
580 aCommsdatTableName = IAP_PRIORITY_SELECTION_POLICY_TABLE; /*name from commdb*/ |
|
581 } |
|
582 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
583 else if (TPtrC(KCDTypeNameApPrioritySelectionPolicy) == aCommsdatTableName)/*name from commsdat*/ |
|
584 { |
|
585 aCommsdatTableName.ReAllocL(TPtrC(AP_PRIORITY_SELECTION_POLICY_TABLE).Length()); |
|
586 aCommsdatTableName = AP_PRIORITY_SELECTION_POLICY_TABLE; /*name from commdb*/ |
|
587 } |
|
588 else if (TPtrC(KCDTypeNameTierRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
589 { |
|
590 aCommsdatTableName.ReAllocL(TPtrC(TIER_TABLE).Length()); |
|
591 aCommsdatTableName = TIER_TABLE; /*name from commdb*/ |
|
592 } |
|
593 else if (TPtrC(KCDTypeNameMCprRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
594 { |
|
595 aCommsdatTableName.ReAllocL(TPtrC(MCPR_TABLE).Length()); |
|
596 aCommsdatTableName = MCPR_TABLE; /*name from commdb*/ |
|
597 } |
|
598 else if (TPtrC(KCDTypeNameCprRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
599 { |
|
600 aCommsdatTableName.ReAllocL(TPtrC(CPR_TABLE).Length()); |
|
601 aCommsdatTableName = CPR_TABLE; /*name from commdb*/ |
|
602 } |
|
603 else if (TPtrC(KCDTypeNameSCprRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
604 { |
|
605 aCommsdatTableName.ReAllocL(TPtrC(SCPR_TABLE).Length()); |
|
606 aCommsdatTableName = SCPR_TABLE; /*name from commdb*/ |
|
607 } |
|
608 else if (TPtrC(KCDTypeNameProtocolRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
609 { |
|
610 aCommsdatTableName.ReAllocL(TPtrC(PROTOCOL_TABLE).Length()); |
|
611 aCommsdatTableName = PROTOCOL_TABLE; /*name from commdb*/ |
|
612 } |
|
613 else if (TPtrC(KCDTypeNameConfigAccessPointRecord) == aCommsdatTableName) /*name from commsdat*/ |
|
614 { |
|
615 aCommsdatTableName.ReAllocL(TPtrC(CONFIG_ACCESS_POINT_TABLE).Length()); |
|
616 aCommsdatTableName = CONFIG_ACCESS_POINT_TABLE; /*name from commdb*/ |
|
617 } |
|
618 #endif |
|
619 else if (TPtrC(KCDTypeNameEapSimProtocol) == aCommsdatTableName) /*name from commsdat*/ |
|
620 { |
|
621 aCommsdatTableName.ReAllocL(TPtrC(EAPSIM_PROTOCOL_TABLE).Length()); |
|
622 aCommsdatTableName = EAPSIM_PROTOCOL_TABLE; /*name from commdb*/ |
|
623 } |
|
624 else if (TPtrC(KCDTypeNameEapAkaProtocol) == aCommsdatTableName) /*name from commsdat*/ |
|
625 { |
|
626 aCommsdatTableName.ReAllocL(TPtrC(EAPAKA_PROTOCOL_TABLE).Length()); |
|
627 aCommsdatTableName = EAPAKA_PROTOCOL_TABLE; /*name from commdb*/ |
|
628 } |
|
629 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
630 else if (TPtrC(KCDTTypeNamePolicySelector2Params) == aCommsdatTableName) /*name from commsdat*/ |
|
631 { |
|
632 aCommsdatTableName.ReAllocL(TPtrC(POLICYSELECTOR2QOSPARAMETERS_TABLE).Length()); |
|
633 aCommsdatTableName = POLICYSELECTOR2QOSPARAMETERS_TABLE; /*name from commdb*/ |
|
634 } |
|
635 else if (TPtrC(KCDTTypeNameGenericQoSParams) == aCommsdatTableName) /*name from commsdat*/ |
|
636 { |
|
637 aCommsdatTableName.ReAllocL(TPtrC(GENERIC_QOS_TABLE).Length()); |
|
638 aCommsdatTableName = GENERIC_QOS_TABLE; /*name from commdb*/ |
|
639 } |
|
640 #endif |
|
641 } |
|
642 |
|
643 |
|
644 |
|
645 /* |
|
646 To get the column values and their attributes. |
|
647 Looping through the record for all the columns |
|
648 */ |
|
649 void CCedDumper::GetColumnAttributeAndValuesL(TInt aRecordId) |
|
650 { |
|
651 TBuf<MAX_COL_LONG_VAL_LEN> buf; /* This holds Column name and its attributes */ |
|
652 TPtrC setting; /* Pointer for column value */ |
|
653 TPtrC column; /* Pointer for column name and attributes */ |
|
654 |
|
655 const SRecordTypeInfo* recordInfo = 0; |
|
656 recordInfo = iRecordBase->GetRecordInfo(); |
|
657 TInt fieldCount=0; // Counts number of fields so we can print FIELD_COUNT later |
|
658 |
|
659 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
660 CR99QoSConversion::TConvRecordType ret; |
|
661 #endif |
|
662 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
663 |
|
664 /* Loop through all the columns of the record */ |
|
665 while(recordInfo->iTypeId != 0) |
|
666 { |
|
667 /* Get Column */ |
|
668 TInt tempType(0); |
|
669 |
|
670 CMDBElement* iDBField=iRecordBase->GetFieldByNameL(recordInfo->iTypeName,tempType); |
|
671 |
|
672 CMDBElement* templateField = NULL; |
|
673 |
|
674 if (iTemplateRecordBase) |
|
675 { |
|
676 templateField = iTemplateRecordBase->GetFieldByNameL(recordInfo->iTypeName,tempType); |
|
677 } |
|
678 |
|
679 /* Get name of the field into buffer */ |
|
680 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
681 buf = FieldAnalyzer(recordInfo->iTypeName); |
|
682 #else |
|
683 buf = recordInfo->iTypeName; |
|
684 #endif //SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
685 |
|
686 if(!(iDBField->IsNull())) |
|
687 { |
|
688 if ((aRecordId > 0) && templateField && !(templateField->IsNull())) |
|
689 { |
|
690 if (IsFieldValuesTheSame(iDBField, templateField, |
|
691 (recordInfo->iValType & KCDShowBasicTypeInfo))) |
|
692 { |
|
693 recordInfo++; |
|
694 continue; |
|
695 } |
|
696 } |
|
697 |
|
698 /* |
|
699 Get the column value |
|
700 */ |
|
701 switch(recordInfo->iValType & KCDShowBasicTypeInfo) |
|
702 { |
|
703 case EText: |
|
704 case ELongText : |
|
705 case EMedText : |
|
706 globalValueBuffer = *(static_cast<CMDBField<TDesC>*>(iDBField)); |
|
707 break; |
|
708 |
|
709 case EDesC8: |
|
710 globalValueBuffer.Copy((*(static_cast<CMDBField<TDesC8>*>(iDBField)))); |
|
711 break; |
|
712 |
|
713 case EBool: |
|
714 if(*(static_cast<CMDBField<TBool>*>(iDBField))) |
|
715 { |
|
716 globalValueBuffer = TRUE_VAL; |
|
717 } |
|
718 else |
|
719 { |
|
720 globalValueBuffer = FALSE_VAL; |
|
721 } |
|
722 break; |
|
723 |
|
724 case EInt: |
|
725 { |
|
726 // UIDs have all been declared as 'TInts' for some reason... |
|
727 |
|
728 TInt pos = buf.Find(KUidMarker); |
|
729 const TInt KUidMarkerLength = 3; |
|
730 TBool isUid = (pos > 0 && pos == (buf.Length() - KUidMarkerLength)); |
|
731 |
|
732 if (iUseHexFormat && isUid) |
|
733 { |
|
734 globalValueBuffer = KHexMarker; |
|
735 globalValueBuffer.AppendNumFixedWidthUC(*(static_cast<CMDBField<TUint32>*>(iDBField)), EHex, 8); |
|
736 } |
|
737 else |
|
738 { |
|
739 globalValueBuffer.Num(*(static_cast<CMDBField<TInt>*>(iDBField))); |
|
740 } |
|
741 break; |
|
742 } |
|
743 case ELink: |
|
744 { |
|
745 TUint32 val = *(static_cast<CMDBField<TUint32>*>(iDBField)); |
|
746 |
|
747 if (val > KCDMaxRecords) |
|
748 { |
|
749 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
750 /*here try to load the TAG id of the linked record. If it's not successful the |
|
751 * tableID.recordid format should be used. |
|
752 */ |
|
753 |
|
754 //remove the '7F' from the 'column' part of the TMDBElementId |
|
755 TInt cleanId = ((val & KCDMaskShowRecordType) | (val & KCDMaskShowRecordId)); |
|
756 |
|
757 CMDBField<TUint>* tagIdOfLinkedRecord = new(ELeave) CMDBField<TUint>(cleanId | KCDTIdRecordTag); |
|
758 CleanupStack::PushL(tagIdOfLinkedRecord); |
|
759 |
|
760 /* The TRAPD is needed here, as it's acceptable _NOT_ to have tag IDs in the records |
|
761 * although it's highly recommended to have one. |
|
762 */ |
|
763 |
|
764 TRAPD(err, tagIdOfLinkedRecord->LoadL(*iDbSession);); |
|
765 if (KErrNone == err) |
|
766 { |
|
767 //the LoadL was sucessful, so we have the tagID. Let's get the name of the linked table. |
|
768 globalValueBuffer = KLinkPrefix; |
|
769 |
|
770 const CommsDat::STableLookup* tableInfo = CommsDat::CommsDatSchemaV1_1::GetTableInfoL(tagIdOfLinkedRecord->ElementId()); |
|
771 |
|
772 RBuf tableName; |
|
773 tableName.CleanupClosePushL(); |
|
774 |
|
775 tableName.Create(TPtrC(tableInfo->iTableName)); |
|
776 |
|
777 ResolveCommsDatTableNameVariant_to_CommdbTableNameVariant(tableName); |
|
778 |
|
779 globalValueBuffer.Append(tableName); |
|
780 |
|
781 CleanupStack::PopAndDestroy(); //close the RBuf - tableName |
|
782 |
|
783 globalValueBuffer.Append(KLinkSeparator); |
|
784 |
|
785 globalValueBuffer.AppendNum(*tagIdOfLinkedRecord, EDecimal); |
|
786 } |
|
787 else |
|
788 { |
|
789 /* The TagId of the linked record cannot be found, so let's convert |
|
790 * the link value to the <tableName>.<recordId> format. |
|
791 */ |
|
792 const CommsDat::STableLookup* tableInfo = CommsDat::CommsDatSchemaV1_1::GetTableInfoL(val); |
|
793 |
|
794 RBuf tableName; |
|
795 tableName.CleanupClosePushL(); |
|
796 |
|
797 tableName.Create(TPtrC(tableInfo->iTableName)); |
|
798 |
|
799 ResolveCommsDatTableNameVariant_to_CommdbTableNameVariant(tableName); |
|
800 |
|
801 globalValueBuffer = tableName; |
|
802 |
|
803 CleanupStack::PopAndDestroy(); //close the RBuf - tableName |
|
804 |
|
805 globalValueBuffer.Append(KLinkSeparator); |
|
806 |
|
807 TInt recId = (val & KCDMaskShowRecordId) >> 8; |
|
808 globalValueBuffer.AppendNum(recId, EDecimal); |
|
809 } |
|
810 |
|
811 CleanupStack::PopAndDestroy(tagIdOfLinkedRecord); |
|
812 #endif |
|
813 } |
|
814 else |
|
815 { |
|
816 globalValueBuffer.Num(*(static_cast<CMDBField<TInt>*>(iDBField))); |
|
817 } |
|
818 break; |
|
819 } |
|
820 case EUint32: |
|
821 globalValueBuffer.Num(*(static_cast<CMDBField<TUint32>*>(iDBField))); |
|
822 break; |
|
823 default: |
|
824 break; |
|
825 }; |
|
826 |
|
827 setting.Set(globalValueBuffer); |
|
828 column.Set(buf); |
|
829 |
|
830 /*Convert Enums*/ |
|
831 ConvertEnums(column, setting); |
|
832 |
|
833 /* |
|
834 if ((recordInfo->iValType & KCDShowBasicTypeInfo) == ELink) |
|
835 { |
|
836 ConvertRecordLinks(column, setting, iDBField); |
|
837 //There are 3 fields currently where a format of TableName.RecordId has to be followed |
|
838 IsLinkedField(column, setting, *iDBField); |
|
839 } |
|
840 */ |
|
841 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
842 // The conversion engine will create the uni-direction list of converted tables. |
|
843 // The table is created in CheckAndPerformConvrsion() |
|
844 // All deprecated parameters from Ougoing and Incoming GPRS table are removed. |
|
845 // Additional parameter is added to Incoming and Outgoing GPRS tables to link them with particular R99 QoS Parameters Table |
|
846 |
|
847 // Verify if conversion of QoS Gprs parameters is needed |
|
848 if (iR99Conversion && |
|
849 ((iTable->TableId() == KCDTIdOutgoingGprsRecord) || (iTable->TableId() == KCDTIdIncomingGprsRecord))) |
|
850 { |
|
851 ret = CheckAndPerformConversion(column, setting); |
|
852 // Add the record to the output file only when it is not deprecated |
|
853 if (ret == CR99QoSConversion::EValidRecord) |
|
854 { |
|
855 // Add record to the output file |
|
856 if(iFileDumper->WriteColumnValue(column, setting)) |
|
857 { |
|
858 fieldCount++; |
|
859 } |
|
860 } |
|
861 else if (ret == CR99QoSConversion::EConvertionError) |
|
862 { |
|
863 //We failed to create R99QoSConversiaionObject. Throw an event. |
|
864 User::Leave(KErrNoMemory); |
|
865 } |
|
866 } |
|
867 else if (column.Compare(TPtrC(KCDTypeNameIapCountName)) == 0) |
|
868 { |
|
869 // We dont want to include IAPCOUNT at the cfg output file |
|
870 } |
|
871 else |
|
872 { |
|
873 if(iFileDumper->WriteColumnValue(column, setting)) |
|
874 { |
|
875 fieldCount++; |
|
876 } |
|
877 } |
|
878 } |
|
879 |
|
880 #else |
|
881 |
|
882 /* Finally write the contents to output file */ |
|
883 if(iFileDumper->WriteColumnValue(column, setting)) |
|
884 { |
|
885 fieldCount++; |
|
886 } |
|
887 } |
|
888 #endif |
|
889 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
890 |
|
891 /* Switch to Next column */ |
|
892 recordInfo++; |
|
893 } |
|
894 |
|
895 if (iROHIDSupport) |
|
896 { |
|
897 WriteTableAttributes(column); |
|
898 fieldCount = fieldCount +2; |
|
899 } |
|
900 |
|
901 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
902 if (iR99Conversion) |
|
903 { |
|
904 if (iR99ConversionRecordsCurrent && iR99ConversionRecordsCurrent->GetModificationFlag()) |
|
905 { |
|
906 //Finish with this table |
|
907 //This enforces to create new instance of CR99QoSConversion for next entry within incoming/outgoing GPRS table if needed |
|
908 |
|
909 // convert column and setting values |
|
910 buf.Num(iR99ConversionRecordsCurrent->GetId()); |
|
911 column.Set(TPtrC(QOS_UMTS_R99_AND_ON_TABLE)); |
|
912 setting.Set(buf); |
|
913 |
|
914 //write UmtsR99QoSAndOnTable entry to the incoming/outgoing GPRS table. |
|
915 if(iFileDumper->WriteColumnValue(column, setting)) |
|
916 { |
|
917 fieldCount++; |
|
918 } |
|
919 |
|
920 //all is done with this table - already linked to the list so it is safe to assign NULL to it |
|
921 iR99ConversionRecordsCurrent = NULL; |
|
922 } |
|
923 } |
|
924 #endif |
|
925 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
926 |
|
927 // Update the "FIELD_COUNT=n" metadata |
|
928 _LIT(KFieldCount, "FIELD_COUNT"); |
|
929 column.Set(KFieldCount); |
|
930 _LIT(KFieldCountNum, "%d"); |
|
931 buf.Format(KFieldCountNum, fieldCount); |
|
932 setting.Set(buf); |
|
933 iFileDumper->WriteColumnValue(column, setting); |
|
934 } |
|
935 |
|
936 TBool CCedDumper::IsFieldValuesTheSame(CMDBElement* aFirstField, CMDBElement* aSecondField, TInt aFieldTypeValue) |
|
937 { |
|
938 switch(aFieldTypeValue) |
|
939 { |
|
940 case EText: |
|
941 case ELongText : |
|
942 case EMedText : |
|
943 { |
|
944 TPtrC tmpFirst(*(static_cast<CMDBField<TDesC>*>(aFirstField))); |
|
945 TPtrC tmpSecond(*(static_cast<CMDBField<TDesC>*>(aSecondField))); |
|
946 |
|
947 if (tmpFirst == tmpSecond) |
|
948 { |
|
949 return ETrue; |
|
950 } |
|
951 break; |
|
952 } |
|
953 |
|
954 case EDesC8: |
|
955 { |
|
956 TPtrC8 tmpFirst(*(static_cast<CMDBField<TDesC8>*>(aFirstField))); |
|
957 TPtrC8 tmpSecond(*(static_cast<CMDBField<TDesC8>*>(aSecondField))); |
|
958 |
|
959 if (tmpFirst == tmpSecond) |
|
960 { |
|
961 return ETrue; |
|
962 } |
|
963 break; |
|
964 } |
|
965 default: |
|
966 //convert the value to an int |
|
967 { |
|
968 TInt tmpFirst(*(static_cast<CMDBField<TUint32>*>(aFirstField))); |
|
969 TInt tmpSecond(*(static_cast<CMDBField<TUint32>*>(aSecondField))); |
|
970 |
|
971 if (tmpFirst == tmpSecond) |
|
972 { |
|
973 return ETrue; |
|
974 } |
|
975 break; |
|
976 } |
|
977 } |
|
978 |
|
979 return EFalse; |
|
980 } |
|
981 |
|
982 /* |
|
983 This method sets the pointer to recordset type depending on record Id |
|
984 */ |
|
985 void CCedDumper::GetRecordTypeL(TMDBElementId aRecordElementId) |
|
986 { |
|
987 switch(aRecordElementId) |
|
988 { |
|
989 case KCDTIdConnectionPrefsRecord: |
|
990 { |
|
991 CMDBRecordSet<CCDConnectionPrefsRecord>* iConnectionPrefsTable = new(ELeave) CMDBRecordSet<CCDConnectionPrefsRecord>(KCDTIdConnectionPrefsRecord); |
|
992 iTable = static_cast<CMDBRecordSetBase*>(iConnectionPrefsTable); |
|
993 } |
|
994 break; |
|
995 |
|
996 case KCDTIdIAPRecord: |
|
997 { |
|
998 CMDBRecordSet<CCDIAPRecord>* iIAPTable = new (ELeave) CMDBRecordSet<CCDIAPRecord>(KCDTIdIAPRecord); |
|
999 iTable = static_cast<CMDBRecordSetBase*>(iIAPTable); |
|
1000 } |
|
1001 break; |
|
1002 |
|
1003 case KCDTIdGlobalSettingsRecord: |
|
1004 { |
|
1005 CMDBRecordSet<CCDGlobalSettingsRecord>* iGlobalSettingsTable = new(ELeave) CMDBRecordSet<CCDGlobalSettingsRecord>(KCDTIdGlobalSettingsRecord); |
|
1006 iTable = static_cast<CMDBRecordSetBase*>(iGlobalSettingsTable); |
|
1007 } |
|
1008 break; |
|
1009 |
|
1010 case KCDTIdNetworkRecord: |
|
1011 { |
|
1012 CMDBRecordSet<CCDNetworkRecord>* iNetworkTable = new(ELeave) CMDBRecordSet<CCDNetworkRecord>(KCDTIdNetworkRecord); |
|
1013 iTable = static_cast<CMDBRecordSetBase*>(iNetworkTable); |
|
1014 } |
|
1015 break; |
|
1016 |
|
1017 case KCDTIdLocationRecord: |
|
1018 { |
|
1019 CMDBRecordSet<CCDLocationRecord>* iLocationTable = new(ELeave) CMDBRecordSet<CCDLocationRecord>(KCDTIdLocationRecord); |
|
1020 iTable = static_cast<CMDBRecordSetBase*>(iLocationTable); |
|
1021 } |
|
1022 break; |
|
1023 |
|
1024 case KCDTIdWAPAccessPointRecord: |
|
1025 { |
|
1026 CMDBRecordSet<CCDWAPAccessPointRecord>* iWAPAccessPointTable = new(ELeave) CMDBRecordSet<CCDWAPAccessPointRecord>(KCDTIdWAPAccessPointRecord); |
|
1027 iTable = static_cast<CMDBRecordSetBase*>(iWAPAccessPointTable); |
|
1028 } |
|
1029 break; |
|
1030 |
|
1031 case KCDTIdDialOutISPRecord: |
|
1032 { |
|
1033 CMDBRecordSet<CCDDialOutISPRecord>* iDialOutISPTable = new(ELeave) CMDBRecordSet<CCDDialOutISPRecord>(KCDTIdDialOutISPRecord); |
|
1034 iTable = static_cast<CMDBRecordSetBase*>(iDialOutISPTable); |
|
1035 } |
|
1036 break; |
|
1037 |
|
1038 case KCDTIdDialInISPRecord: |
|
1039 { |
|
1040 CMDBRecordSet<CCDDialInISPRecord>* iDialInISPTable = new(ELeave) CMDBRecordSet<CCDDialInISPRecord>(KCDTIdDialInISPRecord); |
|
1041 iTable = static_cast<CMDBRecordSetBase*>(iDialInISPTable); |
|
1042 } |
|
1043 break; |
|
1044 |
|
1045 case KCDTIdLANServiceRecord: |
|
1046 { |
|
1047 CMDBRecordSet<CCDLANServiceRecord>* iLANServiceTable = new(ELeave) CMDBRecordSet<CCDLANServiceRecord>(KCDTIdLANServiceRecord); |
|
1048 iTable = static_cast<CMDBRecordSetBase*>(iLANServiceTable); |
|
1049 } |
|
1050 break; |
|
1051 |
|
1052 case KCDTIdWLANServiceExtRecord: |
|
1053 { |
|
1054 CMDBRecordSet<CCDWLANServiceExtRecord>* iWLANServiceExtTable = new(ELeave) CMDBRecordSet<CCDWLANServiceExtRecord>(KCDTIdWLANServiceExtRecord); |
|
1055 iTable = static_cast<CMDBRecordSetBase*>(iWLANServiceExtTable); |
|
1056 } |
|
1057 break; |
|
1058 |
|
1059 case KCDTIdPANServiceExtRecord: |
|
1060 { |
|
1061 CMDBRecordSet<CCDPANServiceExtRecord>* iPANServiceExtTable = new(ELeave) CMDBRecordSet<CCDPANServiceExtRecord>(KCDTIdPANServiceExtRecord); |
|
1062 iTable = static_cast<CMDBRecordSetBase*>(iPANServiceExtTable); |
|
1063 } |
|
1064 break; |
|
1065 |
|
1066 case KCDTIdVPNServiceRecord: |
|
1067 { |
|
1068 CMDBRecordSet<CCDVPNServiceRecord>* iVPNServiceTable = new(ELeave) CMDBRecordSet<CCDVPNServiceRecord>(KCDTIdVPNServiceRecord); |
|
1069 iTable = static_cast<CMDBRecordSetBase*>(iVPNServiceTable); |
|
1070 } |
|
1071 break; |
|
1072 |
|
1073 // case KCDTIdOutgoingWCDMARecord: |
|
1074 // { |
|
1075 // CMDBRecordSet<CCDOutgoingWCDMARecord>* iOutgoingWCDMATable = new(ELeave) CMDBRecordSet<CCDOutgoingWCDMARecord>(); |
|
1076 // iTable = (CMDBRecordSetBase*)iOutgoingWCDMATable; |
|
1077 // } |
|
1078 // break; |
|
1079 |
|
1080 // case KCDTIdIncomingWCDMARecord: |
|
1081 // { |
|
1082 // CMDBRecordSet<CCDIncomingWCDMARecord>* iIncomingWCDMATable = new(ELeave) CMDBRecordSet<CCDIncomingWCDMARecord>(); |
|
1083 // iTable = (CMDBRecordSetBase*)iIncomingWCDMATable; |
|
1084 // } |
|
1085 // break; |
|
1086 |
|
1087 |
|
1088 case KCDTIdWCDMAPacketServiceRecord: |
|
1089 { |
|
1090 CMDBRecordSet<CCDWCDMAPacketServiceRecord>* iWCDMAPacketServiceTable = new(ELeave) CMDBRecordSet<CCDWCDMAPacketServiceRecord>(KCDTIdWCDMAPacketServiceRecord); |
|
1091 iTable = static_cast<CMDBRecordSetBase*>(iWCDMAPacketServiceTable); |
|
1092 } |
|
1093 break; |
|
1094 |
|
1095 case KCDTIdOutgoingGprsRecord: |
|
1096 { |
|
1097 CMDBRecordSet<CCDOutgoingGprsRecord>* iOutgoingGprsTable = new(ELeave) CMDBRecordSet<CCDOutgoingGprsRecord>(KCDTIdOutgoingGprsRecord); |
|
1098 iTable = static_cast<CMDBRecordSetBase*>(iOutgoingGprsTable); |
|
1099 } |
|
1100 break; |
|
1101 |
|
1102 case KCDTIdIncomingGprsRecord: |
|
1103 { |
|
1104 CMDBRecordSet<CCDIncomingGprsRecord>* iIncomingGprsTable = new(ELeave) CMDBRecordSet<CCDIncomingGprsRecord>(KCDTIdIncomingGprsRecord); |
|
1105 iTable = static_cast<CMDBRecordSetBase*>(iIncomingGprsTable); |
|
1106 } |
|
1107 break; |
|
1108 |
|
1109 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
1110 case KCDTIdUmtsR99QoSAndOnTableRecord: |
|
1111 { |
|
1112 CMDBRecordSet<CCDUmtsR99QoSAndOnTableRecord>* iGprsQoSR99Param = new (ELeave) CMDBRecordSet<CCDUmtsR99QoSAndOnTableRecord>(KCDTIdUmtsR99QoSAndOnTableRecord); |
|
1113 iTable = static_cast<CMDBRecordSetBase*> (iGprsQoSR99Param); |
|
1114 break; |
|
1115 } |
|
1116 #endif |
|
1117 // SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
1118 |
|
1119 case KCDTIdDefaultWCDMARecord: |
|
1120 { |
|
1121 CMDBRecordSet<CCDDefaultWCDMARecord>* iDefaultWCDMATable = new(ELeave) CMDBRecordSet<CCDDefaultWCDMARecord>(KCDTIdDefaultWCDMARecord); |
|
1122 iTable = static_cast<CMDBRecordSetBase*>(iDefaultWCDMATable); |
|
1123 } |
|
1124 break; |
|
1125 |
|
1126 |
|
1127 case KCDTIdModemBearerRecord: |
|
1128 { |
|
1129 CMDBRecordSet<CCDModemBearerRecord>* iModemBearerTable = new(ELeave) CMDBRecordSet<CCDModemBearerRecord>(KCDTIdModemBearerRecord); |
|
1130 iTable = static_cast<CMDBRecordSetBase*>(iModemBearerTable); |
|
1131 } |
|
1132 break; |
|
1133 |
|
1134 case KCDTIdLANBearerRecord: |
|
1135 { |
|
1136 CMDBRecordSet<CCDLANBearerRecord>* iLANBearerTable = new(ELeave) CMDBRecordSet<CCDLANBearerRecord>(KCDTIdLANBearerRecord); |
|
1137 iTable = static_cast<CMDBRecordSetBase*>(iLANBearerTable); |
|
1138 } |
|
1139 break; |
|
1140 |
|
1141 case KCDTIdVirtualBearerRecord: |
|
1142 { |
|
1143 CMDBRecordSet<CCDVirtualBearerRecord>* iVirtualBearerTable = new(ELeave) CMDBRecordSet<CCDVirtualBearerRecord>(KCDTIdVirtualBearerRecord); |
|
1144 iTable = static_cast<CMDBRecordSetBase*>(iVirtualBearerTable ); |
|
1145 } |
|
1146 break; |
|
1147 |
|
1148 case KCDTIdWAPSMSBearerRecord: |
|
1149 { |
|
1150 CMDBRecordSet<CCDWAPSMSBearerRecord>* iWAPSMSBearerTable = new(ELeave) CMDBRecordSet<CCDWAPSMSBearerRecord>(KCDTIdWAPSMSBearerRecord); |
|
1151 iTable = static_cast<CMDBRecordSetBase*>(iWAPSMSBearerTable); |
|
1152 } |
|
1153 break; |
|
1154 |
|
1155 case KCDTIdWAPIPBearerRecord: |
|
1156 { |
|
1157 CMDBRecordSet<CCDWAPIPBearerRecord>* iWAPIPBearerTable = new(ELeave) CMDBRecordSet<CCDWAPIPBearerRecord>(KCDTIdWAPIPBearerRecord); |
|
1158 iTable = static_cast<CMDBRecordSetBase*>(iWAPIPBearerTable); |
|
1159 } |
|
1160 break; |
|
1161 |
|
1162 case KCDTIdChargecardRecord: |
|
1163 { |
|
1164 CMDBRecordSet<CCDChargecardRecord>* iChargecardTable = new(ELeave) CMDBRecordSet<CCDChargecardRecord>(KCDTIdChargecardRecord); |
|
1165 iTable = static_cast<CMDBRecordSetBase*>(iChargecardTable); |
|
1166 } |
|
1167 break; |
|
1168 |
|
1169 case KCDTIdProxiesRecord: |
|
1170 { |
|
1171 CMDBRecordSet<CCDProxiesRecord>* iProxiesTable = new(ELeave) CMDBRecordSet<CCDProxiesRecord>(KCDTIdProxiesRecord); |
|
1172 iTable = static_cast<CMDBRecordSetBase*>(iProxiesTable); |
|
1173 } |
|
1174 break; |
|
1175 |
|
1176 case KCDTIdSSProtoRecord: |
|
1177 { |
|
1178 CMDBRecordSet<CCDSecureSocketRecord>* iSecureSocketTable = new(ELeave) CMDBRecordSet<CCDSecureSocketRecord>(KCDTIdSSProtoRecord); |
|
1179 iTable = static_cast<CMDBRecordSetBase*>(iSecureSocketTable); |
|
1180 } |
|
1181 break; |
|
1182 |
|
1183 case KCDTIdAgentLookupRecord: |
|
1184 { |
|
1185 CMDBRecordSet<CCDAgentLookupRecord>* iAgentLookupTable = new(ELeave) CMDBRecordSet<CCDAgentLookupRecord>(KCDTIdAgentLookupRecord); |
|
1186 iTable = static_cast<CMDBRecordSetBase*>(iAgentLookupTable); |
|
1187 } |
|
1188 break; |
|
1189 case KCDTIdAccessPointRecord: |
|
1190 { |
|
1191 CMDBRecordSet<CCDAccessPointRecord>* table = new(ELeave) CMDBRecordSet<CCDAccessPointRecord>(KCDTIdAccessPointRecord); |
|
1192 iTable = static_cast<CMDBRecordSetBase*>(table); |
|
1193 } |
|
1194 break; |
|
1195 case KCDTIdIapPrioritySelectionPolicyRecord: |
|
1196 { |
|
1197 CMDBRecordSet<CCDIAPPrioritySelectionPolicyRecord>* table = new(ELeave) CMDBRecordSet<CCDIAPPrioritySelectionPolicyRecord>(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1198 iTable = static_cast<CMDBRecordSetBase*>(table); |
|
1199 } |
|
1200 break; |
|
1201 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1202 case KCDTIdConfigAccessPointRecord: |
|
1203 { |
|
1204 CMDBRecordSet<CCDConfigAccessPointRecord>* table = new(ELeave) CMDBRecordSet<CCDConfigAccessPointRecord>(KCDTIdConfigAccessPointRecord); |
|
1205 iTable = static_cast<CMDBRecordSetBase*>(table); |
|
1206 } |
|
1207 break; |
|
1208 case KCDTIdApPrioritySelectionPolicyRecord: |
|
1209 { |
|
1210 CMDBRecordSet<CCDAPPrioritySelectionPolicyRecord>* table = new(ELeave) CMDBRecordSet<CCDAPPrioritySelectionPolicyRecord>(KCDTIdApPrioritySelectionPolicyRecord); |
|
1211 iTable = static_cast<CMDBRecordSetBase*>(table); |
|
1212 } |
|
1213 break; |
|
1214 case KCDTIdTierRecord: |
|
1215 { |
|
1216 CMDBRecordSet<CCDTierRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDTierRecord>(KCDTIdTierRecord); |
|
1217 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1218 } |
|
1219 break; |
|
1220 case KCDTIdMCprRecord: |
|
1221 { |
|
1222 CMDBRecordSet<CCDMCprRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDMCprRecord>(KCDTIdMCprRecord); |
|
1223 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1224 } |
|
1225 break; |
|
1226 case KCDTIdCprRecord: |
|
1227 { |
|
1228 CMDBRecordSet<CCDCprRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDCprRecord>(KCDTIdCprRecord); |
|
1229 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1230 } |
|
1231 break; |
|
1232 case KCDTIdSCprRecord: |
|
1233 { |
|
1234 CMDBRecordSet<CCDSCprRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDSCprRecord>(KCDTIdSCprRecord); |
|
1235 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1236 } |
|
1237 break; |
|
1238 case KCDTIdProtocolRecord: |
|
1239 { |
|
1240 CMDBRecordSet<CCDProtocolRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDProtocolRecord>(KCDTIdProtocolRecord); |
|
1241 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1242 } |
|
1243 break; |
|
1244 case KCDTIdBearerTypeRecord: |
|
1245 { |
|
1246 CMDBRecordSet<CCDBearerTypeRecord>* ptrRecordSet = new (ELeave)CMDBRecordSet<CCDBearerTypeRecord>(KCDTIdBearerTypeRecord); |
|
1247 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1248 } |
|
1249 break; |
|
1250 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1251 case KCDTIdEAPSecRecord: |
|
1252 { |
|
1253 CMDBRecordSet<CCDEAPSecRecord>* iEAPSecTable = new(ELeave) CMDBRecordSet<CCDEAPSecRecord>(KCDTIdEAPSecRecord); |
|
1254 iTable = static_cast<CMDBRecordSetBase*>(iEAPSecTable); |
|
1255 } |
|
1256 break; |
|
1257 case KCDTIdTunEAPRecord: |
|
1258 { |
|
1259 CMDBRecordSet<CCDTunEAPRecord>* iTunEAPTable = new(ELeave) CMDBRecordSet<CCDTunEAPRecord>(KCDTIdTunEAPRecord); |
|
1260 iTable = static_cast<CMDBRecordSetBase*>(iTunEAPTable); |
|
1261 } |
|
1262 break; |
|
1263 case KCDTIdEAPTLSRecord: |
|
1264 { |
|
1265 CMDBRecordSet<CCDEAPTLSRecord>* iEAPTLSTable = new(ELeave) CMDBRecordSet<CCDEAPTLSRecord>(KCDTIdEAPTLSRecord); |
|
1266 iTable = static_cast<CMDBRecordSetBase*>(iEAPTLSTable); |
|
1267 } |
|
1268 break; |
|
1269 case KCDTIdLEAPRecord: |
|
1270 { |
|
1271 CMDBRecordSet<CCDLEAPRecord>* iLEAPTable = new(ELeave) CMDBRecordSet<CCDLEAPRecord>(KCDTIdLEAPRecord); |
|
1272 iTable = static_cast<CMDBRecordSetBase*>(iLEAPTable); |
|
1273 } |
|
1274 break; |
|
1275 case KCDTIdEapSimProtocolRecord: |
|
1276 { |
|
1277 CMDBRecordSet<CCDEapSimProtocolRecord>* ptrRecordSet = |
|
1278 new(ELeave) CMDBRecordSet<CCDEapSimProtocolRecord>(KCDTIdEapSimProtocolRecord); |
|
1279 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1280 } |
|
1281 break; |
|
1282 case KCDTIdEapAkaProtocolRecord: |
|
1283 { |
|
1284 CMDBRecordSet<CCDEapAkaProtocolRecord>* ptrRecordSet = |
|
1285 new(ELeave) CMDBRecordSet<CCDEapAkaProtocolRecord>(KCDTIdEapAkaProtocolRecord); |
|
1286 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1287 } |
|
1288 break; |
|
1289 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1290 case KCDTIdPolicySelectorRecord: |
|
1291 { |
|
1292 CMDBRecordSet<CCDPolicySelectorRecord>* ptrRecordSet = |
|
1293 new(ELeave) CMDBRecordSet<CCDPolicySelectorRecord>(KCDTIdPolicySelectorRecord); |
|
1294 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1295 } |
|
1296 break; |
|
1297 |
|
1298 case KCDTIdPolicySelector2ParamsRecord: |
|
1299 { |
|
1300 CMDBRecordSet<CCDPolicySelector2ParamsRecord>* ptrRecordSet = |
|
1301 new(ELeave) CMDBRecordSet<CCDPolicySelector2ParamsRecord>(KCDTIdPolicySelector2ParamsRecord); |
|
1302 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1303 } |
|
1304 break; |
|
1305 case KCDTIdGenericQosRecord: |
|
1306 { |
|
1307 CMDBRecordSet<CCDGenericQosRecord>* ptrRecordSet = |
|
1308 new(ELeave) CMDBRecordSet<CCDGenericQosRecord>(KCDTIdGenericQosRecord); |
|
1309 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1310 } |
|
1311 break; |
|
1312 case KCDTIdWifiScanEngineRecord: |
|
1313 { |
|
1314 CMDBRecordSet<CCDWifiScanEngineRecord>* ptrRecordSet = |
|
1315 new(ELeave) CMDBRecordSet<CCDWifiScanEngineRecord>(KCDTIdWifiScanEngineRecord); |
|
1316 iTable = (CMDBRecordSetBase*)ptrRecordSet; |
|
1317 } |
|
1318 break; |
|
1319 #endif //SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1320 default: |
|
1321 { |
|
1322 User::Leave(KErrNotSupported); |
|
1323 } |
|
1324 break; |
|
1325 }; |
|
1326 } |
|
1327 |
|
1328 void CCedDumper::ResetAllAttrubuteFlags() |
|
1329 { |
|
1330 iIsHiddenSet = EFalse; |
|
1331 iIsPrivateSet = EFalse; |
|
1332 iIsProtectedReadSet = EFalse; |
|
1333 iIsProtectedWriteSet = EFalse; |
|
1334 } |
|
1335 |
|
1336 |
|
1337 // REWORK - LINK TRANSLATION NEEDS REWORKING. |
|
1338 |
|
1339 TBool CCedDumper::IsLinkedField(TPtrC& aColumn, TPtrC& aSetting, CMDBElement& /*aField*/) |
|
1340 { |
|
1341 if ((aColumn.Compare(TPtrC(KCDTypeNameSelectionPolicy)) == 0) |
|
1342 || (aColumn.Compare(TPtrC(KCDTypeNameWLANSecData)) == 0) |
|
1343 || (aColumn.Compare(TPtrC(KCDTypeNameEAPSecData)) == 0) |
|
1344 || (aColumn.Compare(TPtrC(KCDTypeNameTUNEAPData)) == 0) |
|
1345 ) |
|
1346 { |
|
1347 TLex lex(aSetting); |
|
1348 TUint32 elementid; |
|
1349 lex.Val(elementid,EDecimal); |
|
1350 |
|
1351 TMDBElementId tableId = elementid & KCDMaskShowRecordType; |
|
1352 TInt recordId = (elementid & KCDMaskShowRecordId) >> 8; |
|
1353 |
|
1354 if (tableId > 0 ) // because otherwise you match accidentally against NULL entries in list (that shd be removed) |
|
1355 { |
|
1356 TInt i(0); |
|
1357 TMDBElementId iterId = elementIdArray[i]; |
|
1358 |
|
1359 while (iterId != NO_MORE_ID ) |
|
1360 { |
|
1361 if(iterId == tableId) |
|
1362 { |
|
1363 globalValueBuffer = tableArray[i]; |
|
1364 globalValueBuffer.Append(_L(".")); |
|
1365 globalValueBuffer.AppendNum(recordId); |
|
1366 aSetting.Set(globalValueBuffer); |
|
1367 return ETrue; |
|
1368 } |
|
1369 iterId = elementIdArray[++i]; |
|
1370 } |
|
1371 } |
|
1372 } |
|
1373 return ETrue; |
|
1374 } |
|
1375 |
|
1376 TBool CCedDumper::ConvertRecordLinks(TPtrC& aColumn, TPtrC& aSetting, CMDBElement* aField) |
|
1377 { |
|
1378 TBool ret(EFalse); |
|
1379 |
|
1380 switch(aField->TableId()) |
|
1381 { |
|
1382 case KCDTIdIAPRecord: |
|
1383 ret = FillBufferWithLink(ELRIAP, aColumn, aSetting, aField); |
|
1384 break; |
|
1385 } |
|
1386 |
|
1387 return ret; |
|
1388 } |
|
1389 |
|
1390 TBool CCedDumper::FillBufferWithLink(TUint32 aIndex, TPtrC& aColumn, TPtrC& aSetting, CMDBElement* aField) |
|
1391 { |
|
1392 TBool ret(EFalse); |
|
1393 TInt i(0); |
|
1394 |
|
1395 while(TPtrC(LinkRecordsArray[aIndex][i]).CompareF(TPtrC(NO_MORE_RECORDS)) != 0) |
|
1396 { |
|
1397 if(aColumn.CompareF(TPtrC(LinkRecordsArray[aIndex][i])) == 0) |
|
1398 { |
|
1399 TInt value = *(static_cast<CMDBField<TInt>*>(aField)); |
|
1400 // check if it is Tag |
|
1401 if(value & KLinkableFlagTag && value & KCDMaskShowRecordType) |
|
1402 { |
|
1403 globalValueBuffer = KLinkPrefix; |
|
1404 globalValueBuffer.Append(TPtrC(LinkRecordsArray[aIndex][i])); |
|
1405 globalValueBuffer.Append(_L(".")); |
|
1406 globalValueBuffer.AppendNum(value & ~(KLinkableFlagTag | KCDMaskShowRecordType)); |
|
1407 aSetting.Set(globalValueBuffer); |
|
1408 ret = ETrue; |
|
1409 } |
|
1410 // check if it is a Record with tableId info |
|
1411 else if(value & ~KLinkableFlagTag && value & KCDMaskShowRecordType) |
|
1412 { |
|
1413 globalValueBuffer = TPtrC(LinkRecordsArray[aIndex][i]); |
|
1414 globalValueBuffer.Append(_L(".")); |
|
1415 globalValueBuffer.AppendNum((value & ~(KLinkableFlagTag | KCDMaskShowRecordType | KCDMaskShowFieldType))>>8); |
|
1416 aSetting.Set(globalValueBuffer); |
|
1417 ret = ETrue; |
|
1418 } |
|
1419 } |
|
1420 i++; |
|
1421 } |
|
1422 |
|
1423 return ret; |
|
1424 } |
|
1425 |
|
1426 TBool CCedDumper::ConvertEnums(TPtrC& aColumn, TPtrC& aSetting) |
|
1427 /** |
|
1428 Converts any enumerations to readable form |
|
1429 |
|
1430 @param theColumn A reference to a descriptor containing the name of a column in the current record. |
|
1431 @param setting The setting |
|
1432 @return ETrue if succcessful else EFalse |
|
1433 */ |
|
1434 { |
|
1435 TInt valid = ETrue; |
|
1436 TInt i = 0; |
|
1437 TBuf<MAX_COL_NAME_LEN> column; |
|
1438 |
|
1439 // already converted these enums |
|
1440 if (aSetting.Compare(TPtrC(_L("TRUE"))) == 0 || |
|
1441 aSetting.Compare(TPtrC(_L("FALSE"))) == 0 ) |
|
1442 { |
|
1443 return ETrue; |
|
1444 } |
|
1445 |
|
1446 // loop through ennumeration columns |
|
1447 column = ENUMcolumnArray[i]; |
|
1448 while (column.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
1449 { |
|
1450 // found the column |
|
1451 if (column.Compare(aColumn) == 0) |
|
1452 { |
|
1453 valid = EFalse; |
|
1454 |
|
1455 // convert the setting to an index and assign contents |
|
1456 TLex iResult = aSetting; |
|
1457 TInt j = 0; |
|
1458 if (iResult.Val(j) == KErrNone) |
|
1459 { |
|
1460 if (column.Compare(TPtrC(MODEM_RATE)) == 0) |
|
1461 { |
|
1462 // Check for Modem RATE |
|
1463 switch(j) |
|
1464 { |
|
1465 case EBpsAutobaud: |
|
1466 globalValueBuffer = MODEM_RATE_AUTO; |
|
1467 valid = ETrue; |
|
1468 break; |
|
1469 case EBpsSpecial: |
|
1470 globalValueBuffer = MODEM_RATE_SPECIAL; |
|
1471 valid = ETrue; |
|
1472 break; |
|
1473 default: |
|
1474 globalValueBuffer = EnumerationArray[i][j]; |
|
1475 valid = ETrue; |
|
1476 break; |
|
1477 }; |
|
1478 } |
|
1479 else if (column.Compare(TPtrC(MODEM_FAX_CLASS_PREF)) == 0) |
|
1480 { |
|
1481 // Check for MODEM_FAX_CLASS_PREF enums |
|
1482 switch(j) |
|
1483 { |
|
1484 case EClassAuto: |
|
1485 globalValueBuffer = MODEM_FAX_AUTO; |
|
1486 valid = ETrue; |
|
1487 break; |
|
1488 case EClass1: |
|
1489 globalValueBuffer = MODEM_FAX_1; |
|
1490 valid = ETrue; |
|
1491 break; |
|
1492 case EClass2: |
|
1493 globalValueBuffer = MODEM_FAX_2; |
|
1494 valid = ETrue; |
|
1495 break; |
|
1496 case EClass2point0: |
|
1497 globalValueBuffer = MODEM_FAX_2POINT0; |
|
1498 valid = ETrue; |
|
1499 break; |
|
1500 case EClass1point0: |
|
1501 globalValueBuffer = MODEM_FAX_1POINT0; |
|
1502 valid = ETrue; |
|
1503 break; |
|
1504 case EClass2point1: |
|
1505 globalValueBuffer = MODEM_FAX_2POINT1; |
|
1506 valid = ETrue; |
|
1507 break; |
|
1508 default: |
|
1509 globalValueBuffer = EnumerationArray[i][j]; |
|
1510 valid = ETrue; |
|
1511 break; |
|
1512 }; |
|
1513 } |
|
1514 else if (column.Compare(TPtrC(ISP_BEARER_NAME)) == 0) |
|
1515 { |
|
1516 // Check for ISP_BEARER_NAME enums |
|
1517 switch(j) |
|
1518 { |
|
1519 case RMobileCall::KCapsDataCircuitAsynchronous: |
|
1520 globalValueBuffer = BEARER_NAME_ASYNCHRONOUS; |
|
1521 valid = ETrue; |
|
1522 break; |
|
1523 case RMobileCall::KCapsDataCircuitAsynchronousRDI: |
|
1524 globalValueBuffer = BEARER_NAME_ASYNCHRONOUSRDI; |
|
1525 valid = ETrue; |
|
1526 break; |
|
1527 case RMobileCall::KCapsDataCircuitSynchronous: |
|
1528 globalValueBuffer = BEARER_NAME_SYNCHRONOUS; |
|
1529 valid = ETrue; |
|
1530 break; |
|
1531 case RMobileCall::KCapsDataCircuitSynchronousRDI: |
|
1532 globalValueBuffer = BEARER_NAME_SYNCHRONOUSRDI; |
|
1533 valid = ETrue; |
|
1534 break; |
|
1535 case RMobileCall::KCapsPADAsyncUDI: |
|
1536 globalValueBuffer = BEARER_NAME_PADASYNCUDI; |
|
1537 valid = ETrue; |
|
1538 break; |
|
1539 case RMobileCall::KCapsPADAsyncRDI: |
|
1540 globalValueBuffer = BEARER_NAME_PADASYNCRDI; |
|
1541 valid = ETrue; |
|
1542 break; |
|
1543 case RMobileCall::KCapsPacketAccessSyncUDI: |
|
1544 globalValueBuffer = BEARER_NAME_ACCESSSYNCUDI; |
|
1545 valid = ETrue; |
|
1546 break; |
|
1547 case RMobileCall::KCapsPacketAccessSyncRDI: |
|
1548 globalValueBuffer = BEARER_NAME_ACCESSSYNCRDI; |
|
1549 valid = ETrue; |
|
1550 break; |
|
1551 case RMobileCall::KCapsServiceExtended: |
|
1552 globalValueBuffer = BEARER_NAME_SERVICEEXTENDED; |
|
1553 valid = ETrue; |
|
1554 break; |
|
1555 default: |
|
1556 // Default to EXTENDED - can't use the value as an index, as it's a |
|
1557 // bitmap. |
|
1558 globalValueBuffer = BEARER_NAME_SERVICEEXTENDED; |
|
1559 valid = ETrue; |
|
1560 break; |
|
1561 }; |
|
1562 } |
|
1563 else if (column.Compare(TPtrC(ISP_IF_CALLBACK_TYPE)) == 0) |
|
1564 { |
|
1565 // Check for IFCALLBACKTYPE enums |
|
1566 switch(j) |
|
1567 { |
|
1568 case ECallbackActionMSCBCPRequireClientSpecifiedNumber: |
|
1569 globalValueBuffer = MSCBCPCLIENTNUM; |
|
1570 valid = ETrue; |
|
1571 break; |
|
1572 case ECallbackActionMSCBCPAcceptServerSpecifiedNumber: |
|
1573 globalValueBuffer = MSCBCPSERVERNUM; |
|
1574 valid = ETrue; |
|
1575 break; |
|
1576 case ECallbackActionMSCBCPOverrideServerSpecifiedNumber: |
|
1577 globalValueBuffer = MSCBCPOVERRIDESER; |
|
1578 valid = ETrue; |
|
1579 break; |
|
1580 default: |
|
1581 globalValueBuffer = EnumerationArray[i][j]; |
|
1582 valid = ETrue; |
|
1583 break; |
|
1584 }; |
|
1585 } |
|
1586 else if (column.Compare(TPtrC(CONNECT_PREF_BEARER_SET)) == 0) |
|
1587 { |
|
1588 // Check for CONNECT_PREF_BEARER_SET enums |
|
1589 if(j == 0) |
|
1590 { |
|
1591 globalValueBuffer = BEARER_SET_UNKNOWN; |
|
1592 valid = ETrue; |
|
1593 } |
|
1594 else |
|
1595 { |
|
1596 TBool first(ETrue); |
|
1597 |
|
1598 globalValueBuffer = _L(""); |
|
1599 |
|
1600 if(j & KCommDbBearerCSD) |
|
1601 { |
|
1602 first = EFalse; |
|
1603 globalValueBuffer.Append(TPtrC(BEARER_SET_CSD)); |
|
1604 } |
|
1605 |
|
1606 if(j & KCommDbBearerLAN) |
|
1607 { |
|
1608 if(!first) |
|
1609 { |
|
1610 globalValueBuffer.Append(_L(" & ")); |
|
1611 } |
|
1612 |
|
1613 first = EFalse; |
|
1614 globalValueBuffer.Append(TPtrC(BEARER_SET_LAN)); |
|
1615 } |
|
1616 |
|
1617 if(j & KCommDbBearerWLAN) |
|
1618 { |
|
1619 if(!first) |
|
1620 { |
|
1621 globalValueBuffer.Append(_L(" & ")); |
|
1622 } |
|
1623 |
|
1624 first = EFalse; |
|
1625 globalValueBuffer.Append(TPtrC(BEARER_SET_WLAN)); |
|
1626 } |
|
1627 |
|
1628 if(j & KCommDbBearerVirtual) |
|
1629 { |
|
1630 if(!first) |
|
1631 { |
|
1632 globalValueBuffer.Append(_L(" & ")); |
|
1633 } |
|
1634 |
|
1635 first = EFalse; |
|
1636 globalValueBuffer.Append(TPtrC(BEARER_SET_VIRTUAL)); |
|
1637 } |
|
1638 |
|
1639 if(j & KCommDbBearerPAN) |
|
1640 { |
|
1641 if(!first) |
|
1642 { |
|
1643 globalValueBuffer.Append(_L(" & ")); |
|
1644 } |
|
1645 |
|
1646 first = EFalse; |
|
1647 globalValueBuffer.Append(TPtrC(BEARER_SET_PAN)); |
|
1648 } |
|
1649 |
|
1650 if( (j & KCommDbBearerPSD) == KCommDbBearerPSD) |
|
1651 { |
|
1652 if(!first) |
|
1653 { |
|
1654 globalValueBuffer.Append(_L(" & ")); |
|
1655 } |
|
1656 |
|
1657 first = EFalse; |
|
1658 globalValueBuffer.Append(TPtrC(BEARER_SET_PSD)); |
|
1659 } |
|
1660 else |
|
1661 { |
|
1662 if(j & KCommDbBearerWcdma) |
|
1663 { |
|
1664 if(!first) |
|
1665 { |
|
1666 globalValueBuffer.Append(_L(" & ")); |
|
1667 } |
|
1668 |
|
1669 first = EFalse; |
|
1670 globalValueBuffer.Append(TPtrC(BEARER_SET_WCDMA)); |
|
1671 } |
|
1672 } |
|
1673 |
|
1674 if(globalValueBuffer.Length() == 0) |
|
1675 { |
|
1676 globalValueBuffer = EnumerationArray[i][j]; |
|
1677 } |
|
1678 |
|
1679 valid = ETrue; |
|
1680 } |
|
1681 |
|
1682 // globalValueBuffer = EnumerationArray[i][j]; |
|
1683 } |
|
1684 else if (column.Compare(TPtrC(CDMA_SERVICE_OPTION)) == 0) |
|
1685 { |
|
1686 // Check for CDMA_SERVICE_OPTION enums |
|
1687 switch(j) |
|
1688 { |
|
1689 case RPacketContext::KLowSpeedData: |
|
1690 globalValueBuffer = CDMA_SERVICE_LOWSPEEDDATA; |
|
1691 valid = ETrue; |
|
1692 break; |
|
1693 |
|
1694 case RPacketContext::KHighSpeedData: |
|
1695 globalValueBuffer = CDMA_SERVICE_HIGHSPEEDDATA; |
|
1696 valid = ETrue; |
|
1697 break; |
|
1698 |
|
1699 case (RPacketContext::KLowSpeedData | |
|
1700 RPacketContext::KHighSpeedData): |
|
1701 globalValueBuffer = CDMA_SERVICE_LOW_AND_HIGHSPEEDDATA; |
|
1702 valid = ETrue; |
|
1703 break; |
|
1704 |
|
1705 default: |
|
1706 globalValueBuffer = EnumerationArray[i][j]; |
|
1707 valid = ETrue; |
|
1708 break; |
|
1709 }; |
|
1710 } |
|
1711 else if (column.Compare(TPtrC(CDMA_RLP_MODE)) == 0) |
|
1712 { |
|
1713 // Check for CDMA_RLP_MODE enums |
|
1714 switch(j) |
|
1715 { |
|
1716 case RPacketQoS::KRLPUnknown: |
|
1717 globalValueBuffer = CDMA_RLP_UNKNOWN; |
|
1718 valid = ETrue; |
|
1719 break; |
|
1720 case RPacketQoS::KRLPTransparent: |
|
1721 globalValueBuffer = CDMA_RLP_TRANSPARENT; |
|
1722 valid = ETrue; |
|
1723 break; |
|
1724 case RPacketQoS::KRLPNonTransparent: |
|
1725 globalValueBuffer = CDMA_RLP_NONTRANSPARENT; |
|
1726 valid = ETrue; |
|
1727 break; |
|
1728 case RPacketQoS::KRLPTransparentPref: |
|
1729 globalValueBuffer = CDMA_RLP_TRANSPARENTPREF; |
|
1730 valid = ETrue; |
|
1731 break; |
|
1732 case RPacketQoS::KRLPNonTransparentPref: |
|
1733 globalValueBuffer = CDMA_RLP_NONTRANSPARENTPREF; |
|
1734 valid = ETrue; |
|
1735 break; |
|
1736 default: |
|
1737 globalValueBuffer = EnumerationArray[i][j]; |
|
1738 valid = ETrue; |
|
1739 break; |
|
1740 }; |
|
1741 } |
|
1742 else if ((column.Compare(TPtrC(CDMA_REQ_FWD_PRIORITY)) == 0) |
|
1743 || (column.Compare(TPtrC(CDMA_REQ_REV_PRIORITY)) == 0)) |
|
1744 { |
|
1745 // Check for CDMA_REQ_FWD_PRIORITY |
|
1746 // and CDMA_REQ_REV_PRIORITY enums |
|
1747 switch(j) |
|
1748 { |
|
1749 case RPacketQoS::ELinkPriority00: |
|
1750 globalValueBuffer = CDMA_PRIORITY_00; |
|
1751 valid = ETrue; |
|
1752 break; |
|
1753 case RPacketQoS::ELinkPriority01: |
|
1754 globalValueBuffer = CDMA_PRIORITY_01; |
|
1755 valid = ETrue; |
|
1756 break; |
|
1757 case RPacketQoS::ELinkPriority02: |
|
1758 globalValueBuffer = CDMA_PRIORITY_02; |
|
1759 valid = ETrue; |
|
1760 break; |
|
1761 case RPacketQoS::ELinkPriority03: |
|
1762 globalValueBuffer = CDMA_PRIORITY_03; |
|
1763 valid = ETrue; |
|
1764 break; |
|
1765 case RPacketQoS::ELinkPriority04: |
|
1766 globalValueBuffer = CDMA_PRIORITY_04; |
|
1767 valid = ETrue; |
|
1768 break; |
|
1769 case RPacketQoS::ELinkPriority05: |
|
1770 globalValueBuffer = CDMA_PRIORITY_05; |
|
1771 valid = ETrue; |
|
1772 break; |
|
1773 case RPacketQoS::ELinkPriority06: |
|
1774 globalValueBuffer = CDMA_PRIORITY_06; |
|
1775 valid = ETrue; |
|
1776 break; |
|
1777 case RPacketQoS::ELinkPriority07: |
|
1778 globalValueBuffer = CDMA_PRIORITY_07; |
|
1779 valid = ETrue; |
|
1780 break; |
|
1781 case RPacketQoS::ELinkPriority08: |
|
1782 globalValueBuffer = CDMA_PRIORITY_08; |
|
1783 valid = ETrue; |
|
1784 break; |
|
1785 case RPacketQoS::ELinkPriority09: |
|
1786 globalValueBuffer = CDMA_PRIORITY_09; |
|
1787 valid = ETrue; |
|
1788 break; |
|
1789 case RPacketQoS::ELinkPriority10: |
|
1790 globalValueBuffer = CDMA_PRIORITY_10; |
|
1791 valid = ETrue; |
|
1792 break; |
|
1793 case RPacketQoS::ELinkPriority11: |
|
1794 globalValueBuffer = CDMA_PRIORITY_11; |
|
1795 valid = ETrue; |
|
1796 break; |
|
1797 case RPacketQoS::ELinkPriority12: |
|
1798 globalValueBuffer = CDMA_PRIORITY_12; |
|
1799 valid = ETrue; |
|
1800 break; |
|
1801 case RPacketQoS::ELinkPriority13: |
|
1802 globalValueBuffer = CDMA_PRIORITY_13; |
|
1803 valid = ETrue; |
|
1804 break; |
|
1805 default: |
|
1806 globalValueBuffer = EnumerationArray[i][j]; |
|
1807 valid = ETrue; |
|
1808 break; |
|
1809 }; |
|
1810 } |
|
1811 else if ((column.Compare(TPtrC(CDMA_REQ_FWD_BITRATE)) == 0) |
|
1812 || (column.Compare(TPtrC(CDMA_REQ_REV_BITRATE)) == 0) |
|
1813 || (column.Compare(TPtrC(CDMA_MIN_FWD_BITRATE)) == 0) |
|
1814 || (column.Compare(TPtrC(CDMA_MIN_REV_BITRATE)) == 0)) |
|
1815 { |
|
1816 // Check for CDMA_REQ_FWD_BITRATE, |
|
1817 // CDMA_REQ_REV_BITRATE, CDMA_MIN_FWD_BITRATE |
|
1818 // and CDMA_MIN_REV_BITRATE enums |
|
1819 switch(j) |
|
1820 { |
|
1821 case RPacketQoS::EDataRate8kbps: |
|
1822 globalValueBuffer = CDMA_BITRATE_8; |
|
1823 valid = ETrue; |
|
1824 break; |
|
1825 case RPacketQoS::EDataRate32kbps: |
|
1826 globalValueBuffer = CDMA_BITRATE_32; |
|
1827 valid = ETrue; |
|
1828 break; |
|
1829 case RPacketQoS::EDataRate64kbps: |
|
1830 globalValueBuffer = CDMA_BITRATE_64; |
|
1831 valid = ETrue; |
|
1832 break; |
|
1833 case RPacketQoS::EDataRate144kbps: |
|
1834 globalValueBuffer = CDMA_BITRATE_144; |
|
1835 valid = ETrue; |
|
1836 break; |
|
1837 case RPacketQoS::EDataRate384kbps: |
|
1838 globalValueBuffer = CDMA_BITRATE_384; |
|
1839 valid = ETrue; |
|
1840 break; |
|
1841 default: |
|
1842 globalValueBuffer = EnumerationArray[i][j]; |
|
1843 valid = ETrue; |
|
1844 break; |
|
1845 }; |
|
1846 } |
|
1847 else if ((column.Compare(TPtrC(CDMA_REQ_FWD_LOSS)) == 0) |
|
1848 || (column.Compare(TPtrC(CDMA_REQ_REV_LOSS)) == 0) |
|
1849 || (column.Compare(TPtrC(CDMA_ACCPT_FWD_LOSS)) == 0) |
|
1850 || (column.Compare(TPtrC(CDMA_ACCPT_REV_LOSS)) == 0)) |
|
1851 { |
|
1852 // Check for CDMA_REQ_FWD_LOSS, |
|
1853 // CDMA_REQ_REV_LOSS, CDMA_ACCPT_FWD_LOSS |
|
1854 // and CDMA_ACCPT_REV_LOSS enums |
|
1855 switch(j) |
|
1856 { |
|
1857 case RPacketQoS::EDataLoss1: |
|
1858 globalValueBuffer = CDMA_LOSS_1; |
|
1859 valid = ETrue; |
|
1860 break; |
|
1861 case RPacketQoS::EDataLoss2: |
|
1862 globalValueBuffer = CDMA_LOSS_2; |
|
1863 valid = ETrue; |
|
1864 break; |
|
1865 case RPacketQoS::EDataLoss5: |
|
1866 globalValueBuffer = CDMA_LOSS_5; |
|
1867 valid = ETrue; |
|
1868 break; |
|
1869 case RPacketQoS::EDataLoss10: |
|
1870 globalValueBuffer = CDMA_LOSS_10; |
|
1871 valid = ETrue; |
|
1872 break; |
|
1873 default: |
|
1874 globalValueBuffer = EnumerationArray[i][j]; |
|
1875 valid = ETrue; |
|
1876 break; |
|
1877 }; |
|
1878 } |
|
1879 else if ((column.Compare(TPtrC(CDMA_REQ_FWD_MAXDELAY)) == 0) |
|
1880 || (column.Compare(TPtrC(CDMA_REQ_REV_MAXDELAY)) == 0) |
|
1881 || (column.Compare(TPtrC(CDMA_ACCPT_FWD_MAXDELAY)) == 0) |
|
1882 || (column.Compare(TPtrC(CDMA_ACCPT_REV_MAXDELAY)) == 0)) |
|
1883 { |
|
1884 // Check for CDMA_REQ_FWD_MAXDELAY, |
|
1885 // CDMA_REQ_REV_MAXDELAY, CDMA_ACCPT_FWD_MAXDELAY |
|
1886 // and CDMA_ACCPT_REV_MAXDELAY enums |
|
1887 switch(j) |
|
1888 { |
|
1889 case RPacketQoS::EUnspecifiedDelayClass: |
|
1890 globalValueBuffer = CDMA_MAXDELAY_CLASS; |
|
1891 valid = ETrue; |
|
1892 break; |
|
1893 case RPacketQoS::EDelayClass1: |
|
1894 globalValueBuffer = CDMA_MAXDELAY_CLASS1; |
|
1895 valid = ETrue; |
|
1896 break; |
|
1897 case RPacketQoS::EDelayClass2: |
|
1898 globalValueBuffer = CDMA_MAXDELAY_CLASS2; |
|
1899 valid = ETrue; |
|
1900 break; |
|
1901 case RPacketQoS::EDelayClass3: |
|
1902 globalValueBuffer = CDMA_MAXDELAY_CLASS3; |
|
1903 valid = ETrue; |
|
1904 break; |
|
1905 case RPacketQoS::EDelayClass4: |
|
1906 globalValueBuffer = CDMA_MAXDELAY_CLASS4; |
|
1907 valid = ETrue; |
|
1908 break; |
|
1909 case RPacketQoS::EDelay40ms: |
|
1910 globalValueBuffer = CDMA_MAXDELAY_40MS; |
|
1911 valid = ETrue; |
|
1912 break; |
|
1913 case RPacketQoS::EDelay120ms: |
|
1914 globalValueBuffer = CDMA_MAXDELAY_120MS; |
|
1915 valid = ETrue; |
|
1916 break; |
|
1917 case RPacketQoS::EDelay360ms: |
|
1918 globalValueBuffer = CDMA_MAXDELAY_360MS; |
|
1919 valid = ETrue; |
|
1920 break; |
|
1921 default: |
|
1922 globalValueBuffer = EnumerationArray[i][j]; |
|
1923 valid = ETrue; |
|
1924 break; |
|
1925 }; |
|
1926 } |
|
1927 else if ((column.Compare(TPtrC(ISP_BEARER_PROTOCOL)) == 0)) |
|
1928 { |
|
1929 // Search the lookup table for this value and map it to the associated |
|
1930 // descriptor. |
|
1931 // 0 will always give "UNSPECIFIED" (as it should) rather than "0". |
|
1932 const TDescEnumMap *pMap = IspBearerProtocolMap; |
|
1933 while((pMap->EnumVal != (TUint32)j) && (pMap->EnumVal != RMobileCall::EProtocolUnspecified)) |
|
1934 ++pMap; |
|
1935 globalValueBuffer = pMap->OptionDescriptor; |
|
1936 valid = ETrue; |
|
1937 } |
|
1938 else if ((column.Compare(TPtrC(PAN_LOCAL_ROLE)) == 0) |
|
1939 || (column.Compare(TPtrC(PAN_PEER_ROLE)) == 0)) |
|
1940 { |
|
1941 switch(j) |
|
1942 { |
|
1943 case EPanRoleU: |
|
1944 globalValueBuffer = PAN_ROLE_U; |
|
1945 valid = ETrue; |
|
1946 break; |
|
1947 case EPanRoleGn: |
|
1948 globalValueBuffer = PAN_ROLE_GN; |
|
1949 valid = ETrue; |
|
1950 break; |
|
1951 case EPanRoleNap: |
|
1952 globalValueBuffer = PAN_ROLE_NAP; |
|
1953 valid = ETrue; |
|
1954 break; |
|
1955 case EPanRoleUnknown: |
|
1956 globalValueBuffer = PAN_ROLE_UNKNOWN; |
|
1957 valid = ETrue; |
|
1958 break; |
|
1959 default: |
|
1960 globalValueBuffer = EnumerationArray[i][j]; |
|
1961 valid = ETrue; |
|
1962 break; |
|
1963 }; |
|
1964 } |
|
1965 else if (column.Compare(TPtrC(BEARER_TECHNOLOGY)) == 0) |
|
1966 { |
|
1967 switch(j) |
|
1968 { |
|
1969 case KCommDbBearerUnknown: |
|
1970 globalValueBuffer = BEARER_SET_UNKNOWN; |
|
1971 valid = ETrue; |
|
1972 break; |
|
1973 case KCommDbBearerCSD: |
|
1974 globalValueBuffer = BEARER_SET_CSD; |
|
1975 valid = ETrue; |
|
1976 break; |
|
1977 case KCommDbBearerWcdma: |
|
1978 globalValueBuffer = BEARER_SET_WCDMA; |
|
1979 valid = ETrue; |
|
1980 break; |
|
1981 case KCommDbBearerLAN: |
|
1982 globalValueBuffer = BEARER_SET_LAN; |
|
1983 valid = ETrue; |
|
1984 break; |
|
1985 case KCommDbBearerPAN: |
|
1986 globalValueBuffer = BEARER_SET_PAN; |
|
1987 valid = ETrue; |
|
1988 break; |
|
1989 case KCommDbBearerWLAN: |
|
1990 globalValueBuffer = BEARER_SET_WLAN; |
|
1991 valid = ETrue; |
|
1992 break; |
|
1993 case KCommDbBearerVirtual: |
|
1994 globalValueBuffer = BEARER_SET_VIRTUAL; |
|
1995 valid = ETrue; |
|
1996 break; |
|
1997 default: |
|
1998 //globalValueBuffer = EnumerationArray[i][j]; |
|
1999 //valid = ETrue; |
|
2000 valid = EFalse; |
|
2001 break; |
|
2002 }; |
|
2003 } |
|
2004 else if(column.Compare(TPtrC(TUN_EAP_INNERTYPE)) == 0) |
|
2005 { |
|
2006 valid = EFalse; |
|
2007 TUint type(0); |
|
2008 TBuf<MAX_COL_NAME_LEN> value; |
|
2009 value = ENUM_TUN_EAP_INNERTYPEArray[type]; |
|
2010 while (value.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
2011 { |
|
2012 if((TInt)ENUM_TUN_EAP_INNERTYPE_VALArray[type] == j) |
|
2013 { |
|
2014 globalValueBuffer = value; |
|
2015 valid = ETrue; |
|
2016 break; |
|
2017 } |
|
2018 type++; |
|
2019 value = ENUM_TUN_EAP_INNERTYPEArray[type]; |
|
2020 } |
|
2021 } |
|
2022 else if(column.Compare(TPtrC(EAP_SEC_OUTER_EAP_TYPE)) == 0) |
|
2023 { |
|
2024 valid = EFalse; |
|
2025 TUint type(0); |
|
2026 TBuf<MAX_COL_NAME_LEN> value; |
|
2027 value = ENUM_EAP_SEC_OUTER_EAP_TYPEArray[type]; |
|
2028 while (value.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
2029 { |
|
2030 if((TInt)ENUM_EAP_SEC_OUTER_EAP_TYPE_VALArray[type] == j) |
|
2031 { |
|
2032 globalValueBuffer = value; |
|
2033 valid = ETrue; |
|
2034 break; |
|
2035 } |
|
2036 type++; |
|
2037 value = ENUM_EAP_SEC_OUTER_EAP_TYPEArray[type]; |
|
2038 } |
|
2039 } |
|
2040 else if(column.Compare(TPtrC(WLAN_DES_TRANS_RATE)) == 0) |
|
2041 { |
|
2042 valid = EFalse; |
|
2043 TUint type(0); |
|
2044 TBuf<MAX_COL_NAME_LEN> value; |
|
2045 value = ENUM_WLAN_DES_TRANS_RATEArray[type]; |
|
2046 while (value.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
2047 { |
|
2048 if((TInt)ENUM_WLAN_DES_TRANS_RATE_VALArray[type] == j) |
|
2049 { |
|
2050 globalValueBuffer = value; |
|
2051 valid = ETrue; |
|
2052 break; |
|
2053 } |
|
2054 type++; |
|
2055 value = ENUM_WLAN_DES_TRANS_RATEArray[type]; |
|
2056 } |
|
2057 } |
|
2058 else if(column.Compare(TPtrC(WLAN_REG_DOMAIN)) == 0 || column.Compare(TPtrC(REGULATORY_DOMAIN)) == 0) |
|
2059 { |
|
2060 valid = EFalse; |
|
2061 TUint type(0); |
|
2062 TBuf<MAX_COL_NAME_LEN> value; |
|
2063 value = ENUM_WLAN_REG_DOMAINArray[type]; |
|
2064 while (value.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
2065 { |
|
2066 if((TInt)ENUM_WLAN_REG_DOMAIN_VALArray[type] == j) |
|
2067 { |
|
2068 globalValueBuffer = value; |
|
2069 valid = ETrue; |
|
2070 break; |
|
2071 } |
|
2072 type++; |
|
2073 value = ENUM_WLAN_REG_DOMAINArray[type]; |
|
2074 } |
|
2075 } |
|
2076 else if(column.Compare(TPtrC(DEFAULT_REGULATORY_DOMAIN)) == 0) |
|
2077 { |
|
2078 valid = EFalse; |
|
2079 TUint type(0); |
|
2080 TBuf<MAX_COL_NAME_LEN> value; |
|
2081 value = ENUM_WLAN_REG_DOMAINArray[type]; |
|
2082 while (value.Compare(TPtrC(NO_MORE_RECORDS)) != 0) |
|
2083 { |
|
2084 if((TInt)ENUM_WLAN_REG_DOMAIN_VALArray[type] == j) |
|
2085 { |
|
2086 globalValueBuffer = value; |
|
2087 valid = ETrue; |
|
2088 break; |
|
2089 } |
|
2090 type++; |
|
2091 value = ENUM_WLAN_REG_DOMAINArray[type]; |
|
2092 } |
|
2093 } |
|
2094 else |
|
2095 { |
|
2096 globalValueBuffer = EnumerationArray[i][j]; |
|
2097 valid = ETrue; |
|
2098 } |
|
2099 } |
|
2100 |
|
2101 // in case they've changed during enum conversion |
|
2102 if (valid) |
|
2103 { |
|
2104 // console->Printf(_L("[%S][%S]\n"), &theColumn, &globalValueBuffer); |
|
2105 // console->Getch(); // get and ignore character |
|
2106 aSetting.Set(globalValueBuffer); |
|
2107 break; |
|
2108 } |
|
2109 } |
|
2110 |
|
2111 i++; |
|
2112 column = ENUMcolumnArray[i]; |
|
2113 } |
|
2114 |
|
2115 return valid; |
|
2116 } |
|
2117 |
|
2118 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS |
|
2119 /** |
|
2120 Check if given column is not deprecated within incoming/outgoing GPRS table. |
|
2121 Additionally converts the setting to new R99 GPRS QoS values if necessary. |
|
2122 Assumes setting is given as R97/98 GPRS QoS parameter. |
|
2123 |
|
2124 @param theColumn A reference to a descriptor containing a name of a column in current record. |
|
2125 @param setting The setting |
|
2126 @return CR99QoSConversion::TConvRecordType |
|
2127 */ |
|
2128 CR99QoSConversion::TConvRecordType CCedDumper::CheckAndPerformConversion(TPtrC &theColumn, TPtrC &setting) |
|
2129 { |
|
2130 if (iR99ConversionRecordsCurrent == NULL) |
|
2131 { |
|
2132 //It is the first parameter spoted for particular instance of incoming/outgoing GPRS table. |
|
2133 TRAPD(ret, iR99ConversionRecordsCurrent = CR99QoSConversion::NewL() ) |
|
2134 if (ret != KErrNone) |
|
2135 { |
|
2136 return CR99QoSConversion::EConvertionError; |
|
2137 } |
|
2138 |
|
2139 //Link created object to the uni-direction list |
|
2140 if (iR99ConversionRecordsHead == NULL) |
|
2141 { |
|
2142 iR99ConversionRecordsHead = iR99ConversionRecordsCurrent; |
|
2143 } |
|
2144 else |
|
2145 { |
|
2146 CR99QoSConversion *temp = iR99ConversionRecordsHead; |
|
2147 while(temp->GetNext() != NULL) |
|
2148 { |
|
2149 temp = temp->GetNext(); |
|
2150 } |
|
2151 temp->SetNext(iR99ConversionRecordsCurrent); |
|
2152 } |
|
2153 } |
|
2154 //Pass the request to CR99QoSConversion object |
|
2155 return iR99ConversionRecordsCurrent->CheckAndConvert(theColumn, setting); |
|
2156 } |
|
2157 |
|
2158 /** |
|
2159 Prints out all conversion tables from uni-direction list to the output file |
|
2160 */ |
|
2161 void CCedDumper::WriteR99Conversion() |
|
2162 { |
|
2163 TBuf<MAX_COL_NAME_LEN> tempTable; |
|
2164 |
|
2165 //Is there anything to print out? |
|
2166 if (!iR99ConversionRecordsHead || (iR99ConversionRecordsHead && !iR99ConversionRecordsHead->GetModificationFlag())) |
|
2167 return; |
|
2168 |
|
2169 //write the table header to the output file |
|
2170 tempTable = TPtrC(QOS_UMTS_R99_AND_ON_TABLE); |
|
2171 iFileDumper->WriteTableHeader(tempTable); |
|
2172 |
|
2173 //loop through all object within the list |
|
2174 iR99ConversionRecordsCurrent = iR99ConversionRecordsHead; |
|
2175 while(iR99ConversionRecordsCurrent) |
|
2176 { |
|
2177 iR99ConversionRecordsCurrent->PrintValues(iFileDumper); |
|
2178 iR99ConversionRecordsCurrent = iR99ConversionRecordsCurrent->GetNext(); |
|
2179 } |
|
2180 |
|
2181 } |
|
2182 #endif |
|
2183 //SYMBIAN_NETWORKING_3GPPDEFAULTQOS |