Revision: 201021 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 09 Jun 2010 10:01:25 +0300
branchRCL_3
changeset 23 ace62b58f4b2
parent 22 1b207dd38b72
child 25 9e077f9a342c
Revision: 201021 Kit: 2010123
contentpublishingsrv/contentpublishingserver/cpserver/inc/cpnotificationhandler.h
contentpublishingsrv/contentpublishingserver/cpserver/src/cpnotificationhandler.cpp
contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp
contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp
group/bld.inf
group/robot_patch.zip
homescreenpluginsrv/hspsmanager/client/hspsclientsession.cpp
homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h
homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h
homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h
homescreenpluginsrv/hspsmanager/inc/hspsthemeserversession.h
homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp
homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp
homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp
homescreensrv_plat/hs_widget_publisher_api/inc/hsdataobserver.h
homescreensrv_plat/hs_widget_publisher_api/inc/hsglobals.h
homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetitem.h
homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetpublisherimpl.h
homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp
homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp
homescreensrv_plat/idlefw_api/group/bld.inf
homescreensrv_plat/idlefw_api/inc/aisystemuids.hrh
homescreensrv_plat/menu_content_service_api/inc/mcsmenuitem.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp
homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp
idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h
idlefw/plugins/devicestatus/src/ainetworkinfolistener.cpp
idlefw/plugins/mcsplugin/group/qgn_mcsplugin_log_out.svg
idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp
idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h
idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp
idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp
idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp
idlefw/plugins/profileplugin/inc/caiprofileengine.h
idlefw/plugins/profileplugin/src/caiprofileengine.cpp
idlefw/plugins/sapidataplugin/inc/sapidataplugin.h
idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h
idlefw/plugins/sapidataplugin/src/sapidata.cpp
idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp
idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h
idlefw/plugins/wrtdataplugin/src/wrtdata.cpp
idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp
idlefw/src/idleint/aiuiidleintegration.cpp
inc/aisystemuids.hrh
menucontentsrv/enginc/menueng.h
menucontentsrv/engsrc/menueng.cpp
menucontentsrv/group/mcsmenu.mmp
menucontentsrv/handlersrc/menuuninstalloperation.cpp
menucontentsrv/srvinc/mcsgetlistcreatorinterface.h
menucontentsrv/srvinc/mcssuitehandler.h
menucontentsrv/srvinc/mcssuiteobject.h
menucontentsrv/srvinc/mcssuiteobjectattr.h
menucontentsrv/srvinc/mcssuiteobjectfactory.h
menucontentsrv/srvinc/mcssuiteparser.h
menucontentsrv/srvinc/menusrvappscanner.h
menucontentsrv/srvinc/menusrveng.h
menucontentsrv/srvinc/menusvrsuite.h
menucontentsrv/srvsrc/mcsgetlistcreatorinterface.cpp
menucontentsrv/srvsrc/mcssuitehandler.cpp
menucontentsrv/srvsrc/mcssuiteobject.cpp
menucontentsrv/srvsrc/mcssuiteobjectattr.cpp
menucontentsrv/srvsrc/mcssuiteobjectfactory.cpp
menucontentsrv/srvsrc/mcssuiteparser.cpp
menucontentsrv/srvsrc/menusrvappscanner.cpp
menucontentsrv/srvsrc/menusrveng.cpp
menucontentsrv/srvsrc/menusvrsuite.cpp
--- a/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpnotificationhandler.h	Tue May 25 13:01:39 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpnotificationhandler.h	Wed Jun 09 10:01:25 2010 +0300
@@ -170,6 +170,13 @@
     TBool CheckRegistryTypeL( const CLiwMap& aMap,
     		const CCPLiwMap& aFilter );
 
+    /**
+     * Appends KDataMap for notification list if needed
+     *
+     * @param aMap Map with notifications
+     */
+    void AppendDataMapL( CLiwDefaultList* aListOfMaps );
+
 private:
     // data
 
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpnotificationhandler.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpnotificationhandler.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -255,6 +255,11 @@
     else
         {
         //notification cannot be sent in this moment
+        //append KDataMap if exists
+        if( iDataMapCache.TypeId() == EVariantTypeDesC8 )
+            {
+            TRAP_IGNORE( AppendDataMapL( aListOfMaps ) );
+            }
         aListOfMaps->IncRef( );
         iNotifications.AppendL( aListOfMaps );
         }
@@ -264,7 +269,6 @@
 //
 // ----------------------------------------------------------------------------
 //
-
 const CLiwGenericParamList* CCPNotificationHandler::GetPointerToChangeInfoList()
     {
     return iChangeInfoList;
@@ -552,3 +556,57 @@
     CleanupStack::PopAndDestroy( &type );
     return result;
     }    
+
+// ----------------------------------------------------------------------------
+//
+// ----------------------------------------------------------------------------
+//
+void CCPNotificationHandler::AppendDataMapL( CLiwDefaultList* aListOfMaps )
+    {
+    CP_DEBUG( _L8("CCPNotificationHandler::SendChangeInfoListL()") );
+    //for every observer in session
+    THashMapIter<TInt32, CCPLiwMap*> iter( iFilters );
+    const CCPLiwMap*const* filter = iter.NextValue( );
+    while( filter )
+        {
+        TInt count = aListOfMaps->Count( );
+        //for every item in the input list
+        for ( TInt j = 0; j < count; j++ )
+            {
+            TLiwVariant variant;
+            variant.PushL( );
+            aListOfMaps->AtL( j, variant );
+            if ( variant.TypeId() == EVariantTypeMap )
+                {
+                const CLiwMap* map = variant.AsMap();
+                if ( IsProperForFilterL( *map, **filter ) )
+                    {
+                    if (iExtendedFlags.FindL(*iter.CurrentKey())
+                            && (iDataMapCache.TypeId() == EVariantTypeDesC8))
+                        {
+                        //extended notifications - append data map
+                        CLiwDefaultMap* extendedMap = CLiwDefaultMap::NewLC();
+                        TInt count = map->Count();
+                        for(TInt i=0; i<count;i++)
+                            {
+                            TLiwVariant temporary;
+                            temporary.PushL();
+                            TBuf8<KMaxKeyLength> key;
+                            map->AtL(i,key);
+                            map->FindL(key, temporary);
+                            extendedMap->InsertL(key,temporary);
+                            CleanupStack::PopAndDestroy(&temporary);
+                            }
+                        extendedMap->InsertL( KDataMap,iDataMapCache );
+                        aListOfMaps->Remove( j );
+                        aListOfMaps->AppendL( TLiwVariant( extendedMap ) );
+                        CleanupStack::PopAndDestroy(extendedMap);
+                        }
+                    }
+
+                }
+            CleanupStack::PopAndDestroy( &variant );
+            }
+        filter = iter.NextValue( );
+        }
+    }
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -339,21 +339,23 @@
     const TLiwGenericParam* param = NULL;
     TInt pos(0);
     param = genericList->FindFirst(pos, KFilters);
-    const CLiwList* maps = param->Value().AsList();
-    CLiwDefaultList* cpMaps = CheckValidityLC(maps);
-    //execute actions
-    for (TInt i = 0; i < cpMaps->Count(); i++)
+    if( param && pos!= KErrNotFound )
         {
-        TLiwVariant mapVariant;
-        mapVariant.PushL();
-        cpMaps->AtL(i, mapVariant);
-        const CCPLiwMap* map =
-                static_cast<const CCPLiwMap*> (mapVariant.AsMap());
-        TRAP_IGNORE(ExecuteActionL(map, ETrue, options));
-        CleanupStack::PopAndDestroy(&mapVariant);
+        const CLiwList* maps = param->Value().AsList();
+        CLiwDefaultList* cpMaps = CheckValidityLC(maps);
+        //execute actions
+        for (TInt i = 0; i < cpMaps->Count(); i++)
+            {
+            TLiwVariant mapVariant;
+            mapVariant.PushL();
+            cpMaps->AtL(i, mapVariant);
+            const CCPLiwMap* map =
+                    static_cast<const CCPLiwMap*> (mapVariant.AsMap());
+            TRAP_IGNORE(ExecuteActionL(map, ETrue, options));
+            CleanupStack::PopAndDestroy(&mapVariant);
+            }
+        CleanupStack::PopAndDestroy(cpMaps);
         }
-
-    CleanupStack::PopAndDestroy(cpMaps);
     CleanupStack::PopAndDestroy(genericList);
     }
 
--- a/contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpsqlitestorage/src/cpstorageengine.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -177,6 +177,8 @@
         iDataMapCache.Reset();
         map->FindL(KDataMap, iDataMapCache);
         iCallback->HandleChangeL( listOfMaps );
+        //data cache must be cleaned here, otherwise it can mess up other requests.
+        iDataMapCache.Reset();
         CleanupStack::PopAndDestroy( listOfMaps ) ;
         }
     else
--- a/group/bld.inf	Tue May 25 13:01:39 2010 +0300
+++ b/group/bld.inf	Wed Jun 09 10:01:25 2010 +0300
@@ -15,10 +15,6 @@
 *
 */
 
-#include <platform_paths.hrh>
-
-PRJ_EXPORTS
-../inc/aisystemuids.hrh              MW_LAYER_PLATFORM_EXPORT_PATH(aisystemuids.hrh)
 
 #include "../xcfw/group/bld.inf"
 #include "../homescreenpluginsrv/group/bld.inf"
Binary file group/robot_patch.zip has changed
--- a/homescreenpluginsrv/hspsmanager/client/hspsclientsession.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/client/hspsclientsession.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -24,6 +24,9 @@
 #include "hspsthemeserver.h"
 #include "hspsclientsession.h"
 
+const TInt KRetryMax = 256;
+const TInt KRetryInterval = 100000; // 100ms
+
 // Standard server startup code
 static TInt StartServer()
     {
@@ -72,28 +75,37 @@
 // -----------------------------------------------------------------------------
 //
 EXPORT_C TInt RhspsClientSession::Connect()
-    {
-    TVersion ver = TVersion(KhspsThemeServerMajorVersionNumber,KhspsThemeServerMinorVersionNumber,
-                                                             KhspsThemeServerBuildVersionNumber);    
-    TInt retry=2;
-    for (;;)
+    {     
+    TVersion ver = TVersion( KhspsThemeServerMajorVersionNumber,
+                             KhspsThemeServerMinorVersionNumber,
+                             KhspsThemeServerBuildVersionNumber);
+    
+    TInt retry = KRetryMax;
+    
+    for(;;)
         {
-        TInt r=CreateSession(KhspsThemeServerName, ver, KDefaultMessageSlots);
+        TInt r = CreateSession( KhspsThemeServerName, ver, KDefaultMessageSlots );
   
-        if (r!=KErrNotFound && r!=KErrServerTerminated)
+        if( r != KErrNotFound && r != KErrServerTerminated )
             {
             return r;
-            }
-        
-        if (--retry==0)
+            }        
+
+        retry--;
+        if( retry == 0 )
             {
             return r;
-            }
+            }        
         
-        r=StartServer();
-        if (r!=KErrNone && r!=KErrAlreadyExists)
+        r = StartServer();
+        if( r != KErrNone && r != KErrAlreadyExists )
             {
             return r;
+            }        
+        
+        if( r == KErrAlreadyExists )
+            {
+            User::After( KRetryInterval );
             }
         }
     }
--- a/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsinstallationhandler.h	Wed Jun 09 10:01:25 2010 +0300
@@ -577,19 +577,23 @@
         /**
          * Finds locale specific subdirectories and resources and appends those
          * into the resource array
+         * 
          * @since S60 5.0
-         * @param aPath is a directory where the locale specific subdirectories exits
+         * @param aPath             is a directory where the locale specific subdirectories exits
+         * @param aProcessOnlyDTD   If ETrue, then only DTD files are processed.
          */
         void AddLocalesL(
-                const TDesC& aPath );
+                const TDesC& aPath,
+                const TBool aProcessOnlyDTD );
         
         /**
-         * Adds localized resources from the provided subdirectory
+         * Adds localized dtd resources from the provided subdirectory
+         * 
          * @since S60 5.0
-         * @param aLanguage is name of the subdirectory
-         * @param aPath is path to the subdirectory where the locale specific resources can be found                  
+         * @param aPath     Path to the subdirectory where the locale specific resources can be found
+         * @param aLanguage Name of the subdirectory                  
          */
-        void AddLocalizedResourcesL(
+        void AddDtdFileL(
                 const TDesC& aPath,
                 const TLanguage aLanguage );
         
@@ -599,17 +603,7 @@
          * @return path to a Xuikon etc folder or an empty string
          */
         TFileName GetInterfacePath();
-                
-        /**
-         * Add DTD files from the HSPS folder.
-         */
-        void AddHspsLocalesV2L(
-                const TDesC& aPath );
-        
-        void AddLocalizedResourcesDTDV2L(
-                const TDesC& aPath,
-                const TLanguage aLanguage );
-        
+                                
         /**
          * Finds all language specific folders and resources  
          * under the interface path in ROM or UDA drive.
--- a/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h	Wed Jun 09 10:01:25 2010 +0300
@@ -138,8 +138,42 @@
         static TPtrC8 FindConfigurationAttrL( 
             const ChspsODT& aOdt,
             const TDesC8& aAttr );
+
+        /**
+         * Removes plug-in resources from the client app.
+         * @since S60 5.2
+         * @param aFilemanager  File manager instance
+         * @param aAppUid       UID of the application configuration 
+         * @param aPluginODT    Plugin configuration
+         */
+        static void RemoveResourceFilesL(        
+                CFileMan& aFilemanager,
+                RFs& aFs,
+                const TInt aAppUid,
+                const ChspsODT& aPluginODT );
         
         /**
+         * Finds language specific resources from a plug-in and handles copying  
+         * of the resources to a destination folder.         
+         * @since S60 5.0
+         * @param aAppODT Application configuration
+         * @param aFs           Reference to OPEN file server session handle.
+         * @param aFilemanager  File manager instance
+         * @param aDeviceLanguage Device language
+         * @param aConfUid      Idenifies the plug-in which is to be processed
+         * @param aDestination  Target path where the files should be copied to
+         * @param aIsRelevant   Set if the source file should be copied without the checks
+         */
+        static TInt CopyResourceFilesL(
+            ChspsODT& aAppODT,
+            RFs& aFs,
+            CFileMan& aFilemanager,
+            const TInt aDeviceLanguage,
+            const TInt aConfUid,
+            const TDesC& aDestination,
+            const TBool aIsRelevant = EFalse );        
+                        
+        /**
          * Copies a file to a target path when neccessary.
          * Target path is created if it's missing.
          * File is copied if the target's size or date are different or 
@@ -149,13 +183,15 @@
          * @param aFilemanager  Referemce to file manager instance
          * @param aTargetPath   Path where the file should be copied to
          * @param aFilename     Path and name of the file to be copied
+         * @param aIsRelevant   Set if the source file should be copied without the checks         
          * @return error code
          */
         static TInt CopyResourceFileL(
                 RFs& aFs,
                 CFileMan& aFilemanager,
                 const TPath& aTargetPath,
-                const TFileName& aSourceFile );
+                const TFileName& aSourceFile,
+                const TBool aIsRelevant = EFalse );
         
         /**
          * Checks:
@@ -473,7 +509,8 @@
                 TFileName& aFilename );
 
         /**
-         * Resolve resource files that need to be copied.
+         * Resolve resource files that need to be copied,
+         * plug-in may not have requested localization.
          * 
          * @since S60 5.1
          * 
@@ -484,7 +521,7 @@
          *                          of resources if any applicable.
          *                          Ownership of given resources is not transferred!
          */
-        static void GetValidResourcesL(
+        static void GetResourcesForLanguageL(
                 ChspsODT& aODT,        
                 const TInt aConfUid,
                 const TLanguage aActiveLanguage,
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h	Wed Jun 09 10:01:25 2010 +0300
@@ -534,6 +534,16 @@
         TInt& aPos );
     
     /**
+     * Erases resource files from plug-in specific subdirectories under
+     * the client's private path.
+	 * Plug-ins that belong to an active application configuration will 
+	 * be processed.
+     * @since S60 5.2
+     * @param aAppODT is an application configuration to be checked	 
+     */
+    void ResetResourcesL( ChspsODT& aAppODT );
+    
+    /**
      * Localizes an ODT.
      * Testing: change first two digits from \epoc32\RELEASE\WINSCW\udeb\
      * Z\resource\BootData\Languages.txt file and reboot the emulator.     
@@ -1028,6 +1038,7 @@
     TBool iHeaderListPending;
            
     RFs iFsSession;
+    CFileMan* iFileMan;
     ChspsDefinitionRepository* iDefinitionRepository;
     CRepository* iCentralRepository;
     ChspsSecurityEnforcer* iSecurityEnforcer;
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserversession.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserversession.h	Wed Jun 09 10:01:25 2010 +0300
@@ -315,21 +315,7 @@
     void FindWidgetUidsL(
         ChspsODT& aAppODT,
         RArray<TInt>& aUidArray );
-    
-    /**
-     * Handles copying of widget resources to a destination folder.
-     * @since S60 5.0.1
-     * @param aAppODT Application configuration
-     * @param aFilemanager File manager
-     * @param aConfUid Widget which is to be processed
-     * @param aDestination Target path where the files should be copied to
-     */
-    TInt DoCopyResourceFilesL(
-        ChspsODT& aAppODT,        
-        CFileMan& aFilemanager,
-        const TInt aConfUid,
-        const TDesC& aDestination );
-    
+            
 private:
     RFs iFs;
     ChspsInstallationHandler* iInstallationHandler;    
--- a/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -520,28 +520,28 @@
 //
 void ChspsInstallationHandler::FinalizeParsingL()
     {               
-    // Check resources
+    // Add resources
     TFileName interfacePath( GetInterfacePath() );       
     if ( interfacePath.Length() )        
-       {
-       // If name of the DTD file was specified in the manifest
-       if ( iDtdFile )
-          { 
-          TParse pathParser;
-          pathParser.Set( iThemeFilePath, NULL, NULL );                               
-          pathParser.PopDir(); // pop locale specific folder
-          
-          // Find locale specific DTD file
-          AddHspsLocalesV2L( pathParser.FullName() );
-          }
-       
-       // Find Xuikon resources of each locale 
-       AddInterfaceResourcesV2L( interfacePath );
+        {
+        // If name of the DTD file was specified in the manifest
+        if ( iDtdFile )
+            { 
+            TParse pathParser;
+            pathParser.Set( iThemeFilePath, NULL, NULL );                               
+            pathParser.PopDir(); // pop locale specific folder
+            
+            // Find locale specific DTD file
+            AddLocalesL( pathParser.FullName(), ETrue );
+            }
+        
+        // Find Xuikon resources of each locale 
+        AddInterfaceResourcesV2L( interfacePath );
        }
     else
        {
        // Find DTD files and locale specific resources from subdirectories under the installation path
-       AddLocalesL( iThemeFilePath );                       
+       AddLocalesL( iThemeFilePath, EFalse );                       
        }       
           
    // Validate other input from the manifest
@@ -2198,126 +2198,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// Finds locale specific subdirectories and DTD resources and appends those
-// into the resource array 
-// Should be executed prior to the CheckHeader method!
-// -----------------------------------------------------------------------------
-//
-void ChspsInstallationHandler::AddHspsLocalesV2L(
-        const TDesC& aPath )
-    {           
-    // Find all locale specific subfolders
-    TFindFile fileFinder( iFsSession );
-    _LIT( KFilter, "*" );
-    CDir* fileList( NULL );    
-    fileFinder.FindWildByDir( KFilter, aPath, fileList );
-    if ( fileList )
-        {
-        CleanupStack::PushL( fileList );
-        TFileName localePath;
-        for( TInt i = 0; i < fileList->Count(); i++ )       
-            {
-            const TEntry& entry = (*fileList)[i];                        
-            if ( entry.IsDir() )
-                {
-                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 
-                    AddLocalizedResourcesDTDV2L( 
-                        localePath,
-                        (TLanguage)languageIndex );
-                    }                                       
-                }
-                        
-            }        
-        CleanupStack::PopAndDestroy( fileList );
-        fileList = NULL;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// Adds localized resources from the provided subdirectory
-// -----------------------------------------------------------------------------
-//
-void ChspsInstallationHandler::AddLocalizedResourcesDTDV2L(
-        const TDesC& aPath,
-        const TLanguage aLanguage )
-    {
-    // Append path with the default name of DTD files
-    const TInt len = aPath.Length() + iDtdFile->Des().Length();
-    HBufC* dtdPath = HBufC::NewLC( len );
-    dtdPath->Des().Copy( aPath );    
-    dtdPath->Des().Append( *iDtdFile );
-        
-    // Check whether the file exists
-    if( !BaflUtils::FileExists( iFsSession, *dtdPath ) )
-        {
-#ifdef HSPS_LOG_ACTIVE  
-        if( iLogBus )
-            {
-            iLogBus->LogText( _L( "ChspsInstallationHandler::AddLocalizedResourcesDTDV2L(): - DTD file was not found '%S'" ),
-                    &dtdPath );
-            }
-#endif            
-        iFileNotFound = ETrue;
-        iResult->iXuikonError = KErrDtdFileNotFound;
-        User::Leave( KErrNotFound );
-        }
-        
-    // Store locale specific DTD files into the resource array
-    TPtrC8 mediaType;
-    TPtrC8 tags;
-    AddResourceL(
-        *iResourceList,
-        *dtdPath,
-        aLanguage,
-        EResourceDTD,
-        mediaType,
-        tags );                                
-    
-    CleanupStack::PopAndDestroy( dtdPath );
-    }
-
-// -----------------------------------------------------------------------------
 // ChspsInstallationHandler::AddInterfaceResourcesV2L
 // -----------------------------------------------------------------------------
 //
@@ -2353,7 +2233,8 @@
 // -----------------------------------------------------------------------------
 //
 void ChspsInstallationHandler::AddLocalesL(
-        const TDesC& aPath )
+        const TDesC& aPath,
+        const TBool aProcessOnlyDTD )
     {
     // Retrieve phone supported language.
     CArrayFixFlat<TInt>* languageCodes = NULL;
@@ -2361,19 +2242,32 @@
     CleanupStack::PushL( languageCodes );     
     
     // Ensure that path contains '\' at the end.
-    TFileName xuikonPath;
-    xuikonPath.Copy( aPath );
-    if( xuikonPath.Length() > KPathDelim().Length() )
+    TFileName pathBase;
+    pathBase.Copy( aPath );
+    if( pathBase.Length() > KPathDelim().Length() )
         {
-        if( xuikonPath.Mid( xuikonPath.Length() -
-                            KPathDelim().Length()
-                            ).Compare( KPathDelim ) != 0 )
+        if( pathBase.Mid( pathBase.Length() -
+                          KPathDelim().Length()
+                         ).Compare( KPathDelim ) != 0 )
             {
-            xuikonPath.Append( KPathDelim );
+            pathBase.Append( KPathDelim );
             }
         }
             
-    _LIT( KFormatting, "%02d" );    
+    TParsePtrC driveParser( pathBase );
+    TInt driveEnum = KErrNotFound;
+    
+    if( !aProcessOnlyDTD )
+        {
+        if( driveParser.DrivePresent() && driveParser.Drive().Length() > 0 )
+            {
+            User::LeaveIfError(
+                    RFs::CharToDrive( ( driveParser.Drive() )[0],
+                            driveEnum ) );
+            }
+        }
+    
+    _LIT( KFormatNN, "%02d" );    
     TFileName localePath;
     
     for( TInt i = 0; i < languageCodes->Count(); i++ )
@@ -2383,8 +2277,15 @@
         // Construct locale path using two digit minium
         // width and zero as padding.
         
-        localePath.Copy( xuikonPath );
-        localePath.AppendFormat( KFormatting, languageCode );        
+        localePath.Copy( pathBase );
+        if( languageCode < 10 )
+            {
+            localePath.AppendFormat( KFormatNN, languageCode );
+            }
+        else
+            {
+            localePath.AppendNum( languageCode );
+            }
         localePath.Append( KPathDelim );
 
         // Check if folder for supported language exists.        
@@ -2395,10 +2296,10 @@
             exists = ETrue;
             }
         
-        // Support also one digit type folder naming.
+        // Support also one digit type folder naming possibly used by the imports.
         if( !exists && languageCode < 10 )
             {
-            localePath.Copy( xuikonPath );
+            localePath.Copy( pathBase );
             localePath.AppendNum( languageCode );        
             localePath.Append( KPathDelim );
             
@@ -2418,12 +2319,24 @@
                 iDefaultSpecification = (TLanguage)languageCode;
                 iDefaultSpecificationSet = ETrue;
                 }                                                            
-        
-        
-            // Find and add localized resources 
-            AddLocalizedResourcesL( 
-                    localePath,
-                    (TLanguage)languageCode );            
+                
+            // Add dtd file if existing.
+            AddDtdFileL( localePath, (TLanguage)languageCode );
+            
+            if( !aProcessOnlyDTD )
+                {
+                // Find localized files from the provided directory
+                RArray<TInt> driveArray;
+                CleanupClosePushL( driveArray );                
+                driveArray.Append( driveEnum );
+                
+                FindResourceFilesL( localePath,
+                                    EFalse,
+                                    driveArray,
+                                    NULL );
+                
+                CleanupStack::PopAndDestroy(); // driveArray
+                }
             }        
         }
     
@@ -2432,13 +2345,13 @@
     }
 
 // -----------------------------------------------------------------------------
-// Adds localized resources from the provided subdirectory
+// Adds localized dtd resources from the provided subdirectory
 // -----------------------------------------------------------------------------
 //
-void ChspsInstallationHandler::AddLocalizedResourcesL(
+void ChspsInstallationHandler::AddDtdFileL(
         const TDesC& aPath,
         const TLanguage aLanguage )
-    {
+    {    
     // If FileDTD was declared
     if ( iDtdFile && iDtdFile->Des().Length() )
         {    
@@ -2475,17 +2388,7 @@
             tagsPtr );
         
         CleanupStack::PopAndDestroy( dtdPath );
-        }
-    
-    // Find localized files from the provided directory
-    RArray<TInt> driveArray;
-    CleanupClosePushL( driveArray );   
-    driveArray.Append( EDriveE );
-    driveArray.Append( EDriveC );
-        
-    FindResourceFilesL( aPath, EFalse, driveArray, NULL );
-    
-    CleanupStack::PopAndDestroy(); // driveArray        
+        }          
     }
 
 // -----------------------------------------------------------------------------
--- a/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -37,6 +37,7 @@
 _LIT( KThemesFolder, "\\themes\\" );
 _LIT( KDoubleBackSlash, "\\" );
 _LIT8( KHexPrefix8, "0x" );
+_LIT( KClientSources, "c:\\private\\%x\\%D\\%D\\%D\\%S\\sources\\%S" );
 
 // -----------------------------------------------------------------------------
 // hspsServerUtil::GenerateConfigurationAttributesL
@@ -558,6 +559,110 @@
     }    
 
 // -----------------------------------------------------------------------------
