terminalsecurity/SCP/SCPServer/src/SCPSession.cpp
changeset 22 19fb38abab1d
parent 4 958eca8527dd
child 24 bf47f3b79154
equal deleted inserted replaced
5:3f7d9dbe57c8 22:19fb38abab1d
   179                 // Acknowledgement received, now just wait for the actual 
   179                 // Acknowledgement received, now just wait for the actual 
   180                 // call to finish
   180                 // call to finish
   181                 Dprint( (_L("CSCPSession::AcknowledgeOperation( %d ): \
   181                 Dprint( (_L("CSCPSession::AcknowledgeOperation( %d ): \
   182                     Lock-op acknowledged"), aCommand ));
   182                     Lock-op acknowledged"), aCommand ));
   183                 iLockCommandState = ESCPLockCmdStateInProgressAcknowledged;
   183                 iLockCommandState = ESCPLockCmdStateInProgressAcknowledged;
   184                 iSettingHandler->AckReceived();
   184                 iNotificationHandler->AckReceived();
   185                                 
   185                                 
   186                 ret = ETrue;
   186                 ret = ETrue;
   187                 break;
   187                 break;
   188                 }
   188                 }
   189             
   189             
   433 
   433 
   434     // Don't create the notification handler if it won't be used 
   434     // Don't create the notification handler if it won't be used 
   435     // (because DOS lock won't be disabled)
   435     // (because DOS lock won't be disabled)
   436     if ( ( aLocked ) || ( ( !IsSMSLockActiveL() ) && ( !IsAutolockActive() ) ) )
   436     if ( ( aLocked ) || ( ( !IsSMSLockActiveL() ) && ( !IsAutolockActive() ) ) )
   437         {
   437         {
   438         iNotificationHandler = CSCPLockNotificationEventHandler::NewL( &iServer );
   438         iNotificationHandler = CSCPLockNotificationEventHandler::NewL( &iServer, this );
   439         }
   439         }
   440         
   440         
   441 #endif // WINS
   441 #endif // WINS
   442         
   442         
   443     iSettingHandler = CSCPLockSettingEventHandler::NewL( 
   443     iSettingHandler = CSCPLockSettingEventHandler::NewL( 
  1540 
  1540 
  1541         if(TUint32(id.iUid) != aCallerID) {
  1541         if(TUint32(id.iUid) != aCallerID) {
  1542             CTC3rdPartyParamsEcomIF* plugin = CTC3rdPartyParamsEcomIF :: NewL(implementation);
  1542             CTC3rdPartyParamsEcomIF* plugin = CTC3rdPartyParamsEcomIF :: NewL(implementation);
  1543             CleanupStack :: PushL(plugin);
  1543             CleanupStack :: PushL(plugin);
  1544             TRAPD(leaveCode, plugin->DeviceLockParamChangedL(aChange));
  1544             TRAPD(leaveCode, plugin->DeviceLockParamChangedL(aChange));
       
  1545             if (!leaveCode)
       
  1546             	{
       
  1547             	Dprint(_L("[CSCPSession]-> leaveCode=%d"), leaveCode);		
       
  1548             	}
       
  1549             
  1545             CleanupStack :: PopAndDestroy(); // plugin 
  1550             CleanupStack :: PopAndDestroy(); // plugin 
  1546         }
  1551         }
  1547 
  1552 
  1548         CleanupStack :: PopAndDestroy(text);
  1553         CleanupStack :: PopAndDestroy(text);
  1549     }
  1554     }
  1604     return lStatus;
  1609     return lStatus;
  1605 }
  1610 }
  1606 TInt CSCPSession :: HandleSetALPeriodL( const RMessage2& aMessage ) {
  1611 TInt CSCPSession :: HandleSetALPeriodL( const RMessage2& aMessage ) {
  1607     Dprint((_L("[CSCPSession]-> HandleSetParamMessageL() >>>")));
  1612     Dprint((_L("[CSCPSession]-> HandleSetParamMessageL() >>>")));
  1608     TBool oldALState = EFalse;
  1613     TBool oldALState = EFalse;
  1609     TBool lNotifyChange = ETrue;
  1614     
  1610     #ifndef __WINS__ // No need to check for lock setting changes in emulator
  1615     #ifndef __WINS__ // No need to check for lock setting changes in emulator
  1611     if ( ( (TSCPParameterID)aMessage.Int0() == ESCPAutolockPeriod ) ||
  1616     if ( ( (TSCPParameterID)aMessage.Int0() == ESCPAutolockPeriod ) ||
  1612          ( (TSCPParameterID)aMessage.Int0() == ESCPMaxAutolockPeriod ) )    
  1617          ( (TSCPParameterID)aMessage.Int0() == ESCPMaxAutolockPeriod ) )    
  1613         {
  1618         {
  1614         oldALState = IsAutolockActive();               
  1619         oldALState = IsAutolockActive();               
  1663 	
  1668 	
  1664 	const TParamChange lChange(aParamID, aParamVal);
  1669 	const TParamChange lChange(aParamID, aParamVal);
  1665 	TInt ret = lChangeArray.Append(lChange);
  1670 	TInt ret = lChangeArray.Append(lChange);
  1666 	
  1671 	
  1667 	if(KErrNone != ret) {
  1672 	if(KErrNone != ret) {
       
  1673 		CleanupStack :: PopAndDestroy(); //lChangeArray
  1668 		return;
  1674 		return;
  1669 	}
  1675 	}
  1670 	
  1676 	
  1671 	Dprint(_L("[CSCPSession]->INFO: Initiating notification to all the StakeHolders..."));
  1677 	Dprint(_L("[CSCPSession]->INFO: Initiating notification to all the StakeHolders..."));
  1672 	TRAPD(lErr, NotifyAllStakeHoldersL(lChangeArray, aCallerID));
  1678 	TRAPD(lErr, NotifyAllStakeHoldersL(lChangeArray, aCallerID));
       
  1679 	if (!lErr)
       
  1680 		{
       
  1681 		Dprint(_L("[CSCPSession]-> lErr=%d"), lErr);
       
  1682 	}
  1673 	Dprint(_L("[CSCPSession]->INFO: Notification to all the StakeHolders complete..."));
  1683 	Dprint(_L("[CSCPSession]->INFO: Notification to all the StakeHolders complete..."));
  1674 	CleanupStack :: PopAndDestroy(); //lChangeArray
  1684 	CleanupStack :: PopAndDestroy(); //lChangeArray
  1675 }
  1685 }