equal
deleted
inserted
replaced
35 #include "liwtlsdata.h" |
35 #include "liwtlsdata.h" |
36 #include "data_caging_path_literals.hrh" |
36 #include "data_caging_path_literals.hrh" |
37 |
37 |
38 #include "liwxmlhandler.h" |
38 #include "liwxmlhandler.h" |
39 #include "liwservicedata.h" |
39 #include "liwservicedata.h" |
40 #include <e32property.h> |
40 |
41 #include <rtsecmgrscriptsession.h> |
41 #include <rtsecmgrscriptsession.h> |
42 |
42 |
43 // CONSTANTS |
43 // CONSTANTS |
44 // Max number of empty menu resource slots. |
44 // Max number of empty menu resource slots. |
45 const TInt KMaxMenuResources = 16; |
45 const TInt KMaxMenuResources = 16; |
51 // The range reserved for individual menu pane. |
51 // The range reserved for individual menu pane. |
52 const TInt KIndividualMenuPaneIdRange = 10000; |
52 const TInt KIndividualMenuPaneIdRange = 10000; |
53 |
53 |
54 // The whole range that is reserved to all menu panes. Currently value is 170 000. |
54 // The whole range that is reserved to all menu panes. Currently value is 170 000. |
55 const TInt KMenuPaneCommandRange = (KMaxMenuResources + 1) * KIndividualMenuPaneIdRange; |
55 const TInt KMenuPaneCommandRange = (KMaxMenuResources + 1) * KIndividualMenuPaneIdRange; |
56 |
|
57 const TUid KMyPropertyCat = { 0x10282822 }; |
|
58 |
|
59 enum TMyPropertyKeys { EMyPropertyState = 115, EMyPropertyFinalState = 116}; |
|
60 |
56 |
61 _LIT(KLiwResourceFile, "liwServiceHandler.rsc"); |
57 _LIT(KLiwResourceFile, "liwServiceHandler.rsc"); |
62 _LIT(KLiwZDrive, "z:"); |
58 _LIT(KLiwZDrive, "z:"); |
63 _LIT8(KDataSeparator, "||"); |
59 _LIT8(KDataSeparator, "||"); |
64 _LIT(KPerExtension,".per"); |
60 _LIT(KPerExtension,".per"); |
427 |
423 |
428 |
424 |
429 TInt CLiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest) |
425 TInt CLiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest) |
430 { |
426 { |
431 return (this->AttachL(aInterest,NULL)); |
427 return (this->AttachL(aInterest,NULL)); |
432 } |
|
433 |
|
434 TInt CLiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest,CRTSecMgrScriptSession* aSecMgrScriptSession,TInt aWidgetId) |
|
435 { |
|
436 iWidgetId = aWidgetId; |
|
437 return (this->AttachL(aInterest,aSecMgrScriptSession)); |
|
438 } |
428 } |
439 |
429 |
440 TInt CLiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest ,CRTSecMgrScriptSession* aSecMgrScriptSession) |
430 TInt CLiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest ,CRTSecMgrScriptSession* aSecMgrScriptSession) |
441 { |
431 { |
442 RCriteriaArray interest, filtered; |
432 RCriteriaArray interest, filtered; |
2865 |
2855 |
2866 if(aScriptSession) |
2856 if(aScriptSession) |
2867 { |
2857 { |
2868 if(aScriptSession->PromptOption() == RTPROMPTUI_PROVIDER) |
2858 if(aScriptSession->PromptOption() == RTPROMPTUI_PROVIDER) |
2869 { |
2859 { |
2870 GetProviderResourceFile(provResourcePath, pServiceData->GetMetaData()); |
2860 GetProviderResourceFile(provResourcePath, pServiceData->GetMetaData()); |
2871 RProperty::Set( KMyPropertyCat, EMyPropertyState , iWidgetId ); |
2861 isAllowed = aScriptSession->IsAllowed(provCaps, pChosenImpl->ImplementationUid(), provResourcePath); |
2872 isAllowed = aScriptSession->IsAllowed(provCaps, pChosenImpl->ImplementationUid(), provResourcePath); |
2862 } |
2873 RProperty::Set( KMyPropertyCat, EMyPropertyFinalState , iWidgetId ); |
|
2874 } |
|
2875 else |
2863 else |
2876 { |
|
2877 RProperty::Set( KMyPropertyCat, EMyPropertyState , iWidgetId ); |
|
2878 isAllowed = aScriptSession->IsAllowed(provCaps); |
2864 isAllowed = aScriptSession->IsAllowed(provCaps); |
2879 RProperty::Set( KMyPropertyCat, EMyPropertyFinalState , iWidgetId ); |
|
2880 } |
|
2881 } |
2865 } |
2882 |
2866 |
2883 if(KErrNone==isAllowed) |
2867 if(KErrNone==isAllowed) |
2884 { |
2868 { |
2885 CLiwServiceIfBase* iface = iEcomMonitor->CreateImplementationL( |
2869 CLiwServiceIfBase* iface = iEcomMonitor->CreateImplementationL( |