sl@0: /* sl@0: * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include "keytool_defs.h" sl@0: #include "keytool_view_imp.h" sl@0: sl@0: #include sl@0: #include "keytool_utils.h" sl@0: sl@0: sl@0: /*static*/ CKeytoolConsoleView* CKeytoolConsoleView::NewLC(CConsoleBase& aConsole) sl@0: { sl@0: CKeytoolConsoleView* self = new (ELeave) CKeytoolConsoleView(aConsole); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(); sl@0: return self; sl@0: } sl@0: sl@0: CKeytoolConsoleView::CKeytoolConsoleView(CConsoleBase& aConsole) : iConsole(aConsole) sl@0: { sl@0: } sl@0: sl@0: CKeytoolConsoleView::~CKeytoolConsoleView() sl@0: { sl@0: } sl@0: sl@0: void CKeytoolConsoleView::ConstructL() sl@0: { sl@0: sl@0: } sl@0: sl@0: void CKeytoolConsoleView::DisplayUsage() sl@0: { sl@0: } sl@0: sl@0: void CKeytoolConsoleView::BoilerPlate() sl@0: { sl@0: sl@0: } sl@0: sl@0: void CKeytoolConsoleView::DisplayKeyInfoL(CCTKeyInfo& aKey, TBool aIsDetailed, TBool aPageWise) sl@0: { sl@0: // Display the key infos sl@0: KeyToolUtils::PrintInfoL(_L("\n"), aPageWise); sl@0: KeyToolUtils::PrintKeyInfoL(aKey, aIsDetailed, aPageWise); sl@0: } sl@0: sl@0: void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TInt aErrorCode, TBool aPageWise) sl@0: { sl@0: KeyToolUtils::PrintInfoL(_L("\n"), aPageWise); sl@0: KeyToolUtils::PrintInfoL(aError); sl@0: KeyToolUtils::PrintInfoL(_L("\nError code: ")); sl@0: KeyToolUtils::WriteErrorL(aErrorCode); sl@0: } sl@0: sl@0: void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TBool aPageWise) sl@0: { sl@0: KeyToolUtils::PrintInfoL(_L("\n"), aPageWise); sl@0: KeyToolUtils::PrintInfoL(aError); sl@0: } sl@0: sl@0: void CKeytoolConsoleView::DisplayCertL(CCTCertInfo& aCert, CCertificate& aCertificate, RUidArray aApps, TBool aTrusted, TBool aIsDetailed, TBool aPageWise) sl@0: { sl@0: // Display the cert infos sl@0: KeyToolUtils::PrintInfoL(_L("\n"), aPageWise); sl@0: KeyToolUtils::PrintCertInfoL(aCert, aCertificate, aApps, aTrusted, aIsDetailed, aPageWise); sl@0: } sl@0: sl@0: