Revision: 201019 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 13:01:39 +0300
branchRCL_3
changeset 22 1b207dd38b72
parent 19 edd621764147
child 23 ace62b58f4b2
Revision: 201019 Kit: 2010121
contentcontrolsrv/ccsrv/group/ccsrv.mmp
contentcontrolsrv/ccsrv/src/ccsrv.cpp
contentcontrolsrv/ccsrv/src/ccsrvsession.cpp
contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h
contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp
homescreenpluginsrv/hspsmanager/bwins/hspsclientu.def
homescreenpluginsrv/hspsmanager/client/hspsclient.cpp
homescreenpluginsrv/hspsmanager/eabi/hspsclientu.def
homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h
homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h
homescreenpluginsrv/hspsmanager/inc/hspsrominstaller.h
homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h
homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h
homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp
homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp
homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp
homescreenpluginsrv/inc/hspsclient.h
homescreenpluginsrv/inc/hspsthememanagement.h
homescreensrv_plat/hs_content_control_api/inc/hscontentcontrol.h
homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h
homescreensrv_plat/hs_content_control_api/inc/hscontentinfo.h
homescreensrv_plat/hs_content_control_api/inc/hscontentinfoarray.h
homescreensrv_plat/sapi_homescreenplugin/hspsservice/bwins/hspsserviceu.def
homescreensrv_plat/sapi_homescreenplugin/hspsservice/eabi/hspsserviceu.def
homescreensrv_plat/sapi_homescreenplugin/hspsservice/inc/hspspersonalisationservice.h
homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspspersonalisationservice.cpp
homescreensrv_plat/sapi_homescreenplugin/inc/hspsliwvocabulary.hrh
homescreensrv_plat/sapi_homescreenplugin/src/hspsconfigurationif.cpp
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_restoreconfigurations_1.h
homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp
idlefw/plugins/devicestatus/src/aisimregpublisher.cpp
menucontentsrv/bwins/mcsmenuengu.def
menucontentsrv/bwins/mcsmenuu.def
menucontentsrv/eabi/mcsmenuengu.def
menucontentsrv/eabi/mcsmenuu.def
menucontentsrv/eabi/mcssathandleru.def
menucontentsrv/enginc/menuengobject.h
menucontentsrv/engsrc/menuengobject.cpp
menucontentsrv/group/mcsmenu.mmp
menucontentsrv/srvinc/mcsrunningappshandler.h
menucontentsrv/srvinc/menusrvappattributes.h
menucontentsrv/srvinc/menusrvappscanner.h
menucontentsrv/srvinc/menusrvengutils.h
menucontentsrv/srvinc/menusrvtypefilters.h
menucontentsrv/srvsrc/mcsdrmobservermanager.cpp
menucontentsrv/srvsrc/menusrvappattributes.cpp
menucontentsrv/srvsrc/menusrvappscanner.cpp
menucontentsrv/srvsrc/menusrveng.cpp
menucontentsrv/srvsrc/menusrvengutils.cpp
menucontentsrv/srvsrc/menusrvtypefilters.cpp
--- a/contentcontrolsrv/ccsrv/group/ccsrv.mmp	Tue May 11 16:30:05 2010 +0300
+++ b/contentcontrolsrv/ccsrv/group/ccsrv.mmp	Tue May 25 13:01:39 2010 +0300
@@ -23,7 +23,7 @@
 TARGETTYPE      exe
 
 UID             0x1000008d 0x20026f53
-CAPABILITY      ALL -TCB -DRM
+CAPABILITY      CAP_SERVER
 VENDORID        VID_DEFAULT
 SECUREID        0x20026f53
 
--- a/contentcontrolsrv/ccsrv/src/ccsrv.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/contentcontrolsrv/ccsrv/src/ccsrv.cpp	Tue May 25 13:01:39 2010 +0300
@@ -50,7 +50,7 @@
 // Requested capabilities
 const CPolicyServer::TPolicyElement KCcCapability[] = 
         {
-        {_INIT_SECURITY_POLICY_C2( ECapabilityReadUserData, ECapabilityWriteUserData ), CPolicyServer::EFailClient}
+        {_INIT_SECURITY_POLICY_C2( ECapabilityReadDeviceData, ECapabilityWriteDeviceData ), CPolicyServer::EFailClient}
         };
 
 const CPolicyServer::TPolicy KCcPolicy =
--- a/contentcontrolsrv/ccsrv/src/ccsrvsession.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/contentcontrolsrv/ccsrv/src/ccsrvsession.cpp	Tue May 25 13:01:39 2010 +0300
@@ -524,39 +524,27 @@
         // Complete request
         req->Message().Complete( KErrNone );
 
-        if (  aMessage.DataSize() )
-            {
-            // Store request data to be read later
-            // with GetMsgData()
-            req->SetTrId( aMessage.TrId() );
-            req->SetData( aMessage.Data() );
-            iRequests.AppendL( req );
-            CleanupStack::Pop( req );
-            }
-        else
-            {
-            CleanupStack::PopAndDestroy( req );
-            }
+        CleanupStack::PopAndDestroy( req );
         }
-    else
+    
+    // Store message to enable message data requesting later or
+    // to wait receiver to be ready to receive request
+    if ( found && aMessage.DataSize() ||
+         !found && ( aMessage.Function() == ECcApiReq ||
+             aMessage.Function() == ECcApiNtf ) )
         {
-        if ( aMessage.Function() == ECcApiReq ||
-             aMessage.Function() == ECcApiNtf )
-            {
-            // Store message to handled later
-            CCcSrvMsg* msg = CCcSrvMsg::NewL();
-            CleanupStack::PushL( msg );
-            msg->SetFunction( aMessage.Function() );
-            msg->SetSender( aMessage.Sender() );
-            msg->SetReceiver( aMessage.Receiver() );
-            msg->SetMsgId( aMessage.MsgId() );
-            msg->SetTrId( aMessage.TrId() );
-            msg->SetStatus( aMessage.Status() );
-            msg->SetData( aMessage.Data() );
-            iRequests.AppendL( msg );
-            CleanupStack::Pop( msg );
-            }
-        // ECcApiResp are ignored
+        // Store message to handled later
+        CCcSrvMsg* msg = CCcSrvMsg::NewL();
+        CleanupStack::PushL( msg );
+        msg->SetFunction( aMessage.Function() );
+        msg->SetSender( aMessage.Sender() );
+        msg->SetReceiver( aMessage.Receiver() );
+        msg->SetMsgId( aMessage.MsgId() );
+        msg->SetTrId( aMessage.TrId() );
+        msg->SetStatus( aMessage.Status() );
+        msg->SetData( aMessage.Data() );
+        iRequests.AppendL( msg );
+        CleanupStack::Pop( msg );
         }    
     }
 
--- a/contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h	Tue May 11 16:30:05 2010 +0300
+++ b/contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h	Tue May 25 13:01:39 2010 +0300
@@ -99,7 +99,13 @@
 	void RemoveWidgetL( const TDesC& aType, 
         const TDesC& aPublisherId );
 	
-
+    /**
+     * Checks if mass memory is available
+     * @return ETrue if internal mass memory is available in this device
+     *     EFalse if not
+     */
+    TBool InternalMassMemoryAvailable( );
+    
 private:
     
     /**
@@ -140,6 +146,13 @@
      * Mass storage mode flag.
      */
     TBool iMassStorageMode;
+    
+    /*
+     * Flag indicating if mass memory is available on this hardware
+     */
+    TBool iMassMemoryAvailable;
+    
+
 	};
 
 
--- a/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/contentpublishingsrv/contentharvester/contentharvesterswiplugin/src/chswiplugin.cpp	Tue May 25 13:01:39 2010 +0300
@@ -22,6 +22,7 @@
 #include <ecom/implementationproxy.h>
 #include <contentharvesterpluginuids.hrh>
 #include <liwservicehandler.h>
+#include <driveinfo.h>
 
 #include "cpglobals.h"
 #include "chswiusbhandler.h"
@@ -75,6 +76,7 @@
     User::LeaveIfError( iApaLsSession.Connect() );
     User::LeaveIfError( iFs.Connect() );
     
+    iMassMemoryAvailable = InternalMassMemoryAvailable();
     iUsbHandler = CCHSwiUsbHandler::NewL( this, iFs );
     
     iUsbObserver = CCHSwiUsbObserver::NewL( iUsbHandler, iFs );
@@ -280,7 +282,45 @@
 //
 TBool CCHSwiPlugin::IsMassStorageMode()
 	{
-	return iMassStorageMode;
+    if (iMassMemoryAvailable)
+    	{
+    	return iMassStorageMode;
+    	}
+    else
+    	{
+    	return EFalse;
+    	}
 	}
 
+// ----------------------------------------------------------------------------
+//
+// ----------------------------------------------------------------------------
+//
+TBool CCHSwiPlugin::InternalMassMemoryAvailable( )
+    {
+    TBool result(EFalse);
+    // List all drives in the system
+    TDriveList driveList;
+    TInt error = iFs.DriveList( driveList );
+    
+    if ( KErrNone == error )
+        {
+        for ( TInt driveNumber = EDriveY;
+              driveNumber >= EDriveA;
+              driveNumber-- )
+            {
+            TUint status( 0 );
+            TInt error = DriveInfo::GetDriveStatus( iFs, driveNumber, status );
+            if( (KErrNone == error) && ( status & DriveInfo::EDriveExternallyMountable ) 
+            		&& ( status & DriveInfo::EDriveInternal ) )
+                {
+                // Internal Memory
+                result = ETrue;
+                break;
+                }
+            }
+        }
+    return result;
+    }
+
 //  End of File  
--- a/homescreenpluginsrv/hspsmanager/bwins/hspsclientu.def	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/bwins/hspsclientu.def	Tue May 25 13:01:39 2010 +0300
@@ -10,13 +10,13 @@
 	?hspsInstallTheme@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVTDesC16@@AAVChspsODT@@@Z @ 9 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsInstallTheme(class TDesC16 const &, class ChspsODT &)
 	?hspsReinstallConf@ChspsClient@@QAE?AW4ThspsServiceCompletedMessage@@HH@Z @ 10 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsReinstallConf(int, int)
 	?hspsRestoreDefault@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@AAV3@@Z @ 11 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsRestoreDefault(class ChspsODT const &, class ChspsODT &)
-	?hspsRestoreConfigurations@ChspsClient@@QAE?AW4ThspsServiceCompletedMessage@@HH@Z @ 12 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsRestoreConfigurations(int, int)
-	?hspsReplacePlugin@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@HHH@Z @ 13 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsReplacePlugin(int, int, int)
-	?hspsSetActiveTheme@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@AAV3@@Z @ 14 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsSetActiveTheme(class ChspsODT const &, class ChspsODT &)
-	?hspsPluginUpdateL@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@@Z @ 15 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsPluginUpdateL(class ChspsODT const &)
-	?hspsInstallNextPhaseL@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@AAVChspsODT@@@Z @ 16 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsInstallNextPhaseL(class ChspsODT &)
-	?hspsAddPlugin@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@HHHHAAH@Z @ 17 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsAddPlugin(int, int, int, int, int &)
-	?hspsSetPluginSettings@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@HAAVChspsDomDocument@@H@Z @ 18 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsSetPluginSettings(class ChspsODT const &, int, class ChspsDomDocument &, int)
+	?hspsReplacePlugin@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@HHH@Z @ 12 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsReplacePlugin(int, int, int)
+	?hspsSetActiveTheme@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@AAV3@@Z @ 13 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsSetActiveTheme(class ChspsODT const &, class ChspsODT &)
+	?hspsPluginUpdateL@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@@Z @ 14 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsPluginUpdateL(class ChspsODT const &)
+	?hspsInstallNextPhaseL@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@AAVChspsODT@@@Z @ 15 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsInstallNextPhaseL(class ChspsODT &)
+	?hspsAddPlugin@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@HHHHAAH@Z @ 16 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsAddPlugin(int, int, int, int, int &)
+	?hspsSetPluginSettings@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@ABVChspsODT@@HAAVChspsDomDocument@@H@Z @ 17 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsSetPluginSettings(class ChspsODT const &, int, class ChspsDomDocument &, int)
+	?hspsRestoreConfigurations@ChspsClient@@QAE?AW4ThspsServiceCompletedMessage@@HW4ThspsRestore@@@Z @ 18 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsRestoreConfigurations(int, enum ThspsRestore)
 	?NewL@ChspsClient@@SAPAV1@AAVMhspsThemeManagementServiceObserver@@@Z @ 19 NONAME ; class ChspsClient * ChspsClient::NewL(class MhspsThemeManagementServiceObserver &)
 	?SetLogBus@ChspsClient@@QAEXPAX@Z @ 20 NONAME ; void ChspsClient::SetLogBus(void *)
 	?hspsSetActivePlugin@ChspsClient@@UAE?AW4ThspsServiceCompletedMessage@@HH@Z @ 21 NONAME ; enum ThspsServiceCompletedMessage ChspsClient::hspsSetActivePlugin(int, int)
--- a/homescreenpluginsrv/hspsmanager/client/hspsclient.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/client/hspsclient.cpp	Tue May 25 13:01:39 2010 +0300
@@ -896,13 +896,13 @@
 //
 EXPORT_C ThspsServiceCompletedMessage ChspsClient::hspsRestoreConfigurations(
     const TInt aAppUid,
-    const TBool aReinstall )
+    const ThspsRestore aRestore )
     {
     ThspsServiceCompletedMessage ret = EhspsRestoreConfigurationsFailed;
     
     ThspsParamRestoreConfigurations params;
     params.appUid = aAppUid;
-    params.restoreAll = aReinstall;
+    params.restore = aRestore;
 
     ret = ( ThspsServiceCompletedMessage )iSession.RestoreConfigurations( iResultData, params );
     
--- a/homescreenpluginsrv/hspsmanager/eabi/hspsclientu.def	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/eabi/hspsclientu.def	Tue May 25 13:01:39 2010 +0300
@@ -25,7 +25,7 @@
 	_ZN11ChspsClient22hspsCancelInstallThemeEv @ 24 NONAME
 	_ZN11ChspsClient24hspsCancelGetListHeadersEv @ 25 NONAME
 	_ZN11ChspsClient24hspsRestoreActiveAppConfEii @ 26 NONAME
-	_ZN11ChspsClient25hspsRestoreConfigurationsEii @ 27 NONAME
+	_ZN11ChspsClient25hspsRestoreConfigurationsEi12ThspsRestore @ 27 NONAME
 	_ZN11ChspsClient4NewLER35MhspsThemeManagementServiceObserver @ 28 NONAME
 	_ZN11ChspsClient5NewLCER35MhspsThemeManagementServiceObserver @ 29 NONAME
 	_ZN11ChspsClient9SetLogBusEPv @ 30 NONAME
--- a/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Tue May 25 13:01:39 2010 +0300
@@ -209,6 +209,12 @@
          */
         void DisableNotifications();
         
+        /**
+         * Disables installation of UDA and eMMC content.
+         * @since S60 5.2
+         */
+        void DisableUdaEmmcInstallations();
+        
     public: // Functions from base classes
 
         /**
@@ -798,6 +804,9 @@
         // Set if installation files are located in ROM or in UDA, validation is not required
         TBool iTrustedInstallation;
         
+        // Set if installation files should be searched from UDA and eMMC drives
+        TBool iInstallFromUDAEmmc;
+        
         // Set if widget mutliinstance flag
         TInt32 iMultiInstance;
 
--- a/homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsmaintenancehandler.h	Tue May 25 13:01:39 2010 +0300
@@ -817,7 +817,15 @@
                 ChspsDomDocument& aAppDom,
                 ChspsDomNode& aMissingPluginNode,
                 const TInt aPluginUid );
-
+                                
+        /**
+         * Restores plug-ins by reinstallation.
+         * @since S60 5.2          
+         * @param aInstallUdaEmmc Set if UDA and eMMC drives should used 
+         */
+        void HandleReinstallationL(
+                const TBool aInstallUdaEmmc );
+                                
         /**
          * Removes all plugins from the plugins node and related 
          * resources from the resource array.
--- a/homescreenpluginsrv/hspsmanager/inc/hspsrominstaller.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsrominstaller.h	Tue May 25 13:01:39 2010 +0300
@@ -49,24 +49,14 @@
         * @since S60 5.0
         * @param aThemeServer is a reference to theme server instance
         * @param aFsSession is a reference to file server instance
+        * @param aInstallUdaEmmc is set if UDA and eMMC drives should be utilized
         * @return A pointer to the created instance of ChspsRomInstaller.
         */
         static ChspsRomInstaller* NewL( 
         		ChspsThemeServer& aThemeServer,
-        		RFs& aFsSession );
+        		RFs& aFsSession,
+        		const TBool aInstallUdaEmmc = ETrue );
 
-        /**
-        * NewLC.
-        * Two-phased constructor.
-        * Creates a ChspsClinet object using two phase construction,
-        * and return a pointer to the created object.
-        * @since S60 5.0
-        * @param aObserver The object to be used to handle updates from the server.
-        * @return a pointer to the created instance of ChspsRomInstaller.
-        */
-        static ChspsRomInstaller* NewLC( 
-        		ChspsThemeServer& aThemeServer,
-        		RFs& aFsSession );
 
         /**
         * ~ChspsRomInstaller.
@@ -80,7 +70,8 @@
         
         
         /**
-         * Installs all plugin configurations which can be found from ROM and C drives (UDA).         
+         * Installs all plugin configurations which can be found from the 
+         * internal drives.         
          * @since S60 5.2         
          */
         void InstallL();
@@ -145,10 +136,12 @@
         * @since S60 5.0
         * @param aObserver The object to be used to handle updates from the server.
         * @param aFsSession is a reference to file server instance
+        * @param aInstallUdaEmmc is set if UDA and eMMC drives should be utilized
         */
         ChspsRomInstaller( 
                 ChspsThemeServer& aThemeServer,
-                RFs& aFsSession );
+                RFs& aFsSession,
+                const TBool aInstallUdaEmmc );
 
         /**
         * ConstructL.
@@ -158,9 +151,10 @@
         void ConstructL();           
                         
         /**         
-         * Retrieves manifest files from both Z and C drives located in
+         * Retrieves manifest files from all internal drives in 
          * \\private\200159C0\install\ paths.
-         * @since S60 5.0
+         * @since S60 5.0         
+         * @param aFileArray An array of file names
          */
         void FindInstallationFilesL(  
                 RPointerArray<HBufC>& aFileArray );
@@ -202,6 +196,9 @@
          */        
         ChspsLogBus* iLogBus;
 #endif        
+        
+        // Set if plug-ins should be installed from UDA and eMMC drives 
+        TBool iInstallUdaEmmc;
      };
 
 
--- a/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h	Tue May 25 13:01:39 2010 +0300
@@ -534,6 +534,8 @@
 	     * @param aFs is a reference to open file server session handle
 	     * @param aPath is path of the file
 	     * @param aFilename is name and extension of the file
+	     * @param aFindFromUdaEmmcDrives is true if files should be searched from 
+	     *                               the UDA/eMMC drives 
 	     * @param aDrivePathName Full path with a drive letter to the 
          *                       resource file (output)
 	     */
@@ -541,6 +543,7 @@
 	             RFs& aFs,
 	             const TDesC& aPath,
 	             const TDesC& aFilename,         
+	             const TBool aFindFromUdaEmmcDrives,
 	             TFileName& aDrivePathName );
 
       /**
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Tue May 25 13:01:39 2010 +0300
@@ -175,6 +175,12 @@
 
 #include "hsps_builds_cfg.hrh"
 
+// C-Drive directory for the SISX installation files
+_LIT( KImportDirectoryC, "c:\\private\\200159c0\\import\\" );
+
+// E-Drive directory for the SISX installation files
+_LIT( KImportDirectoryE, "e:\\private\\200159c0\\import\\" );
+
 /** hspsThemeServer name: */
 _LIT(KhspsThemeServerName,"hspsthemeserver");
 
@@ -637,14 +643,17 @@
    /**
     * Installs widgets located at \private\200159C0\install\ directories.
     * @since S60 5.0 
+    * @param aInstallUdaEmmc True if widgets should be installed from C and E drives
     */
-   void InstallWidgetsL();   
+   void InstallWidgetsL( 
+           const TBool aInstallUdaEmmc = ETrue );   
    
    /**
     * Install all widgets from uda
+    * @param aImportDirectory import directory path
     * @since S60 5.2
     */
-   void InstallUDAWidgetsL();   
+   void InstallUDAWidgetsL( const TDesC& aImportDirectory );   
    
 public: // from MhspsFileChangeObserver
 	
--- a/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Tue May 25 13:01:39 2010 +0300
@@ -127,6 +127,7 @@
     iInstallationMode = EServiceHandler;
     iTrustedInstallation = EFalse;
 	iInstallationType = EInstallationTypeNew;
+	iInstallFromUDAEmmc = ETrue;
 	iFamilyMask = 0;
     }
     
@@ -1987,6 +1988,7 @@
                     iFsSession,                    
                     iThemeFilePath, 
                     nameBuf->Des(),
+                    iInstallFromUDAEmmc,
                     fullName );
             delete nameBuf;
             nameBuf = NULL;
@@ -2187,6 +2189,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// Disables eclipsing from UDA and eMMC drives
+// -----------------------------------------------------------------------------
+//
+void ChspsInstallationHandler::DisableUdaEmmcInstallations()
+    {
+    iInstallFromUDAEmmc = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
 // Finds locale specific subdirectories and DTD resources and appends those
 // into the resource array 
 // Should be executed prior to the CheckHeader method!
@@ -2343,73 +2354,81 @@
 //
 void ChspsInstallationHandler::AddLocalesL(
         const TDesC& aPath )
-    {           
-    // Find all locale specific subfolders
-    TFindFile fileFinder( iFsSession );
-    _LIT( KFilter, "*" );
-    CDir* fileList( NULL );    
-    fileFinder.FindWildByDir( KFilter, aPath, fileList );
-    if ( fileList )
+    {
+    // Retrieve phone supported language.
+    CArrayFixFlat<TInt>* languageCodes = NULL;
+    hspsServerUtil::GetInstalledLanguagesL( languageCodes );
+    CleanupStack::PushL( languageCodes );     
+    
+    // Ensure that path contains '\' at the end.
+    TFileName xuikonPath;
+    xuikonPath.Copy( aPath );
+    if( xuikonPath.Length() > KPathDelim().Length() )
         {
-        CleanupStack::PushL( fileList );
-        TFileName localePath;
-        for( TInt i = 0; i < fileList->Count(); i++ )       
+        if( xuikonPath.Mid( xuikonPath.Length() -
+                            KPathDelim().Length()
+                            ).Compare( KPathDelim ) != 0 )
             {
-            const TEntry& entry = (*fileList)[i];                        
-            if ( entry.IsDir() )
+            xuikonPath.Append( KPathDelim );
+            }
+        }
+            
+    _LIT( KFormatting, "%02d" );    
+    TFileName localePath;
+    
+    for( TInt i = 0; i < languageCodes->Count(); i++ )
+        {                       
+        const TInt languageCode = languageCodes->At( i );
+
+        // Construct locale path using two digit minium
+        // width and zero as padding.
+        
+        localePath.Copy( xuikonPath );
+        localePath.AppendFormat( KFormatting, languageCode );        
+        localePath.Append( KPathDelim );
+
+        // Check if folder for supported language exists.        
+        TBool exists = EFalse;
+        
+        if( BaflUtils::FolderExists( iFsSession, localePath ) )
+            {
+            exists = ETrue;
+            }
+        
+        // Support also one digit type folder naming.
+        if( !exists && languageCode < 10 )
+            {
+            localePath.Copy( xuikonPath );
+            localePath.AppendNum( languageCode );        
+            localePath.Append( KPathDelim );
+            
+            if( BaflUtils::FolderExists( iFsSession, localePath ) )
                 {
-                TInt languageIndex = 0;
-                TLex lex( entry.iName );
-                TInt error = lex.Val( languageIndex );    
-                                
-                // See enumarations from e32lang.h
-                if( !error && languageIndex >= ELangTest )
-                    {                   
-                
-                    // Process only supported languages
-                    CArrayFixFlat<TInt>* languageCodes = NULL;
-                    hspsServerUtil::GetInstalledLanguagesL( languageCodes );
-                    CleanupStack::PushL( languageCodes );                    
-                    TBool isSupported = EFalse;
-                    for( TInt i=0; i<languageCodes->Count(); i++ )
-                        {
-                        if( languageCodes->At( i ) == languageIndex )
-                            {
-                            isSupported = ETrue;
-                            break;
-                            }
-                        }
-                    CleanupStack::PopAndDestroy( languageCodes );                                       
-                    if( !isSupported )
-                        {
-                        continue;
-                        }          
-                
-                    // If we found the first language specification          
-                    if ( !iDefaultSpecificationSet )
-                        {
-                        // Assume this is the default language shown incase 
-                        // there is no locale for the active UI language
-                        iDefaultSpecification = (TLanguage)languageIndex;
-                        iDefaultSpecificationSet = ETrue;
-                        }                                                            
-                                                            
-                    // Setup a path to the subdirectory 
-                    localePath.Copy( aPath );
-                    localePath.Append( entry.iName );
-                    localePath.Append( KPathDelim );
-                    
-                    // Find localized resources 
-                    AddLocalizedResourcesL( 
-                        localePath,
-                        (TLanguage)languageIndex );
-                    }                                       
-                }
-                        
+                exists = ETrue;
+                }            
+            }
+
+        if( exists )
+            {
+            // If we found the first language specification          
+            if ( !iDefaultSpecificationSet )
+                {
+                // Assume this is the default language shown incase 
+                // there is no locale for the active UI language
+                iDefaultSpecification = (TLanguage)languageCode;
+                iDefaultSpecificationSet = ETrue;
+                }                                                            
+        
+        
+            // Find and add localized resources 
+            AddLocalizedResourcesL( 
+                    localePath,
+                    (TLanguage)languageCode );            
             }        
-        CleanupStack::PopAndDestroy( fileList );
-        fileList = NULL;
         }
+    
+    CleanupStack::PopAndDestroy( languageCodes );
+    languageCodes = NULL;
     }
 
 // -----------------------------------------------------------------------------
@@ -2461,6 +2480,7 @@
     // Find localized files from the provided directory
     RArray<TInt> driveArray;
     CleanupClosePushL( driveArray );   
+    driveArray.Append( EDriveE );
     driveArray.Append( EDriveC );
         
     FindResourceFilesL( aPath, EFalse, driveArray, NULL );
--- a/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp	Tue May 25 13:01:39 2010 +0300
@@ -4646,65 +4646,64 @@
         {
         User::Leave( KErrArgument );
         }
-    // Enable modification of owned configurations only
+    if( params.restore != EhspsRestoreAll 
+        && params.restore != EhspsRestoreRom
+        && params.restore != EhspsRestoreViews )
+        {
+        User::Leave( KErrArgument );
+        }
+    
+    // Enable modification of plug-in configurations which the client owns
     if( messagePtr.SecureId().iId != params.appUid )
         {
         User::Leave( KErrAccessDenied );
         }
     
     TInt err = KErrNone;
+        
+    // Lock the Plugin Repository (a.k.a. Def.rep)
     if( iDefinitionRepository.Locked() )
         {
         // Repository locked
-        err = KErrAccessDenied;
+        User::Leave( KErrAccessDenied );
+        }   
+    iDefinitionRepository.Lock();                                
+    CleanupStack::PushL( TCleanupItem( UnlockRepository, &iDefinitionRepository ) );
+                    
+    if( params.restore == EhspsRestoreAll 
+        || params.restore == EhspsRestoreRom )
+        {
+        TBool installUdaEmmc = ETrue;
+        if( params.restore == EhspsRestoreRom )
+            {
+            installUdaEmmc = EFalse;
+            }        
+        TRAP( err, HandleReinstallationL( installUdaEmmc ) );
+        iThemeServer.SetResourceFileCopyRequired( params.appUid );
         }
-            
+                
+    // Get active root configuration for the client application
+    ChspsODT* appODT = ChspsODT::NewL();
+    CleanupStack::PushL( appODT );
+    
+    iThemeServer.GetActivateAppConfigurationL( 
+                    params.appUid,
+                    *appODT );        
+                                            
+    // As a backup if the re-installations failed or client panics due to 
+    // an updated data plug-in then remove all but one view and empty it
+    if ( err || params.restore == EhspsRestoreViews )
+        {                        
+        // Remove all views but the 1st locked one and reset active view,
+        // if none were found then leave the first view only
+        RemoveUnlockedViewsL( *appODT );
+        
+        // Remove all widgets from the active view
+        err = RestoreActiveViewL( *appODT );
+        }                       
+        
     if( !err )
         {
-        // Lock the Plugin Repository (a.k.a. Def.rep)
-        iDefinitionRepository.Lock();                                
-        CleanupStack::PushL( TCleanupItem( UnlockRepository, &iDefinitionRepository ) );
-        
-        // Get active root configuration for the client application
-        ChspsODT* appODT = ChspsODT::NewL();
-        CleanupStack::PushL( appODT );    
-
-#ifdef HSPS_LOG_ACTIVE                
-        if( iLogBus )
-            {
-            iLogBus->LogText( 
-                _L( "ChspsMaintenanceHandler::ServiceRestoreConfigurationsL(): - Dump before the changes:" ) 
-                );                
-            ChspsOdtDump::Dump( *appODT, *iLogBus );
-            }
-#endif
-        
-        TInt err = KErrNone;
-        if ( !params.restoreAll )
-            {
-            // reinstall all widgets
-            TRAP( err, iThemeServer.InstallWidgetsL();
-                       iThemeServer.InstallUDAWidgetsL() );
-            
-            // Force updating of the header cache
-            iThemeServer.UpdateHeaderListCacheL();          
-            }  
-        
-        iThemeServer.GetActivateAppConfigurationL( 
-                params.appUid,
-                *appODT );
-        
-        // As a backup, if restoration of the active view fails,  
-        // or if all views but the locked view should be removedc
-        if ( err || params.restoreAll )
-            {                        
-            // Remove all views but the locked one and reset active view            
-            RemoveUnlockedViewsL( *appODT );
-            
-            // Remove all widgets from the active view
-            err = RestoreActiveViewL( *appODT );
-            }       
-
 #ifdef HSPS_LOG_ACTIVE                
         if( iLogBus )
             {
@@ -4714,19 +4713,16 @@
             ChspsOdtDump::Dump( *appODT, *iLogBus );
             }
 #endif
-        if( !err )
-            {
-            // Stores the new application configuration into the repository
-            err = iDefinitionRepository.SetOdtL( *appODT );
-            ret = EhspsRestoreConfigurationsSuccess;
-            }
+        // Stores the new application configuration into the repository
+        err = iDefinitionRepository.SetOdtL( *appODT );
+        ret = EhspsRestoreConfigurationsSuccess;
+        }
         
-        CleanupStack::PopAndDestroy( appODT );        
-
-        // Unlock after the changes have been done
-        iDefinitionRepository.Unlock();
-        CleanupStack::Pop(&iDefinitionRepository);                               
-        }
+    CleanupStack::PopAndDestroy( appODT );
+                            
+    // Unlock after the changes have been done
+    iDefinitionRepository.Unlock();
+    CleanupStack::Pop(&iDefinitionRepository);                               
                           
     // Error handling
     iResult->iXuikonError = err;    
