--- a/installationservices/swi/source/uiss/client/sisuihandler.cpp Thu Aug 19 10:02:49 2010 +0300
+++ b/installationservices/swi/source/uiss/client/sisuihandler.cpp Tue Aug 31 15:21:33 2010 +0300
@@ -61,10 +61,13 @@
{
return;
}
-
+ TInt progressAmount = aAmount;
+
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
_LIT(KProgressorPanicDescriptor, "UISSCLIENT:The progress bar value publisher has not been set!");
__ASSERT_ALWAYS(iPublisher, User::Panic(KProgressorPanicDescriptor,KErrAbort));
- TInt progressAmount = iPublisher->CalculateProgressBarValue(aAmount);
+ progressAmount = iPublisher->UpdateProgressBarValueL(aAmount);
+#endif
if (progressAmount != 0)
{
@@ -78,13 +81,12 @@
CleanupStack::PopAndDestroy(event);
}
}
-
-
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
EXPORT_C void RUiHandler::SetProgressBarValuePublisher(CProgressBarValuePublisher* aPublisher)
{
iPublisher = aPublisher;
}
-
+#endif
// CUissCmd
@@ -119,6 +121,7 @@
// default base class version which does not do any unmarshalling
}
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
// CProgressBarValuePublisher
CProgressBarValuePublisher::CProgressBarValuePublisher()
{
@@ -142,8 +145,8 @@
void CProgressBarValuePublisher::ConstructL()
{
- iLastPercentCompletion = 0;
- iLastProgressValue = 0;
+ // Initialize the value of the install progress bar property
+ User::LeaveIfError(RProperty::Set(KUidInstallServerCategory, KUidSwiProgressBarValueKey, 0));
}
EXPORT_C void CProgressBarValuePublisher::SetFinalProgressBarValue(TInt aValue)
@@ -151,7 +154,7 @@
iFinalProgressValue = aValue;
}
-EXPORT_C TInt CProgressBarValuePublisher::CalculateProgressBarValue(TInt aValue)
+EXPORT_C TInt CProgressBarValuePublisher::UpdateProgressBarValueL(TInt aValue)
{
iCurrentProgressValue += aValue;
TUint percentage = (iFinalProgressValue <= 0) ? 100 : (iCurrentProgressValue * 100) / iFinalProgressValue;
@@ -159,8 +162,11 @@
{
TInt amountCompleted = iCurrentProgressValue - iLastProgressValue;
iLastProgressValue = iCurrentProgressValue;
+ iLastPercentCompletion = percentage;
+ User::LeaveIfError(RProperty::Set(KUidInstallServerCategory, KUidSwiProgressBarValueKey, percentage));
return amountCompleted;
}
return 0;
}
+#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
} // namespace Swi