840 // to the server. |
840 // to the server. |
841 // |
841 // |
842 // Status : Approved |
842 // Status : Approved |
843 // --------------------------------------------------------- |
843 // --------------------------------------------------------- |
844 // |
844 // |
845 void CSCPSession::HandleAuthenticationMessageL( const RMessage2 &aMessage ) |
845 void CSCPSession :: HandleAuthenticationMessageL( const RMessage2 &aMessage ) { |
846 { |
846 |
847 if(!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) |
847 if(!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) |
848 { |
848 { |
849 FeatureManager::UnInitializeLib(); |
849 FeatureManager::UnInitializeLib(); |
850 User::Leave(KErrNotSupported); |
850 User::Leave(KErrNotSupported); |
851 } |
851 } |
852 if ((aMessage.SecureId() != KSCPServerSIDAutolock)&&(aMessage.SecureId() != KAknNfySrvUid)&& |
852 |
853 (aMessage.SecureId() != KSCPServerSIDGeneralSettings)&&(aMessage.SecureId() != KSCPServerSIDSysAp)&& |
853 TSecureId id = aMessage.SecureId(); |
854 (aMessage.SecureId() != KSCPServerSIDTerminalControl)) |
854 |
855 { |
855 switch(id.iId) { |
856 Dprint( (_L("CSCPSession::HandleAuthenticationMessageL():\ |
856 case KSCPServerSIDAutolock: |
857 ERROR: Permission denied") )); |
857 case KAknNfySrvUid: |
|
858 case KSCPServerSIDGeneralSettings: |
|
859 case KSCPServerSIDSysAp: |
|
860 case KSCPServerSIDTerminalControl: |
|
861 case KSCPServerSIDTelephone: |
|
862 case KSCPServerSIDLog: |
|
863 break; |
|
864 default: { |
|
865 Dprint( (_L("[CSCPSession]-> ERROR: Permission denied") )); |
858 User::Leave( KErrPermissionDenied ); |
866 User::Leave( KErrPermissionDenied ); |
859 } |
867 } |
|
868 }; |
|
869 |
860 Dprint( (_L("--> CSCPSession::HandleAuthenticationMessage()") )); |
870 Dprint( (_L("--> CSCPSession::HandleAuthenticationMessage()") )); |
861 |
871 |
862 HBufC* servBuf = NULL; |
872 HBufC* servBuf = NULL; |
863 TInt status = KErrNone; |
873 TInt status = KErrNone; |
864 |
874 |