phoneengine/phonemodel/src/cpeparsersshandler.cpp
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 21 92ab7f8d0eab
parent 46 bc5a64e5bc3c
--- a/phoneengine/phonemodel/src/cpeparsersshandler.cpp	Tue Jun 15 14:14:38 2010 +0100
+++ b/phoneengine/phonemodel/src/cpeparsersshandler.cpp	Thu Jul 22 16:33:21 2010 +0100
@@ -43,6 +43,11 @@
 #include <psuiwaitingobs.h>
 #include <talogger.h>
 
+#include <psetwrapper.h>
+#include <psuidivertnotehandler.h>
+#include <psetcalldivertingwrapper.h>
+#include <psuiwaitingnotehandler.h>
+#include <psetcallwaitingwrapper.h>
 
 // CONSTANTS
 const TInt KPEDefinedBasicServiceGroup = 99;
@@ -94,12 +99,13 @@
     delete iCliObserver;
     delete iBarring;
     delete iCbObserver;
-    delete iDivert;
-    delete iCfObserver;
     delete iWaiting;
-    delete iCwObserver;
     delete iSettings;
     delete iObsContainer;
+    
+    delete iCallDivertingHandler;
+    delete iPsetWrapper;
+    
 
     TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::~CPEParserSSHandler" );
     }
@@ -972,12 +978,14 @@
 void CPEParserSSHandler::CreateCWObsL()
     {
     ConnectToSsEngineL();
-    //call waiting observer and engine
-    if ( !iCwObserver )
+   
+    if ( !iPsetWrapper )
         {
-        iCwObserver = iObsContainer->CreateCWObsL();
-        iWaiting = iSettings->CreateCWObjectL( *iCwObserver );
-        iWaiting->SetRequestObserver( this );
+        iPsetWrapper = new PSetWrapper;    
+        iCallWaitingWrapper = &iPsetWrapper->callWaitingWrapper();
+        iCallWaitingHandler = new PsUiWaitingNoteHandler(*iCallWaitingWrapper);
+        iWaiting = &iCallWaitingWrapper->getCPsetCallWaiting();
+        iWaiting->SetRequestObserver(this);
         }
     }
 
@@ -1003,13 +1011,13 @@
 //
 void CPEParserSSHandler::CreateCFObsL()
     {
-    ConnectToSsEngineL();
-    //call divert observer and engine
-    if ( !iCfObserver )
-        {   
-        iCfObserver = iObsContainer->CreateCFObsL();
-        iDivert = iSettings->CreateCFObjectL( *iCfObserver );
-        iDivert->SetRequestObserver( this );
+    if ( !iPsetWrapper )
+        {
+        iPsetWrapper = new PSetWrapper;    
+        iCallDivertingWrapper = &iPsetWrapper->callDivertingWrapper();
+        iCallDivertingHandler = new PsUiDivertNoteHandler(*iCallDivertingWrapper);
+        iDivert = &iCallDivertingWrapper->getCPsetCallDiverting();
+        iDivert->SetRequestObserver(this);
         }
     }
     
@@ -1066,26 +1074,31 @@
 //
 void CPEParserSSHandler::ResetVariables()
     {
-    delete iCfObserver;
-    iCfObserver = NULL;
     delete iCbObserver;
     iCbObserver = NULL;
-    delete iCwObserver;
-    iCwObserver = NULL;
     delete iCliObserver;
     iCliObserver = NULL;
-    delete iDivert;
-    iDivert = NULL;
+   
     delete iBarring;
     iBarring = NULL;
-    delete iWaiting;
-    iWaiting = NULL;
+    
     delete iCli;
     iCli = NULL;
     delete iSettings;
     iSettings = NULL;
     delete iObsContainer;
     iObsContainer = NULL;
+    
+    iDivert = NULL;
+    delete iCallDivertingHandler;
+    iCallDivertingHandler = NULL;
+      
+    iWaiting = NULL;
+    delete iCallWaitingHandler;
+    iCallWaitingHandler = NULL;
+    
+    delete iPsetWrapper;
+    iPsetWrapper = NULL;
     }
 
 // -----------------------------------------------------------------------------