Revision: 201001
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 20:32:13 +0200
changeset 2 b7904b40483f
parent 1 844b978f8d5e
child 3 ff572005ac23
Revision: 201001 Kit: 201003
contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h
contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp
contentcontrolsrv/hsccclient/hsccproviderclient/inc/hsccproviderclient.h
contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp
contentcontrolsrv/hsccclient/inc/hsccapi.h
homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp
homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp
homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h
homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h
homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd
homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_requestnotify_6.h
homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsiconutility.cpp
idlefw/cenrep/keys_activeidle2.xls
idlefw/conf/activeidle2.confml
idlefw/conf/activeidle2_10275102.crml
idlefw/group/ailaunch.mmp
idlefw/plugins/mcsplugin/group/mcsplugin.mmp
idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h
idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp
--- a/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h	Mon Jan 18 20:32:13 2010 +0200
@@ -124,6 +124,16 @@
      */
     TInt ActivateAppL( CHsContentInfo& aInfo );
 
+   /**
+    * 
+    */
+   TInt ActiveViewL( CHsContentInfo& aInfo );
+   
+   /**
+    * 
+    */
+   TInt ActiveAppL( CHsContentInfo& aInfo );
+
 private: // Functions
     /**
      * 
--- a/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -713,6 +713,148 @@
     }
 
 // -----------------------------------------------------------------------------
+// CHsCcApiClient::ActiveViewL
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::ActiveViewL( CHsContentInfo& aInfo )
+    {
+    TInt err( KErrNone );
+
+    // Create ActiveViewReq API request
+    CCcSrvMsg* reqMsg = CCcSrvMsg::NewL();
+    CleanupStack::PushL( reqMsg );
+    reqMsg->SetMsgId( EHsCcActiveViewReq );
+    reqMsg->SetTrId( 0 );
+    reqMsg->SetData( KNullDesC8() );
+    
+    // Marshal API request
+    HBufC8* msgBuf = reqMsg->MarshalL();
+    CleanupStack::PushL( msgBuf );
+    TPtr8 msgPtr( NULL, 0 );
+    msgPtr.Set( msgBuf->Des() );
+ 
+    // Send API request
+    // Sender and receiver address not defined -> message is routed
+    // according to the provider id
+    TPckgBuf<TUint32> provider( ECcHomescreen );
+    TPckgBuf<TUint32> sender;
+    TPckgBuf<TUint32> receiver;
+    err = iSession.Send( ECcApiReq, provider, sender, receiver, msgPtr );
+    
+    if ( !err )
+        {
+        // Internalize AppListResp API response
+        CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
+        CleanupStack::PushL( respMsg );
+        RDesReadStream respStream( msgPtr );
+        CleanupClosePushL( respStream );
+        respMsg->InternalizeHeaderL( respStream );
+        CleanupStack::PopAndDestroy( &respStream );
+        err = respMsg->Status();
+        if ( !err )
+            {
+            if ( respMsg->DataSize() )
+                {
+                // Get API response data
+                HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
+                CleanupStack::PushL( dataBuf );
+                TPtr8 dataPtr( NULL, 0 );
+                dataPtr.Set( dataBuf->Des() );
+                TPckgBuf<TUint32> trId( respMsg->TrId() );
+                err = iSession.GetMsgData( trId, dataPtr );
+                if ( !err )
+                    {
+                    // Internalize API response data
+                    RDesReadStream dataStream( dataPtr );
+                    CleanupClosePushL( dataStream );
+                    aInfo.InternalizeL( dataStream );                    
+                    CleanupStack::PopAndDestroy( &dataStream );
+                    }
+                CleanupStack::PopAndDestroy( dataBuf );
+                }
+            }
+        CleanupStack::PopAndDestroy( respMsg );
+        }
+
+    // Cleanup
+    CleanupStack::PopAndDestroy( msgBuf );
+    CleanupStack::PopAndDestroy( reqMsg );
+    
+    return err;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsCcApiClient::ActiveAppL
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::ActiveAppL( CHsContentInfo& aInfo )
+    {
+    TInt err( KErrNone );
+
+    // Create ActiveViewReq API request
+    CCcSrvMsg* reqMsg = CCcSrvMsg::NewL();
+    CleanupStack::PushL( reqMsg );
+    reqMsg->SetMsgId( EHsCcActiveAppReq );
+    reqMsg->SetTrId( 0 );
+    reqMsg->SetData( KNullDesC8() );
+    
+    // Marshal API request
+    HBufC8* msgBuf = reqMsg->MarshalL();
+    CleanupStack::PushL( msgBuf );
+    TPtr8 msgPtr( NULL, 0 );
+    msgPtr.Set( msgBuf->Des() );
+ 
+    // Send API request
+    // Sender and receiver address not defined -> message is routed
+    // according to the provider id
+    TPckgBuf<TUint32> provider( ECcHomescreen );
+    TPckgBuf<TUint32> sender;
+    TPckgBuf<TUint32> receiver;
+    err = iSession.Send( ECcApiReq, provider, sender, receiver, msgPtr );
+    
+    if ( !err )
+        {
+        // Internalize AppListResp API response
+        CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
+        CleanupStack::PushL( respMsg );
+        RDesReadStream respStream( msgPtr );
+        CleanupClosePushL( respStream );
+        respMsg->InternalizeHeaderL( respStream );
+        CleanupStack::PopAndDestroy( &respStream );
+        err = respMsg->Status();
+        if ( !err )
+            {
+            if ( respMsg->DataSize() )
+                {
+                // Get API response data
+                HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
+                CleanupStack::PushL( dataBuf );
+                TPtr8 dataPtr( NULL, 0 );
+                dataPtr.Set( dataBuf->Des() );
+                TPckgBuf<TUint32> trId( respMsg->TrId() );
+                err = iSession.GetMsgData( trId, dataPtr );
+                if ( !err )
+                    {
+                    // Internalize API response data
+                    RDesReadStream dataStream( dataPtr );
+                    CleanupClosePushL( dataStream );
+                    aInfo.InternalizeL( dataStream );                    
+                    CleanupStack::PopAndDestroy( &dataStream );
+                    }
+                CleanupStack::PopAndDestroy( dataBuf );
+                }
+            }
+        CleanupStack::PopAndDestroy( respMsg );
+        }
+
+    // Cleanup
+    CleanupStack::PopAndDestroy( msgBuf );
+    CleanupStack::PopAndDestroy( reqMsg );
+    
+    return err;
+    }
+
+// -----------------------------------------------------------------------------
 // CHsCcApiClient::WaitForApiNtfL()
 // -----------------------------------------------------------------------------
 //
--- a/contentcontrolsrv/hsccclient/hsccproviderclient/inc/hsccproviderclient.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccproviderclient/inc/hsccproviderclient.h	Mon Jan 18 20:32:13 2010 +0200
@@ -159,6 +159,12 @@
     /**
      * 
      */