@@ -4736,6 +4732,26 @@
     }
 
 // -----------------------------------------------------------------------------
+// ChspsMaintenanceHandler::HandleReinstallationL
+// -----------------------------------------------------------------------------
+//
+void ChspsMaintenanceHandler::HandleReinstallationL(
+        const TBool aInstallUdaEmmc ) 
+    {       
+    // Install plug-in configurations from the "install" directories
+    iThemeServer.InstallWidgetsL( aInstallUdaEmmc );
+    if( aInstallUdaEmmc )
+        {
+        // Install plug-in configurations from the "import" directories in C and E
+        iThemeServer.InstallUDAWidgetsL( KImportDirectoryC );
+        iThemeServer.InstallUDAWidgetsL( KImportDirectoryE );
+        }
+    
+    // Force updating of the header cache
+    iThemeServer.UpdateHeaderListCacheL();   
+    }                    
+    
+// -----------------------------------------------------------------------------
 // ChspsMaintenanceHandler::RestoreActiveViewL
 // -----------------------------------------------------------------------------
 //
--- a/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp	Tue May 25 13:01:39 2010 +0300
@@ -69,26 +69,17 @@
 // -----------------------------------------------------------------------------
 ChspsRomInstaller* ChspsRomInstaller::NewL( 
 		ChspsThemeServer& aThemeServer,
-		RFs& aFsSession )
-    {
-    ChspsRomInstaller* self = NewLC( aThemeServer, aFsSession );
+		RFs& aFsSession,
+		const TBool aInstallUdaEmmc )
+    {    
+    ChspsRomInstaller* self = 
+            new ( ELeave ) ChspsRomInstaller( aThemeServer, aFsSession, aInstallUdaEmmc );
+    CleanupStack::PushL( self );
+    self->ConstructL();
     CleanupStack::Pop( self );
     return( self ) ;
     }
 
-// -----------------------------------------------------------------------------
-// ChspsRomInstaller::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-ChspsRomInstaller* ChspsRomInstaller::NewLC( 
-		ChspsThemeServer& aThemeServer,
-		RFs& aFsSession)
-    {
-    ChspsRomInstaller* self = new ( ELeave ) ChspsRomInstaller( aThemeServer, aFsSession );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
 
 // -----------------------------------------------------------------------------
 // ChspsRomInstaller::ConstructL()
@@ -101,6 +92,12 @@
     
     // Prevent notifications from ROM based installations
     iInstallationHandler->DisableNotifications();
+    
+    // Skip UDA and eMMC drives if restoring plug-ins
+    if( !iInstallUdaEmmc )
+        {
+        iInstallationHandler->DisableUdaEmmcInstallations();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -109,11 +106,13 @@
 // -----------------------------------------------------------------------------
 ChspsRomInstaller::ChspsRomInstaller(
 		ChspsThemeServer& aThemeServer,
-        RFs& aFsSession )
-		: CActive(EPriorityStandard), 
-		    iThemeServer(aThemeServer), 
-		    iFsSession(aFsSession),
-		    iRet(EhspsInstallThemeFailed)
+        RFs& aFsSession,
+        const TBool aInstallUdaEmmc )
+		: CActive( EPriorityStandard ), 
+		    iThemeServer( aThemeServer ), 
+		    iFsSession( aFsSession ),
+		    iRet( EhspsInstallThemeFailed ),
+            iInstallUdaEmmc( aInstallUdaEmmc )
     {
     CActiveScheduler::Add( this );
     }
@@ -138,7 +137,7 @@
     RPointerArray<HBufC> fileArray;
     CleanupResetAndDestroyPushL( fileArray );
             
-    // Find UDA and ROM widgets to be installed     
+    // Find the manifest files     
     FindInstallationFilesL( fileArray );
             
     // Install the manifest files    
@@ -174,8 +173,14 @@
     {
     __ASSERT_DEBUG( aFileArray.Count() == 0, User::Leave( KErrArgument ) );
                     
-    DoFindInstallationFilesL( aFileArray, KPrivateInstallE );
-    DoFindInstallationFilesL( aFileArray, KPrivateInstallC );    
+    if( iInstallUdaEmmc )
+        {
+        // Handle installation of the imaker exports 
+        DoFindInstallationFilesL( aFileArray, KPrivateInstallE );    
+        DoFindInstallationFilesL( aFileArray, KPrivateInstallC );  
+        }
+    
+    // ROM
     DoFindInstallationFilesL( aFileArray, KPrivateInstallZ );    
     }
 
--- a/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Tue May 25 13:01:39 2010 +0300
@@ -1853,7 +1853,8 @@
  TInt hspsServerUtil::FindFile(
          RFs& aFs,
          const TDesC& aPath,
-         const TDesC& aFilename,         
+         const TDesC& aFilename,        
+         const TBool aFindFromUdaEmmcDrives,
          TFileName& aDrivePathName )
      {   
      TInt err = KErrNotFound;
@@ -1875,7 +1876,14 @@
          TFindFile fileFinder( aFs );
          fileFinder.SetFindMask( 
              KDriveAttExclude|KDriveAttRemovable|KDriveAttRemote|KDriveAttSubsted );
-         aFs.SetSessionToPrivate( EDriveE );
+         if( aFindFromUdaEmmcDrives )
+             {
+             aFs.SetSessionToPrivate( EDriveE );
+             }
+         else 
+             {
+             aFs.SetSessionToPrivate( EDriveZ );
+             }
          err = fileFinder.FindByDir( filename, path );
          aFs.SetSessionToPrivate( EDriveC );     
          if( !err )          
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Tue May 25 13:01:39 2010 +0300
@@ -54,9 +54,6 @@
 
 // CONSTANTS
 
-// Directory for the SISX installation files
-_LIT( KImportDirectoryC, "c:\\private\\200159c0\\import\\" );
-
 // Directories for backup folders
 _LIT( KBackupThemesDirectoryC, "c:\\private\\200159c0\\backup\\themes\\" );
 
@@ -2611,13 +2608,13 @@
 // ChspsThemeServer::InstallUDAWidgetsL()
 // -----------------------------------------------------------------------------
 //
-void ChspsThemeServer::InstallUDAWidgetsL()
+void ChspsThemeServer::InstallUDAWidgetsL( const TDesC& aImportDirectory )
     {
     //Get list of uda dir's
     TPtrC filter( KFilterAllPluginImportsV1 );
     CDir* importDir( NULL );           
     TFindFile fileFinder( iFsSession );
-    fileFinder.FindWildByDir( filter, KImportDirectoryC, importDir );    
+    fileFinder.FindWildByDir( filter, aImportDirectory, importDir );    
     CleanupStack::PushL( importDir );
     
     if ( importDir && importDir->Count() > 0 )
@@ -2631,7 +2628,7 @@
             // Get manifest path
             HBufC* manifestBuf = GetManifestFromImportLC( 
                     udaName, 
-                    KImportDirectoryC );
+                    aImportDirectory );
             
             //install
             TRAPD( err, installer->InstallConfigurationL( *manifestBuf ) );
@@ -2684,8 +2681,9 @@
         // Install widgets from \private\200159C0\install\ directories (ROM and UDA image)
         InstallWidgetsL();
 
-        // Install widgets from \private\200159C0\imports\ directory (UDA image)
-        InstallUDAWidgetsL();
+        // Install widgets from \private\200159C0\imports\ directory (UDA image) C & E
+        InstallUDAWidgetsL( KImportDirectoryC );
+        InstallUDAWidgetsL( KImportDirectoryE );
         
         // Post RFS installations have been done, prevent re-installations at next startup
         // by reading firmware version and saving it to cenrep.
@@ -2765,10 +2763,11 @@
 // ChspsThemeServer::InstallWidgetsL()
 // -----------------------------------------------------------------------------
 //
-void ChspsThemeServer::InstallWidgetsL()
+void ChspsThemeServer::InstallWidgetsL(
+        const TBool aInstallUdaEmmc )
     {    
     __ASSERT_DEBUG( !iRomInstaller, User::Leave( KErrGeneral) );	
-	iRomInstaller = ChspsRomInstaller::NewL( *this, iFsSession );	
+	iRomInstaller = ChspsRomInstaller::NewL( *this, iFsSession, aInstallUdaEmmc );	
 #ifdef HSPS_LOG_ACTIVE            	
 	iRomInstaller->SetLogBus( iLogBus );
 #endif
@@ -2779,8 +2778,7 @@
 	iRomInstaller = 0;
 	
 	// Force updating of the header cache
-    ThspsRepositoryInfo info( EhspsCacheUpdate );
-    iDefinitionRepository->RegisterNotification( info );
+	TRAP_IGNORE( UpdateHeaderListCacheL() );
 	}
 
 // -----------------------------------------------------------------------------
--- a/homescreenpluginsrv/inc/hspsclient.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/inc/hspsclient.h	Tue May 25 13:01:39 2010 +0300
@@ -445,20 +445,15 @@
                 const TInt aConfUid );
         
         /**
-        * Restores plugin configurations by either removing all plugins
-        * from the active view or by removing all extra views.
-        * In latter case, the first locked view is emptied. If there are 
-        * no locked views then the first view will remain while others
-        * are removed.
+        * Restores plugin configurations according to the input.
         * @since S60 5.2
         * @param aAppUid Application uid
-        * @param aReinstall  False if only the active view should be fixed,
-        *                    True if also all extra views should removed                         
+        * @param aRestore Operation to be executed
         * @return ThspsServiceCompletedMessage expressing the result of the call.
         */
         IMPORT_C ThspsServiceCompletedMessage hspsRestoreConfigurations(
             const TInt aAppUid,
-            const TBool aReinstall );
+            const ThspsRestore aRestore );
         
     protected: // Functions from base classes
 
--- a/homescreenpluginsrv/inc/hspsthememanagement.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/inc/hspsthememanagement.h	Tue May 25 13:01:39 2010 +0300
@@ -1028,16 +1028,20 @@
     TBool storingStatus;            // storing status telling if modified plugin settings are needed to stored its reference.
     };
 
+enum ThspsRestore
+    {
+    EhspsRestoreAll = 0,            // restores plug-ins from eMMC, UDA and ROM    
+    EhspsRestoreRom,                // restores plug-ins from ROM
+    EhspsRestoreViews               // removes extra views and empties them
+    };
+
 /**
  * Input parameter for the RestoreActiveAppConf service 
  */
 struct ThspsParamRestoreConfigurations
     {
     TInt appUid;                    // uid of the application
-    TBool restoreAll;               // false: if all widget plugins should be removed from the active view,
-                                    // true: if all widget plugins should be removed from the first locked view
-                                    //       (or if locked views were not found then from first unlocked view) 
-                                    //       and if all other views should be removed
+    ThspsRestore restore;           // operation               
     };
 
 
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentcontrol.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentcontrol.h	Tue May 25 13:01:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0"
@@ -25,31 +25,32 @@
 // Forward declarations
 
 /**
- *  Content control interface
- *
- *
- *  @code
+ *  Content control interface to notify observers about installation and 
+ *  uninstallation of Home screen configurations
  *
- *  @endcode
- *
- *  @lib hscontentcontrol.lib
- *  @since S60 v5.0
+ *  @since S60 v5.2
  */
 class MHsContentControl
     {
 public:
     /**
+     * Notify changes in widget installations
      *
+     * @since S60 v5.2
      */
     virtual void NotifyWidgetListChanged() = 0;
 
     /**
+     * Notify changes in view installations
      *
+     * @since S60 v5.2
      */
     virtual void NotifyViewListChanged() = 0;
 
     /**
+     * Notify changes in application configuration installations
      *
+     * @since S60 v5.2
      */
     virtual void NotifyAppListChanged() = 0;
 
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h	Tue May 25 13:01:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -28,7 +28,7 @@
 // Constants
 
 /**
- * unable to add widget because active page is full.
+ * Unable to add widget because active page is full.
  * No widgets can be added to this page before removing some first.
  */
 const TInt KHsErrorViewFull = -87001;
@@ -40,7 +40,7 @@
 const TInt KHsErrorMaxInstanceCountExceeded = -87002; 
 
 /**
- * unable to add widget because widget is too large to fit.
+ * Unable to add widget because widget is too large to fit.
  * A smaller widget might fit though.
  */
 const TInt KHsErrorDoesNotFit = -87003;
@@ -48,21 +48,18 @@
 
 
 /**
- *  Content controller interface
- *
- *
- *  @code
+ *  Content controller interface defining the interface to modify
+ *  Home screen content.
  *
- *  @endcode
- *
- *  @lib hscontentcontrol.lib
- *  @since S60 v5.0
+ *  @since S60 v5.2
  */
 class MHsContentController
     {
 public:
     /**
      * Returns the list of available Home screen widgets
+     *
+     * @since S60 v5.2
      * @param aArray List of widgets
      * @return KErrNone on success, any of system wide error codes
      */
@@ -71,6 +68,8 @@
     /**
      * Returns the list of Home screen widgets included in an application 
      * configuration or a view
+     *
+     * @since S60 v5.2
      * @param aInfo Content info defining the application configuration 
      *              or the view which widget list is requested
      * @param aArray List of widgets
@@ -80,6 +79,8 @@
 
     /**
      * Returns the list of available Home screen views
+     *
+     * @since S60 v5.2
      * @param aArray List of views
      * @return KErrNone on success, any of system wide error codes
      */
@@ -88,6 +89,8 @@
     /**
      * Returns the list of available Home screen views included in an
      * application configuration
+     *
+     * @since S60 v5.2
      * @param aInfo Content info defining the application configuration
      * @param aArray List of views
      * @return KErrNone on success, any of system wide error codes
@@ -96,6 +99,8 @@
 
     /**
      * Returns the list of available Home screen application configurations
+     *
+     * @since S60 v5.2
      * @param aArray List of application configurations
      * @return KErrNone on success, any of system wide error codes
      */
@@ -103,6 +108,8 @@
 
     /**
      * Adds a widget to the active Home screen view.
+     *
+     * @since S60 v5.2
      * @param aInfo Widget request to be added
      * @return KErrNone on success, any of system wide error codes,
      *         KHsErrorViewFull, KHsErrorMaxInstanceCountExceeded or
@@ -112,6 +119,8 @@
 
     /**
      * Removes a widget from the configuration.
+     *
+     * @since S60 v5.2
      * @param aInfo Widget request to be removed
      * @return KErrNone on success, any of system wide error codes
      */
@@ -119,6 +128,8 @@
 
     /**
      * Adds a view to the active Home screen application configuration.
+     *
+     * @since S60 v5.2
      * @param aInfo View request to be added
      * @return KErrNone on success, any of system wide error codes
      */
@@ -126,6 +137,8 @@
 
     /**
      * Removes a view from the configuration.
+     *
+     * @since S60 v5.2
      * @param aInfo View request to be removed
      * @return KErrNone on success, any of system wide error codes
      */
@@ -133,6 +146,8 @@
 
     /**
      * Activates the Home screen view
+     *
+     * @since S60 v5.2
      * @param aInfo View request to be activated
      * @return KErrNone on success, any of system wide error codes
      */
@@ -140,6 +155,8 @@
 
     /**
      * Activates the Home screen application configuration
+     *
+     * @since S60 v5.2
      * @param aInfo Application configuration request to be activated
      * @return KErrNone on success, any of system wide error codes
      */
@@ -147,6 +164,8 @@
 
     /**
      * Returns the active Home screen view
+     *
+     * @since S60 v5.2
      * @param aInfo Active view
      * @return KErrNone on success, any of system wide error codes
      */
@@ -154,6 +173,8 @@
 
     /**
      * Returns the active Home screen application configuration
+     *
+     * @since S60 v5.2
      * @param aInfo Active application configuration
      * @return KErrNone on success, any of system wide error codes
      */
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentinfo.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentinfo.h	Tue May 25 13:01:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -28,39 +28,44 @@
 /**
  *  Content data
  *
- *
- *  @code
- *
- *  @endcode
- *
- *  @lib hscontentcontrol.lib
- *  @since S60 v5.0
+ *  @lib hscontentinfo.lib
+ *  @since S60 v5.2
  */
 NONSHARABLE_CLASS( CHsContentInfo ) : public CBase
     {
     public:
     /**
      * Two-phased constructor.
+     *
+     * @since S60 v5.2
      */
     IMPORT_C static CHsContentInfo* NewL();
     
     /**
      * Two-phased constructor.
+     *
+     * @since S60 v5.2
      */    
     IMPORT_C static CHsContentInfo* NewL( RReadStream& aStream );
     
     /**
      * Two-phased constructor.
+     *
+     * @since S60 v5.2
      */    
     IMPORT_C static CHsContentInfo* NewLC();
     
     /**
      * Clone.
+     *
+     * @since S60 v5.2
      */
 	IMPORT_C CHsContentInfo* CloneL();
 
     /**
      * Destructor.
+     *
+     * @since S60 v5.2
      */
     ~CHsContentInfo();
 
@@ -77,7 +82,7 @@
     /**
      * Set Widget name. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aName. Name of the widget.
      * @return Reference to this
      */
@@ -86,7 +91,7 @@
     /**
      * Set Widget name. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aName. Name of the widget.
      * @return Reference to this
      */
@@ -95,7 +100,7 @@
     /**
      * Set Widget's publisher Id . 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aPublisherId. Name of the publisher.
      * @return Reference to this
      */
@@ -104,7 +109,7 @@
     /**
      * Set Widget id. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aUid Static uid of the widget.
      * @return Reference to this
      */
@@ -113,7 +118,7 @@
     /**
      * Set Widget plugin id. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aId Dynamic id generated by hsps.
      * @return Reference to this
      */
@@ -122,7 +127,7 @@
     /**
      * Set widget type. Possible values widget and template 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aType Widget type.
      */
     IMPORT_C void SetTypeL( const TDesC8& aType );
@@ -130,7 +135,7 @@
     /**
      * Access to widget name. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Reference to name
      */
     IMPORT_C const TDesC& Name() const;
@@ -138,7 +143,7 @@
     /**
      * Access to widget's publisher id. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Reference to publisher id
      */
     IMPORT_C const TDesC& PublisherId() const;
@@ -146,7 +151,7 @@
     /**
      * Access to widget uid. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Uid or KNullDesC8
      */
     IMPORT_C const TDesC8& Uid() const;
@@ -154,7 +159,7 @@
     /**
      * Access to widget name. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Reference to name
      */
     IMPORT_C HBufC8* NameAs8BitLC() const;
@@ -162,7 +167,7 @@
     /**
      * Access to widget plugin id. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Plugin id or null if not set
      */
     IMPORT_C const TDesC8& PluginId() const;
@@ -170,7 +175,7 @@
     /**
      * Set widget type. Possible values widget and template 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Type or KNullDesC8.
      */
     IMPORT_C const TDesC8& Type() const;
@@ -185,6 +190,7 @@
     /**
      * Get Maximum number of widgets
      *
+     * @since S60 5.2
      * @return number of widgets or defaule value 1
      */
     IMPORT_C TInt MaxWidgets() const;   
@@ -192,6 +198,7 @@
     /**
      * Externalize.
      *
+     * @since S60 5.2
      * @param aStream A stream to externalize to
      */
     IMPORT_C void ExternalizeL( RWriteStream& aStream );
@@ -199,7 +206,7 @@
     /**
      * Sets whether this widget can be added to the active HS page
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aValue ETrue if can be added, EFalse otherwise
      */
     IMPORT_C void SetCanBeAdded( TBool aValue );
@@ -207,7 +214,7 @@
     /**
      * Queries whether this widget can be added to the active HS page
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return ETrue if can be added, EFalse otherwise
      */    
     IMPORT_C TBool CanBeAdded() const;
@@ -215,7 +222,7 @@
     /**
      * Sets whether this widget can be removed from the active HS page
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aValue ETrue if can be added, EFalse otherwise
      */
     IMPORT_C void SetCanBeRemoved( TBool aValue );
@@ -223,7 +230,7 @@
     /**
      * Queries whether this widget can be removed from the active HS page
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return ETrue if can be removed, EFalse otherwise
      */    
     IMPORT_C TBool CanBeRemoved() const;
@@ -231,7 +238,7 @@
     /**
      * Sets this widget's installation time
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aTime Installation time
      */        
     IMPORT_C void SetInstallationTime( TTime& aTime );
@@ -239,7 +246,7 @@
     /**
      * Gets this widget's installation time
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Installation time
      */            
     IMPORT_C TTime InstallationTime() const;
@@ -247,7 +254,7 @@
     /**
      * Sets this widget's description
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aDescription Description
      */                
     IMPORT_C void SetDescriptionL( const TDesC& aDescription );
@@ -255,7 +262,7 @@
     /**
      * Sets this widget's description
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aDescription Description
      */                
     IMPORT_C void SetDescriptionL( const TDesC8& aDescription );
@@ -263,7 +270,7 @@
     /**
      * Gets this widget's description
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Description
      */                    
     IMPORT_C const TDesC& Description() const;
@@ -271,7 +278,7 @@
     /**
      * Sets this widget's icon path
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aPath Path
      */                    
     IMPORT_C void SetIconPathL( const TDesC& aIconPath );
@@ -279,30 +286,30 @@
     /**
      * Gets this widget's icon path
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Path
      */                    
     IMPORT_C const TDesC& IconPath() const;
     
     /**
      * Internalize
+     *
+     * @since S60 5.2
      * @param aStream A stream where the class is internalized
-     *
-     * @since S60 5.0
      */                    
     IMPORT_C void InternalizeL( RReadStream& aStream );    
 
     /**
      * Returns size of a descriptor needed to externalize the class
      *
-     * @since S60 5.0
+     * @since S60 5.2
      */
     IMPORT_C TInt Size();
     
     /**
      * Set WRT widget publisher uid. 
      *
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aUid Publisher uid of the wrt widget.
      * @return Reference to this
      */
@@ -311,7 +318,7 @@
     /**
      * Access to WRT widget publisher uid.
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @return PublisherUid or KNullDesC8
      */
     IMPORT_C const TDesC8& PublisherUid() const;
@@ -319,7 +326,7 @@
     /**
      * Sets whether this is a WRT widget
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aIsWrt, ETrue if is WRT
      */    
     IMPORT_C void SetIsWrt( TBool aIsWrt );
@@ -327,7 +334,7 @@
     /**
      * Returns whether this is a WRT widget
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @return ETrue if WRT, EFalse otherwise
      */    
     IMPORT_C TBool IsWrt() const;
@@ -335,7 +342,7 @@
     /**
      * Sets whether an application confguration or a view is full
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @param aIsFull, ETrue if application configuration or a view is full
      */    
     IMPORT_C void SetIsFull( TBool aIsFull );
@@ -343,7 +350,7 @@
     /**
      * Returns whether an application configuration or a view is full
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @return ETrue if application configuration or view is full, 
      *         EFalse otherwise
      */    
@@ -352,7 +359,7 @@
     /**
      * Marshals Content Info data to a descriptor
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Descriptor containing the externalized Content Info data
      */
     IMPORT_C HBufC8* MarshalL();
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentinfoarray.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentinfoarray.h	Tue May 25 13:01:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -30,53 +30,66 @@
 /**
  *  Content data
  *
- *
- *  @code
- *
- *  @endcode
- *
- *  @lib hscontentcontrol.lib
- *  @since S60 v5.0
+ *  @lib hscontentinfo.lib
+ *  @since S60 v5.2
  */
 class CHsContentInfoArray : public CBase
     {
     public:
     /**
      * Two-phased constructor.
+     *
+     * @since S60 v5.2
      */
     IMPORT_C static CHsContentInfoArray* NewL();
     
     /**
      * Two-phased constructor.
+     *
+     * @since S60 v5.2
      */
     IMPORT_C static CHsContentInfoArray* NewL( RReadStream& aStream );    
 
     /**
      * Destructor.
+     *
+     * @since S60 v5.2
      */
     virtual ~CHsContentInfoArray();
     
     /**
      * Externalizes the array into the stream.
+     *
+     * @since S60 v5.2
      */
     IMPORT_C void ExternalizeL( RWriteStream& aStream );
     
+    /**
+     * Returns reference to content info array
+     *
+     * @since S60 v5.2
+     * @return Content info array
+     */
     IMPORT_C RPointerArray< CHsContentInfo >& Array();
 
     /**
      * Internalizes the array from the stream.
+     *
+     * @since S60 v5.2
      */
     IMPORT_C void InternalizeL( RReadStream& aStream );
     
     /**
      * Returns size of a descriptor needed to externalize the class
+     *
+     * @since S60 v5.2
      */
     IMPORT_C TInt Size();
 
     /**
      * Marshals Content Info array to a descriptor
      * 
-     * @since S60 5.0
+     * @since S60 5.2
      * @return Descriptor containing the externalized Content Info array data
      */
     IMPORT_C HBufC8* MarshalL();
--- a/homescreensrv_plat/sapi_homescreenplugin/hspsservice/bwins/hspsserviceu.def	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/hspsservice/bwins/hspsserviceu.def	Tue May 25 13:01:39 2010 +0300
@@ -1,25 +1,25 @@
 EXPORTS
-	?RestoreConfigurationsL@CHspsPersonalisationService@@QAEXHH@Z @ 1 NONAME ; void CHspsPersonalisationService::RestoreConfigurationsL(int, int)
-	?GetODTL@CHspsConfigurationService@@QAEXH@Z @ 2 NONAME ; void CHspsConfigurationService::GetODTL(int)
-	?GetAppConfListL@CHspsPersonalisationService@@QAEXHKAAV?$CArrayPtrFlat@VChspsODT@@@@@Z @ 3 NONAME ; void CHspsPersonalisationService::GetAppConfListL(int, unsigned long, class CArrayPtrFlat<class ChspsODT> &)
-	?SetConfStateL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@00@Z @ 4 NONAME ; void CHspsPersonalisationService::SetConfStateL(int, class TDesC8 &, class TDesC8 &, class TDesC8 &)
-	?InvalidateODT@CHspsConfigurationService@@QAEXXZ @ 5 NONAME ; void CHspsConfigurationService::InvalidateODT(void)
-	?RemovePluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 6 NONAME ; void CHspsPersonalisationService::RemovePluginL(int, class TDesC8 &)
-	?SetActiveAppConfL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 7 NONAME ; void CHspsPersonalisationService::SetActiveAppConfL(int, class TDesC8 &)
-	?GetPluginListL@CHspsPersonalisationService@@QAEXAAVTDesC8@@0KHAAV?$CArrayPtrFlat@VChspsODT@@@@@Z @ 8 NONAME ; void CHspsPersonalisationService::GetPluginListL(class TDesC8 &, class TDesC8 &, unsigned long, int, class CArrayPtrFlat<class ChspsODT> &)
-	?RestoreActiveAppConfL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 9 NONAME ; void CHspsPersonalisationService::RestoreActiveAppConfL(int, class TDesC8 &)
-	?AddPluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@00AAH@Z @ 10 NONAME ; void CHspsPersonalisationService::AddPluginL(int, class TDesC8 &, class TDesC8 &, class TDesC8 &, int &)
-	?SetLogBus@CHspsConfigurationService@@QAEXPAVChspsLogBus@@@Z @ 11 NONAME ; void CHspsConfigurationService::SetLogBus(class ChspsLogBus *)
-	?GetAppUidL@CHspsConfigurationService@@QAEXAAH@Z @ 12 NONAME ; void CHspsConfigurationService::GetAppUidL(int &)
-	?MovePluginsL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@AAV?$CArrayFixFlat@H@@@Z @ 13 NONAME ; void CHspsPersonalisationService::MovePluginsL(int, class TDesC8 &, class CArrayFixFlat<int> &)
-	?RegisterObserverL@CHspsConfigurationService@@QAEHPAVCHspsReqNotifCallback@@@Z @ 14 NONAME ; int CHspsConfigurationService::RegisterObserverL(class CHspsReqNotifCallback *)
-	?GetDOML@CHspsConfigurationService@@QAEAAVChspsDomDocument@@XZ @ 15 NONAME ; class ChspsDomDocument & CHspsConfigurationService::GetDOML(void)
-	?NewL@CHspsConfigurationService@@SAPAV1@XZ @ 16 NONAME ; class CHspsConfigurationService * CHspsConfigurationService::NewL(void)
-	?NewL@CHspsPersonalisationService@@SAPAV1@XZ @ 17 NONAME ; class CHspsPersonalisationService * CHspsPersonalisationService::NewL(void)
-	?SetPluginSettingsL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@AAVChspsDomDocument@@H@Z @ 18 NONAME ; void CHspsPersonalisationService::SetPluginSettingsL(int, class TDesC8 &, class ChspsDomDocument &, int)
-	?GetFamilyL@CHspsConfigurationService@@QAEXAAK@Z @ 19 NONAME ; void CHspsConfigurationService::GetFamilyL(unsigned long &)
-	?ReplacePluginL@CHspsPersonalisationService@@QAEXHABVTDesC8@@0@Z @ 20 NONAME ; void CHspsPersonalisationService::ReplacePluginL(int, class TDesC8 const &, class TDesC8 const &)
-	?GetPluginOdtL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@PAVChspsODT@@@Z @ 21 NONAME ; void CHspsPersonalisationService::GetPluginOdtL(int, class TDesC8 &, class ChspsODT *)
-	?SetActivePluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 22 NONAME ; void CHspsPersonalisationService::SetActivePluginL(int, class TDesC8 &)
-	?UnRegisterObserverL@CHspsConfigurationService@@QAEXXZ @ 23 NONAME ; void CHspsConfigurationService::UnRegisterObserverL(void)
+	?GetODTL@CHspsConfigurationService@@QAEXH@Z @ 1 NONAME ; void CHspsConfigurationService::GetODTL(int)
+	?GetAppConfListL@CHspsPersonalisationService@@QAEXHKAAV?$CArrayPtrFlat@VChspsODT@@@@@Z @ 2 NONAME ; void CHspsPersonalisationService::GetAppConfListL(int, unsigned long, class CArrayPtrFlat<class ChspsODT> &)
+	?SetConfStateL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@00@Z @ 3 NONAME ; void CHspsPersonalisationService::SetConfStateL(int, class TDesC8 &, class TDesC8 &, class TDesC8 &)
+	?InvalidateODT@CHspsConfigurationService@@QAEXXZ @ 4 NONAME ; void CHspsConfigurationService::InvalidateODT(void)
+	?RemovePluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 5 NONAME ; void CHspsPersonalisationService::RemovePluginL(int, class TDesC8 &)
+	?SetActiveAppConfL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 6 NONAME ; void CHspsPersonalisationService::SetActiveAppConfL(int, class TDesC8 &)
+	?GetPluginListL@CHspsPersonalisationService@@QAEXAAVTDesC8@@0KHAAV?$CArrayPtrFlat@VChspsODT@@@@@Z @ 7 NONAME ; void CHspsPersonalisationService::GetPluginListL(class TDesC8 &, class TDesC8 &, unsigned long, int, class CArrayPtrFlat<class ChspsODT> &)
+	?RestoreActiveAppConfL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 8 NONAME ; void CHspsPersonalisationService::RestoreActiveAppConfL(int, class TDesC8 &)
+	?AddPluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@00AAH@Z @ 9 NONAME ; void CHspsPersonalisationService::AddPluginL(int, class TDesC8 &, class TDesC8 &, class TDesC8 &, int &)
+	?SetLogBus@CHspsConfigurationService@@QAEXPAVChspsLogBus@@@Z @ 10 NONAME ; void CHspsConfigurationService::SetLogBus(class ChspsLogBus *)
+	?GetAppUidL@CHspsConfigurationService@@QAEXAAH@Z @ 11 NONAME ; void CHspsConfigurationService::GetAppUidL(int &)
+	?MovePluginsL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@AAV?$CArrayFixFlat@H@@@Z @ 12 NONAME ; void CHspsPersonalisationService::MovePluginsL(int, class TDesC8 &, class CArrayFixFlat<int> &)
+	?RegisterObserverL@CHspsConfigurationService@@QAEHPAVCHspsReqNotifCallback@@@Z @ 13 NONAME ; int CHspsConfigurationService::RegisterObserverL(class CHspsReqNotifCallback *)
+	?GetDOML@CHspsConfigurationService@@QAEAAVChspsDomDocument@@XZ @ 14 NONAME ; class ChspsDomDocument & CHspsConfigurationService::GetDOML(void)
+	?NewL@CHspsConfigurationService@@SAPAV1@XZ @ 15 NONAME ; class CHspsConfigurationService * CHspsConfigurationService::NewL(void)
+	?NewL@CHspsPersonalisationService@@SAPAV1@XZ @ 16 NONAME ; class CHspsPersonalisationService * CHspsPersonalisationService::NewL(void)
+	?SetPluginSettingsL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@AAVChspsDomDocument@@H@Z @ 17 NONAME ; void CHspsPersonalisationService::SetPluginSettingsL(int, class TDesC8 &, class ChspsDomDocument &, int)
+	?GetFamilyL@CHspsConfigurationService@@QAEXAAK@Z @ 18 NONAME ; void CHspsConfigurationService::GetFamilyL(unsigned long &)
+	?ReplacePluginL@CHspsPersonalisationService@@QAEXHABVTDesC8@@0@Z @ 19 NONAME ; void CHspsPersonalisationService::ReplacePluginL(int, class TDesC8 const &, class TDesC8 const &)
+	?GetPluginOdtL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@PAVChspsODT@@@Z @ 20 NONAME ; void CHspsPersonalisationService::GetPluginOdtL(int, class TDesC8 &, class ChspsODT *)
+	?SetActivePluginL@CHspsPersonalisationService@@QAEXHAAVTDesC8@@@Z @ 21 NONAME ; void CHspsPersonalisationService::SetActivePluginL(int, class TDesC8 &)
+	?UnRegisterObserverL@CHspsConfigurationService@@QAEXXZ @ 22 NONAME ; void CHspsConfigurationService::UnRegisterObserverL(void)
+	?RestoreConfigurationsL@CHspsPersonalisationService@@QAEXHW4TRestore@1@@Z @ 23 NONAME ; void CHspsPersonalisationService::RestoreConfigurationsL(int, enum CHspsPersonalisationService::TRestore)
 
--- a/homescreensrv_plat/sapi_homescreenplugin/hspsservice/eabi/hspsserviceu.def	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/hspsservice/eabi/hspsserviceu.def	Tue May 25 13:01:39 2010 +0300
@@ -20,7 +20,7 @@
 	_ZN27CHspsPersonalisationService17SetActiveAppConfLEiR6TDesC8 @ 19 NONAME
 	_ZN27CHspsPersonalisationService18SetPluginSettingsLEiR6TDesC8R16ChspsDomDocumenti @ 20 NONAME
 	_ZN27CHspsPersonalisationService21RestoreActiveAppConfLEiR6TDesC8 @ 21 NONAME
-	_ZN27CHspsPersonalisationService22RestoreConfigurationsLEii @ 22 NONAME
+	_ZN27CHspsPersonalisationService22RestoreConfigurationsLEiNS_8TRestoreE @ 22 NONAME
 	_ZN27CHspsPersonalisationService4NewLEv @ 23 NONAME
 	_ZTI25CHspsConfigurationService @ 24 NONAME
 	_ZTI27CHspsPersonalisationService @ 25 NONAME
--- a/homescreensrv_plat/sapi_homescreenplugin/hspsservice/inc/hspspersonalisationservice.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/hspsservice/inc/hspspersonalisationservice.h	Tue May 25 13:01:39 2010 +0300
@@ -44,7 +44,14 @@
 class CHspsPersonalisationService : public CBase, public MhspsThemeManagementServiceObserver
     {
     public: // Constructor and destructor
-
+    
+        enum TRestore
+            {            
+            EDefault,            
+            ERom,
+            EViews
+            };    
+    
         /**
          * Two-phased constructor.
          * 
@@ -243,19 +250,14 @@
             const TDesC8& aConfUid );
         
         /**
-         * Restores plugin configurations by either removing all plugins
-         * from the active view or by removing all extra views.
-         * In latter case, the first locked view is emptied. If there are 
-         * no locked views then the first view will remain while others
-         * are removed.
+         * Restores plugin configurations according to the input.
          * @since S60 5.2
          * @param aAppUid Application uid
-         * @param aResetAllViews False if only the active view should be fixed,
-         *                       True if also all extra views should removed                
+         * @param aOperation Operation to be executed                
          */
         IMPORT_C void RestoreConfigurationsL(
             const TInt aAppUid, 
-            const TBool aResetAllViews );
+            const TRestore aOperation );
 
     private: // Methods
     
--- a/homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspspersonalisationservice.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/hspsservice/src/hspspersonalisationservice.cpp	Tue May 25 13:01:39 2010 +0300
@@ -432,10 +432,24 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CHspsPersonalisationService::RestoreConfigurationsL(
     const TInt aAppUid, 
-    const TBool aResetAllViews )
+    const TRestore aOperation )
     {        
+    ThspsRestore operation( EhspsRestoreAll );
+    if( aOperation == EDefault )
+        {
+        operation = EhspsRestoreAll; 
+        }    
+    else if( aOperation == ERom )
+        {
+        operation = EhspsRestoreRom;
+        }    
+    else if( aOperation == EViews )
+        {
+        operation = EhspsRestoreViews;
+        }
+            
     ThspsServiceCompletedMessage ret = 
-        iHspsClient->hspsRestoreConfigurations( aAppUid, aResetAllViews );            
+        iHspsClient->hspsRestoreConfigurations( aAppUid, operation );            
     if( ret != EhspsRestoreConfigurationsSuccess )
         {
         // Get error code from the server process
--- a/homescreensrv_plat/sapi_homescreenplugin/inc/hspsliwvocabulary.hrh	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/inc/hspsliwvocabulary.hrh	Tue May 25 13:01:39 2010 +0300
@@ -72,8 +72,9 @@
 _LIT8( KHspsLiwStorePluginRefence, "storePluginConf" );
 _LIT8( KHspsLiwStoreAppConf, "storeAppConf" ); 
 _LIT8( KHspsLiwRestore, "restore" );
-_LIT8( KHspsLiwRestoreActive, "active");
-_LIT8( KHspsLiwRestoreAll, "all");
+_LIT8( KHspsLiwRestoreDefault, "default");
+_LIT8( KHspsLiwRestoreRom, "rom");
+_LIT8( KHspsLiwRestoreViews, "views");
 
 //Output words.
 _LIT8( KHspsLiwPluginId, "pluginId" );
--- a/homescreensrv_plat/sapi_homescreenplugin/src/hspsconfigurationif.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/src/hspsconfigurationif.cpp	Tue May 25 13:01:39 2010 +0300
@@ -1193,23 +1193,31 @@
         }
     
     TLiwVariant inParamVariant = inParam->Value();
-    TPtrC8 restore( inParamVariant.AsData() );
-    
-    TBool restoreAll = EFalse;            
-    if( restore.CompareF( KHspsLiwRestoreAll ) == 0 )
+    TPtrC8 restorePtr( inParamVariant.AsData() );
+            
+    CHspsPersonalisationService::TRestore operation( CHspsPersonalisationService::EDefault );              
+    if( restorePtr.CompareF( KHspsLiwRestoreDefault ) == 0 )
         {
-        restoreAll = ETrue;
+        operation = CHspsPersonalisationService::EDefault;
+        }
+    else if( restorePtr.CompareF( KHspsLiwRestoreRom ) == 0 )
+        {
+        operation = CHspsPersonalisationService::ERom;
         }
-    else if( restore.CompareF( KHspsLiwRestoreActive ) != 0 )
+    else if( restorePtr.CompareF( KHspsLiwRestoreViews ) == 0 )
+        {
+        operation = CHspsPersonalisationService::EViews;
+        }        
+    else
         {
         User::Leave( KErrArgument );
-        }           
+        }        
     
     // Get client application's uid
     TInt appUid;
     iHspsConfigurationService->GetAppUidL( appUid );
         
-    iHspsPersonalisationService->RestoreConfigurationsL( appUid, restoreAll );
+    iHspsPersonalisationService->RestoreConfigurationsL( appUid, operation );
 
     // Invalidate ODT.
     iHspsConfigurationService->InvalidateODT();
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_restoreconfigurations_1.h	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_restoreconfigurations_1.h	Tue May 25 13:01:39 2010 +0300
@@ -35,27 +35,27 @@
 
 Test step 1:
 •   Input:
-    RestoreConfigurations(“active”)
+    RestoreConfigurations(“default”)
 •   Expected output:
-    Restoring succeeded
+    Restoring from eMMC/UDA/ROM succeeded
     
 Test step 2:
 •   Input:
     GetActiveAppConf    
 •   Expected output:
-    ROM configuration is restored and returned.
+    Default configuration is restored and returned.
 
 Test step 3:
 •   Input:
     GetPluginConf(“Typical - View1”)    
 •   Expected output:
-    ROM view configuration is returned.     
+    ROM's view configuration from is returned.     
  
 Test step 4:
 •   Input:
-    RestoreConfigurations(“all”)
+    RestoreConfigurations(“views”)
 •   Expected output:
-    Restoring succeeded
+    Restoring of the views succeeded
     
 Test step 5:
 •   Input:
@@ -101,9 +101,9 @@
 //     - Variant value
 10,
 5,
-6,0,0,0,
-26,
-'a','c','t','i','v','e'
+7,0,0,0,
+30,
+'d','e','f','a','u','l','t'
 };
 
 // Test step 1 output:
@@ -1883,9 +1883,9 @@
 //     - Variant value
 10,
 5,
-3,0,0,0,
-14,
-'a','l','l'
+5,0,0,0,
+22,
+'v','i','e','w','s'
 };
 
 // Test step 4 output:
--- a/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp	Tue May 25 13:01:39 2010 +0300
@@ -124,15 +124,10 @@
 void CMCSExecuteAction::RunL()
 	{
 	TInt err = iStatus.Int();
-
     if ( err == KErrNone )
         {
-        TRAP( err, ExecuteL( iItemId, iAction ) );
-        }   
-    if(err != KErrNone)
-    	{
-    	NotifyRequestResult( err );
-    	}
+        ExecuteL( iItemId, iAction );
+        }
 	}
 
 // ---------------------------------------------------------------------------
