os/security/cryptoservices/filebasedcertificateandkeystores/test/keytool/keytool_view_imp.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #include "keytool_defs.h"
    20 #include "keytool_view_imp.h"
    21 
    22 #include <e32cons.h>
    23 #include "keytool_utils.h"
    24 
    25 
    26 /*static*/ CKeytoolConsoleView* CKeytoolConsoleView::NewLC(CConsoleBase& aConsole)
    27 	{
    28 	CKeytoolConsoleView* self = new (ELeave) CKeytoolConsoleView(aConsole);
    29 	CleanupStack::PushL(self);
    30 	self->ConstructL();
    31 	return self;
    32 	}
    33 
    34 CKeytoolConsoleView::CKeytoolConsoleView(CConsoleBase& aConsole) : iConsole(aConsole)
    35 	{	
    36 	}
    37 	
    38 CKeytoolConsoleView::~CKeytoolConsoleView()
    39 	{	
    40 	}
    41 	
    42 void CKeytoolConsoleView::ConstructL()
    43 	{
    44 	
    45 	}
    46 
    47 void CKeytoolConsoleView::DisplayUsage()
    48 	{	
    49 	}
    50 	
    51 void CKeytoolConsoleView::BoilerPlate()
    52 	{
    53 	
    54 	}
    55 	
    56 void CKeytoolConsoleView::DisplayKeyInfoL(CCTKeyInfo& aKey, TBool aIsDetailed, TBool aPageWise)
    57 	{
    58 	// Display the key infos
    59 	KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
    60 	KeyToolUtils::PrintKeyInfoL(aKey, aIsDetailed, aPageWise);
    61 	}
    62 	
    63  void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TInt aErrorCode, TBool aPageWise)
    64 	{
    65 	KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
    66 	KeyToolUtils::PrintInfoL(aError);
    67 	KeyToolUtils::PrintInfoL(_L("\nError code: "));
    68 	KeyToolUtils::WriteErrorL(aErrorCode);
    69 	}
    70 	 	
    71  void CKeytoolConsoleView::DisplayErrorL(const TDesC& aError, TBool aPageWise)
    72 	{
    73 	KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
    74 	KeyToolUtils::PrintInfoL(aError);
    75 	}
    76 	
    77  void CKeytoolConsoleView::DisplayCertL(CCTCertInfo& aCert, CCertificate& aCertificate, RUidArray aApps, TBool aTrusted, TBool aIsDetailed, TBool aPageWise)
    78  	{
    79 	// Display the cert infos
    80  	KeyToolUtils::PrintInfoL(_L("\n"), aPageWise);
    81 	KeyToolUtils::PrintCertInfoL(aCert, aCertificate, aApps, aTrusted, aIsDetailed, aPageWise);
    82  	}
    83 
    84