installationservices/swi/test/tuiscriptadaptors/tswisstep.cpp
branchRCL_3
changeset 34 741e5bba2bd1
parent 19 7ca52d38f8c3
child 65 7333d7932ef7
--- a/installationservices/swi/test/tuiscriptadaptors/tswisstep.cpp	Tue Apr 27 16:46:15 2010 +0300
+++ b/installationservices/swi/test/tuiscriptadaptors/tswisstep.cpp	Tue May 11 16:20:28 2010 +0300
@@ -2973,4 +2973,40 @@
 	return reinterpret_cast<CAppSidChecker*>(ptr);
 	}
 #endif
+
+/////
+//Step to Set RemoveWithLastDependent property
+/////
+
+CSwisSetRemoveWithLastDependent::CSwisSetRemoveWithLastDependent()
+    {
+    }
+
+CSwisSetRemoveWithLastDependent::~CSwisSetRemoveWithLastDependent()
+    {
+    }
+
+TVerdict CSwisSetRemoveWithLastDependent::doTestStepL()
+    {
+    RSisRegistrySession registrySession;
+    User::LeaveIfError(registrySession.Connect());
+    CleanupClosePushL(registrySession);
+    
+    TInt packageUid = 0;
+    GetHexFromConfig(ConfigSection(),_L("packageUid"),packageUid);    
+    TUid expectedPkgUid = TUid::Uid(packageUid);
+    RSisRegistryEntry regEntry;
+    CleanupClosePushL(regEntry);
+    User::LeaveIfError(regEntry.Open(registrySession, expectedPkgUid));
+    TRAPD(err, regEntry.SetRemoveWithLastDependentL(expectedPkgUid));
+    if(KErrNone == err)
+        SetTestStepResult(EPass);
+    else
+        SetTestStepResult(EFail);
+
+    CleanupStack::PopAndDestroy(2, &registrySession);
+    return TestStepResult();
+    
+    }
+
 // End of file