os/security/cryptoservices/filebasedcertificateandkeystores/test/keytool/keytool_view_imp.cpp
First public contribution.
2 * Copyright (c) 2004-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.
19 #include "keytool_defs.h"
20 #include "keytool_view_imp.h"
23 #include "keytool_utils.h"
26 /*static*/ CKeytoolConsoleView* CKeytoolConsoleView::NewLC(CConsoleBase& aConsole)
28 CKeytoolConsoleView* self = new (ELeave) CKeytoolConsoleView(aConsole);
29 CleanupStack::PushL(self);
34 CKeytoolConsoleView::CKeytoolConsoleView(CConsoleBase& aConsole) : iConsole(aConsole)
38 CKeytoolConsoleView::~CKeytoolConsoleView()
42 void CKeytoolConsoleView::ConstructL()
47 void CKeytoolConsoleView::DisplayUsage()
51 void CKeytoolConsoleView::BoilerPlate()
56 void CKeytoolConsoleView::DisplayKeyInfoL(CCTKeyInfo& aKey, TBool aIsDetailed, TBool aPageWise)
58 // Display the key infos
59 KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
60 KeyToolUtils::PrintKeyInfoL(aKey, aIsDetailed, aPageWise);
63 void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TInt aErrorCode, TBool aPageWise)
65 KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
66 KeyToolUtils::PrintInfoL(aError);
67 KeyToolUtils::PrintInfoL(_L("\nError code: "));
68 KeyToolUtils::WriteErrorL(aErrorCode);
71 void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TBool aPageWise)
73 KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
74 KeyToolUtils::PrintInfoL(aError);
77 void CKeytoolConsoleView::DisplayCertL(CCTCertInfo& aCert, CCertificate& aCertificate, RUidArray aApps, TBool aTrusted, TBool aIsDetailed, TBool aPageWise)
79 // Display the cert infos
80 KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
81 KeyToolUtils::PrintCertInfoL(aCert, aCertificate, aApps, aTrusted, aIsDetailed, aPageWise);