equal
deleted
inserted
replaced
40 #include "DeviceLiwInterface.h" |
40 #include "DeviceLiwInterface.h" |
41 #include "DeviceLiwMap.h" |
41 #include "DeviceLiwMap.h" |
42 #include "DeviceLiwIterable.h" |
42 #include "DeviceLiwIterable.h" |
43 #include "DeviceLiwResult.h" |
43 #include "DeviceLiwResult.h" |
44 |
44 |
|
45 |
|
46 |
45 using namespace KJS; |
47 using namespace KJS; |
46 using namespace LIW; |
48 using namespace LIW; |
47 |
49 |
48 // CONSTANTS |
50 // CONSTANTS |
49 #define SAPISECURITYPROMPTNEEDED 0x0001 |
51 #define SAPISECURITYPROMPTNEEDED 0x0001 |
123 { |
125 { |
124 User::Leave( KErrGeneral ); |
126 User::Leave( KErrGeneral ); |
125 } |
127 } |
126 #ifdef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF |
128 #ifdef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF |
127 m_scriptSession->SetPromptOption(RTPROMPTUI_PROVIDER); // This is for setting the new prompting method |
129 m_scriptSession->SetPromptOption(RTPROMPTUI_PROVIDER); // This is for setting the new prompting method |
128 #endif |
130 #endif |
129 CleanupStack::PopAndDestroy( trust ); |
131 CleanupStack::PopAndDestroy( trust ); |
130 } |
132 } |
131 |
133 |
132 // ---------------------------------------------------------------------------- |
134 // ---------------------------------------------------------------------------- |
133 // CDeviceLiwBinding::~CDeviceLiwBinding |
135 // CDeviceLiwBinding::~CDeviceLiwBinding |
162 int argcount = args.size(); |
164 int argcount = args.size(); |
163 |
165 |
164 if ( argcount > 0 && args[0]->type() == StringType && |
166 if ( argcount > 0 && args[0]->type() == StringType && |
165 args[0]->toString( exec ).size() > 0 ) |
167 args[0]->toString( exec ).size() > 0 ) |
166 { |
168 { |
|
169 |
167 TRAP( error, |
170 TRAP( error, |
168 { |
171 { |
169 // Get service name |
172 // Get service name |
170 svcName = KJS::GetAsciiBufferL( args[0]->toString( exec ) ); |
173 svcName = KJS::GetAsciiBufferL( args[0]->toString( exec ) ); |
171 CleanupStack::PushL( svcName ); |
174 CleanupStack::PushL( svcName ); |
209 } |
212 } |
210 |
213 |
211 switch ( widgetregistry.WidgetSapiAccessState(m_Uid)) |
214 switch ( widgetregistry.WidgetSapiAccessState(m_Uid)) |
212 { |
215 { |
213 case SAPISECURITYPROMPTNEEDED : |
216 case SAPISECURITYPROMPTNEEDED : |
214 load_err = m_serviceHandler->AttachL( crit_arr, *m_scriptSession ); |
217 load_err = sapiPromptNeededL(crit_arr); |
215 break; |
218 break; |
216 case SAPIPROMPTLESS : |
219 case SAPIPROMPTLESS : |
217 load_err = m_serviceHandler->AttachL( crit_arr ); |
220 load_err = m_serviceHandler->AttachL( crit_arr ); |
218 break; |
221 break; |
219 case SAPIACCESSDENIED : |
222 case SAPIACCESSDENIED : |
252 error = KErrArgument; |
255 error = KErrArgument; |
253 } |
256 } |
254 |
257 |
255 return error; |
258 return error; |
256 } |
259 } |
257 |
260 |
|
261 // --------------------------------------------------------------------------- |
|
262 // attachL called if sapi prompt is needed |
|
263 // return TInt - load error |
|
264 // --------------------------------------------------------------------------- |
|
265 // |
|
266 TInt CDeviceLiwBinding::sapiPromptNeededL(RCriteriaArray aCrit_arr) |
|
267 { |
|
268 #ifdef BRDO_SAPINTFN_ENABLED_FF |
|
269 return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession, m_Uid.iUid ); |
|
270 #else |
|
271 return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession ); |
|
272 #endif |
|
273 } |
|
274 |
258 // --------------------------------------------------------------------------- |
275 // --------------------------------------------------------------------------- |
259 // Convert Unload service provider |
276 // Convert Unload service provider |
260 // return JSValue - javascript list |
277 // return JSValue - javascript list |
261 // --------------------------------------------------------------------------- |
278 // --------------------------------------------------------------------------- |
262 // |
279 // |