languageinterworkingfw/servicehandler/src/liwservicehandlerimpl.cpp
changeset 18 a7062f7f0b79
parent 0 99ef825efeca
child 27 bcef26ca2be3
--- a/languageinterworkingfw/servicehandler/src/liwservicehandlerimpl.cpp	Fri Jul 03 15:51:30 2009 +0100
+++ b/languageinterworkingfw/servicehandler/src/liwservicehandlerimpl.cpp	Thu Sep 10 12:58:32 2009 +0300
@@ -2471,6 +2471,32 @@
 	}
 }
 
+void CLiwServiceHandlerImpl::GetProviderResourceFile(TDes& aFilePath,CLiwGenericParamList* pMetaData)
+{	
+	_LIT8(KResourceFile,"res");
+
+	TInt pos = 0;
+	const TLiwGenericParam* pCapData = pMetaData->FindFirst(pos,KResourceFile);
+
+	if(pCapData)
+	{
+		const CLiwList* pCapList = pCapData->Value().AsList();
+		if(pCapList)
+		{
+			for(TInt idx(0);idx!=pCapList->Count();++idx)
+			{
+				TLiwVariant capVar;
+				capVar.PushL();
+				pCapList->AtL(idx, capVar);
+				aFilePath = capVar.AsDes();
+				CleanupStack::Pop(&capVar);
+				capVar.Reset();
+			}
+		}
+		
+	}
+}
+
 void CLiwServiceHandlerImpl::ComputeIntfVersion(CLiwServiceData* pProvMetaData,TReal& aIntfVersion)
 {
 	CLiwGenericParamList* pMetaDataList = pProvMetaData->GetMetaData();
@@ -2822,12 +2848,21 @@
     	if(pChosenImpl)
 		{
 		 	RArray<TCapability> provCaps;
-	    	GetCapabilitiesL(provCaps,pServiceData->GetMetaData());
-	    		
+		 	TFileName provResourcePath;
+	    	GetCapabilitiesL(provCaps,pServiceData->GetMetaData());	    	
+	    	  		
 	    	TInt isAllowed(KErrNone);
 	    	
 	    	if(aScriptSession)
-	    		isAllowed = aScriptSession->IsAllowed(provCaps);
+	    	    {
+	    	    if(aScriptSession->PromptOption() == RTPROMPTUI_PROVIDER)
+	    	    	{
+	    	    		GetProviderResourceFile(provResourcePath, pServiceData->GetMetaData());
+	    	        isAllowed = aScriptSession->IsAllowed(provCaps, pChosenImpl->ImplementationUid(), provResourcePath);	
+	    	      }
+                else
+                    isAllowed = aScriptSession->IsAllowed(provCaps);
+	    	    }
 	    		
 	    	if(KErrNone==isAllowed)
 		    {