testexecfw/stf/stfext/testlibplugins/syslibplugin/src/TestSecurityInstUIHandler.cpp
author Johnson Ma <johnson.ma@nokia.com>
Fri, 09 Apr 2010 10:46:28 +0800
changeset 2 8bb370ba6d1d
permissions -rw-r--r--
contribute STF 1.0.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     1
/*
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     8
*
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    11
*
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    12
* Contributors:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    13
* 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    14
* Description: This file contains the header file of the CAtsLogger 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    15
* class.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    16
*
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    17
*/
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    18
#include "TestSecurityInstUIHandler.h"
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    19
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    20
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    21
 * Creates a new Instance of the CTestSecurityInstUIHandler and calls the
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    22
 * appropriate ConsturctL
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    23
 * @param None
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    24
 * @return CTestSecurityInstUIHandler* 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    25
 * 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    26
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    27
CTestSecurityInstUIHandler* CTestSecurityInstUIHandler::NewL()
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    28
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    29
	CTestSecurityInstUIHandler*	self=new(ELeave) CTestSecurityInstUIHandler();
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    30
	CleanupStack::PushL(self);
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    31
	self->ConstructL();
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    32
	CleanupStack::Pop();
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    33
	return self;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    34
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    35
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    36
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    37
 * Constructor for CTestSecurityInstUIHandler
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    38
 */	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    39
