appfw/apparchitecture/tef/t_abstractnonnativeappsstep.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21  
       
    22 #ifndef T_ABSTRACT_NONNATIVEAPPS_STEP_H
       
    23 #define T_ABSTRACT_NONNATIVEAPPS_STEP_H
       
    24 
       
    25 #include <test/testexecutestepbase.h>
       
    26 #include "appfwk_test_utils.h"
       
    27 #include "testableapalssession.h"
       
    28 
       
    29 const TInt KApplicationType = 0x102081A0;
       
    30 _LIT(KLitNativeExecutable, "z:\\sys\\bin\\dummy.exe");
       
    31 _LIT(KLitUpdatedAppsList, "c:\\private\\10003a3f\\UpdatedAppsList.bin");
       
    32 
       
    33 class CT_AbstractNonNativeAppsTestStep : public CTestStep
       
    34 	{
       
    35 public:
       
    36 	CT_AbstractNonNativeAppsTestStep();
       
    37 	~CT_AbstractNonNativeAppsTestStep();
       
    38 
       
    39 public:
       
    40 	struct TTestAppDetails 
       
    41 		{
       
    42 		inline TTestAppDetails(TInt aAppUid, const TDesC& aLogicalExecutable, const TDesC& aRegistrationFile) :
       
    43 				iAppUid(aAppUid),
       
    44 				iLogicalExecutable(aLogicalExecutable),
       
    45 				iRegistrationFile(aRegistrationFile)
       
    46 			{
       
    47 			}
       
    48 		TInt iAppUid;
       
    49 		const TDesC& iLogicalExecutable;
       
    50 		const TDesC& iRegistrationFile;
       
    51 		};
       
    52 
       
    53 protected:
       
    54 	void doAbstractNonNativeAppsTestStepPreambleL();
       
    55 	static void CleanupAndResetL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    56 	static void CallRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    57 	static void CompleteRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    58 	static void CallDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    59 	static void CompleteDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    60 	TBool FilePresent(const TDesC& aFile);
       
    61 	TBool FileAbsent(const TDesC& aFile);
       
    62 	TBool AppPresent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    63 	TBool AppAbsent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp);
       
    64 
       
    65 protected:
       
    66 	RTestableApaLsSession iSession;
       
    67 	RSmlTestUtils iUtils;
       
    68 	};
       
    69 	
       
    70 #endif // T_ABSTRACT_NONNATIVEAPPS_STEP_H