installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp
changeset 25 98b66e4fb0be
parent 24 84a16765cd86
equal deleted inserted replaced
24:84a16765cd86 25:98b66e4fb0be
    22 */
    22 */
    23 
    23 
    24 #include "scrcomponentspecific.h"
    24 #include "scrcomponentspecific.h"
    25 
    25 
    26 #include <usif/scr/scr.h>
    26 #include <usif/scr/scr.h>
       
    27 #include <usif/scr/appregentries.h>
    27 #include <scs/cleanuputils.h>
    28 #include <scs/cleanuputils.h>
    28 #include <e32def.h>
    29 #include <e32def.h>
    29 
    30 
    30 _LIT(KScrCompSecName, "SCR Component-specific APIs test");
    31 _LIT(KScrCompSecName, "SCR Component-specific APIs test");
    31 
    32 
   136 	
   137 	
   137 	TRAP(err, scrSession.DeleteComponentDependencyL(*supplierGlobalId, *dependantGlobalId));
   138 	TRAP(err, scrSession.DeleteComponentDependencyL(*supplierGlobalId, *dependantGlobalId));
   138 	CheckFailL(err, _L("DeleteComponentDependencyL"));
   139 	CheckFailL(err, _L("DeleteComponentDependencyL"));
   139 	CleanupStack::PopAndDestroy(3, dependantGlobalId); // dependantGlobalId, supplierGlobalId, supplierVerCompId
   140 	CleanupStack::PopAndDestroy(3, dependantGlobalId); // dependantGlobalId, supplierGlobalId, supplierVerCompId
   140 	
   141 	
       
   142 	//TODO: The addition of AppRegInfo needs to be optimized
       
   143 	RPointerArray<HBufC> ownedFileArray;
       
   144     RPointerArray<Usif::CServiceInfo> serviceInfoArray;
       
   145     RPointerArray<Usif::CLocalizableAppInfo> localizableAppInfoArray;
       
   146     RPointerArray<Usif::CPropertyEntry> appPropertyArray;
       
   147 	RPointerArray<Usif::COpaqueData> opaqueDataArray;
       
   148     TUid appUid = TUid::Uid(123454321);
       
   149      
       
   150     TApplicationCharacteristics appCharacteristics;
       
   151     const Usif::CApplicationRegistrationData* appRegData = Usif::CApplicationRegistrationData::NewLC(ownedFileArray, serviceInfoArray, localizableAppInfoArray, appPropertyArray, opaqueDataArray, appUid, _L("SomeFile"), appCharacteristics, 0);
       
   152     TRAP(err, scrSession.AddApplicationEntryL(componentId, *appRegData));
       
   153 	CleanupStack::PopAndDestroy();
       
   154 	CheckFailL(err, _L("AddApplicationEntryL"));
       
   155 	
       
   156 	TRAP(err, scrSession.DeleteApplicationEntriesL(componentId));
       
   157 	CheckFailL(err, _L("DeleteApplicationEntryL"));
       
   158 
   141 	// Verify transaction APIs - can be invoked only by an installer
   159 	// Verify transaction APIs - can be invoked only by an installer
   142 	TRAP(err, scrSession.CreateTransactionL());
   160 	TRAP(err, scrSession.CreateTransactionL());
   143 	CheckFailL(err, _L("CreateTransactionL"));
   161 	CheckFailL(err, _L("CreateTransactionL"));
   144 	
   162 	
   145 	TRAP(err, scrSession.RollbackTransactionL());
   163 	TRAP(err, scrSession.RollbackTransactionL());