+// hspsServerUtil::RemoveResourceFilesL
+// -----------------------------------------------------------------------------
+void hspsServerUtil::RemoveResourceFilesL(        
+        CFileMan& aFilemanager,
+        RFs& aFs,
+        const TInt aAppUid,
+        const ChspsODT& aPluginODT )
+    {                           
+    // Remove all plug-in resources
+    for( TInt i=0; i< aPluginODT.ResourceCount(); i++ )
+        {
+        ChspsResource& r = aPluginODT.ResourceL( i );       
+        if( r.FileName().Find( KSourcesFolder ) > 0 )
+            {      
+            TPtrC id( GetFixedOdtName( r.ResourceId() ) );
+            const TDesC& ver( aPluginODT.ThemeVersion() );
+            TFileName resource;
+            resource.Format( 
+                    KClientSources,
+                    aAppUid,
+                    aPluginODT.RootUid(),
+                    aPluginODT.ProviderUid(),
+                    aPluginODT.ThemeUid(),
+                    &ver,
+                    &id );
+            if( BaflUtils::FileExists( aFs, resource ) )
+                {
+                aFilemanager.Delete( resource, 0 );
+                }            
+            }
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// hspsServerUtil::CopyResourceFilesL
+// -----------------------------------------------------------------------------
+TInt hspsServerUtil::CopyResourceFilesL(
+        ChspsODT& aAppODT,
+        RFs& aFs,
+        CFileMan& aFilemanager,
+        const TInt aDeviceLanguage,
+        const TInt aConfUid,
+        const TDesC& aDestination,
+        const TBool aIsRelevant )
+    {
+    TInt error( KErrNone );
+    RPointerArray<ChspsResource> widgetResources; // Objects are not owned.
+    CleanupClosePushL( widgetResources );
+    
+    // Find resources for the language or common to all languages or test resources    
+    // if others couldn't be found
+    GetResourcesForLanguageL( 
+        aAppODT,
+        aConfUid,
+        (TLanguage)aDeviceLanguage,
+        widgetResources );
+        
+    // Copy the resources found    
+    for( TInt i = 0; ( i < widgetResources.Count() && !error ); i++ )
+        {      
+        ChspsResource* resource = widgetResources[i];
+        if( !resource )
+            {
+            continue;
+            }
+                
+        // Get relative path under the themes folder 
+        TPath relativePath;
+        GetRelativeResourcePath( 
+                resource->FileName(),
+                relativePath );
+        
+        // Strip language indicator from the relative path                                       
+        GetLocaleIndependentResourcePath( 
+                resource->Language(),                            
+                relativePath );   
+        
+        // Finalize target path
+        TPath targetPath;
+        targetPath.Copy( aDestination );
+        targetPath.Append( relativePath );        
+             
+        // Create target path and copy files when required
+        error = CopyResourceFileL(
+                aFs,
+                aFilemanager, 
+                targetPath,
+                resource->FileName(),
+                aIsRelevant );        
+        if ( error == KErrAlreadyExists )
+            {
+            error = KErrNone;
+            }
+        
+        } // copy loop       
+        
+    widgetResources.Reset();
+    CleanupStack::PopAndDestroy( 1, &widgetResources );
+
+    return error;
+    }  
+
+// -----------------------------------------------------------------------------
 // hspsServerUtil::CopyResourceFileL
 // -----------------------------------------------------------------------------
 //
@@ -565,7 +670,8 @@
         RFs& aFs,
         CFileMan& aFilemanager,
         const TPath& aTargetPath,
-        const TFileName& aSourceFile )
+        const TFileName& aSourceFile,
+        const TBool aIsRelevant )
     {
     // Construct target file with full path.
     TFileName targetFile;
@@ -587,10 +693,11 @@
 
     TInt error = KErrNone;
     
-    if ( hspsServerUtil::ResourceCopyIsRelevantL( 
-            aSourceFile,
-            targetFile,
-            aFs ) 
+    if ( aIsRelevant 
+            || hspsServerUtil::ResourceCopyIsRelevantL( 
+                aSourceFile,
+                targetFile,
+                aFs ) 
         )
         {
         // Make target folder
@@ -616,7 +723,17 @@
                 aTargetPath,
                 0,
                 KEntryAttReadOnly,
-                TTime( 0 ) ); // TTime(0) = preserve original time stamp.                                                                      
+                TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+                        
+#ifdef HSPS_LOG_ACTIVE
+            if ( iLogBus )
+                {
+                iLogBus->LogText( 
+                        _L( "hspsServerUtil::CopyResourceFileL(): - %S was copied" ), 
+                        &aTargetPath 
+                        );
+                } 
+#endif            
             }        
         }                
     
@@ -1702,9 +1819,9 @@
     }
 
 // -----------------------------------------------------------------------------
-// hspsServerUtil::GetValidResourcesL
+// hspsServerUtil::GetResourcesForLanguageL
 // -----------------------------------------------------------------------------
-void hspsServerUtil::GetValidResourcesL(
+void hspsServerUtil::GetResourcesForLanguageL(
         ChspsODT& aODT,        
         const TInt aConfUid,
         const TLanguage aActiveLanguage,
@@ -1780,7 +1897,8 @@
     RPointerArray<ChspsResource> widgetResources; // Objects are not owned.
     CleanupClosePushL( widgetResources );
     
-    GetValidResourcesL( aODT,
+    GetResourcesForLanguageL( 
+        aODT,
         aODT.ThemeUid(),
         aActiveLanguage,
         widgetResources );
@@ -2049,6 +2167,9 @@
         } // driveIndex    
     }
 
+// -----------------------------------------------------------------------------
+// hspsServerUtil::GetInstalledLanguagesL
+// -----------------------------------------------------------------------------
 void hspsServerUtil::GetInstalledLanguagesL(
         CArrayFixFlat<TInt>*& aLanguages )
     {
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -75,6 +75,8 @@
 // prevent ROM installation on every boot up
 _LIT( KDummyVersionInfo, "dummyversioninfo" );
 
+_LIT( KProcessFindString, "hspsthemeserver*" ); 
+
 const TUint KAppId_hspsAS =  270486738; //  0x101F4CD2 from S60 3.1 Xuikon AppShell in 3.1 product.
 const TUint KAppId_hspsAI =  271012080 ; // 0x102750F0 support for Xuikon-based ActiveIdle 
 const TUint KAppId_LE =    270551469 ; // 0x102049AD LayoutTest
@@ -177,7 +179,20 @@
 // -----------------------------------------------------------------------------
 //
 TInt E32Main()
-    {
+    {                   
+    TFindProcess processFinder( KProcessFindString );
+    TFullName fullName;
+    TInt count = 0;
+    while( processFinder.Next( fullName ) == KErrNone )
+        {
+        count++;
+        }
+    if( count > 1 )
+        {
+        return KErrAlreadyExists;
+        }
+    fullName = KNullDesC();
+    
     RAllocator* iAllocator = MemoryManager::SwitchToFastAllocator();
     
     __UHEAP_MARK;
@@ -333,11 +348,7 @@
     
     // Find header files from the Plug-in Repository
 	UpdateHeaderListCacheL();  
-    
-    // Adds the server with the specified name to the active scheduler, and issues the 
-    // first request for messages, and leaves if the operation fails
-    StartL( KhspsThemeServerName );
-    
+       
     // Initialize remove index
     iThemeIndexToRemove = KErrNotFound;
                            
@@ -386,6 +397,10 @@
     iShutdown = CShutdown::NewL( *this );
 #endif // _hsps_SERVER_SHUTDOWN_ENABLED_
     
+    // Adds the server with the specified name to the active scheduler, and issues the 
+    // first request for messages, and leaves if the operation fails
+    StartL( KhspsThemeServerName );
+        
 #ifdef HSPS_LOG_ACTIVE	
     iLogBus->LogText( _L( "hspsThemeServer: server fully constructed" ) );
     iLogBus->LogText( _L( "--------------------------------------------------------" ) );
@@ -436,6 +451,7 @@
     iLogBus->LogText( _L( "hspsThemeServer: server is shutting down" ) );
 #endif    
             
+    delete iFileMan;
     if( iDefinitionRepository )
         {
         iDefinitionRepository->UnregisterObserver( *this );
@@ -482,7 +498,7 @@
     delete iBRHandler;
 
     iCacheMask = NULL;
-    
+        
     iFsSession.Close();    
     }
 
@@ -1456,6 +1472,12 @@
                     {
                     started = ETrue;
                     }
+                else
+                    {
+                    delete iInstalledSisxThemes[ iThemeIndexToRemove ];
+                    iInstalledSisxThemes[ iThemeIndexToRemove ] = NULL;
+                    iInstalledSisxThemes.Remove( iThemeIndexToRemove );
+                    }
                 }
             }
             break;
@@ -2142,16 +2164,13 @@
 #ifdef HSPS_LOG_ACTIVE          
         iLogBus->LogText( _L( "ChspsThemeServer::HandleLanguageChangeL()") );
 #endif
-        
-	// Set key for fetching previously used language from the cenrep
-	const TInt KCenrepLangKey = 100000001;
-	
+        	
 	// The key should already exist
 	const TUint32 fullMask = 0xFFFFFFFF;
 	RArray<TUint32> res;	
 	CleanupClosePushL( res );
 	
-	iCentralRepository->FindL( KCenrepLangKey, fullMask, res );
+	iCentralRepository->FindL( KCenrepKeyLang, fullMask, res );
    	if ( res.Count() == 0 )
    		{
 #ifdef HSPS_LOG_ACTIVE   		
@@ -2163,16 +2182,18 @@
 	
    	// Check the cenrep key's value
 	TInt prevLanguage = ELangNone;
-    iCentralRepository->Get( KCenrepLangKey, prevLanguage );
+    iCentralRepository->Get( KCenrepKeyLang, prevLanguage );
     
     // If the language has been changed
     if( iDeviceLanguage != prevLanguage )
     	{
     	// Update all the ODTs so that the localized configurations can be fetched    	
     	LocalizeConfigurationsL();
+    	
+    	UpdateHeaderListCacheL();
     		
     	// Finally, update the cenrep with the new language
-    	TInt errorCode = iCentralRepository->Set( KCenrepLangKey, iDeviceLanguage );
+    	TInt errorCode = iCentralRepository->Set( KCenrepKeyLang, iDeviceLanguage );
     	if ( errorCode  )
     		{
 #ifdef HSPS_LOG_ACTIVE    		
@@ -2257,6 +2278,57 @@
 	}
 
 // -----------------------------------------------------------------------------
+// ChspsThemeServer::ResetResourcesL()
+// -----------------------------------------------------------------------------
+//
+void ChspsThemeServer::ResetResourcesL(
+        ChspsODT& aAppODT )
+    {
+    // If active configuration
+    TInt confUid = -1;
+    iCentralRepository->Get( aAppODT.RootUid(), confUid );        
+    if( confUid == aAppODT.ThemeUid() )
+        {
+        if( !iFileMan )
+            {
+            iFileMan= CFileMan::NewL( iFsSession );
+            }
+                        
+        // Find unique plug-in UIDs from the app configuration
+        RArray<TInt> uidArray;
+        CleanupClosePushL( uidArray );
+        hspsServerUtil::FindUniquePluginsL( aAppODT, uidArray );
+        
+        // Remove old copies from the client path, localized copies will be  
+        // restored when the app configuration is fetched again        
+        for( TInt i=0; i < uidArray.Count(); i++ )
+            {                    
+            ChspsODT* pluginODT = ChspsODT::NewL();
+            CleanupStack::PushL( pluginODT );
+            
+            GetConfigurationL(
+                0, 
+                uidArray[i],
+                *pluginODT );
+            
+            if( pluginODT->ThemeUid() )
+                {
+                hspsServerUtil::RemoveResourceFilesL(                               
+                    *iFileMan,
+                    iFsSession,
+                    aAppODT.RootUid(),
+                    *pluginODT );
+                }
+            
+            CleanupStack::PopAndDestroy();            
+            }
+        
+        uidArray.Reset();
+        CleanupStack::PopAndDestroy( &uidArray );             
+        }
+    }
+
+// -----------------------------------------------------------------------------
 // ChspsThemeServer::LocalizeL()
 // -----------------------------------------------------------------------------
 //
@@ -2286,6 +2358,8 @@
     	            aEngine, 
     	            aOdt,
     	            requestedLanguage );
+    	                            
+            ResetResourcesL( aOdt );
     	    }
     	else
     	    {	    
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -796,81 +796,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// ChspsThemeServerSession::DoCopyResourceFilesL
-// -----------------------------------------------------------------------------
-TInt ChspsThemeServerSession::DoCopyResourceFilesL(
-        ChspsODT& aAppODT,        
-        CFileMan& aFilemanager,
-        const TInt aConfUid,
-        const TDesC& aDestination )
-    {
-    TInt error( KErrNone );
-    RPointerArray<ChspsResource> widgetResources; // Objects are not owned.
-    CleanupClosePushL( widgetResources );
-    
-    // Get resources that need to be copied.
-    hspsServerUtil::GetValidResourcesL( aAppODT,
-            aConfUid,
-            Server().DeviceLanguage(),
-            widgetResources );
-        
-    // Copy the resources found    
-    for( TInt i = 0; ( i < widgetResources.Count() && !error ); i++ )
-        {      
-        ChspsResource* resource = widgetResources[i];
-        if( !resource )
-            {
-            continue;
-            }
-                
-        // Get relative path under the themes folder 
-        TPath relativePath;
-        hspsServerUtil::GetRelativeResourcePath( 
-                resource->FileName(),
-                relativePath );
-        
-        // Strip language indicator from the relative path                                       
-        hspsServerUtil::GetLocaleIndependentResourcePath( 
-                resource->Language(),                            
-                relativePath );   
-        
-        // Finalize target path
-        TPath targetPath;
-        targetPath.Copy( aDestination );
-        targetPath.Append( relativePath );        
-             
-        // Create missing target path and copy files when needed only
-        error = hspsServerUtil::CopyResourceFileL(
-                iFs,
-                aFilemanager, 
-                targetPath,
-                resource->FileName() );
-        if ( !error )
-            {
-#ifdef HSPS_LOG_ACTIVE
-            if ( iLogBus )
-                {
-                iLogBus->LogText( 
-                        _L( "hspsServerUtil::DoCopyResourceFilesL(): - %S was copied" ), 
-                        &targetPath 
-                        );
-                } 
-#endif
-            }
-        if ( error == KErrAlreadyExists )
-            {
-            error = KErrNone;
-            }
-        
-        } // copy loop       
-        
-    widgetResources.Reset();
-    CleanupStack::PopAndDestroy( 1, &widgetResources );
-
-    return error;
-    }
-
-// -----------------------------------------------------------------------------
 // ChspsThemeServerSession::CopyResourceFilesL
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
@@ -918,31 +843,33 @@
  		{
  		phaseCounter++;
  		 		
-        RArray<TInt> widgetArray;
-        CleanupClosePushL( widgetArray );
+        RArray<TInt> uidArray;
+        CleanupClosePushL( uidArray );
         
         // Find unique configuration UIDs from the resource array
-        FindWidgetUidsL( *odt, widgetArray );
+        FindWidgetUidsL( *odt, uidArray );
  		        
         CFileMan* fileManager = NULL;
  		fileManager = CFileMan::NewL( iFs );
  		CleanupStack::PushL( fileManager );
  		                        
         // Loop widgets belonging to the root configuration
-        const TInt uidCount = widgetArray.Count();
+        const TInt uidCount = uidArray.Count();        
 	    for( TInt i = 0; i < uidCount && !error; i++ )
 	    	{	    		    	
 	    	// Copy widget's resources to client's private folder	    	
-	    	error = DoCopyResourceFilesL(
-                        *odt,
-                        *fileManager, 
-                        widgetArray[i],
-                        destinationPath );	    
+	    	error = hspsServerUtil::CopyResourceFilesL(
+                    *odt,
+                    iFs,
+                    *fileManager,
+                    Server().DeviceLanguage(),                     
+                    uidArray[i],
+                    destinationPath );	    
     		}
 	    
-	    widgetArray.Reset();
+	    uidArray.Reset();
 	    
-	    CleanupStack::PopAndDestroy( 2, &widgetArray ); // fileManager, widgetArray    	           
+	    CleanupStack::PopAndDestroy( 2, &uidArray ); // fileManager, uidArray    	           
  		} // KErrNone
  	
  	//Tidy-up
--- a/homescreensrv_plat/hs_widget_publisher_api/inc/hsdataobserver.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/inc/hsdataobserver.h	Wed Jun 09 10:01:25 2010 +0300
@@ -58,7 +58,8 @@
 	    EActivate   = 1, ///< Activation event: Means that widget has been added to HS as content.
 	    EDeactivate = 2, ///< Deactivation event: Means that widget has been removed frm.
 	    ESuspend    = 3, ///< Suspension event: Means that HS reading widget data is suspended.
-	    EResume     = 4  ///< Resume event. Means that HS reading widget data is resumed.
+	    EResume     = 4,  ///< Resume event. Means that HS reading widget data is resumed.
+	    EPluginshutdown = 5 ///< Plugin Shutdown event. Means widget is removed from HS.
 	    };
     
 	/**
--- a/homescreensrv_plat/hs_widget_publisher_api/inc/hsglobals.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/inc/hsglobals.h	Wed Jun 09 10:01:25 2010 +0300
@@ -80,6 +80,8 @@
 
 _LIT8( KActive, "active" );
 _LIT8( KDeActive, "deactive" );
+_LIT8( KPluginshutdown, "pluginshutdown");
+
 _LIT8( KSuspend, "suspend" );
 _LIT8( KResume, "resume" );
 _LIT8( KSelected, "selected" );
--- a/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetitem.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetitem.h	Wed Jun 09 10:01:25 2010 +0300
@@ -62,13 +62,21 @@
     /**
      */
     bool isStringValue();
-
+    
+    /**
+     */
+    void triggerAdded();
+    
+    /**
+     */
+    bool isTriggerAdded();
     
 private:
     std::string mItemName;
     std::string mItemString;
     int 		mItemInt;
     bool 		mIsString;
+    bool        mTrigger;
     };
 }
 
--- a/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetpublisherimpl.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetpublisherimpl.h	Wed Jun 09 10:01:25 2010 +0300
@@ -33,6 +33,7 @@
 namespace Hs {
 
 class HsWidget;
+class HsWidgetItem;
 
 typedef std::map<std::string, std::wstring> WidgetContentIdMapType;
 
@@ -137,8 +138,8 @@
 
     /**
      */
-    int HandleWidgetActionL( const TDesC8& aActionDes,
-        HsWidget& aWidget );
+    void HandleWidgetActionL( const TDesC8& aActionDes,
+            const TDesC& aContentIdDes, HsWidget& aWidget );
 
     /**
      */
@@ -172,6 +173,11 @@
     
     /**
      */
+    void InsertWidgetDataIdentifiersL( HsWidget& aWidget, 
+            CLiwDefaultMap* aDataMap, const TDesC& aContentType );
+    
+    /**
+     */
     void InsertWidgetInfoL( HsWidget& aWidget, 
 		CLiwDefaultMap* aDataMap );
     
@@ -190,8 +196,7 @@
     
     /**
      */    
-    void InsertItemsTriggersL( HsWidget& aWidget,
-    	CLiwDefaultMap* aTriggerMap );
+    void AddItemsActionsL( HsWidget& aWidgetItem, TInt aItemIndex  );
 
     /**
      */     
--- a/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetitem.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -25,7 +25,9 @@
 // ---------------------------------------------------------------------------
 //
 HsWidgetItem::HsWidgetItem(std::string& aItemName, std::string& aValue):
-	mItemName(aItemName), mItemString(aValue), mItemInt(0), mIsString(true)
+	mItemName(aItemName), mItemString(aValue), mItemInt(0), 
+	mIsString(true),mTrigger(false)
+	
 	{
 	}
 
@@ -102,5 +104,20 @@
 	return mIsString;
 	}
 
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void HsWidgetItem::triggerAdded()
+    {
+    mTrigger = true;
+    }
 
-
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+bool HsWidgetItem::isTriggerAdded()
+    {
+    return mTrigger;
+    }
--- a/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -96,8 +96,8 @@
 	mWidgets.push_back( widget);
 	TInt err( KErrNone );
 	TRAP( err, 
+	    RegisterNotificationL( *widget );
 		PublishWidgetActionsL( *widget );
-        RegisterNotificationL( *widget );
 		)
 	if( err != KErrNone )
 		{
@@ -139,11 +139,7 @@
              if ( changeMapsList->AtL(index, variant) ) 
             	 {
                  const CLiwMap* map  = variant.AsMap();
-                 HsWidget* widget = GetWidgetL( map );
-                 if( !widget )
-                	 {
-                	 break;
-                	 }
+                 variant.Reset();
                  if ( map->FindL(KOperation, variant) )
                      {// Check what triggered a notification
                      variant.Get(operation);
@@ -155,11 +151,19 @@
 						 {
 						 variant.Get(trigger );
 						 }
-                	 if( !HandleWidgetActionL( trigger, *widget ) )
-                		 {
-                		 break;
-                		 }
-                	 HandleWidgetItemActionL( trigger, *widget );
+                     HsWidget* widget = GetWidgetL( map );
+                     if( !widget )
+                         {
+                         break;
+                         }
+                      variant.Reset();
+                      if ( !map->FindL( KContentId, variant ) )
+                           {
+                           User::Leave( KErrNotFound );
+                           }
+                	  HandleWidgetActionL( trigger, variant.AsDes(), *widget );
+                	  HandleWidgetItemActionL( trigger, *widget );
+                	  variant.Reset();
                 	 }
                  }
             }
@@ -172,12 +176,39 @@
 // 
 // ---------------------------------------------------------------------------
 //
-int HsWidgetPublisherImpl::HandleWidgetActionL( const TDesC8& aActionDes,
-	HsWidget& aWidget )
+void HsWidgetPublisherImpl::HandleWidgetActionL( const TDesC8& aActionDes, 
+        const TDesC& aContentIdDes, HsWidget& aWidget )
 	{
-	int ret( 1 );//not found
 	IHsDataObserver::EEvent action( IHsDataObserver::EUnknown );
 	TranslateObserverAction( aActionDes, action );
+	switch( action )
+	    {
+	    case IHsDataObserver::EActivate:
+	        {
+            // add / update the Instance Id
+            std::wstring contentId( ToWideStringL( aContentIdDes ) );
+            mWidgetContentIds[aWidget.getIdentifier()] = contentId;  
+	        };
+            break;
+	    case IHsDataObserver::EDeactivate:
+	        {
+	        mWidgetContentIds.erase( aWidget.getIdentifier() );
+	        };
+            break;
+	    case IHsDataObserver::EPluginshutdown:
+	        {
+	        // remove widget data when widget removed from screen
+            CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+            InsertWidgetDataIdentifiersL( aWidget, cpdatamap );
+            // removal may fail if the client has already removed the data
+            TRAP_IGNORE( RemoveFromCpsL( cpdatamap, KCpData ) );
+            CleanupStack::PopAndDestroy( cpdatamap );
+	        };
+            break;
+	    default :
+	        break;
+	    };
+	
 	if( action == IHsDataObserver::EActivate ||
 		action == IHsDataObserver::EDeactivate ||
 		action == IHsDataObserver::EResume ||
@@ -193,22 +224,8 @@
 			{
 			observerError = exception.getReason();
 			}
-		
-		if ( action == IHsDataObserver::EDeactivate )
-		    {
-		    // remove widget data when widget removed from screen
-		    CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
-		    InsertWidgetDataIdentifiersL( aWidget, cpdatamap );
-		    // removal may fail if the client has already removed the data
-		    TRAP_IGNORE( RemoveFromCpsL( cpdatamap, KCpData ) );
-		    mWidgetContentIds.erase( aWidget.getIdentifier() );
-		    CleanupStack::PopAndDestroy( cpdatamap );
-		    }
-		
 		User::LeaveIfError( observerError );
-		ret = 0;
 		}
-	return ret;
 	}
 
 // ---------------------------------------------------------------------------
@@ -222,6 +239,10 @@
 		{
 		aAction = IHsDataObserver::EActivate;
 		}
+	if( !aActionDes.Compare( KPluginshutdown() ) )
+        {
+        aAction = IHsDataObserver::EPluginshutdown;
+        }
 	if( !aActionDes.Compare( KDeActive() ) )
 		{
 		aAction = IHsDataObserver::EDeactivate;
@@ -426,16 +447,8 @@
 	cpdatamap->InsertL( KDataMap, TLiwVariant( datamap ) );
 	InsertWidgetACLL( cpdatamap );
 	
-	int count = aWidget.itemsCount();
-	if( count > 0 )
-		{
-		CLiwDefaultMap* triggermap = CLiwDefaultMap::NewLC();
-		InsertItemsTriggersL( aWidget, triggermap );
-		cpdatamap->InsertL( KActionMap, TLiwVariant( triggermap ) );
-		CleanupStack::PopAndDestroy( triggermap );
-		}
-
-        // add to CPS
+	
+    // add to CPS
 	TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));	    
 	inParam->AppendL( item );
 	mServiceInterface->ExecuteCmdL( KAdd,
@@ -450,6 +463,15 @@
 	outParam->Reset();
 	inParam->Reset();
 	User::LeaveIfError( ret );
+    
+    int count = aWidget.itemsCount();
+    for ( TInt itemIndex = 0; itemIndex< count; itemIndex++)
+        {
+        if ( ! aWidget.getWidgetItem(itemIndex)->isTriggerAdded() )
+            {
+            AddItemsActionsL( aWidget, itemIndex );
+            }
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -666,32 +688,14 @@
     std::string strIdentifier( GetWidgetIdentifierFromPublisherNameL(
             *publisherName ) );
     CleanupStack::PopAndDestroy( publisherName );
-    publisherName = 0;
+    CleanupStack::PopAndDestroy( &variant );
     
-	TBuf<KSAPIContentNameMaxLength> contentIdDesc;
-    if ( !aMap->FindL( KContentId, variant ) )
-         {
-         User::Leave( KErrNotFound );
-         }
-    variant.Get( contentIdDesc );
-    CleanupStack::PopAndDestroy( &variant );
-    std::wstring contentId( ToWideStringL( contentIdDesc ) );
-	
 	std::string strTemplate;
 	std::string strWidgetName;
-		
 	if( CheckIfWidgetExist(strTemplate, strWidgetName, strIdentifier, ETrue) )
 		{
 		ret = &GetWidget( strTemplate, strWidgetName, strIdentifier);
-		
-		// verify that content id does not change
-		__ASSERT_DEBUG( !mWidgetContentIds.count( ret->getIdentifier() ) ||
-		        mWidgetContentIds[ret->getIdentifier()] == contentId,
-		        User::Invariant() );
-
-		mWidgetContentIds[ret->getIdentifier()] = contentId;
 		}
-	
 	return ret;
 	}
 
@@ -774,7 +778,17 @@
 // ---------------------------------------------------------------------------
 //
 void HsWidgetPublisherImpl::InsertWidgetDataIdentifiersL( HsWidget& aWidget,
-	CLiwDefaultMap* aDataMap )
+    CLiwDefaultMap* aDataMap )
+    {
+    InsertWidgetDataIdentifiersL( aWidget, aDataMap, KAll );
+    }
+	
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void HsWidgetPublisherImpl::InsertWidgetDataIdentifiersL( HsWidget& aWidget,
+	CLiwDefaultMap* aDataMap, const TDesC& aContentType )
     {
     WidgetContentIdMapType::const_iterator contentIdIter =
             mWidgetContentIds.find( aWidget.getIdentifier() );
@@ -788,7 +802,7 @@
     HBufC* publisherName = StdStringToUnicodeLC( GetPublisherNameL( aWidget ) );
     
     aDataMap->InsertL( KPublisherId, TLiwVariant( *publisherName ) );
-    aDataMap->InsertL( KContentType, TLiwVariant( KAll ) );
+    aDataMap->InsertL( KContentType, TLiwVariant( aContentType ) );
     aDataMap->InsertL( KContentId, TLiwVariant( contentId ) );
     
     CleanupStack::PopAndDestroy( publisherName );
@@ -938,29 +952,56 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void HsWidgetPublisherImpl::InsertItemsTriggersL( HsWidget& aWidget,
-	CLiwDefaultMap* aTriggerMap )
+void HsWidgetPublisherImpl::AddItemsActionsL(HsWidget& aWidget, TInt aItemIndex )
 	{
-	int count = aWidget.itemsCount();
-	CLiwDefaultMap* activateAction = CLiwDefaultMap::NewLC();
-	activateAction->InsertL( KPluginId, TLiwVariant( KCASpaAppLauncherPlugin ) );
-	
+    HsWidgetItem* widgetItem = aWidget.getWidgetItem(aItemIndex);
+    TPtrC8 itemName = ((TUint8*)widgetItem->getItemName().c_str());
+    
+    CLiwGenericParamList* inParam = &(mServiceHandler->InParamListL());
+    CLiwGenericParamList* outParam = &(mServiceHandler->OutParamListL());
+        
+
+    TLiwGenericParam type(KType, TLiwVariant(KCpData));
+    inParam->AppendL(type);
+    
+    CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
+    HBufC* itemName16 = Utf8ToUnicodeLC(itemName );
+    InsertWidgetDataIdentifiersL( aWidget, cpdatamap, itemName16->Des() );
+    CleanupStack::PopAndDestroy( itemName16 );
+    
+    CLiwDefaultMap* mapAction = CLiwDefaultMap::NewLC();
+    CLiwDefaultMap* activateAction = CLiwDefaultMap::NewLC();
 	CLiwDefaultMap* activate = CLiwDefaultMap::NewLC();
 	activate->InsertL( KType, TLiwVariant( KActionValueLaunchApplication ) );
 	activate->InsertL( KLaunchMethod, TLiwVariant( KLaunchMethodValueCmdLine ) );
 	activate->InsertL( KApplicationUid, TLiwVariant( iWidgetUid ) );
 	activate->InsertL( KApaCommand, TLiwVariant( KApaCommandBackground ) );
-	
+
+	activateAction->InsertL( KPluginId, TLiwVariant( KCASpaAppLauncherPlugin ) );
 	activateAction->InsertL( KData, TLiwVariant( activate ) );
-	
-	for (int index = 0; index < count; index++)
-		{
-		HsWidgetItem* const item = aWidget.getWidgetItem( index );
-		TPtrC8 itemName = ((TUint8*)item->getItemName().c_str());
-		aTriggerMap->InsertL( itemName, TLiwVariant( activateAction ));
-		}
 	CleanupStack::PopAndDestroy( activate );
-	CleanupStack::PopAndDestroy( activateAction );
+    
+    mapAction->InsertL(itemName, TLiwVariant( activateAction ));
+    CleanupStack::PopAndDestroy( activateAction );
+    cpdatamap->InsertL( KActionMap, TLiwVariant( mapAction ) );
+    CleanupStack::PopAndDestroy( mapAction );
+    
+    InsertWidgetACLL( cpdatamap );
+    
+    TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));        
+    inParam->AppendL( item );
+        
+    mServiceInterface->ExecuteCmdL( KAdd, *inParam, *outParam );
+    TInt ret= ObtainErrorCode( *outParam );
+    
+    CleanupStack::PopAndDestroy( cpdatamap );
+    item.Reset();
+    type.Reset();
+    outParam->Reset();
+    inParam->Reset();
+    User::LeaveIfError( ret );
+    
+    widgetItem->triggerAdded();
 	}
 
 // ---------------------------------------------------------------------------
