rtsecuritymanager/rtsecuritymanagerserver/src/rtsecmgrclientapi.cpp
changeset 10 a7062f7f0b79
parent 0 99ef825efeca
--- a/rtsecuritymanager/rtsecuritymanagerserver/src/rtsecmgrclientapi.cpp	Fri Jul 03 15:51:30 2009 +0100
+++ b/rtsecuritymanager/rtsecuritymanagerserver/src/rtsecmgrclientapi.cpp	Thu Sep 10 12:58:32 2009 +0300
@@ -400,3 +400,31 @@
 		aMessage.Write (EMsgArgZero, pkg);
 		}
 	}
+
+void CRTSecMgrSubSession::UpdatePermGrantProviderL(const RMessage2& aMessage)
+    {
+    HBufC8* desData = HBufC8::NewLC (KMaxMsgLength);
+    TPtr8 readPtr(desData->Des ());
+    aMessage.ReadL (EMsgArgZero, readPtr);
+    CRTPermGrantMessage *msg = CRTPermGrantMessage::NewLC(readPtr);
+    
+    if ( !iSession->IsScriptSessionOpen(msg->ScriptID(),this))
+        {        
+        RProviderArray allowedProviders;
+        RProviderArray deniedProviders;
+        allowedProviders.Reset();
+        deniedProviders.Reset();
+        msg->AllowedProviders(allowedProviders);
+        msg->DeniedProviders(deniedProviders);
+        iSecMgrServer->UpdatePermGrantL (msg->ScriptID(),allowedProviders,deniedProviders);
+        allowedProviders.Close();
+        deniedProviders.Close();
+        }
+    else
+        {
+        TPckgBuf<TInt> pkg((TInt)ErrUpdatePermGrantFailed);
+        aMessage.Write (EMsgArgZero, pkg);
+        }
+    CleanupStack::PopAndDestroy(msg);
+    CleanupStack::PopAndDestroy(desData);
+    }