appfw/apparchitecture/aplist/aplapplist.cpp
changeset 81 676b6116ca93
parent 46 eea20ed08f4b
equal deleted inserted replaced
78:175a0d824084 81:676b6116ca93
    25 #include <s32mem.h>				// RBufWriteStream
    25 #include <s32mem.h>				// RBufWriteStream
    26 #include "aplappinforeader.h"
    26 #include "aplappinforeader.h"
    27 #include "apsiconcaptionoverride.h"
    27 #include "apsiconcaptionoverride.h"
    28 #ifdef SYMBIAN_BAFL_SYSUTIL
    28 #ifdef SYMBIAN_BAFL_SYSUTIL
    29 #include <bafl/sysutil.h>
    29 #include <bafl/sysutil.h>
       
    30 #endif
       
    31 #include "OstTraceDefinitions.h"
       
    32 #ifdef OST_TRACE_COMPILER_IN_USE
       
    33 #include "aplapplistTraces.h"
    30 #endif
    34 #endif
    31 
    35 
    32 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
    36 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
    33 #include<usif/scr/scr.h>
    37 #include<usif/scr/scr.h>
    34 #include<usif/scr/appregentries.h>
    38 #include<usif/scr/appregentries.h>
   588 
   592 
   589 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK   
   593 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK   
   590 // Stop scanning applications if installation or uninstallation has started	
   594 // Stop scanning applications if installation or uninstallation has started	
   591 EXPORT_C void CApaAppList::StopScan(TBool aNNAInstall)
   595 EXPORT_C void CApaAppList::StopScan(TBool aNNAInstall)
   592 	{
   596 	{
       
   597     OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_FLOW, CAPAAPPLIST_STOPSCAN, "CApaAppList::StopScan;aNNAInstall=%d", aNNAInstall );
       
   598     
   593 	if (aNNAInstall)
   599 	if (aNNAInstall)
   594 		{
   600 		{
   595 		iNNAInstallation = ETrue;
   601 		iNNAInstallation = ETrue;
   596 		}
   602 		}
   597 	if (iAppIdler)
   603 	if (iAppIdler)
   609 	StartIdleUpdateL();
   615 	StartIdleUpdateL();
   610 	}
   616 	}
   611 
   617 
   612 EXPORT_C TBool CApaAppList::AppListUpdatePending()
   618 EXPORT_C TBool CApaAppList::AppListUpdatePending()
   613 	{
   619 	{
   614 	return iNNAInstallation;
   620     OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_FLOW, CAPAAPPLIST_APPLISTUPDATEPENDING, "CApaAppList::AppListUpdatePending;iNNAInstallation=%d", iNNAInstallation );
       
   621     return iNNAInstallation;
   615 	}
   622 	}
   616 #endif
   623 #endif
   617 
   624 
   618 EXPORT_C void CApaAppList::StartIdleUpdateL()
   625 EXPORT_C void CApaAppList::StartIdleUpdateL()
   619 /** Updates the list asynchronously, using an idle time active object, 
   626 /** Updates the list asynchronously, using an idle time active object, 
  1298 	{
  1305 	{
  1299     
  1306     
  1300 	TBool more=EFalse;
  1307 	TBool more=EFalse;
  1301 	TApaAppEntry currentApp = TApaAppEntry();
  1308 	TApaAppEntry currentApp = TApaAppEntry();
  1302 	TRAPD(err, more = iAppRegFinder->NextL(currentApp, *iForcedRegistrations));
  1309 	TRAPD(err, more = iAppRegFinder->NextL(currentApp, *iForcedRegistrations));
       
  1310 	OstTraceDef1( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, CAPAAPPLIST_IDLEUPDATEL, "iAppRegFinder-> NextL returned with ;more=%d", more );
       
  1311 	
  1303 	if (err!=KErrNone)
  1312 	if (err!=KErrNone)
  1304 		{
  1313 		{
  1305 		if (iFlags & ENotifyUpdateOnFirstScanComplete)
  1314 		if (iFlags & ENotifyUpdateOnFirstScanComplete)
  1306 			User::Leave(err);
  1315 			User::Leave(err);
  1307 
  1316 		
       
  1317 		OstTraceDef0( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, DUP1_CAPAAPPLIST_IDLEUPDATEL, "CApaAppList::IdleUpdateL will return with more value returned by iAppRegFinder->NextL" );
  1308 		return more;
  1318 		return more;
  1309 		}
  1319 		}
  1310 	TBool hasChanged=EFalse;
  1320 	TBool hasChanged=EFalse;
  1311 	if (more)
  1321 	if (more)
  1312 		{
  1322 		{
  1314 		if (err!=KErrNone)
  1324 		if (err!=KErrNone)
  1315 			{
  1325 			{
  1316 			SetNotFound(iAppData,hasChanged);
  1326 			SetNotFound(iAppData,hasChanged);
  1317 			if (iFlags & ENotifyUpdateOnFirstScanComplete)
  1327 			if (iFlags & ENotifyUpdateOnFirstScanComplete)
  1318 				User::Leave(err);
  1328 				User::Leave(err);
  1319 
  1329 			
       
  1330 			OstTraceDef0( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_NORMAL, DUP2_CAPAAPPLIST_IDLEUPDATEL, "UpdayeNextAppL returned with error, so set more to EFalse" );
  1320 			more=EFalse; // abandon ship
  1331 			more=EFalse; // abandon ship
  1321 			}
  1332 			}
  1322 		}
  1333 		}
  1323 	else
  1334 	else
  1324 		{
  1335 		{
  1694 */
  1705 */
  1695 EXPORT_C void CApaAppList::AddForcedRegistrationL(const TDesC& aRegistrationFile)
  1706 EXPORT_C void CApaAppList::AddForcedRegistrationL(const TDesC& aRegistrationFile)
  1696 	{
  1707 	{
  1697 	TInt err = iForcedRegistrations->InsertIsqL(aRegistrationFile, ECmpFolded);
  1708 	TInt err = iForcedRegistrations->InsertIsqL(aRegistrationFile, ECmpFolded);
  1698 	if (err != KErrAlreadyExists) // We silently ignore attempts to insert duplicates
  1709 	if (err != KErrAlreadyExists) // We silently ignore attempts to insert duplicates
  1699 		User::LeaveIfError(err);
  1710 	    {
  1700 	
  1711         OstTraceDef0( OST_TRACE_CATEGORY_DEBUG, APPARC_TRACE_FLOW, CAPAAPPLIST_ADDFORCEDREGISTRATIONL, "Ignore attempts to insert duplicated in iForcedRegistration array. Leave with any other error" );
       
  1712         User::LeaveIfError(err);
       
  1713 	    }
  1701 	} //lint !e818 Suppress pointer parameter 'aRegistrationFile' could be declared as pointing to const
  1714 	} //lint !e818 Suppress pointer parameter 'aRegistrationFile' could be declared as pointing to const
  1702 	
  1715 	
  1703 EXPORT_C void CApaAppList::ResetForcedRegistrations()
  1716 EXPORT_C void CApaAppList::ResetForcedRegistrations()
  1704 	{
  1717 	{
  1705 	if(iForcedRegistrations)
  1718 	if(iForcedRegistrations)