--- a/homescreensrv_plat/idlefw_api/group/bld.inf	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/idlefw_api/group/bld.inf	Wed Jun 09 10:01:25 2010 +0300
@@ -22,6 +22,7 @@
 DEFAULT
 
 PRJ_EXPORTS
+../inc/aisystemuids.hrh          MW_LAYER_PLATFORM_EXPORT_PATH(aisystemuids.hrh)
 ../inc/aiuicontrolleruid.hrh     MW_LAYER_PLATFORM_EXPORT_PATH(aiuicontrolleruid.hrh)
 ../inc/aiconsts.h                MW_LAYER_PLATFORM_EXPORT_PATH(aiconsts.h)
 ../inc/aifweventhandler.h        MW_LAYER_PLATFORM_EXPORT_PATH(aifweventhandler.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/idlefw_api/inc/aisystemuids.hrh	Wed Jun 09 10:01:25 2010 +0300
@@ -0,0 +1,154 @@
+/*
+* Copyright (c) 2005-2006 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:  UIDs for the Active Idle subsystem components.
+*
+*/
+
+
+#ifndef AISYSTEMUIDS_HRH
+#define AISYSTEMUIDS_HRH
+
+/**
+ * AI3 Test Application.
+ */
+#define AI3_UID_EXE_TEST_APPLICATION 0x2001CB4F
+
+/**
+ * Ecom implementation uid for XML UI controller.
+ */
+#define AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML 0x2001952C
+#define AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML 0x102750F2
+
+/**
+ * Ecom implementation uid for native UI controller.
+ */
+#define AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE 0x2001952E
+#define AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE 0x102750F4
+
+/**
+ * Ecom implementation uid for Device Status plugin.
+ */
+#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN 0x102750F8
+
+/**
+ * Ecom implementation uid for Device Status plugin.
+ */
+#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SHORTCUTPLUGIN 0x102750FA
+
+/**
+ * Ecom implementation uid for AI Profile plug-in.
+ */
+#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PROFILEPLUGIN 0x10275101
+
+/**
+ * Ecom implementation uid for sat plugin.
+ */
+#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN 0x102078EB
+
+/**
+ * Ecom dll uid for XML UI controller.
+ */
+#define AI3_UID_ECOM_DLL_UICONTROLLER_XML 0x2001952A
+#define AI_UID_ECOM_DLL_UICONTROLLER_XML 0x102750F1
+
+
+/**
+ * Ecom dll uid for native UI controller.
+ */
+#define AI3_UID_ECOM_DLL_UICONTROLLER_NATIVE 0x2001952D
+#define AI_UID_ECOM_DLL_UICONTROLLER_NATIVE 0x102750F3
+
+/**
+ * Ecom dll uid for device status plugin.
+ */
+#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_DEVSTAPLUGIN 0x102750F7
+
+/**
+ * Common UID3 for Active Idle framework components.
+ */
+#define AI_UID3_AIFW_COMMON 0x102750F0
+
+/**
+ * Uid3 for AI framework dll.
+ */
+#define AI_UID3_AIFW_DLL AI_UID3_AIFW_COMMON
+
+/**
+ * Uid3 for AI framework launcher exe.
+ */
+#define AI_UID3_AIFW_EXE AI_UID3_AIFW_COMMON
+
+/**
+ * SID for aifw launcher exe.
+ */
+#define AI_SID_AIFW_EXE AI_UID3_AIFW_EXE
+
+/**
+ * Uid3 for AI Voice Dial UI.
+ */
+#define AI_UID3_VOICE_DIAL_UI 0x101F8543
+
+/**
+ * Uid3 for ai3 layoutengine
+ */
+#define AI3_UID_LAYOUT_ENGINE 0x2001CB50
+
+/**
+ * Uid3 for ai3 utils
+ */
+#define AI3_UID_UTILS 0x2001CB51
+
+/**
+ * Uids for rendering plugins
+ */
+#define AI3_UID_RENDERING_PLUGIN_BITMAPFACTORY 0x2001952F
+#define AI3_UID_RENDERING_PLUGIN_BITMAPFACTORY_IMPLEMENTATION 0x20019530
+
+#define AI3_UID_RENDERING_PLUGIN_MENUFACTORY 0x20019582
+#define AI3_UID_RENDERING_PLUGIN_MENUFACTORY_IMPLEMENTATION 0x20019583
+
+#define AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY 0x20019584
+#define AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY_IMPLEMENTATION 0x20019585
+
+#define AI3_UID_RENDERING_PLUGIN_NPPLUGINFACTORY 0x20019586
+#define AI3_UID_RENDERING_PLUGIN_NPPLUGINFACTORY_IMPLEMENTATION 0x20019587
+
+#define AI3_UID_RENDERING_PLUGIN_POPUPFACTORY 0x20019588
+#define AI3_UID_RENDERING_PLUGIN_POPUPFACTORY_IMPLEMENTATION 0x20019589
+
+#define AI3_UID_RENDERING_PLUGIN_TEXTFACTORY 0x2001958A
+#define AI3_UID_RENDERING_PLUGIN_TEXTFACTORY_IMPLEMENTATION 0x2001958B
+
+#define AI3_UID_RENDERING_PLUGIN_CLOCKFACTORY 0x2001CB52
+#define AI3_UID_RENDERING_PLUGIN_CLOCKFACTORY_IMPLEMENTATION 0x2001CB52
+
+#define AI3_UID_RENDERING_PLUGIN_VIEWFACTORY 0x2001958E
+#define AI3_UID_RENDERING_PLUGIN_VIEWFACTORY_IMPLEMENTATION 0x2001958F
+
+#define AI3_UID_RENDERING_PLUGIN_VOLUMECONTROLFACTORY 0x20019590
+#define AI3_UID_RENDERING_PLUGIN_VOLUMECONTROLFACTORY_IMPLEMENTATION 0x20019591
+
+#define AI3_RENDERING_PLUGIN_ECOM_FACTORY_UID 0x20019592
+
+#define AI3_EXTERNAL_RENDERING_PLUGIN_ECOM_UID 0x200286DF
+
+#define AI3_UID_RENDERING_PLUGIN_TEXTEDITORFACTORY 0x20022FD3
+#define AI3_UID_RENDERING_PLUGIN_TEXTEDITORFACTORY_IMPLEMENTATION 0x20022FD3
+
+#define AI3_UID_RENDERING_PLUGIN_ANIMATIONFACTORY 0x200286E2
+#define AI3_UID_RENDERING_PLUGIN_ANIMATIONFACTORY_IMPLEMENTATION 0x200286E2
+
+#endif // AISYSTEMUIDS_HRH
+
+
--- a/homescreensrv_plat/menu_content_service_api/inc/mcsmenuitem.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/menu_content_service_api/inc/mcsmenuitem.h	Wed Jun 09 10:01:25 2010 +0300
@@ -40,6 +40,7 @@
 
     enum TFlags ///< Item flags.
         {
+        ENoFlag = 0x0, ///< Item has no flags.
         ELockDelete = 0x1, ///< Item cannot be deleted.
         ELockName = 0x2, ///< Item cannot be renamed.
         ELockIcon = 0x4, ///< Icon cannot be changed.
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hspsconfigurationif.h	Wed Jun 09 10:01:25 2010 +0300
@@ -409,6 +409,11 @@
          */
         void RequestNotify_6_L();
         /**
+         * Test case function for test case SisxUpgrade(1)
+         * See HSPS module test specification
+         */
+        void SisxUpgrade_1_L();
+        /**
          * Test case function for test case SisxInstallation(1)
          * See HSPS module test specification
          */
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -263,9 +263,9 @@
     // Remove test configuration resource files
     TRAP( err, RemoveResourceFilesL( iFileserver ) );
     if ( err != KErrNone )
-    	{    	
-    	EUNIT_FAIL_TEST( "Teardown failed." );
-    	}
+        {        
+        EUNIT_FAIL_TEST( "Teardown failed." );
+        }
     }
 
 //------------------------------------------------------------------------------
@@ -2640,6 +2640,211 @@
     EUNIT_PRINT( _L8( "Test step passed" ) );       
     }
 
+
+//------------------------------------------------------------------------------
+// Test case: SisxUpgrade(1)
+//------------------------------------------------------------------------------
+void MT_CHSPSConfigurationIf::SisxUpgrade_1_L()
+   {
+    // Pre conditions        
+
+    // Attach to HSPS 
+    EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) );
+    AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid );
+
+    // Test step 1: 
+    EUNIT_PRINT( _L8( "Test step 1: simulate installation of a SISX package" ) );
+
+    CFileMan* fileManager = CFileMan::NewL( iFileserver );
+    CleanupStack::PushL( fileManager );
+
+    // Copy installation files to c\private\200159c0\import
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\0\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\0\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\1\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\1\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\9\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\9\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\manifest.dat" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\plugin_0998_101FB657_2000B133_1.0.dat" ),
+        _L( "c:\\private\\200159c0\\import\\" ),
+        CFileMan::EOverWrite ) );
+            
+    // Wait until configuration is installed
+    User::After( 4000000 );
+    
+    // Make sure "InstalledWidget" is installed
+    if ( !BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) )
+        {
+        // Installation failed - remove imports to be able to re-run the test again
+        // The ChspsThemeServer::HandleConfigurationImportsL does handle newly
+        // added files only
+        User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) );
+        fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ),
+            0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+        User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) );     
+        
+        // Leave - the test was not successfull
+        User::Leave( KErrGeneral );
+        }
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+
+    // Test step 1: 
+    EUNIT_PRINT( _L8( "Test step 2: simulate upgrade to v2 of a SISX package" ) );
+    // Copy installation files to c\private\200159c0\import
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\0\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\0\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\1\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\1\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\9\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\9\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\widgetconfiguration.xml" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\manifest.dat" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\2.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget_v2\\plugin_0998_101FB657_2000B133_2.0.dat" ),
+        _L( "c:\\private\\200159c0\\import\\" ),
+        CFileMan::EOverWrite ) );
+            
+    // Wait until configuration is installed
+    User::After( 4000000 );
+    
+    // Make sure "InstalledWidget v1" is removed
+    if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) )
+        {
+        // Installation failed - remove imports to be able to re-run the test again
+        // The ChspsThemeServer::HandleConfigurationImportsL does handle newly
+        // added files only
+        User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) );
+        fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ),
+            0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+        fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ),
+            0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+
+        User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) );     
+        User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ) ) );     
+        // Leave - the test was not successfull
+        User::Leave( KErrGeneral );
+        }
+    
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+
+
+    // Test step 3: 
+    EUNIT_PRINT( _L8( "Test step 3: simulate uninstalation of a SISX package" ) );
+    // Remove installation files to c\private\200159c0\import
+    User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) );
+    fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ),
+        0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+    fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ),
+        0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.        
+    User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) );     
+    User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_2.0.dat" ) ) );     
+        
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+    User::After( 4000000 );
+    
+    // check
+    // Copy installation files to c\private\200159c0\import
+    EUNIT_PRINT( _L8( "Test step 4: simulate installation of a SISX package" ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\0\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\0\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\1\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\1\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\9\\" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\9\\" ),
+        CFileMan::ERecurse|CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\widgetconfiguration.xml" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\manifest.dat" ),
+        _L( "c:\\private\\200159c0\\import\\0998\\101FB657\\2000B133\\1.0\\" ),
+        CFileMan::EOverWrite ) );
+    User::LeaveIfError( fileManager->Copy(
+        _L( "c:\\data\\mt_hsps\\installed_widget\\plugin_0998_101FB657_2000B133_1.0.dat" ),
+        _L( "c:\\private\\200159c0\\import\\" ),
+        CFileMan::EOverWrite ) );
+            
+    // Wait until configuration is installed
+    User::After( 4000000 );
+    
+    // Make sure "InstalledWidget" is installed
+    if ( !BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) )
+        {
+        // Installation failed - remove imports to be able to re-run the test again
+        // The ChspsThemeServer::HandleConfigurationImportsL does handle newly
+        // added files only
+        User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) );
+        fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ),
+            0, KEntryAttReadOnly, TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+        User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) );     
+
+        // Leave - the test was not successfull
+        User::Leave( KErrGeneral );
+        }
+    
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+        
+    // Test step 2: 
+    EUNIT_PRINT( _L8( "Test step 5: simulate un-installation of the SISX package" ) );
+    
+    // Remove installation files from c\private\200159c0\import
+    User::LeaveIfError( fileManager->RmDir( _L( "c:\\private\\200159c0\\import\\0998\\" ) ) );
+    fileManager->Attribs( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133.dat" ),
+                          0,
+                          KEntryAttReadOnly,
+                          TTime( 0 ) ); // TTime(0) = preserve original time stamp.
+    User::LeaveIfError( fileManager->Delete( _L( "c:\\private\\200159c0\\import\\plugin_0998_101FB657_2000B133_1.0.dat" ) ) );     
+    // Removing of *.dat file causes configuration uninstallation
+    // Wait until configuration is uninstalled
+    User::After( 4000000 );
+
+    // Make sure "InstalledWidget" is uninstalled
+    if ( BaflUtils::FileExists( iFileserver, _L( "c:\\private\\200159c0\\themes\\2456\\270513751\\536916275\\1.0\\InstallWidgetConf.o0000" ) ) )
+        {
+        User::Leave( KErrGeneral );
+        }
+
+    EUNIT_PRINT( _L8( "Test step passed" ) );
+
+    CleanupStack::PopAndDestroy( fileManager );
+    };
+
+
+
+
 //------------------------------------------------------------------------------
 // Test case: SisxInstallation(1)
 //------------------------------------------------------------------------------
@@ -3423,11 +3628,11 @@
        SetupL, SetPluginSettings_6_L, Teardown )
 
     EUNIT_TEST(
-	   "GetPluginSettings(1)",
-	   "IConfiguration",
-	   "GetPluginSettings",
-	   "FUNCTIONALITY",
-	   SetupL, GetPluginSettings_1_L, Teardown )
+       "GetPluginSettings(1)",
+       "IConfiguration",
+       "GetPluginSettings",
+       "FUNCTIONALITY",
+       SetupL, GetPluginSettings_1_L, Teardown )
 
     EUNIT_TEST(
        "GetPluginSettings(2)",
@@ -3569,13 +3774,20 @@
        "FUNCTIONALITY",
        SetupL, RequestNotify_6_L, Teardown )
 
-	EUNIT_TEST(
+    EUNIT_TEST(
+       "SisxUpgrade(1)",
+       "IConfiguration",
+       "SisxUpgrade",
+       "FUNCTIONALITY",
+       SetupL, SisxUpgrade_1_L, Teardown )       
+      
+    EUNIT_TEST(
        "SisxInstallation(1)",
        "IConfiguration",
        "SisxInstallation",
        "FUNCTIONALITY",
        SetupL, SisxInstallation_1_L, Teardown )       
-       
+              
     EUNIT_TEST(   
        "NativeInstallation(1)",
        "IConfiguration",
--- a/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsexecuteaction.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -124,10 +124,15 @@
 void CMCSExecuteAction::RunL()
 	{
 	TInt err = iStatus.Int();
+
     if ( err == KErrNone )
         {
-        ExecuteL( iItemId, iAction );
-        }
+        TRAP( err, ExecuteL( iItemId, iAction ) );
+        }   
+    if(err != KErrNone)
+    	{
+    	NotifyRequestResult( err );
+    	}
 	}
 
 // ---------------------------------------------------------------------------
@@ -137,6 +142,10 @@
 TInt CMCSExecuteAction::RunError(TInt aError)
 	{
     NotifyRequestResult( aError );
+    if ( (aError != KErrDiskFull) && (aError != KErrNoMemory))
+    	{
+    	aError = KErrNone;
+    	}    
 	return aError; 
 	}
 
--- a/idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/ainetworkinfolistener.h	Wed Jun 09 10:01:25 2010 +0300
@@ -225,7 +225,8 @@
         ERegistrationStatusReceived       = 0x00000010,
         ENetworkInfoChangeReceived        = 0x00000020,
         EProgrammableOperatorInfoReceived = 0x00000040,
-        EProgrammableOperatorInfoReceivedOk = 0x00000080
+        EProgrammableOperatorInfoReceivedOk = 0x00000080,
+        ECSRegistrationNotOk              = 0x00000100 
         };
         
 	/**
--- a/idlefw/plugins/devicestatus/src/ainetworkinfolistener.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/ainetworkinfolistener.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -155,8 +155,8 @@
 
 void CAiNetworkInfoListener::HandleNetworkMessage( const TNWMessages aMessage )
     {
-    __PRINTS("XAI: Handle NW message");
-	//Insert message into the message cache. Only one messsage of one type.
+    __PRINT(__DBG_FORMAT("XAI: Handle NW message %d"), aMessage );
+    //Insert message into the message cache. Only one messsage of one type.
     TRAPD( err, iMessageCache->InsertIsqL( aMessage, iKeyProperties ) );
     if( err == KErrAlreadyExists )
         {
@@ -249,8 +249,8 @@
     // Registration status and network information must have been received.
     // Operator name information must have been received.
     // Device must be camped to a network.
+    // CS registration should be completed (only valid in AT&T NW)
 
-    TBool csAlphaFlag( EFalse );
 	switch ( aMessage )
     	{
         case MNWMessageObserver::ENWMessageNetworkInfoChange:
@@ -296,7 +296,13 @@
                     if ( !( RPacketService::KCapsRxCSCall & 
                             iInfo.iDynamicCapsFlags ) )
                         {
-                        csAlphaFlag = ETrue;
+                        __PRINTS("XAI: CS registration failed");
+                        iReceivedMessageFlags |= ECSRegistrationNotOk;
+                        }
+                    else
+                        {
+                        __PRINTS("XAI: CS registration ok");
+                        iReceivedMessageFlags &= ~ECSRegistrationNotOk;
                         }
                     }
                 FeatureManager::UnInitializeLib();
@@ -316,6 +322,7 @@
     	( ENetworkInfoChangeReceived  & iReceivedMessageFlags ) && 
         ( ERegistrationStatusReceived & iReceivedMessageFlags ) &&
         ( iInfo.iStatus == ENWStatusCurrent ) );  
+    TBool csAlphaFlag( ECSRegistrationNotOk & iReceivedMessageFlags );
       
   	return
         !serviceProviderNameFetched ||
--- a/idlefw/plugins/mcsplugin/group/qgn_mcsplugin_log_out.svg	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/group/qgn_mcsplugin_log_out.svg	Wed Jun 09 10:01:25 2010 +0300
@@ -1,123 +1,127 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="88px" height="88px" viewBox="0 0 88 88">
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-170.0259" y1="145.3008" x2="-153.4591" y2="112.6687" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#A2C2DD"/>
-<stop offset="0.1" style="stop-color:#A2C2DD"/>
-<stop offset="0.7135" style="stop-color:#6C83BB"/>
-<stop offset="0.9888" style="stop-color:#003D6D"/>
-<stop offset="1" style="stop-color:#003D6D"/>
+<svg baseProfile="tiny" height="96px" version="1.1" viewBox="0 0 96 96" width="96px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M87.141,59.508L74.324,37.93c-0.414-0.701-1.355-0.605-1.716-0.009L62.199,55.123V39.157  c0-1.741-1.417-3.157-3.158-3.157H48.979c-1.74,0-3.156,1.416-3.156,3.157v19.106H41c-0.654,0-1.319,0.754-0.855,1.518L53.202,81.36  c0.391,0.647,1.332,0.642,1.715-0.008l10.312-17.359v16.13c0,1.741,1.416,3.157,3.156,3.157h10.063c1.741,0,3.158-1.416,3.158-3.157  V61.018h4.676C87.031,61.018,87.546,60.19,87.141,59.508z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M86.711,59.763L73.894,38.184c-0.145-0.246-0.617-0.399-0.857-0.004L61.699,56.915V39.157  c0-1.465-1.192-2.657-2.658-2.657H48.979c-1.465,0-2.656,1.192-2.656,2.657v19.606H41c-0.389,0-0.63,0.426-0.428,0.759L53.63,81.102  c0.195,0.32,0.665,0.324,0.857-0.004l11.241-18.926v17.951c0,1.465,1.191,2.657,2.656,2.657h10.063c1.466,0,2.658-1.192,2.658-2.657  V60.518h5.176C86.691,60.518,86.896,60.073,86.711,59.763z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M73.464,38.438L61.199,58.707L41,59.264l13.058,21.579l12.171-20.492v19.772c0,1.192,0.967,2.157,2.156,2.157  h10.063c1.191,0,2.158-0.965,2.158-2.157V60.018h5.676L73.464,38.438z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="53.9375" x2="53.9375" y1="36.4458" y2="88.6872">
+<stop offset="0" style="stop-color:#96D63A"/>
+<stop offset="1" style="stop-color:#0F581C"/>
+</linearGradient>
+<path d="M61.199,58.264V38.157c0-1.19-0.967-2.157-2.158-2.157H48.979c-1.19,0-2.156,0.967-2.156,2.157  v20.106H41l13.058,21.579l12.817-21.579H61.199z" fill="url(#SVGID_1_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="54.0107" x2="54.0107" y1="36.7773" y2="50.6849">
+<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.6"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M61.199,45.871v-7.714c0-1.19-0.967-2.157-2.158-2.157H48.979c-1.19,0-2.156,0.967-2.156,2.157  v15.767c1.117-1.051,2.334-2.052,3.645-2.984C53.93,48.472,57.622,46.784,61.199,45.871z" fill="url(#SVGID_2_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="53.9336" x2="53.9336" y1="22.3457" y2="72.8956">
+<stop offset="0" style="stop-color:#96D63A"/>
+<stop offset="1" style="stop-color:#0F581C"/>
+</linearGradient>
+<polyline fill="url(#SVGID_3_)" points="41,58.264 54.058,79.843 66.867,58.275 65.117,59.264 54.05,77.898 42.773,59.264   41.021,58.264 "/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="63.6768" x2="63.6768" y1="50.9502" y2="70.8604">
+<stop offset="0" style="stop-color:#79CD19"/>
+<stop offset="1" style="stop-color:#1B6332"/>
 </linearGradient>
-<path fill="url(#SVGID_1_)" d="M32.636,9.957c-0.191,0.491-2,6.274-2.195,6.841c-0.621-0.097-16.383-2.494-16.383-2.494  C12.486,14.293,10,15.084,10,15.084l1.395,37.626c0,0,22.819,6.295,23.892,6.587l-0.001,0.002c-0.346,0.614-3.05,5.61-3.633,11.059  l0.502,2.62l0.069,0.082c0.166,0.184,4.173,4.634,12.913,6.142l0.155,0.023l0.238-0.108c5.737-3.87,9.838-9.629,10.929-13.318  l0.208-3.294c-0.004-0.198-0.08-4.072-0.515-6.568c0.269-0.255,7.247-6.878,7.681-7.287c1.428,1.146,4.452,2.873,7.444,3.538  l0.134,0.033l0.125-0.061c2.099-1.047,5.649-5.272,6.066-6.739c0.188-0.657,0.408-1.375,0.397-2.88  c-0.019-2.539-1.827-7.152-3.435-8.383c-1.609-1.234-6.195-1.781-6.676-1.909c-2.358,0.738-6.447,3.307-6.447,3.307l3.707-10.958  l2.674,0.07c1.429-2.625,3.747-7.613,3.747-10.658c0-0.76-0.419-2.537-1.604-2.788L36.354,8.774  C36.354,8.774,33.734,8.691,32.636,9.957z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-155.9346" y1="183.7012" x2="-173.3974" y2="150.5219" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.05" style="stop-color:#FFFFFF"/>
-<stop offset="1" style="stop-color:#A2C2DD"/>
+<polygon fill="url(#SVGID_4_)" points="60.479,58.982 61.199,58.982 65.611,58.982 65.599,59.003 66.867,58.275 66.875,58.264   61.199,58.264 61.199,58.261 60.479,58.979 "/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="44.4111" x2="44.4111" y1="48.4136" y2="75.24">
+<stop offset="0" style="stop-color:#96D63A"/>
+<stop offset="1" style="stop-color:#0F581C"/>
 </linearGradient>
-<path fill="url(#SVGID_2_)" d="M66.091,12.649L33.378,9.888L26.835,31.87l28.24,10.572C61.13,41.459,66.091,12.649,66.091,12.649z"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-135.6172" y1="183.7754" x2="-156.8649" y2="150.1527" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.7135" style="stop-color:#496DA2"/>
-<stop offset="0.9888" style="stop-color:#235487"/>
-<stop offset="1" style="stop-color:#235487"/>
+<polygon fill="url(#SVGID_5_)" points="42.773,59.264 47.822,59.264 46.818,58.264 41,58.264 "/>
+<path d="M59.123,58.241c-0.28,0.463-0.289,1.042-0.025,1.512c0.266,0.472,0.767,0.765,1.309,0.765h4.322v1.358  l2.146-3.612h-5.676v-3.453L59.123,58.241z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M59.551,58.5c-0.188,0.309-0.193,0.695-0.017,1.008c0.177,0.314,0.511,0.51,0.872,0.51h4.822v1.017  l1.646-2.771h-5.676v-2.488L59.551,58.5z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M59.979,58.759c-0.094,0.154-0.098,0.347-0.008,0.504c0.088,0.157,0.254,0.255,0.436,0.255h5.322v0.675  l1.146-1.929h-5.676v-1.522L59.979,58.759z" fill-opacity="0.3" stroke-opacity="0.3"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="73.3438" x2="73.3438" y1="26.1245" y2="90.2377">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<path fill="url(#SVGID_3_)" d="M66.103,12.723l-6.076,18.989c-2.35,7.296-2.918,10.696-5.127,10.725  c2.132,0.37,4.858-2.523,6.29-7.642l3.478-10.828l2.847,0.055C73.514,11.927,70.019,10.062,66.103,12.723z"/>
-<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-165.0137" y1="168.8428" x2="-161.2757" y2="178.9888" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.05" style="stop-color:#FFFFFF"/>
-<stop offset="1" style="stop-color:#A2C2DD"/>
+<path d="M86.281,59.018L73.464,37.438L60.406,59.018h5.822v20.105c0,1.192,0.967,2.157,2.156,2.157h10.063  c1.191,0,2.158-0.965,2.158-2.157V59.018H86.281z" fill="url(#SVGID_6_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="70.4414" x2="70.4414" y1="39.8643" y2="57.3841">
+<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.6"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
+</linearGradient>
+<path d="M73.469,53.096c2.271-1.617,4.639-2.9,7.008-3.85l-7.013-11.808L60.406,59.018h5.822v1.063  C68.139,57.55,70.572,55.159,73.469,53.096z" fill="url(#SVGID_7_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="73.3398" x2="73.3398" y1="46.8115" y2="82.3889">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<path fill="url(#SVGID_4_)" d="M66.091,12.713c0.878-0.574,1.581-0.918,2.87-1.087l-32.57-2.302  c-1.395,0.116-2.075,0.17-3.013,0.631L66.091,12.713z"/>
-<path fill="#FFFFFF" d="M36.223,11.18c-0.669-0.076-1.381,0.417-1.582,1.1c-0.204,0.678,0.17,1.296,0.836,1.367  c0.665,0.073,1.375-0.418,1.582-1.103C37.267,11.862,36.894,11.251,36.223,11.18z"/>
-<path fill="#FFFFFF" d="M34.861,15.66c-0.66-0.075-1.365,0.417-1.566,1.1c-0.202,0.677,0.163,1.298,0.817,1.373  c0.661,0.07,1.359-0.422,1.564-1.104C35.889,16.347,35.523,15.732,34.861,15.66z"/>
-<path fill="#FFFFFF" d="M61.09,15.691c-0.548,1.701,1.951,1.909,2.504,0.208C64.17,14.183,61.645,13.974,61.09,15.691z"/>
-<path fill="#FFFFFF" d="M59.568,20.367c-0.547,1.691,1.916,1.898,2.475,0.208C62.604,18.871,60.125,18.664,59.568,20.367z"/>
-<path fill="#FFFFFF" d="M58.055,25.046c-0.551,1.709,1.871,1.916,2.428,0.208C61.049,23.558,58.604,23.346,58.055,25.046z"/>
-<path fill="#FFFFFF" d="M56.533,29.723c-0.556,1.697,1.835,1.912,2.392,0.213C59.493,28.233,57.077,28.018,56.533,29.723z"/>
-<path fill="#FFFFFF" d="M55.007,34.4c-0.558,1.718,1.796,1.935,2.359,0.214C57.939,32.895,55.567,32.675,55.007,34.4z"/>
-<path fill="#FFFFFF" d="M54.116,38.2l0.104,2.275c0.645,0.067,1.348-0.462,1.587-1.175C56.217,38.064,55.028,37.526,54.116,38.2z"/>
-<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-153.1875" y1="121.2715" x2="-165.5615" y2="160.7283" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.7135" style="stop-color:#496DA2"/>
-<stop offset="0.9888" style="stop-color:#235487"/>
-<stop offset="1" style="stop-color:#235487"/>
+<polygon fill="url(#SVGID_8_)" points="84.52,57.998 73.457,39.384 62.191,57.998 60.406,59.018 73.464,37.438 86.273,59.006 "/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="82.9434" x2="82.9434" y1="26.3955" y2="67.8789">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<polygon fill="url(#SVGID_9_)" points="84.52,57.998 86.281,59.018 80.605,59.018 79.605,58.021 "/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="63.8271" x2="63.8271" y1="25.7705" y2="68.054">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
+</linearGradient>
+<polygon fill="url(#SVGID_10_)" points="62.191,57.998 67.248,57.998 66.225,59.018 60.406,59.018 "/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="54.0088" x2="54.0088" y1="33.3389" y2="68.1402">
+<stop offset="0" style="stop-color:#96D63A"/>
+<stop offset="1" style="stop-color:#0F581C"/>
+</linearGradient>
+<path d="M47.822,38.157c0-0.638,0.52-1.157,1.156-1.157h10.063c0.639,0,1.158,0.52,1.158,1.157v21.106  l1-1.266V38.157c0-1.19-0.967-2.157-2.158-2.157H48.979c-1.19,0-2.156,0.967-2.156,2.157v20.106h-0.004l1.004,1V38.157z" fill="url(#SVGID_11_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="73.415" x2="73.415" y1="24.9624" y2="75.6372">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<path fill="url(#SVGID_5_)" d="M51.359,20.91c7.503-0.175,0.672,17.134,3.716,21.531l-6.333-1.621  C48.742,40.821,46.048,19.943,51.359,20.91z"/>
-<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-158.5356" y1="119.5889" x2="-170.9101" y2="159.0471" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#A2C2DD"/>
-<stop offset="0.1" style="stop-color:#A2C2DD"/>
-<stop offset="0.7135" style="stop-color:#6C83BB"/>
-<stop offset="0.9888" style="stop-color:#003D6D"/>
-<stop offset="1" style="stop-color:#003D6D"/>
+<path d="M79.605,79.123c0,0.638-0.52,1.157-1.158,1.157H68.385c-0.637,0-1.156-0.52-1.156-1.157V58.018l0,0  l-1.004,1h0.004v20.105c0,1.192,0.967,2.157,2.156,2.157h10.063c1.191,0,2.158-0.965,2.158-2.157V59.021l-1-1V79.123z" fill="url(#SVGID_12_)"/>
+<path d="M29.249,51.904c-0.025-1.024,1.39-6.07,8.97-13.688c6.15-6.124,11.745-8.977,13.59-8.977  c0.027,0,0.054,0.001,0.079,0.003c1.002,0.438,1.713,0.745,2.303,0.999c2.084,0.898,2.644,1.141,9.219,4.241  c0.135,0.064,0.278,0.097,0.429,0.097c0.121,0,0.24-0.021,0.352-0.064c3.961-1.483,10.477-5.185,15.419-9.802  c0.241-0.224,0.356-0.551,0.309-0.879c-0.303-2.076-1.227-8.392-5.288-11.934l-0.097-0.11c-0.081-0.095-0.164-0.188-0.251-0.274  c-2.271-2.276-5.437-3.431-9.407-3.431c-7.128,0-16.449,3.885-26.249,10.939c-4.834,3.503-8.48,6.521-10.828,8.964  c-3.177,3.155-5.712,6.41-8.773,10.64C7.879,54.107,5.002,67.769,11.516,74.28c0.144,0.144,0.294,0.275,0.457,0.411  c2.435,2.627,6.288,4.361,11.541,5.17c0.102,0.015,0.174,0.025,0.186,0.027c0.092,0.026,0.187,0.04,0.281,0.04  c0.293,0,0.57-0.128,0.762-0.352c3.852-4.524,7.017-8.528,9.764-15.366c0.102-0.253,0.095-0.54-0.018-0.786  C32.811,59.738,29.729,52.963,29.249,51.904z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M51.809,28.739c0.076,0,0.146,0.005,0.209,0.014c1.038,0.454,1.768,0.77,2.371,1.029  c2.09,0.901,2.651,1.144,9.236,4.249c0.067,0.032,0.14,0.048,0.213,0.048c0.06,0,0.119-0.011,0.176-0.032  c3.916-1.467,10.36-5.128,15.255-9.701c0.12-0.111,0.178-0.275,0.154-0.438c-0.297-2.03-1.199-8.21-5.169-11.678l-0.101-0.114  c-0.073-0.085-0.147-0.169-0.226-0.247c-2.174-2.179-5.22-3.284-9.054-3.284c-7.024,0-16.242,3.852-25.956,10.845  c-4.811,3.485-8.436,6.486-10.769,8.913c-3.152,3.131-5.673,6.367-8.72,10.577C8.438,54.187,5.541,67.601,11.869,73.927  c0.137,0.137,0.28,0.263,0.425,0.39l0.045,0.035c2.355,2.541,6.112,4.225,11.165,5.002c0.165,0.025,0.28,0.042,0.335,0.055  c0.047,0.014,0.095,0.021,0.142,0.021c0.144,0,0.284-0.063,0.381-0.176c3.821-4.488,6.961-8.459,9.681-15.228  c0.051-0.127,0.048-0.27-0.009-0.394c-1.729-3.801-4.951-10.884-5.276-11.603c-0.111-0.981,1.106-6.125,9.109-14.168  C44.186,31.569,49.823,28.739,51.809,28.739z" fill-opacity="0.15" stroke-opacity="0.15"/>
+<path d="M52.164,28.271c4.692,2.054,3.145,1.285,11.674,5.308c4.09-1.532,10.424-5.24,15.09-9.599  c-0.48-3.29-1.562-8.368-5.044-11.414c-0.104-0.114-50.946,22.359-54.048,26.646C9.289,53.86,5.992,67.345,12.223,73.573  c0.154,0.154,0.319,0.295,0.482,0.438c3.894,4.2,10.887,4.792,11.275,4.917c3.771-4.428,6.915-8.413,9.598-15.09  c0,0-5.254-11.549-5.305-11.666c-0.223-1.165,1.184-6.569,9.24-14.666C44.379,30.671,50.361,27.904,52.164,28.271z" fill-opacity="0.4" stroke-opacity="0.4"/>
+<path d="M73.033,10.892C52.262,16.63,17.804,47.755,11.3,71.076c3.253,5.97,12.239,6.711,12.681,6.853  c3.771-4.428,6.915-8.413,9.598-15.09c0,0-5.254-11.549-5.305-11.666c-0.223-1.165,1.184-6.569,9.24-14.666  c6.865-6.836,12.848-9.603,14.65-9.235c4.692,2.054,3.145,1.285,11.674,5.308c4.09-1.532,10.424-5.24,15.09-9.599  C78.41,19.436,77.199,13.81,73.033,10.892z" fill="#283175"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="43.6226" x2="43.6226" y1="23.3003" y2="128.0071">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<polygon fill="url(#SVGID_6_)" points="47.167,62.197 47.317,21.85 50.417,21.055 50.273,59.334 "/>
-<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-170.6763" y1="173.5684" x2="-191.9166" y2="133.2117" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.05" style="stop-color:#FFFFFF"/>
-<stop offset="1" style="stop-color:#A2C2DD"/>
+<path d="M73.574,11.223c-5.807-5.821-18.67-3.687-34.363,7.612c-3.396,2.461-7.807,5.844-10.709,8.862  c-3.084,3.063-5.564,6.229-8.666,10.515C9.289,52.86,5.992,66.345,12.223,72.573c3.818,3.818,10.385,4.413,10.994,4.592  c4.497-4.987,7.803-10.404,9.598-15.09c-3.006-6.435-5.254-11.548-5.305-11.665c-0.283-1.743,2.064-7.453,9.24-14.667  c6.807-6.775,12.846-9.602,14.65-9.235c3.697,1.576,5.551,2.441,11.674,5.307c3.545-1.296,9.406-4.539,15.09-9.597  C78.164,22.218,77.273,14.918,73.574,11.223z" fill="url(#SVGID_13_)"/>
+<radialGradient cx="43.5562" cy="42.0718" gradientTransform="matrix(0.717 -0.6971 0.3681 0.3786 -3.1589 56.5061)" gradientUnits="userSpaceOnUse" id="SVGID_14_" r="22.0964">
+<stop offset="0" style="stop-color:#231F20;stop-opacity:0.3"/>
+<stop offset="0.753" style="stop-color:#231F20;stop-opacity:0.3"/>
+<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
+</radialGradient>
+<path d="M49.607,19.678c-1.505-1.193-9.787,5.495-17.231,12.648c-7.032,6.757-13.316,13.928-12.438,15.261  c3.18,4.833,11.333,14.573,12.877,14.488c1.786,4.025-3.473-7.438-5.305-11.665c-0.23-1.42,1.521-6.905,9.24-14.667  c6.695-6.663,12.752-9.621,14.65-9.235c0.119,0.051,7.91,3.49,11.674,5.307C63.945,29.955,53.846,23.039,49.607,19.678z" fill="url(#SVGID_14_)"/>
+<radialGradient cx="41.5591" cy="39.8374" fx="35.2914" fy="39.924" gradientTransform="matrix(-0.701 -0.7131 1.8436 -1.8123 -2.7515 141.6727)" gradientUnits="userSpaceOnUse" id="SVGID_15_" r="17.6458">
+<stop offset="0" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="0.9217" style="stop-color:#000000;stop-opacity:0"/>
+<stop offset="1" style="stop-color:#231F20;stop-opacity:0.3"/>
+</radialGradient>
+<path d="M68.869,8.576c-1.25-0.34-2.579-0.507-3.951-0.503c-13.027,0.08-29.163,12.766-34.965,18.216  C20.688,35.556,9.15,51.427,9.074,63.917c-0.004,1.18,0.118,2.329,0.367,3.425C28.054,36.005,40.387,26.255,68.869,8.576z" fill="url(#SVGID_15_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="66.4609" x2="66.4609" y1="6.2998" y2="50.4396">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<polygon fill="url(#SVGID_7_)" points="47.161,62.199 12.032,52.382 10.79,15.46 47.848,22.726 "/>
-<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-184.4028" y1="162.0342" x2="-181.1703" y2="170.8082" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
+<path d="M63.281,31.535c3.168-1.302,8.643-4.069,14.758-9.383c-0.486-2.793-1.273-5.24-2.322-7.191  L54.883,27.663C57.611,28.872,60.445,30.173,63.281,31.535z" fill="url(#SVGID_16_)"/>
+<linearGradient gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -236.5468 -85.5474)" gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="157.8945" x2="143.6744" y1="279.627" y2="285.387">
 <stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.05" style="stop-color:#FFFFFF"/>
-<stop offset="1" style="stop-color:#A2C2DD"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
 </linearGradient>
-<path fill="url(#SVGID_8_)" d="M47.848,22.726c0.511-1.077,3.027-2.024,4.502-1.799l-37.932-6.068  c-1.404-0.01-2.861,0.211-3.657,0.638L47.848,22.726z"/>
-<path fill="#FFFFFF" d="M12.991,19.035c0.073,1.76,2.727,2.319,2.665,0.559C15.589,17.832,12.914,17.272,12.991,19.035z"/>
-<path fill="#FFFFFF" d="M13.191,23.863c0.077,1.75,2.695,2.309,2.628,0.554C15.754,22.668,13.111,22.111,13.191,23.863z"/>
-<path fill="#FFFFFF" d="M13.39,28.692c0.081,1.76,2.656,2.317,2.595,0.557C15.922,27.468,13.317,26.912,13.39,28.692z"/>
-<path fill="#FFFFFF" d="M13.587,33.517c0.075,1.755,2.623,2.315,2.561,0.558C16.084,32.319,13.512,31.766,13.587,33.517z"/>
-<path fill="#FFFFFF" d="M13.787,38.345c0.07,1.764,2.583,2.317,2.521,0.555C16.245,37.138,13.707,36.585,13.787,38.345z"/>
-<path fill="#FFFFFF" d="M13.978,43.169c0.072,1.755,2.542,2.313,2.489,0.558C16.401,41.954,13.908,41.399,13.978,43.169z"/>
-<path fill="#FFFFFF" d="M42.327,25.685c0.038,1.822,2.757,2.321,2.732,0.496C45.042,24.342,42.296,23.843,42.327,25.685z"/>
-<path fill="#FFFFFF" d="M42.416,30.708c0.031,1.826,2.718,2.324,2.698,0.498C45.088,29.385,42.377,28.887,42.416,30.708z"/>
-<path fill="#FFFFFF" d="M42.504,35.735c0.033,1.818,2.684,2.313,2.659,0.494C45.138,34.393,42.471,33.898,42.504,35.735z"/>
-<path fill="#FFFFFF" d="M42.591,40.758c0.027,1.837,2.643,2.336,2.618,0.497C45.191,39.429,42.55,38.933,42.591,40.758z"/>
-<path fill="#FFFFFF" d="M42.671,45.789c0.034,1.826,2.612,2.325,2.586,0.493C45.236,44.447,42.638,43.949,42.671,45.789z"/>
-<path fill="#FFFFFF" d="M15.164,47.186c-0.706-0.155-1.249,0.324-1.212,1.061c0.031,0.738,0.628,1.46,1.326,1.608  c0.701,0.147,1.239-0.326,1.211-1.063C16.456,48.053,15.867,47.33,15.164,47.186z"/>
-<path fill="#FFFFFF" d="M15.365,51.896c-0.692-0.152-1.228,0.323-1.199,1.06c0,0.008,0.005,0.01,0.005,0.017l2.496,0.669  c0-0.042,0.009-0.089,0.007-0.137C16.642,52.767,16.057,52.044,15.365,51.896z"/>
-<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-181.396" y1="164.2734" x2="-185.986" y2="142.0033" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
+<path d="M58.721,13.574l10.25,5.197l6.355-3.892C72.03,9.786,64.626,9.209,58.721,13.574z" fill="url(#SVGID_17_)"/>
+<linearGradient gradientTransform="matrix(0.7071 -0.7071 0.7071 0.7071 -236.5468 -85.5474)" gradientUnits="userSpaceOnUse" id="SVGID_18_" x1="118.0596" x2="132.8288" y1="272.0107" y2="283.7179">
 <stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.7135" style="stop-color:#496DA2"/>
-<stop offset="0.9888" style="stop-color:#235487"/>
-<stop offset="1" style="stop-color:#235487"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
 </linearGradient>
-<polygon fill="url(#SVGID_9_)" points="33.313,39.955 33.488,47.485 24.746,45.137 24.87,37.786 20.232,36.735 29.446,26.307   38.128,41.284 "/>
-<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-127.8794" y1="148.625" x2="-156.5042" y2="127.1121" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#E6EEF4"/>
-<stop offset="0.4438" style="stop-color:#4A9900"/>
-<stop offset="0.9382" style="stop-color:#0E4E58"/>
-<stop offset="1" style="stop-color:#0E4E58"/>
+<path d="M55.307,17.018c-2.447,3.188-3.613,6.659-3.227,8.976l2.979,1.27l9.41-5.786  C66.867,17.575,58.682,12.629,55.307,17.018z" fill="url(#SVGID_18_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_19_" x1="24.2266" x2="24.2266" y1="32.5884" y2="95.3979">
+<stop offset="0" style="stop-color:#009AFF"/>
+<stop offset="1" style="stop-color:#051F7D"/>
 </linearGradient>
-<path fill="url(#SVGID_10_)" d="M77.562,41.956L64.58,47.282l-0.837,0.793c1.256,1.091,5.104,3.1,7.551,3.648  c2.085-0.894,5.648-5.229,5.987-6.592C77.666,43.599,77.687,42.73,77.562,41.956z"/>
-<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="-135.7012" y1="137.7275" x2="-155.8065" y2="139.3788" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#E6EEF4"/>
-<stop offset="0.4438" style="stop-color:#4A9900"/>
-<stop offset="0.9382" style="stop-color:#0E4E58"/>
-<stop offset="1" style="stop-color:#0E4E58"/>
-</linearGradient>
-<path fill="url(#SVGID_11_)" d="M69.952,41.145l-5.713,5.891c2.282,1.594,5.02,2.792,6.899,3.301L69.952,41.145z"/>
-<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="-133.9507" y1="121.9365" x2="-188.714" y2="106.7635" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#E6EEF4"/>
-<stop offset="0.4438" style="stop-color:#4A9900"/>
-<stop offset="0.9382" style="stop-color:#0E4E58"/>
-<stop offset="1" style="stop-color:#0E4E58"/>
+<path d="M32.666,62.194c-1.328,3.224-4.145,8.8-9.557,15.029c-2.844-0.499-5.334-1.299-7.322-2.366  l12.934-21.216C29.955,56.421,31.277,59.305,32.666,62.194z" fill="url(#SVGID_19_)"/>
+<linearGradient gradientTransform="matrix(-0.7071 0.7071 0.7071 0.7071 -1710.7705 1388.6769)" gradientUnits="userSpaceOnUse" id="SVGID_20_" x1="-2182.1489" x2="-2167.1106" y1="271.624" y2="283.5445">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
 </linearGradient>
-<path fill="url(#SVGID_12_)" d="M56.295,62.343l-23.986,7.819l0.476,2.383c0,0,3.972,4.522,12.685,5.987  c5.827-3.898,9.585-9.576,10.602-13.026L56.295,62.343z"/>
-<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="-158.8188" y1="100.1309" x2="-189.4024" y2="131.6035" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#DCE8E4"/>
-<stop offset="1" style="stop-color:#43910A"/>
+<path d="M17.885,54.072c3.246-2.493,6.781-3.683,9.139-3.285l1.293,3.03l-5.891,9.582  C18.451,65.843,13.414,57.507,17.885,54.072z" fill="url(#SVGID_20_)"/>
+<linearGradient gradientTransform="matrix(-0.7071 0.7071 0.7071 0.7071 -1710.7705 1388.6769)" gradientUnits="userSpaceOnUse" id="SVGID_21_" x1="-2141.5947" x2="-2156.0691" y1="279.3809" y2="285.2439">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
 </linearGradient>
-<path fill="url(#SVGID_13_)" d="M32.281,70.162c0.602-5.639,3.523-10.769,3.523-10.769l8.851,3.012l0.251,13.853  C38.119,75.237,34.475,72.297,32.281,70.162z"/>
-<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="-133.1011" y1="146.5527" x2="-192.1344" y2="122.9038" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#DCE8E4"/>
-<stop offset="1" style="stop-color:#43910A"/>
+<path d="M14.379,57.548l5.291,10.438l-3.965,6.471C10.576,71.127,9.883,63.628,14.379,57.548z" fill="url(#SVGID_21_)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_22_" x1="47.3364" x2="47.3364" y1="-17.5747" y2="26.6288">
+<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.5"/>
+<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
 </linearGradient>
-<path fill="url(#SVGID_14_)" d="M35.803,59.394c1.334,1.266,4.948,3.57,8.708,3.238l29.762-28.163  c-2.595-1.44-6.252-1.757-6.252-1.757C57.893,36.984,44.731,47.555,35.803,59.394z"/>
-<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="-126.3179" y1="166.3516" x2="-160.9312" y2="121.7815" gradientTransform="matrix(1 0 0 -1 214.52 184.1484)">
-<stop offset="0" style="stop-color:#DCE8E4"/>
-<stop offset="1" style="stop-color:#43910A"/>
-</linearGradient>
-<path fill="url(#SVGID_15_)" d="M44.904,76.258c-0.771-2.862-1.09-10.492-0.382-13.718c8.153-11.922,19.884-22.582,29.698-28.125  c0,0,2.77,2.889,3.354,7.526c-0.687,2.931-4.085,6.649-6.442,8.385c-0.313-0.706-1.382-8.679-1.382-8.679  c-2.707,3.545-6.983,7.402-13.99,14.038c0.464,2.462,0.533,6.632,0.533,6.632C54.047,67.732,50.056,73.044,44.904,76.258z"/>
-<rect fill="none" width="88" height="88"/>
+<path d="M76.711,20.254C75.91,16.429,73.963,9.139,64.967,9.133h-0.043  c-11.243,0.039-33.76,12.211-46.961,33.729C24.75,37.082,33,31.93,42.367,27.934C54.129,22.918,65.988,20.428,76.711,20.254z" fill="url(#SVGID_22_)"/>
+<rect fill="none" height="96" width="96"/>
 </svg>
--- a/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -44,6 +44,7 @@
 _LIT( KMenuAttrParam, "param" );
 
 #define KMCSCmailUidValue 0x2001E277
+#define KMCSCmailMailboxDefaultViewIdValue 0x1
 #define KMCSCmailMailboxViewIdValue 0x2
 #define KMCSCmailMtmUidValue 0x2001F406
 
@@ -211,7 +212,10 @@
             }
         else
             {
-            iVwsSession->StartApp( TUid::Uid( KMCSCmailUidValue ) );
+            const TVwsViewId viewId( TUid::Uid( KMCSCmailUidValue ), 
+                    TUid::Uid( KMCSCmailMailboxDefaultViewIdValue ) );
+            iVwsSession->CreateActivateViewEvent( viewId, 
+                    TUid::Uid( KMCSCmailUidValue ), KNullDesC8() );
             }
 
         }
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h	Wed Jun 09 10:01:25 2010 +0300
@@ -221,11 +221,12 @@
     
     /**
      * Get bookmark data item
+     * @param aUid, used for bookmark uid
      * @param aView, used for bookmark url
      * @param aParam, used for bookmark name
      * @param aData, is filled with appropriate values
      */
-    void GetBkmDataL( const TDesC8& aView, const TDesC8& aParam, CMCSData& aData );
+    void GetBkmDataL( const TDesC8& aUid, const TDesC8& aView, const TDesC8& aParam, CMCSData& aData );
 
     /**
      * Get folder data item
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -158,11 +158,6 @@
         }
 
     CMenuItem* item = iEngine->FetchMenuItemL( aData );
-    if ( !item )
-        {
-        User::Leave( KErrNotFound );
-        }
-
     CleanupStack::PushL( item );
     
     // One widget item has iDataCount number of elements
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -370,7 +370,7 @@
     CleanupStack::PushL( data );
     if( type == KProperValueBookmark )
         {
-        GetBkmDataL( view, param, *data );
+        GetBkmDataL( uid, view, param, *data );
         }
     else if( type == KProperValueFolder )
         {
@@ -392,9 +392,26 @@
 // Creates bookmark data item.
 // ---------------------------------------------------------------------------
 //
-void CMCSPluginData::GetBkmDataL( const TDesC8& aView, const TDesC8& aParam, CMCSData& aData )
+void CMCSPluginData::GetBkmDataL( const TDesC8& aUid, const TDesC8& aView, const TDesC8& aParam, CMCSData& aData )
     {
     TMenuItem item;
+        
+    if( aUid.Length() > 0 )
+        {
+        CMenuFilter* filter = CMenuFilter::NewLC();
+        HBufC* name( NULL );
+        HBufC* value( NULL );
+        name = AiUtility::CopyToBufferL( name, KProperNameUid );
+        CleanupStack::PushL( name );
+        value = AiUtility::CopyToBufferL( value, aUid );
+        CleanupStack::PushL( value );
+        filter->HaveAttributeL( *name, *value );  
+        CleanupStack::PopAndDestroy( value );
+        CleanupStack::PopAndDestroy( name );
+        item = iEngine.FindMenuItemL( *filter );
+        CleanupStack::PopAndDestroy( filter );    
+        }
+    
     item.SetType( KMenuTypeUrl );
     aData.SetMenuItem( item );
 
--- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -324,6 +324,14 @@
 CMenuItem* CMCSPluginEngine::FetchMenuItemL( CMCSData& aData )
     {
     CMenuItem* item = NULL;
+    
+    TRAP_IGNORE( item = CMenuItem::OpenL( iMenu, aData.MenuItem().Id() ) );
+    
+    if( item )
+        {
+        return item; 
+        }
+    
     if( aData.MenuItem().Type() == KMenuTypeUrl )
         {
         item = CreateBkmItemL( aData );
@@ -332,10 +340,6 @@
         {
         item = CreateMailboxItemL( aData);
         }
-    else
-        {        
-        item = CMenuItem::OpenL( iMenu, aData.MenuItem().Id() );
-        }
     
     return item;
     }
--- a/idlefw/plugins/profileplugin/inc/caiprofileengine.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/profileplugin/inc/caiprofileengine.h	Wed Jun 09 10:01:25 2010 +0300
@@ -37,6 +37,7 @@
 class MProEngProfileNameArray;
 
 class RSSSettings;
+class CAknQueryDialog;
 
 /**
  *  @ingroup group_profileplugin
@@ -190,6 +191,8 @@
     TBool iTimed;
     /** Flag to indicate whether active profile is silent */
     TBool iSilent;
+    /** Offline query dialog */
+    CAknQueryDialog* iOfflineQueryDialog;
     };
 
 #endif // CAIPROFILEENGINE_H
--- a/idlefw/plugins/profileplugin/src/caiprofileengine.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/profileplugin/src/caiprofileengine.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -137,6 +137,9 @@
 //
 CAiProfileEngine::~CAiProfileEngine()
     {
+    delete iOfflineQueryDialog;
+    iOfflineQueryDialog = NULL;
+    
     iSSSettings.CancelAll( *this );
     iSSSettings.Close();
     
@@ -276,9 +279,12 @@
 		}
 	else
 		{
-		CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-		
-		result = dlg->ExecuteLD( R_AI_LEAVE_OFFLINE_MODE_QUERY );	
+		if ( iOfflineQueryDialog == NULL )
+			{
+        	iOfflineQueryDialog = CAknQueryDialog::NewL();
+			result = iOfflineQueryDialog->ExecuteLD( R_AI_LEAVE_OFFLINE_MODE_QUERY );
+			iOfflineQueryDialog = NULL;
+			}
 		}
        
 	return result;