+    void HandleActiveViewReqL(
+        CCcSrvMsg& aMessage );
+
+    /**
+     * 
+     */
     void HandleAppListReqL(
         CCcSrvMsg& aMessage );
 
@@ -171,6 +177,12 @@
     /**
      * 
      */
+    void HandleActiveAppReqL(
+        CCcSrvMsg& aMessage );
+
+    /**
+     * 
+     */
     void HandleNotSupportedReqL(
         CCcSrvMsg& aMessage );
 
--- a/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -159,6 +159,12 @@
             case EHsCcActivateAppReq:
                 HandleActivateAppReqL( *message );
                 break;
+            case EHsCcActiveAppReq:
+                HandleActiveAppReqL( *message );
+                break;
+            case EHsCcActiveViewReq:
+                HandleActiveViewReqL( *message );
+                break;
             default:
                 HandleNotSupportedReqL( *message );
                 break;
@@ -553,6 +559,43 @@
     }
 
 // -----------------------------------------------------------------------------
+// CHsCcProviderClient::HandleActiveViewReqL()
+// -----------------------------------------------------------------------------
+//
+void CHsCcProviderClient::HandleActiveViewReqL(
+    CCcSrvMsg& aMessage )
+    {
+    // Get active view
+    CHsContentInfo* view = CHsContentInfo::NewL();
+    CleanupStack::PushL( view );
+    TInt err = iController.ActiveViewL( *view );
+
+    // Create and send ActiveViewResp
+    CCcSrvMsg* message = CCcSrvMsg::NewL();
+    CleanupStack::PushL( message );
+    message->SetMsgId( EHsCcActiveViewResp );
+    message->SetTrId( aMessage.TrId() );
+    message->SetStatus( err );
+    
+    if ( !err )
+        {
+        // Externalize view list
+        HBufC8* dataBuf = view->MarshalL();
+        CleanupStack::PushL( dataBuf );
+        TPtr8 dataPtr( NULL, 0 );
+        dataPtr.Set( dataBuf->Des() );
+        message->SetData( dataPtr );
+        CleanupStack::PopAndDestroy( dataBuf );
+        }
+    
+    SendRespL( *message );
+    
+    CleanupStack::PopAndDestroy( message );    
+    CleanupStack::PopAndDestroy( view );
+
+    }
+
+// -----------------------------------------------------------------------------
 // CHsCcProviderClient::HandleAppListReqL()
 // -----------------------------------------------------------------------------
 //
