phoneengine/phonemodel/src/cpeparsersshandler.cpp
changeset 46 bc5a64e5bc3c
parent 37 ba76fc04e6c2
child 51 f39ed5e045e0
child 65 2a5d4ab426d3
equal deleted inserted replaced
45:6b911d05207e 46:bc5a64e5bc3c
    41 #include <psuidivertobs.h>
    41 #include <psuidivertobs.h>
    42 #include <psuiwaitingobs.h>
    42 #include <psuiwaitingobs.h>
    43 #include <psuiwaitingobs.h>
    43 #include <psuiwaitingobs.h>
    44 #include <talogger.h>
    44 #include <talogger.h>
    45 
    45 
       
    46 #include <psetwrapper.h>
       
    47 #include <psuidivertnotehandler.h>
       
    48 #include <psetcalldivertingwrapper.h>
       
    49 #include <psuiwaitingnotehandler.h>
       
    50 #include <psetcallwaitingwrapper.h>
    46 
    51 
    47 // CONSTANTS
    52 // CONSTANTS
    48 const TInt KPEDefinedBasicServiceGroup = 99;
    53 const TInt KPEDefinedBasicServiceGroup = 99;
    49 
    54 
    50 
    55 
    92     {    
    97     {    
    93     delete iCli;
    98     delete iCli;
    94     delete iCliObserver;
    99     delete iCliObserver;
    95     delete iBarring;
   100     delete iBarring;
    96     delete iCbObserver;
   101     delete iCbObserver;
    97     delete iDivert;
       
    98     delete iCfObserver;
       
    99     delete iWaiting;
   102     delete iWaiting;
   100     delete iCwObserver;
       
   101     delete iSettings;
   103     delete iSettings;
   102     delete iObsContainer;
   104     delete iObsContainer;
       
   105     
       
   106     delete iCallDivertingHandler;
       
   107     delete iPsetWrapper;
       
   108     
   103 
   109 
   104     TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::~CPEParserSSHandler" );
   110     TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::~CPEParserSSHandler" );
   105     }
   111     }
   106 
   112 
   107 // -----------------------------------------------------------------------------
   113 // -----------------------------------------------------------------------------
   970 // -----------------------------------------------------------------------------
   976 // -----------------------------------------------------------------------------
   971 //
   977 //
   972 void CPEParserSSHandler::CreateCWObsL()
   978 void CPEParserSSHandler::CreateCWObsL()
   973     {
   979     {
   974     ConnectToSsEngineL();
   980     ConnectToSsEngineL();
   975     //call waiting observer and engine
   981    
   976     if ( !iCwObserver )
   982     if ( !iPsetWrapper )
   977         {
   983         {
   978         iCwObserver = iObsContainer->CreateCWObsL();
   984         iPsetWrapper = new PSetWrapper;    
   979         iWaiting = iSettings->CreateCWObjectL( *iCwObserver );
   985         iCallWaitingWrapper = &iPsetWrapper->callWaitingWrapper();
   980         iWaiting->SetRequestObserver( this );
   986         iCallWaitingHandler = new PsUiWaitingNoteHandler(*iCallWaitingWrapper);
       
   987         iWaiting = &iCallWaitingWrapper->getCPsetCallWaiting();
       
   988         iWaiting->SetRequestObserver(this);
   981         }
   989         }
   982     }
   990     }
   983 
   991 
   984 // -----------------------------------------------------------------------------
   992 // -----------------------------------------------------------------------------
   985 // CPEParserSSHandler::CreateCBObsL
   993 // CPEParserSSHandler::CreateCBObsL
  1001 // CPEParserSSHandler::CreateCFObsL
  1009 // CPEParserSSHandler::CreateCFObsL
  1002 // -----------------------------------------------------------------------------
  1010 // -----------------------------------------------------------------------------
  1003 //
  1011 //
  1004 void CPEParserSSHandler::CreateCFObsL()
  1012 void CPEParserSSHandler::CreateCFObsL()
  1005     {
  1013     {
  1006     ConnectToSsEngineL();
  1014     if ( !iPsetWrapper )
  1007     //call divert observer and engine
  1015         {
  1008     if ( !iCfObserver )
  1016         iPsetWrapper = new PSetWrapper;    
  1009         {   
  1017         iCallDivertingWrapper = &iPsetWrapper->callDivertingWrapper();
  1010         iCfObserver = iObsContainer->CreateCFObsL();
  1018         iCallDivertingHandler = new PsUiDivertNoteHandler(*iCallDivertingWrapper);
  1011         iDivert = iSettings->CreateCFObjectL( *iCfObserver );
  1019         iDivert = &iCallDivertingWrapper->getCPsetCallDiverting();
  1012         iDivert->SetRequestObserver( this );
  1020         iDivert->SetRequestObserver(this);
  1013         }
  1021         }
  1014     }
  1022     }
  1015     
  1023     
  1016 // -----------------------------------------------------------------------------
  1024 // -----------------------------------------------------------------------------
  1017 // CPEParserSSHandler::CreateCliObsL
  1025 // CPEParserSSHandler::CreateCliObsL
  1064 // CPEParserSSHandler::ResetVariables
  1072 // CPEParserSSHandler::ResetVariables
  1065 // -----------------------------------------------------------------------------
  1073 // -----------------------------------------------------------------------------
  1066 //
  1074 //
  1067 void CPEParserSSHandler::ResetVariables()
  1075 void CPEParserSSHandler::ResetVariables()
  1068     {
  1076     {
  1069     delete iCfObserver;
       
  1070     iCfObserver = NULL;
       
  1071     delete iCbObserver;
  1077     delete iCbObserver;
  1072     iCbObserver = NULL;
  1078     iCbObserver = NULL;
  1073     delete iCwObserver;
       
  1074     iCwObserver = NULL;
       
  1075     delete iCliObserver;
  1079     delete iCliObserver;
  1076     iCliObserver = NULL;
  1080     iCliObserver = NULL;
  1077     delete iDivert;
  1081    
  1078     iDivert = NULL;
       
  1079     delete iBarring;
  1082     delete iBarring;
  1080     iBarring = NULL;
  1083     iBarring = NULL;
  1081     delete iWaiting;
  1084     
  1082     iWaiting = NULL;
       
  1083     delete iCli;
  1085     delete iCli;
  1084     iCli = NULL;
  1086     iCli = NULL;
  1085     delete iSettings;
  1087     delete iSettings;
  1086     iSettings = NULL;
  1088     iSettings = NULL;
  1087     delete iObsContainer;
  1089     delete iObsContainer;
  1088     iObsContainer = NULL;
  1090     iObsContainer = NULL;
       
  1091     
       
  1092     iDivert = NULL;
       
  1093     delete iCallDivertingHandler;
       
  1094     iCallDivertingHandler = NULL;
       
  1095       
       
  1096     iWaiting = NULL;
       
  1097     delete iCallWaitingHandler;
       
  1098     iCallWaitingHandler = NULL;
       
  1099     
       
  1100     delete iPsetWrapper;
       
  1101     iPsetWrapper = NULL;
  1089     }
  1102     }
  1090 
  1103 
  1091 // -----------------------------------------------------------------------------
  1104 // -----------------------------------------------------------------------------
  1092 // CPEParserSSHandler::CopyL
  1105 // CPEParserSSHandler::CopyL
  1093 // -----------------------------------------------------------------------------
  1106 // -----------------------------------------------------------------------------