@@ -665,6 +671,13 @@
 //
 void CAiProfileEngine::HandleProfileActivatedL( TInt /*aProfileId*/ )
     {
+    // prevents duplicate offline notes on the screen.
+    if ( iOfflineQueryDialog )
+        {
+        delete iOfflineQueryDialog;
+        iOfflineQueryDialog = NULL;
+        }
+
     DetermineTimedAndSilentStatesL();
     
     NotifyContentUpdate();
--- a/idlefw/plugins/sapidataplugin/inc/sapidataplugin.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/inc/sapidataplugin.h	Wed Jun 09 10:01:25 2010 +0300
@@ -221,6 +221,14 @@
     TBool IsActive() const;
     
     /**
+    * Is plugin stopped 
+    *
+    * @param void 
+    * @return boolean (ETrue/EFalse)
+    */
+    TBool IsStopped() const;
+    
+    /**
 	* Publish a specific text of the widget  
 	*
 	* @param aObserver observer
@@ -253,6 +261,17 @@
     */
     void PublishImageL(MAiContentObserver* aObserver,
             TInt aContentId, TDesC& aPath );
+
+    /**
+    * Publish a data stream to the widget  
+    *
+    * @param aObserver observer
+    * @param aContentId content model id
+    * @param aData data stream 
+    * @return void
+    */    
+    void PublishData( MAiContentObserver* aObserver, 
+        TInt& aContentId, const TDesC8& aData );
     
     /**
     * Cleans a data from the widget
--- a/idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/inc/sapidatapluginconst.h	Wed Jun 09 10:01:25 2010 +0300
@@ -31,13 +31,13 @@
 /**
  * Content Model type identifier
  */
-_LIT(KText ,"text");
+_LIT(KText, "text");
 _LIT(KImage, "image");
-_LIT(KPlugin, "plugin");
+_LIT(KNewsTicker, "title");
+_LIT(KTextEditor, "texteditor");
+_LIT(KData, "data");
 
-_LIT(KNewsTicker ,"newsticker");
-_LIT(KTextEditor, "texteditor");
-
+_LIT(KPlugin, "plugin");
 
 // CPS Constants
 _LIT(KService,         "service");
--- a/idlefw/plugins/sapidataplugin/src/sapidata.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/src/sapidata.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -443,15 +443,18 @@
 		TLiwVariant variant;
 		HBufC8* itemName = CnvUtfConverter::ConvertFromUnicodeToUtf8L(*iItemList[pIndex]->iName);
 		CleanupStack::PushL( itemName );
+		
 		if ( aDataMap->FindL( *itemName, variant ) )
-		    {
-			TPtrC valPtr;
-			if(  iItemList[pIndex]->iType->Des() == KText )
+		    {			
+            const TDesC& type( *iItemList[pIndex]->iType );
+            TPtrC valPtr;
+            
+			if ( type == KText )
 				{
 				valPtr.Set( variant.AsDes() );
 				iPlugin->PublishTextL( aObserver, iItemList[pIndex]->iId, valPtr  );
 				}
-			else if( iItemList[pIndex]->iType->Des() == KImage )
+			else if( type == KImage )
 				{
 				TInt handle = KErrBadHandle;
                 TUint uintHandle = 0;
@@ -494,9 +497,18 @@
 					iPlugin->PublishImageL(aObserver, iItemList[pIndex]->iId, handle, maskHandle );
 					}
 				}
+			else if ( type == KData )
+			    {
+                TPtrC8 ptr;
+                
+                ptr.Set( variant.AsData() );
+                                
+                iPlugin->PublishData( aObserver, iItemList[pIndex]->iId, ptr );                
+			    }
 		    }
-			variant.Reset();
-			CleanupStack::PopAndDestroy( itemName );
+		
+        variant.Reset();
+        CleanupStack::PopAndDestroy( itemName );
 	    }
     }
 // ---------------------------------------------------------------------------
@@ -749,7 +761,7 @@
 //
 void CSapiData::UpdatePublisherStatusL( TDesC& aPublisher )
 	{
-	 if ( aPublisher == iPublisher )
+	 if ( aPublisher == iPublisher  && !iPlugin->IsStopped() )
         {
        // Resend the plugin status to publisher
         CLiwDefaultList* actionsToLaunch = CLiwDefaultList::NewLC();
--- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -149,7 +149,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// Publish a specific text of the widget  
+// Publish a specific text to the widget  
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::PublishTextL(MAiContentObserver* aObserver, 
@@ -174,7 +174,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// Publish a specific image of the widget  
+// Publish a specific image to the widget  
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::PublishImageL(MAiContentObserver* aObserver,
@@ -270,11 +270,11 @@
     }
 
 // ---------------------------------------------------------------------------
-// Publish a image of the widget  
+// Publish a image to the widget  
 // ---------------------------------------------------------------------------
 //
 void CSapiDataPlugin::PublishImageL(MAiContentObserver* aObserver, 
-        TInt& aContentId, TInt aHandle, TInt aMaskHandle )
+    TInt& aContentId, TInt aHandle, TInt aMaskHandle )
     {
     if ( aObserver->CanPublish( *this, aContentId , aContentId ) )
         {
@@ -303,7 +303,20 @@
                 aObserver->Clean( *this, aContentId, aContentId );
                 }
             }
-          }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Publish a data to the widget  
+// ---------------------------------------------------------------------------
+//
+void CSapiDataPlugin::PublishData( MAiContentObserver* aObserver, 
+    TInt& aContentId, const TDesC8& aData )
+    {
+    if ( aObserver->CanPublish( *this, aContentId, aContentId ) )
+        {                
+        aObserver->Publish( *this, aContentId, aData, aContentId );
+        }    
     }
 
 // ---------------------------------------------------------------------------
@@ -342,6 +355,10 @@
 				 {
 				 return KImage();
 				 }
+			 else if ( iContentModel[i].type == KAiContentTypeData )
+			     {
+                 return KData();
+			     }
 			 }
 		}
 	
@@ -570,15 +587,11 @@
 //
 void CSapiDataPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
     {
-    if ( iDataCount > 0 )
-        {
-        // We own the array so destroy it
-        aSettings.ResetAndDestroy();
-        return;
-        }
+    RAiSettingsItemArray contentItemsArr;    
+    CleanupClosePushL( contentItemsArr );
     
-    RAiSettingsItemArray contentItemsArr;    
     RAiSettingsItemArray configurationItemsArr;
+    CleanupClosePushL( configurationItemsArr );
     
     TInt count( aSettings.Count() );
     
@@ -598,68 +611,67 @@
     
     iDataCount = contentItemsArr.Count();
     
-    if ( iDataCount > 0 )
+    // Create the content Model
+    HBufC* contentId = HBufC::NewLC( 
+        KAiContentIdMaxLength + KAiPluginNameMaxLength );
+    
+    iContentModel = new TAiContentItem[iDataCount];
+    
+    for ( TInt i = 0; i < iDataCount; i++ )
         {
-        // Create the content Model
-        HBufC* contentId = HBufC::NewLC( 
-            KAiContentIdMaxLength + KAiPluginNameMaxLength );
+        MAiPluginContentItem& contentItem( 
+            contentItemsArr[i]->AiPluginContentItem() );
+        
+        iContentModel[i].id = i;
         
-        iContentModel = new TAiContentItem[iDataCount];
+        const TDesC& type( contentItem.Type() );
         
-        for ( TInt i = 0; i < iDataCount; i++ )
+        if ( type == KText() || type == KNewsTicker() ||                 
+            type == KTextEditor() )            
             {
-            MAiPluginContentItem& contentItem( 
-                contentItemsArr[i]->AiPluginContentItem() );
-            
-            iContentModel[i].id = i;
-            
-            if( contentItem.Type() == KText() || 
-                contentItem.Type() == KNewsTicker() ||
-                contentItem.Type() == KTextEditor() )            
-                {
-                // text
-                iContentModel[i].type = KAiContentTypeText;
-                }
-            if( contentItem.Type() == KImage() )
-                {
-                // image
-                iContentModel[i].type = KAiContentTypeBitmap;
-                }
+            // text
+            iContentModel[i].type = KAiContentTypeText;
+            }
+        else if ( type == KImage() )
+            {
+            // image
+            iContentModel[i].type = KAiContentTypeBitmap;
+            }
+        else if ( type == KData() )
+            {
+            // data stream 
+            iContentModel[i].type = KAiContentTypeData;
+            }
+        
+        contentId->Des().Copy( contentItem.Name() );
+        contentId->Des().Delete( 0, 
+            contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
+
+        TInt sizeOfContentId( contentId->Des().Size() + sizeof( wchar_t ) );
+        
+        iContentModel[i].cid = 
+            static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
             
-            contentId->Des().Copy( contentItem.Name() );
-            contentId->Des().Delete( 0, 
-                contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
-  
-            TInt sizeOfContentId( contentId->Des().Size() + sizeof( wchar_t ) );
-            
-            iContentModel[i].cid = 
-                static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
-                
-            Mem::Copy( ( TAny* )iContentModel[i].cid, 
-                contentId->Des().PtrZ(), sizeOfContentId );
-            
-            contentId->Des().Delete( 0, contentId->Des().Length() );
-            }    
+        Mem::Copy( ( TAny* )iContentModel[i].cid, 
+            contentId->Des().PtrZ(), sizeOfContentId );
         
-        CleanupStack::PopAndDestroy( contentId );
+        contentId->Des().Delete( 0, contentId->Des().Length() );
+        }    
+    
+    CleanupStack::PopAndDestroy( contentId );
 
-        iContent = AiUtility::CreateContentItemArrayIteratorL( 
-            iContentModel, iDataCount );
-    
-        iData->SetContentIdL( PublisherInfo().Namespace() );
-        
-        // Configurations 
-        iData->ConfigureL( configurationItemsArr );
+    iContent = AiUtility::CreateContentItemArrayIteratorL( 
+        iContentModel, iDataCount );
 
-        // Listen the publisher content update
-        iData->RegisterContentObserverL();              
-        }
+    iData->SetContentIdL( PublisherInfo().Namespace() );
     
-    contentItemsArr.Reset();
-    configurationItemsArr.Reset();
-   
-    // We own the array so destroy it
-    aSettings.ResetAndDestroy();    
+    // Configurations 
+    iData->ConfigureL( configurationItemsArr );
+
+    // Listen the publisher content update
+    iData->RegisterContentObserverL();              
+
+    CleanupStack::PopAndDestroy( 2, &contentItemsArr ); // configurationItemsArr
     }
 
 // ----------------------------------------------------------------------------
@@ -720,6 +732,16 @@
     }
 
 // ----------------------------------------------------------------------------
+// CSapiDataPlugin::IsStopped
+//
+// ----------------------------------------------------------------------------
+//
+TBool CSapiDataPlugin::IsStopped() const
+    {
+    return iPluginState == EStopped;
+    }
+
+// ----------------------------------------------------------------------------
 // CSapiDataPlugin::Data
 //
 // ----------------------------------------------------------------------------
@@ -740,3 +762,4 @@
     }
 
 // End of file
+
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h	Wed Jun 09 10:01:25 2010 +0300
@@ -59,9 +59,10 @@
      */
     enum TPluginStates
         {
-        ENone,
+        EStopped,
+        EStarted,
         EResume,
-        ESuspend
+        ESuspend    
         };
     
     /**
@@ -189,6 +190,14 @@
     TBool IsActive() const;
     
     /**
+    * Is plugin stopped 
+    *
+    * @param void 
+    * @return boolean (ETrue/EFalse)
+    */
+    TBool IsStopped() const;    
+    
+    /**
     * Publish a specific text of the widget  
     *
     * @param aObserver observer
@@ -341,8 +350,6 @@
     RFs iRfs;
     /** Timer for initial data republishing, owned */
     CPeriodic* iTimer;
-    /** Flag to indicate if this plugin is stopped */
-    TBool iStopped;
     };
 
 #endif // WRTDATAPLUGIN_H
--- a/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -130,29 +130,32 @@
 //
 void CWrtData::UpdatePublisherStatusL()
     {
-     // Resent the plugin status to publisher
-    CLiwDefaultList* actions= CLiwDefaultList::NewLC();
-    actions->AppendL( TLiwVariant( KActive ));
-     if ( iPlugin->IsActive() )
-         {
-         actions->AppendL( TLiwVariant( KResume ) );
-         }
-     else
-         {
-         actions->AppendL( TLiwVariant( KSuspend ));
-         }
-      // forward the network status if it uses.
-    if ( iPlugin->NetworkStatus() == CWrtDataPlugin::EOnline )
+    if ( !iPlugin->IsStopped() )
         {
-        actions->AppendL( TLiwVariant( KOnLine ));
+         // Resent the plugin status to publisher
+        CLiwDefaultList* actions= CLiwDefaultList::NewLC();
+        actions->AppendL( TLiwVariant( KActive ));
+         if ( iPlugin->IsActive() )
+             {
+             actions->AppendL( TLiwVariant( KResume ) );
+             }
+         else
+             {
+             actions->AppendL( TLiwVariant( KSuspend ));
+             }
+          // forward the network status if it uses.
+        if ( iPlugin->NetworkStatus() == CWrtDataPlugin::EOnline )
+            {
+            actions->AppendL( TLiwVariant( KOnLine ));
+            }
+        else if ( iPlugin->NetworkStatus() == CWrtDataPlugin::EOffline )
+            {
+            actions->AppendL( TLiwVariant(  KOffLine));
+            }
+    
+        ReSendNotificationL( actions );
+        CleanupStack::PopAndDestroy( actions );
         }
-    else if ( iPlugin->NetworkStatus() == CWrtDataPlugin::EOffline )
-        {
-        actions->AppendL( TLiwVariant(  KOffLine));
-        }
-
-    ReSendNotificationL( actions );
-    CleanupStack::PopAndDestroy( actions );
     }
 
 // ---------------------------------------------------------------------------
--- a/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -84,7 +84,7 @@
 // ----------------------------------------------------------------------------
 //
 CWrtDataPlugin::CWrtDataPlugin()
-    : iNetworkStatus( EUnknown ), iPluginState( ENone ) 
+    : iNetworkStatus( EUnknown ), iPluginState( EStopped ) 
     {
     }
     
@@ -138,7 +138,7 @@
 //
 void CWrtDataPlugin::Start( TStartReason aReason )
     {
-    iStopped = EFalse;
+    iPluginState = EStarted;
     
     if( aReason == ESystemStartup || 
         aReason == EPluginStartup )
@@ -155,13 +155,13 @@
 //
 void CWrtDataPlugin::Stop( TStopReason aReason )
     {
+    iPluginState = EStopped;
+    
     if( aReason == EPluginShutdown ||
         aReason == ESystemShutdown )
         {
         TRAP_IGNORE(iData->NotifyPublisherL( KDeActive ));
         }
-    
-    iStopped = ETrue;
     }
 
 // ----------------------------------------------------------------------------
@@ -171,7 +171,7 @@
 //
 void CWrtDataPlugin::Resume( TResumeReason aReason )
     {
-    if ( aReason == EForeground && !iStopped )
+    if ( aReason == EForeground && iPluginState != EStopped )
         {
         iPluginState = EResume;
 
@@ -186,7 +186,7 @@
 //
 void CWrtDataPlugin::Suspend( TSuspendReason aReason )
     {    
-    if ( aReason == EBackground && !iStopped )
+    if ( aReason == EBackground && iPluginState != EStopped )
         {
         iPluginState = ESuspend;
         
@@ -201,7 +201,7 @@
 //
 void CWrtDataPlugin::SetOnline()
     {    
-    if ( !iStopped )
+    if ( iPluginState != EStopped )
         {
         iNetworkStatus = EOnline;
         TRAP_IGNORE( iData->NotifyPublisherL( KOnLine ));                
@@ -215,7 +215,7 @@
 //
 void CWrtDataPlugin::SetOffline()
     {
-    if ( !iStopped )
+    if ( iPluginState != EStopped )
         {   
         iNetworkStatus = EOffline;
         TRAP_IGNORE( iData->NotifyPublisherL( KOffLine ));
@@ -239,13 +239,6 @@
 //
 void CWrtDataPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
     {
-    if( iDataCount > 0 )
-        {
-        // We own the array so destroy it
-         aSettings.ResetAndDestroy();
-         return;
-        }
-    
     RAiSettingsItemArray contentItemsArr;
     RAiSettingsItemArray configurationItemsArr;
     TInt count( aSettings.Count() );
@@ -265,63 +258,58 @@
         }
     
     iDataCount = contentItemsArr.Count();
+ 
+    // Create the content Model
+    HBufC16* contentId = HBufC16::NewLC( 
+        KAiContentIdMaxLength + KAiPluginNameMaxLength );
     
-    if ( iDataCount > 0 )
+    iContentModel = new TAiContentItem[iDataCount];
+    
+    for( TInt i = 0; i < iDataCount; i++ )
         {
-        // Create the content Model
-        HBufC16* contentId = HBufC16::NewLC( 
-            KAiContentIdMaxLength + KAiPluginNameMaxLength );
+        MAiPluginContentItem& contentItem( 
+            contentItemsArr[i]->AiPluginContentItem() );
         
-        iContentModel = new TAiContentItem[iDataCount];
-        
-        for( TInt i = 0; i < iDataCount; i++ )
+        iContentModel[i].id = i;
+        if( contentItem.Type() == KText() )
             {
-            MAiPluginContentItem& contentItem( 
-                contentItemsArr[i]->AiPluginContentItem() );
-            
-            iContentModel[i].id = i;
-            if( contentItem.Type() == KText() )
-                {
-                // text
-                iContentModel[i].type = KAiContentTypeText;
-                }
-            if( contentItem.Type() == KImage() || 
-        		contentItem.Type() == KAnimation() )
-                {
-                // image
-                iContentModel[i].type = KAiContentTypeBitmap;
-                }
+            // text
+            iContentModel[i].type = KAiContentTypeText;
+            }
+        if( contentItem.Type() == KImage() || 
+            contentItem.Type() == KAnimation() )
+            {
+            // image
+            iContentModel[i].type = KAiContentTypeBitmap;
+            }
+        
+        contentId->Des().Copy( contentItem.Name() );
+        contentId->Des().Delete( 0, 
+            contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
+
+        TInt sizeOfContentId( contentId->Des().Size()+sizeof( wchar_t ) );
+        
+        iContentModel[i].cid = 
+            static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
             
-            contentId->Des().Copy( contentItem.Name() );
-            contentId->Des().Delete( 0, 
-                contentId->Des().LocateReverse( KPluginNameSeprator ) + 1 );
-  
-            TInt sizeOfContentId( contentId->Des().Size()+sizeof( wchar_t ) );
-            
-            iContentModel[i].cid = 
-                static_cast< const wchar_t* >( User::Alloc( sizeOfContentId ) );
-                
-            Mem::Copy( ( TAny* )iContentModel[i].cid, 
-                contentId->Des().PtrZ(), sizeOfContentId );
-            
-            contentId->Des().Delete( 0, contentId->Des().Length() );
-            }    
+        Mem::Copy( ( TAny* )iContentModel[i].cid, 
+            contentId->Des().PtrZ(), sizeOfContentId );
         
-        CleanupStack::PopAndDestroy( contentId );
-        iContent = AiUtility::CreateContentItemArrayIteratorL( 
-                iContentModel, iDataCount );
-                       
-        // Configurations 
-        iData->ConfigureL( configurationItemsArr );
+        contentId->Des().Delete( 0, contentId->Des().Length() );
+        }    
+    
+    CleanupStack::PopAndDestroy( contentId );
+    iContent = AiUtility::CreateContentItemArrayIteratorL( 
+            iContentModel, iDataCount );
+                   
+    // Configurations 
+    iData->ConfigureL( configurationItemsArr );
 
-        iPluginState = ESuspend;
-
-        // Register for notifications
-        iData->RegisterL();
-        
-        // Activate the publisher 
-        iData->NotifyPublisherL( KActive );
-        }
+    // Register for notifications
+    iData->RegisterL();
+    
+    // Activate the publisher 
+    iData->NotifyPublisherL( KActive );
     
     contentItemsArr.Reset();
     configurationItemsArr.Reset();
@@ -375,7 +363,17 @@
 //
 TBool CWrtDataPlugin::IsActive() const
     {
-    return iPluginState == EResume && !iStopped;
+    return iPluginState == EResume;
+    }
+
+// ----------------------------------------------------------------------------
+// CWrtDataPlugin::IsStopped
+//
+// ----------------------------------------------------------------------------
+//
+TBool CWrtDataPlugin::IsStopped() const
+    {
+    return iPluginState == EStopped;
     }
 
 // ----------------------------------------------------------------------------
--- a/idlefw/src/idleint/aiuiidleintegration.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/idlefw/src/idleint/aiuiidleintegration.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -26,6 +26,7 @@
 #include <ctsydomainpskeys.h>
 #include <apgtask.h>
 
+
 // User includes
 #include <aisystemuids.hrh>
 #include <aiutility.h>
@@ -106,7 +107,9 @@
     
     iEikEnv.SetSystem( ETrue );
              
-    TInt wgId( iEikEnv.RootWin().Identifier() );
+    RWindowGroup& windowGroup = iEikEnv.RootWin();
+    windowGroup.AutoForeground(EFalse);
+    TInt wgId( windowGroup.Identifier() );
     TInt focusWgId( iEikEnv.WsSession().GetFocusWindowGroup() );
     
     if ( focusWgId == wgId )
@@ -218,6 +221,8 @@
 //
 void CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL()
 	{
+    __PRINTS( "*** CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL" );
+    
     if( !iIncallBubbleAllowed )
     	{
         TInt callStatus( 0 );
@@ -229,8 +234,11 @@
         // Call ongoing => show bubble
 	  	if( err == KErrNone && callStatus > EPSCTsyCallStateNone )
 	      	{
-	       	iIncallBubble->SetIncallBubbleAllowedInIdleL( ETrue );                	
-	       	iIncallBubbleAllowed = ETrue;
+			__PRINTS( "*** CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL - enable" );
+
+            iIncallBubble->SetIncallBubbleAllowedInUsualL( ETrue );
+            iIncallBubble->SetIncallBubbleAllowedInIdleL( ETrue );
+            iIncallBubbleAllowed = ETrue;
 	       	}    
     	}
 	}
@@ -241,11 +249,16 @@
 //
 void CAiUiIdleIntegrationImpl::ClearCallBubbleL()
 	{
+    __PRINTS( "*** CAiUiIdleIntegrationImpl::ClearCallBubbleL" );
+
 	 if( iIncallBubbleAllowed )
     	{
+         __PRINTS( "*** CAiUiIdleIntegrationImpl::ClearCallBubbleL - disable" );
+
     	iIncallBubble->SetIncallBubbleAllowedInIdleL( EFalse );
+    	iIncallBubble->SetIncallBubbleAllowedInUsualL( EFalse );
     	iIncallBubbleAllowed = EFalse;
-    	}        
+    	}
 	}
     
 // ----------------------------------------------------------------------------
@@ -279,34 +292,16 @@
 	if ( err == KErrNone )
 		{
 		// Call ongoing => show bubble if not showing already
-		TBool allowed = EFalse;
-		
 		if ( !self->iIncallBubbleAllowed &&
 		     self->iForeground &&
 		    ( callStatus > EPSCTsyCallStateNone ) )
 			{
-			allowed = ETrue;
-    		
-			TRAP( err, 
-                self->iIncallBubble->SetIncallBubbleAllowedInIdleL( allowed ) );
-			            		
-			if ( err == KErrNone )
-    		    {
-    			self->iIncallBubbleAllowed = allowed;
-    		    }
+            TRAP_IGNORE( self->SetCallBubbleIfNeededL() );
 			}
 		// No call ongoing => hide if bubble is visible			
 		else if ( self->iIncallBubbleAllowed && callStatus <= EPSCTsyCallStateNone )
 			{
-			allowed = EFalse;
-			
-    		TRAP( err, 
-                self->iIncallBubble->SetIncallBubbleAllowedInIdleL( allowed ) );
-    		
-    		if ( err == KErrNone )
-    		    {
-    			self->iIncallBubbleAllowed = allowed;
-    		    }
+    		TRAP_IGNORE( self->ClearCallBubbleL() );
 			}
 		}
 	
--- a/inc/aisystemuids.hrh	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2005-2006 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:  UIDs for the Active Idle subsystem components.
-*
-*/
-
-
-#ifndef AISYSTEMUIDS_HRH
-#define AISYSTEMUIDS_HRH
-
-/**
- * AI3 Test Application.
- */
-#define AI3_UID_EXE_TEST_APPLICATION 0x2001CB4F
-
-/**
- * Ecom implementation uid for XML UI controller.
- */
-#define AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML 0x2001952C
-#define AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML 0x102750F2
-
-/**
- * Ecom implementation uid for native UI controller.
- */
-#define AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE 0x2001952E
-#define AI_UID_ECOM_IMPLEMENTATION_UICONTROLLER_NATIVE 0x102750F4
-
-/**
- * Ecom implementation uid for Device Status plugin.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN 0x102750F8
-
-/**
- * Ecom implementation uid for Device Status plugin.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SHORTCUTPLUGIN 0x102750FA
-
-/**
- * Ecom implementation uid for AI Profile plug-in.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PROFILEPLUGIN 0x10275101
-
-/**
- * Ecom implementation uid for sat plugin.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN 0x102078EB
-
-/**
- * Ecom dll uid for XML UI controller.
- */
-#define AI3_UID_ECOM_DLL_UICONTROLLER_XML 0x2001952A
-#define AI_UID_ECOM_DLL_UICONTROLLER_XML 0x102750F1
-
-
-/**
- * Ecom dll uid for native UI controller.
- */
-#define AI3_UID_ECOM_DLL_UICONTROLLER_NATIVE 0x2001952D
-#define AI_UID_ECOM_DLL_UICONTROLLER_NATIVE 0x102750F3
-
-/**
- * Ecom dll uid for device status plugin.
- */
-#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_DEVSTAPLUGIN 0x102750F7
-
-/**
- * Common UID3 for Active Idle framework components.
- */
-#define AI_UID3_AIFW_COMMON 0x102750F0
-
-/**
- * Uid3 for AI framework dll.
- */
-#define AI_UID3_AIFW_DLL AI_UID3_AIFW_COMMON
-
-/**
- * Uid3 for AI framework launcher exe.
- */
-#define AI_UID3_AIFW_EXE AI_UID3_AIFW_COMMON
-
-/**
- * SID for aifw launcher exe.
- */
-#define AI_SID_AIFW_EXE AI_UID3_AIFW_EXE
-
-/**
- * Uid3 for AI Voice Dial UI.
- */
-#define AI_UID3_VOICE_DIAL_UI 0x101F8543
-
-/**
- * Uid3 for ai3 layoutengine
- */
-#define AI3_UID_LAYOUT_ENGINE 0x2001CB50
-
-/**
- * Uid3 for ai3 utils
- */
-#define AI3_UID_UTILS 0x2001CB51
-
-/**
- * Uids for rendering plugins
- */
-#define AI3_UID_RENDERING_PLUGIN_BITMAPFACTORY 0x2001952F
-#define AI3_UID_RENDERING_PLUGIN_BITMAPFACTORY_IMPLEMENTATION 0x20019530
-
-#define AI3_UID_RENDERING_PLUGIN_MENUFACTORY 0x20019582
-#define AI3_UID_RENDERING_PLUGIN_MENUFACTORY_IMPLEMENTATION 0x20019583
-
-#define AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY 0x20019584
-#define AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY_IMPLEMENTATION 0x20019585
-
-#define AI3_UID_RENDERING_PLUGIN_NPPLUGINFACTORY 0x20019586
-#define AI3_UID_RENDERING_PLUGIN_NPPLUGINFACTORY_IMPLEMENTATION 0x20019587
-
-#define AI3_UID_RENDERING_PLUGIN_POPUPFACTORY 0x20019588
-#define AI3_UID_RENDERING_PLUGIN_POPUPFACTORY_IMPLEMENTATION 0x20019589
-
-#define AI3_UID_RENDERING_PLUGIN_TEXTFACTORY 0x2001958A
-#define AI3_UID_RENDERING_PLUGIN_TEXTFACTORY_IMPLEMENTATION 0x2001958B
-
-#define AI3_UID_RENDERING_PLUGIN_CLOCKFACTORY 0x2001CB52
-#define AI3_UID_RENDERING_PLUGIN_CLOCKFACTORY_IMPLEMENTATION 0x2001CB52
-
-#define AI3_UID_RENDERING_PLUGIN_VIEWFACTORY 0x2001958E
-#define AI3_UID_RENDERING_PLUGIN_VIEWFACTORY_IMPLEMENTATION 0x2001958F
-
-#define AI3_UID_RENDERING_PLUGIN_VOLUMECONTROLFACTORY 0x20019590
-#define AI3_UID_RENDERING_PLUGIN_VOLUMECONTROLFACTORY_IMPLEMENTATION 0x20019591
-
-#define AI3_RENDERING_PLUGIN_ECOM_FACTORY_UID 0x20019592
-
-#define AI3_EXTERNAL_RENDERING_PLUGIN_ECOM_UID 0x200286DF
-
-#define AI3_UID_RENDERING_PLUGIN_TEXTEDITORFACTORY 0x20022FD3
-#define AI3_UID_RENDERING_PLUGIN_TEXTEDITORFACTORY_IMPLEMENTATION 0x20022FD3
-
-#define AI3_UID_RENDERING_PLUGIN_ANIMATIONFACTORY 0x200286E2
-#define AI3_UID_RENDERING_PLUGIN_ANIMATIONFACTORY_IMPLEMENTATION 0x200286E2
-
-#endif // AISYSTEMUIDS_HRH
-
-
--- a/menucontentsrv/enginc/menueng.h	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/enginc/menueng.h	Wed Jun 09 10:01:25 2010 +0300
@@ -145,7 +145,7 @@
     * @return Current state.
     */
 	inline TState State() const;
-	
+
 	/*
 	* Gets legacy format
 	* @return legacy format
@@ -264,15 +264,18 @@
     IMPORT_C CMenuEngObject& ModifiableObjectL( TInt aId,
     		TInt aEvent = RMenuNotifier::EItemAttributeChanged );
 
-    
+
     /**
     * Append new notification to the list of pending notifications.
     * @param aFolder Folder.
     * @param aEvents Events.
     */
     IMPORT_C void AppendNotifyL( TInt aFolder, TInt aEvents );
-    
-    
+
+    /**
+    * Checks if object exists and is not hidden nor missing.
+    * @param aId item id.
+    */
     IMPORT_C TBool Exist( TInt aId ) const;
 
 private:    // from CActive
@@ -306,7 +309,7 @@
     * Called when there's an error during parsing / saving.
     * @param aErrorCode Error code
     */
-    void HandleEngineErrorL( TInt aErrorCode );        
+    void HandleEngineErrorL( TInt aErrorCode );
 
 private:    // types
 
@@ -493,7 +496,7 @@
 // -----------------------------------------------------------------------------
 // CMenuEng::State
 // -----------------------------------------------------------------------------
-// 
+//
 CMenuEng::TState CMenuEng::State() const
     {
     return iState;
--- a/menucontentsrv/engsrc/menueng.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/engsrc/menueng.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -567,7 +567,7 @@
     }
 
 
-	
+
 // ---------------------------------------------------------
 // CMenuEng::AppendNotifyL
 // ---------------------------------------------------------
@@ -591,17 +591,19 @@
 //
 EXPORT_C TBool CMenuEng::Exist( TInt aId ) const
     {
-    MXCFWNode* node = NULL;
+    TBool exists(EFalse);
     const RNodeArray& nodes = iTree->Nodes();
     for ( TInt i = 0; i < nodes.Count(); i++ )
         {
-        node = nodes[i];
-        if ( aId == Object( *node ).Id() )
+        CMenuEngObject& object = Object( *nodes[i] );
+        if ( aId == object.Id()
+                && !( ( object.Flags() & TMenuItem::EHidden )
+                        || ( object.Flags() & TMenuItem::EMissing ) ) )
             {
-            return ETrue;
+            exists = ETrue;
             }
         }
-    return EFalse;
+    return exists;
     }
 // ---------------------------------------------------------
 // CMenuEng::RunL
@@ -718,13 +720,13 @@
             if ( iActiveWait->IsStarted() )
                 {
                 iActiveWait->AsyncStop();
-                }  
-                
+                }
+
             iState = EDead;
             iObserver.EngineError( aError );
             // Can't delete the tree now, XCFW Engine keeps a pointer to it
             // and still uses it even after reporting the error. :(
-         
+
             break;
             }
 
@@ -785,9 +787,9 @@
             if ( iActiveWait->IsStarted() )
                 {
                 iActiveWait->AsyncStop();
-                }         
-            
-            TBool legacyFormat = iObjectFactory->IsLegacyFormat();                        
+                }
+
+            TBool legacyFormat = iObjectFactory->IsLegacyFormat();
             // Reset object factory in all cases.
             iObjectFactory->Reset();
             // Tree is up (maybe unsaved yet).
@@ -1130,7 +1132,7 @@
     TraverseNodeL( aRootNode, idManagerInit );
     // Make sure all nodes have ID.
     TMenuEngIdSetter idSetter( *iIdManager );
-    TraverseNodeL( aRootNode, idSetter ); 
+    TraverseNodeL( aRootNode, idSetter );
     }
 
 // ---------------------------------------------------------
@@ -1220,7 +1222,7 @@
     __ASSERT_DEBUG( !iTree, User::Invariant() );
     iTree = CXCFWTree::NewL();
     // Legacy xml format supported only if the xml is from rom:
-    iObjectFactory->SupportLegacyFormat( EFalse ); 
+    iObjectFactory->SupportLegacyFormat( EFalse );
     iEngine->LoadL( *iTree, iRamFileName );
     }
 
@@ -1238,7 +1240,7 @@
     delete iTree; iTree = NULL;
     iTree = CXCFWTree::NewL();
     // Legacy xml format supported only if the xml is from rom:
-    iObjectFactory->SupportLegacyFormat( ETrue ); 
+    iObjectFactory->SupportLegacyFormat( ETrue );
     iEngine->LoadL( *iTree, fname );
     }
 
@@ -1378,4 +1380,4 @@
         }
     }
 