@@ -142,10 +137,6 @@
 TInt CMCSExecuteAction::RunError(TInt aError)
 	{
     NotifyRequestResult( aError );
-    if ( (aError != KErrDiskFull) && (aError != KErrNoMemory))
-    	{
-    	aError = KErrNone;
-    	}    
 	return aError; 
 	}
 
--- a/idlefw/plugins/devicestatus/src/aisimregpublisher.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/aisimregpublisher.cpp	Tue May 25 13:01:39 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
 #include "ainetworkinfolistener.h"
 #include <activeidle2domainpskeys.h>
 #include <e32property.h>
+#include <featmgr.h>
 
 #include <startupdomainpskeys.h>
 
@@ -49,6 +50,7 @@
 
 void CAiSimRegPublisher::ConstructL()
     {
+    FeatureManager::InitializeLibL();
     iListener = CAiNetworkInfoListener::InstanceL();
     }
 
@@ -65,6 +67,7 @@
 
 CAiSimRegPublisher::~CAiSimRegPublisher()
     {
+    FeatureManager::UnInitializeLib();
     if( iListener )
         {
         iListener->RemoveObserver( *this );
@@ -174,6 +177,15 @@
             default:
                 break;
             }
+         }
+    else if ( FeatureManager::FeatureSupported( KFeatureIdFfManualSelectionPopulatedPlmnList )
+              && aMessage ==
+                  static_cast<MNWMessageObserver::TNWMessages>( KErrGsmMMNetworkFailure ) )
+        {
+        iContentObserver->Publish( *iExtension,
+                                   EAiDeviceStatusContentNetRegStatus,
+                                   EAiDeviceStatusResourceNetRegFail,
+                                   0 );
         }
     }
 
--- a/menucontentsrv/bwins/mcsmenuengu.def	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/bwins/mcsmenuengu.def	Tue May 25 13:01:39 2010 +0300
@@ -1,34 +1,34 @@
 EXPORTS
-	??1CMenuEng@@UAE@XZ @ 1 NONAME ; CMenuEng::~CMenuEng(void)
-	??1CMenuEngObject@@UAE@XZ @ 2 NONAME ; CMenuEngObject::~CMenuEngObject(void)
-	?AddL@CMenuEng@@QAEXAAVCMenuEngObject@@HH@Z @ 3 NONAME ; void CMenuEng::AddL(class CMenuEngObject &, int, int)
-	?AppendNotifyL@CMenuEng@@QAEXHH@Z @ 4 NONAME ; void CMenuEng::AppendNotifyL(int, int)
-	?DequeueOperation@CMenuEng@@QAEXAAVMMenuEngOperation@@@Z @ 5 NONAME ; void CMenuEng::DequeueOperation(class MMenuEngOperation &)
-	?Exist@CMenuEng@@QBEHH@Z @ 6 NONAME ; int CMenuEng::Exist(int) const
-	?FindAttribute@CMenuEngObject@@QBEHABVTDesC16@@AAVTPtrC16@@AAH@Z @ 7 NONAME ; int CMenuEngObject::FindAttribute(class TDesC16 const &, class TPtrC16 &, int &) const
-	?Flags@CMenuEngObject@@QBEKH@Z @ 8 NONAME ; unsigned long CMenuEngObject::Flags(int) const
+	?RemoveAttribute@CMenuEngObject@@QAEXABVTDesC16@@@Z @ 1 NONAME ; void CMenuEngObject::RemoveAttribute(class TDesC16 const &)
+	?TraverseFolderL@CMenuEng@@QBEXHAAVMMenuEngVisitor@@@Z @ 2 NONAME ; void CMenuEng::TraverseFolderL(int, class MMenuEngVisitor &) const
+	?QueueOperationL@CMenuEng@@QAEXAAVMMenuEngOperation@@@Z @ 3 NONAME ; void CMenuEng::QueueOperationL(class MMenuEngOperation &)
+	??1CMenuEngObject@@UAE@XZ @ 4 NONAME ; CMenuEngObject::~CMenuEngObject(void)
+	??1CMenuEng@@UAE@XZ @ 5 NONAME ; CMenuEng::~CMenuEng(void)
+	?RootFolderL@CMenuEng@@QBEXAAH@Z @ 6 NONAME ; void CMenuEng::RootFolderL(int &) const
+	?MoveToFolderL@CMenuEng@@QAEXAAV?$RArray@H@@HH@Z @ 7 NONAME ; void CMenuEng::MoveToFolderL(class RArray<int> &, int, int)
+	?GetOnceLegacyFormat@CMenuEng@@QAEHXZ @ 8 NONAME ; int CMenuEng::GetOnceLegacyFormat(void)
 	?GetAttribute@CMenuEngObject@@QBEHHAAVTPtrC16@@0AAH@Z @ 9 NONAME ; int CMenuEngObject::GetAttribute(int, class TPtrC16 &, class TPtrC16 &, int &) const
-	?GetItemL@CMenuEng@@QBEXHAAVTMenuItem@@@Z @ 10 NONAME ; void CMenuEng::GetItemL(int, class TMenuItem &) const
-	?GetItemsL@CMenuEng@@QBEXAAV?$RArray@VTMenuItem@@@@HPBVMMenuEngFilter@@H@Z @ 11 NONAME ; void CMenuEng::GetItemsL(class RArray<class TMenuItem> &, int, class MMenuEngFilter const *, int) const
-	?GetOnceLegacyFormat@CMenuEng@@QAEHXZ @ 12 NONAME ; int CMenuEng::GetOnceLegacyFormat(void)
-	?Id@CMenuEngObject@@QBEHXZ @ 13 NONAME ; int CMenuEngObject::Id(void) const
-	?MoveToFolderL@CMenuEng@@QAEXAAV?$RArray@H@@HH@Z @ 14 NONAME ; void CMenuEng::MoveToFolderL(class RArray<int> &, int, int)
-	?NewL@CMenuEng@@SAPAV1@ABVTDesC16@@AAVMMenuEngObserver@@@Z @ 15 NONAME ; class CMenuEng * CMenuEng::NewL(class TDesC16 const &, class MMenuEngObserver &)
-	?NewObjectL@CMenuEng@@QAEPAVCMenuEngObject@@ABVTDesC16@@@Z @ 16 NONAME ; class CMenuEngObject * CMenuEng::NewObjectL(class TDesC16 const &)
-	?NumAttributes@CMenuEngObject@@QBEHXZ @ 17 NONAME ; int CMenuEngObject::NumAttributes(void) const
-	?ObjectL@CMenuEng@@QBEABVCMenuEngObject@@H@Z @ 18 NONAME ; class CMenuEngObject const & CMenuEng::ObjectL(int) const
-	?ParentFolderL@CMenuEng@@QBEXHAAH@Z @ 19 NONAME ; void CMenuEng::ParentFolderL(int, int &) const
-	?QueueOperationL@CMenuEng@@QAEXAAVMMenuEngOperation@@@Z @ 20 NONAME ; void CMenuEng::QueueOperationL(class MMenuEngOperation &)
-	?RemoveAttribute@CMenuEngObject@@QAEXABVTDesC16@@@Z @ 21 NONAME ; void CMenuEngObject::RemoveAttribute(class TDesC16 const &)
-	?RemoveL@CMenuEng@@QAEXH@Z @ 22 NONAME ; void CMenuEng::RemoveL(int)
-	?ReorderL@CMenuEng@@QAEXHH@Z @ 23 NONAME ; void CMenuEng::ReorderL(int, int)
-	?Reset@CMenuEngObject@@QAEXXZ @ 24 NONAME ; void CMenuEngObject::Reset(void)
-	?RootFolderL@CMenuEng@@QBEXAAH@Z @ 25 NONAME ; void CMenuEng::RootFolderL(int &) const
-	?SetAttributeL@CMenuEngObject@@QAEXABVTDesC16@@0H@Z @ 26 NONAME ; void CMenuEngObject::SetAttributeL(class TDesC16 const &, class TDesC16 const &, int)
-	?SetFlags@CMenuEngObject@@QAEXKH@Z @ 27 NONAME ; void CMenuEngObject::SetFlags(unsigned long, int)
-	?TraverseFolderL@CMenuEng@@QBEXHAAVMMenuEngVisitor@@@Z @ 28 NONAME ; void CMenuEng::TraverseFolderL(int, class MMenuEngVisitor &) const
-	?Type@CMenuEngObject@@QBE?AVTPtrC16@@XZ @ 29 NONAME ; class TPtrC16 CMenuEngObject::Type(void) const
-	?GetNative@CMenuEngObject@@QBEHXZ @ 30 NONAME ; int CMenuEngObject::GetNative(void) const
-	?SetNative@CMenuEngObject@@QAEXH@Z @ 31 NONAME ; void CMenuEngObject::SetNative(int)
-	?ModifiableObjectL@CMenuEng@@QAEAAVCMenuEngObject@@HH@Z @ 32 NONAME ; class CMenuEngObject & CMenuEng::ModifiableObjectL(int, int)
+	?RemoveL@CMenuEng@@QAEXH@Z @ 10 NONAME ; void CMenuEng::RemoveL(int)
+	?Type@CMenuEngObject@@QBE?AVTPtrC16@@XZ @ 11 NONAME ; class TPtrC16 CMenuEngObject::Type(void) const
+	?ParentFolderL@CMenuEng@@QBEXHAAH@Z @ 12 NONAME ; void CMenuEng::ParentFolderL(int, int &) const
+	?NewObjectL@CMenuEng@@QAEPAVCMenuEngObject@@ABVTDesC16@@@Z @ 13 NONAME ; class CMenuEngObject * CMenuEng::NewObjectL(class TDesC16 const &)
+	?ObjectL@CMenuEng@@QBEABVCMenuEngObject@@H@Z @ 14 NONAME ; class CMenuEngObject const & CMenuEng::ObjectL(int) const
+	?Id@CMenuEngObject@@QBEHXZ @ 15 NONAME ; int CMenuEngObject::Id(void) const
+	?Flags@CMenuEngObject@@QBEKH@Z @ 16 NONAME ; unsigned long CMenuEngObject::Flags(int) const
+	?AppendNotifyL@CMenuEng@@QAEXHH@Z @ 17 NONAME ; void CMenuEng::AppendNotifyL(int, int)
+	?GetItemL@CMenuEng@@QBEXHAAVTMenuItem@@@Z @ 18 NONAME ; void CMenuEng::GetItemL(int, class TMenuItem &) const
+	?SetAttributeL@CMenuEngObject@@QAEXABVTDesC16@@0H@Z @ 19 NONAME ; void CMenuEngObject::SetAttributeL(class TDesC16 const &, class TDesC16 const &, int)
+	?GetItemsL@CMenuEng@@QBEXAAV?$RArray@VTMenuItem@@@@HPBVMMenuEngFilter@@H@Z @ 20 NONAME ; void CMenuEng::GetItemsL(class RArray<class TMenuItem> &, int, class MMenuEngFilter const *, int) const
+	?SetAppType@CMenuEngObject@@QAEXW4TAppType@1@@Z @ 21 NONAME ; void CMenuEngObject::SetAppType(enum CMenuEngObject::TAppType)
+	?DequeueOperation@CMenuEng@@QAEXAAVMMenuEngOperation@@@Z @ 22 NONAME ; void CMenuEng::DequeueOperation(class MMenuEngOperation &)
+	?NewL@CMenuEng@@SAPAV1@ABVTDesC16@@AAVMMenuEngObserver@@@Z @ 23 NONAME ; class CMenuEng * CMenuEng::NewL(class TDesC16 const &, class MMenuEngObserver &)
+	?AddL@CMenuEng@@QAEXAAVCMenuEngObject@@HH@Z @ 24 NONAME ; void CMenuEng::AddL(class CMenuEngObject &, int, int)
+	?NumAttributes@CMenuEngObject@@QBEHXZ @ 25 NONAME ; int CMenuEngObject::NumAttributes(void) const
+	?ModifiableObjectL@CMenuEng@@QAEAAVCMenuEngObject@@HH@Z @ 26 NONAME ; class CMenuEngObject & CMenuEng::ModifiableObjectL(int, int)
+	?Reset@CMenuEngObject@@QAEXXZ @ 27 NONAME ; void CMenuEngObject::Reset(void)
+	?Exist@CMenuEng@@QBEHH@Z @ 28 NONAME ; int CMenuEng::Exist(int) const
+	?SetFlags@CMenuEngObject@@QAEXKH@Z @ 29 NONAME ; void CMenuEngObject::SetFlags(unsigned long, int)
+	?GetAppType@CMenuEngObject@@QBE?AW4TAppType@1@XZ @ 30 NONAME ; enum CMenuEngObject::TAppType CMenuEngObject::GetAppType(void) const
+	?ReorderL@CMenuEng@@QAEXHH@Z @ 31 NONAME ; void CMenuEng::ReorderL(int, int)
+	?FindAttribute@CMenuEngObject@@QBEHABVTDesC16@@AAVTPtrC16@@AAH@Z @ 32 NONAME ; int CMenuEngObject::FindAttribute(class TDesC16 const &, class TPtrC16 &, int &) const
 
--- a/menucontentsrv/bwins/mcsmenuu.def	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/bwins/mcsmenuu.def	Tue May 25 13:01:39 2010 +0300
@@ -1,59 +1,59 @@
 EXPORTS
