installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp
changeset 25 98b66e4fb0be
parent 24 84a16765cd86
--- a/installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp	Fri Mar 19 09:33:35 2010 +0200
+++ b/installationservices/swinstallationfw/test/securitytests/source/scrcomponentspecific.cpp	Fri Apr 16 15:05:20 2010 +0300
@@ -24,6 +24,7 @@
 #include "scrcomponentspecific.h"
 
 #include <usif/scr/scr.h>
+#include <usif/scr/appregentries.h>
 #include <scs/cleanuputils.h>
 #include <e32def.h>
 
@@ -138,6 +139,23 @@
 	CheckFailL(err, _L("DeleteComponentDependencyL"));
 	CleanupStack::PopAndDestroy(3, dependantGlobalId); // dependantGlobalId, supplierGlobalId, supplierVerCompId
 	
+	//TODO: The addition of AppRegInfo needs to be optimized
+	RPointerArray<HBufC> ownedFileArray;
+    RPointerArray<Usif::CServiceInfo> serviceInfoArray;
+    RPointerArray<Usif::CLocalizableAppInfo> localizableAppInfoArray;
+    RPointerArray<Usif::CPropertyEntry> appPropertyArray;
+	RPointerArray<Usif::COpaqueData> opaqueDataArray;
+    TUid appUid = TUid::Uid(123454321);
+     
+    TApplicationCharacteristics appCharacteristics;
+    const Usif::CApplicationRegistrationData* appRegData = Usif::CApplicationRegistrationData::NewLC(ownedFileArray, serviceInfoArray, localizableAppInfoArray, appPropertyArray, opaqueDataArray, appUid, _L("SomeFile"), appCharacteristics, 0);
+    TRAP(err, scrSession.AddApplicationEntryL(componentId, *appRegData));
+	CleanupStack::PopAndDestroy();
+	CheckFailL(err, _L("AddApplicationEntryL"));
+	
+	TRAP(err, scrSession.DeleteApplicationEntriesL(componentId));
+	CheckFailL(err, _L("DeleteApplicationEntryL"));
+
 	// Verify transaction APIs - can be invoked only by an installer
 	TRAP(err, scrSession.CreateTransactionL());
 	CheckFailL(err, _L("CreateTransactionL"));