-//  End of File  
+//  End of File
--- a/menucontentsrv/group/mcsmenu.mmp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/group/mcsmenu.mmp	Wed Jun 09 10:01:25 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  
-*  Version     : %version: sa1spcx1#11.1.7.1.7 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: sa1spcx1#11.1.7.1.8 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -80,12 +80,6 @@
 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          mcsgetlistcreatorinterface.cpp
 SOURCE          mcsgetlisthandler.cpp
--- a/menucontentsrv/handlersrc/menuuninstalloperation.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/handlersrc/menuuninstalloperation.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -265,6 +265,7 @@
 	                found = ETrue;
 	                }
 	            }
+	        packageFiles.ResetAndDestroy();
 	        CleanupStack::PopAndDestroy( &packageEntry );    
         	}
         }
--- a/menucontentsrv/srvinc/mcsgetlistcreatorinterface.h	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvinc/mcsgetlistcreatorinterface.h	Wed Jun 09 10:01:25 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -11,7 +11,7 @@
 *
 * 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
 *
 */
@@ -27,51 +27,6 @@
 class CLiwDefaultMap;
 class CMenuSrvEng;
 
-
-/**
- * CMcsGetAttrStrategy
- * Abstract class for sttribute getting strategy
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( CMcsGetAttrStrategy ): public CBase
-	{
-public:
-
-	/**
-	 * Constructor.
-	 */
-	CMcsGetAttrStrategy( CMenuSrvEng& aEng );
-
-	/**
-	 * Destructor.
-	 */
-	virtual ~CMcsGetAttrStrategy();
-
-
-	/**
-	 * TODO: add comment
-	 */
-	virtual void PrepareL(TInt aId) = 0;
-
-	/**
-	 * Get attribute value.
-	 * @since S60 v5.0
-	 * @param aAttrName Attribute name.
-	 * @param aAttrExists Will be set to indicate whether attribute exists
-	 * or not.
-	 * @return Attribute value. Empty string if attribute does not exist.
-	 */
-	virtual void GetAttributeL(const TDesC& aAttrName,
-	        TBool& aAttrExists, TDes& aAttrVal ) = 0;
-
-protected:
-	/**
-	 * Engine. not own
-	 */
-	CMenuSrvEng& iEng;
-	};
-
-
 /**
  *  Interface for creating list containg result for getlist operation
  *
@@ -195,15 +150,13 @@
 	/*
 	 * Sets actual attribute getting strategy for give item id.
 	 */
-	void SetGetterStrategyL(TInt aId);
+	void SetItemIdL(TInt aId);
 
 protected:
 	/**
 	 * Engine. not own
 	 */
 	CMenuSrvEng& iEng ;
-	CMcsGetAttrStrategy* iActualGetter; ///< Actual strategy for item.
-	CMcsGetAttrStrategy* iSuiteGetter;  ///< Get strategy for suite. Own.
-	CMcsGetAttrStrategy* iNormalGetter; ///< Get strategy for not suite. Own.
+    TInt iId; ///< a id of an item.
     };
 #endif __MCSGETLISTCREATORINTERFACE_H__
--- a/menucontentsrv/srvinc/mcssuitehandler.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-#ifndef MCSSUITEHANDLER_H_
-#define MCSSUITEHANDLER_H_
-
-#include <e32base.h>
-#include <f32file.h>
-
-
-#include "menusvrsuite.h"
-#include "mcsinstallnotifier.h"
-#include "menuengoperation.h"
-#include "mcsmmcobserver.h"
-#include "mcsfreespaceobserver.h"
-
-class CMenuEng;
-class TMenuItem;
-
-/**
- *  Suite Handler.
- *  @lib mcsdrmhandler.lib
- *  @since S60 v5.0
- */
-NONSHARABLE_CLASS( CMcsSuiteHandler ): 
-    public CBase, MMcsInstallListener, MMenuEngOperation, MMcsMmcObserver,
-        MMcsFreeSpaceObserver
-    {
-public:
-    
-    /**
-    * Two-phased constructor. Leaves on failure.
-    * @return The constructed object.
-    */
-    static CMcsSuiteHandler* NewL( 
-        CMenuEng& aEng, const TDesC& aDirName );
-    
-    /**
-    * Destructor.
-    * @since S60 v5.0
-    * @capability None.
-    * @throws None.
-    * @panic None.
-    */
-    virtual ~CMcsSuiteHandler();
-    
-    /**
-     * Check if suite of given name is present
-     * in handler.
-     */
-    TBool HaveSuite(const TDesC& aSuiteName);
-    
-    /**
-     * Get attribute from suite handler.
-     */
-    void GetAttribute( const TDesC& aSuiteName, const TDesC& aAttrName, 
-               TBool& aAttrExists, TDes& aAttrVal );
-    
-private:
-
-    /**
-    * Execute engine operation:
-    * Do the application scan and update menu accordingly.
-    */
-    void RunMenuEngOperationL();
-    void CompletedMenuEngOperation( TInt aErr );
-    /**
-    * Constructor.
-    */
-	CMcsSuiteHandler( CMenuEng& aEng );
-
-    /**
-    * 2nd phase constructor.
-    */
-    void ConstructL(const TDesC& aDirName);
-    
-    /**
-     * Handle Install Event
-     */
-    void HandleInstallNotifyL(TInt aEvent);
-    
-    /**
-     * Handle Mmc Event
-     */
-    void HandleMmcEventL(TInt aEvent);
-    
-    /**
-     * Handle Free Space Event.
-     */
-    void HandleFreeSpaceEventL();
-    /**
-     * Lists new suits
-     */
-    void CheckSuiteDirL();
-    
-    /**
-     * Add new suits
-     */
-    void AddNew();
-    
-    /**
-     * Remove old suits 
-     */
-    void RemoveOld();
-    
-	/**
-	* Removes not installed suites from content xml file(basically during restore) 
-	* @since S60 v5.0.
-	*/
-    void ScanSuitesL();
-    
-    
-    /**
-     * Check if file is installed
-     */
-    TBool FileInstalled(const TDesC& aFileName);
-    
-    /**
-     * Check if file was removed from installed file list
-     */
-    TBool FileUninstalled(const TDesC& aFileName);
-    
-    /**
-     * Check if file need Update
-     * @param aTimestamp - actual timestamp of file 
-     */
-    TBool FileNeedUpdate(const TDesC& aFileName, const TTime& aTimestamp);
-
-    /**
-     * Validates file extansion
-     */
-    TBool ValidExtansion(const TDesC& aFileName);
-    
-    /**
-     * Install file with suites
-     */
-    void InstallFileL(const TDesC& aFileName, const TTime& aTimestam);
-    
-    /**
-     * Removes file with suites
-     */
-    void UninstallFileL(const TDesC& aFileName);
-    
-    /**
-     * Update file with suites
-     */
-    void UpdateFileL(const TDesC& aFileName, const TTime& aTimestam);
-    
-    /**
-     * Get suites from a file
-     */
-    void GetSuitesL(const TDesC& aFileName, RPointerArray<CSuiteObject>& aSuiteArray);
-    
-    /*
-     * Reopen older suite. Used when deleteing suite that was replaced by newer one.
-     */
-    void ReopenSuiteL(TInt aSuiteArrayPos);
-
-	/**
-	* Append suite items to array
-	* @since S60 v5.0.
-	* @param aItemArray array to append suite items 
-	* @param aAttrName attribute name
-	* @param aAttrValue attribute value
-	*/
-    void GetMenuSuitesL( 
-    		RArray<TMenuItem>& aItemArray, 
-    		const TDesC& aAttrName, 
-    		const TDesC& aAttrValue );
-
-    
-    /**
-     * Addes or updates suite
-     */
-    void AddSuiteL( const TPtrC& aSuiteName );
-  
-    /**
-     * Removes suite
-     */
-    void RemoveSuiteFromXmlL( const TPtrC& aSuiteName );
-    
-	/**
-	* Updates suites in content xml file
-	* @since S60 v5.0.
-	* @param aMcsItems suite items
-	* @param aIndex index of suite item to update
-	*/
-    void UpdateSuiteInXmlL( 
-    		RArray<TMenuItem> & aMcsItems, 
-    		TInt aIndex );
-    
-    /**
-     * Addes suite to main xml file
-     */
-    void AddSuiteToXmlL( const TPtrC& aSuiteName );
-    
-    
-    void UpdateItemsL( const RArray<TMenuItem>& aItemArray );
-    
-private:    // data
-    CMenuEng& iEng ; ///< Engine. Not Own.
-    RFs iFs; ///< File Server. Own.
-    RBuf iDirPath; ///< Path to observerd dir. Own.
-    CDesCArrayFlat* iFileNewList; ///< List of new files in dir. Own.
-    CDesCArrayFlat* iInstalledFileList; ///< List of installed suites. Own.
-    RArray<TTime> iNewTimestamps; ///< List of current files' timestamps. Own.
-    RArray<TTime> iTimestamps; ///< List of files' timestamps when isntalled. Own.
-    CMcsInstallNotifier* iInstallNotifier; ///< Own
-    CMcsMmcObserver* iMmcObserver;
-    CMcsFreeSpaceObserver* iFreeSpaceObserver; /// Free space observer. Own.
-    RMenuSrvSuiteArray iSuites; ///< Suite array. Own.
-    TInt iEvent;/// < last event. Own
-    };
-
-#endif /* MCSSUITEHANDLER_H_ */
--- a/menucontentsrv/srvinc/mcssuiteobject.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-#ifndef SUITEOBJECT_H
-#define SUITEOBJECT_H
-
-#include <e32base.h>
-#include "mcssuiteobjectattr.h"
-
-/**
-* Menu Engine Object attribute.
-*/
-NONSHARABLE_CLASS( CSuiteObject ): public CBase
-    {
-
-public:     // construction
-
-    /**
-    * Destructor.
-    */
-    virtual ~CSuiteObject();
-
-    /**
-    * Two-phased constructor.
-    * @param aFileName File Name.
-    * @return The created object.
-    */
-    static CSuiteObject* NewL( const TDesC& aFileName );
-
-    /**
-    * Two-phased constructor.
-    * @param aFileName File Name.
-    * @return The created object.
-    */
-    static CSuiteObject* NewLC( const TDesC& aFileName );
-
-protected:  // construction
-
-	/**
-	 * Constructor
-	 */
-	CSuiteObject();
-	
-	/**
-	 * 2nd phase constructor.
-	 * @param aFileName File Name.
-	 */
-	void ConstructL( const TDesC& aFileName );
-
-public:     // new methods
-
-    /**
-    * Get file name.
-    * @return file name.
-    */
-    TPtrC FileName() const { return iFileName; }
-    
-    /**
-    * Get suite name.
-    * @return suite name.
-    */
-    TPtrC SuiteName() const { return iName; }
-
-    /**
-    * Set suite name.
-    * @param aName Name.
-    */
-    void SetSuiteNameL( const TDesC& aName );
-
-    /**
-    * Set attribute.
-    * @param aAttrName atrribute name.
-    * @param aAttrValue atrribute value.
-    * @param aLocalized localisation of attribute.
-    */
-    void SetInitialAttributeL( const TDesC& aAttrName, 
-    		const TDesC& aAttrValue,
-    		TBool aLocalized );
-
-    void GetAttribute( const TDesC& aAttrName, 
-    		TBool& aAttrExists, TDes& aAttrVal );
-    
-    /**
-    * Reset, destroy and close iAttributes array.
-    */
-    void CloseSuiteArray();
-    
-    
-private:    // data
-    
-    RBuf iFileName; ///<File name. Own.
-    RBuf iName; ///< Name. Own.
-    RSuiteAttrArray iAttributes; ///< Attributes. Own.
-
-    };
-
-
-#endif // SUITEOBJECT_H
--- a/menucontentsrv/srvinc/mcssuiteobjectattr.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-#ifndef SUITEOBJECTATTR_H
-#define SUITEOBJECTATTR_H
-
-#include <e32base.h>
-
-/**
-* Menu Engine Object attribute.
-*/
-NONSHARABLE_CLASS( CSuiteObjectAttr ): public CBase
-    {
-
-public:     // construction
-
-    /**
-    * Destructor.
-    */
-    virtual ~CSuiteObjectAttr();
-
-    /**
-    * Two-phased constructor.
-    * @param aName Name.
-    * @return The created object.
-    */
-    static CSuiteObjectAttr* NewL( const TDesC& aName );
-
-    /**
-    * Two-phased constructor.
-    * @param aName Name.
-    * @return The created object.
-    */
-    static CSuiteObjectAttr* NewLC( const TDesC& aName );
-
-protected:  // construction
-
-	/**
-	 * Constructor
-	 */
-	CSuiteObjectAttr();
-	
-	/**
-	 * 2nd phase constructor.
-	 * @param aName Name.
-	 */
-	void ConstructL( const TDesC& aName );
-
-public:     // new methods
-
-    /**
-    * Get name.
-    * @return Name.
-    */
-    TPtrC Name() const { return iName; }
-
-    /**
-    * Get value.
-    * @return Value.
-    */
-    TPtrC Value() const { return iValue; }
-
-    /**
-    * Set (or replace) value.
-    * @param aValue Value.
-    */
-    void SetValueL( const TDesC& aValue );
-
-    /**
-    * Get localized status.
-    * @return ETrue if localized.
-    */
-    TBool Localized() const { return iLocalized; }
-
-    /**
-    * Set localized status.
-    * @param aLocalized ETrue if localized.
-    */
-    void SetLocalized( TBool aLocalized ) { iLocalized = aLocalized; }
-
-private:    // data
-    
-    RBuf iName; ///< Name. Own.
-    RBuf iValue; ///< Value. Own.
-    TBool iLocalized; ///< Localized status.
-
-    };
-
-/**
-* Array of CSuiteObjectAttr-s.
-*/
-NONSHARABLE_CLASS( RSuiteAttrArray )
-: public RPointerArray<CSuiteObjectAttr>
-    {
-
-public:     // new methods
-
-    /**
-    * Find attribute by name.
-    * @param aName Name.
-    * @return Index of attribute, or KErrNotFound.
-    */
-    TInt Find( const TDesC& aName ) const;
-
-    };
-
-#endif // SUITEOBJECTATTR_H
--- a/menucontentsrv/srvinc/mcssuiteobjectfactory.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-#ifndef __SUITEOBJECTFACTORY_H__
-#define __SUITEOBJECTFACTORY_H__
-
-#include <e32base.h>
-// FORWARD DECLARATION
-
-class CGECODefaultObjectFactory;
-class MGECOAttributeProvider;
-
-/**
-* Menu Engine Object factory.
-*/
-NONSHARABLE_CLASS( CSuiteObjectFactory ): public CGECODefaultObjectFactory
-    {
-
-public:     // construction
-
-    /**
-    * Destructor.
-    */
-    virtual ~CSuiteObjectFactory();
-
-    /**
-    * Two-phased constructor.
-    * @return The created object.
-    */
-    static CSuiteObjectFactory* NewL( );
-
-protected:  // construction
-
-    /**
-    * Constructor.
-    */
-    CSuiteObjectFactory();
-
-public:    // from CGECOObjectFactoryBase
-
-    /**
-    * Initializes the current object with attribute provider data.
-    * @param aAttributeProvider Attribute provider for data initialization.
-    */
-    void InitializeObjectL(
-        MGECOAttributeProvider& aAttributeProvider );
-
-    };
-
-#endif // __SUITEOBJECTFACTORY_H__
--- a/menucontentsrv/srvinc/mcssuiteparser.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-#ifndef SUITEPARSER_H
-#define SUITEPARSER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <xcfwengine.h>
-
-// FORWARD DECLARATIONS
-class CXCFWTree;
-class CSuiteObject;
-class RSuiteObjectArray;
-class CSuiteObjectFactory;
-
-// CLASS DECLARATION
-
-/**
- *  CSuiteParser
- * 
- */
-NONSHARABLE_CLASS( CSuiteParser ) : public CBase, public MXCFWEngineObserver
-	{
-public:
-    //event enumeration
-
-    enum TSuiteParsingStatus // statuses
-
-        {
-        ECompleted = 0, // factory settings completed successfully
-        EFailed = -1 // factory settings failed
-        };
-	
-public:
-	// Constructors and destructor
-
-	/**
-	 * Destructor.
-	 */
-	~CSuiteParser();
-
-	/**
-	 * Two-phased constructor.
-	 * @param aFileName a xml file to parse.
-	 */
-	static CSuiteParser* NewL( const TDesC& aFileName );
-
-	/**
-	 * Two-phased constructor.
-	 * @param aFileName a xml file to parse.
-	 */
-	static CSuiteParser* NewLC( const TDesC& aFileName );
-
-	/**
-	 * Gets suites array
-	 * @param aSuitesArray array that wil be filled with suites.
-	 */
-	TInt GetSuitsArrayL( RPointerArray<CSuiteObject>& aSuitesArray );
-
-private:
-
-	/**
-	 * Constructor for performing 1st stage construction
-	 */
-	CSuiteParser();
-
-	/**
-	 * EPOC default constructor for performing 2nd stage construction
-	 * @param aFileName a xml file to parse.
-	 */
-	void ConstructL( const TDesC& aFileName );
-	
-    /**
-     * Handles the "entries" node.
-     * @param aSuitesArray array that wil be filled with suites.
-     */
-    void HandleEntriesL( RPointerArray<CSuiteObject>& aSuitesArray );
-    
-	/**
-	 * Creats suite object from node in xml file
-	 * @param aNode that contains suite's data.
-	 */
-    CSuiteObject* CreateSuiteLC( MXCFWNode* aNode );
-
-
-public:
-    // Functions from base classes
-
-    /**
-     * Called when Engine parsing / saving state changes
-     * User can do desired actions on corresponding events.
-     * @param aEvent Engine event.
-     */
-    virtual void HandleEngineEventL( TXCFWEngineEvent aEvent );
-
-    /**
-     * Called when there's an error during parsing / saving
-     * @param aErrorCode Error code from engine
-     */
-    virtual void HandleEngineErrorL( TInt aErrorCode );
-    
-    /**
-     * Called when the file parsing is finished
-     * 
-     * @param aStatus parsing status.
-     */
-    void HandleCompletionL( TSuiteParsingStatus aStatus );
-	
-private:    // data
-	
-    /**
-     * Name of a file to parse. Own.
-     */
-	RBuf iFileName;
-	
-    /**
-     * Content engine. Own.
-     */
-	CXCFWEngine* iContentEngine;
-	
-    /**
-     * Content tree. Own.
-     */
-    CXCFWTree* iContentTree;
-	
-    /**
-     * scheduler for make synchronous restoration
-     */
-    CActiveSchedulerWait* iActiveScheduler;
-
-    /**
-     * Status of parsing
-     */
-    TSuiteParsingStatus iCompletionStatus;
-	
-    /**
-     * Factory object needed for localised attributes. Own.
-     */
-    CSuiteObjectFactory* iObjectFactory;
-    
-	};
-
-
-#endif // SUITEPARSER_H
--- a/menucontentsrv/srvinc/menusrvappscanner.h	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvinc/menusrvappscanner.h	Wed Jun 09 10:01:25 2010 +0300
@@ -275,6 +275,13 @@
     void HandleMissingItemsL( const RArray<TMenuItem>& aItems );
 
     /**
+    * Returns proper flag to be set for missing or hidden item.
+    * @param aItem menu item.
+    * @return item proper flags for hidding.
+    */
+    TMenuItem::TFlags GetProperFlagL( const TMenuItem& aItem );
+
+    /**
     * Updates objects flags to aFlagPresent if needed.
     * @param aFlagValue value for flag.
     * @param aItem menu item.
--- a/menucontentsrv/srvinc/menusrveng.h	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvinc/menusrveng.h	Wed Jun 09 10:01:25 2010 +0300
@@ -38,10 +38,9 @@
 class CMcsCacheHandler;
 class CMcsChildrenHandler;
 class CMcsRunningAppsHandler;
-class CMcsSuiteHandler;
 class CMcsGetlistHandler;
 /**
-* In release code the macro must be undefined and application 
+* In release code the macro must be undefined and application
 * scanning must be enabled!
 * Define the macro only for testing purposes!
 */
@@ -126,20 +125,20 @@
     * self-deletion is scheduled.
     */
     void RemoveSession( CMenuSrvSession* aSession );
-    
-    
+
+
     /**
     * Get attribute name list.
     * @since S60 v5.0
     * @param aList Attribute name list.
     * @throws System-wide error codes if an error occurs.
     * @panic None.
-    * 
+    *
     */
     void GetAttributeListL(
   		  TInt aId,
   		  RArray<TPtrC>& aList );
-    
+
     /**
     * Get attribute value.
     * @since S60 v5.0
@@ -150,28 +149,21 @@
     */
     TPtrC GetAttributeL( TInt aId, const TDesC& aAttrName, TBool& aAttrExists );
 