-	??0CMenuHandler@@IAE@AAVRMenu@@@Z @ 1 NONAME ; CMenuHandler::CMenuHandler(class RMenu &)
-	??1CMenuCompletedOperation@@UAE@XZ @ 2 NONAME ; CMenuCompletedOperation::~CMenuCompletedOperation(void)
-	??1CMenuFilter@@UAE@XZ @ 3 NONAME ; CMenuFilter::~CMenuFilter(void)
-	??1CMenuHandler@@UAE@XZ @ 4 NONAME ; CMenuHandler::~CMenuHandler(void)
-	??1CMenuItem@@UAE@XZ @ 5 NONAME ; CMenuItem::~CMenuItem(void)
-	?BaseConstructL@CMenuHandler@@IAEXXZ @ 6 NONAME ; void CMenuHandler::BaseConstructL(void)
-	?Cancel@RMenuNotifier@@QAEXXZ @ 7 NONAME ; void RMenuNotifier::Cancel(void)
-	?Close@RMenu@@QAEXXZ @ 8 NONAME ; void RMenu::Close(void)
-	?Close@RMenuNotifier@@QAEXXZ @ 9 NONAME ; void RMenuNotifier::Close(void)
-	?CreateL@CMenuItem@@SAPAV1@AAVRMenu@@ABVTDesC16@@HH@Z @ 10 NONAME ; class CMenuItem * CMenuItem::CreateL(class RMenu &, class TDesC16 const &, int, int)
-	?DoNotHaveAttributeL@CMenuFilter@@QAEXABVTDesC16@@@Z @ 11 NONAME ; void CMenuFilter::DoNotHaveAttributeL(class TDesC16 const &)
+	?SupportsType@CMenuHandler@@UAEHABVTDesC16@@@Z @ 1 NONAME ; int CMenuHandler::SupportsType(class TDesC16 const &)
+	?HaveAttributeL@CMenuFilter@@QAEXABVTDesC16@@0@Z @ 2 NONAME ; void CMenuFilter::HaveAttributeL(class TDesC16 const &, class TDesC16 const &)
+	?GetAttribute@CMenuFilter@@QBEHHAAVTPtrC16@@0@Z @ 3 NONAME ; int CMenuFilter::GetAttribute(int, class TPtrC16 &, class TPtrC16 &) const
+	?Open@RMenuNotifier@@QAEHAAVRMenu@@@Z @ 4 NONAME ; int RMenuNotifier::Open(class RMenu &)
+	?Notify@RMenuNotifier@@QAEXHHAAVTRequestStatus@@@Z @ 5 NONAME ; void RMenuNotifier::Notify(int, int, class TRequestStatus &)
+	?SetAttributeL@CMenuItem@@QAEXABVTDesC16@@0@Z @ 6 NONAME ; void CMenuItem::SetAttributeL(class TDesC16 const &, class TDesC16 const &)
+	?Close@RMenuNotifier@@QAEXXZ @ 7 NONAME ; void RMenuNotifier::Close(void)
+	?RunningStatusL@CMenuItem@@QAEHXZ @ 8 NONAME ; int CMenuItem::RunningStatusL(void)
+	?ResourceMark@RMenu@@QAEXXZ @ 9 NONAME ; void RMenu::ResourceMark(void)
+	?OpenL@RMenu@@QAEXABVTDesC16@@@Z @ 10 NONAME ; void RMenu::OpenL(class TDesC16 const &)
+	?GetRunningAppsL@RMenu@@QAEXAAV?$RArray@VTUid@@@@@Z @ 11 NONAME ; void RMenu::GetRunningAppsL(class RArray<class TUid> &)
 	?Flags@CMenuItem@@QBEKXZ @ 12 NONAME ; unsigned long CMenuItem::Flags(void) const
-	?FlagsOff@CMenuFilter@@QBEKXZ @ 13 NONAME ; unsigned long CMenuFilter::FlagsOff(void) const
+	?Reset@CMenuFilter@@QAEXXZ @ 13 NONAME ; void CMenuFilter::Reset(void)
 	?FlagsOn@CMenuFilter@@QBEKXZ @ 14 NONAME ; unsigned long CMenuFilter::FlagsOn(void) const
-	?GetAttribute@CMenuFilter@@QBEHHAAVTPtrC16@@0@Z @ 15 NONAME ; int CMenuFilter::GetAttribute(int, class TPtrC16 &, class TPtrC16 &) const
-	?GetAttributeL@CMenuItem@@QAE?AVTPtrC16@@ABVTDesC16@@AAH@Z @ 16 NONAME ; class TPtrC16 CMenuItem::GetAttributeL(class TDesC16 const &, int &)
-	?GetAttributeListL@CMenuItem@@QAEXAAV?$RArray@V?$TBuf@$0EA@@@@@@Z @ 17 NONAME ; void CMenuItem::GetAttributeListL(class RArray<class TBuf<64> > &)
-	?GetItemsL@RMenu@@QAEXAAV?$RArray@VTMenuItem@@@@HPBVCMenuFilter@@H@Z @ 18 NONAME ; void RMenu::GetItemsL(class RArray<class TMenuItem> &, int, class CMenuFilter const *, int)
-	?GetRunningAppsL@RMenu@@QAEXAAV?$RArray@VTUid@@@@@Z @ 19 NONAME ; void RMenu::GetRunningAppsL(class RArray<class TUid> &)
-	?HandleCommandL@CMenuHandler@@UAEPAVCMenuOperation@@AAVCMenuItem@@ABVTDesC8@@1AAVTRequestStatus@@@Z @ 20 NONAME ; class CMenuOperation * CMenuHandler::HandleCommandL(class CMenuItem &, class TDesC8 const &, class TDesC8 const &, class TRequestStatus &)
-	?HandleCommandL@CMenuItem@@QAEPAVCMenuOperation@@ABVTDesC8@@0AAVTRequestStatus@@@Z @ 21 NONAME ; class CMenuOperation * CMenuItem::HandleCommandL(class TDesC8 const &, class TDesC8 const &, class TRequestStatus &)
-	?HaveAttributeL@CMenuFilter@@QAEXABVTDesC16@@0@Z @ 22 NONAME ; void CMenuFilter::HaveAttributeL(class TDesC16 const &, class TDesC16 const &)
-	?Id@CMenuItem@@QBEHXZ @ 23 NONAME ; int CMenuItem::Id(void) const
-	?MoveToFolderL@RMenu@@QAEPAVCMenuOperation@@ABV?$RArray@H@@HHAAVTRequestStatus@@@Z @ 24 NONAME ; class CMenuOperation * RMenu::MoveToFolderL(class RArray<int> const &, int, int, class TRequestStatus &)
-	?NewL@CMcsCacheHandler@@SAPAV1@AAVCMenuEng@@AAVCMenuSrvEngUtils@@@Z @ 25 NONAME ; class CMcsCacheHandler * CMcsCacheHandler::NewL(class CMenuEng &, class CMenuSrvEngUtils &)
-	?NewL@CMcsSatMonitor@@SAPAV1@AAVCMenuEng@@@Z @ 26 NONAME ; class CMcsSatMonitor * CMcsSatMonitor::NewL(class CMenuEng &)
-	?NewL@CMenuCompletedOperation@@SAPAV1@AAVRMenu@@HAAVTRequestStatus@@H@Z @ 27 NONAME ; class CMenuCompletedOperation * CMenuCompletedOperation::NewL(class RMenu &, int, class TRequestStatus &, int)
-	?NewL@CMenuFilter@@SAPAV1@XZ @ 28 NONAME ; class CMenuFilter * CMenuFilter::NewL(void)
-	?NewLC@CMenuFilter@@SAPAV1@XZ @ 29 NONAME ; class CMenuFilter * CMenuFilter::NewLC(void)
-	?Notify@RMenuNotifier@@QAEXHHAAVTRequestStatus@@@Z @ 30 NONAME ; void RMenuNotifier::Notify(int, int, class TRequestStatus &)
-	?NumAttributes@CMenuFilter@@QBEHXZ @ 31 NONAME ; int CMenuFilter::NumAttributes(void) const
-	?Open@RMenuNotifier@@QAEHAAVRMenu@@@Z @ 32 NONAME ; int RMenuNotifier::Open(class RMenu &)
-	?OpenL@CMenuItem@@SAPAV1@AAVRMenu@@ABVTMenuItem@@@Z @ 33 NONAME ; class CMenuItem * CMenuItem::OpenL(class RMenu &, class TMenuItem const &)
-	?OpenL@CMenuItem@@SAPAV1@AAVRMenu@@H@Z @ 34 NONAME ; class CMenuItem * CMenuItem::OpenL(class RMenu &, int)
-	?OpenL@RMenu@@QAEXABVTDesC16@@@Z @ 35 NONAME ; void RMenu::OpenL(class TDesC16 const &)
-	?Parent@CMenuItem@@QBEHXZ @ 36 NONAME ; int CMenuItem::Parent(void) const
-	?RemoveAttribute@CMenuFilter@@QAEXABVTDesC16@@@Z @ 37 NONAME ; void CMenuFilter::RemoveAttribute(class TDesC16 const &)
-	?RemoveAttributeL@CMenuItem@@QAEXABVTDesC16@@@Z @ 38 NONAME ; void CMenuItem::RemoveAttributeL(class TDesC16 const &)
+	?SetFlags@CMenuItem@@QAEXKH@Z @ 15 NONAME ; void CMenuItem::SetFlags(unsigned long, int)
+	?NewL@CMcsSatMonitor@@SAPAV1@AAVCMenuEng@@@Z @ 16 NONAME ; class CMcsSatMonitor * CMcsSatMonitor::NewL(class CMenuEng &)
+	?MoveToFolderL@RMenu@@QAEPAVCMenuOperation@@ABV?$RArray@H@@HHAAVTRequestStatus@@@Z @ 17 NONAME ; class CMenuOperation * RMenu::MoveToFolderL(class RArray<int> const &, int, int, class TRequestStatus &)
+	?Type@CMenuFilter@@QBE?AVTPtrC16@@XZ @ 18 NONAME ; class TPtrC16 CMenuFilter::Type(void) const
+	?ResourceCount@RMenu@@QAEHXZ @ 19 NONAME ; int RMenu::ResourceCount(void)
+	?SetFlags@CMenuFilter@@QAEXKK@Z @ 20 NONAME ; void CMenuFilter::SetFlags(unsigned long, unsigned long)
+	?RunMenuServer@@YAHXZ @ 21 NONAME ; int RunMenuServer(void)
+	?NewLC@CMenuFilter@@SAPAV1@XZ @ 22 NONAME ; class CMenuFilter * CMenuFilter::NewLC(void)
+	?BaseConstructL@CMenuHandler@@IAEXXZ @ 23 NONAME ; void CMenuHandler::BaseConstructL(void)
+	?SetType@CMenuFilter@@QAEXABVTDesC16@@@Z @ 24 NONAME ; void CMenuFilter::SetType(class TDesC16 const &)
+	?NumAttributes@CMenuFilter@@QBEHXZ @ 25 NONAME ; int CMenuFilter::NumAttributes(void) const
+	?Id@CMenuItem@@QBEHXZ @ 26 NONAME ; int CMenuItem::Id(void) const
+	?RemoveAttributeL@CMenuItem@@QAEXABVTDesC16@@@Z @ 27 NONAME ; void CMenuItem::RemoveAttributeL(class TDesC16 const &)
+	?Parent@CMenuItem@@QBEHXZ @ 28 NONAME ; int CMenuItem::Parent(void) const
+	?NewL@CMenuFilter@@SAPAV1@XZ @ 29 NONAME ; class CMenuFilter * CMenuFilter::NewL(void)
+	?ReorderL@RMenu@@QAEPAVCMenuOperation@@HHAAVTRequestStatus@@@Z @ 30 NONAME ; class CMenuOperation * RMenu::ReorderL(int, int, class TRequestStatus &)
+	?RemoveAttribute@CMenuFilter@@QAEXABVTDesC16@@@Z @ 31 NONAME ; void CMenuFilter::RemoveAttribute(class TDesC16 const &)
+	?Type@CMenuItem@@QBE?AVTPtrC16@@XZ @ 32 NONAME ; class TPtrC16 CMenuItem::Type(void) const
+	?HandleCommandL@CMenuItem@@QAEPAVCMenuOperation@@ABVTDesC8@@0AAVTRequestStatus@@@Z @ 33 NONAME ; class CMenuOperation * CMenuItem::HandleCommandL(class TDesC8 const &, class TDesC8 const &, class TRequestStatus &)
+	?ResourceCheck@RMenu@@QAEXXZ @ 34 NONAME ; void RMenu::ResourceCheck(void)
+	?HandleCommandL@CMenuHandler@@UAEPAVCMenuOperation@@AAVCMenuItem@@ABVTDesC8@@1AAVTRequestStatus@@@Z @ 35 NONAME ; class CMenuOperation * CMenuHandler::HandleCommandL(class CMenuItem &, class TDesC8 const &, class TDesC8 const &, class TRequestStatus &)
+	?Cancel@RMenuNotifier@@QAEXXZ @ 36 NONAME ; void RMenuNotifier::Cancel(void)
+	??1CMenuItem@@UAE@XZ @ 37 NONAME ; CMenuItem::~CMenuItem(void)
+	?GetAttributeL@CMenuItem@@QAE?AVTPtrC16@@ABVTDesC16@@AAH@Z @ 38 NONAME ; class TPtrC16 CMenuItem::GetAttributeL(class TDesC16 const &, int &)
 	?RemoveL@RMenu@@QAEPAVCMenuOperation@@HAAVTRequestStatus@@@Z @ 39 NONAME ; class CMenuOperation * RMenu::RemoveL(int, class TRequestStatus &)
-	?ReorderL@RMenu@@QAEPAVCMenuOperation@@HHAAVTRequestStatus@@@Z @ 40 NONAME ; class CMenuOperation * RMenu::ReorderL(int, int, class TRequestStatus &)
-	?Reset@CMenuFilter@@QAEXXZ @ 41 NONAME ; void CMenuFilter::Reset(void)
-	?ResourceCheck@RMenu@@QAEXXZ @ 42 NONAME ; void RMenu::ResourceCheck(void)
-	?ResourceCount@RMenu@@QAEHXZ @ 43 NONAME ; int RMenu::ResourceCount(void)
-	?ResourceMark@RMenu@@QAEXXZ @ 44 NONAME ; void RMenu::ResourceMark(void)
-	?RootFolderL@RMenu@@QAEHXZ @ 45 NONAME ; int RMenu::RootFolderL(void)
-	?RunMenuServer@@YAHXZ @ 46 NONAME ; int RunMenuServer(void)
-	?RunningStatusL@CMenuItem@@QAEHXZ @ 47 NONAME ; int CMenuItem::RunningStatusL(void)
-	?SaveL@CMenuItem@@QAEPAVCMenuOperation@@AAVTRequestStatus@@@Z @ 48 NONAME ; class CMenuOperation * CMenuItem::SaveL(class TRequestStatus &)
-	?SetAttributeL@CMenuItem@@QAEXABVTDesC16@@0@Z @ 49 NONAME ; void CMenuItem::SetAttributeL(class TDesC16 const &, class TDesC16 const &)
-	?SetFlags@CMenuFilter@@QAEXKK@Z @ 50 NONAME ; void CMenuFilter::SetFlags(unsigned long, unsigned long)
-	?SetFlags@CMenuItem@@QAEXKH@Z @ 51 NONAME ; void CMenuItem::SetFlags(unsigned long, int)
-	?SetType@CMenuFilter@@QAEXABVTDesC16@@@Z @ 52 NONAME ; void CMenuFilter::SetType(class TDesC16 const &)
-	?SupportsType@CMenuHandler@@UAEHABVTDesC16@@@Z @ 53 NONAME ; int CMenuHandler::SupportsType(class TDesC16 const &)
-	?Type@CMenuFilter@@QBE?AVTPtrC16@@XZ @ 54 NONAME ; class TPtrC16 CMenuFilter::Type(void) const
-	?Type@CMenuItem@@QBE?AVTPtrC16@@XZ @ 55 NONAME ; class TPtrC16 CMenuItem::Type(void) const
-	?__DbgSetAllocFail@RMenu@@QAEXW4TAllocFail@RAllocator@@H@Z @ 56 NONAME ; void RMenu::__DbgSetAllocFail(enum RAllocator::TAllocFail, int)
-	?GetListL@RMenuSapi@@QAEXAAVTDes8@@AAVRBuf8@@@Z @ 57 NONAME ; void RMenuSapi::GetListL(class TDes8 &, class RBuf8 &)
+	?NewL@CMenuCompletedOperation@@SAPAV1@AAVRMenu@@HAAVTRequestStatus@@H@Z @ 40 NONAME ; class CMenuCompletedOperation * CMenuCompletedOperation::NewL(class RMenu &, int, class TRequestStatus &, int)
+	?OpenL@CMenuItem@@SAPAV1@AAVRMenu@@H@Z @ 41 NONAME ; class CMenuItem * CMenuItem::OpenL(class RMenu &, int)
+	?GetAttributeListL@CMenuItem@@QAEXAAV?$RArray@V?$TBuf@$0EA@@@@@@Z @ 42 NONAME ; void CMenuItem::GetAttributeListL(class RArray<class TBuf<64> > &)
+	?Close@RMenu@@QAEXXZ @ 43 NONAME ; void RMenu::Close(void)
+	?CreateL@CMenuItem@@SAPAV1@AAVRMenu@@ABVTDesC16@@HH@Z @ 44 NONAME ; class CMenuItem * CMenuItem::CreateL(class RMenu &, class TDesC16 const &, int, int)
+	??1CMenuFilter@@UAE@XZ @ 45 NONAME ; CMenuFilter::~CMenuFilter(void)
+	??0CMenuHandler@@IAE@AAVRMenu@@@Z @ 46 NONAME ; CMenuHandler::CMenuHandler(class RMenu &)
+	?GetItemsL@RMenu@@QAEXAAV?$RArray@VTMenuItem@@@@HPBVCMenuFilter@@H@Z @ 47 NONAME ; void RMenu::GetItemsL(class RArray<class TMenuItem> &, int, class CMenuFilter const *, int)
+	?__DbgSetAllocFail@RMenu@@QAEXW4TAllocFail@RAllocator@@H@Z @ 48 NONAME ; void RMenu::__DbgSetAllocFail(enum RAllocator::TAllocFail, int)
+	?FlagsOff@CMenuFilter@@QBEKXZ @ 49 NONAME ; unsigned long CMenuFilter::FlagsOff(void) const
+	?GetListL@RMenuSapi@@QAEXAAVTDes8@@AAVRBuf8@@@Z @ 50 NONAME ; void RMenuSapi::GetListL(class TDes8 &, class RBuf8 &)
+	?DoNotHaveAttributeL@CMenuFilter@@QAEXABVTDesC16@@@Z @ 51 NONAME ; void CMenuFilter::DoNotHaveAttributeL(class TDesC16 const &)
+	??1CMenuHandler@@UAE@XZ @ 52 NONAME ; CMenuHandler::~CMenuHandler(void)
+	??1CMenuCompletedOperation@@UAE@XZ @ 53 NONAME ; CMenuCompletedOperation::~CMenuCompletedOperation(void)
+	?RootFolderL@RMenu@@QAEHXZ @ 54 NONAME ; int RMenu::RootFolderL(void)
+	?OpenL@CMenuItem@@SAPAV1@AAVRMenu@@ABVTMenuItem@@@Z @ 55 NONAME ; class CMenuItem * CMenuItem::OpenL(class RMenu &, class TMenuItem const &)
+	?SaveL@CMenuItem@@QAEPAVCMenuOperation@@AAVTRequestStatus@@@Z @ 56 NONAME ; class CMenuOperation * CMenuItem::SaveL(class TRequestStatus &)
+	?NewL@CMcsCacheHandler@@SAPAV1@AAVCMenuEng@@AAVCMenuSrvEngUtils@@@Z @ 57 NONAME ; class CMcsCacheHandler * CMcsCacheHandler::NewL(class CMenuEng &, class CMenuSrvEngUtils &)
 
--- a/menucontentsrv/eabi/mcsmenuengu.def	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/eabi/mcsmenuengu.def	Tue May 25 13:01:39 2010 +0300
@@ -1,9 +1,9 @@
 EXPORTS
-	_ZN14CMenuEngObject13SetAttributeLERK7TDesC16S2_i @ 1 NONAME
-	_ZN14CMenuEngObject15RemoveAttributeERK7TDesC16 @ 2 NONAME
-	_ZN14CMenuEngObject5ResetEv @ 3 NONAME
-	_ZN14CMenuEngObject8SetFlagsEmi @ 4 NONAME
-	_ZN14CMenuEngObject9SetNativeEi @ 5 NONAME
+	_ZN14CMenuEngObject10SetAppTypeENS_8TAppTypeE @ 1 NONAME
+	_ZN14CMenuEngObject13SetAttributeLERK7TDesC16S2_i @ 2 NONAME
+	_ZN14CMenuEngObject15RemoveAttributeERK7TDesC16 @ 3 NONAME
+	_ZN14CMenuEngObject5ResetEv @ 4 NONAME
+	_ZN14CMenuEngObject8SetFlagsEmi @ 5 NONAME
 	_ZN14CMenuEngObjectD0Ev @ 6 NONAME
 	_ZN14CMenuEngObjectD1Ev @ 7 NONAME
 	_ZN14CMenuEngObjectD2Ev @ 8 NONAME
@@ -21,12 +21,12 @@
 	_ZN8CMenuEngD0Ev @ 20 NONAME
 	_ZN8CMenuEngD1Ev @ 21 NONAME
 	_ZN8CMenuEngD2Ev @ 22 NONAME
-	_ZNK14CMenuEngObject12GetAttributeEiR7TPtrC16S1_Ri @ 23 NONAME
-	_ZNK14CMenuEngObject13FindAttributeERK7TDesC16R7TPtrC16Ri @ 24 NONAME
-	_ZNK14CMenuEngObject2IdEv @ 25 NONAME
-	_ZNK14CMenuEngObject4TypeEv @ 26 NONAME
-	_ZNK14CMenuEngObject5FlagsEi @ 27 NONAME
-	_ZNK14CMenuEngObject9GetNativeEv @ 28 NONAME
+	_ZNK14CMenuEngObject10GetAppTypeEv @ 23 NONAME
+	_ZNK14CMenuEngObject12GetAttributeEiR7TPtrC16S1_Ri @ 24 NONAME
+	_ZNK14CMenuEngObject13FindAttributeERK7TDesC16R7TPtrC16Ri @ 25 NONAME
+	_ZNK14CMenuEngObject2IdEv @ 26 NONAME
+	_ZNK14CMenuEngObject4TypeEv @ 27 NONAME
+	_ZNK14CMenuEngObject5FlagsEi @ 28 NONAME
 	_ZNK8CMenuEng11RootFolderLERi @ 29 NONAME
 	_ZNK8CMenuEng13ParentFolderLEiRi @ 30 NONAME
 	_ZNK8CMenuEng15TraverseFolderLEiR15MMenuEngVisitor @ 31 NONAME
--- a/menucontentsrv/eabi/mcsmenuu.def	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/eabi/mcsmenuu.def	Tue May 25 13:01:39 2010 +0300
@@ -65,20 +65,20 @@
 	_ZNK9CMenuItem4TypeEv @ 64 NONAME
 	_ZNK9CMenuItem5FlagsEv @ 65 NONAME
 	_ZNK9CMenuItem6ParentEv @ 66 NONAME
-	_ZTI12CMenuHandler @ 67 NONAME ; #<TI>#
-	_ZTI18TMenuSrvAttrFilter @ 68 NONAME ; #<TI>#
-	_ZTI18TMenuSrvTypeFilter @ 69 NONAME ; #<TI>#
-	_ZTI22RMcsDrmObserverManager @ 70 NONAME ; #<TI>#
-	_ZTI22TMenuSrvTypeAttrFilter @ 71 NONAME ; #<TI>#
-	_ZTI23TMenuSrvHiddenAppFilter @ 72 NONAME ; #<TI>#
-	_ZTI24TMenuSrvAttrExistsFilter @ 73 NONAME ; #<TI>#
-	_ZTI28TMenuSrvTypeAttrExistsFilter @ 74 NONAME ; #<TI>#
-	_ZTV12CMenuHandler @ 75 NONAME ; #<VT>#
-	_ZTV18TMenuSrvAttrFilter @ 76 NONAME ; #<VT>#
-	_ZTV18TMenuSrvTypeFilter @ 77 NONAME ; #<VT>#
-	_ZTV22RMcsDrmObserverManager @ 78 NONAME ; #<VT>#
-	_ZTV22TMenuSrvTypeAttrFilter @ 79 NONAME ; #<VT>#
-	_ZTV23TMenuSrvHiddenAppFilter @ 80 NONAME ; #<VT>#
-	_ZTV24TMenuSrvAttrExistsFilter @ 81 NONAME ; #<VT>#
-	_ZTV28TMenuSrvTypeAttrExistsFilter @ 82 NONAME ; #<VT>#
+	_ZTI12CMenuHandler @ 67 NONAME
+	_ZTI18TMenuSrvAttrFilter @ 68 NONAME
+	_ZTI18TMenuSrvTypeFilter @ 69 NONAME
+	_ZTI22RMcsDrmObserverManager @ 70 NONAME
+	_ZTI22TMenuSrvTypeAttrFilter @ 71 NONAME
+	_ZTI23TMenuSrvHiddenAppFilter @ 72 NONAME
+	_ZTI24TMenuSrvAttrExistsFilter @ 73 NONAME
+	_ZTI28TMenuSrvTypeAttrExistsFilter @ 74 NONAME
+	_ZTV12CMenuHandler @ 75 NONAME
+	_ZTV18TMenuSrvAttrFilter @ 76 NONAME
+	_ZTV18TMenuSrvTypeFilter @ 77 NONAME
+	_ZTV22RMcsDrmObserverManager @ 78 NONAME
+	_ZTV22TMenuSrvTypeAttrFilter @ 79 NONAME
+	_ZTV23TMenuSrvHiddenAppFilter @ 80 NONAME
+	_ZTV24TMenuSrvAttrExistsFilter @ 81 NONAME
+	_ZTV28TMenuSrvTypeAttrExistsFilter @ 82 NONAME
 
--- a/menucontentsrv/eabi/mcssathandleru.def	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/eabi/mcssathandleru.def	Tue May 25 13:01:39 2010 +0300
@@ -4,6 +4,6 @@
 	_ZN14CMcsSatHandler7GetNameER6TDes16 @ 3 NONAME
 	_ZN14CMcsSatHandler9LoadIconLEv @ 4 NONAME
 	_ZN15CMcsSatNotifier4NewLEP23MMcsSATNotifierCallback4TUidj @ 5 NONAME
-	_ZTI15CMcsSatNotifier @ 6 NONAME ; #<TI>#
-	_ZTV15CMcsSatNotifier @ 7 NONAME ; #<VT>#
+	_ZTI15CMcsSatNotifier @ 6 NONAME
+	_ZTV15CMcsSatNotifier @ 7 NONAME
 
--- a/menucontentsrv/enginc/menuengobject.h	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/enginc/menuengobject.h	Tue May 25 13:01:39 2010 +0300
@@ -42,6 +42,17 @@
 public:     // construction
 
     /**
+    * Enum indicating type of application.
+    */
+    enum TAppType
+        {
+        ENoTypeApp,
+        ENativeApp,
+        EJavaApp,
+        EWidgetApp
+        };
+
+    /**
     * Destructor.
     */
     IMPORT_C virtual ~CMenuEngObject();
@@ -144,19 +155,19 @@
         const TDesC& aAttrName,
         const TDesC& aAttrValue,
         TBool aLocalized ); // Set attribute value.
-    
+
     /**
     * Method to set iNative for apps.
     */
-    IMPORT_C void SetNative( TBool aNative );
+    IMPORT_C void SetAppType( TAppType aNative );
 
     /**
     * Method to get iNative for apps.
     * @return ETrue if app is native.
     */
-    IMPORT_C TBool GetNative() const;
+    IMPORT_C TAppType GetAppType() const;
 
-    
+
     /**
     * Remove attribute.
     * @param aAttrName Name.
@@ -197,30 +208,30 @@
     * @return Type identifier.
     */
     const TDesC& TypeIdentifier();
-    
-    /** 
+
+    /**
      * Updates flags with hidden flag from central repository if nececerry.
      * @param aFlags flags.
-     */ 
+     */
     void UpdateCrHiddenFlagL( TUint32& aFlags ) const;
 
-    /** 
+    /**
      * Parses descriptor containing folders hidden in central repository.
      * @param aHiddenFolders descriptor containing folders hidden in central repository.
      * @param aHiddenFoldersArray array to fill with names of folders hidden in central repository.
-     */ 
-    void ParseHiddenFoldersL( 
-                const TDesC& aHiddenFolders, 
+     */
+    void ParseHiddenFoldersL(
+                const TDesC& aHiddenFolders,
                 RArray<TPtrC>& aHiddenFoldersArray ) const;
 
-    /** 
+    /**
      * Checks wether folder name is in Central Repository.
      * @param aFolderName descriptor containing name of a folder.
      * @return ETrue if folder is in array, EFalse otherwise.
-     */ 
+     */
     TBool IsInCrL( const TDesC& aFolderName ) const;
 
-    
+
 
 private:    // data
 
@@ -229,7 +240,7 @@
     RBuf iType; /// Type. Own.
     RMenuEngObjectAttrArray iAttributes; ///< Attributes. Own.
     TUint32 iFlags; ///< Flags.
-    TBool iNative;	///< app is not of midlet/java type
+    TAppType iAppType;	///< app type
 
     };
 
--- a/menucontentsrv/engsrc/menuengobject.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/engsrc/menuengobject.cpp	Tue May 25 13:01:39 2010 +0300
@@ -81,7 +81,8 @@
 // CMenuEngObject::CMenuEngObject
 // ---------------------------------------------------------
 //
-CMenuEngObject::CMenuEngObject( CMenuEng& aEng ): iEng( aEng ), iNative( ETrue )
+CMenuEngObject::CMenuEngObject( CMenuEng& aEng ): iEng( aEng ),
+        iAppType( ENoTypeApp )
     {
     }
 
@@ -143,30 +144,30 @@
 // CMenuEngObject::ParseHiddenFoldersL
 // ---------------------------------------------------------
 //
-void CMenuEngObject::ParseHiddenFoldersL( 
-            const TDesC& aHiddenFolders, 
+void CMenuEngObject::ParseHiddenFoldersL(
+            const TDesC& aHiddenFolders,
             RArray<TPtrC>& aHiddenFoldersArray ) const
     {
     TLex input( aHiddenFolders );
     TLexMark startMark;
-    input.Mark( startMark ); 
+    input.Mark( startMark );
     TBool notEmpty = EFalse;
     while ( !input.Eos() )
         {
         if( input.Peek() == ',')
             {
             User::LeaveIfError( aHiddenFoldersArray.
-                            Append( input.MarkedToken( startMark )  ) );            
+                            Append( input.MarkedToken( startMark )  ) );
             input.Inc();
             input.Mark( startMark );
             }
-        input.Inc();     
-        notEmpty = ETrue;       
+        input.Inc();
+        notEmpty = ETrue;
         }
 	if ( notEmpty )
 		{
 		User::LeaveIfError( aHiddenFoldersArray.
-						Append( input.MarkedToken( startMark )  ) );            
+						Append( input.MarkedToken( startMark )  ) );
 		}
    }
 
