os/security/cryptoservices/filebasedcertificateandkeystores/test/keytool/keytool_view_imp.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoservices/filebasedcertificateandkeystores/test/keytool/keytool_view_imp.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,84 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#include "keytool_defs.h"
1.23 +#include "keytool_view_imp.h"
1.24 +
1.25 +#include <e32cons.h>
1.26 +#include "keytool_utils.h"
1.27 +
1.28 +
1.29 +/*static*/ CKeytoolConsoleView* CKeytoolConsoleView::NewLC(CConsoleBase& aConsole)
1.30 + {
1.31 + CKeytoolConsoleView* self = new (ELeave) CKeytoolConsoleView(aConsole);
1.32 + CleanupStack::PushL(self);
1.33 + self->ConstructL();
1.34 + return self;
1.35 + }
1.36 +
1.37 +CKeytoolConsoleView::CKeytoolConsoleView(CConsoleBase& aConsole) : iConsole(aConsole)
1.38 + {
1.39 + }
1.40 +
1.41 +CKeytoolConsoleView::~CKeytoolConsoleView()
1.42 + {
1.43 + }
1.44 +
1.45 +void CKeytoolConsoleView::ConstructL()
1.46 + {
1.47 +
1.48 + }
1.49 +
1.50 +void CKeytoolConsoleView::DisplayUsage()
1.51 + {
1.52 + }
1.53 +
1.54 +void CKeytoolConsoleView::BoilerPlate()
1.55 + {
1.56 +
1.57 + }
1.58 +
1.59 +void CKeytoolConsoleView::DisplayKeyInfoL(CCTKeyInfo& aKey, TBool aIsDetailed, TBool aPageWise)
1.60 + {
1.61 + // Display the key infos
1.62 + KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
1.63 + KeyToolUtils::PrintKeyInfoL(aKey, aIsDetailed, aPageWise);
1.64 + }
1.65 +
1.66 + void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TInt aErrorCode, TBool aPageWise)
1.67 + {
1.68 + KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
1.69 + KeyToolUtils::PrintInfoL(aError);
1.70 + KeyToolUtils::PrintInfoL(_L("\nError code: "));
1.71 + KeyToolUtils::WriteErrorL(aErrorCode);
1.72 + }
1.73 +
1.74 + void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TBool aPageWise)
1.75 + {
1.76 + KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
1.77 + KeyToolUtils::PrintInfoL(aError);
1.78 + }
1.79 +
1.80 + void CKeytoolConsoleView::DisplayCertL(CCTCertInfo& aCert, CCertificate& aCertificate, RUidArray aApps, TBool aTrusted, TBool aIsDetailed, TBool aPageWise)
1.81 + {
1.82 + // Display the cert infos
1.83 + KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
1.84 + KeyToolUtils::PrintCertInfoL(aCert, aCertificate, aApps, aTrusted, aIsDetailed, aPageWise);
1.85 + }
1.86 +
1.87 +