CTestSecurityInstUIHandler::CTestSecurityInstUIHandler()
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    40
:	iDispInstall(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    41
	iDispGrantCapabilities(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    42
	iDispUnInstall(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    43
	iDispLanguage(0),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    44
	iDispDialect(0),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    45
	iDispDrive('C'),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    46
	iDispUpgrade(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    47
	iDispDependencyBreak(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    48
	iDispQuestion(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    49
	iDispSecurityWarning(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    50
	iDispRevocationQuery(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    51
	iDispApplicationInUse(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    52
	iDispTextDialog(TRUE),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    53
	iDispOptions(0),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    54
	iAppUID(0),
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    55
	iErrCode(KErrNothing)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    56
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    57
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    58
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    59
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    60
 * Second stage constructor for CTestSecurityInstUIHandler
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    61
 */	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    62
void CTestSecurityInstUIHandler::ConstructL()
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    63
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    64
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    65
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    66
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    67
 * Destructor for CTestSecurityInstUIHandler
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    68
 */	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    69
CTestSecurityInstUIHandler::~CTestSecurityInstUIHandler()
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    70
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    71
	iDispInstall = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    72
	iDispGrantCapabilities = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    73
	iDispUnInstall = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    74
	iDispLanguage = 0;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    75
	iDispDialect = 0;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    76
	iDispDrive = 'C';
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    77
	iDispUpgrade = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    78
	iDispDependencyBreak = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    79
	iDispQuestion = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    80
	iDispSecurityWarning = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    81
	iDispRevocationQuery = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    82
	iDispApplicationInUse = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    83
	iDispTextDialog = FALSE;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    84
	iDispOptions = 0;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    85
	iAppUID = 0;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    86
		
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    87
	iErrCode = KErrNothing;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    88
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    89
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    90
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    91
 * Displays a dialog at the beginning of an installation with details about the SISX package
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    92
 * being installed. This dialog must be shown in TrustedUI mode.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    93
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    94
 * @param aAppInfo		Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    95
 * @param aLogo			The logo data in the SISX file. If no logo is present it will be NULL.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    96
 * @param aCertificates An array of end entity certificates, one for each chain in the SISX file.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    97
 *						If the SISX file is unsigned this array will have zero length.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    98
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    99
 * @note 				Trusted UI
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   100
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   101
 * @return				ETrue if the user pressed the Yes button to continue the install,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   102
 *						EFalse if the user pressed the No button, aborting the installation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   103
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   104
TBool CTestSecurityInstUIHandler::DisplayInstallL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   105
			const CApaMaskedBitmap* /*aLogo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   106
			const RPointerArray< CCertificateInfo >& /*aCertificates*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   107
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   108
	return iDispInstall;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   109
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   110
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   111
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   112
 * Displays a dialog requesting that the user grants these capabilities to the SISX package 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   113
 * being installed. This dialog must be shown in TrustedUI mode.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   114
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   115
 * @param aAppInfo	 		Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   116
 * @param aCapabilitySet 	The capabilities requested by the SISX package.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   117
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   118
 * @note 					Trusted UI
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   119
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   120
 * @return					ETrue to continue the installation, or EFalse to abort the installation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   121
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   122
TBool CTestSecurityInstUIHandler::DisplayGrantCapabilitiesL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   123
			const TCapabilitySet& /*aCapabilitySet*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   124
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   125
	return iDispGrantCapabilities;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   126
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   127
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   128
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   129
 * Requests preferred language and dialect information from the UI.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   130
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   131
 * @param aAppInfo		Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   132
 * @param aLanguages	Array of languages supported by the SIS file. 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   133
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   134
 * @return				Must return index in the passed array that corresponds to the user's selected 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   135
 *						preferred language. If out-of-bounds value is returned, the engine will abort 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   136
 *						installation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   137
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   138
TInt CTestSecurityInstUIHandler::DisplayLanguageL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   139
	      const RArray<TLanguage>& aLanguages)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   140
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   141
	TInt languageCode = iDispLanguage;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   142
	TInt index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   143
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   144
	// Return the index value in the array which matches the language code 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   145
	// obtained from the ini file.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   146
	for (index=0; index<aLanguages.Count(); index++)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   147
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   148
		if (aLanguages[index] == (TLanguage)languageCode)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   149
			{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   150
			return index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   151
			}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   152
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   153
	// Language Code did not match - error
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   154
	iErrCode = KErrLanguage;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   155
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   156
	return languageCode;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   157
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   158
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   159
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   160
 * Requests the drive to install the package on, from the UI.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   161
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   162
 * @param aAppInfo	Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   163
 * @param aSize		Total size of the files that will be installed on the configurable drive.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   164
 * @param aDriveLetters	Array of drive letters on which the package can be installed.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   165
 * @param aDriveSpaces	Array of space free (in bytes) on each of the drives in the aDriveLetters array. 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   166
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   167
 * @return		An index in the drive array. If the index is out of range the engine will abort
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   168
 *                      the installation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   169
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   170
TInt CTestSecurityInstUIHandler::DisplayDriveL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   171
		   TInt64 /*aSize*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   172
		   const RArray<TChar>& aDriveLetters,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   173
		   const RArray<TInt64>& /*aDriveSpaces*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   174
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   175
	TInt index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   176
	TInt driveIndex=0;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   177
	for (index=0; index < aDriveLetters.Count(); index++)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   178
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   179
		if (aDriveLetters[index] == iDispDrive)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   180
			{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   181
			driveIndex = index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   182
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   183
			}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   184
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   185
		
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   186
	if (index == aDriveLetters.Count()) // Out of range error 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   187
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   188
		iErrCode = KErrDrive;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   189
		driveIndex = index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   190
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   191
	return driveIndex;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   192
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   193
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   194
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   195
 * Displays a dialog asking whether we want to upgrade an application present on the device.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   196
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   197
 * @param aAppInfo	        Information about the application being installed.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   198
 * @param aExistingAppInfo	Information about the existing application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   199
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   200
 * @return		ETrue if the user pressed the Yes button,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   201
 *			EFalse if the user pressed the No button.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   202
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   203
TBool CTestSecurityInstUIHandler::DisplayUpgradeL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   204
		      const CAppInfo& /*aExistingAppInfo*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   205
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   206
	return iDispUpgrade;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   207
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   208
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   209
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   210
 * Displays a dialog box asking which options the user wishes to install.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   211
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   212
 * @param aAppInfo	Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   213
 * @param aOptions	An array of option names.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   214
 * @param aSelections	An array of booleans, corresponding to the aOptions array.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   215
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   216
 * @return		ETrue on success, EFalse on error.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   217
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   218
TBool CTestSecurityInstUIHandler::DisplayOptionsL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   219
		      const RPointerArray<TDesC>& aOptions,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   220
		      RArray<TBool>& aSelections)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   221
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   222
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   223
	TInt index;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   224
	TBool setFlag = EFalse;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   225
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   226
	for (index=0; index<aOptions.Count();index++)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   227
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   228
		if (index == iDispOptions)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   229
			{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   230
			aSelections[index] = ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   231
			setFlag = ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   232
			}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   233
		else
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   234
			{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   235
			aSelections[index] = EFalse;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   236
			}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   237
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   238
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   239
	if (setFlag == (TBool)ETrue)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   240
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   241
		return ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   242
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   243
	else
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   244
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   245
		iErrCode = KErrOptions;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   246
		return EFalse;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   247
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   248
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   249
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   250
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   251
 * Informs the UI of events occurring during installation.  
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   252
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   253
 * @param aEvent	The event which has occurred.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   254
 * @param aValue	The value associated with the event if applicable.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   255
 * @param aDes		A descriptor associated with the event if applicable.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   256
 * @return TBool	Always returns ETrue to indicate the Install Event is always handled
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   257
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   258
TBool CTestSecurityInstUIHandler::HandleInstallEventL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   259
			 TInstallEvent aEvent, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   260
			 TInt /*aValue=0*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   261
			 const TDesC& /*aDes=KNullDesC*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   262
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   263
	switch (aEvent)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   264
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   265
		case EEventSetProgressBarFinalValue:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   266
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   267
		case EEventUpdateProgressBar:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   268
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   269
		case EEventAbortedInstall:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   270
			iErrCode = KErrAbortInstall;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   271
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   272
		case EEventCompletedInstall:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   273
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   274
		case EEventCompletedUnInstall:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   275
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   276
		case EEventAbortedUnInstall:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   277
			iErrCode = KErrAbortUnInstall;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   278
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   279
		case EEventCompletedNoMessage:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   280
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   281
		case EEventLeave:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   282
			iErrCode = KErrLeave;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   283
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   284
		case EEventOcspCheckEnd:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   285
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   286
		default:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   287
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   288
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   289
	return ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   290
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   291
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   292
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   293
 * Informs the UI of cancellable events occurring during installation.  
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   294
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   295
 * @param aEvent	 		The event which has occurred.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   296
 * @param aCancelHandler 	This mix-in is used to inform Software Install that the user has
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   297
 *			 				pressed the cancel button on the dialog.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   298
 * @param aValue	 		The value associated with the event if applicable.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   299
 * @param aDes           	A descriptor associated with the event if applicable.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   300
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   301
void CTestSecurityInstUIHandler::HandleCancellableInstallEventL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   302
			TInstallCancellableEvent aEvent, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   303
		    MCancelHandler& /*aCancelHandler*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   304
		    TInt /*aValue=0*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   305
		    const TDesC& /*aDes=KNullDesC*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   306
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   307
	switch (aEvent)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   308
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   309
		case EEventRemovingFiles:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   310
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   311
		case EEventShuttingDownApps:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   312
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   313
		case EEventCopyingFiles:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   314
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   315
		case EEventOcspCheckStart:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   316
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   317
		default:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   318
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   319
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   320
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   321
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   322
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   323
 * Displays a dialog indicating that the package is unsigned, or that signature validation has failed.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   324
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   325
 * @param aAppInfo              Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   326
 * @param aSigValidationResult	The result of signature validation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   327
 * @param aPkixResult           Results of a validation of the PKIX  certificate chain.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   328
 *                              Note that is can be NULL, in this case no validation results are available.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   329
 * @param aCertificates         An array containing information about the certificates in the chain.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   330
 * @param aInstallAnyway		ETrue if installation is allowed to continue.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   331
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   332
 * @return						ETrue to continue the installation, EFalse to abort.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   333
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   334
TBool CTestSecurityInstUIHandler::DisplaySecurityWarningL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   335
						Swi::TSignatureValidationResult /*aSigValidationResult*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   336
						RPointerArray<CPKIXValidationResultBase>& /*aPkixResults*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   337
						RPointerArray<CCertificateInfo>& /*aCertificates*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   338
						TBool /*aInstallAnyway*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   339
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   340
	return ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   341
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   342
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   343
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   344
 * Displays a dialog indicating that there was an error carrying out online certificate status checking.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   345
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   346
 * @param aMessage		The error which occurred during online certificate status checking
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   347
 * @param aOutcome		The outcome of the OCSP check. If no outcome can be given, it will be NULL.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   348
 * @param aWarningOnly	ETrue if the installation is allowed to continue after a warning, EFalse otherwise.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   349
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   350
 * @return				ETrue on success, EFalse on error.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   351
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   352
TBool CTestSecurityInstUIHandler::DisplayOcspResultL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   353
						TRevocationDialogMessage /*aMessage*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   354
						RPointerArray<TOCSPOutcome>& /*aOutcomes*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   355
						RPointerArray<CCertificateInfo>& /*aCertificates*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   356
						TBool aWarningOnly)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   357
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   358
	return aWarningOnly;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   359
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   360
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   361
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   362
 * Used to inform the user the installation they are attempting is trying to overwrite
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   363
 * a file that does not belong to it. Following this message installation is aborted.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   364
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   365
 * @param aAppInfo	        Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   366
 * @param aInstalledAppInfo	Information about the application that owns the file in question.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   367
 * @param aFileName			The filename of the file in question
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   368
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   369
void CTestSecurityInstUIHandler::DisplayCannotOverwriteFileL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   370
				 const CAppInfo& /*aInstalledAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   371
				 const TDesC& /*aFileName*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   372
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   373
	iErrCode = KErrCannotOverwriteFile;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   374
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   375
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   376
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   377
 * Displays a dialog at the start of the uninstallation with information about the application
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   378
 * to be uninstalled. The user may cancel the uninstallation at this stage. This dialog must 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   379
 * be shown in TrustedUI mode.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   380
 *	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   381
 * @param aAppInfo	Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   382
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   383
 * @note Trusted UI
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   384
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   385
 * @return			ETrue to continue the uninstallation, or EFalse to abort the uninstallation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   386
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   387
TBool CTestSecurityInstUIHandler::DisplayUninstallL(const CAppInfo& /*aAppInfo*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   388
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   389
	return iDispUnInstall;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   390
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   391
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   392
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   393
 * Displays a dialog containing text. This dialog has only a Continue button if aOption is 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   394
 * EInstFileTextOptionContinue, or Yes and No buttons otherwise.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   395
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   396
 * @param aAppInfo	Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   397
 * @param aOption	The type of dialog box to display.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   398
 * @param aText		The text to display
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   399
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   400
 * @return		ETrue if the user wants to go forward, EFalse otherwise.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   401
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   402
TBool CTestSecurityInstUIHandler::DisplayTextL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   403
			    TFileTextOption /*aOption*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   404
			    const TDesC& /*aText*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   405
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   406
	return iDispTextDialog;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   407
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   408
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   409
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   410
 * Displays a dialog showing an error message. 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   411
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   412
 * @param aAppInfo	    Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   413
 * @param aType		    The error message to display.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   414
 * @param aParam	    An error specific parameter.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   415
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   416
void CTestSecurityInstUIHandler::DisplayErrorL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   417
			   TErrorDialog /*aType*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   418
			   const TDesC& /*aParam*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   419
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   420
	iErrCode = KErrError;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   421
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   422
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   423
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   424
 * Displays a dialog indicating that a component which is being uninstalled is a dependency
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   425
 * of another component installed.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   426
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   427
 * @param aAppInfo		Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   428
 * @param aComponents	An array of components which depend on components of the application
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   429
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   430
 * @return				ETrue to continue the uninstallation, EFalse to abort.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   431
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   432
TBool CTestSecurityInstUIHandler::DisplayDependencyBreakL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   433
		      const RPointerArray<TDesC>& /*aComponents*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   434
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   435
	return iDispDependencyBreak;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   436
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   437
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   438
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   439
 * Informs user that the applications are in use during an uninstallation.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   440
 * Return ETrue if the user wishes to continue the removal process and 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   441
 * close the applications anyway
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   442
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   443
 * @param aAppNames		An array containing the name of the application in use.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   444
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   445
 * @return				ETrue if the user wishes to continue with removal.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   446
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   447
TBool CTestSecurityInstUIHandler::DisplayApplicationsInUseL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   448
			const RPointerArray<TDesC>& /*aAppNames*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   449
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   450
	return iDispApplicationInUse;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   451
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   452
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   453
/**
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   454
 * Displays a generic question dialog with a Yes/No answer.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   455
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   456
 * @param aAppInfo	Information about the application.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   457
 * @param aQuestion The question to ask.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   458
 * @param aDes		A descriptor associated with the question if applicable. 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   459
 *
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   460
 * @return			ETrue if the user pressed the Yes button,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   461
 *					EFalse if the user pressed the No button.
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   462
 */
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   463
TBool CTestSecurityInstUIHandler::DisplayQuestionL(const CAppInfo& /*aAppInfo*/, 
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   464
			TQuestionDialog aQuestion, const TDesC& /*aDes=KNullDesC*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   465
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   466
	
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   467
	switch(aQuestion)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   468
		{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   469
		case EQuestionIncompatible:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   470
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   471
		default:
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   472
			break;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   473
		}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   474
		
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   475
	return iDispQuestion;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   476
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   477
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   478
TBool CTestSecurityInstUIHandler::DisplayMissingDependencyL(const CAppInfo& /*aAppInfo*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   479
	const TDesC& /*aDependencyName*/,TVersion /*aWantedVersionFrom*/,
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   480
	TVersion /*aWantedVersionTo*/,TVersion /*aInstalledVersion*/)
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   481
	{
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   482
	return ETrue;
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   483
	}
8bb370ba6d1d contribute STF 1.0.0
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   484