@@ -630,6 +673,42 @@
     }
 
 // -----------------------------------------------------------------------------
+// CHsCcProviderClient::HandleActiveAppReqL()
+// -----------------------------------------------------------------------------
+//
+void CHsCcProviderClient::HandleActiveAppReqL(
+    CCcSrvMsg& aMessage )
+    {
+    // Get active application info
+    CHsContentInfo* app = CHsContentInfo::NewL();
+    CleanupStack::PushL( app );
+    TInt err = iController.ActiveAppL( *app );
+
+    // Create and send ActiveViewResp
+    CCcSrvMsg* message = CCcSrvMsg::NewL();
+    CleanupStack::PushL( message );
+    message->SetMsgId( EHsCcActiveAppResp );
+    message->SetTrId( aMessage.TrId() );
+    message->SetStatus( err );
+    
+    if ( !err )
+        {
+        // Externalize application info
+        HBufC8* dataBuf = app->MarshalL();
+        CleanupStack::PushL( dataBuf );
+        TPtr8 dataPtr( NULL, 0 );
+        dataPtr.Set( dataBuf->Des() );
+        message->SetData( dataPtr );
+        CleanupStack::PopAndDestroy( dataBuf );
+        }
+    
+    SendRespL( *message );
+    
+    CleanupStack::PopAndDestroy( message );    
+    CleanupStack::PopAndDestroy( app );
+    }
+
+// -----------------------------------------------------------------------------
 // CHsCcProviderClient::HandleNotSupportedReqL()
 // -----------------------------------------------------------------------------
 //
--- a/contentcontrolsrv/hsccclient/inc/hsccapi.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/contentcontrolsrv/hsccclient/inc/hsccapi.h	Mon Jan 18 20:32:13 2010 +0200
@@ -229,6 +229,31 @@
 // - Message data:   None
     EHsCcActivateViewResp,
 // ----------------------------------------------------------------------------
+// ActiveViewReq
+// ----------------------------------------------------------------------------
+// Purpose:
+// This request is used to get active view configuration
+//
+// Message parameters:
+// - Message id:     EHsCcActiveViewReq
+// - Transaction id: Unique transaction id
+// - Message data:   None
+    EHsCcActiveViewReq,
+// ----------------------------------------------------------------------------
+// ActiveViewResp
+// ----------------------------------------------------------------------------
+// Purpose:
+// This response contains the active view configuration
+//
+// Message parameters:
+// - Message id:     EHsCcActiveViewResp
+// - Transaction id: Transaction id from corresponding ActiveViewReq
+// - Status:         Operation status (Symbian error code)
+// - Message data:   Successful operation: CHsContentInfo instance defining the 
+//                   active view configuration
+//                   Failed operation: None
+    EHsCcActiveViewResp,
+// ----------------------------------------------------------------------------
 // AppListReq
 // ----------------------------------------------------------------------------
 // Purpose:
@@ -279,6 +304,31 @@
 // - Message data:   None
     EHsCcActivateAppResp,
 // ----------------------------------------------------------------------------
+// ActiveAppReq
+// ----------------------------------------------------------------------------
+// Purpose:
+// This request is used to get active application configuration
+//
+// Message parameters:
+// - Message id:     EHsCcActivateAppReq
+// - Transaction id: Unique transaction id
+// - Message data:   None
+    EHsCcActiveAppReq,
+// ----------------------------------------------------------------------------
+// ActiveAppResp
+// ----------------------------------------------------------------------------
+// Purpose:
+// This response contains the active application configuration
+//
+// Message parameters:
+// - Message id:     EHsCcActiveAppResp
+// - Transaction id: Transaction id from corresponding ActiveAppReq
+// - Status:         Operation status (Symbian error code)
+// - Message data:   Successful operation: CHsContentInfo instance defining the 
+//                   active application configuration
+//                   Failed operation: None
+    EHsCcActiveAppResp,
+// ----------------------------------------------------------------------------
 // NotSupportedResp
 // ----------------------------------------------------------------------------
 // Purpose:
--- a/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsinstallationhandler.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -2233,7 +2233,7 @@
 #ifdef HSPS_LOG_ACTIVE  
         if( iLogBus )
             {
-            iLogBus->LogText( _L( "ChspsInstallationHandler::AddLocalizedResourcesL(): - DTD file was not found '%S'" ),
+            iLogBus->LogText( _L( "ChspsInstallationHandler::AddLocalizedResourcesDTDV2L(): - DTD file was not found '%S'" ),
                     &dtdPath );
             }
 #endif            
@@ -2507,10 +2507,14 @@
         resourcePath->Des().Append( resource->FileName() );
         
         TDataType dataType( resource->MimeType() );
+        
         TPtrC8 tagsPtr;
-        if ( iResourceTag )
+        HBufC8* tagBuf8 = NULL;
+        if ( resource->Tags().Length() )
             {
-            tagsPtr.Set( iResourceTag->Des() );
+            tagBuf8 = HBufC8::NewLC( resource->Tags().Length() );
+            tagBuf8->Des().Copy( resource->Tags() );
+            tagsPtr.Set( tagBuf8->Des() );            
             }
         
         // Add localized files into the resource array
@@ -2523,6 +2527,11 @@
             tagsPtr
             );
         
+        if ( tagBuf8 )
+            {
+            CleanupStack::PopAndDestroy( tagBuf8 );
+            }
+        
         CleanupStack::PopAndDestroy( resourcePath );
         }        
     
