commsconfig/cscapplicationui/src/cscappui.cpp
branchRCL_3
changeset 9 bddb6d4447db
parent 8 7117cbf1600a
--- a/commsconfig/cscapplicationui/src/cscappui.cpp	Fri Mar 12 15:42:09 2010 +0200
+++ b/commsconfig/cscapplicationui/src/cscappui.cpp	Mon Mar 15 12:39:55 2010 +0200
@@ -31,7 +31,6 @@
 #include <mspnotifychangeobserver.h>
 #include <gsfwviewuids.h>
 #include <apgwgnam.h>
-#include <csc.hlp.hrh>
 
 #include "cscappui.h"
 #include "csclogger.h"
@@ -502,7 +501,7 @@
                 embeddeeuid = windowName1->AppUid();
 
                 // Check if CSC is the child of GS
-                if ( KUidCscHelp == embeddeeuid )
+                if ( KUidCSCApp == embeddeeuid )
                     {
                     ret = ETrue;
                     gstask.EndTask();
@@ -515,3 +514,33 @@
     
     return ret;
     }
+
+// ---------------------------------------------------------------------------
+// Handle view change messages (e.g. from MeCo)
+// ---------------------------------------------------------------------------
+//
+MCoeMessageObserver::TMessageResponse CCSCAppUi::HandleMessageL(
+    TUint32 /*aClientHandleOfTargetWindowGroup*/, TUid aMessageUid,
+    const TDesC8& aMessageParameters )
+    {
+    CSCDEBUG( "CCSCAppUi::HandleMessageL - begin" ); 
+
+    MCoeMessageObserver::TMessageResponse ret = EMessageNotHandled;
+
+    if ( TUid::Uid( KUidApaMessageSwitchOpenFileValue ) == aMessageUid &&
+        aMessageParameters.Length() &&
+        aMessageParameters.Length() <= KMaxParamLength )
+        {
+        TBuf<KMaxParamLength> params;
+        params.Copy( aMessageParameters );  
+        iStartupHandler->SetStartupParametersL( params );
+            
+        iServiceView->InitializeWithStartupParametersL();
+        iServiceView->ExecuteStartupActionsL( EFalse, EFalse );
+        
+        ret = EMessageHandled;
+        }
+
+    CSCDEBUG( "CCSCAppUi::HandleMessageL - end" ); 
+    return ret;
+    }