@@ -179,15 +180,15 @@
 	RBuf hiddenCRFolders;
 	CleanupClosePushL( hiddenCRFolders );
 	hiddenCRFolders.CreateL( KCenRepBufferSize );
-    
+
     CRepository* cenRepSession = CRepository::NewLC( KCRUidMenu );
     cenRepSession->Get( KMenuHideCPFolder, hiddenCRFolders );
 	CleanupStack::PopAndDestroy( cenRepSession );
-	
+
 	RArray<TPtrC> hiddenFoldersArray;
     CleanupClosePushL( hiddenFoldersArray );
 	ParseHiddenFoldersL( hiddenCRFolders, hiddenFoldersArray );
-    
+
     TBool result(EFalse);
     TInt id = hiddenFoldersArray.Find(aFolderName);
     if (KErrNotFound != id )
@@ -199,7 +200,7 @@
             result = ETrue;
             }
         }
-    
+
 	CleanupStack::PopAndDestroy( &hiddenFoldersArray );
 	CleanupStack::PopAndDestroy( &hiddenCRFolders );
 
@@ -278,10 +279,10 @@
 
 // ----------------------------------------------------------------------------
 // CMenuEngObject::SetAttributeL
-// Menu item lock flags are checked (e.g. can rename), but only when the 
+// Menu item lock flags are checked (e.g. can rename), but only when the
 // current SetAttributeL call is not made from the object factories.
 // If it is called from there, no flags checking is made.
-// This method is called from object factories when the engine is in 
+// This method is called from object factories when the engine is in
 // ELoadRamFile or ELoadRomFile states.
 // ----------------------------------------------------------------------------
 //
@@ -297,12 +298,12 @@
 ( const TDesC& aAttrName, const TDesC& aAttrValue, TBool aLocalized )
     {
     CheckAttrNameL( aAttrName );
-    
-    if ( iEng.State() != CMenuEng::ELoadRamFile && 
+
+    if ( iEng.State() != CMenuEng::ELoadRamFile &&
          iEng.State() != CMenuEng::ELoadRomFile &&
-         Flags() & TMenuItem::ELockName && 
-         ( 0 == aAttrName.Compare( KMenuAttrShortName ) || 
-           0 == aAttrName.Compare( KMenuAttrLongName ) || 
+         Flags() & TMenuItem::ELockName &&
+         ( 0 == aAttrName.Compare( KMenuAttrShortName ) ||
+           0 == aAttrName.Compare( KMenuAttrLongName ) ||
            0 == aAttrName.Compare( KMenuAttrTitleName ) ) )
         {
         User::Leave( KErrAccessDenied );
@@ -329,18 +330,18 @@
 // CMenuEngObject::SetNative
 // ---------------------------------------------------------
 //
-EXPORT_C void CMenuEngObject::SetNative( TBool aNative )
+EXPORT_C void CMenuEngObject::SetAppType( TAppType aAppType )
     {
-    iNative = aNative;
+    iAppType = aAppType;
     }
 
 // ---------------------------------------------------------
 // CMenuEngObject::GetNative
 // ---------------------------------------------------------
 //
-EXPORT_C TBool CMenuEngObject::GetNative() const
+EXPORT_C CMenuEngObject::TAppType CMenuEngObject::GetAppType() const
     {
-    return iNative;
+    return iAppType;
     }
 
 // ---------------------------------------------------------
@@ -395,4 +396,4 @@
     return iType;
     }
 
-//  End of File  
+//  End of File
--- a/menucontentsrv/group/mcsmenu.mmp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/group/mcsmenu.mmp	Tue May 25 13:01:39 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  
-*  Version     : %version: sa1spcx1#11.1.7.1.6 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: sa1spcx1#11.1.7.1.7 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -56,6 +56,7 @@
 SOURCE          menusrvstream.cpp
 SOURCE          menusrveng.cpp
 SOURCE          menusrvengutils.cpp
+SOURCE          menusrvappattributes.cpp
 SOURCE          timeout.cpp
 SOURCE          menusrvappscanner.cpp
 SOURCE          menusrvfoldercrnotifier.cpp
@@ -72,23 +73,24 @@
 SOURCE          mcsdrmobserver.cpp
 SOURCE          mcsdrmscanner.cpp
 SOURCE          mcsdrmobservermanager.cpp
-SOURCE			mcschildrenhandler.cpp
-SOURCE			mcschildrenscanner.cpp 
+SOURCE          mcschildrenhandler.cpp
+SOURCE          mcschildrenscanner.cpp 
+SOURCE          menusrvtypefilters.cpp 
 
-SOURCE			mcsmmcobserver.cpp
+SOURCE          mcsmmcobserver.cpp
 SOURCE          mcsfreespaceobserver.cpp
-SOURCE			mcsinstallnotifier.cpp
-SOURCE			mcssuiteobjectattr.cpp 
-SOURCE			mcssuiteobject.cpp 
-SOURCE			mcssuiteobjectfactory.cpp 
-SOURCE			mcssuiteparser.cpp
-SOURCE			menusvrsuite.cpp 
-SOURCE			mcssuitehandler.cpp
+SOURCE          mcsinstallnotifier.cpp
+SOURCE          mcssuiteobjectattr.cpp 
+SOURCE          mcssuiteobject.cpp 
+SOURCE          mcssuiteobjectfactory.cpp 
+SOURCE          mcssuiteparser.cpp
+SOURCE          menusvrsuite.cpp 
+SOURCE          mcssuitehandler.cpp
 
 SOURCE          mcsgetlistcreatorinterface.cpp
 SOURCE          mcsgetlisthandler.cpp
-SOURCE			mcsgetlistflatcreator.cpp
-SOURCE			mcsgetlisttreecreator.cpp
+SOURCE          mcsgetlistflatcreator.cpp
+SOURCE          mcsgetlisttreecreator.cpp
 
 
 USERINCLUDE     ../inc
@@ -128,3 +130,4 @@
 LIBRARY         liwServiceHandler.lib
 LIBRARY         xcfw.lib
 
+
--- a/menucontentsrv/srvinc/mcsrunningappshandler.h	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvinc/mcsrunningappshandler.h	Tue May 25 13:01:39 2010 +0300
@@ -11,8 +11,8 @@
 *
 * Contributors:
 *
-* Description:  This class maintains a list of the running apps, and listen 
-*  for changes in the running apps. It calls the observer if there is such a 
+* Description:  This class maintains a list of the running apps, and listen
+*  for changes in the running apps. It calls the observer if there is such a
 *  change.
 *
 *
@@ -37,6 +37,103 @@
 class CMcsRunningAppsHiddenAttrScanner;
 class CMcsRunningAppsAddRemoveHandler;
 
+
+/*
+*
+*/
+class TRunningAppsAttr
+    {
+public:
+    /*
+    *
+    */
+    TRunningAppsAttr ( TUid aUid, TBool aFswHidden = EFalse,
+        TBool aHidden = EFalse, TBool aIsRunning = EFalse )
+        {
+        iUid = aUid;
+        iHidden = aHidden;
+        iFswHidden = aFswHidden;
+        iIsRunning = aIsRunning;
+        }
+
+    /*
+    *
+    */
+    TUid GetUid() const
+        {
+        return iUid;
+        }
+
+    /*
+    *
+    */
+    TBool IsHidden() const
+        {
+        return iHidden;
+        }
+
+    /*
+    *
+    */
+    void SetHidden( TBool aHidden )
+        {
+        iHidden = aHidden;
+        }
+
+    /*
+    *
+    */
+    TBool IsFswHidden() const
+        {
+        return iFswHidden;
+        }
+
+    /*
+    *
+    */
+    void SetFswHidden( TBool aFswHidden )
+        {
+        iFswHidden = aFswHidden;
+        }
+
+
+    /*
+    *
+    */
+    TBool IsRunning() const
+        {
+        return iIsRunning;
+        }
+
+    /*
+    *
+    */
+    void SetRunning( TBool aIsRunning )
+        {
+        iIsRunning = aIsRunning;
+        }
+
+    /*
+    *
+    */
+    static TBool MatchByUid( const TRunningAppsAttr& aArg1,
+            const TRunningAppsAttr& aArg2)
+        {
+        return aArg1.GetUid() == aArg2.GetUid();
+        }
+
+private:    // data
+
+    TUid iUid;
+    TBool iHidden;
+    TBool iFswHidden;
+    TBool iIsRunning;
+
+    };
+
+
+
+
 /**
  * Interface for updating RunningApps list stored in CMcsRunningAppsHandler class
  *
@@ -52,21 +149,21 @@
     	EHiddenApps
     	};
     /*
-	 * Called by HiddenAttr scanner, FSW monitor or WindowsGroup 
+	 * Called by HiddenAttr scanner, FSW monitor or WindowsGroup
 	 * Monitor.
      * @param aArray an array containing UIDs of running, hidden or
-     * 	fsw apps  
-     * @param aType type of data stored in aArray   
+     * 	fsw apps
+     * @param aType type of data stored in aArray
 	 */
-    virtual void HandleListUpdateL(const RArray<TUid>& aArray, 
+    virtual void HandleListUpdateL(const RArray<TUid>& aArray,
     		TArrayDataType aType ) = 0;
-    
+
 	/*
 	 * Called by AddRemoveHandler
 	 * @param aFolder id of folder for which the method was invoked
 	 */
     virtual void HandleAddRemoveRunningAppL( TInt aFolder ) = 0;
-    
+
     };
 
 /*
@@ -81,7 +178,7 @@
 	/**
 	*   Factory method.
 	*/
-    static CMcsRunningAppsHandler* NewL( 
+    static CMcsRunningAppsHandler* NewL(
 		CMenuEng& aEng,
     	CMcsCacheHandler& aCacheHandler );
 
@@ -89,7 +186,7 @@
     *   Destructor.
     */
     ~CMcsRunningAppsHandler();
-    
+
     /**
      * Called by EngineEvents method
      * @param aFolder folder id
@@ -103,7 +200,7 @@
      * @param aEvents events
      */
     void EngineEvents( TInt aFolder, TInt aEvents );
-    
+
     /**
      * Fills aArray with UIDs of running apps
      * @param aArray array to be filled with UIDs of running apps
@@ -114,18 +211,18 @@
      * Returns running status of an item
      * @param aItemId id of the item
      * @return running status of an item
-     */    
+     */
     TBool GetRunningStatusL( TInt aItemId );
 
-    
+
 // from MMcsRunningAppsHandler
-    
+
     /*
-	 * Called by HiddenAttr scanner, FSW monitor or WindowsGroup 
+	 * Called by HiddenAttr scanner, FSW monitor or WindowsGroup
 	 * Monitor.
      * @param aArray an array containing UIDs of running, hidden or
-     * 	fsw apps  
-     * @param aType type of data stored in aArray   
+     * 	fsw apps
+     * @param aType type of data stored in aArray
 	 */
     void HandleListUpdateL(const RArray<TUid>& aArray, TArrayDataType aType );
 
@@ -133,14 +230,14 @@
 	 * Called by AddRemoveHandler
 	 * @param id of folder for which the method was invoked
 	 */
-	void HandleAddRemoveRunningAppL( TInt aFolder );    
+	void HandleAddRemoveRunningAppL( TInt aFolder );
 
 private:
 	/**
 	*   Constructor.
 	*/
-	CMcsRunningAppsHandler( 
-		CMenuEng& aEng, 
+	CMcsRunningAppsHandler(
+		CMenuEng& aEng,
 	    CMcsCacheHandler& aCacheHandler );
 
 	/**
@@ -165,7 +262,7 @@
     * @param aArray array with UIDs of hidden apps
     */
 	void HandleHiddenAppsChangedL(const RArray<TUid>& aArray );
-	
+
 	/**
 	 * Sends AttributeChange notification for item and parents of the item
 	 * it it is necessary, it is also responsible for removing data from cache
@@ -181,7 +278,7 @@
 	 * @param aAppUid uid of items with changed running status attribute
 	 */
 	void HandleNotificationL( TUid aAppUid );
-	
+
 	/**
 	 * Gets list of items with secified uid
 	 * @param aAppUid items uid
@@ -196,13 +293,13 @@
 	 */
 	void UpdateFolderRunningStatusL( TInt aFolderId, TBool aNewRunningStatus );
 
-	
+
 	/**
 	 * Updates array containing folders with running status.
 	 * It is called at startup and it scans all folders
 	 */
 	void UpdateFoldersRunningStatusL( );
-	
+
 	/**
 	 * Gets running status for CMenuEngObject
 	 * @param aEngObj object to be checked
@@ -213,19 +310,19 @@
 	/**
 	 * Gets previous Folder running status
 	 * @param aId id of the folder
-	 * @return previous running status of a folder (stored in 
+	 * @return previous running status of a folder (stored in
 	 * 	iRunningFolderStatus array )
 	 */
 	TBool GetFolderPreviousRunningStatusL( TInt aId );
 
-	
+
 	/**
 	 * Gets current folder running status
 	 * @param aId id of the folder
 	 * @return running status of a folder
 	 */
 	TBool GetFolderRunningStatusL( TInt aId );
-	
+
 	/**
 	 * Gets current application running status
 	 * @param aUid UID of an application
@@ -233,14 +330,14 @@
 	 */
 	TBool GetAppRunningStatusL( TUid aUid );
 
-private:    
+private:
 
     CMenuEng& iEng ; ///< Engine. not own
 
     /** not own
     */
     CMcsCacheHandler& iCacheHandler;
-    
+
     /*
     * own
     */
@@ -250,26 +347,26 @@
     * own
     */
     CMcsRunningAppsFswMonitor* iFswMonitor;
-    
+
     /*
      * own
      */
-    CMcsRunningAppsHiddenAttrScanner* iHiddenAttrScanner;    
-    
+    CMcsRunningAppsHiddenAttrScanner* iHiddenAttrScanner;
+
     /*
-     * own 
+     * own
      */
     CMcsRunningAppsAddRemoveHandler* iAddRemoveHandler;
-    
+
     /*
     * own
     */
     RArray<TRunningAppsAttr> iRunningApps;
-    
+
     /*
     * own
     */
     RArray<TInt> iRunningFolderStatus;
     };
-	
+
 #endif // __MCSRUNNINGAPPSHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/srvinc/menusrvappattributes.h	Tue May 25 13:01:39 2010 +0300
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The API supports item information that is not supported by
+*                the MCS server itself
+*
+*/
+
+#ifndef CMENUSRVAPPATTRIBUTES_H_
+#define CMENUSRVAPPATTRIBUTES_H_
+
+#include <e32base.h>
+#include "menuengobject.h"
+
+
+NONSHARABLE_CLASS( CMenuSrvAppAttributes ) : public CBase
+    {
+
+public:
+
+    /**
+    * Two-phased constructor.
+    * @param aCapability application capability buffer.
+    * @param aAppInfo apparc application info.
+    */
+    static CMenuSrvAppAttributes* NewL( TApaAppCapabilityBuf& aCapability,
+            TApaAppInfo& aAppInfo );
+
+    /**
+    * Two-phased constructor.
+    * @param aCapability application capability buffer.
+    * @param aAppInfo apparc application info.
+    */
+    static CMenuSrvAppAttributes* NewLC( TApaAppCapabilityBuf& aCapability,
+            TApaAppInfo& aAppInfo );
+
+    /**
+    * Destructor.
+    */
+    ~CMenuSrvAppAttributes();
+
+    /**
+    * Gets application uid.
+    * @return application uid.
+    */
+    TUid GetUid() const;
+
+    /**
+    * Gets hidden attribute of application.
+    * @return ETrue if application is hidden.
+    */
+    TBool IsHidden() const;
+
+    /**
+    * Sets hidden attribute of application.
+    * @param application hidden attribute.
+    */
+    void SetHidden( TBool aAppIsHidden );
+
+    /**
+    * Sets application type.
+    * @param application type.
+    */
+    void SetAppType( CMenuEngObject::TAppType aAppType );
+
+    /**
+    * Gets application type.
+    * @return application type.
+    */
+    CMenuEngObject::TAppType GetAppType() const;
+
+    /**
+    * Gets application group name.
+    * @return application group name.
+    */
+    const TPtrC GetGroupName() const;
+
+    /**
+    * Gets application full name.
+    * @return application full name.
+    */
+    const TPtrC GetFullName() const;
+
+    /**
+    * Gets application caption.
+    * @return application caption.
+    */
+    const TPtrC GetCaption() const;
+
+    /**
+    * Gets application short caption.
+    * @return application short caption.
+    */
+    const TPtrC GetShortCaption() const;
+
+    /**
+    * Match items function used for finding in array.
+    * @return ETrue if items match.
+    */
+    static TBool MatchItems(const CMenuSrvAppAttributes& aItem1,
+            const CMenuSrvAppAttributes& aItem2);
+
+private:
+
+    /**
+    * Second phased constructor.
+    * @param aCapability application capability buffer.
+    * @param aAppInfo apparc application info.
+    */
+    void ConstructL( TApaAppCapabilityBuf& aCapability,
+            TApaAppInfo& aAppInfo );
+
+    /**
+    * Constructor.
+    */
+    CMenuSrvAppAttributes();
+
+private:    // data
+
+    RBuf iGroupName; // Series 60 extension to allow apps
+    //to be categorized according a logical group name, e.g. 'games'
+
+    /** The full path name of the application DLL. */
+    RBuf iFullName;
+
+    /** The caption for the application. */
+    RBuf iCaption;
+
+    /** The short caption for the application. */
+    RBuf iShortCaption;
+
+    /** The application specific UID. */
+    TUid iUid;
+
+    /** The application type see TAppType. */
+    CMenuEngObject::TAppType iAppType;
+
+    TBool iAppIsHidden; // not shown in the Shell etc.
+    };
+
+#endif /* CMENUSRVAPPATTRIBUTES_H_ */
--- a/menucontentsrv/srvinc/menusrvappscanner.h	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvinc/menusrvappscanner.h	Tue May 25 13:01:39 2010 +0300
@@ -33,11 +33,11 @@
 // FORWARD DECLARATION
 
 class CMenuEng;
-class TAppAtributes;
+class CMenuSrvAppAttributes;
 class CMenuSrvMmcHistory;
 class CRepository;
 class CCenRepNotifyHandler;
-class RWidgetRegistryClientSession;
+class CMenuSrvEngUtils;
 
 /**
 * Application scanner.
@@ -78,8 +78,9 @@
     * Two-phased constructor.
     * @param aEng Engine.
     */
-    static CMenuSrvAppScanner* NewL( CMenuEng& aEng );
-
+    static CMenuSrvAppScanner* NewL(
+            CMenuEng& aEng,
+            CMenuSrvEngUtils& aSrvEngUtils );
 
 private:    // Constructors and destructor
 
@@ -87,7 +88,7 @@
     * Constructor.
     * @param aEng Engine.
     */
-    CMenuSrvAppScanner( CMenuEng& aEng );
+    CMenuSrvAppScanner( CMenuEng& aEng, CMenuSrvEngUtils& aSrvEngUtils );
 
     /**
     * Second phased constructor.
@@ -166,7 +167,8 @@
 
     /**
     */
-    void HandleLockDeleteFlagUpdateL( const TMenuItem& aItem,TInt aUid );
+    void HandleLockDeleteFlagUpdateL(
+            const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem );
 
     /**
     * Updates application's missing attribute.
@@ -182,17 +184,16 @@
     * @param aApaItemHidden Application's hidden status from ApaLsSession.
     */
     void HandleHiddenFlagUpdateL(
-    		const TMenuItem & aItem,
-    		TInt & aAppUid,
-    		TBool aApaItemHidden );
+            const TMenuItem & aItem,
+            const CMenuSrvAppAttributes& aApaItem );
     /**
     * Updates native attribute.
     * @param aItem menu item.
     * @param aUid Application's uid.
     */
     void HandleNativeAttrUpdateL(
-    		const TMenuItem& aItem,
-    		TInt aUid );
+            const TMenuItem& aItem,
+            const CMenuSrvAppAttributes& aApaItem );
 
     /**
     * Updates mmc attribute.
@@ -201,32 +202,24 @@
     * @param aMmcId MMC ID of currently inserted MMC, or 0.
     */
     void HandleMmcAttrUpdateL(
-    		const TMenuItem& aItem,
-    		TInt aUid,
-    		TUint aMmcId );
-
+            const TMenuItem& aItem,
+            const CMenuSrvAppAttributes& aApaItem,
+            TUint aMmcId );
 
     /**
     */
-    TBool IsInRomL( TInt aUid );
-
-    /**
-    */
-    void GetCrItemsL( RArray<TAppAtributes>& aArray );
+    void GetCrItemsL( RPointerArray<CMenuSrvAppAttributes>& aArray );
 
 
     /**
     */
     void ParseUidsL( const TDesC& aHiddenApplications,
-                                        RArray<TAppAtributes>& aArray );
-    /**
-    */
-    void GetApaItemsL( RArray<TAppAtributes>& aArray );
+                                        RPointerArray<CMenuSrvAppAttributes>& aArray );
 
     /**
     */
     void SetHidden( const TDesC& aHiddenAppUid,
-                                RArray<TAppAtributes>& aArray );
+                                RPointerArray<CMenuSrvAppAttributes>& aArray );
 
     /**
     */
@@ -245,16 +238,10 @@
     * @param aCurrentMmcId MMC ID of currently inserted MMC, or 0.
     */
     void AddAppItemL(
-        TUint aUid,
-        TUint aCurrentMmcId );
-
-    TInt CreateInstallFolderL( TUint aUid );
+            const CMenuSrvAppAttributes& aApaItem,
+            TUint aCurrentMmcId );
 
-    /**
-    * @param aAppUid application UID
-    * @return TBool
-    */
-    TBool IsMidlet( const TUid aAppUid );
+    TInt CreateInstallFolderL( const CMenuSrvAppAttributes& aApaItem );
 
 
     /**
@@ -295,10 +282,10 @@
     * @param aEvent menu item's event for engine.
     */
     void SetObjectFlagsL(
-    		TBool aFlagValue,
-    		const TMenuItem& aItem,
-    		const TMenuItem::TFlags& aFlag,
-    		const RMenuNotifier::TEvent& aEvent = RMenuNotifier::EItemAttributeChanged );
+            TBool aFlagValue,
+            const TMenuItem& aItem,
+            const TMenuItem::TFlags& aFlag,
+            const RMenuNotifier::TEvent& aEvent = RMenuNotifier::EItemAttributeChanged );
 
     /**
     * Check currently inserted MMC card, update and save MMC history.
@@ -318,8 +305,8 @@
     * @return ETrue if aFileName is on given default drive type.
     */
     TBool IsFileInDrive(
-			const TDesC& aFileName,
-			const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
+            const TDesC& aFileName,
+            const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
 
     /**
     * Check if application is installed on given drive type.
@@ -327,23 +314,30 @@
     * @param aDefaultDrive drive type.
     * @return ETrue if app is installed on given drive type.
     */
-	TBool IsAppInDrive(
-			const TUid aUid,
-			const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
+    TBool IsAppInDrive(
+            const CMenuSrvAppAttributes& aApaItem,
+            const DriveInfo::TDefaultDrives& aDefaultDrive ) const;
 
     /**
     * Check if application is installed on MMC.
     * @param aUid app uid.
     * @return ETrue if app is installed on MMC.
     */
-    TBool IsMmcApp( const TUid aUid ) const;
+    TBool IsInMmc( const CMenuSrvAppAttributes& aApaItem ) const;
 
     /**
     * Check if application is installed on mass storage.
     * @param aUid app uid.
     * @return ETrue if app is installed on mass storage.
     */
-    TBool IsMassStorageApp( const TUid aUid ) const;
+    TBool IsInMassStorage( const CMenuSrvAppAttributes& aApaItem ) const;
+
+    /**
+    * Check if application is installed on ROM.
+    * @param aUid app uid.
+    * @return ETrue if app is installed on ROM.
+    */
+    TBool IsInRomL( const CMenuSrvAppAttributes& aApaItem ) const;
 
     /**
     * Check if drive's status is EDriveInUse.
@@ -393,7 +387,7 @@
     */
     void UpdateApplicationItemL(
     		RArray<TMenuItem>& aMcsItems,
-            const TAppAtributes& aApaItem,
+            const CMenuSrvAppAttributes& aApaItem,
             TUint aMmcId,
             TBool isLegacy );
 
@@ -415,12 +409,11 @@
 
 private:    // data
 
-    CMenuEng& iEng ; ///< Engine.
-    RApaLsSession iApaLsSession; ///< AppArc session. Own.
+    CMenuEng& iEng; ///< Engine.
+    CMenuSrvEngUtils& iSrvEngUtils; ///< Server engine utils.
     CApaAppListNotifier* iNotifier; ///< Change notifier. Own.
     CMenuSrvMmcHistory* iMmcHistory; ///< MMC history. Own.
     RFs iFs; ///< File Server Session. Own.
-	RWidgetRegistryClientSession iWidgetSession;///<Own.
 
     /*
     * Sat change notifier. Own
@@ -430,7 +423,7 @@
     /*
     * Central repository session
     */
-	CRepository* iCenRepSession;
+    CRepository* iCenRepSession;
 
     /*
     * Central repository change handler for Hidden Apps
@@ -455,41 +448,4 @@
     TBool iOpStatus;
     };
 
-
-class TAppAtributes
-    {
-
-public:
-    /*
-    *
-    */
-    TAppAtributes ( TUint aUid, TBool aHidden /*,TBool aMissing*/);
-
-    /*
-    *
-    */
-    TUint GetUid() const;
-
-    /*
-    *
-    */
-    TBool IsHidden() const;
-
-    /*
-    *
-    */
-    void SetHidden( TBool aHidden );
-
-    /*
-    *
-    */
-    static TBool MatchItems(const TAppAtributes& item1,
-                                        const TAppAtributes& item2);
-
-private:    // data
-
-    TUint iUid;
-    TBool iHidden;
-    };
-
 #endif // __MENUSRVAPPSCANNER_H__
--- a/menucontentsrv/srvinc/menusrvengutils.h	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvinc/menusrvengutils.h	Tue May 25 13:01:39 2010 +0300
@@ -11,22 +11,23 @@
 *
 * Contributors:
 *
-* Description:  The API supports item information that is not supported by 
+* Description:  The API supports item information that is not supported by
 *                the MCS server itself
 *
 */
 
-
 #ifndef __MENUSRVENGUTILS_H__
 #define __MENUSRVENGUTILS_H__
 
 #include <e32base.h>
-#include <w32std.h> 
 #include <apgcli.h>
+#include <w32std.h>
 #include <widgetregistryclient.h>
 #include "menuengobject.h"
 #include "menueng.h"
-#include "menuengfilter.h"
+#include "menusrvtypefilters.h"
+#include "menusrvappattributes.h"
+
 
 /// Number of characters in UID and in MMC-id strings.
 const TInt KUidChars = 10;
@@ -39,29 +40,9 @@
     {
 public:
 
-    virtual ~CMenuSrvEngUtils();
-    static CMenuSrvEngUtils* NewL( CMenuEng& aEng );
-    
-    static TInt GetAppUid( const CMenuEngObject& aEngObj, TUid& aAppUid );
-
-// Caption support
-
-    TInt GetAppInfo( const CMenuEngObject& aEngObj, TApaAppInfo& aAppInfo ) const;
-    TInt GetAppInfoL( TInt aItemId, TApaAppInfo& aAppInfo ) const;
-
-// Icon support
-
-    TInt GetFolderIcon( const CMenuEngObject& aEngObj, 
-                     HBufC*& aFullFileName,
-                     TInt& aBitmapId,
-                     TInt& aMaskId ) const;
-    TInt GetFolderIconL( TInt aItemId,  
-                     HBufC*& aFullFileName,
-                     TInt& aBitmapId,
-                     TInt& aMaskId ) const;
-
-// DRM protection info
-
+    /**
+    * Enum indicating application DRM protection.
+    */
     enum TDRMProtectionInfo
         {
         EDRMUnknownProtection,
@@ -70,75 +51,157 @@
         EDRMRightsExpired
         };
 
-    TInt GetDrmProtectionL( const CMenuEngObject& aEngObj,
-                           TDRMProtectionInfo& aProtectionInfo ) const;
+    /**
+    * Two-phased constructor.
+    * @param aEng menu engine.
+    */
+    static CMenuSrvEngUtils* NewL( CMenuEng& aEng );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CMenuSrvEngUtils();
+
+    /**
+    * Gets app uid based on engine object.
+    * @param aEngObj engine object.
+    * @param aAppUid app uid.
+    * @return error code.
+    */
+    static TInt GetAppUid( const CMenuEngObject& aEngObj, TUid& aAppUid );
+
+    /**
+    * Gets app info based on engine object.
+    * @param aEngObj engine object.
+    * @param aAppInfo app uid.
+    * @return error code.
+    */
+    TInt GetAppInfoL( const CMenuEngObject& aEngObj, TApaAppInfo& aAppInfo ) const;
+
+    /**
+    * Gets app DRM protection for given item id.
+    * @param aItemId item id.
+    * @param aProtectionInfo app DRM protection info.
+    * @return error code.
+    */
     TInt GetDrmProtectionL( TInt aItemId,
                            TDRMProtectionInfo& aProtectionInfo ) const;
-                           
-    TInt GetDrmProtectionL( 
-        const TUid aAppUid, 
-        TDRMProtectionInfo& aProtectionInfo ) const;
+
+    /**
+    * Gets Java app content id.
+    * @param aUid app uid.
+    * @param aContentId content id.
+    * @return error code.
+    */
+    void GetJavaContentIdL( TUid aUid, TDes& aContentId )  const;
+
+    /**
+    * Reloads app items.
+    */
+    void ReloadApaItemsL();
 
-  //  TBool GetAppRunningL( TInt aItemId ) ;
-    
-  //  TBool GetAppRunningL( const CMenuEngObject& aEngObj ) ;
-    void SetValueSkinId( TDes& aAttrName, TInt aValue );
-  
-        
-    TInt GetApaAppInfo( 
-        const CMenuEngObject& aEngObj, 
-        TApaAppInfo& aInfo ) const;
-    TInt GetApaAppInfo( TUid aUid, TApaAppInfo& aInfo ) const;
-    
-    static void GetJavaContentIdL( TUid aUid, TDes& aContentId );
-    
+    /**
+    * Checks if application is midlet.
+    * @param aAppUid app uid.
+    * @return ETrue if app is a midlet.
+    */
+    TBool IsMiddlet( const TUid aAppUid )  const;
+
     /**
-    * Fetches aEngObj native attribute value. 
-    * @param aEngObj engine object.
-    * @param aAttrExists ETrue if attribute exist.
-    * @param aAttrVal attribute value.
+    * Checks wether application is native
+    * @param aAppUid applications uid
+    * @param aIsNative ETrue if apppication is native
+    * @return KErrNone if successful, otherwise one of the other system-wide error codes
     */
-    void IsNative( const CMenuEngObject& aEngObj, 
-        TBool& aAttrExists, TDes& aAttrVal );
+    TInt IsNativeL( TUid aAppUid, TBool& aIsNative );
+
     /**
-     * 
+    * Gets app items list.
+    * @return app items list.
     */
-    static TBool IsMiddlet( const TApaAppInfo& aInfo );
+    RPointerArray<CMenuSrvAppAttributes>& GetAppItemsL();
 
 private:
 
-  //  void GetChildrenRunningAppL( TInt id, TBool& aRunningApp ) ;
-    
-  //  void CheckAppRunningL( TUid aUid, TBool& aRunningApp ) ;
-    
+    /**
+    * Get app info from array
+    * @param aAppInfo with application uid to  fetch rest information
+    * @return KErrNone if successful,
+    *   otherwise one of the other system-wide error codes
+    */
+    TInt GetAppInfoFromArrayL( TApaAppInfo& aAppInfo ) const;
+
+    /**
+    * Get app type from array
+    * @param aAppUid with application uid to  fetch rest information
+    * @param aType app type
+    * @return KErrNone if successful,
+    *   otherwise one of the other system-wide error codes
+    */
+    TInt GetAppTypeFromArrayL( const TUid& aAppUid,
+            CMenuEngObject::TAppType& aType  ) const;
+
+    /**
+    * Gets app DRM protection for given app uid.
+    * @param aAppUid app uid.
+    * @param aProtectionInfo app DRM protection info.
+    * @return error code.
+    */
+    TInt GetDrmProtectionL(
+        const TUid aAppUid,
+        TDRMProtectionInfo& aProtectionInfo ) const;
+
+    /**
+    * Gets app DRM protection based on engine object.
+    * @param aEngObj engine object.
+    * @param aProtectionInfo app DRM protection info.
+    * @return error code.
+    */
+    TInt GetDrmProtectionL( const CMenuEngObject& aEngObj,
+                           TDRMProtectionInfo& aProtectionInfo ) const;
+
+    /**
+    * Gets SAT app info.
+    * @param aAppInfo app info.
+    * @return error code.
+    */
     TInt GetSatAppInfo( TApaAppInfo& aAppInfo ) const;
-    
+
+    /**
+    * Constructor.
+    * @param aEng menu engine.
+    */
     CMenuSrvEngUtils( CMenuEng& aEng );
+
+    /**
+    * Second phased constructor.
+    */
     void ConstructL();
-    
+
     /**
-     */
+    * Drm protection info.
+    * @param aConstenId content id.
+    * @param aProtectionInfo DRM protection info.
+    * @return error code.
+    */
     TInt GetDrmProtectionByContentIdL(
 			const TDesC& aConstenId,
 			TDRMProtectionInfo& aProtectionInfo )const;
-    
-	/**
-	* Checks wether application is native
-	* @since S60 v5.0.
-	* @param aAppUid applications uid 
-	* @param aIsNative ETrue if apppication is native
-	* @return KErrNone if successful, otherwise one of the other system-wide error codes 
-	*/
-    TInt IsNative( TUid aAppUid, TBool& aIsNative );
-    
+
 private: // Data
 
-    CMcsSatHandler* iSatHandler;
-    
+    CMcsSatHandler* iSatHandler; ///< Sat handler. Own.
+
     CMenuEng& iEng; ///< Engine. Not own.
-    RApaLsSession iApaLsSession;
-    RWidgetRegistryClientSession iWidgetSession;
-    RWsSession iWsSession;
+
+    RApaLsSession iApaLsSession; ///< ApaLs session. Own.
+
+    RWidgetRegistryClientSession iWidgetSession; ///< Widget session. Own.
+
+    RWsSession iWsSession; ///< Ws session. Own.
+
+    RPointerArray<CMenuSrvAppAttributes> iAppAttributes; ///< App array. Own.
+
     };
 
 /**********************************************
@@ -150,279 +213,17 @@
 public:
 
     /**
-    */
-    static void UidToStringL( TUint aUid, TDes& aResult,
-     TBool aLegacy, TRadix aRadix );
-    };
-
-/**
-* Type filter: match objects by type.
-*/
-class TMenuSrvTypeFilter: public MMenuEngFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-public:     // new methods
-
-    /**
-    * Set type filter.
-    * @param aType Type.
-    */
-    void SetType( const TDesC& aType )
-        { iType.Set( aType ); }
-
-private:    // data
-
-    TPtrC iType; ///< Type filter.
-
-    };
-
-/**
-* Type + attribute filter: match objects by type
-* and attribute with a specific value.
-*/
-class TMenuSrvTypeAttrFilter: public TMenuSrvTypeFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-public:     // new methods
-
-    /**
-    * Set attribute filter.
-    * @param aName Attribute name.
-    * @param aValue Attribute value.
+    * Converts given uid to string.
+    * @param aUid app uid.
+    * @param aResult descriptor with result.
+    * @param aLegacy legacy format.
+    * @param aRadix radix.
+    * @return error code.
     */