--- a/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsserverutil.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -1646,9 +1646,9 @@
         {
         if ( parent->Name().CompareF( aNodeName ) == 0 )
             {
-            ChspsDomList& attrList = parent->AttributeList();                 
+            ChspsDomList& attrList = parent->AttributeList();
             ChspsDomAttribute* attr = static_cast<ChspsDomAttribute*>( attrList.FindByName( aAttrName ) );
-            if ( attr->Value().CompareF( aAttrValue ) == 0 )
+            if ( attr && attr->Value().CompareF( aAttrValue ) == 0 )
                 {
                 found = ETrue;
                 }
--- a/homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreensrv_plat/ai_variation_api/inc/activeidle2domaincrkeys.h	Mon Jan 18 20:32:13 2010 +0200
@@ -113,5 +113,14 @@
  */
 const TUint32 KAIWebStatus = 0x0000300F;
 
+/**
+ * Key id to store wallpaper change type
+ */
+const TUint32 KAIWallpaperChangeType = 0x00000850;
+
+/**
+ * Key id to store wallpaper path that is common for all Homescreen pages.
+ */
+const TUint32 KAIWallpaperPath = 0x00000851;
 
 #endif // __AI2INTERNALCRKEYS_H__
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h	Mon Jan 18 20:32:13 2010 +0200
@@ -113,6 +113,16 @@
      */
     virtual TInt ActivateAppL( CHsContentInfo& aInfo ) = 0;
 
+    /**
+     *
+     */
+    virtual TInt ActiveViewL( CHsContentInfo& aInfo ) = 0;
+
+    /**
+     *
+     */
+    virtual TInt ActiveAppL( CHsContentInfo& aInfo ) = 0;
+
     };
 
 
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/updatetests.cmd	Mon Jan 18 20:32:13 2010 +0200
@@ -1,18 +1,3 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of the License "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
 @echo off
 rem  
 rem For testing/debugging in emulator after the SISX package has been installed
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_requestnotify_6.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_requestnotify_6.h	Mon Jan 18 20:32:13 2010 +0200
@@ -1,21 +1,21 @@
 /*
-* 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 the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : mt_hsps_requestnotify_6.h
+*  Part of     : HSPS / SAPI module testing
+*  Description : Test case RequestNotify(6) test data
+*  Version     : %version: e003sa35#2 %
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Test case RequestNotify(6) test data
-*
+*  Copyright © 2008 Nokia. All rights reserved.
+*  This material, including documentation and any related computer
+*  programs, is protected by copyright controlled by Nokia.  All
+*  rights are reserved.  Copying, including reproducing, storing,
+*  adapting or translating, any or all of this material requires the
+*  prior written consent of Nokia.  This material also contains
+*  confidential information which may not be disclosed to others
+*  without the prior written consent of Nokia.
+* ==============================================================================
 */
 
-
 #ifndef C_MT_HSPS_REQUESTNOTIFY_6_H
 #define C_MT_HSPS_REQUESTNOTIFY_6_H
 
--- a/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsiconutility.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsiconutility.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -155,7 +155,9 @@
 
         aBitmap = appIcon->Bitmap();
         aMask = appIcon->Mask();
-        AknInternalIconUtils::SetAppIcon(aBitmap);
+        // The line below was commented out to improve the appearance of scaled
+        // icons of java applications.
+        // AknInternalIconUtils::SetAppIcon(aBitmap);
         
         // Detach and delete
         appIcon->SetBitmap( NULL );
Binary file idlefw/cenrep/keys_activeidle2.xls has changed
Binary file idlefw/conf/activeidle2.confml has changed
Binary file idlefw/conf/activeidle2_10275102.crml has changed
--- a/idlefw/group/ailaunch.mmp	Thu Jan 07 12:55:39 2010 +0200
+++ b/idlefw/group/ailaunch.mmp	Mon Jan 18 20:32:13 2010 +0200
@@ -25,7 +25,7 @@
 SECUREID        AI_SID_AIFW_EXE
 VENDORID        VID_DEFAULT
 
-CAPABILITY      CAP_APPLICATION PowerMgmt NetworkControl
+CAPABILITY      CAP_APPLICATION PowerMgmt NetworkControl TrustedUI
 
 EPOCSTACKSIZE   0x5000
 EPOCHEAPSIZE    0x300000 0xC00000
--- a/idlefw/plugins/mcsplugin/group/mcsplugin.mmp	Thu Jan 07 12:55:39 2010 +0200
+++ b/idlefw/plugins/mcsplugin/group/mcsplugin.mmp	Mon Jan 18 20:32:13 2010 +0200
@@ -79,7 +79,8 @@
 LIBRARY         commonengine.lib 
 LIBRARY         favouritesengine.lib
 
-LIBRARY         gfxtrans.lib
+LIBRARY         gfxtrans.lib 
+LIBRARY         centralrepository.lib
 
 
 // End of File
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h	Thu Jan 07 12:55:39 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcsplugin.h	Mon Jan 18 20:32:13 2010 +0200
@@ -23,7 +23,8 @@
 #include <aipropertyextension.h>
 #include <aicontentmodel.h>
 #include <aieventhandlerextension.h>
-
+#include <centralrepository.h>
+#include "mcspluginwatcher.h"
 
 class MAiContentObserver;
 class MAiContentItemIterator;
@@ -42,7 +43,8 @@
  */
 class CMCSPlugin : public CAiContentPublisher,
                    public MAiPropertyExtension,
-                   public MAiEventHandlerExtension
+                   public MAiEventHandlerExtension,
+                   public MMCSPluginWatcherObserver
 
 
     {
@@ -89,6 +91,12 @@
     */
     void PublishL();
 
+    /**
+    * From base class MMCSPluginWatcherObserver
+    * .a method for Skin UID cenrep key change handeling
+    */
+    void HandleNotifyL();
+
 // from base class CAiContentPublisher
   
     /**
@@ -276,8 +284,11 @@
     // Information about the content publisher (this plug-in)
     TAiPublisherInfo iInfo;
 
-    // Boolean, which expresses whether the content has been updated
-    //TBool iIsUpdated;
+    // For accessing central repository keys
+    CRepository* iRepository;
+
+    // For observing central repository Skin UID key change 
+    CMCSPluginWatcher* iRepositoryWatcher;
 
     };
 
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Thu Jan 07 12:55:39 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp	Mon Jan 18 20:32:13 2010 +0200
@@ -24,6 +24,9 @@
 #include <aistrcnv.h>
 #include <mcsmenuitem.h>
 
+#include <aknskinsinternalcrkeys.h> // For working with settings API
+#include <centralrepository.h> // Headers Used for CRepository
+
 #include "mcspluginuids.hrh"
 #include "mcsplugin.h"
 #include "mcsplugindata.h"
@@ -78,6 +81,39 @@
 void CMCSPlugin::ConstructL()
     { 
     iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_MCSPLUGIN; 
+    // We need to Query Central Repository
+    iRepository  = CRepository::NewL( KCRUidPersonalisation );
+
+    // Setting up watcher which calls HandleNotifyL method 
+    // everytime the SkinUID changes in central repository
+    iRepositoryWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::ENotify );
+    iRepository->NotifyRequest( KPslnActiveSkinUid, iRepositoryWatcher->iStatus );
+    iRepositoryWatcher->WatchNotify( this );
+    }
+
+// ---------------------------------------------------------------------------
+// Handle Skin UID change
+// ---------------------------------------------------------------------------
+//
+void CMCSPlugin::HandleNotifyL()
+    {
+
+    // Skin ID has changed. Set all MenuItems on Widget dirty
+    // and re-publish to update icons
+    if ( iEngine )
+        {
+        TInt dataCount = iEngine->MenuItemCount();
+        for ( TInt i = 0; i < dataCount; i++ )
+            {
+            iEngine->MenuDataL( i ).SetDirty( ETrue );
+            }
+        PublishL();
+        }
+
+    // Skin ID Notification must be activated again
+    iRepositoryWatcher->Cancel();
+    iRepository->NotifyRequest( KPslnActiveSkinUid, iRepositoryWatcher->iStatus );
+    iRepositoryWatcher->WatchNotify( this );
     }
     
 // ---------------------------------------------------------------------------
@@ -98,6 +134,19 @@
     iObservers.Close();
     
     DeleteContentModel();
+
+    if ( iRepository )
+        {
+        delete iRepository;
+        iRepository = NULL;
+        }
+
+    if ( iRepositoryWatcher )
+        {
+        iRepositoryWatcher->Cancel();
+        delete iRepositoryWatcher;
+        iRepositoryWatcher = NULL;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -154,6 +203,7 @@
 //
 void CMCSPlugin::PublishLItemL( MAiContentObserver& aObserver, TMCSData& aData, TInt aIndex )
     {
+
     if( !aData.IsDirty() )
         {
         return;
@@ -274,13 +324,13 @@
 void CMCSPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
     {
     
-    TLinearOrder<MAiPluginSettings> sortMethod(CMCSPlugin::CompareItems);
+    TLinearOrder<MAiPluginSettings> sortMethod( CMCSPlugin::CompareItems );
     RAiSettingsItemArray contentItemsArr;
 
     TInt count = aSettings.Count();
-    for(TInt i = 0; i < count; i++ )
+    for ( TInt i = 0; i < count; i++ )
        {
-       MAiPluginSettings* pluginSetting = aSettings[i];
+       MAiPluginSettings* pluginSetting = aSettings[ i ];
        if( pluginSetting->AiPluginItemType() == EAiPluginContentItem )
            {
            MAiPluginContentItem& contItem = pluginSetting->AiPluginContentItem();
@@ -291,15 +341,15 @@
 
        }
     iDataCount = contentItemsArr.Count();
-    if(iDataCount > 0 )
+    if ( iDataCount > 0 )
         {
         // Create the dynamic content Model
         DeleteContentModel();
-        iContentModel = new ( ELeave ) TAiContentItem[iDataCount];
-        for(TInt i = 0; i < iDataCount; i++)
+        iContentModel = new ( ELeave ) TAiContentItem[ iDataCount ];
+        for ( TInt i = 0; i < iDataCount; i++ )
             {
             iContentModel[i].id = i;
-            MAiPluginContentItem& contentItem = (contentItemsArr[i])->AiPluginContentItem();
+            MAiPluginContentItem& contentItem = ( contentItemsArr[ i ] )->AiPluginContentItem();
 
             if( contentItem.Type() == KContentItemTypeText )
                 {
@@ -313,11 +363,11 @@
                 }
             TInt pos = contentItem.Name().Locate( KPluginNameSeprator );
             
-            HBufC* contentId = HBufC::NewL(  contentItem.Name().Length());
+            HBufC* contentId = HBufC::NewL( contentItem.Name().Length() );
             CleanupStack::PushL( contentId );
             TPtr ptr = contentId->Des();
             ptr = contentItem.Name().Mid( pos + 1 );
-            TInt sizeOfContentId = ptr.Size() +sizeof(wchar_t);
+            TInt sizeOfContentId = ptr.Size() +sizeof( wchar_t );
             iContentModel[i].cid = static_cast<const wchar_t*>( User::AllocL( sizeOfContentId ) );
             Mem::Copy((TAny*)iContentModel[i].cid, ptr.PtrZ(), sizeOfContentId);
             CleanupStack::PopAndDestroy( contentId );