phoneengine/phonemodel/src/cpeparsersimcontrolhandler.cpp
changeset 21 92ab7f8d0eab
parent 0 5f000ab63145
child 51 f39ed5e045e0
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
    20 #include "cpeparsersimcontrolhandler.h"
    20 #include "cpeparsersimcontrolhandler.h"
    21 #include "mpephonemodelinternal.h"
    21 #include "mpephonemodelinternal.h"
    22 #include <mpecontacthandling.h>
    22 #include <mpecontacthandling.h>
    23 #include <mpedatastore.h>
    23 #include <mpedatastore.h>
    24 #include <pepanic.pan>
    24 #include <pepanic.pan>
    25 #include <SecUi.h>
    25 #include <secui.h>
    26 #include <SecUiManualSecuritySettings.h>
    26 #include <secuimanualsecuritysettings.h>
    27 #include <talogger.h>
    27 #include <talogger.h>
    28 
    28 
    29 
    29 
    30 // ================= MEMBER FUNCTIONS =======================
    30 // ================= MEMBER FUNCTIONS =======================
    31 
    31 
    47 
    47 
    48 // Destructor
    48 // Destructor
    49 CPEParserSimControlHandler::~CPEParserSimControlHandler()
    49 CPEParserSimControlHandler::~CPEParserSimControlHandler()
    50     {
    50     {
    51     if( iSecurityModel != NULL )
    51     if( iSecurityModel != NULL )
    52 	    {
    52         {
    53 	    iSecurityModel->CancelChangePin();
    53         iSecurityModel->CancelChangePin();
    54 	    iSecurityModel->CancelUnblockPin();
    54         iSecurityModel->CancelUnblockPin();
    55 	    delete iSecurityModel;
    55         delete iSecurityModel;
    56 	    TSecUi::UnInitializeLib();	
    56         TSecUi::UnInitializeLib();  
    57 	    }
    57         }
    58     TEFLOGSTRING( KTAOBJECT,
    58     TEFLOGSTRING( KTAOBJECT,
    59         "PE CPEParserSimControlHandler::~CPEParserSimControlHandler: complete");
    59         "PE CPEParserSimControlHandler::~CPEParserSimControlHandler: complete");
    60     }
    60     }
    61 
    61 
    62 // -----------------------------------------------------------------------------
    62 // -----------------------------------------------------------------------------
   106             // Case not handled, panic.
   106             // Case not handled, panic.
   107             User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser );
   107             User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser );
   108             break;
   108             break;
   109         }
   109         }
   110         
   110         
   111 	if( iSecurityModel == NULL )
   111     if( iSecurityModel == NULL )
   112 		{
   112         {
   113 		TSecUi::InitializeLibL();
   113         TSecUi::InitializeLibL();
   114  		iSecurityModel = CManualSecuritySettings::NewL();
   114         iSecurityModel = CManualSecuritySettings::NewL();
   115     	TEFLOGSTRING( KTAOBJECT,
   115         TEFLOGSTRING( KTAOBJECT,
   116         	"PE CPEParserSimControlHandler::ConstructL" );
   116             "PE CPEParserSimControlHandler::ConstructL" );
   117 		}
   117         }
   118         
   118         
   119     if( iSecurityModel->ChangePinL( pin, aOldPin, aNewPin, aVerifyNew ) )
   119     if( iSecurityModel->ChangePinL( pin, aOldPin, aNewPin, aVerifyNew ) )
   120         {
   120         {
   121         iSupplementaryServicesCommandInfo.action = EPEPasswordOperation;
   121         iSupplementaryServicesCommandInfo.action = EPEPasswordOperation;
   122         iSupplementaryServicesCommandInfo.type = EPEPin;
   122         iSupplementaryServicesCommandInfo.type = EPEPin;
   155             // Case not handled, panic.
   155             // Case not handled, panic.
   156             User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser );
   156             User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser );
   157             break;
   157             break;
   158         }
   158         }
   159 
   159 
   160 	if( iSecurityModel == NULL )
   160     if( iSecurityModel == NULL )
   161 		{
   161         {
   162 		TSecUi::InitializeLibL();
   162         TSecUi::InitializeLibL();
   163  		iSecurityModel = CManualSecuritySettings::NewL();
   163         iSecurityModel = CManualSecuritySettings::NewL();
   164     	TEFLOGSTRING( KTAOBJECT,
   164         TEFLOGSTRING( KTAOBJECT,
   165         	"PE CPEParserSimControlHandler::ConstructL" );
   165             "PE CPEParserSimControlHandler::ConstructL" );
   166 		}
   166         }
   167 		
   167         
   168     if( iSecurityModel->UnblockPinL( pin, aPuk, aNewPin, aVerifyNew ) )
   168     if( iSecurityModel->UnblockPinL( pin, aPuk, aNewPin, aVerifyNew ) )
   169         {
   169         {
   170         iSupplementaryServicesCommandInfo.action = EPEPasswordOperation;
   170         iSupplementaryServicesCommandInfo.action = EPEPasswordOperation;
   171         iSupplementaryServicesCommandInfo.type = EPEUnblockPin;
   171         iSupplementaryServicesCommandInfo.type = EPEUnblockPin;
   172         iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified;
   172         iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified;