1571 implArray.ResetAndDestroy(); |
1571 implArray.ResetAndDestroy(); |
1572 CleanupStack :: PopAndDestroy(&implArray); |
1572 CleanupStack :: PopAndDestroy(&implArray); |
1573 Dprint(_L("[CSCPSession]-> NotifyAllStakeHoldersL() <<<")); |
1573 Dprint(_L("[CSCPSession]-> NotifyAllStakeHoldersL() <<<")); |
1574 return KErrNone; |
1574 return KErrNone; |
1575 } |
1575 } |
1576 |
|
1577 TInt CSCPSession :: HandleCleanupL(const RMessage2& aMessage) { |
1576 TInt CSCPSession :: HandleCleanupL(const RMessage2& aMessage) { |
1578 Dprint((_L("[CSCPSession]-> HandleCleanupL() >>>"))); |
|
1579 |
|
1580 if( (aMessage.SecureId().iId != KSCPServerSIDTerminalControl) && |
|
1581 (aMessage.SecureId().iId != KSCPEvntHndlrUid)) { |
|
1582 |
|
1583 Dprint((_L("[CSCPSession]-> ERROR: caller app id=%ld. Permission denied..."), aMessage.SecureId().iId)); |
|
1584 User :: Leave(KErrPermissionDenied); |
|
1585 } |
|
1586 |
|
1587 // Copy the client data into a local buffer |
1577 // Copy the client data into a local buffer |
1588 TInt32 lCount = aMessage.GetDesLength(1); |
1578 TInt32 lCount = aMessage.GetDesLength(1); |
|
1579 |
|
1580 /* // If the caller is not SCPEventHandler the deny access |
|
1581 if(aMessage.SecureId() != KSCPEvntHndlrUid) { |
|
1582 return KErrPermissionDenied; |
|
1583 }*/ |
1589 |
1584 |
1590 // Atleast one application id has to be present in the received message (atleast 8 bytes) |
1585 // Atleast one application id has to be present in the received message (atleast 8 bytes) |
1591 if(lCount < sizeof(TInt32)) { |
1586 if(lCount < sizeof(TInt32)) { |
1592 return KErrArgument; |
1587 return KErrArgument; |
1593 } |
1588 } |
1594 |
1589 |
1595 TInt lStatus = KErrNone; |
|
1596 RArray<const TParamChange> lChangeArray; |
1590 RArray<const TParamChange> lChangeArray; |
1597 CleanupClosePushL(lChangeArray); |
1591 CleanupClosePushL(lChangeArray); |
1598 |
1592 |
1599 RPointerArray<HBufC8> lParamValArray; |
1593 RPointerArray<HBufC8> lParamValArray; |
1600 CleanupClosePushL(lParamValArray); |
1594 CleanupClosePushL(lParamValArray); |
1601 |
1595 |
1602 HBufC8* lBuffer = HBufC8 :: NewLC(lCount); |
1596 HBufC8* lBuffer = HBufC8 :: NewLC(lCount); |
1603 TPtr8 bufPtr = lBuffer->Des(); |
1597 TPtr8 bufPtr = lBuffer->Des(); |
1604 aMessage.ReadL(1, bufPtr); |
1598 aMessage.ReadL(1, bufPtr); |
|
1599 |
|
1600 TInt lStatus = KErrNone; |
1605 |
1601 |
1606 TRAPD(lErr, lStatus = iServer.PerformCleanupL(lBuffer, lChangeArray, lParamValArray)); |
1602 TRAPD(lErr, lStatus = iServer.PerformCleanupL(lBuffer, lChangeArray, lParamValArray)); |
1607 |
1603 |
1608 if(lErr != KErrNone) { |
1604 if(lErr != KErrNone) { |
1609 Dprint(_L("[CSCPSession]-> ERROR: SCPServer was unable to complete the operation lErr=%d"), lErr); |
1605 Dprint(_L("[CSCPSession]-> ERROR: SCPServer was unable to complete the operation lErr=%d"), lErr); |
1623 } |
1619 } |
1624 } |
1620 } |
1625 |
1621 |
1626 lParamValArray.ResetAndDestroy(); |
1622 lParamValArray.ResetAndDestroy(); |
1627 CleanupStack :: PopAndDestroy(3); // lParamIDArray lParamValArray lBuffer |
1623 CleanupStack :: PopAndDestroy(3); // lParamIDArray lParamValArray lBuffer |
1628 Dprint((_L("[CSCPSession]-> HandleCleanupL() <<<"))); |
|
1629 return lStatus; |
1624 return lStatus; |
1630 } |
1625 } |
1631 |
|
1632 TInt CSCPSession :: HandleSetALPeriodL( const RMessage2& aMessage ) { |
1626 TInt CSCPSession :: HandleSetALPeriodL( const RMessage2& aMessage ) { |
1633 Dprint((_L("[CSCPSession]-> HandleSetParamMessageL() >>>"))); |
1627 Dprint((_L("[CSCPSession]-> HandleSetParamMessageL() >>>"))); |
1634 TBool oldALState = EFalse; |
1628 TBool oldALState = EFalse; |
1635 TBool lNotifyChange = ETrue; |
1629 TBool lNotifyChange = ETrue; |
1636 #ifndef __WINS__ // No need to check for lock setting changes in emulator |
1630 #ifndef __WINS__ // No need to check for lock setting changes in emulator |