-    void SetAttr( const TDesC& aName, const TDesC& aValue )
-        { iAttrName.Set( aName ); iAttrValue.Set( aValue ); }
-
-private:    // data
-
-    TPtrC iAttrName; ///< Attr name.
-    TPtrC iAttrValue; ///< Attr value.
-
-    };
-
-/**
-* Type + attribute filter: match objects by type
-* and attribute with a specific value.
-*/
-class TMenuSrvAttrFilter: public MMenuEngFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-public:     // new methods
-
-    /**
-    * Set attribute filter.
-    * @param aName Attribute name.
-    * @param aValue Attribute value.
-    */
-    void SetAttr( const TDesC& aName, const TDesC& aValue )
-        { iAttrName.Set( aName ); iAttrValue.Set( aValue ); }
-
-private:    // data
-
-    TPtrC iAttrName; ///< Attr name.
-    TPtrC iAttrValue; ///< Attr value.
-
-    };
-
-/**
-* Type + attribute filter: match objects by type
-* and attribute with a specific value.
-*/
-class TMenuSrvTypeAttrExistsFilter: public TMenuSrvTypeFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-public:     // new methods
-
-    /**
-    * Set attribute filter.
-    * @param aName Attribute name.
-    */
-    void SetAttr( const TDesC& aName )
-        { iAttrName.Set( aName ); }
-
-private:    // data
-
-    TPtrC iAttrName; ///< Attr name.
-
+    static void UidToStringL( TUint aUid,
+            TDes& aResult,
+            TBool aLegacy,
+            TRadix aRadix );
     };
 
-/**
-* Type + attribute filter: match objects by type
-* and attribute with a specific value.
-*/
-class TMenuSrvAttrExistsFilter: public TMenuSrvTypeFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-public:     // new methods
-
-    /**
-    * Set attribute filter.
-    * @param aName Attribute name.
-    */
-    void SetAttr( const TDesC& aName )
-        { iAttrName.Set( aName ); }
-
-private:    // data
-
-    TPtrC iAttrName; ///< Attr name.
-
-    };
-
-/**
-* Hidden attr filter for application items
-*/
-class TMenuSrvHiddenAppFilter: public MMenuEngFilter
-    {
-
-public:     // from MMenuEngFilter
-
-    /**
-    * Filter test function.
-    * @param aObject Object.
-    * @return ETrue if aObject matches this filter.
-    */
-    TBool MatchesObject( const CMenuEngObject& aObject ) const;
-
-    };
-
-
-/*
-*
-*/
-class TRunningAppsAttr
-    {
-public:     
-    /*
-    *
-    */
-    TRunningAppsAttr ( TUid aUid, TBool aFswHidden = EFalse, 
-        TBool aHidden = EFalse, TBool aIsRunning = EFalse )
-		{
-		iUid = aUid;
-		iHidden = aHidden;
-		iFswHidden = aFswHidden;
-		iIsRunning = aIsRunning;
-		}
-    
-    /*
-    *
-    */
-    TUid GetUid() const
-		{
-		return iUid;
-		}	
-    
-    /*
-    *
-    */
-    TBool IsHidden() const
-		{
-		return iHidden;
-		}
-    
-    /*
-    *
-    */
-    void SetHidden( TBool aHidden ) 
-		{
-		iHidden = aHidden;
-		}
-
-    /*
-    *
-    */
-    TBool IsFswHidden() const
-		{
-		return iFswHidden;
-		}
-    
-    /*
-    *
-    */
-    void SetFswHidden( TBool aFswHidden )
-		{
-		iFswHidden = aFswHidden;
-		}
-
-
-    /*
-    *
-    */
-    TBool IsRunning() const
-		{
-		return iIsRunning;
-		}
-    
-    /*
-    *
-    */
-    void SetRunning( TBool aIsRunning )
-		{
-		iIsRunning = aIsRunning;
-		}
-
-    /*
-    *
-    */
-    static TBool MatchByUid( const TRunningAppsAttr& aArg1,  
-    		const TRunningAppsAttr& aArg2)
-    	{
-    	return aArg1.GetUid() == aArg2.GetUid();
-    	}    
-    
-private:    // data
-
-    TUid iUid;
-	TBool iHidden;
-	TBool iFswHidden;
-	TBool iIsRunning;
-	
-    };
-
-
 #endif // __MENUSRVENGUTILS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/srvinc/menusrvtypefilters.h	Tue May 25 13:01:39 2010 +0300
@@ -0,0 +1,199 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The API supports item information that is not supported by
+*                the MCS server itself
+*
+*/
+#ifndef MENUSRVTYPEFILTERS_H_
+#define MENUSRVTYPEFILTERS_H_
+
+
+#include "menuengfilter.h"
+#include "menuengobject.h"
+
+/**
+* Type filter: match objects by type.
+*/
+class TMenuSrvTypeFilter: public MMenuEngFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+public:     // new methods
+
+    /**
+    * Set type filter.
+    * @param aType Type.
+    */
+    void SetType( const TDesC& aType )
+        { iType.Set( aType ); }
+
+private:    // data
+
+    TPtrC iType; ///< Type filter.
+
+    };
+
+/**
+* Type + attribute filter: match objects by type
+* and attribute with a specific value.
+*/
+class TMenuSrvTypeAttrFilter: public TMenuSrvTypeFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+public:     // new methods
+
+    /**
+    * Set attribute filter.
+    * @param aName Attribute name.
+    * @param aValue Attribute value.
+    */
+    void SetAttr( const TDesC& aName, const TDesC& aValue )
+        { iAttrName.Set( aName ); iAttrValue.Set( aValue ); }
+
+private:    // data
+
+    TPtrC iAttrName; ///< Attr name.
+    TPtrC iAttrValue; ///< Attr value.
+
+    };
+
+/**
+* Type + attribute filter: match objects by type
+* and attribute with a specific value.
+*/
+class TMenuSrvAttrFilter: public MMenuEngFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+public:     // new methods
+
+    /**
+    * Set attribute filter.
+    * @param aName Attribute name.
+    * @param aValue Attribute value.
+    */
+    void SetAttr( const TDesC& aName, const TDesC& aValue )
+        { iAttrName.Set( aName ); iAttrValue.Set( aValue ); }
+
+private:    // data
+
+    TPtrC iAttrName; ///< Attr name.
+    TPtrC iAttrValue; ///< Attr value.
+    };
+
+/**
+* Type + attribute filter: match objects by type
+* and attribute with a specific value.
+*/
+class TMenuSrvTypeAttrExistsFilter: public TMenuSrvTypeFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+public:     // new methods
+
+    /**
+    * Set attribute filter.
+    * @param aName Attribute name.
+    */
+    void SetAttr( const TDesC& aName )
+        { iAttrName.Set( aName ); }
+
+private:    // data
+
+    TPtrC iAttrName; ///< Attr name.
+
+    };
+
+/**
+* Type + attribute filter: match objects by type
+* and attribute with a specific value.
+*/
+class TMenuSrvAttrExistsFilter: public TMenuSrvTypeFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+public:     // new methods
+
+    /**
+    * Set attribute filter.
+    * @param aName Attribute name.
+    */
+    void SetAttr( const TDesC& aName )
+        { iAttrName.Set( aName ); }
+
+private:    // data
+
+    TPtrC iAttrName; ///< Attr name.
+
+    };
+
+/**
+* Hidden attr filter for application items
+*/
+class TMenuSrvHiddenAppFilter: public MMenuEngFilter
+    {
+
+public:     // from MMenuEngFilter
+
+    /**
+    * Filter test function.
+    * @param aObject Object.
+    * @return ETrue if aObject matches this filter.
+    */
+    TBool MatchesObject( const CMenuEngObject& aObject ) const;
+
+    };
+
+#endif /* MENUSRVTYPEFILTERS_H_ */
--- a/menucontentsrv/srvsrc/mcsdrmobservermanager.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvsrc/mcsdrmobservermanager.cpp	Tue May 25 13:01:39 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -70,10 +70,10 @@
 
 // ---------------------------------------------------------------------------
 //
-// ---------------------------------------------------------------------------    
-void RMcsDrmObserverManager::RemoveMissingObservers( 
+// ---------------------------------------------------------------------------
+void RMcsDrmObserverManager::RemoveMissingObservers(
 	const RArray<TUid>& aDrmProtectedArray )
-    {   
+    {
     TInt index = 0;
     while (index < iObservers.Count() )
         {
@@ -85,8 +85,8 @@
         else
             {
             index++;
-            }       
-        }           
+            }
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -109,43 +109,40 @@
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
-void RMcsDrmObserverManager::CreateObserversL( 
-	const RArray<TUid>& aDrmArray, 
-	TDRMEventType aMask,
-    MMcsDrmObserver& aObserver )
-	{
-	for (TInt i = 0; i < aDrmArray.Count(); i++)
-		{
-		if (FindUid(aDrmArray[i]) == KErrNotFound)
-			{
-			TApaAppInfo info;
-			iUtils.GetApaAppInfo(aDrmArray[i], info);
+void RMcsDrmObserverManager::CreateObserversL(
+        const RArray<TUid>& aDrmArray,
+        TDRMEventType aMask,
+        MMcsDrmObserver& aObserver )
+    {
+    for (TInt i = 0; i < aDrmArray.Count(); i++)
+        {
+        if (FindUid(aDrmArray[i]) == KErrNotFound)
+            {
+            CMcsDrmObserver* observer= NULL;
+            if ( iUtils.IsMiddlet( aDrmArray[i] ) )
+                {
+                TBuf<KMaxFileName> contentId;
+                iUtils.GetJavaContentIdL( aDrmArray[i], contentId );
 
-			CMcsDrmObserver* observer= NULL;
-			if (CMenuSrvEngUtils::IsMiddlet(info) )
-				{
-				TBuf<KMaxFileName> contentId;
-				CMenuSrvEngUtils::GetJavaContentIdL(info.iUid, contentId);
-				
-				observer = CMcsDrmObserver::NewL(aObserver, contentId,
-										aDrmArray[i], aMask);
-				
-				TInt err = iObservers.Append(observer);
-				if( err != KErrNone)
-					{
-					delete observer;
-					User::Leave( err );
-					}
-				}
-			}
-		}
-	}
+                observer = CMcsDrmObserver::NewL(aObserver, contentId,
+                                    aDrmArray[i], aMask);
+
+                TInt err = iObservers.Append(observer);
+                if( err != KErrNone)
+                    {
+                    delete observer;
+                    User::Leave( err );
+                    }
+                }
+            }
+        }
+    }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
-void RMcsDrmObserverManager::CreateObserversL( 
-	const RArray<TUid>& aDrmProtectedArray, 
+void RMcsDrmObserverManager::CreateObserversL(
+	const RArray<TUid>& aDrmProtectedArray,
     MMcsDrmObserver& aObserver )
     {
     CreateObserversL(aDrmProtectedArray, KEventModify,
@@ -155,9 +152,9 @@
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
-void RMcsDrmObserverManager::RefreshObserverL( 
-		const RArray<TUid>& aDrmProtectedArray, 
-		TUid aUid, 
+void RMcsDrmObserverManager::RefreshObserverL(
+		const RArray<TUid>& aDrmProtectedArray,
+		TUid aUid,
 		MMcsDrmObserver& aObserver )
     {
     TInt index = FindUid( aUid );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/srvsrc/menusrvappattributes.cpp	Tue May 25 13:01:39 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <apgcli.h>
+#include "menusrvappattributes.h"
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+CMenuSrvAppAttributes* CMenuSrvAppAttributes::NewL(
+        TApaAppCapabilityBuf& aCapability, TApaAppInfo& aAppInfo )
+    {
+    CMenuSrvAppAttributes* self = CMenuSrvAppAttributes::NewLC(
+            aCapability, aAppInfo);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+CMenuSrvAppAttributes* CMenuSrvAppAttributes::NewLC(
+        TApaAppCapabilityBuf& aCapability, TApaAppInfo& aAppInfo )
+    {
+    CMenuSrvAppAttributes* self = new ( ELeave ) CMenuSrvAppAttributes();
+    CleanupStack::PushL( self );
+    self->ConstructL( aCapability, aAppInfo ) ;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+CMenuSrvAppAttributes::~CMenuSrvAppAttributes()
+    {
+    iGroupName.Close();
+    iFullName.Close();
+    iCaption.Close();
+    iShortCaption.Close();
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CMenuSrvAppAttributes::CMenuSrvAppAttributes()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMenuSrvAppAttributes::ConstructL( TApaAppCapabilityBuf& aCapability,
+        TApaAppInfo& aAppInfo )
+    {
+    iGroupName.CreateL( aCapability().iGroupName );
+    iFullName.CreateL( aAppInfo.iFullName );
+    iCaption.CreateL( aAppInfo.iCaption );
+    iShortCaption.CreateL( aAppInfo.iShortCaption );
+    iUid = aAppInfo.iUid;
+    iAppType = CMenuEngObject::ENoTypeApp;
+    iAppIsHidden = aCapability().iAppIsHidden; // not shown in the Shell etc.
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TUid CMenuSrvAppAttributes::GetUid() const
+    {
+    return iUid;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TBool CMenuSrvAppAttributes::IsHidden() const
+    {
+    return iAppIsHidden;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+void CMenuSrvAppAttributes::SetHidden( TBool aAppIsHidden )
+    {
+    iAppIsHidden = aAppIsHidden;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TBool CMenuSrvAppAttributes::MatchItems(const CMenuSrvAppAttributes& aItem1,
+                                        const CMenuSrvAppAttributes& aItem2)
+    {
+    TBool result( EFalse );
+    if ( aItem1.GetUid() == aItem2.GetUid() )
+        {
+        result = ETrue;
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+void CMenuSrvAppAttributes::SetAppType( CMenuEngObject::TAppType aAppType )
+    {
+    iAppType = aAppType;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+CMenuEngObject::TAppType CMenuSrvAppAttributes::GetAppType() const
+    {
+    return iAppType;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+const TPtrC CMenuSrvAppAttributes::GetGroupName() const
+    {
+    return iGroupName;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+const TPtrC CMenuSrvAppAttributes::GetFullName() const
+    {
+    return iFullName;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+const TPtrC CMenuSrvAppAttributes::GetCaption() const
+    {
+    return iCaption;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+const TPtrC CMenuSrvAppAttributes::GetShortCaption() const
+    {
+    return iShortCaption;
+    }
--- a/menucontentsrv/srvsrc/menusrvappscanner.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrvappscanner.cpp	Tue May 25 13:01:39 2010 +0300
@@ -27,12 +27,12 @@
 #include "mcssathandler.h"
 #include "menusrvengutils.h"
 #include "bautils.h"
+#include "menuutil.h"
 
 _LIT( KMenuOne, "1" );
 _LIT( KMenuAttrMmcId, "mmc_id" );
 _LIT( KMenuMassStorage, "mass_storage" );
 _LIT( KMenuMmcHistoryFname, "mmchistory" );
-_LIT( KZDrive, "Z" );
 
 // ==================== LOCAL FUNCTIONS ====================
 
@@ -54,9 +54,11 @@
 // CMenuSrvAppScanner::NewL
 // ---------------------------------------------------------
 //
-CMenuSrvAppScanner* CMenuSrvAppScanner::NewL( CMenuEng& aEng )
+CMenuSrvAppScanner* CMenuSrvAppScanner::NewL(
+        CMenuEng& aEng, CMenuSrvEngUtils& aSrvEngUtils  )
     {
-    CMenuSrvAppScanner* scanner = new (ELeave) CMenuSrvAppScanner( aEng );
+    CMenuSrvAppScanner* scanner = new (ELeave) CMenuSrvAppScanner(
+            aEng, aSrvEngUtils );
     CleanupStack::PushL( scanner );
     scanner->ConstructL();
     CleanupStack::Pop( scanner );
@@ -70,13 +72,11 @@
 CMenuSrvAppScanner::~CMenuSrvAppScanner()
     {
     Cancel();
-    iApaLsSession.Close();
     delete iMcsSatNotifier;
     delete iNotifier;
     iEng.DequeueOperation( *this );
     delete iMmcHistory;
     iFs.Close();
-	iWidgetSession.Close();
 
     if( iCenRepNotifyHandlerHiddenApps )
         {
@@ -104,8 +104,10 @@
 // CMenuSrvAppScanner::CMenuSrvAppScanner
 // ---------------------------------------------------------
 //
-CMenuSrvAppScanner::CMenuSrvAppScanner( CMenuEng& aEng )
-: CActive( CActive::EPriorityStandard ), iEng( aEng )
+CMenuSrvAppScanner::CMenuSrvAppScanner(
+        CMenuEng& aEng, CMenuSrvEngUtils& aSrvEngUtils )
+: CActive( CActive::EPriorityStandard ), iEng( aEng ),
+  iSrvEngUtils( aSrvEngUtils )
     {
     CActiveScheduler::Add( this );
     }
@@ -135,9 +137,6 @@
     // The notifier has its own session to apparc, instead of taking
     // it as argument... :(
     iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityStandard );
-    User::LeaveIfError( iApaLsSession.Connect() );
-    User::LeaveIfError( iApaLsSession.GetAllApps() ); // This is async.
-	User::LeaveIfError( iWidgetSession.Connect() );
 
    	iCenRepSession = CRepository::NewL( KCRUidMenu );
 
@@ -161,9 +160,9 @@
 
 	iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this );
 
-    iApaLsSession.RegisterListPopulationCompleteObserver( iStatus );
-    SetActive();
-    iOpStatus = ETrue;
+    //SetActive();
+	ScheduleScan();
+    //iOpStatus = ETrue;
     }
 
 // ---------------------------------------------------------
@@ -175,7 +174,14 @@
     User::LeaveIfError( iStatus.Int() ); // Handle errors in RunL.
     // AppArc app scan complete, we have the app list.
     // Now queue this operation to be executed by the Engine.
-    iEng.QueueOperationL( *this );
+    if ( !MenuUtil::BackupInProgressL() )
+        {
+        iEng.QueueOperationL( *this );
+        }
+    else
+        {
+        iOpStatus = EFalse;
+        }
     }
 
 // ---------------------------------------------------------
@@ -184,7 +190,6 @@
 //
 void CMenuSrvAppScanner::DoCancel()
     {
-    iApaLsSession.CancelListPopulationCompleteObserver();
     }
 
 // ---------------------------------------------------------
@@ -478,13 +483,13 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::UpdateApplicationItemL(
-		RArray<TMenuItem>& aMcsItems, const TAppAtributes& aApaItem,
+		RArray<TMenuItem>& aMcsItems, const CMenuSrvAppAttributes& aApaItem,
 		TUint aMmcId, TBool isLegacy)
     {
     RArray<TMenuItem> mcsUidItems;
     CleanupClosePushL( mcsUidItems );
-    TInt appuid = aApaItem.GetUid();
-    GetMcsAppItemsL( isLegacy, appuid, mcsUidItems );
+    TUid appuid = aApaItem.GetUid();
+    GetMcsAppItemsL( isLegacy, appuid.iUid, mcsUidItems );
     TBool isApaItemHidden( aApaItem.IsHidden() );
 
     // This app is not in the menu, add it now.
@@ -492,19 +497,19 @@
     // do not display Menu app
     if ( !mcsUidItems.Count()
     		&& !isApaItemHidden
-    		&& appuid !=  KMmUid3.iUid  )
+    		&& appuid !=  KMmUid3  )
         {
-        if( appuid == KSatUid.iUid )
+        if( appuid == KSatUid )
             {
             if( CMcsSatHandler::CheckVisibility() )
              	{
-              	AddAppItemL( appuid, aMmcId );
+              	AddAppItemL( aApaItem, aMmcId );
                	}
             }
         else
           	{
-          	AddAppItemL( appuid, aMmcId );
-            GetMcsAppItemsL( isLegacy, appuid, mcsUidItems );
+          	AddAppItemL( aApaItem, aMmcId );
+            GetMcsAppItemsL( isLegacy, appuid.iUid, mcsUidItems );
            	}
         }//if
 
@@ -518,7 +523,7 @@
        		CMenuEngObject& object =
       		                iEng.ModifiableObjectL( mcsUidItems[j].Id() );
             TBuf<KUidChars> uidString;
-            MenuSrvUtil::UidToStringL( appuid, uidString, EFalse, EHex );
+            MenuSrvUtil::UidToStringL( appuid.iUid, uidString, EFalse, EHex );
        	    object.SetAttributeL( KMenuAttrUid(), uidString, EFalse );
        		}//for
         }//else if
@@ -530,17 +535,17 @@
         //we need to handle first run of appscanner,
         //there might be some incorrect data in content xml file
         //if this will have impact on performance we may run this methods only at start up
-       	HandleMmcAttrUpdateL( item, appuid, aMmcId );
-		HandleNativeAttrUpdateL( item, appuid );
+       	HandleMmcAttrUpdateL( item, aApaItem, aMmcId );
+		HandleNativeAttrUpdateL( item, aApaItem );
 
         // "hidden" flag handling.
-        HandleHiddenFlagUpdateL( item, appuid, isApaItemHidden );
+        HandleHiddenFlagUpdateL( item, aApaItem );
 
         // "missing" flag handling
         HandleMissingFlagUpdateL( item );
 
         //"lock_delete" flag handling
-        HandleLockDeleteFlagUpdateL(item, appuid);
+        HandleLockDeleteFlagUpdateL(item, aApaItem );
         // if item was just added to MCS  it is not present in aMcsItems
         // so we cannot remove it
         TInt index = aMcsItems.Find( item, TIdentityRelation<TMenuItem>( IdMatch ) );
@@ -557,10 +562,10 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::HandleHiddenFlagUpdateL( const TMenuItem & aItem,
-		TInt & aAppUid, TBool aApaItemHidden )
+        const CMenuSrvAppAttributes& aApaItem )
 	{
 	TBool itemHidden = (0 != (aItem.Flags() & TMenuItem::EHidden));
-	if (aAppUid == KSatUid.iUid)
+	if ( aApaItem.GetUid() == KSatUid )
 		{
 		if (itemHidden == CMcsSatHandler::CheckVisibility())
 			{
@@ -568,10 +573,10 @@
 				SetFlags( TMenuItem::EHidden, !CMcsSatHandler::CheckVisibility());
 			}
 		}
-	else if (itemHidden != aApaItemHidden)
+	else if ( itemHidden != aApaItem.IsHidden() )
 		{
 		iEng.ModifiableObjectL(aItem.Id(), RMenuNotifier::EItemsAddedRemoved).
-			SetFlags( TMenuItem::EHidden, aApaItemHidden );
+			SetFlags( TMenuItem::EHidden, aApaItem.IsHidden() );
 		}
 	}
 
@@ -580,15 +585,13 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::HandleNativeAttrUpdateL(
-		const TMenuItem& aItem, TInt aUid )
+		const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
 	{
     //we need this to delete uninstalled java app item
-	if( ( IsMidlet( TUid::Uid( aUid ) )
-	        || iWidgetSession.IsWidget( TUid::Uid( aUid ) ) )
-    		&& iEng.ObjectL( aItem.Id() ).GetNative() )
+    if( aApaItem.GetAppType() != iEng.ObjectL( aItem.Id() ).GetAppType() )
     	{
     	iEng.ModifiableObjectL( aItem.Id(),
-    			RMenuNotifier::EItemsNone ).SetNative( EFalse );
+    			RMenuNotifier::EItemsNone ).SetAppType( aApaItem.GetAppType() );
     	}
 	}
 
@@ -598,9 +601,9 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::HandleMmcAttrUpdateL(
-		const TMenuItem& aItem, TInt aUid, TUint aMmcId )
+		const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId )
 	{
-    if ( IsMmcApp( TUid::Uid( aUid ) ) )
+    if ( IsInMmc( aApaItem ) )
     	{
     	//app is instaled on mmc - KMenuAttrMmcId attribute update
     	TBuf<KUidChars> uidString;
@@ -608,8 +611,8 @@
         iEng.ModifiableObjectL( aItem.Id(), RMenuNotifier::EItemsAddedRemoved ).
 			SetAttributeL( KMenuAttrMmcId, uidString, EFalse );
     	}
-    else if ( IsMassStorageApp( TUid::Uid( aUid ) )
-    		&& IsMidlet( TUid::Uid( aUid ) ) )
+    else if ( IsInMassStorage( aApaItem )
+    		&& aApaItem.GetAppType() == CMenuEngObject::EWidgetApp )
     	{
     	//its java app installed on mass storage, we need to leave it in xml
     	//in case of connecting usb in mass storage mode
@@ -634,24 +637,21 @@
     RArray<TMenuItem> mcsItems;
     CleanupClosePushL( mcsItems );
     GetMcsAppItemsL( mcsItems );
-    RArray<TAppAtributes> apaAndCrItems;
-    CleanupClosePushL( apaAndCrItems );
-    GetApaItemsL( apaAndCrItems );
-    GetCrItemsL( apaAndCrItems );
+    iSrvEngUtils.ReloadApaItemsL();
+    GetCrItemsL( iSrvEngUtils.GetAppItemsL() );
     TBool isLegacy = iEng.GetOnceLegacyFormat();
 
 
     //for every item in apaAndCrItems array
-    for ( TInt i = ( apaAndCrItems.Count() - 1 ); i >= 0 ; i-- )
+    for ( TInt i = ( iSrvEngUtils.GetAppItemsL().Count() - 1 ); i >= 0 ; i-- )
         {
         // if there was leave for any item we ignore it
         // and proceed to the next one
         TRAP_IGNORE(UpdateApplicationItemL(
-        		mcsItems, apaAndCrItems[i], currentMmcId, isLegacy));
+        		mcsItems, *iSrvEngUtils.GetAppItemsL()[i], currentMmcId, isLegacy));
         }
     // Here the big list contains menu items that refer to missing apps.
     HandleMissingItemsL( mcsItems );
-    CleanupStack::PopAndDestroy( &apaAndCrItems );
     CleanupStack::PopAndDestroy( &mcsItems );
     }
 
@@ -660,11 +660,11 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::HandleLockDeleteFlagUpdateL(
-		const TMenuItem& aItem, TInt aUid )
+		const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
 	{
 	TBool isHidden = ( ( iEng.ObjectL( aItem.Id() )
 							.Flags() & TMenuItem::EHidden ) != 0 );
-	if ( !isHidden && IsInRomL( aUid ) )
+	if ( !isHidden && IsInRomL( aApaItem ) )
 		{
 		if ( ( aItem.Flags() & TMenuItem::ELockDelete ) == 0 )
 			{
@@ -698,33 +698,10 @@
 	}
 
 // ---------------------------------------------------------
-// CMenuSrvAppScanner::IsInRomL
-// ---------------------------------------------------------
-//
-TBool CMenuSrvAppScanner::IsInRomL( TInt aUid )
-    {
-    TBool inROM = EFalse;
-    TApaAppInfo appInfo;
-    if( iApaLsSession.GetAppInfo( appInfo, TUid::Uid( aUid ) ) == KErrNone )
-        {
-        RBuf path;
-        CleanupClosePushL( path );
-        path.CreateL( appInfo.iFullName );
-        path.Replace( 0, 1, KZDrive );
-        if( BaflUtils::FileExists( iFs, path ) )
-            {
-            inROM = ETrue;
-            }
-        CleanupStack::PopAndDestroy( &path );
-        }
-    return inROM;
-    }
-
-// ---------------------------------------------------------
 // CMenuSrvAppScanner::GetCrItemsL
 // ---------------------------------------------------------
 //
-void CMenuSrvAppScanner::GetCrItemsL( RArray<TAppAtributes>& aArray )
+void CMenuSrvAppScanner::GetCrItemsL( RPointerArray<CMenuSrvAppAttributes>& aArray )
     {
  	TBuf<KCenRepBufferSize> buf;
 	iCenRepSession->Get( KMenuHideCPApplication, buf );
@@ -738,7 +715,7 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::ParseUidsL( const TDesC& aHiddenApplications,
-                                        RArray<TAppAtributes>& aArray )
+                                        RPointerArray<CMenuSrvAppAttributes>& aArray )
     {
     TLex input( aHiddenApplications );
     TLexMark startMark;
@@ -755,10 +732,10 @@
         input.Inc();
         notEmpty = ETrue;
         }
-        if ( notEmpty )
-            {
-            SetHidden(input.MarkedToken( startMark ), aArray);
-            }
+	if ( notEmpty )
+		{
+		SetHidden(input.MarkedToken( startMark ), aArray);
+		}
 
 
     }
@@ -767,50 +744,28 @@
 // CMenuSrvAppScanner::SetHidden
 // ---------------------------------------------------------
 //
-void CMenuSrvAppScanner::SetHidden( const TDesC& aHiddenAppUid,
-                                            RArray<TAppAtributes>& aArray )
+void CMenuSrvAppScanner::SetHidden(
+        const TDesC& aHiddenAppUid, RPointerArray<CMenuSrvAppAttributes>& aArray )
     {
     TLex appUidDescriptor(aHiddenAppUid);
     TUint hiddenAppUid( 0 );
     appUidDescriptor.Val( hiddenAppUid, EHex );
     if ( hiddenAppUid )
-       {
-       //all applications in descriptor are hidden
-       TAppAtributes appAtributes( hiddenAppUid,  ETrue );
-       TInt id = aArray.Find(appAtributes, TAppAtributes::MatchItems );
-       if ( id != KErrNotFound )
-           {
-           aArray[id].SetHidden( ETrue );
-           }
-       }
+        {
+        TApaAppCapabilityBuf capability;
+        TApaAppInfo appInfo;
+        appInfo.iUid = TUid::Uid( hiddenAppUid );
+        CMenuSrvAppAttributes* attribute = CMenuSrvAppAttributes::NewLC( capability, appInfo );
+        TInt index = aArray.Find( attribute,
+                TIdentityRelation<CMenuSrvAppAttributes>( CMenuSrvAppAttributes::MatchItems ) );
+        if( index >= 0 && !aArray[index]->IsHidden() )
+            {
+            aArray[index]->SetHidden( ETrue );
+            }
+        CleanupStack::PopAndDestroy( attribute );
+        }
     }
 
-// ---------------------------------------------------------
-// CMenuSrvAppScanner::GetApaItemsL
-// ---------------------------------------------------------
-//
-void CMenuSrvAppScanner::GetApaItemsL( RArray<TAppAtributes>& aArray )
-    {
-    TApaAppInfo appInfo;
-    TApaAppCapabilityBuf appCap;
-    TInt screenNumber;
-
-    User::LeaveIfError( iApaLsSession.GetAllApps() );
-    // for every application get uid, hidden and missing attribute
-    // and add to aArray.
-    while ( KErrNone == iApaLsSession.GetNextApp( appInfo ) )
-        {
-        User::LeaveIfError( iApaLsSession.GetAppCapability
-            ( appCap, appInfo.iUid ) );
-        User::LeaveIfError( iApaLsSession.GetDefaultScreenNumber
-            ( screenNumber, appInfo.iUid ) );
-        // "Hidden" status according to AppArc.
-        TBool appHidden = appCap().iAppIsHidden || screenNumber != 0;
-
-        TAppAtributes appAtributes( appInfo.iUid.iUid,  appHidden );
-        aArray.AppendL( appAtributes );
-        }
-    }
 
 // ---------------------------------------------------------
 // CMenuSrvAppScanner::GetMcsItemsL
@@ -884,12 +839,12 @@
 void CMenuSrvAppScanner::HandleNotifyString( TUint32 aKey,
         const TDesC16& /*aNewValue*/ )
     {
-    if((aKey ==KMenuHideApplication )||(aKey == KMenuHideCPApplication))
+    if((aKey == KMenuHideApplication )||(aKey == KMenuHideCPApplication))
         {
         if ( !IsActive() && !iOpStatus )
             {
             iOpStatus = ETrue;
-           TRequestStatus* ownStatus = &iStatus;
+            TRequestStatus* ownStatus = &iStatus;
             *ownStatus = KRequestPending;
             SetActive();
             User::RequestComplete( ownStatus, KErrNone );
@@ -926,18 +881,14 @@
 // CMenuSrvAppScanner::CreateInstallFolderL
 // ---------------------------------------------------------
 //
-TInt CMenuSrvAppScanner::CreateInstallFolderL( TUint aUid )
+TInt CMenuSrvAppScanner::CreateInstallFolderL( const CMenuSrvAppAttributes& aApaItem )
 	{
     // Find a folder for this app.
     TInt folder(0);
-
-    TApaAppCapabilityBuf capability;
-    User::LeaveIfError(iApaLsSession.GetAppCapability( capability, TUid::Uid( aUid )));
-
-    if ( capability().iGroupName.Length() )
+    if ( aApaItem.GetGroupName().Length() )
         {
         // appgroup_name is defined for this app. Find or create folder.
-        AppGroupFolderL( capability().iGroupName, folder );
+        AppGroupFolderL( aApaItem.GetGroupName(), folder );
         }
     else
         {
@@ -957,61 +908,39 @@
 // ---------------------------------------------------------
 //
 void CMenuSrvAppScanner::AddAppItemL(
-        TUint aUid,
+        const CMenuSrvAppAttributes& aApaItem,
         TUint aCurrentMmcId )
     {
-    TInt folder = CreateInstallFolderL( aUid );
+    TInt folder = CreateInstallFolderL( aApaItem );
     // Now add the app item.
     CMenuEngObject* object = iEng.NewObjectL( KMenuTypeApp() );
     CleanupStack::PushL( object );
     TBuf<KUidChars> uidString;
     _LIT(KHexFormat, "0x%X");
-    uidString.Format( KHexFormat, aUid );
+    uidString.Format( KHexFormat, aApaItem.GetUid().iUid );
 
     object->SetAttributeL( KMenuAttrUid(), uidString, EFalse );
-    if ( aCurrentMmcId && IsMmcApp( TUid::Uid( aUid ) ) )
+    if ( aCurrentMmcId && IsInMmc( aApaItem ) )
         {
         // This app is on the MMC, set the "mmc_id" attribute.
         uidString.Format( KHexFormat, aCurrentMmcId );
         object->SetAttributeL( KMenuAttrMmcId, uidString, EFalse );
         }
-    if( IsMidlet( TUid::Uid( aUid ) ) 
-	    || iWidgetSession.IsWidget( TUid::Uid( aUid ) ) )
+    if( aApaItem.GetAppType() == CMenuEngObject::EWidgetApp )
     	{
     	//we need this to delete uninstalled java or wrt widget app item
-    	object->SetNative( EFalse );
-    	if ( !IsMmcApp( TUid::Uid( aUid ) )
-    			&& IsMassStorageApp( TUid::Uid( aUid ) ) )
+    	if ( !IsInMmc( aApaItem )
+    			&& IsInMassStorage( aApaItem ) )
     		{
     		object->SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse );
     		}
     	}
+    object->SetAppType( aApaItem.GetAppType() );
     EnsureFolderWritableL( folder );
     iEng.AddL( *object, folder, 0 );
     CleanupStack::Pop( object );
     }
 
-// ---------------------------------------------------------------------------
-// CMenuSrvAppScanner::IsMidletL
-// Checks if given app is midlet by reading the apptype uid (2nd uid)
-// ---------------------------------------------------------------------------
-//
-TBool CMenuSrvAppScanner::IsMidlet( const TUid aAppUid )
-	{
-    const TUid KMidletType = { 0x10210E26 };
-    TUid typeuid = KNullUid;
-
-    if ( KErrNone == iApaLsSession.GetAppType( typeuid, aAppUid  ) )
-        {
-        if ( typeuid == KMidletType )
-            {
-            return ETrue;
-            }
-        }
-    return EFalse;
-	}
-
-
 // ---------------------------------------------------------
 // CMenuSrvAppScanner::AppGroupFolderL
 // ---------------------------------------------------------
@@ -1142,7 +1071,7 @@
             // history. Hide the item.
             SetObjectFlagsL( EFalse, aItems[i], TMenuItem::ELockDelete );
 
-			if( iEng.ObjectL( id ).GetNative() )
+			if( iEng.ObjectL( id ).GetAppType() != CMenuEngObject::EWidgetApp )
             	{
             	SetObjectFlagsL( ETrue, aItems[i], TMenuItem::EHidden,
 						RMenuNotifier::EItemsAddedRemoved );
@@ -1235,19 +1164,16 @@
     return EFalse;
     }
 
-
 // ---------------------------------------------------------
 // CMenuSrvAppScanner::IsAppInDrive
 // ---------------------------------------------------------
 //
 TBool CMenuSrvAppScanner::IsAppInDrive(
-		const TUid aUid,
+        const CMenuSrvAppAttributes& aApaItem,
 		const DriveInfo::TDefaultDrives& aDefaultDrive ) const
     {
     TBool ret( EFalse );
-    TApaAppInfo info;
-    TInt err = iApaLsSession.GetAppInfo( info, aUid );
-    if ( !err && IsFileInDrive( info.iFullName, aDefaultDrive ) )
+    if ( IsFileInDrive( aApaItem.GetFullName(), aDefaultDrive ) )
     	{
     	ret = ETrue;
     	}
@@ -1255,21 +1181,30 @@
     }
 
 // ---------------------------------------------------------
-// CMenuSrvAppScanner::IsMmcApp
+// CMenuSrvAppScanner::IsInMmc
 // ---------------------------------------------------------
 //
-TBool CMenuSrvAppScanner::IsMmcApp( const TUid aUid ) const
+TBool CMenuSrvAppScanner::IsInMmc( const CMenuSrvAppAttributes& aApaItem ) const
     {
-    return IsAppInDrive( aUid, DriveInfo::EDefaultRemovableMassStorage );
+    return IsAppInDrive( aApaItem, DriveInfo::EDefaultRemovableMassStorage );
     }
 
 // ---------------------------------------------------------
-// CMenuSrvAppScanner::IsMassStorageApp
+// CMenuSrvAppScanner::IsInMassStorage
 // ---------------------------------------------------------
 //
-TBool CMenuSrvAppScanner::IsMassStorageApp( const TUid aUid ) const
+TBool CMenuSrvAppScanner::IsInMassStorage( const CMenuSrvAppAttributes& aApaItem ) const
     {
-    return IsAppInDrive( aUid, DriveInfo::EDefaultMassStorage );
+    return IsAppInDrive( aApaItem, DriveInfo::EDefaultMassStorage );
+    }
+
+// ---------------------------------------------------------
+// CMenuSrvAppScanner::IsInRomL
+// ---------------------------------------------------------
+//
+TBool CMenuSrvAppScanner::IsInRomL( const CMenuSrvAppAttributes& aApaItem ) const
+    {
+    return IsAppInDrive( aApaItem, DriveInfo::EDefaultRom );
     }
 
 // ---------------------------------------------------------
@@ -1297,62 +1232,4 @@
 	return inUse;
     }
 
-// ==================== MEMBER FUNCTIONS ====================
-
-// ---------------------------------------------------------
-// TAppAtributes::TAppAtributes
-// ---------------------------------------------------------
-//
-TAppAtributes::TAppAtributes ( TUint aUid, TBool aHidden/*, TBool aMissing*/)
-    {
-    iUid = aUid;
-    iHidden = aHidden;
-    /*iMissing = aMissing;*/
-    }
-
-// ---------------------------------------------------------
-// TAppAtributes::GetUid
-// ---------------------------------------------------------
-//
-TUint TAppAtributes::GetUid() const
-    {
-    return iUid;
-    }
-
-// ---------------------------------------------------------
-// TAppAtributes::IsHidden
-// ---------------------------------------------------------
-//
-TBool TAppAtributes::IsHidden() const
-    {
-    return iHidden;
-    }
-// ---------------------------------------------------------
-// TAppAtributes::SetHidden
-// ---------------------------------------------------------
-//
-void TAppAtributes::SetHidden( TBool aHidden )
-    {
-    iHidden = aHidden;
-    }
-
-// ---------------------------------------------------------
-// TAppAtributes::MatchItems
-// ---------------------------------------------------------
-//
-TBool TAppAtributes::MatchItems(const TAppAtributes& item1,
-                                        const TAppAtributes& item2)
-    {
-    TBool result( EFalse );
-    TUint uid1(item1.GetUid());
-    TUint uid2(item2.GetUid());
-    if ( uid1 == uid2 )
-        {
-        result = ETrue;
-        }
-    return result;
-    }
-
-
-
 //  End of File
--- a/menucontentsrv/srvsrc/menusrveng.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrveng.cpp	Tue May 25 13:01:39 2010 +0300
@@ -94,10 +94,12 @@
 CMenuSrvEng::~CMenuSrvEng()
     {
     __ASSERT_DEBUG( !iSessions.Count(), User::Invariant() );
+    //TODO iCMenuSrvEngUtils
     delete iGetlistHandler;
     delete iDrmHander;
     delete iChildrenHandler;
     delete iTimedClose;
+    delete iCacheHandler;
     delete iCMenuSrvEngUtils;
     iSessions.Close();
     iContentName.Close();
@@ -105,7 +107,6 @@
     delete iFolderNotifier;
     delete iMcsSatMonitor;
     delete iRunningAppsHandler;
-    delete iCacheHandler;
     delete iSuiteHandler;
     delete iEng;
     iMenuSrv.EngineDeleted();
@@ -130,35 +131,33 @@
         // A name is required - only dead engines have empty name.
         User::Leave( KErrArgument );
         }
-    
+
     iContentName.CreateL( aContentName );
     iTimedClose = CTimeout::NewL
         ( CActive::EPriorityStandard, TCallBack( CloseSrvEng, (TAny*)this ) );
     iEng = CMenuEng::NewL( iContentName, *this );
-    if (iContentName.Length())
+    if ( iContentName.Length() )
         {
+        iCMenuSrvEngUtils = CMenuSrvEngUtils::NewL( *iEng );
+
         iCacheHandler = CMcsCacheHandler::NewL( *iEng, *iCMenuSrvEngUtils );
-        
+
         iMcsSatMonitor = CMcsSatMonitor::NewL( *iEng );
-        
-        iCMenuSrvEngUtils = CMenuSrvEngUtils::NewL( *iEng );
     #ifndef __TEST_DISABLE_APPSCAN
-        iAppScanner = CMenuSrvAppScanner::NewL( *iEng ); // Start automatic update.
-        iFolderNotifier =  CMenuSrvFolderCrNotifier::NewL( *iEng ); // Start automatic update.
+        // Start automatic update.
+        iAppScanner = CMenuSrvAppScanner::NewL( *iEng, *iCMenuSrvEngUtils );
+        // Start automatic update.
+        iFolderNotifier =  CMenuSrvFolderCrNotifier::NewL( *iEng );
     #endif
-        
-        iRunningAppsHandler = CMcsRunningAppsHandler::NewL( *iEng, 
-        		*iCacheHandler );
-        
-        iDrmHander = CMcsDrmHandler::NewL( 
-            *this,
-            *iCMenuSrvEngUtils, 
-            *iCacheHandler );
-        iChildrenHandler = CMcsChildrenHandler::NewL(
-            *this,
-            *iCacheHandler);
+        iRunningAppsHandler = CMcsRunningAppsHandler::NewL(
+                *iEng, *iCacheHandler );
+
+        iDrmHander = CMcsDrmHandler::NewL(
+                *this, *iCMenuSrvEngUtils, *iCacheHandler );
+
+        iChildrenHandler = CMcsChildrenHandler::NewL( *this, *iCacheHandler);
         iSuiteHandler = CMcsSuiteHandler::NewL(*iEng, iContentName);
-        
+
         iTimedClose->Cancel();
         iTimedClose->After( TTimeIntervalMicroSeconds32( KMenuSrvExitDelay ) );
         }
@@ -223,9 +222,9 @@
         {
         iSessions[i]->EngineEvents( aFolder, aEvents );
         }
-    if (iDrmHander) 
+    if (iDrmHander)
         {
-        iDrmHander->EngineEvents( aFolder, aEvents );    
+        iDrmHander->EngineEvents( aFolder, aEvents );
         }
     if (iChildrenHandler)
     	{
@@ -234,7 +233,7 @@
     if (iRunningAppsHandler)
     	{
     	iRunningAppsHandler->EngineEvents( aFolder, aEvents );
-    	}    
+    	}
     if( iCacheHandler && iCacheHandler->iAttrCache.Count() > 0 )
         {
         iCacheHandler->EngineEvents( aEvents );
@@ -268,7 +267,7 @@
     delete iFolderNotifier; iFolderNotifier = NULL;
     delete iSuiteHandler; iSuiteHandler = NULL;
     delete iEng; iEng = NULL;
-    
+
     iContentName.Close();
     iTimedClose->Cancel();
     iTimedClose->After( TTimeIntervalMicroSeconds32( KMenuSrvExitDelay ) );
@@ -288,9 +287,9 @@
 		  TInt aId,
 		  RArray<TPtrC>& aList )
     {
-	  
+
     const CMenuEngObject& obj = iEng->ObjectL(aId);
-    
+
     TPtrC name, value;
     TBool localized;
     for ( TInt ndx = 0; obj.GetAttribute( ndx, name, value, localized ); ndx++ )
@@ -302,8 +301,8 @@
             || name.Compare( KMenuAttrIconSkinMinorId ) == KErrNone ))
             {
             aList.AppendL(name);
-            }  
-        }      
+            }
+        }
 
     AppendExtendedAttrributesL( obj.Type() , aList );
     }
@@ -321,14 +320,14 @@
     {
     TBool dummy;
     TPtrC val(KNullDesC);
-    
+
     aAttrExists = iEng->ObjectL(aId).FindAttribute( aAttrName, val, dummy);
-    
+
     if( !aAttrExists )
         {
         aAttrExists = iCacheHandler->iAttrCache.Find( aId, aAttrName, aAttrVal );
         }
-    
+
     if ( aAttrExists && val!=KNullDesC() )
         {
         aAttrVal = val;
@@ -342,7 +341,7 @@
 // ---------------------------------------------------------
 // CMenuSrvEng::InstalledSuiteExist
 // ---------------------------------------------------------
-// 
+//
 TBool CMenuSrvEng::InstalledSuiteExist(const TDesC& aSuiteName)
 	{
 	return iSuiteHandler->HaveSuite(aSuiteName);
@@ -351,18 +350,18 @@
 // ---------------------------------------------------------
 // CMenuSrvEng::GetSuiteAttributeL
 // ---------------------------------------------------------
-// 
-void CMenuSrvEng::GetSuiteAttribute( const TDesC& aSuiteName, const TDesC& aAttrName, 
+//
+void CMenuSrvEng::GetSuiteAttribute( const TDesC& aSuiteName, const TDesC& aAttrName,
            TBool& aAttrExists, TDes& aAttrVal )
 	{
-	iSuiteHandler->GetAttribute(aSuiteName, aAttrName, 
+	iSuiteHandler->GetAttribute(aSuiteName, aAttrName,
 			aAttrExists, aAttrVal);
 	}
 
 // ---------------------------------------------------------
 // CMenuSrvEng::GetRunningAppsL()
 // ---------------------------------------------------------
-// 
+//
 void CMenuSrvEng::GetRunningAppsL( RArray<TUid>& aArray )
     {
 	iRunningAppsHandler->GetRunningAppsL( aArray );
@@ -371,15 +370,15 @@
 // ---------------------------------------------------------
 // CMenuSrvEng::GetRunningAppsL()
 // ---------------------------------------------------------
-// 
-void CMenuSrvEng::GetExtendedAttributesL(TInt aId, 
+//
+void CMenuSrvEng::GetExtendedAttributesL(TInt aId,
     const TDesC& aAttrName, TBool& aAttrExists,
     TDes& aAttrVal )
     {
     TBool captionInfo(aAttrName.Compare( KMenuAttrShortName ) == KErrNone ||
     aAttrName.Compare( KMenuAttrLongName ) == KErrNone ||
     aAttrName.Compare( KMenuAttrTitleName ) == KErrNone );
-    
+
     TBool addToCache( ETrue );
     if ( captionInfo )
         {
@@ -420,8 +419,36 @@
 void CMenuSrvEng::ApplicationNativeAttributeL(
 		TInt aId, TBool & aAttrExists, TDes & aAttrVal )
 	{
-	const CMenuEngObject & obj = iEng->ObjectL(aId);
-	iCMenuSrvEngUtils->IsNative(obj, aAttrExists, aAttrVal);
+	const CMenuEngObject & aEngObj = iEng->ObjectL(aId);
+
+    aAttrExists = EFalse;
+    if( aEngObj.Type().CompareF( KMenuTypeApp ) == KErrNone )
+        {
+        TInt err;
+        TUid uid;
+        err = iCMenuSrvEngUtils->GetAppUid( aEngObj, uid );
+        if( err == KErrNone )
+            {
+            TBool native(EFalse);
+            err = iCMenuSrvEngUtils->IsNativeL( uid, native );
+            if( !err )
+                {
+                aAttrExists = ETrue;
+                if( native )
+                    {
+                    aAttrVal = KMenuTrue();
+                    }
+                else
+                    {
+                    aAttrVal = KMenuFalse();
+                    }
+                }
+            }
+        }
+    if( !aAttrExists )
+        {
+        aAttrVal = KNullDesC();
+        }
 	}
 
 // ---------------------------------------------------------
@@ -437,20 +464,20 @@
     iCacheHandler->iAttrCache.AppendL( attr );
     CleanupStack::Pop( attr );
     }
- 
+
 // ---------------------------------------------------------
 // CMenuSrvEng::CaptionInfoL
 // Functions only for KMenuTypeApp type.
 // ---------------------------------------------------------
 //
-void CMenuSrvEng::CaptionInfoL( TInt aId, const TDesC& aAttrName, 
+void CMenuSrvEng::CaptionInfoL( TInt aId, const TDesC& aAttrName,
     TBool& aExists, TDes& aAttrVal )
     {
     const CMenuEngObject& obj = iEng->ObjectL(aId);
     if ( obj.Type().Compare( KMenuTypeFolder ) == KErrNone )
         {
         TBool localized;
-        TPtrC attrvalue; 
+        TPtrC attrvalue;
         TBool attrExists = obj.FindAttribute( KMenuAttrAppGroupName, attrvalue, localized );
         if ( attrExists )
             {
@@ -529,9 +556,9 @@
  TPtrC CMenuSrvEng::AppCaptionInfoL( const CMenuEngObject& aEngObj,
      const TDesC& aAttrName, TBool& aExists )
      {
-     TApaAppInfo info; 
+     TApaAppInfo info;
      TPtrC val( KNullDesC );
-     if( KErrNone == iCMenuSrvEngUtils->GetAppInfo( aEngObj, info ) )
+     if( KErrNone == iCMenuSrvEngUtils->GetAppInfoL( aEngObj, info ) )
          {
          aExists = ETrue;
          if( aAttrName.Compare( KMenuAttrTitleName ) == KErrNone ||
@@ -554,7 +581,7 @@
          }
      return val;
      }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::FolderChildrenCountL
  // ---------------------------------------------------------
@@ -562,22 +589,22 @@
  void CMenuSrvEng::FolderChildrenCountL( TInt aId, TBool& aExists, TDes& aAttrVal )
 	 {
 	 const CMenuEngObject& obj = iEng->ObjectL(aId);
-	 
+
 	 if( obj.Type().CompareF( KMenuTypeFolder ) == KErrNone )
 	     {
 	     TUint32 childrenCount (0);
 		 RArray<TMenuItem> childrenArray;
 		 CleanupClosePushL( childrenArray );
-	     
+
 		 CMenuFilter* appFilter = CMenuFilter::NewLC();
 		 appFilter->SetFlags(0, TMenuItem::EMissing | TMenuItem::EHidden);
 		 TMenuSrvObjectFilter engFilter( *appFilter );
 		 iEng->GetItemsL(childrenArray, aId, &engFilter, EFalse);
 		 childrenCount = childrenArray.Count();
-		 
+
 		 CleanupStack::PopAndDestroy( appFilter );
 		 CleanupStack::PopAndDestroy( &childrenArray );
-	     
+
          aAttrVal.Num(childrenCount, EDecimal);
          aExists = ETrue;
 	     }
@@ -587,7 +614,7 @@
 	     aExists = EFalse;
 	     }
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEngUtils::GetAppRunningL
  // ---------------------------------------------------------
@@ -604,7 +631,7 @@
 		 aAttrVal.Append(KNullDesC());
 		 }
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::GetChildrenCount
  // ---------------------------------------------------------
@@ -616,20 +643,20 @@
 	 RBuf attrVal;
 	 attrVal.CleanupClosePushL();
 	 attrVal.CreateL(KMenuMaxAttrValueLen);
-	 
+
 	 // Get folder children count
 	 FolderChildrenCountL(aId, attrExists, attrVal);
-	 
+
 	 if (attrExists)
 		 {
 		 TLex lex(attrVal);
 		 User::LeaveIfError( lex.Val(count) );
 		 }
 	 CleanupStack::PopAndDestroy( &attrVal );
-	 
+
 	 return count;
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::GetlistSizeL
  // ---------------------------------------------------------
@@ -638,11 +665,11 @@
 	 {
 	 delete iGetlistHandler;
 	 iGetlistHandler = NULL;
-	 
+
 	 iGetlistHandler = CMcsGetlistHandler::NewL( *this );
 	 return iGetlistHandler->GetListSizeL( aSerializedInput );
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::CloseOutputBuffer
  // ---------------------------------------------------------
@@ -660,7 +687,7 @@
 	 {
 	 iCacheHandler->iAttrCache.ResetAndDestroy();
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::GetlistSizeL
  // ---------------------------------------------------------
@@ -669,55 +696,55 @@
 	 {
 	 return iGetlistHandler->GetListDataL( );
 	 }
- 
+
  // ---------------------------------------------------------
  // CMenuSrvEng::AppendExtendedAttrributesL
  // ---------------------------------------------------------
  //
  void CMenuSrvEng::AppendExtendedAttrributesL(
- 		const TDesC& aType,  
+ 		const TDesC& aType,
  		RArray<TPtrC>& aList )
 	 {
-	 
+
     if ( KErrNone == aType.Compare( KMenuTypeApp ) )
         {
         if( KErrNotFound == aList.Find( KMenuAttrTitleName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrTitleName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrTitleName ) );
         	}
         if( KErrNotFound == aList.Find( KMenuAttrShortName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrShortName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrShortName ) );
         	}
         if( KErrNotFound == aList.Find( KMenuAttrLongName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrLongName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrLongName ) );
         	}
         if( KErrNotFound == aList.Find( KMenuAttrDrmProtection(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrDrmProtection ) );	
+        	aList.AppendL( TPtrC( KMenuAttrDrmProtection ) );
         	}
         }
     else if ( KErrNone == aType.Compare( KMenuTypeFolder ) )
         {
         if( KErrNotFound == aList.Find( KMenuAttrTitleName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrTitleName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrTitleName ) );
         	}
         if( KErrNotFound == aList.Find( KMenuAttrShortName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrShortName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrShortName ) );
         	}
         if( KErrNotFound == aList.Find( KMenuAttrLongName(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KMenuAttrLongName ) );	
+        	aList.AppendL( TPtrC( KMenuAttrLongName ) );
         	}
         if( KErrNotFound == aList.Find( KChildrenCount(), TIdentityRelation<TPtrC>( CmpAttrName )) )
         	{
-        	aList.AppendL( TPtrC( KChildrenCount ) );	
+        	aList.AppendL( TPtrC( KChildrenCount ) );
         	}
         }
 	 }
 
- 
-//  End of File  
+
+//  End of File
--- a/menucontentsrv/srvsrc/menusrvengutils.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrvengutils.cpp	Tue May 25 13:01:39 2010 +0300
@@ -14,118 +14,15 @@
 * Description:
 *
 */
+
 #include <mcsmenuutils.h>
-#include <AknIconUtils.h>
-#include <avkon.mbg>
 #include <javaregistry.h>
 #include <javaregistryentry.h>
 #include <drmrightsinfo.h>
-#include <e32property.h>
-#include <satdomainpskeys.h>
-#include <AknTaskList.h> 
-#include <mmf/common/mmfcontrollerpluginresolver.h>
-#include <widgetregistryclient.h>
 
 #include "menusrvengutils.h"
-
 #include "mcsdef.h"
-#include "mcsmenu.h"
-#include "mcsmenuitem.h"
-#include "mcsmenufilter.h"
 #include "mcssathandler.h"
-#include "menusrvappscanner.h"
-
-_LIT( KMidletPostfix, ".fakeapp" );
-
-// ================= LOCAL FUNCTIONS ========================
-
-// ---------------------------------------------------------
-// GetAppUid
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetAppUid( const CMenuEngObject& aEngObj, TUid& aAppUid )
-    {
-    TInt err( 0 );
-    TPtrC attrVal;
-    TBool attrExists( EFalse );
-    TBool localized( EFalse );//
-    attrExists = aEngObj.FindAttribute(KMenuAttrUid, attrVal, localized);
-    if ( !attrExists ) 
-    	{
-    	err = KErrNotFound;
-    	}
-    else
-        {
-        TUint appUid;
-        err = MenuUtils::GetTUint( attrVal, appUid );
-        if ( !err )
-            {
-            aAppUid = TUid::Uid( appUid );
-            }
-        }
-    return err;
-    }
-    
-// ---------------------------------------------------------
-// GetApaAppInfo
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetApaAppInfo( 
-    const CMenuEngObject& aEngObj, 
-    TApaAppInfo& aInfo ) const
-    {
-    TUid uid;
-    TInt err;
-    err = CMenuSrvEngUtils::GetAppUid( aEngObj, uid );
-    if ( err == KErrNone )
-        {
-        err = GetApaAppInfo( uid, aInfo );
-        }
-        
-    return err;
-    }
-
-// ---------------------------------------------------------
-// GetApaAppInfo
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetApaAppInfo( 
-    TUid aUid, 
-    TApaAppInfo& aInfo ) const
-    {   
-    return iApaLsSession.GetAppInfo( aInfo, aUid );
-    }
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetJavaContentIdL
-// ---------------------------------------------------------
-//
-void CMenuSrvEngUtils::GetJavaContentIdL( TUid aUid, TDes& aContentId )
-	{
-	Java::CJavaRegistry* javaRegistry;
-	Java::CJavaRegistryEntry* regEntry = NULL;
-
-    javaRegistry = Java::CJavaRegistry::NewL();
-    CleanupStack::PushL( javaRegistry );
-
-    //regEntry will be NULL if there is no Java application 
-    //corresponding to the specified aUid
-    regEntry = javaRegistry->RegistryEntryL( aUid );
-    
-    //DrmContentId() will return reference to NULL when
-    //Java application is not DRM protected
-    if( regEntry && ( &regEntry->DrmContentId() ) )
-    	{
-   		aContentId.Copy( regEntry->DrmContentId() );
-    	}
-    else
-    	{
-    	aContentId.Copy( KNullDesC );
-    	}
-    
-    delete regEntry;
-    CleanupStack::PopAndDestroy( javaRegistry );
-	}
-
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -139,6 +36,7 @@
     iApaLsSession.Close();
     iWidgetSession.Close();
     iWsSession.Close();
+    iAppAttributes.ResetAndDestroy();
     }
 
 // ---------------------------------------------------------
@@ -179,7 +77,7 @@
 // CMenuSrvEngUtils::GetAppInfo
 // ---------------------------------------------------------
 //
-TInt CMenuSrvEngUtils::GetAppInfo( const CMenuEngObject& aEngObj, TApaAppInfo& aAppInfo ) const
+TInt CMenuSrvEngUtils::GetAppInfoL( const CMenuEngObject& aEngObj, TApaAppInfo& aAppInfo ) const
     {
     TUid appUid;
     TInt err = GetAppUid( aEngObj, appUid );
@@ -191,115 +89,45 @@
             }
         else
             {
-            err = iApaLsSession.GetAppInfo( aAppInfo, appUid );
+            aAppInfo.iUid = appUid;
+            err = GetAppInfoFromArrayL( aAppInfo );
+            if( err )
+                {
+                err = iApaLsSession.GetAppInfo( aAppInfo, appUid );
+                }
             }
         }
     return err;
     }
 
 // ---------------------------------------------------------
-// CMenuSrvEngUtils::GetAppInfo
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetAppInfoL( TInt aItemId, TApaAppInfo& aAppInfo ) const
-    {
-    TInt err( 0 );
-    const CMenuEngObject& obj = iEng.ObjectL( aItemId );
-    err = GetAppInfo( obj, aAppInfo );
-    return err;
-    }
-
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetFolderIcon
-// Knowing that in case of folders there is no way to query 
-// folder's icon file from APPARC, the responsibility of handling this is
-// transferred to the caller of this method, so that he may show some default or
-// display error etc.
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetFolderIcon( const CMenuEngObject& /*aEngObj*/, 
-                                 HBufC*& aFullFileName,
-                                 TInt& /*aBitmapId*/,
-                                 TInt& /*aMaskId*/ ) const
-    {
-    __ASSERT_ALWAYS( !aFullFileName, User::Invariant() );
-    
-    return KErrNotFound;
-    }
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetFolderIcon
-// ---------------------------------------------------------
-//
-TInt CMenuSrvEngUtils::GetFolderIconL( TInt aItemId, 
-                                 HBufC*& aFullFileName,
-                                 TInt& aBitmapId,
-                                 TInt& aMaskId ) const
-    {
-    __ASSERT_ALWAYS( !aFullFileName, User::Invariant() );
-
-    TInt err( 0 );
-    const CMenuEngObject& obj = iEng.ObjectL( aItemId );
-    err = GetFolderIcon( obj, aFullFileName, aBitmapId, aMaskId );
-    return err;
-    }
-
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::IsNative
-// ---------------------------------------------------------
-//
-void CMenuSrvEngUtils::IsNative( const CMenuEngObject& aEngObj, 
-    TBool& aAttrExists, TDes& aAttrVal )
-    {
-    aAttrExists = EFalse;
-    if( aEngObj.Type().CompareF( KMenuTypeApp ) == KErrNone )
-        {
-        TInt err;
-        TUid uid;
-        err = GetAppUid( aEngObj, uid );
-        if( err == KErrNone )
-            {
-            TBool native(EFalse);
-            err = IsNative( uid, native );
-        	if( !err )
-        		{
-        		aAttrExists = ETrue;
-                if( native )
-                    {
-                    aAttrVal = KMenuTrue();
-                    }
-                else
-                    {
-                    aAttrVal = KMenuFalse();
-                    }
-        		}
-            }
-        }
-    if( !aAttrExists )
-        {
-        aAttrVal = KNullDesC();
-        }
-    }
-
-// ---------------------------------------------------------
 // CMenuSrvEngUtils::IsNativeL
 // ---------------------------------------------------------
 //
 
-TInt CMenuSrvEngUtils::IsNative( TUid aAppUid, TBool& aIsNative )
+TInt CMenuSrvEngUtils::IsNativeL( TUid aAppUid, TBool& aIsNative )
 	{
-	TInt error(KErrNotFound);
-	TApaAppInfo appInfo;
-	
-	error = iApaLsSession.GetAppInfo( appInfo, aAppUid );
-	if( error == KErrNone )
-		{
-		error = iApaLsSession.IsProgram( appInfo.iFullName, aIsNative );
-		}
-	
-	return error;
+    TInt error( KErrNotFound );
+    CMenuEngObject::TAppType aType;
+    error = GetAppTypeFromArrayL( aAppUid, aType );
+    if ( error == KErrNone && aType == CMenuEngObject::ENativeApp )
+        {
+        aIsNative = ETrue;
+        }
+    else if( error != KErrNone )
+        {
+        TApaAppInfo appInfo;
+        error = iApaLsSession.GetAppInfo( appInfo, aAppUid );
+        if( error == KErrNone )
+            {
+            error = iApaLsSession.IsProgram( appInfo.iFullName, aIsNative );
+            }
+        }
+    else
+        {
+        aIsNative = EFalse;
+        }
+    return error;
 	}
 
 // ---------------------------------------------------------
@@ -341,41 +169,35 @@
     		}
     	}
     }
-
     CleanupStack::PopAndDestroy( drmInfo );
-    return err;    
+    return err;
     }
 
-		
+
 // ---------------------------------------------------------
 // CMenuSrvEngUtils::GetDrmProtection
 // ---------------------------------------------------------
 //
-TInt CMenuSrvEngUtils::GetDrmProtectionL( 
-    const TUid aAppUid, 
-    TDRMProtectionInfo& aProtectionInfo ) const
+TInt CMenuSrvEngUtils::GetDrmProtectionL(
+        const TUid aAppUid, TDRMProtectionInfo& aProtectionInfo ) const
     {
     TInt err( KErrNone );
-    
+
     TApaAppInfo info;
-    
+
     aProtectionInfo = EDRMUnknownProtection;
-    
-    err = GetApaAppInfo( aAppUid, info );
-    if ( err == KErrNone )
+    CMenuEngObject::TAppType aType;
+    err = GetAppTypeFromArrayL( aAppUid, aType );
+    if( ( !err && aType == CMenuEngObject::EJavaApp )
+            || ( err && IsMiddlet( aAppUid ) ) )
         {
-        if( IsMiddlet( info ) )
-        	{
-        	TBuf<KMaxFileName> contentId;
-        	GetJavaContentIdL( info.iUid, contentId );
-        	if ( contentId != KNullDesC ) 
-        		{
-        		GetDrmProtectionByContentIdL( contentId, aProtectionInfo );
-        		}
-	        }
+        TBuf<KMaxFileName> contentId;
+        GetJavaContentIdL( aAppUid, contentId );
+        if ( contentId != KNullDesC )
+            {
+            GetDrmProtectionByContentIdL( contentId, aProtectionInfo );
+            }
         }
-
-
     return err;
     }
 
@@ -383,12 +205,12 @@
 // CMenuSrvEngUtils::GetDrmProtection
 // ---------------------------------------------------------
 //
-TInt CMenuSrvEngUtils::GetDrmProtectionL( 
-    const CMenuEngObject& aEngObj, 
+TInt CMenuSrvEngUtils::GetDrmProtectionL(
+    const CMenuEngObject& aEngObj,
     TDRMProtectionInfo& aProtectionInfo ) const
     {
     TInt err( KErrNone );
-    
+
     if ( aEngObj.Type().CompareF( KMenuTypeApp ) == 0 )
         {
         TUid uid;
@@ -419,100 +241,6 @@
     err = GetDrmProtectionL( obj, aProtectionInfo );
     return err;
     }
-/*
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetDrmProtection
-// ---------------------------------------------------------
-//
-TBool CMenuSrvEngUtils::GetAppRunningL( TInt aItemId )
-    {
-    TInt err( 0 );
-    const CMenuEngObject& obj = iEng.ObjectL( aItemId );
-    err = GetAppRunningL( obj );
-    return err;
-    }
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetDrmProtection
-// ---------------------------------------------------------
-//
-TBool CMenuSrvEngUtils::GetAppRunningL( const CMenuEngObject& aEngObj )
-    {
-    TBool runningApp( EFalse );
-    if ( aEngObj.Type().CompareF( KMenuTypeApp ) == KErrNone )
-        {
-        TUid appUid;
-        TInt errorUid = GetAppUid( aEngObj, appUid );
-        
-        if( !errorUid )
-            {
-            CheckAppRunningL( appUid , runningApp );
-            }
-        else 
-            {
-            return EFalse;
-            }
-        }
-    else if( aEngObj.Type().CompareF( KMenuTypeFolder ) == KErrNone )
-        {
-        GetChildrenRunningAppL( aEngObj.Id(), runningApp );
-        }
-
-    return runningApp;
-    }
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::GetChildrenRunningAppL
-// ---------------------------------------------------------
-//
-void CMenuSrvEngUtils::GetChildrenRunningAppL( TInt id, 
-        TBool& aRunningApp )
-    {
-    TMenuSrvTypeFilter filter;
-    filter.SetType( KMenuTypeApp() );
-    
-    RArray<TMenuItem> aItemArray;
-    CleanupClosePushL(aItemArray);
-    iEng.GetItemsL( aItemArray , id , &filter, ETrue );
-    for( TInt i = 0; i < aItemArray.Count(); i++)
-        {
-        const CMenuEngObject& obj = iEng.ObjectL( aItemArray[i].Id() );
-        TUid appUid;
-        TInt errorUid = GetAppUid( obj, appUid );
-        
-        if( !errorUid &&  
-                !(obj.Flags() & TMenuItem::EHidden) )
-            {
-            CheckAppRunningL(  appUid , aRunningApp );
-            }
-        if( aRunningApp )
-            {
-            break;
-            }
-        }
-    CleanupStack::PopAndDestroy( &aItemArray );
-    }
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::CheckAppRunning
-// ---------------------------------------------------------
-//
-void CMenuSrvEngUtils::CheckAppRunningL( TUid aUid, TBool& aRunningApp )
-    {
-    if ( iWidgetSession.IsWidget( aUid ) )
-        {
-        aRunningApp = iWidgetSession.IsWidgetRunning( aUid );        
-        }
-    else
-        {
-        CAknTaskList* taskList = CAknTaskList::NewLC( iWsSession );
-        
-        TApaTask task = taskList->FindRootApp( aUid );
-        aRunningApp = task.Exists();
-        
-        CleanupStack::PopAndDestroy( taskList );
-        }
-    }*/
 
 // ---------------------------------------------------------
 // CMenuSrvEngUtils::GetSatAppInfo
@@ -531,13 +259,179 @@
     }
 
 // ---------------------------------------------------------
-// MenuSrvUtil::SetValueSkinMajorId
+// CMenuSrvEngUtils::IsMiddlet
+// ---------------------------------------------------------
+//
+TBool CMenuSrvEngUtils::IsMiddlet( const TUid aAppUid ) const
+	{
+    const TUid KMidletType = { 0x10210E26 };
+    TUid typeuid = KNullUid;
+
+    if ( KErrNone == iApaLsSession.GetAppType( typeuid, aAppUid  ) )
+        {
+        if ( typeuid == KMidletType )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+	}
+
+// ---------------------------------------------------------
+// GetAppUid
+// ---------------------------------------------------------
+//
+TInt CMenuSrvEngUtils::GetAppUid( const CMenuEngObject& aEngObj, TUid& aAppUid )
+    {
+    TInt err( 0 );
+    TPtrC attrVal;
+    TBool attrExists( EFalse );
+    TBool localized( EFalse );//
+    attrExists = aEngObj.FindAttribute( KMenuAttrUid, attrVal, localized );
+    if ( !attrExists )
+        {
+        err = KErrNotFound;
+        }
+    else
+        {
+        TUint appUid;
+        err = MenuUtils::GetTUint( attrVal, appUid );
+        if ( !err )
+            {
+            aAppUid = TUid::Uid( appUid );
+            }
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------
+// CMenuSrvEngUtils::GetJavaContentIdL
+// ---------------------------------------------------------
+//
+void CMenuSrvEngUtils::GetJavaContentIdL( TUid aUid, TDes& aContentId )  const
+    {
+    Java::CJavaRegistry* javaRegistry;
+    Java::CJavaRegistryEntry* regEntry = NULL;
+
+    javaRegistry = Java::CJavaRegistry::NewL();
+    CleanupStack::PushL( javaRegistry );
+
+    //regEntry will be NULL if there is no Java application
+    //corresponding to the specified aUid
+    regEntry = javaRegistry->RegistryEntryL( aUid );
+
+    //DrmContentId() will return reference to NULL when
+    //Java application is not DRM protected
+    if( regEntry && ( &regEntry->DrmContentId() ) )
+        {
+        aContentId.Copy( regEntry->DrmContentId() );
+        }
+    else
+        {
+        aContentId.Copy( KNullDesC );
+        }
+
+    delete regEntry;
+    CleanupStack::PopAndDestroy( javaRegistry );
+    }
+
+// ---------------------------------------------------------
+// CMenuSrvAppScanner::GetApaItemsL
 // ---------------------------------------------------------
 //
-void CMenuSrvEngUtils::SetValueSkinId( TDes& aAttrName, TInt aValue )
-	{
-	MenuUtils::SetTUint( aAttrName, aValue );
-	}
+void CMenuSrvEngUtils::ReloadApaItemsL()
+    {
+    iAppAttributes.ResetAndDestroy();
+    TApaAppInfo appInfo;
+    TApaAppCapabilityBuf appCap;
+
+    User::LeaveIfError( iApaLsSession.GetAllApps( 0 ) );
+    // for every application get uid, hidden and missing attribute
+    // and add to aArray.
+    while ( KErrNone == iApaLsSession.GetNextApp( appInfo ) )
+        {
+        User::LeaveIfError(
+                iApaLsSession.GetAppCapability( appCap, appInfo.iUid ) );
+        // "Hidden" status according to AppArc.
+        TBool appHidden = appCap().iAppIsHidden;
+
+        CMenuSrvAppAttributes* appAtributes = CMenuSrvAppAttributes::NewLC( appCap, appInfo );
+        if( IsMiddlet( appInfo.iUid ) )
+            {
+            appAtributes->SetAppType( CMenuEngObject::EJavaApp );
+            }
+        else if( iWidgetSession.IsWidget( appInfo.iUid ) )
+            {
+            appAtributes->SetAppType( CMenuEngObject::EWidgetApp );
+            }
+        else
+            {
+            //TODO: it is really necessary?
+            TBool isNative( EFalse );
+            iApaLsSession.IsProgram( appInfo.iFullName, isNative );
+            if( isNative )
+                {
+                appAtributes->SetAppType( CMenuEngObject::ENativeApp );
+                }
+            }
+
+        iAppAttributes.AppendL( appAtributes );
+        CleanupStack::Pop( appAtributes );
+        }
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TInt CMenuSrvEngUtils::GetAppInfoFromArrayL( TApaAppInfo& aAppInfo ) const
+    {
+    TApaAppCapabilityBuf capability;
+    CMenuSrvAppAttributes* attribute = CMenuSrvAppAttributes::NewLC( capability, aAppInfo );
+    TInt index = iAppAttributes.Find( attribute,
+            TIdentityRelation<CMenuSrvAppAttributes>( CMenuSrvAppAttributes::MatchItems ) );
+    if( index >= 0 )
+        {
+        aAppInfo.iCaption = iAppAttributes[index]->GetCaption();
+        aAppInfo.iFullName = iAppAttributes[index]->GetFullName();
+        aAppInfo.iShortCaption = iAppAttributes[index]->GetShortCaption();
+        index = KErrNone;
+        }
+    CleanupStack::PopAndDestroy( attribute );
+    return index;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+TInt CMenuSrvEngUtils::GetAppTypeFromArrayL( const TUid& aAppUid,
+        CMenuEngObject::TAppType& aType  ) const
+    {
+    TApaAppCapabilityBuf capability;
+    TApaAppInfo appInfo;
+    appInfo.iUid = aAppUid;
+    CMenuSrvAppAttributes* attribute = CMenuSrvAppAttributes::NewLC( capability, appInfo );
+    TInt index = iAppAttributes.Find( attribute,
+            TIdentityRelation<CMenuSrvAppAttributes>( CMenuSrvAppAttributes::MatchItems ) );
+    if( index >= 0 )
+        {
+        aType = iAppAttributes[index]->GetAppType();
+        index = KErrNone;
+        }
+
+    CleanupStack::PopAndDestroy( attribute );
+    return index;
+    }
+
+// ---------------------------------------------------------
+//
+// ---------------------------------------------------------
+//
+RPointerArray<CMenuSrvAppAttributes>& CMenuSrvEngUtils::GetAppItemsL()
+    {
+    return iAppAttributes;
+    }
 
 // ---------------------------------------------------------
 // MenuSrvUtil::UidToStringL
@@ -547,141 +441,17 @@
      TBool aLegacy, TRadix aRadix )
     {
     aResult.Zero();
-    
+
     TBuf<KUidChars> number;
     if( !aLegacy )
         {
         if (aRadix == EHex)
             {
-            aResult.Append( KHex );   
+            aResult.Append( KHex );
             }
         }
     number.AppendNum( aUid, aRadix );
     number.UpperCase();
-  
+
     aResult.Append( number );
-   
-    }
-
-// ---------------------------------------------------------
-// TMenuSrvTypeFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvTypeFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    return iType == aObject.Type();
-    }
-
-// ==================== MEMBER FUNCTIONS ====================
-
-// ---------------------------------------------------------
-// TMenuSrvTypeAttrFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvTypeAttrFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    if ( TMenuSrvTypeFilter::MatchesObject( aObject ) )
-        {
-        TPtrC val;
-        TBool dummy;
-        if( aObject.FindAttribute( iAttrName, val, dummy ) )
-            {
-            if( !val.CompareF( iAttrValue ) )
-                {
-                return ETrue; // Match.
-                }
-            }
-        }
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// TMenuSrvAttrFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvAttrFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    TPtrC val;
-    TBool dummy;
-    if( aObject.FindAttribute( iAttrName, val, dummy ) )
-        {
-        if( !val.CompareF( iAttrValue ) )
-            {
-            return ETrue; // Match.
-            }
-        }
-    return EFalse;
     }
-
-// ==================== MEMBER FUNCTIONS ====================
-
-// ---------------------------------------------------------
-// TMenuSrvTypeAttrFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvTypeAttrExistsFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    if ( TMenuSrvTypeFilter::MatchesObject( aObject ) )
-        {
-        TPtrC val;
-        TBool dummy;
-        if( aObject.FindAttribute( iAttrName, val, dummy ) )
-            {
-            return ETrue; // Match.
-            }
-        }
-    return EFalse;
-    }    
-
-// ---------------------------------------------------------
-// TMenuSrvTypeAttrFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvAttrExistsFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    TPtrC val;
-    TBool dummy;
-    if( aObject.FindAttribute( iAttrName, val, dummy ) )
-        {
-        return ETrue; // Match.
-        }
-    return EFalse;
-    }    
-
-// ---------------------------------------------------------
-// TMenuSrvHiddenAppFilter::MatchesObject
-// ---------------------------------------------------------
-//
-TBool TMenuSrvHiddenAppFilter::MatchesObject
-( const CMenuEngObject& aObject ) const
-    {
-    if (KMenuTypeApp() == aObject.Type())
-    	{
-    	if( aObject.Flags() & TMenuItem::EHidden )
-    		{
-	    	return ETrue; // Match.
-    		}
-    	}
-    return EFalse;
-    } 
-
-// ---------------------------------------------------------
-// CMenuSrvEngUtils::IsMiddlet
-// ---------------------------------------------------------
-//
-TBool CMenuSrvEngUtils::IsMiddlet( const TApaAppInfo& aInfo )
-	{
-	TBool ret( EFalse ); 
-	if( aInfo.iFullName.Right( KMidletPostfix().Length() ).
-		CompareF( KMidletPostfix ) == 0 )
-		{
-		ret = ETrue;
-		}
-	return ret;
-	}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/srvsrc/menusrvtypefilters.cpp	Tue May 25 13:01:39 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include"menusrvtypefilters.h"
+#include "mcsdef.h"
+#include "mcsmenuitem.h"
+
+// ---------------------------------------------------------
+// TMenuSrvTypeFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvTypeFilter::MatchesObject( const CMenuEngObject& aObject ) const
+    {
+    return iType == aObject.Type();
+    }
+
+// ==================== MEMBER FUNCTIONS ====================
+
+// ---------------------------------------------------------
+// TMenuSrvTypeAttrFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvTypeAttrFilter::MatchesObject(
+        const CMenuEngObject& aObject ) const
+    {
+    if ( TMenuSrvTypeFilter::MatchesObject( aObject ) )
+        {
+        TPtrC val;
+        TBool dummy;
+        if( aObject.FindAttribute( iAttrName, val, dummy ) )
+            {
+            if( !val.CompareF( iAttrValue ) )
+                {
+                return ETrue; // Match.
+                }
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// TMenuSrvAttrFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvAttrFilter::MatchesObject( const CMenuEngObject& aObject ) const
+    {
+    TPtrC val;
+    TBool dummy;
+    if( aObject.FindAttribute( iAttrName, val, dummy ) )
+        {
+        if( !val.CompareF( iAttrValue ) )
+            {
+            return ETrue; // Match.
+            }
+        }
+    return EFalse;
+    }
+
+// ==================== MEMBER FUNCTIONS ====================
+
+// ---------------------------------------------------------
+// TMenuSrvTypeAttrFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvTypeAttrExistsFilter::MatchesObject(
+        const CMenuEngObject& aObject ) const
+    {
+    if ( TMenuSrvTypeFilter::MatchesObject( aObject ) )
+        {
+        TPtrC val;
+        TBool dummy;
+        if( aObject.FindAttribute( iAttrName, val, dummy ) )
+            {
+            return ETrue; // Match.
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// TMenuSrvTypeAttrFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvAttrExistsFilter::MatchesObject(
+        const CMenuEngObject& aObject ) const
+    {
+    TPtrC val;
+    TBool dummy;
+    if( aObject.FindAttribute( iAttrName, val, dummy ) )
+        {
+        return ETrue; // Match.
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// TMenuSrvHiddenAppFilter::MatchesObject
+// ---------------------------------------------------------
+//
+TBool TMenuSrvHiddenAppFilter::MatchesObject(
+        const CMenuEngObject& aObject ) const
+    {
+    if (KMenuTypeApp() == aObject.Type())
+        {
+        if( aObject.Flags() & TMenuItem::EHidden )
+            {
+            return ETrue; // Match.
+            }
+        }
+    return EFalse;
+    }