-    void GetAttributeL( TInt aId, const TDesC& aAttrName, 
+    void GetAttributeL( TInt aId, const TDesC& aAttrName,
         TBool& aAttrExists, TDes& aAttrVal );
 
-    //TODO: Add comment
-    TBool InstalledSuiteExist( const TDesC& aSuiteName );
-    
-    //TODO: Add comment
-    void GetSuiteAttribute( const TDesC& aSuiteName, const TDesC& aAttrName, 
-            TBool& aAttrExists, TDes& aAttrVal );
-    
      /**
-     * Get array of running apps 
-     * 
+     * Get array of running apps
+     *
      */
     void GetRunningAppsL(  RArray<TUid>& aArray );
 
-    
+
     /**
      * Fetches children count for a folder
      */
     TUint GetChildrenCountL( TInt aId );
-    
+
     /**
     * Builds output list for GetList operation and returns result
     * @param aSerializedInput serialized list with input parameters
@@ -185,12 +177,12 @@
     * @return serialized output list
     */
     TPtrC8 GetListDataL( );
-    
+
     /**
     * Closes output buffer.
     */
     void CloseOutputBuffer( );
-    
+
     /**
     * Cleans attribute cache. Used in case of no memory.
     */
@@ -199,23 +191,23 @@
 private:    // from MMenuEngObserver
 
 
-    void GetExtendedAttributesL( TInt aId, const TDesC& aAttrName, 
+    void GetExtendedAttributesL( TInt aId, const TDesC& aAttrName,
         TBool& aAttrExists, TDes& aAttrVal );
-    
+
     void AddToCacheL( TInt aId, const TDesC& aAttrName, TDes& aAttrVal );
-    
+
 
     /**
-    * Fetches an application native attribute value. 
+    * Fetches an application native attribute value.
     * @param aId item id.
     * @param aAttrExists ETrue if attribute exist.
     * @param aAttrVal attribute value.
     */
     void ApplicationNativeAttributeL(
-    		TInt aId, 
+    		TInt aId,
     		TBool & aAttrExists,
     		TDes & aAttrVal );
-    
+
     /**
     * Engine event. Dispatch events to all dependent sessions.
     * @param aFolder Events relate to this folder. May be 0.
@@ -228,7 +220,7 @@
     * @param aErr Error code.
     */
     void EngineError( TInt aErr );
-    
+
     /**
      * Engine tree reload event.
      * Run appscanner again.
@@ -237,20 +229,20 @@
     /**
     * Fetches an attribute value from the caption info attributes
     */
-    void CaptionInfoL( TInt aId, const TDesC& aAttrName, 
+    void CaptionInfoL( TInt aId, const TDesC& aAttrName,
         TBool& aExists, TDes& aAttrVal );
-    
-	
+
+
     /**
     * Fetches an attribute value from the skin icon info attributes
     */
     void SkinInfoL( TInt aId, TInt aSelect, TBool& aExists, TDes& aAttrVal  );
-    
+
     /**
     * Fetches the DRM protection attribute value
     */
     void AppDrmProtectionL( TInt aId, TBool& aExists, TDes& aAttrVal );
-    
+
     /**
     * Fetches an attribute value from the caption info attributes for application
     */
@@ -261,17 +253,17 @@
      * Fetches the children_count attribute value (for folders)
      */
     void FolderChildrenCountL( TInt aId, TBool& aExists, TDes& aAttrVal );
-    
+
     /**
     * Fetches the running status for application and folder
     */
     void GetAppRunningL( TInt aId, TBool& aExists, TDes& aAttrVal );
-    
+
     /**
     * Appends extended attributes to attributes list
     */
     void AppendExtendedAttrributesL(
-    		const TDesC& aType,  
+    		const TDesC& aType,
     		RArray<TPtrC>& aList );
 
 
@@ -290,7 +282,6 @@
     CMcsRunningAppsHandler* iRunningAppsHandler;//own
     CMcsCacheHandler* iCacheHandler;
     CMcsChildrenHandler* iChildrenHandler;
-    CMcsSuiteHandler* iSuiteHandler;
     CMcsGetlistHandler* iGetlistHandler;
     };
 
--- a/menucontentsrv/srvinc/menusvrsuite.h	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2007 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:  Definition of menu item attribute
-*
-*/
-
-#ifndef MENUSUITE_H_
-#define MENUSUITE_H_
-
-#include <e32base.h>
-
-class CSuiteObject;
-
-NONSHARABLE_CLASS( RMenuSrvSuiteArray ) : public RPointerArray<CSuiteObject>
-    {
-
-public:
-
-	/**
-	 * Find suite by name.
-	 * @param aSuiteName suite name.
-	 * @return TInt, possition in array if attribute was found, KErrNotFound if not found.
-	 */
-	TInt FindLastSuite( const TDesC& aSuiteName );
-
-	/**
-	 * Find suite by file name.
-	 * @param aSuiteName suite name.
-	 * @return TInt, possition in array if attribute was found, KErrNotFound if not found.
-	 */
-	TInt FindByFile( const TDesC& aFileName );
-
-	/*
-	 * Chech if Suite exists
-	 * */
-	TBool Exist( const TDesC& aSuiteName );
- 
-    /**
-    * Remove attributes by suite name.
-    * @param aId Id.
-    */ 
-    void RemoveByFileName( const TDesC& aFileName  );
-    
-    
-    /**
-    * Append new item.
-    */
-    TInt Append(const CSuiteObject* anEntry);
-
-  };
-
-/**
-* Push a ResetAndDestroy() on the cleanup stack.
-* @param aArray Array.
-*/
-void CleanupResetAndDestroyPushL( RMenuSrvSuiteArray& aArray );
-
-#endif /* MENUSUITE_H_ */
--- a/menucontentsrv/srvsrc/mcsgetlistcreatorinterface.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvsrc/mcsgetlistcreatorinterface.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -21,166 +21,12 @@
 #include "mcsgetlistcreatorinterface.h"
 #include "menusrveng.h"
 
-_LIT( KMenuAttrSuiteName, "suite_name" );
-
-/**
- * Class for getting attributes for installed suite items
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( CMcsSuiteGetAttrStrategy ) :
-	public CMcsGetAttrStrategy
-	{
-public:
-
-	/**
-	 * Constructor.
-	 */
-	CMcsSuiteGetAttrStrategy( CMenuSrvEng& aEng );
-
-	/**
-	 * Destructor.
-	 */
-	virtual ~CMcsSuiteGetAttrStrategy();
-
-	/**
-	 * TODO: add comments
-	 */
-	void PrepareL(TInt aId);
-
-	/**
-	 * GetAttributeL.
-	 */
-	void GetAttributeL(const TDesC& aAttrName,
-		        TBool& aAttrExists, TDes& aAttrVal );
-
-private:
-	RBuf iSuiteName; ///< Name of a suite for actual strategy. Own.
-	};
-
-/**
- * Class for getting attributes for non suite items / not installed suite items
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( CMcsMainGetAttrStrategy ) :
-	public CMcsGetAttrStrategy
-	{
-public:
-
-	/**
-	 * Constructor.
-	 */
-	CMcsMainGetAttrStrategy ( CMenuSrvEng& aEng );
-
-	/**
-	 * TODO: add comments
-	 */
-	void PrepareL(TInt aId);
-
-	/**
-	 * GetAttributeL.
-	 */
-	void GetAttributeL(const TDesC& aAttrName,
-		        TBool& aAttrExists, TDes& aAttrVal );
-
-private:
-	TInt iId; ///< a id of an item for actual strategy.
-	};
-
-
-// ---------------------------------------------------------
-// CMcsGetAttrStrategy::CMcsGetAttrStrategy
-// ---------------------------------------------------------
-//
-CMcsGetAttrStrategy::CMcsGetAttrStrategy( CMenuSrvEng& aEng ) :
-	iEng(aEng)
-	{
-	}
-
-
-// ---------------------------------------------------------
-// CMcsGetAttrStrategy::~CMcsGetAttrStrategy
-// ---------------------------------------------------------
-//
-CMcsGetAttrStrategy::~CMcsGetAttrStrategy()
-	{
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteGetAttrStrategy::CMcsGetSuiteAttributeStrategy
-// ---------------------------------------------------------
-//
-CMcsSuiteGetAttrStrategy::CMcsSuiteGetAttrStrategy( CMenuSrvEng& aEng ) :
-	CMcsGetAttrStrategy(aEng)
-	{
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteGetAttrStrategy::~CMcsSuiteGetAttrStrategy
-// ---------------------------------------------------------
-//
-CMcsSuiteGetAttrStrategy::~CMcsSuiteGetAttrStrategy()
-	{
-	iSuiteName.Close();
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteGetAttrStrategy::Prepare
-// ---------------------------------------------------------
-//
-void CMcsSuiteGetAttrStrategy::PrepareL(TInt aId)
-	{
-	TBool suiteNameExists;
-	iSuiteName.Close();
-	iSuiteName.CreateL( KMenuMaxAttrValueLen );
-	iEng.GetAttributeL(aId, KMenuAttrSuiteName, suiteNameExists, iSuiteName);
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteGetAttrStrategy::GetAttributeL
-// ---------------------------------------------------------
-//
-void CMcsSuiteGetAttrStrategy::GetAttributeL(const TDesC& aAttrName,
-        TBool& aAttrExists, TDes& aAttrVal )
-	{
-	iEng.GetSuiteAttribute(iSuiteName, aAttrName, aAttrExists, aAttrVal);
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteGetAttrStrategy::CMcsGetSuiteAttributeStrategy
-// ---------------------------------------------------------
-//
-CMcsMainGetAttrStrategy::CMcsMainGetAttrStrategy( CMenuSrvEng& aEng ) :
-	CMcsGetAttrStrategy(aEng)
-	{
-	}
-
-// ---------------------------------------------------------
-// CMcsMainGetAttrStrategy::Prepare
-// ---------------------------------------------------------
-//
-void CMcsMainGetAttrStrategy::PrepareL(TInt aId)
-	{
-	iId = aId;
-	}
-
-// ---------------------------------------------------------
-// CMcsGetSuiteAttributeStrategy::GetAttributeL
-// ---------------------------------------------------------
-//
-void CMcsMainGetAttrStrategy::GetAttributeL(const TDesC& aAttrName,
-        TBool& aAttrExists, TDes& aAttrVal )
-	{
-	iEng.GetAttributeL (iId, aAttrName, aAttrExists, aAttrVal);
-	}
-
 // ---------------------------------------------------------
 // CMcsGetListCreatorInterface::~CMcsGetListCreatorInterface
 // ---------------------------------------------------------
 //
 CMcsGetListCreatorInterface::~CMcsGetListCreatorInterface()
     {
-    delete iNormalGetter;
-    delete iSuiteGetter;
     }
 
 // ---------------------------------------------------------
@@ -198,9 +44,6 @@
 //
 void CMcsGetListCreatorInterface::ConstructL()
     {
-    iActualGetter = NULL;
-    iSuiteGetter = new(ELeave) CMcsSuiteGetAttrStrategy(iEng);
-    iNormalGetter = new(ELeave) CMcsMainGetAttrStrategy(iEng);
     }
 
 // ---------------------------------------------------------
@@ -211,7 +54,7 @@
 		const TMenuItem& aMenuItem, CDesC16Array* aRequiredAttributes,
 		CDesC16Array* aIgnoredAttributes, CLiwDefaultMap* aMap )
 	{
-	SetGetterStrategyL( aMenuItem.Id() );
+	SetItemIdL( aMenuItem.Id() );
 	AddFundamentalAttributesL( aMenuItem, aMap );
 
 	if( aRequiredAttributes->MdcaCount() &&
@@ -300,7 +143,7 @@
 	        if ( aMenuItem.Type() == KMenuTypeApp() ||
 	        		aMenuItem.Type() == KMenuTypeFolder() )
 	            {
-	            iActualGetter->GetAttributeL( KRunningStatus, exists, attrvalue );
+	            iEng.GetAttributeL( iId, KRunningStatus, exists, attrvalue );
 	            aMap->InsertL( KRunning, TLiwVariant( exists ) );
 	            }
 	        }
@@ -314,8 +157,9 @@
 	        }
 	    else
 	        {
-	        iActualGetter->GetAttributeL(
-	        		aRequiredAttributes->MdcaPoint(i), exists, attrvalue );
+            iEng.GetAttributeL(
+                    iId, aRequiredAttributes->MdcaPoint(i), exists, attrvalue );
+
 	        if( exists )
 	            {
 	            TBuf8<KMenuMaxAttrNameLen> attrname;
@@ -355,7 +199,7 @@
         running.Copy( KRunning );
         if( aIgnoredAttributes->Find( running, pos ) != KErrNone )
             {
-            iActualGetter->GetAttributeL(KRunningStatus, exists, attrvalue );
+            iEng.GetAttributeL( iId, KRunningStatus, exists, attrvalue );
             aMap->InsertL( KRunning, TLiwVariant( exists ) );
             }
         }
@@ -368,7 +212,7 @@
         {
         if( aIgnoredAttributes->Find( attrNameList[i], pos ) != KErrNone )
             {
-            iActualGetter->GetAttributeL(attrNameList[i], exists, attrvalue );
+            iEng.GetAttributeL( iId, attrNameList[i], exists, attrvalue );
             if( exists )
                 {
                 TBuf8<KMenuMaxAttrNameLen> attrname;
@@ -425,7 +269,7 @@
             {
             if ( aMenuItem.Type() == KMenuTypeApp() || aMenuItem.Type() == KMenuTypeFolder() )
                 {
-                iActualGetter->GetAttributeL( KRunningStatus, exists, attrvalue );
+                iEng.GetAttributeL( iId, KRunningStatus, exists, attrvalue );
                 aMap->InsertL( KRunning, TLiwVariant( exists ) );
                 }
             }
@@ -441,7 +285,8 @@
             }
         else if( aIgnoredAttributes->Find( aRequiredAttributes->MdcaPoint(i), pos ) != KErrNone )
             {
-            iActualGetter->GetAttributeL( aRequiredAttributes->MdcaPoint(i), exists, attrvalue );
+            iEng.GetAttributeL(
+                    iId, aRequiredAttributes->MdcaPoint(i), exists, attrvalue );
             if( exists )
                 {
                 TBuf8<KMenuMaxAttrNameLen> attrname;
@@ -475,7 +320,7 @@
 	if ( aMenuItem.Type() == KMenuTypeApp() ||
 			aMenuItem.Type() == KMenuTypeFolder() )
 	    {
-        iActualGetter->GetAttributeL( KRunningStatus, exists, attrvalue );
+        iEng.GetAttributeL( iId, KRunningStatus, exists, attrvalue );
         aMap->InsertL( KRunning, TLiwVariant( exists ) );
 	    }
 	RArray<TPtrC> attrNameList;
@@ -486,7 +331,7 @@
 	    {
 	    TBuf8<KMenuMaxAttrNameLen> attrname;
 	    attrname.Copy( attrNameList[i] );
-        iActualGetter->GetAttributeL( attrNameList[i], exists, attrvalue );
+        iEng.GetAttributeL( iId, attrNameList[i], exists, attrvalue );
 	    if(exists)
 	        {
 	        attrname.Copy(attrNameList[i]);
@@ -499,7 +344,6 @@
    	CleanupStack::PopAndDestroy( iconAttrMap );
 	CleanupStack::PopAndDestroy(&attrNameList);
 	CleanupStack::PopAndDestroy( &attrvalue );
-
 	}
 
 // ---------------------------------------------------------
@@ -538,7 +382,7 @@
 	RBuf attrvalue;
     attrvalue.CreateL( KMenuMaxAttrValueLen );
 	CleanupClosePushL( attrvalue );
-	iActualGetter->GetAttributeL(aAttrName, exists, attrvalue );
+    iEng.GetAttributeL( iId, aAttrName, exists, attrvalue );
 	if ( exists )
 		{
 		attrName.Copy( aAttrName );
@@ -551,23 +395,8 @@
 // CMcsGetListCreatorInterface::SetGetterStrategyL
 // ---------------------------------------------------------
 //
-void CMcsGetListCreatorInterface::SetGetterStrategyL(TInt aId)
+void CMcsGetListCreatorInterface::SetItemIdL( TInt aId )
 	{
-	TBool suiteNameExists;
-	RBuf name;
-	name.CreateL( KMenuMaxAttrValueLen );
-	CleanupClosePushL( name );
-
-	iEng.GetAttributeL(aId, KMenuAttrSuiteName, suiteNameExists, name);
-	if (suiteNameExists && iEng.InstalledSuiteExist(name))
-		{
-		iActualGetter = iSuiteGetter;
-		}
-	else
-		{
-		iActualGetter = iNormalGetter;
-		}
-	iActualGetter->PrepareL(aId);
-	CleanupStack::PopAndDestroy(&name);
+	iId = aId;
 	}
 //  End of File
--- a/menucontentsrv/srvsrc/mcssuitehandler.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,699 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-// INCLUDE FILES
-#include <badesca.h>
-#include <sacls.h>
-
-#include "mcssuitehandler.h"
-#include "menueng.h"
-#include "mcsinstallnotifier.h"
-#include "mcssuiteparser.h"
-#include "mcssuiteobject.h"
-#include "menusrvengutils.h"
-#include "mcsmenuitem.h"
-
-// ================= LOCAL FUNCTIONS =======================
-
-/**
-* Cleanup support method. Call ResetAndDestroy() on the array.
-* @param RMenuItemArray* as TAny*
-*/
-LOCAL_C void ResetAndDestroy( TAny* aArray )
-    {
-    ((RPointerArray<CSuiteObject>*)aArray)->ResetAndDestroy();
-    }
-
-// ---------------------------------------------------------
-// CleanupResetAndDestroyPushL
-// ---------------------------------------------------------
-//
-LOCAL_C void CleanupResetAndDestroyPushL( RPointerArray<CSuiteObject>& aArray )
-    {
-    CleanupStack::PushL( TCleanupItem( ResetAndDestroy, &aArray ) );
-    }
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::NewL
-// ---------------------------------------------------------
-//
-CMcsSuiteHandler* CMcsSuiteHandler::NewL( CMenuEng& aEng, const TDesC& aDirName )
-	{
-	CMcsSuiteHandler* self = new( ELeave ) CMcsSuiteHandler( aEng );
-	CleanupStack::PushL( self );
-	self->ConstructL(aDirName);
-	CleanupStack::Pop( self );
-	return self;
-	}
-
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::~CMcsSuiteHandler
-// ---------------------------------------------------------
-//
-CMcsSuiteHandler::~CMcsSuiteHandler()
-	{
-	iSuites.ResetAndDestroy();
-	delete iMmcObserver;
-	delete iFreeSpaceObserver;
-	delete iInstallNotifier;
-	iTimestamps.Close();
-	iNewTimestamps.Close();
-	iEng.DequeueOperation( *this );
-	delete iInstalledFileList;
-	delete iFileNewList;
-	iDirPath.Close();
-	iFs.Close();
-	}
-
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::HaveSuite
-// ---------------------------------------------------------
-//
-TBool CMcsSuiteHandler::HaveSuite(const TDesC& aSuiteName)
-	{
-	return iSuites.Exist(aSuiteName);
-	}
-
-void CMcsSuiteHandler::GetAttribute( const TDesC& aSuiteName, const TDesC& aAttrName, 
-	TBool& aAttrExists, TDes& aAttrVal )
-	{
-	TInt suitePos = iSuites.FindLastSuite(aSuiteName);
-	if (suitePos != KErrNotFound)
-		{
-		iSuites[suitePos]->GetAttribute(aAttrName, aAttrExists, aAttrVal);
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::CMcsSuiteHandler
-// ---------------------------------------------------------
-//
-CMcsSuiteHandler::CMcsSuiteHandler( CMenuEng& aEng ) :
-	iEng(aEng)
-	{
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::ConstructL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::ConstructL(const TDesC& aDirName)
-	{
-	User::LeaveIfError( iFs.Connect( ) );
-	iDirPath.CreateL( KMaxPath );
-	User::LeaveIfError( iFs.PrivatePath( iDirPath ) );
-	iDirPath.Append(KImportDir);
-	iDirPath.Append(KBackSlash);
-	iDirPath.Append(aDirName);
-	iDirPath.Append(KBackSlash);
-	iFileNewList = new (ELeave) CDesCArrayFlat(KDefaultGranularity);
-	iInstalledFileList = new (ELeave) CDesCArrayFlat(KDefaultGranularity);
-	iInstallNotifier = CMcsInstallNotifier::NewL(*this, KSAUidSoftwareInstallKeyValue);
-	iMmcObserver = CMcsMmcObserver::NewL( *this );
-	iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this );
-	// Import suites form suite dir
-	CheckSuiteDirL();
-	iEvent = EInstOpRestore;
-	iEng.QueueOperationL( *this );
-	}
-    
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::HandleInstallNotifyL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::HandleInstallNotifyL(TInt aEvent)
-	{
-	// Look for new files
-    CheckSuiteDirL();
-    iEvent = aEvent;
-    iEng.QueueOperationL( *this );
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::HandleMmcEventL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::HandleMmcEventL(TInt aEvent)
-    {
-    CheckSuiteDirL();
-    if (aEvent == EMmcInsert)
-        {
-        iEvent = EInstOpInstall;
-        }
-    else if (aEvent == EMmcRemove)
-        {
-        iEvent = EInstOpUninstall;
-        }
-    iEng.QueueOperationL( *this );
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::HandleFreeSpaceEventL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::HandleFreeSpaceEventL()
-    {
-    CheckSuiteDirL();
-    iEvent = EInstOpUninstall;
-    iEng.QueueOperationL( *this );
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::CheckSuiteDirL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::CheckSuiteDirL()
-	{
-	// Get file list
-	iFileNewList->Reset();
-	iNewTimestamps.Reset();
-
-	TDriveList driveList;
-	TChar driveLetter;
-	User::LeaveIfError(iFs.DriveList(driveList));
-	for (TInt driveNumber = EDriveA; driveNumber <= EDriveZ; driveNumber++)
-		{
-		if (driveList[driveNumber])
-			{
-			User::LeaveIfError(iFs.DriveToChar(driveNumber, driveLetter));
-			RBuf filePath;
-			filePath.CreateL(KMaxPath);
-			CleanupClosePushL(filePath);
-			filePath.Append(driveLetter);
-			filePath.Append(KColen);
-			filePath.Append(iDirPath);
-			CDir* fileList;
-			
-			iFs.GetDir(filePath, KEntryAttMaskSupported,
-					ESortByName, fileList);
-			
-			CleanupStack::PopAndDestroy(&filePath);
-			if (fileList)
-				{
-				CleanupStack::PushL(fileList);
-				for (TInt i = 0; i < fileList->Count(); i++)
-					{
-					// Not dir, xml file
-					if (!(*fileList)[i].IsDir() && ValidExtansion(
-							(*fileList)[i].iName))
-						{
-						// Don't add same file names more then once
-						// Or else it will case trouble during update
-						TInt dummy;
-						if ( iFileNewList->Find((*fileList)[i].iName, dummy) )
-							{
-							iFileNewList->AppendL((*fileList)[i].iName);
-							iNewTimestamps.AppendL((*fileList)[i].iModified);
-							}
-						}
-					}
-				CleanupStack::PopAndDestroy(fileList);
-				}
-			}
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::AddNewL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::AddNew()
-	{
-	for ( TInt i = 0; i < iFileNewList->Count(); i++ )
-		{
-		TPtrC fileNewName = (*iFileNewList)[i];
-		TTime fileTimestamp = iNewTimestamps[i];
-		
-		if ( !FileInstalled(fileNewName) )
-			{
-			// Not yet installed, install it
-			TRAP_IGNORE( InstallFileL(fileNewName, fileTimestamp) );
-			}
-		else if (FileNeedUpdate(fileNewName, fileTimestamp) )
-			{
-			//Installed, but needs update
-			TRAP_IGNORE( UpdateFileL( fileNewName, fileTimestamp) );
-			}
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::RemoveOldL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::RemoveOld()
-	{
-	for ( TInt i = 0; i < iInstalledFileList->Count(); i++ )
-		{
-		TPtrC fileNewName = (*iInstalledFileList)[i]; 
-
-		// File was removed, unistall it
-		if ( FileUninstalled(fileNewName) )
-			{
-			TRAP_IGNORE( UninstallFileL(fileNewName) );
-			}
-		}
-	iInstalledFileList->Compress();
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::ScanSuitesL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::ScanSuitesL()
-	{
-	RArray<TMenuItem> suiteItems; 
-	CleanupClosePushL( suiteItems );
-	GetMenuSuitesL( suiteItems, KMenuAttSuiteAdded(), KMenuTrue() );
-	
-	for ( TInt i = 0; i < suiteItems.Count(); i++ )
-		{
-		TBool dummy(EFalse);
-		TPtrC suiteName(KNullDesC);
-		iEng.ObjectL( suiteItems[i].Id() ).
-			FindAttribute( KMenuAttSuiteName, suiteName, dummy );
-
-		if ( !HaveSuite( suiteName ) )
-			{
-			iEng.RemoveL( suiteItems[i].Id() );
-			}
-		}
-	CleanupStack::PopAndDestroy(&suiteItems);
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::FileExistL
-// ---------------------------------------------------------
-//
-TBool CMcsSuiteHandler::FileInstalled(const TDesC& aFileName)
-	{
-	TInt posInArray;
-	// uses Folded Comparing
-	if (iInstalledFileList->Find(aFileName, posInArray) == KErrNone)
-		{
-		return ETrue;
-		}
-	return EFalse;
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::FileUninstalled
-// ---------------------------------------------------------
-//
-TBool CMcsSuiteHandler::FileUninstalled(const TDesC& aFileName)
-	{
-	for (TInt j = 0 ; j < iFileNewList->Count(); j++)
-		{
-		if ( !(*iFileNewList)[j].Compare( aFileName ) )
-			{
-			// Wasn't removed but maybe needs to be updated (rom case)
-			return FileNeedUpdate(aFileName, iNewTimestamps[j]);
-			}
-		}
-	return ETrue;
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::FileNeedUpdate
-// ---------------------------------------------------------
-//
-TBool CMcsSuiteHandler::FileNeedUpdate(const TDesC& aFileName, const TTime& aTimestamp)
-	{
-	TInt posInArray;
-	// uses Folded Comparing
-	if (iInstalledFileList->Find(aFileName, posInArray) == KErrNone)
-		{
-		// If timestamps mach then it's the same file
-		return (iTimestamps[posInArray] != aTimestamp);
-		}
-	return EFalse;
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::ValidExtansion
-// ---------------------------------------------------------
-//
-TBool CMcsSuiteHandler::ValidExtansion(const TDesC& aFileName)
-	{
-	TPtrC fileExt = 
-		aFileName.Mid( aFileName.LocateReverse( KDot ) + 1 );
-
-	return ( fileExt.CompareF(KXmlExt) == 0 );
-	}
-
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::InstallFile
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::InstallFileL(const TDesC& aFileName, const TTime& aTimestam)
-	{	
-	RPointerArray<CSuiteObject> suiteArray;
-	CleanupResetAndDestroyPushL(suiteArray);
-	
-	// Get suite from suite file
-	GetSuitesL(aFileName, suiteArray);
-	
-	//Add filename to installed suites files array
-	//If Leave occured during GetSuitesL filename wont be added 
-	iInstalledFileList->AppendL(aFileName);
-	iTimestamps.AppendL(aTimestam);
-	
-	// Take the ownership of suite items
-	for (TInt i = 0; i < suiteArray.Count(); i++ )
-		{
-		User::LeaveIfError( iSuites.Append( suiteArray[i] ) );
-        TRAPD( err, AddSuiteL( suiteArray[i]->SuiteName() ) );
-		if( err!=KErrNone )
-		    {
-		    if( i==0 )
-                {
-                iInstalledFileList->Delete( iInstalledFileList->Count()-1 );
-                iTimestamps.Remove( iTimestamps.Count()-1 );
-                }
-            iSuites.Remove( iSuites.Count()-1 );
-            User::Leave( err );
-		    }
-		suiteArray[i] = NULL;
-		}
-	CleanupStack::Pop(&suiteArray);
-	suiteArray.Close();
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::UninstallFile
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::UninstallFileL(const TDesC& aFileName)
-	{
-	TInt pos(KErrNotFound);
-	if ( !iInstalledFileList->Find(aFileName, pos))
-		{
-		
-		// Need to know what suites are beeing removed
-		CDesCArrayFlat* removedSuites = 
-			new (ELeave) CDesCArrayFlat(KDefaultGranularity);
-		CleanupStack::PushL(removedSuites);
-		for (TInt i = 0; i < iSuites.Count(); i++)
-			{
-			if ( aFileName.Compare( iSuites[i]->FileName() ) == KErrNone )
-			    {
-				removedSuites->AppendL( iSuites[i]->SuiteName() );
-				}
-			}
-		
-		// We know what suites are beeing removed, we can remove those safly
-		iSuites.RemoveByFileName(aFileName);
-		
-		// Remove uninstalled file from our list
-		iInstalledFileList->Delete(pos);
-		iTimestamps.Remove(pos);
-		
-		// And reopen removed suites defined in other files
-		for (TInt i = 0; i < removedSuites->Count(); i++)
-			{
-			TInt suitePos = iSuites.FindLastSuite( (*removedSuites)[i] );
-			if (suitePos != KErrNotFound)
-				{
-				ReopenSuiteL(suitePos);
-				}
-			else
-			    {
-			    RemoveSuiteFromXmlL( (*removedSuites)[i] );
-			    }
-			}
-
-		CleanupStack::PopAndDestroy(removedSuites);
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::UpdateFileL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::UpdateFileL(const TDesC& aFileName, const TTime& aTimestam)
-	{
-	TInt pos;
-	if (iInstalledFileList->Find(aFileName, pos) == KErrNone)
-		{
-		// Get rid of out of date suites
-		iSuites.RemoveByFileName(aFileName);
-		iInstalledFileList->Delete(pos);
-		//iInstalledFileList->Compress();
-		iTimestamps.Remove(pos);
-		
-		// Instal suites form file name 
-		InstallFileL(aFileName, aTimestam);
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::GetSuites
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::GetSuitesL(const TDesC& aFileName, 
-		RPointerArray<CSuiteObject>& aSuiteArray)
-	{
-	TDriveList driveList;
-    TChar driveLetter;
-    User::LeaveIfError( iFs.DriveList( driveList ) );
-    for ( TInt driveNumber = EDriveZ; driveNumber >= EDriveA; driveNumber-- )
-        {
-        if ( driveList[driveNumber] )
-            {
-            User::LeaveIfError( iFs.DriveToChar( driveNumber, driveLetter ) );
-            RBuf file;
-            file.CleanupClosePushL();
-            file.CreateL( KMaxPath );
-            file.Append( driveLetter );
-            file.Append( KColen );
-            file.Append( iDirPath );
-            file.Append( aFileName );
-            CSuiteParser* suiteParser = CSuiteParser::NewL(file);
-            CleanupStack::PushL(suiteParser);
-            TRAP_IGNORE( suiteParser->GetSuitsArrayL( aSuiteArray ) );
-            CleanupStack::PopAndDestroy(suiteParser);
-            CleanupStack::PopAndDestroy( &file );
-            }
-        }
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::ReopenSuite
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::ReopenSuiteL(TInt aSuiteArrayPos)
-	{
-	RPointerArray<CSuiteObject> suiteArray;
-	CleanupResetAndDestroyPushL(suiteArray);
-	
-	TPtrC suiteName = iSuites[aSuiteArrayPos]->SuiteName();
-	TPtrC fileName = iSuites[aSuiteArrayPos]->FileName();
-	
-	// Get suite from suite file
-	GetSuitesL(fileName, suiteArray);
-	
-	// Find our suite in suites from specified file
-	CSuiteObject* neededSuite = NULL;
-	for (TInt j = 0; j < suiteArray.Count(); j++)
-		{
-		if (suiteArray[j]->SuiteName().Compare(suiteName) == KErrNone)
-			{
-			// Take ownership of Suite Object
-			neededSuite = suiteArray[j];
-			suiteArray.Remove(j);
-			break;
-			}
-		}
-	
-	if ( neededSuite )
-		{
-		// Replace Suite Object in suiteArray
-		delete iSuites[aSuiteArrayPos];
-		iSuites[aSuiteArrayPos] = neededSuite;
-		}
-	else
-		{
-		// Must be some error, delete that suite
-		delete iSuites[aSuiteArrayPos];
-		iSuites.Remove( aSuiteArrayPos );
-		}
-	
-	CleanupStack::PopAndDestroy(&suiteArray);
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::GetMenuSuitesL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::GetMenuSuitesL( 
-		RArray<TMenuItem>& aItemArray, 
-		const TDesC& aAttrName, 
-		const TDesC& aAttrValue )
-    {
-    TInt root( 0 );
-    iEng.RootFolderL( root );
-    TMenuSrvTypeAttrFilter suiteFilter;
-    suiteFilter.SetType( KMenuTypeSuite() );   
-    suiteFilter.SetAttr( aAttrName, aAttrValue );
-    iEng.GetItemsL( aItemArray, root, &suiteFilter, ETrue );
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::AddSuiteL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::AddSuiteL( const TPtrC& aSuiteName )
-    {
-    RArray<TMenuItem> mcsItems; 
-    CleanupClosePushL( mcsItems );
-    GetMenuSuitesL( mcsItems, KMenuAttSuiteName(), aSuiteName );
-    
-    if( mcsItems.Count() == KErrNone )
-        {
-        AddSuiteToXmlL( aSuiteName );
-        }
-    else
-        {
-        UpdateItemsL( mcsItems );
-        }
-    CleanupStack::PopAndDestroy(&mcsItems);
-    }
-
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::AddSuiteL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::RemoveSuiteFromXmlL( const TPtrC& aSuiteName )
-    {
-    RArray<TMenuItem> mcsItems; 
-    CleanupClosePushL( mcsItems );
-    GetMenuSuitesL( mcsItems, KMenuAttSuiteName(), aSuiteName );
-
-    for( TInt i( 0 ); i < mcsItems.Count(); i++ )
-        {
-        UpdateSuiteInXmlL( mcsItems, i );
-        }
-    
-    CleanupStack::PopAndDestroy(&mcsItems);
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::UpdateSuiteInXmlL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::UpdateSuiteInXmlL( 
-		RArray<TMenuItem> & aMcsItems, TInt aIndex )
-	{
-	TBool dummy(EFalse);
-	TPtrC val(KNullDesC);
-	if( iEng.ObjectL(aMcsItems[aIndex].Id()).
-			FindAttribute( KMenuAttSuiteAdded, val, dummy ) )
-		{
-		if ( val.Compare(KMenuTrue) == KErrNone )
-			{
-			iEng.RemoveL(aMcsItems[aIndex].Id());
-			}
-		else if ( val.Compare(KMenuFalse) == KErrNone )
-			{
-			iEng.ModifiableObjectL(aMcsItems[aIndex].Id()).
-				RemoveAttribute( KMenuAttSuiteAdded );
-			}
-		}
-	}
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::RunMenuEngOperationL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::RunMenuEngOperationL()
-    {
-    if ( iEvent & EInstOpInstall )
-        {
-        // Add new suites
-        AddNew();
-        }
-    else if ( ( iEvent & EInstOpUninstall ) )
-        {
-        // Remove old suites, andd new if needed (stub sis case)
-        RemoveOld();
-        AddNew();
-        }
-    else if( ( iEvent & EInstOpRestore ) )
-    	{
-        AddNew();
-        ScanSuitesL();
-    	}
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::CompletedMenuEngOperation
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::CompletedMenuEngOperation( TInt /*aErr*/ )
-    {
-    
-    }
-// ---------------------------------------------------------
-// CMcsSuiteHandler::AddSuiteToXmlL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::AddSuiteToXmlL( const TPtrC& aSuiteName )
-    {
-    TInt root( 0 );
-    iEng.RootFolderL( root );
-    
-    CMenuEngObject* obj = iEng.NewObjectL( KMenuTypeSuite );
-    CleanupStack::PushL( obj );
-    obj->SetAttributeL( KMenuAttSuiteName, aSuiteName, EFalse );
-    obj->SetAttributeL( KMenuAttSuiteAdded, KMenuTrue, EFalse );
-    iEng.AddL( *obj, root, 0 );
-    CleanupStack::Pop( obj );
-    }
-
-// ---------------------------------------------------------
-// CMcsSuiteHandler::UpdateItemsL
-// ---------------------------------------------------------
-//
-void CMcsSuiteHandler::UpdateItemsL( 
-    const RArray<TMenuItem>& aItemArray )
-    {
-    for( TInt i( 0 ); i < aItemArray.Count(); ++i )
-        {
-        TPtrC val(KNullDesC);
-        TBool dummy( EFalse );
-        iEng.ObjectL( aItemArray[i].Id() ).
-            FindAttribute( KMenuAttSuiteAdded, val, dummy );
-        if( val.Compare( KMenuTrue ) != KErrNone )
-            {
-            iEng.ModifiableObjectL( aItemArray[i].Id() ).
-                        SetAttributeL( KMenuAttSuiteAdded, KMenuFalse, EFalse);
-            }
-        else
-        	{
-        	iEng.ModifiableObjectL( aItemArray[i].Id() ).
-        	            SetAttributeL( KMenuAttSuiteAdded, KMenuTrue, EFalse);
-        	}
-        }
-    }
-
--- a/menucontentsrv/srvsrc/mcssuiteobject.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <s32strm.h>
-#include "mcssuiteobject.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CSuiteObject::~CSuiteObject
-// ---------------------------------------------------------
-//
-CSuiteObject::~CSuiteObject()
-    {
-    iAttributes.ResetAndDestroy();
-    iFileName.Close();
-    iName.Close();
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::NewL
-// ---------------------------------------------------------
-//
-CSuiteObject* CSuiteObject::NewL( const TDesC& aFileName )
-    {
-    CSuiteObject* attr = NewLC( aFileName );
-    CleanupStack::Pop( attr );
-    return attr;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::NewLC
-// ---------------------------------------------------------
-//
-CSuiteObject* CSuiteObject::NewLC( const TDesC& aFileName )
-    {
-    CSuiteObject* attr = new (ELeave) CSuiteObject();
-    CleanupStack::PushL( attr );
-    attr->ConstructL( aFileName );
-    return attr;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::CSuiteObject
-// ---------------------------------------------------------
-//
-CSuiteObject::CSuiteObject()
-	{
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::ConstructL
-// ---------------------------------------------------------
-//
-void CSuiteObject::ConstructL( const TDesC& aFileName )
-    {
-    iFileName.CreateL( aFileName );
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::SetSuiteNameL
-// ---------------------------------------------------------
-//
-void CSuiteObject::SetSuiteNameL( const TDesC& aName )
-	{
-    iName.CreateL( aName );
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::SetInitialAttributeL
-// ---------------------------------------------------------
-//
-void CSuiteObject::SetInitialAttributeL( const TDesC& aAttrName, 
-		const TDesC& aAttrValue, 
-		TBool aLocalized )
-    {
-    CSuiteObjectAttr* attr = CSuiteObjectAttr::NewLC( aAttrName );
-    iAttributes.AppendL( attr );
-    CleanupStack::Pop( attr );
-    __ASSERT_DEBUG( attr, User::Invariant() );
-    attr->SetValueL( aAttrValue );
-    attr->SetLocalized( aLocalized );
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::GetAttributeL
-// ---------------------------------------------------------
-//
-void CSuiteObject::GetAttribute( const TDesC& aAttrName, 
-		TBool& aAttrExists, TDes& aAttrVal )
-	{
-	aAttrExists = EFalse;
-	TInt attrPos = iAttributes.Find(aAttrName);
-	if (attrPos != KErrNotFound)
-		{
-		aAttrVal.Copy( iAttributes[attrPos]->Value() );
-		aAttrExists = ETrue;
-		}
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::CloseSuiteArray
-// ---------------------------------------------------------
-//
-void CSuiteObject::CloseSuiteArray()
-	{
-	iAttributes.ResetAndDestroy();
-	iAttributes.Close();
-	}
-
-
-//  End of File  
--- a/menucontentsrv/srvsrc/mcssuiteobjectattr.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <s32strm.h>
-#include "mcssuiteobjectattr.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::~CSuiteObjectAttr
-// ---------------------------------------------------------
-//
-CSuiteObjectAttr::~CSuiteObjectAttr()
-    {
-    iName.Close();
-    iValue.Close();
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::NewL
-// ---------------------------------------------------------
-//
-CSuiteObjectAttr* CSuiteObjectAttr::NewL( const TDesC& aName )
-    {
-    CSuiteObjectAttr* attr = NewLC( aName );
-    CleanupStack::Pop( attr );
-    return attr;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::NewLC
-// ---------------------------------------------------------
-//
-CSuiteObjectAttr* CSuiteObjectAttr::NewLC( const TDesC& aName )
-    {
-    CSuiteObjectAttr* attr = new (ELeave) CSuiteObjectAttr();
-    CleanupStack::PushL( attr );
-    attr->ConstructL( aName );
-    return attr;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::CSuiteObjectAttr
-// ---------------------------------------------------------
-//
-CSuiteObjectAttr::CSuiteObjectAttr()
-	{
-	}
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::ConstructL
-// ---------------------------------------------------------
-//
-void CSuiteObjectAttr::ConstructL( const TDesC& aName )
-    {
-    iName.CreateL( aName );
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectAttr::SetValueL
-// ---------------------------------------------------------
-//
-void CSuiteObjectAttr::SetValueL( const TDesC& aValue )
-    {
-    iValue.Close();
-    iValue.CreateL( aValue );
-    }
-
-// ---------------------------------------------------------
-// RSuiteAttrArray::Find
-// ---------------------------------------------------------
-//
-TInt RSuiteAttrArray::Find( const TDesC& aName ) const
-    {
-    for ( TInt i = 0; i < Count(); i++ )
-        {
-        if ( !aName.Compare( operator[]( i )->Name() ) )
-            {
-            return i;
-            }
-        }
-    return KErrNotFound;
-    }
-
-//  End of File  
--- a/menucontentsrv/srvsrc/mcssuiteobjectfactory.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-
-// INCLUDE FILES
-#include <gecodefaultobject.h>
-#include <gecodefaultobjectfactory.h>
-
-#include "mcssuiteobjectfactory.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CSuiteObjectFactory::~CSuiteObjectFactory
-// ---------------------------------------------------------
-//
-CSuiteObjectFactory::~CSuiteObjectFactory()
-    {
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectFactory::NewL
-// ---------------------------------------------------------
-//
-CSuiteObjectFactory* CSuiteObjectFactory::NewL()
-    {
-    CSuiteObjectFactory* factory =
-        new (ELeave) CSuiteObjectFactory();
-    return factory;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObjectFactory::CSuiteObjectFactory
-// ---------------------------------------------------------
-//
-CSuiteObjectFactory::CSuiteObjectFactory()
-    {
-    }
-
-
-// ---------------------------------------------------------
-// CSuiteObjectFactory::InitializeObjectL
-// ---------------------------------------------------------
-//
-void CSuiteObjectFactory::InitializeObjectL
-( MGECOAttributeProvider& aAttributeProvider )
-    {
-    if ( iContext )
-        {
-        //Cast context to GECODefaultObject
-        CGECODefaultObject* temp = 
-            reinterpret_cast<CGECODefaultObject*>( iContext );
-
-        TInt counter = aAttributeProvider.NumAttributes() - 1;
-        TPtrC name;
-        TPtrC value;
-        TBool islocalized = EFalse;
-        while ( counter >= 0 )
-            {
-            aAttributeProvider.AttributeDetailsL( counter,name,value, islocalized );
-            temp->SetAttributeL( name, value, islocalized );
-            counter--;            
-            }
-        }
-    }
-
-//  End of File  
--- a/menucontentsrv/srvsrc/mcssuiteparser.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* 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:  
-*
-*/
-
-// INCLUDE FILES
-#include <xcfwtree.h>
-#include <gecoobjectbase.h>
-#include <gecodefaultobject.h>
-
-#include "mcssuiteparser.h"
-#include "mcssuiteobject.h"
-#include "mcsdef.h"
-#include "mcssuiteobjectfactory.h"
-
-
-// ---------------------------------------------------------
-// CSuiteObject::CSuiteParser
-// ---------------------------------------------------------
-//
-CSuiteParser::CSuiteParser()
-	{
-	// No implementation required
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::~CSuiteParser
-// ---------------------------------------------------------
-//
-CSuiteParser::~CSuiteParser()
-	{
-	iFileName.Close();
-    delete iContentEngine;
-    delete iObjectFactory;
-    delete iActiveScheduler;
-    delete iContentTree;
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::NewLC
-// ---------------------------------------------------------
-//
-CSuiteParser* CSuiteParser::NewLC( const TDesC& aFileName )
-	{
-	CSuiteParser* self = new (ELeave) CSuiteParser();
-	CleanupStack::PushL(self);
-	self->ConstructL( aFileName );
-	return self;
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::NewL
-// ---------------------------------------------------------
-//
-CSuiteParser* CSuiteParser::NewL( const TDesC& aFileName )
-	{
-	CSuiteParser* self = CSuiteParser::NewLC( aFileName );
-	CleanupStack::Pop( self ); // self;
-	return self;
-	}
-
-// ---------------------------------------------------------
-// CSuiteObject::ConstructL
-// ---------------------------------------------------------
-//
-void CSuiteParser::ConstructL( const TDesC& aFileName )
-	{
-	iFileName.CreateL( aFileName );
-	iActiveScheduler = new ( ELeave ) CActiveSchedulerWait();
-    iObjectFactory = CSuiteObjectFactory::NewL();
-    iContentEngine = CXCFWEngine::NewL( this );
-    iContentEngine->RegisterObjectFactoryL( iObjectFactory );
-	}
-
-// -----------------------------------------------------------------------------
-// CSuiteParser::GetSuitsArrayL
-// -----------------------------------------------------------------------------
-//
-TInt CSuiteParser::GetSuitsArrayL(  RPointerArray<CSuiteObject>& aSuitesArray  )
-    {
-    TInt err;
-    iContentTree = CXCFWTree::NewL( );
-    iContentEngine->LoadL( *iContentTree, iFileName );
-
-    iActiveScheduler->Start( );
-
-    if ( iCompletionStatus == 0 /*TSuiteParsingStatus::ECompleted*/ )
-        {
-        //this trap ensures stoping the ActiveSheduler
-        //in case a leave occurs when updating data
-        TRAP( err, HandleEntriesL( aSuitesArray ) );
-        }
-
-    delete iContentTree;
-    iContentTree = NULL;
-    return err;
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::HandleEngineEventL
-// ---------------------------------------------------------
-//
-void CSuiteParser::HandleEngineEventL( TXCFWEngineEvent aEvent )
-    {
-    // handle completion
-    if ( aEvent == EEvtParsingComplete )
-        {
-        TSuiteParsingStatus status = ECompleted;
-        HandleCompletionL( status );
-        }
-    // else => ignore
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::HandleEngineErrorL
-// ---------------------------------------------------------
-//
-void CSuiteParser::HandleEngineErrorL( TInt /*aErrorCode*/)
-    {
-    HandleCompletionL( EFailed );
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::HandleCompletionL
-// ---------------------------------------------------------
-//
-void CSuiteParser::HandleCompletionL(
-		TSuiteParsingStatus aStatus )
-    {
-    iCompletionStatus = aStatus;
-    iActiveScheduler->AsyncStop( );
-    }
-
-
-// ---------------------------------------------------------
-// CSuiteObject::HandleEntriesL
-// ---------------------------------------------------------
-//
-void CSuiteParser::HandleEntriesL( RPointerArray<CSuiteObject>& aSuitesArray )
-    {
-    MXCFWNode* root = iContentTree->Root( );
-    // get children 
-    RNodeArray suites;
-    CleanupClosePushL( suites );
-    iContentTree->GetChildNodesL( root, suites );
-    for ( TInt i = 0; i < suites.Count( ); i++ )
-        {
-        CSuiteObject* suite = CreateSuiteLC( suites[i] );
-        aSuitesArray.AppendL( suite );
-        CleanupStack::Pop( suite );
-        }
-    
-    // clean up
-    CleanupStack::PopAndDestroy( &suites );
-    }
-
-// ---------------------------------------------------------
-// CSuiteObject::CreateSuiteLC
-// ---------------------------------------------------------
-//
-CSuiteObject* CSuiteParser::CreateSuiteLC( MXCFWNode* aNode )
-	{
-	TInt lastBackSlash = iFileName.Length() -
-        iFileName.LocateReverseF( KBackSlashSuite ) - 1;
-	CSuiteObject* suite = 
-        CSuiteObject::NewLC( iFileName.Right( lastBackSlash ) );
-	
-    CGECODefaultObject* node=
-            static_cast<CGECODefaultObject*>( aNode->Data() );
-
-    TPtrC name;
-    TPtrC value;
-    TInt attrCount = node->NumAttributes();
-    TBool isLocalized = EFalse;
-
-    for( TInt i = 0; i < attrCount; i++ )
-        {
-		node->AttributeDetailsL( i, name, value, isLocalized );
-        if( name == KMenuAttSuiteName() )
-        	{
-        	suite->SetSuiteNameL( value );
-        	}
-			suite->SetInitialAttributeL( name, value, isLocalized );
-        }
-    
-    return suite;
-	}
-
--- a/menucontentsrv/srvsrc/menusrvappscanner.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrvappscanner.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -32,6 +32,7 @@
 _LIT( KMenuOne, "1" );
 _LIT( KMenuAttrMmcId, "mmc_id" );
 _LIT( KMenuMassStorage, "mass_storage" );
+_LIT( KMenuPredefinedWidget, "predefined_widget" );
 _LIT( KMenuMmcHistoryFname, "mmchistory" );
 
 // ==================== LOCAL FUNCTIONS ====================
@@ -1035,51 +1036,61 @@
 // CMenuSrvAppScanner::HandleMissingItemsL
 // ---------------------------------------------------------
 //
-void CMenuSrvAppScanner::HandleMissingItemsL
-( const RArray<TMenuItem>& aItems )
+TMenuItem::TFlags CMenuSrvAppScanner::GetProperFlagL( const TMenuItem& aItem )
+    {
+    TMenuItem::TFlags flags = TMenuItem::ENoFlag;
+
+    TUint mmcId = 0;
+    TPtrC val;
+    TBool dummy;
+    if( iEng.ObjectL( aItem.Id() ).FindAttribute( KMenuAttrMmcId(), val, dummy ) )
+        {
+        MenuUtils::GetTUint( val, mmcId );
+        if ( mmcId && KErrNotFound != iMmcHistory->Find( mmcId ) )
+            {
+            // This item is on an MMC which is currently in the MMC history.
+            // Set it "missing" but keep it.
+            flags = TMenuItem::EMissing;
+            }
+        else if ( val == KMenuMassStorage()
+                    && IsDriveInUse( DriveInfo::EDefaultMassStorage ) )
+            {
+            flags = TMenuItem::EMissing;
+            }
+        else if ( iEng.ObjectL( aItem.Id() ).FindAttribute(
+                KMenuPredefinedWidget(), val, dummy ) )
+            {
+            flags = TMenuItem::EMissing;
+            }
+        }
+    else if( iEng.ObjectL( aItem.Id() ).GetAppType()
+                != CMenuEngObject::EWidgetApp
+            || iEng.ObjectL( aItem.Id() ).FindAttribute(
+                    KMenuPredefinedWidget(), val, dummy ) )
+        {
+        flags = TMenuItem::EHidden;
+        }
+    return flags;
+    }
+
+// ---------------------------------------------------------
+// CMenuSrvAppScanner::HandleMissingItemsL
+// ---------------------------------------------------------
+//
+void CMenuSrvAppScanner::HandleMissingItemsL(
+        const RArray<TMenuItem>& aItems )
     {
     for ( TInt i = 0; i < aItems.Count(); i++ )
         {
-        const TInt id = aItems[i].Id();
-        TUint mmcId = 0;
-        TPtrC val;
-        TBool dummy;
-        if( iEng.ObjectL( id ).FindAttribute( KMenuAttrMmcId(), val, dummy ) )
+        TMenuItem::TFlags flags = GetProperFlagL( aItems[i] );
+        if( flags == TMenuItem::ENoFlag )
             {
-            MenuUtils::GetTUint( val, mmcId );
-			if ( mmcId && KErrNotFound != iMmcHistory->Find( mmcId ) )
-				{
-				// This item is on an MMC which is currently in the MMC history.
-				// Set it "missing" but keep it.
-				SetObjectFlagsL( ETrue, aItems[i], TMenuItem::EMissing,
-						RMenuNotifier::EItemsAddedRemoved );
-				}
-			else if ( val == KMenuMassStorage()
-						&& IsDriveInUse( DriveInfo::EDefaultMassStorage ) )
-				{
-				SetObjectFlagsL( ETrue, aItems[i], TMenuItem::EMissing,
-						RMenuNotifier::EItemsAddedRemoved );
-				}
-			else
-				{
-				iEng.RemoveL( id );
-				}
+            iEng.RemoveL( aItems[i].Id() );
             }
         else
             {
-            // This item is not on MMC or its MMC has been purged from the MMC
-            // history. Hide the item.
-            SetObjectFlagsL( EFalse, aItems[i], TMenuItem::ELockDelete );
-
-			if( iEng.ObjectL( id ).GetAppType() != CMenuEngObject::EWidgetApp )
-            	{
-            	SetObjectFlagsL( ETrue, aItems[i], TMenuItem::EHidden,
-						RMenuNotifier::EItemsAddedRemoved );
-            	}
-            else
-            	{
-               	iEng.RemoveL( id );
-            	}
+            SetObjectFlagsL( ETrue, aItems[i], flags,
+                    RMenuNotifier::EItemsAddedRemoved );
             }
         }
     }
--- a/menucontentsrv/srvsrc/menusrveng.cpp	Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrveng.cpp	Wed Jun 09 10:01:25 2010 +0300
@@ -34,7 +34,6 @@
 #include "mcsrunningappshandler.h"
 #include "mcsgetlisthandler.h"
 #include "menusrvobjectfilter.h"
-#include "mcssuitehandler.h"
 #include <mcsdef.h>
 #include <mcsmenufilter.h>
 
@@ -107,7 +106,6 @@
     delete iFolderNotifier;
     delete iMcsSatMonitor;
     delete iRunningAppsHandler;
-    delete iSuiteHandler;
     delete iEng;
     iMenuSrv.EngineDeleted();
     }
@@ -156,7 +154,6 @@
                 *this, *iCMenuSrvEngUtils, *iCacheHandler );
 
         iChildrenHandler = CMcsChildrenHandler::NewL( *this, *iCacheHandler);
-        iSuiteHandler = CMcsSuiteHandler::NewL(*iEng, iContentName);
 
         iTimedClose->Cancel();
         iTimedClose->After( TTimeIntervalMicroSeconds32( KMenuSrvExitDelay ) );
@@ -265,7 +262,6 @@
     delete iRunningAppsHandler; iRunningAppsHandler = NULL;
     delete iAppScanner; iAppScanner = NULL;
     delete iFolderNotifier; iFolderNotifier = NULL;
-    delete iSuiteHandler; iSuiteHandler = NULL;
     delete iEng; iEng = NULL;
 
     iContentName.Close();
@@ -339,26 +335,6 @@
     }
 
 // ---------------------------------------------------------
-// CMenuSrvEng::InstalledSuiteExist
-// ---------------------------------------------------------
-//
-TBool CMenuSrvEng::InstalledSuiteExist(const TDesC& aSuiteName)
-	{
-	return iSuiteHandler->HaveSuite(aSuiteName);
-	}
-
-// ---------------------------------------------------------
-// CMenuSrvEng::GetSuiteAttributeL
-// ---------------------------------------------------------
-//
-void CMenuSrvEng::GetSuiteAttribute( const TDesC& aSuiteName, const TDesC& aAttrName,
-           TBool& aAttrExists, TDes& aAttrVal )
-	{
-	iSuiteHandler->GetAttribute(aSuiteName, aAttrName,
-			aAttrExists, aAttrVal);
-	}
-
-// ---------------------------------------------------------
 // CMenuSrvEng::GetRunningAppsL()
 // ---------------------------------------------------------
 //
--- a/menucontentsrv/srvsrc/menusvrsuite.cpp	Tue May 25 13:01:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2007 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:  Definition of menu item attribute
-*
-*/
-
-#include <s32strm.h>
-#include "menusvrsuite.h"
-#include "mcssuiteobject.h"
-
-// ================= LOCAL FUNCTIONS =======================
-
-/**
-* Cleanup support method. Call ResetAndDestroy() on the array.
-* @param RMenuSrvSuiteArray* as TAny*
-*/
-LOCAL_C void ResetAndDestroy( TAny* aArray )
-    {
-    ((RMenuSrvSuiteArray*)aArray)->ResetAndDestroy();
-    }
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// RMenuSrvSuiteArray::FindLastSuite
-// ---------------------------------------------------------
-//
-TInt RMenuSrvSuiteArray::FindLastSuite( const TDesC& aSuiteName )
-	{
-	for ( TInt i = Count()-1; i >= 0; i-- )
-		{
-		if( aSuiteName == operator[]( i )->SuiteName() )
-			{
-			return i;
-			}
-		}
-	return KErrNotFound;
-	}
-
-// ---------------------------------------------------------
-// RMenuSrvSuiteArray::FindByFile
-// ---------------------------------------------------------
-//
-TInt RMenuSrvSuiteArray::FindByFile( const TDesC& aFileName )
-	{
-	for ( TInt i = Count()-1; i >= 0; i-- )
-		{
-		if( aFileName == operator[]( i )->FileName() )
-			{
-			return i;
-			}
-		}
-	return KErrNotFound;
-	}
-
-// ---------------------------------------------------------
-// RMenuSrvSuiteArray::Exist
-// ---------------------------------------------------------
-//
-TBool RMenuSrvSuiteArray::Exist( const TDesC& aSuiteName )
-	{
-	return ( FindLastSuite(aSuiteName) != KErrNotFound );
-	}
-
-// ---------------------------------------------------------
-// RMenuSrvSuiteArray::RemoveByFileName
-// ---------------------------------------------------------
-//
-void RMenuSrvSuiteArray::RemoveByFileName( const TDesC& aFileName  )
-	{
-	for ( TInt i = 0; i < Count(); i++ )
-		{
-		if( aFileName == operator[]( i )->FileName() )
-			{
-			delete operator[]( i );
-			Remove( i );
-			i--;
-			}
-		}
-	}
-
-// ---------------------------------------------------------
-// RMenuSrvSuiteArray::Append
-// ---------------------------------------------------------
-//
-TInt RMenuSrvSuiteArray::Append(const CSuiteObject* anEntry)
-	{
-	TInt pos = FindLastSuite( anEntry->SuiteName() );
-	if (pos != KErrNotFound)
-		{
-		operator[]( pos )->CloseSuiteArray();
-		}
-	return RPointerArray<CSuiteObject>::Append( anEntry );
-	}
-
-
-// ---------------------------------------------------------
-// CleanupResetAndDestroyPushL
-// ---------------------------------------------------------
-//
-void CleanupResetAndDestroyPushL( RMenuSrvSuiteArray& aArray )
-	{
-	CleanupStack::PushL( TCleanupItem( ResetAndDestroy, &aArray ) );
-	}