Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
24 #include <cryptospi/cryptospidef.h>
26 #include <cryptospi/cryptocharacteristics.h>
27 #include <cryptospi/cryptospistateapi.h>
28 #include "dumpprocessor.h"
29 #include <cryptospi/cryptoparams.h>
30 #include <cryptospi/extendedcharacteristics.h>
34 using namespace CryptoSpi;
37 //The name of characteristics log file
39 _LIT(KLogStartMessage, "DumpCryptoSpiTool");
40 const TInt KMaxLineLength = 1024;
41 _LIT8(KNewLine8, "\r\n");
44 //Characteristic Heads
46 _LIT(KLogHashCharacteristicHead, "[HashCharacteristic]");
47 _LIT(KLogRandomCharacteristicHead, "[RandomCharacteristic]");
48 _LIT(KLogSymmetricCipherCharacteristicHead, "[SymmetricCipherCharacteristic]");
49 _LIT(KLogAsymmetricCipherCharacteristicHead, "[AsymmetricCipherCharacteristic]");
50 _LIT(KLogSignerCharacteristicHead, "[SignerCharacteristic]");
51 _LIT(KLogVerifierCharacteristicHead, "[VerifierCharacteristic]");
52 _LIT(KLogKeyAgreementCharacteristicHead, "[KeyAgreementCharacteristic]");
53 _LIT(KLogKeypairGeneratorCharacteristicHead, "[KeypairGeneratorCharacteristic]");
54 _LIT(KLogUnknownCharacteristicHead, "[UnknownCharacteristic]");
59 _LIT(KLogBoolTrue, "True");
60 _LIT(KLogBoolFalse, "False");
61 _LIT(KLogUnknown, "Unknown");
63 //Common Characteristics
64 _LIT(KLogInterfaceName, " InterfaceName = %S");
65 _LIT(KLogAlgorithmUid, " AlgorithmUid = 0x%x");
66 _LIT(KLogImplementationUid, " ImplementationUid = 0x%x");
67 _LIT(KLogCreatorName, " CreatorName = %S");
68 _LIT(KLogFIPSApproved, " FIPSApproved = %S");
69 _LIT(KLogHardwareImplementation, " HardwareImplementation = %S");
70 _LIT(KLogAlgorithmName, " AlgorithmName = %S");
71 _LIT(KLogMaxConcurrency, " MaxConcurrency = %d");
72 _LIT(KLogLatency, " Latency = %d");
73 _LIT(KLogThroughput, " Throughput = %d");
75 //Hash Characteristics
76 _LIT(KLogBlockSize, " BlockSize = %d");
77 _LIT(KLogOutputSize, " OutputSize = %d");
79 //Random Characteristics
80 _LIT(KLogBlockMode, " BlockMode = %d");
82 //Symmetric Cipher Characteristics
83 _LIT(KLogMaximumKeyLength, " MaximumKeyLength = %d");
84 _LIT(KLogKeySupportMode, " KeySupportMode = %d");
87 _LIT(KDllName, " PluginDllName = %S");
89 //Extended characteristics
90 _LIT(KLogExtendedCharacteristicInt, " Ext[0x%x] = 0x%x");
91 _LIT(KLogExtendedCharacteristicDes, " Ext[0x%x] = %S");
92 _LIT8(KLogExtendedCharacteristicDes8, " Ext[0x%x] = %S");
94 //padding modes definitions
95 _LIT(KLogPaddingModes1, " SupportedPaddingModes_%d = %S");
96 _LIT(KLogPaddingModeNone, "NoneMode");
97 _LIT(KLogPaddingModeSSLv3, "SSLv3Mode");
98 _LIT(KLogPaddingModePKCS7, "PKCS7Mode");
99 _LIT(KLogPaddingModePkcs1_v1_5_Encryption, "Pkcs1_v1_5_EncryptionMode");
100 _LIT(KLogPaddingModePkcs1_v1_5_Signature, "Pkcs1_v1_5_SignatureMode");
102 //Symmetric cipher operation modes definitions
103 _LIT(KLogOperationModeNone, "NoneMode");
104 _LIT(KLogOperationModeECB, "ECBMode");
105 _LIT(KLogOperationModeCBC, "CBCMode");
106 _LIT(KLogOperationModeOFB, "OFBMode");
107 _LIT(KLogOperationModeCFB, "CFBMode");
108 _LIT(KLogOperationModeCTR, "CTRMode");
110 //Hash modes definitions
111 _LIT(KLogOperationModes1, " SupportedOperationModes_%d = %S");
112 _LIT(KLogOperationModeHash, "HashMode");
113 _LIT(KLogOperationModeHmac, "HmacMode");
116 _LIT(KUsage, "Usage: dumpcryptoplugin [switches] \n");
117 _LIT(KHelpInterface, "-interface/-i <interface name> Dump characteristics for the interface, which can be\n");
118 _LIT(KHelpInterface1, " hash,random,symcipher,asymcipher,signer,verifier,\n");
119 _LIT(KHelpInterface2, " keypairgen,keyagree,asynchash,asyncrandom,asyncsymcipher\n");
120 _LIT(KHelpInterface3, " asyncsigner,asyncverifier,asynckeypairgen,asynckeyagree.\n");
121 _LIT(KHelpAlgorithm, "-algorithm/-al <algorithm name> Dump characteristics for the algorithm, which can be\n");
122 _LIT(KHelpAlgorithm1, " md2,md4,md5,sha1,des,3des,rc2,aes,rc4,rsacipher,rsasigner\n");
123 _LIT(KHelpAlgorithm2, " rsaverifier,rsakeypair,dsasigner,dsaverifier,dsakeypair\n");
124 _LIT(KHelpAlgorithm3, " dhkeypair,dhkeyagree.\n");
125 _LIT(KHelpAll, "-all/-a Dump all the characteristics of all the inplementations.\n");
126 _LIT(KHelpExtended, "-extended/-e Dump the extended characteristics as well.\n");
127 _LIT(KHelpDll, "-dll/-d <filename> Only dump the characteristics for the given plugin Dll.\n");
128 _LIT(KHelpOutput, "-out/-o <drive:><path><filename>Output file name.\n");
129 _LIT(KHelpHelp, "-help/-h Help\n");
131 _LIT(KProgessStatus, "Progressing\n");
132 _LIT(KFileStatus, "Dump to %S");
133 _LIT(KInvalidArgument, "Invalid Argument:");
134 _LIT(KArgument, " %S");
138 //Implementation of CDumpToolParameters
140 CDumpToolParameters* CDumpToolParameters::NewLC()
142 CDumpToolParameters* self=new(ELeave) CDumpToolParameters();
143 CleanupStack::PushL(self);
147 CDumpToolParameters::~CDumpToolParameters()
150 iInvalidOptions.ResetAndDestroy();
153 CDumpToolParameters::CDumpToolParameters()
157 TBool CDumpToolParameters::FindOption(TOption aOption) const
160 TInt count=iOptions.Count();
161 for (TInt i=0;i<count;i++)
163 if (aOption==iOptions[i])
173 //Implementation of CDumpToolProcessor
175 CDumpToolProcessor* CDumpToolProcessor::NewLC(const CDumpToolParameters& aParams, CConsoleBase* aConsole)
177 CDumpToolProcessor* self=new(ELeave) CDumpToolProcessor(aParams, aConsole);
178 CleanupStack::PushL(self);
183 CDumpToolProcessor::~CDumpToolProcessor()
187 iCharacters.ResetAndDestroy();
190 CDumpToolProcessor::CDumpToolProcessor(const CDumpToolParameters& aParams, CConsoleBase* aConsole)
191 : iInputParams(aParams), iConsole(aConsole)
195 void CDumpToolProcessor::ConstructL()
197 User::LeaveIfError(iFs.Connect());
199 if (iInputParams.iDumpFileName.CompareF(KNullDesC)==0)
201 TUint driveCh(RFs::GetSystemDriveChar());
203 _LIT(KDumpFileNameFmt, "%c:\\dumpcrypoplugin.txt");
204 iDumpFileName.Format(KDumpFileNameFmt, driveCh);
208 TInt pos=iInputParams.iDumpFileName.LocateReverseF('\\');
209 TFileName path=iInputParams.iDumpFileName.Left(pos+1);
210 TInt ret=iFs.MkDirAll(path);
211 if (ret!=KErrNone && ret!=KErrAlreadyExists)
213 User::LeaveIfError(ret);
215 iDumpFileName=iInputParams.iDumpFileName;
218 User::LeaveIfError(iLogFile.Replace(iFs, iDumpFileName, EFileWrite | EFileShareExclusive));
219 TBool extended=EFalse;
220 if (iInputParams.FindOption(CDumpToolParameters::EOptionExtendedCharacteristic))
224 CCryptoSpiStateApi::EnumerateCharacteristicsL(iCharacters, iInputParams.iInterface, extended);
227 void CDumpToolProcessor::ProcessL()
229 if (iInputParams.FindOption(CDumpToolParameters::EOptionHelp))
235 if (iInputParams.iInvalidOptions.Count()!=0 )
237 DisplayInvalidOptions();
241 LogL(KLogStartMessage);
242 TInt count=iCharacters.Count();
243 iConsole->Printf(KProgessStatus);
244 for (TInt i=0;i<count;i++)
246 if (iInputParams.iAlgorithm!=0
247 && iInputParams.iAlgorithm!=iCharacters[i]->iCharacteristic->iAlgorithmUid)
252 if (iInputParams.iDllName.Compare(KNullDesC)!=0
253 &&iInputParams.iDllName.Compare(iCharacters[i]->iDllName)!=0)
257 OutputCharcteristicsAndDllL(*iCharacters[i]);
259 iConsole->Printf(KFileStatus, &iDumpFileName);
262 void CDumpToolProcessor::OutputCharacteristicHeadL(TInt32 aInterfaceUid)
265 switch (aInterfaceUid)
268 case KAsyncHashInterface:
269 LogL(KLogHashCharacteristicHead);
272 case KRandomInterface:
273 case KAsyncRandomInterface:
274 LogL(KLogRandomCharacteristicHead);
277 case KSymmetricCipherInterface:
278 case KAsyncSymmetricCipherInterface:
279 LogL(KLogSymmetricCipherCharacteristicHead);
282 case KAsymmetricCipherInterface:
283 case KAsyncAsymmetricCipherInterface:
284 LogL(KLogAsymmetricCipherCharacteristicHead);
287 case KSignerInterface:
288 case KAsyncSignerInterface:
289 LogL(KLogSignerCharacteristicHead);
292 case KVerifierInterface:
293 case KAsyncVerifierInterface:
294 LogL(KLogVerifierCharacteristicHead);
297 case KKeyAgreementInterface:
298 case KAsyncKeyAgreementInterface:
299 LogL(KLogKeyAgreementCharacteristicHead);
302 case KKeypairGeneratorInterface:
303 case KAsyncKeypairGeneratorInterface:
304 LogL(KLogKeypairGeneratorCharacteristicHead);
308 LogL(KLogUnknownCharacteristicHead);
313 void CDumpToolProcessor::OutputInterfaceNameL(TInt32 aInterfaceUid)
315 switch (aInterfaceUid)
318 LogL(KLogInterfaceName, &KHash);
321 case KAsyncHashInterface:
322 LogL(KLogInterfaceName, &KAsyncHash);
325 case KRandomInterface:
326 LogL(KLogInterfaceName, &KRandom);
329 case KAsyncRandomInterface:
330 LogL(KLogInterfaceName, &KAsyncRandom);
333 case KSymmetricCipherInterface:
334 LogL(KLogInterfaceName, &KSymmetricCipher);
337 case KAsyncSymmetricCipherInterface:
338 LogL(KLogInterfaceName, &KAsyncSymmetricCipher);
341 case KAsymmetricCipherInterface:
342 LogL(KLogInterfaceName, &KAsymmetricCipher);
345 case KAsyncAsymmetricCipherInterface:
346 LogL(KLogInterfaceName, &KAsyncAsymmetricCipher);
349 case KSignerInterface:
350 LogL(KLogInterfaceName, &KSigner);
353 case KAsyncSignerInterface:
354 LogL(KLogInterfaceName, &KAsyncSigner);
357 case KVerifierInterface:
358 LogL(KLogInterfaceName, &KVerifier);
361 case KAsyncVerifierInterface:
362 LogL(KLogInterfaceName, &KAsyncVerifier);
365 case KKeyAgreementInterface:
366 LogL(KLogInterfaceName, &KKeyAgreement);
369 case KAsyncKeyAgreementInterface:
370 LogL(KLogInterfaceName, &KAsyncKeyAgreement);
373 case KKeypairGeneratorInterface:
374 LogL(KLogInterfaceName, &KKeyPairGenerator);
377 case KAsyncKeypairGeneratorInterface:
378 LogL(KLogInterfaceName, &KAsyncKeyPairGenerator);
382 LogL(KLogInterfaceName, &KLogUnknown);
386 void CDumpToolProcessor::OutputAlgorithmNameL(TInt32 aAlgorithmUid)
388 switch (aAlgorithmUid)
390 case KAlgorithmHashMd2:
391 LogL(KLogAlgorithmName, &KMd2);
393 case KAlgorithmHashMd4:
394 LogL(KLogAlgorithmName, &KMd4);
396 case KAlgorithmHashMd5:
397 LogL(KLogAlgorithmName, &KMd5);
399 case KAlgorithmHashSha1:
400 LogL(KLogAlgorithmName, &KSha1);
402 case KAlgorithmCipherDes:
403 LogL(KLogAlgorithmName, &KDes);
405 case KAlgorithmCipher3Des:
406 LogL(KLogAlgorithmName, &K3Des);
408 case KAlgorithmCipherRc2:
409 LogL(KLogAlgorithmName, &KRC2);
411 case KAlgorithmCipherAes:
412 LogL(KLogAlgorithmName, &KAes);
414 case KAlgorithmCipherArc4:
415 LogL(KLogAlgorithmName, &KRC4);
417 case KAlgorithmCipherRsa:
418 LogL(KLogAlgorithmName, &KRsaCipher);
420 case KAlgorithmSignerRsa:
421 LogL(KLogAlgorithmName, &KRsaSigner);
423 case KAlgorithmVerifierRsa:
424 LogL(KLogAlgorithmName, &KRsaVerifier);
426 case KAlgorithmRSAKeyPairGenerator:
427 LogL(KLogAlgorithmName, &KRsaKeyPair);
429 case KAlgorithmSignerDsa:
430 LogL(KLogAlgorithmName, &KDsaSigner);
432 case KAlgorithmVerifierDsa:
433 LogL(KLogAlgorithmName, &KDsaVerifier);
435 case KAlgorithmDSAKeyPairGenerator:
436 LogL(KLogAlgorithmName, &KDsaKeyPair);
438 case KAlgorithmDHKeyPairGenerator:
439 LogL(KLogAlgorithmName, &KDhKeyPair);
441 case KAlgorithmKeyAgreementDH:
442 LogL(KLogAlgorithmName, &KDhKeyAgreement);
448 void CDumpToolProcessor::OutputHashOperationModeL(TInt aIndex, TInt32 aOperationMode)
450 switch(aOperationMode)
453 LogL(KLogOperationModes1, aIndex, &KLogOperationModeHash);
456 LogL(KLogOperationModes1, aIndex, &KLogOperationModeHmac);
462 void CDumpToolProcessor::OutputSymmetricOperationModeL(TInt aIndex, TInt32 aOperationMode)
464 switch(aOperationMode)
466 case KOperationModeNone:
467 LogL(KLogOperationModes1, aIndex, &KLogOperationModeNone);
469 case KOperationModeECB:
470 LogL(KLogOperationModes1, aIndex, &KLogOperationModeECB);
472 case KOperationModeCBC:
473 LogL(KLogOperationModes1, aIndex, &KLogOperationModeCBC);
475 case KOperationModeOFB:
476 LogL(KLogOperationModes1, aIndex, &KLogOperationModeOFB);
478 case KOperationModeCFB:
479 LogL(KLogOperationModes1, aIndex, &KLogOperationModeCFB);
481 case KOperationModeCTR:
482 LogL(KLogOperationModes1, aIndex, &KLogOperationModeCTR);
488 void CDumpToolProcessor::OutputPaddingModeL(TInt aIndex, TInt32 aPaddingMode)
492 case KPaddingModeNone:
493 LogL(KLogPaddingModes1, aIndex, &KLogPaddingModeNone);
495 case KPaddingModeSSLv3:
496 LogL(KLogPaddingModes1, aIndex, &KLogPaddingModeSSLv3);
498 case KPaddingModePKCS7:
499 LogL(KLogPaddingModes1, aIndex, &KLogPaddingModePKCS7);
501 case KPaddingModePkcs1_v1_5_Encryption:
502 LogL(KLogPaddingModes1, aIndex, &KLogPaddingModePkcs1_v1_5_Encryption);
504 case KPaddingModePkcs1_v1_5_Signature:
505 LogL(KLogPaddingModes1, aIndex, &KLogPaddingModePkcs1_v1_5_Signature);
511 void CDumpToolProcessor::OutputSpecificCharacteristicL(const CCharacteristics& aCharacter)
513 switch (aCharacter.iInterfaceUid)
516 case KAsyncHashInterface:
518 const CHashCharacteristics& sCharacter=static_cast<const CHashCharacteristics&>(aCharacter);
519 LogL(KLogBlockSize, sCharacter.iBlockSize);
520 LogL(KLogOutputSize, sCharacter.iOutputSize);
521 TInt count=sCharacter.iSupportedOperationModes.Count();
522 for (TInt i=0;i<count;i++)
524 OutputHashOperationModeL(i, sCharacter.iSupportedOperationModes[i]);
529 case KRandomInterface:
530 case KAsyncRandomInterface:
532 const CRandomCharacteristics& sCharacter=static_cast<const CRandomCharacteristics&>(aCharacter);
533 LogL(KLogBlockMode, sCharacter.iBlockingMode);
537 case KSymmetricCipherInterface:
538 case KAsyncSymmetricCipherInterface:
540 const CSymmetricCipherCharacteristics& sCharacter=static_cast<const CSymmetricCipherCharacteristics&>(aCharacter);
541 LogL(KLogMaximumKeyLength, sCharacter.iMaximumKeyLength);
542 LogL(KLogBlockSize, sCharacter.iBlockSize);
543 TInt count=sCharacter.iSupportedPaddingModes.Count();
544 for (TInt i=0;i<count;i++)
546 OutputPaddingModeL(i, sCharacter.iSupportedPaddingModes[i]);
548 count=sCharacter.iSupportedOperationModes.Count();
549 for (TInt i=0;i<count;i++)
551 OutputSymmetricOperationModeL(i, sCharacter.iSupportedOperationModes[i]);
553 LogL(KLogKeySupportMode, sCharacter.iKeySupportMode);
557 case KAsymmetricCipherInterface:
558 case KAsyncAsymmetricCipherInterface:
560 const CAsymmetricCipherCharacteristics& sCharacter=static_cast<const CAsymmetricCipherCharacteristics&>(aCharacter);
561 LogL(KLogMaximumKeyLength, sCharacter.iMaximumKeyLength);
562 TInt count=sCharacter.iSupportedPaddingModes.Count();
563 for (TInt i=0;i<count;i++)
565 OutputPaddingModeL(i, sCharacter.iSupportedPaddingModes[i]);
567 LogL(KLogKeySupportMode, sCharacter.iKeySupportMode);
571 case KSignerInterface:
572 case KAsyncSignerInterface:
573 case KVerifierInterface:
574 case KAsyncVerifierInterface:
576 const CAsymmetricSignatureCharacteristics& sCharacter=static_cast<const CAsymmetricSignatureCharacteristics&>(aCharacter);
577 LogL(KLogMaximumKeyLength, sCharacter.iMaximumKeyLength);
578 TInt count=sCharacter.iSupportedPaddingModes.Count();
579 for (TInt i=0;i<count;i++)
581 OutputPaddingModeL(i, sCharacter.iSupportedPaddingModes[i]);
583 LogL(KLogKeySupportMode, sCharacter.iKeySupportMode);
587 case KKeypairGeneratorInterface:
588 case KAsyncKeypairGeneratorInterface:
590 const CKeypairGeneratorCharacteristics& sCharacter=static_cast<const CKeypairGeneratorCharacteristics&>(aCharacter);
591 LogL(KLogMaximumKeyLength, sCharacter.iMaximumKeyLength);
595 case KKeyAgreementInterface:
596 case KAsyncKeyAgreementInterface:
602 void CDumpToolProcessor::OutputExtendedCharacteristicL(const CExtendedCharacteristics& aCharacter)
604 CExtendedCharacteristics& character=const_cast<CExtendedCharacteristics&>(aCharacter);
605 const CCryptoParams* params=character.ListExtendedCharacteristics();
606 const RPointerArray<CCryptoParam>& list=params->GetParams();
607 TInt count=list.Count();
608 for (TInt i=0;i<count;i++)
610 TInt type=list[i]->Type();
613 case CCryptoParam::EInt:
614 LogL(KLogExtendedCharacteristicInt, list[i]->Uid().iUid, ((CCryptoIntParam*)list[i])->Value());
616 case CCryptoParam::EBigInt:
618 const TInteger& bigInt=((CCryptoBigIntParam*)list[i])->Value();
619 HBufC8* buf8=bigInt.BufferLC();
620 LogL(KLogExtendedCharacteristicDes8, list[i]->Uid().iUid, buf8);
621 CleanupStack::PopAndDestroy(buf8);
624 case CCryptoParam::EDesC8:
625 LogL(KLogExtendedCharacteristicDes8, list[i]->Uid().iUid, ((CCryptoIntParam*)list[i])->Value());
627 case CCryptoParam::EDesC16:
628 LogL(KLogExtendedCharacteristicDes, list[i]->Uid().iUid, ((CCryptoIntParam*)list[i])->Value());
635 void CDumpToolProcessor::OutputCharcteristicsAndDllL(const CCharacteristicsAndPluginName& aElement)
638 OutputCharacteristicHeadL(aElement.iCharacteristic->iInterfaceUid);
640 //Start of Common Characteristics output
641 //Output Interface name
642 OutputInterfaceNameL(aElement.iCharacteristic->iInterfaceUid);
644 //Output Algorithm Uid
645 LogL(KLogAlgorithmUid, aElement.iCharacteristic->iAlgorithmUid);
647 //Output Implementation Uid
648 LogL(KLogImplementationUid, aElement.iCharacteristic->iImplementationUid);
650 //Output Creator's name
651 TFileName name=aElement.iCharacteristic->iCreatorName;
652 LogL(KLogCreatorName, &name);
654 //Output FIPS Approved Flag
655 if (aElement.iCharacteristic->iIsFIPSApproved)
657 LogL(KLogFIPSApproved, &KLogBoolTrue);
661 LogL(KLogFIPSApproved, &KLogBoolFalse);
664 //Output Hardware supported flag
665 if (aElement.iCharacteristic->iIsHardwareSupported)
667 LogL(KLogHardwareImplementation, &KLogBoolTrue);
671 LogL(KLogHardwareImplementation, &KLogBoolFalse);
674 //Output Max concurrency supported
675 LogL(KLogMaxConcurrency, aElement.iCharacteristic->iMaxConcurrencySupported);
677 //Output Algorithm Name
678 name=aElement.iCharacteristic->iAlgorithmName;
679 LogL(KLogAlgorithmName, &name);
682 LogL(KLogLatency, aElement.iCharacteristic->iLatency);
685 LogL(KLogThroughput, aElement.iCharacteristic->iThroughput);
686 //end of Common Characteristics output
688 //Output Specific Characteristic
689 OutputSpecificCharacteristicL(*aElement.iCharacteristic);
691 //Output extended characteristics
692 if (aElement.iExtendedCharacteristic)
694 OutputExtendedCharacteristicL(*aElement.iExtendedCharacteristic);
697 //Output the name of the plugin dll, which contains this implementation
698 LogL(KDllName, &aElement.iDllName);
701 void CDumpToolProcessor::LogL(TRefByValue<const TDesC8> aFmt, ...)
703 TBuf8<KMaxLineLength> buf;
705 VA_START(args, aFmt);
706 buf.AppendFormatList(aFmt, args);
709 User::LeaveIfError(iLogFile.Write(buf));
710 User::LeaveIfError(iLogFile.Write(KNewLine8));
711 User::LeaveIfError(iLogFile.Flush());
714 void CDumpToolProcessor::LogL(TRefByValue<const TDesC> aFmt, ...)
716 TBuf<KMaxLineLength> buf;
718 VA_START(args, aFmt);
719 buf.AppendFormatList(aFmt, args);
722 TBuf8<KMaxLineLength> buf8;
724 User::LeaveIfError(iLogFile.Write(buf8));
725 User::LeaveIfError(iLogFile.Write(KNewLine8));
726 User::LeaveIfError(iLogFile.Flush());
730 Display usage information
732 void CDumpToolProcessor::DisplayHelp()
734 iConsole->Printf(KUsage);
735 iConsole->Printf(KHelpInterface);
736 iConsole->Printf(KHelpInterface1);
737 iConsole->Printf(KHelpInterface2);
738 iConsole->Printf(KHelpInterface3);
739 iConsole->Printf(KHelpAlgorithm);
740 iConsole->Printf(KHelpAlgorithm1);
741 iConsole->Printf(KHelpAlgorithm2);
742 iConsole->Printf(KHelpAlgorithm3);
743 iConsole->Printf(KHelpAll);
744 iConsole->Printf(KHelpExtended);
745 iConsole->Printf(KHelpDll);
746 iConsole->Printf(KHelpOutput);
747 iConsole->Printf(KHelpHelp);
748 iConsole->Printf(KNewLine);
749 iConsole->Printf(KPressAnyKey);
755 void CDumpToolProcessor::DisplayInvalidOptions()
757 iConsole->Printf(KInvalidArgument);
758 TInt count=iInputParams.iInvalidOptions.Count();
759 for (TInt i=0;i<count;i++)
761 iConsole->Printf(KArgument, iInputParams.iInvalidOptions[i]);
763 iConsole->Printf(KNewLine);
764 iConsole->Printf(KPressAnyKey);