29 #include "AiwCommon.hrh" |
29 #include "AiwCommon.hrh" |
30 #include "AiwMenuSlot.hrh" |
30 #include "AiwMenuSlot.hrh" |
31 #include "AiwEcomMonitor.h" |
31 #include "AiwEcomMonitor.h" |
32 #include "AiwTlsData.h" |
32 #include "AiwTlsData.h" |
33 #include "data_caging_path_literals.hrh" |
33 #include "data_caging_path_literals.hrh" |
34 #include "../../../uifw/inc/akntrace.h" |
|
35 |
34 |
36 // CONSTANTS |
35 // CONSTANTS |
37 // Max number of empty menu resource slots. |
36 // Max number of empty menu resource slots. |
38 const TInt KMaxMenuResources = 16; |
37 const TInt KMaxMenuResources = 16; |
39 |
38 |
65 // AiwServiceHandler |
64 // AiwServiceHandler |
66 // |
65 // |
67 |
66 |
68 CAiwServiceHandlerImpl* CAiwServiceHandlerImpl::NewL() |
67 CAiwServiceHandlerImpl* CAiwServiceHandlerImpl::NewL() |
69 { |
68 { |
70 _AKNTRACE_FUNC_ENTER; |
|
71 |
|
72 CAiwServiceHandlerImpl* handler = new (ELeave) CAiwServiceHandlerImpl(); |
69 CAiwServiceHandlerImpl* handler = new (ELeave) CAiwServiceHandlerImpl(); |
73 CleanupStack::PushL( handler ); |
70 CleanupStack::PushL( handler ); |
74 handler->ConstructL(); |
71 handler->ConstructL(); |
75 CleanupStack::Pop(); // handler |
72 CleanupStack::Pop(); // handler |
76 |
|
77 _AKNTRACE_FUNC_EXIT; |
|
78 return handler; |
73 return handler; |
79 } |
74 } |
80 |
75 |
81 |
76 |
82 |
77 |
138 { |
131 { |
139 CAiwTlsData* data = CAiwTlsData::Instance(); |
132 CAiwTlsData* data = CAiwTlsData::Instance(); |
140 data->RemoveMenuLaunchObserver( this ); |
133 data->RemoveMenuLaunchObserver( this ); |
141 CAiwTlsData::Close(); |
134 CAiwTlsData::Close(); |
142 } |
135 } |
143 _AKNTRACE_FUNC_EXIT; |
|
144 } |
136 } |
145 |
137 |
146 |
138 |
147 |
139 |
148 void CAiwServiceHandlerImpl::Reset() |
140 void CAiwServiceHandlerImpl::Reset() |
149 { |
141 { |
150 _AKNTRACE_FUNC_ENTER; |
|
151 |
|
152 RProcess pro; |
|
153 AknTracePrint(_L("process name:%S"),&(pro.FileName())); |
|
154 |
|
155 iInterestList.ResetAndDestroy(); |
142 iInterestList.ResetAndDestroy(); |
156 iMenuBindings.ResetAndDestroy(); |
143 iMenuBindings.ResetAndDestroy(); |
157 iBaseBindings.ResetAndDestroy(); |
144 iBaseBindings.ResetAndDestroy(); |
158 iProviders.ResetAndDestroy(); |
145 iProviders.ResetAndDestroy(); |
159 |
146 |
163 |
150 |
164 delete iInParams; |
151 delete iInParams; |
165 iInParams = NULL; |
152 iInParams = NULL; |
166 delete iOutParams; |
153 delete iOutParams; |
167 iOutParams = NULL; |
154 iOutParams = NULL; |
168 |
|
169 _AKNTRACE_FUNC_EXIT; |
|
170 } |
155 } |
171 |
156 |
172 |
157 |
173 |
158 |
174 void CAiwServiceHandlerImpl::ListProvidersForCriteriaL(RArray<TInt>& aResult, |
159 void CAiwServiceHandlerImpl::ListProvidersForCriteriaL(RArray<TInt>& aResult, |
175 CAiwCriteriaItem& aItem) |
160 CAiwCriteriaItem& aItem) |
176 { |
161 { |
177 _AKNTRACE_FUNC_ENTER; |
|
178 |
|
179 TInt i; |
162 TInt i; |
180 |
163 |
181 for (i = 0; i < iProviders.Count(); i++) |
164 for (i = 0; i < iProviders.Count(); i++) |
182 { |
165 { |
183 if (iProviders[i]->HasCriteria(aItem)) |
166 if (iProviders[i]->HasCriteria(aItem)) |
184 { |
167 { |
185 User::LeaveIfError(aResult.Append(iProviders[i]->ImplementationUid().iUid)); |
168 User::LeaveIfError(aResult.Append(iProviders[i]->ImplementationUid().iUid)); |
186 } |
169 } |
187 } |
170 } |
188 |
|
189 _AKNTRACE_FUNC_EXIT; |
|
190 } |
171 } |
191 |
172 |
192 |
173 |
193 |
174 |
194 TInt CAiwServiceHandlerImpl::NbrOfProviders(const CAiwCriteriaItem* aCriteria) |
175 TInt CAiwServiceHandlerImpl::NbrOfProviders(const CAiwCriteriaItem* aCriteria) |
195 { |
176 { |
196 _AKNTRACE_FUNC_ENTER; |
|
197 |
|
198 if(!aCriteria) |
177 if(!aCriteria) |
199 { |
178 { |
200 return 0; |
179 return 0; |
201 } |
180 } |
202 |
181 |
222 return iMenuBindings[i]->NumberOfProviders(); |
201 return iMenuBindings[i]->NumberOfProviders(); |
223 } |
202 } |
224 } |
203 } |
225 } |
204 } |
226 |
205 |
227 _AKNTRACE_FUNC_EXIT; |
|
228 return 0; |
206 return 0; |
229 } |
207 } |
230 |
208 |
231 |
209 |
232 |
210 |
233 void CAiwServiceHandlerImpl::AttachL(TInt aInterestResourceId) |
211 void CAiwServiceHandlerImpl::AttachL(TInt aInterestResourceId) |
234 { |
212 { |
235 _AKNTRACE_FUNC_ENTER; |
|
236 _AKNTRACE("aInterestResourceId:%x",aInterestResourceId); |
|
237 // CCoeEnv/CEikonEnv needs to be accessible. |
213 // CCoeEnv/CEikonEnv needs to be accessible. |
238 if(!iCoeEnv) |
214 if(!iCoeEnv) |
239 { |
215 { |
240 User::Leave(KErrNotSupported); |
216 User::Leave(KErrNotSupported); |
241 } |
217 } |
256 |
232 |
257 filtered.Reset(); |
233 filtered.Reset(); |
258 |
234 |
259 CleanupStack::Pop(); // filtered |
235 CleanupStack::Pop(); // filtered |
260 CleanupStack::Pop(); // interest |
236 CleanupStack::Pop(); // interest |
261 |
|
262 _AKNTRACE_FUNC_EXIT; |
|
263 } |
237 } |
264 |
238 |
265 |
239 |
266 |
240 |
267 void CAiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest) |
241 void CAiwServiceHandlerImpl::AttachL(const RCriteriaArray& aInterest) |
268 { |
242 { |
269 _AKNTRACE_FUNC_ENTER; |
|
270 |
|
271 RCriteriaArray interest, filtered; |
243 RCriteriaArray interest, filtered; |
272 |
244 |
273 CleanupStack::PushL( TCleanupItem( InterestCleanup, &interest ) ); |
245 CleanupStack::PushL( TCleanupItem( InterestCleanup, &interest ) ); |
274 CleanupStack::PushL( TCleanupItem( FilteredCleanup, &filtered ) ); |
246 CleanupStack::PushL( TCleanupItem( FilteredCleanup, &filtered ) ); |
275 |
247 |
283 item->SetServiceClass( aInterest[i]->ServiceClass() ); |
255 item->SetServiceClass( aInterest[i]->ServiceClass() ); |
284 item->SetOptions( aInterest[i]->Options() ); |
256 item->SetOptions( aInterest[i]->Options() ); |
285 item->SetDefaultProvider( (aInterest[i]->DefaultProvider()).iUid ); |
257 item->SetDefaultProvider( (aInterest[i]->DefaultProvider()).iUid ); |
286 item->SetMaxProviders( aInterest[i]->MaxProviders() ); |
258 item->SetMaxProviders( aInterest[i]->MaxProviders() ); |
287 |
259 |
288 _AKNTRACE("aInterest[i]->Id():%x",aInterest[i]->Id()); |
|
289 _AKNTRACE("aInterest[i]->ServiceCmd():%x",aInterest[i]->ServiceCmd()); |
|
290 _AKNTRACE("aInterest[i]->ServiceClass():%x",aInterest[i]->ServiceClass()); |
|
291 _AKNTRACE("(aInterest[i]->DefaultProvider()).iUid:%x",(aInterest[i]->DefaultProvider()).iUid); |
|
292 _AKNTRACE("aInterest[i]->MaxProviders():%x",aInterest[i]->MaxProviders()); |
|
293 |
|
294 User::LeaveIfError(interest.Append(item)); |
260 User::LeaveIfError(interest.Append(item)); |
295 CleanupStack::Pop(item); |
261 CleanupStack::Pop(item); |
296 } |
262 } |
297 |
263 |
298 FilterInterestListL(interest, filtered); |
264 FilterInterestListL(interest, filtered); |
301 |
267 |
302 filtered.Reset(); |
268 filtered.Reset(); |
303 |
269 |
304 CleanupStack::Pop(); // filtered |
270 CleanupStack::Pop(); // filtered |
305 CleanupStack::Pop(); // interest |
271 CleanupStack::Pop(); // interest |
306 |
|
307 _AKNTRACE_FUNC_EXIT; |
|
308 } |
272 } |
309 |
273 |
310 |
274 |
311 |
275 |
312 void CAiwServiceHandlerImpl::DoAttachL(const RCriteriaArray& aInterest) |
276 void CAiwServiceHandlerImpl::DoAttachL(const RCriteriaArray& aInterest) |
313 { |
277 { |
314 _AKNTRACE_FUNC_ENTER; |
|
315 |
|
316 RProcess pro; |
|
317 AknTracePrint(_L("process name:%S"),&(pro.FileName())); |
|
318 CAiwBinding* bind; |
278 CAiwBinding* bind; |
319 for (TInt i = 0; i < aInterest.Count(); i++) |
279 for (TInt i = 0; i < aInterest.Count(); i++) |
320 { |
280 { |
321 bind = CAiwBinding::NewLC(); |
281 bind = CAiwBinding::NewLC(); |
322 |
282 |
343 else |
303 else |
344 { |
304 { |
345 CleanupStack::PopAndDestroy(); // bind |
305 CleanupStack::PopAndDestroy(); // bind |
346 } |
306 } |
347 } |
307 } |
348 |
|
349 _AKNTRACE_FUNC_EXIT; |
|
350 } |
308 } |
351 |
309 |
352 |
310 |
353 void CAiwServiceHandlerImpl::GetInterest(RCriteriaArray& aInterest) |
311 void CAiwServiceHandlerImpl::GetInterest(RCriteriaArray& aInterest) |
354 { |
312 { |
355 _AKNTRACE_FUNC_ENTER; |
|
356 |
|
357 for (TInt i = 0; i < iInterestList.Count(); i++) |
313 for (TInt i = 0; i < iInterestList.Count(); i++) |
358 { |
314 { |
359 if (aInterest.Append(iInterestList[i]) != KErrNone) |
315 if (aInterest.Append(iInterestList[i]) != KErrNone) |
360 { |
316 { |
361 return; |
317 return; |
362 } |
318 } |
363 } |
319 } |
364 |
|
365 _AKNTRACE_FUNC_EXIT; |
|
366 } |
320 } |
367 |
321 |
368 |
322 |
369 |
323 |
370 void CAiwServiceHandlerImpl::DetachL(const RCriteriaArray& aInterest) |
324 void CAiwServiceHandlerImpl::DetachL(const RCriteriaArray& aInterest) |
371 { |
325 { |
372 _AKNTRACE_FUNC_ENTER; |
|
373 |
|
374 // First, remove relevant criteria items from relevat base bindings. |
326 // First, remove relevant criteria items from relevat base bindings. |
375 for (TInt i = 0; i < aInterest.Count(); i++) |
327 for (TInt i = 0; i < aInterest.Count(); i++) |
376 { |
328 { |
377 for (TInt j = 0; j < iBaseBindings.Count(); j++) |
329 for (TInt j = 0; j < iBaseBindings.Count(); j++) |
378 { |
330 { |
397 |
349 |
398 // Then check if there were left obselete criteria items and remove them. |
350 // Then check if there were left obselete criteria items and remove them. |
399 RemoveObsoleteCriteriaItems(); |
351 RemoveObsoleteCriteriaItems(); |
400 |
352 |
401 // Finally check if there were left obselete providers and remove them. |
353 // Finally check if there were left obselete providers and remove them. |
402 RemoveObsoleteProviders(); |
354 RemoveObsoleteProviders(); |
403 |
|
404 _AKNTRACE_FUNC_EXIT; |
|
405 } |
355 } |
406 |
356 |
407 |
357 |
408 |
358 |
409 void CAiwServiceHandlerImpl::DetachL(TInt aInterestResourceId) |
359 void CAiwServiceHandlerImpl::DetachL(TInt aInterestResourceId) |
410 { |
360 { |
411 _AKNTRACE_FUNC_ENTER; |
|
412 _AKNTRACE("aInterestResourceId:%x",aInterestResourceId); |
|
413 |
|
414 // CCoeEnv/CEikonEnv needs to be accessible. |
361 // CCoeEnv/CEikonEnv needs to be accessible. |
415 if(!iCoeEnv) |
362 if(!iCoeEnv) |
416 { |
363 { |
417 User::Leave(KErrNotSupported); |
364 User::Leave(KErrNotSupported); |
418 } |
365 } |
428 |
375 |
429 DetachL( interest ); |
376 DetachL( interest ); |
430 |
377 |
431 interest.ResetAndDestroy(); |
378 interest.ResetAndDestroy(); |
432 CleanupStack::Pop(); // interest |
379 CleanupStack::Pop(); // interest |
433 |
|
434 _AKNTRACE_FUNC_EXIT; |
|
435 } |
380 } |
436 |
381 |
437 |
382 |
438 const CAiwCriteriaItem* CAiwServiceHandlerImpl::GetCriteria(TInt aId) |
383 const CAiwCriteriaItem* CAiwServiceHandlerImpl::GetCriteria(TInt aId) |
439 { |
384 { |
440 _AKNTRACE_FUNC_ENTER; |
|
441 for (TInt i = 0; i < iInterestList.Count(); i++) |
385 for (TInt i = 0; i < iInterestList.Count(); i++) |
442 { |
386 { |
443 if (iInterestList[i]->Id() == aId) |
387 if (iInterestList[i]->Id() == aId) |
444 { |
388 { |
445 return iInterestList[i]; |
389 return iInterestList[i]; |
446 } |
390 } |
447 } |
391 } |
448 |
392 |
449 _AKNTRACE_FUNC_EXIT; |
|
450 return NULL; |
393 return NULL; |
451 } |
394 } |
452 |
395 |
453 TInt CAiwServiceHandlerImpl::NumAlreadyInitializedPaneIdsL() const |
396 TInt CAiwServiceHandlerImpl::NumAlreadyInitializedPaneIdsL() const |
454 { |
397 { |
455 _AKNTRACE_FUNC_ENTER; |
|
456 |
|
457 TInt ret = 0; |
398 TInt ret = 0; |
458 TInt paneIds[KMaxPaneIds] = {0}; |
399 TInt paneIds[KMaxPaneIds] = {0}; |
459 TBool found = EFalse; |
400 TBool found = EFalse; |
460 |
401 |
461 for (TInt i = 0; i < iLastInitialized.Count(); i++) |
402 for (TInt i = 0; i < iLastInitialized.Count(); i++) |
483 } |
424 } |
484 paneIds[ret] = iLastInitialized[i]->MenuResourceId(); |
425 paneIds[ret] = iLastInitialized[i]->MenuResourceId(); |
485 ret++; |
426 ret++; |
486 } |
427 } |
487 } |
428 } |
488 |
|
489 _AKNTRACE_FUNC_EXIT; |
|
490 return ret; |
429 return ret; |
491 } |
430 } |
492 |
431 |
493 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
432 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
494 CEikMenuPane& aMenuPane, |
433 CEikMenuPane& aMenuPane, |
495 TInt aMenuResourceId, |
434 TInt aMenuResourceId, |
496 TInt aBaseMenuCmdId, |
435 TInt aBaseMenuCmdId, |
497 const CAiwGenericParamList& aInParamList) |
436 const CAiwGenericParamList& aInParamList) |
498 { |
437 { |
499 _AKNTRACE_FUNC_ENTER; |
|
500 |
|
501 InitializeMenuPaneL(aMenuPane, aMenuResourceId, aBaseMenuCmdId, |
438 InitializeMenuPaneL(aMenuPane, aMenuResourceId, aBaseMenuCmdId, |
502 aInParamList, EFalse, EFalse); |
439 aInParamList, EFalse, EFalse); |
503 |
|
504 _AKNTRACE_FUNC_EXIT; |
|
505 } |
440 } |
506 |
441 |
507 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
442 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
508 CEikMenuPane& aMenuPane, |
443 CEikMenuPane& aMenuPane, |
509 TInt aMenuResourceId, |
444 TInt aMenuResourceId, |
510 TInt aBaseMenuCmdId, |
445 TInt aBaseMenuCmdId, |
511 const CAiwGenericParamList& aInParamList, |
446 const CAiwGenericParamList& aInParamList, |
512 TBool aUseSubmenuTextsIfAvailable) |
447 TBool aUseSubmenuTextsIfAvailable) |
513 { |
448 { |
514 _AKNTRACE_FUNC_ENTER; |
|
515 |
|
516 InitializeMenuPaneL(aMenuPane, aMenuResourceId, aBaseMenuCmdId, aInParamList, aUseSubmenuTextsIfAvailable, EFalse); |
449 InitializeMenuPaneL(aMenuPane, aMenuResourceId, aBaseMenuCmdId, aInParamList, aUseSubmenuTextsIfAvailable, EFalse); |
517 |
|
518 _AKNTRACE_FUNC_EXIT; |
|
519 } |
450 } |
520 |
451 |
521 |
452 |
522 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
453 void CAiwServiceHandlerImpl::InitializeMenuPaneL( |
523 CEikMenuPane& aMenuPane, |
454 CEikMenuPane& aMenuPane, |
525 TInt aBaseMenuCmdId, |
456 TInt aBaseMenuCmdId, |
526 const CAiwGenericParamList& aInParamList, |
457 const CAiwGenericParamList& aInParamList, |
527 TBool aUseSubmenuTextsIfAvailable, |
458 TBool aUseSubmenuTextsIfAvailable, |
528 TBool aSetAsItemSpecific) |
459 TBool aSetAsItemSpecific) |
529 { |
460 { |
530 _AKNTRACE_FUNC_ENTER; |
|
531 _AKNTRACE("aMenuPane:%x",&aMenuPane); |
|
532 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
533 _AKNTRACE("aBaseMenuCmdId:%x",aBaseMenuCmdId); |
|
534 _AKNTRACE("aUseSubmenuTextsIfAvailable:%x",aUseSubmenuTextsIfAvailable); |
|
535 _AKNTRACE("aSetAsItemSpecific:%x",aSetAsItemSpecific); |
|
536 |
|
537 TInt count = aInParamList.Count(); |
|
538 for(TInt i=0;i<count;i++) |
|
539 { |
|
540 _AKNTRACE("i:%d, InParamList[i].SemanticId():%x",i,aInParamList[i].SemanticId()); |
|
541 AknTracePrint(_L("i:%d, InParamList[i].Value():%S"),i,&(aInParamList[i].Value().AsDes())); |
|
542 |
|
543 } |
|
544 // CCoeEnv/CEikonEnv needs to be accessible. |
461 // CCoeEnv/CEikonEnv needs to be accessible. |
545 if(!iCoeEnv) |
462 if(!iCoeEnv) |
546 { |
463 { |
547 User::Leave(KErrNotSupported); |
464 User::Leave(KErrNotSupported); |
548 } |
465 } |
673 User::LeaveIfError(iMenuPanes.Append(aiwPane)); |
590 User::LeaveIfError(iMenuPanes.Append(aiwPane)); |
674 CleanupStack::Pop(); // aiwPane |
591 CleanupStack::Pop(); // aiwPane |
675 } |
592 } |
676 } |
593 } |
677 } |
594 } |
678 |
|
679 _AKNTRACE_FUNC_EXIT; |
|
680 } |
595 } |
681 |
596 |
682 |
597 |
683 TInt CAiwServiceHandlerImpl::ServiceCmdByMenuCmd(TInt aMenuCmdId) const |
598 TInt CAiwServiceHandlerImpl::ServiceCmdByMenuCmd(TInt aMenuCmdId) const |
684 { |
599 { |
685 _AKNTRACE_FUNC_ENTER; |
|
686 _AKNTRACE("aMenuCmdId:%x",aMenuCmdId); |
|
687 |
|
688 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
600 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
689 { |
601 { |
690 if ((IsInLastInitialized(iMenuBindings[i]->MenuPane())) && |
602 if ((IsInLastInitialized(iMenuBindings[i]->MenuPane())) && |
691 (iMenuBindings[i]->MenuPane()->IsCmdInRange(KPlaceholderCmdIdRange, aMenuCmdId))) |
603 (iMenuBindings[i]->MenuPane()->IsCmdInRange(KPlaceholderCmdIdRange, aMenuCmdId))) |
692 { |
604 { |
693 return iMenuBindings[i]->MenuPane()->ServiceCmdId(aMenuCmdId); |
605 return iMenuBindings[i]->MenuPane()->ServiceCmdId(aMenuCmdId); |
694 } |
606 } |
695 } |
607 } |
696 |
608 |
697 _AKNTRACE_FUNC_EXIT; |
|
698 |
|
699 return 0; |
609 return 0; |
700 } |
610 } |
701 |
611 |
702 |
612 |
703 |
613 |
706 const CAiwGenericParamList& aInParamList, |
616 const CAiwGenericParamList& aInParamList, |
707 CAiwGenericParamList& aOutParamList, |
617 CAiwGenericParamList& aOutParamList, |
708 TUint aCmdOptions, |
618 TUint aCmdOptions, |
709 MAiwNotifyCallback* aCallback) |
619 MAiwNotifyCallback* aCallback) |
710 { |
620 { |
711 _AKNTRACE_FUNC_ENTER; |
|
712 _AKNTRACE("aMenuCmdId:%x",aMenuCmdId); |
|
713 |
|
714 RProcess pro; |
|
715 AknTracePrint(_L("process name:%S"),&(pro.FileName())); |
|
716 |
|
717 TInt count = aInParamList.Count(); |
|
718 for (TInt i = 0; i < count; i++) |
|
719 { |
|
720 _AKNTRACE("i:%d, InParamList[i].SemanticId():%x",i,aInParamList[i].SemanticId()); |
|
721 AknTracePrint(_L("i:%d, InParamList[i].Value():%S"),i,&(aInParamList[i].Value().AsDes())); |
|
722 |
|
723 } |
|
724 |
|
725 count = iProviders.Count(); |
|
726 for (TInt i = 0; i < count; i++) |
|
727 { |
|
728 AknTracePrint(_L("i:%d, iProviders[i]->ImplementationUid():%x"),i,iProviders[i]->ImplementationUid().iUid); |
|
729 AknTracePrint(_L("i:%d, iProviders[i]:%x"),i,iProviders[i]); |
|
730 } |
|
731 |
|
732 // CCoeEnv/CEikonEnv needs to be accessible. |
621 // CCoeEnv/CEikonEnv needs to be accessible. |
733 if(!iCoeEnv) |
622 if(!iCoeEnv) |
734 { |
623 { |
735 User::Leave(KErrNotSupported); |
624 User::Leave(KErrNotSupported); |
736 } |
625 } |
762 return; |
651 return; |
763 } |
652 } |
764 } |
653 } |
765 } |
654 } |
766 } |
655 } |
767 _AKNTRACE_FUNC_EXIT; |
|
768 } |
656 } |
769 |
657 |
770 |
658 |
771 |
659 |
772 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, TInt aInterestResourceId) |
660 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, TInt aInterestResourceId) |
773 { |
661 { |
774 _AKNTRACE_FUNC_ENTER; |
|
775 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
776 _AKNTRACE("aInterestResourceId:%x",aInterestResourceId); |
|
777 |
|
778 // CCoeEnv/CEikonEnv needs to be accessible. |
662 // CCoeEnv/CEikonEnv needs to be accessible. |
779 if(!iCoeEnv) |
663 if(!iCoeEnv) |
780 { |
664 { |
781 User::Leave(KErrNotSupported); |
665 User::Leave(KErrNotSupported); |
782 } |
666 } |
795 DoAttachMenuL(reader, aMenuResourceId, filtered); |
679 DoAttachMenuL(reader, aMenuResourceId, filtered); |
796 filtered.Reset(); |
680 filtered.Reset(); |
797 CleanupStack::PopAndDestroy(); // reader |
681 CleanupStack::PopAndDestroy(); // reader |
798 CleanupStack::Pop(); // filtered |
682 CleanupStack::Pop(); // filtered |
799 CleanupStack::Pop(); // interest |
683 CleanupStack::Pop(); // interest |
800 |
|
801 _AKNTRACE_FUNC_EXIT; |
|
802 } |
684 } |
803 |
685 |
804 |
686 |
805 |
687 |
806 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, TResourceReader& aReader) |
688 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, TResourceReader& aReader) |
807 { |
689 { |
808 _AKNTRACE_FUNC_ENTER; |
|
809 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
810 |
|
811 // CCoeEnv/CEikonEnv needs to be accessible. |
690 // CCoeEnv/CEikonEnv needs to be accessible. |
812 if(!iCoeEnv) |
691 if(!iCoeEnv) |
813 { |
692 { |
814 User::Leave(KErrNotSupported); |
693 User::Leave(KErrNotSupported); |
815 } |
694 } |
826 DoAttachMenuL(reader, aMenuResourceId, filtered); |
705 DoAttachMenuL(reader, aMenuResourceId, filtered); |
827 filtered.Reset(); |
706 filtered.Reset(); |
828 CleanupStack::PopAndDestroy(); // reader |
707 CleanupStack::PopAndDestroy(); // reader |
829 CleanupStack::Pop(); // filtered |
708 CleanupStack::Pop(); // filtered |
830 CleanupStack::Pop(); // interest |
709 CleanupStack::Pop(); // interest |
831 |
|
832 _AKNTRACE_FUNC_EXIT; |
|
833 } |
710 } |
834 |
711 |
835 |
712 |
836 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, const RCriteriaArray& aInterest) |
713 void CAiwServiceHandlerImpl::AttachMenuL(TInt aMenuResourceId, const RCriteriaArray& aInterest) |
837 { |
714 { |
838 _AKNTRACE_FUNC_ENTER; |
|
839 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
840 |
|
841 // CCoeEnv/CEikonEnv needs to be accessible. |
715 // CCoeEnv/CEikonEnv needs to be accessible. |
842 if(!iCoeEnv) |
716 if(!iCoeEnv) |
843 { |
717 { |
844 User::Leave(KErrNotSupported); |
718 User::Leave(KErrNotSupported); |
845 } |
719 } |
860 item->SetServiceClass( aInterest[i]->ServiceClass() ); |
734 item->SetServiceClass( aInterest[i]->ServiceClass() ); |
861 item->SetOptions( aInterest[i]->Options() ); |
735 item->SetOptions( aInterest[i]->Options() ); |
862 item->SetDefaultProvider( (aInterest[i]->DefaultProvider()).iUid ); |
736 item->SetDefaultProvider( (aInterest[i]->DefaultProvider()).iUid ); |
863 item->SetMaxProviders( aInterest[i]->MaxProviders() ); |
737 item->SetMaxProviders( aInterest[i]->MaxProviders() ); |
864 |
738 |
865 _AKNTRACE("aInterest[i]->Id():%x",aInterest[i]->Id()); |
|
866 _AKNTRACE("aInterest[i]->ServiceCmd():%x",aInterest[i]->ServiceCmd()); |
|
867 _AKNTRACE("aInterest[i]->ServiceClass():%x",aInterest[i]->ServiceClass()); |
|
868 _AKNTRACE("(aInterest[i]->DefaultProvider()).iUid:%x",(aInterest[i]->DefaultProvider()).iUid); |
|
869 _AKNTRACE("aInterest[i]->MaxProviders():%x",aInterest[i]->MaxProviders()); |
|
870 |
|
871 User::LeaveIfError(interest.Append(item)); |
739 User::LeaveIfError(interest.Append(item)); |
872 CleanupStack::Pop(item); |
740 CleanupStack::Pop(item); |
873 } |
741 } |
874 |
742 |
875 FilterInterestListL(interest, filtered); |
743 FilterInterestListL(interest, filtered); |
878 DoAttachMenuL(reader, aMenuResourceId, filtered); |
746 DoAttachMenuL(reader, aMenuResourceId, filtered); |
879 filtered.Reset(); |
747 filtered.Reset(); |
880 CleanupStack::PopAndDestroy(); // reader |
748 CleanupStack::PopAndDestroy(); // reader |
881 CleanupStack::Pop(); // filtered |
749 CleanupStack::Pop(); // filtered |
882 CleanupStack::Pop(); // interest |
750 CleanupStack::Pop(); // interest |
883 |
|
884 _AKNTRACE_FUNC_EXIT; |
|
885 } |
751 } |
886 |
752 |
887 |
753 |
888 void CAiwServiceHandlerImpl::DoAttachMenuL(TResourceReader& aReader, TInt aMenuId, |
754 void CAiwServiceHandlerImpl::DoAttachMenuL(TResourceReader& aReader, TInt aMenuId, |
889 RCriteriaArray& aInterest) |
755 RCriteriaArray& aInterest) |
890 { |
756 { |
891 _AKNTRACE_FUNC_ENTER; |
|
892 |
|
893 RProcess pro; |
|
894 AknTracePrint(_L("process name:%S"),&(pro.FileName())); |
|
895 |
|
896 TInt menuCmd; |
757 TInt menuCmd; |
897 TInt count = aReader.ReadInt16(); |
758 TInt count = aReader.ReadInt16(); |
898 TBool bound; |
759 TBool bound; |
899 |
760 |
900 for (TInt i = 0; i < count; i++) |
761 for (TInt i = 0; i < count; i++) |
988 } |
847 } |
989 |
848 |
990 |
849 |
991 void CAiwServiceHandlerImpl::DetachMenu(TInt aMenuResourceId, TInt aInterestResourceId) |
850 void CAiwServiceHandlerImpl::DetachMenu(TInt aMenuResourceId, TInt aInterestResourceId) |
992 { |
851 { |
993 _AKNTRACE_FUNC_ENTER; |
|
994 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
995 _AKNTRACE("aInterestResourceId:%x",aInterestResourceId); |
|
996 |
|
997 // If interest resource id is null, then detach all items in the given menu. |
852 // If interest resource id is null, then detach all items in the given menu. |
998 if (!aInterestResourceId) |
853 if (!aInterestResourceId) |
999 { |
854 { |
1000 DoDetachMenu(aMenuResourceId); |
855 DoDetachMenu(aMenuResourceId); |
1001 } |
856 } |
1017 |
872 |
1018 DoDetachMenu(aMenuResourceId, interest); |
873 DoDetachMenu(aMenuResourceId, interest); |
1019 |
874 |
1020 interest.ResetAndDestroy(); |
875 interest.ResetAndDestroy(); |
1021 } |
876 } |
1022 |
|
1023 _AKNTRACE_FUNC_EXIT; |
|
1024 } |
877 } |
1025 |
878 |
1026 |
879 |
1027 void CAiwServiceHandlerImpl::DoDetachMenu(TInt aMenuResourceId) |
880 void CAiwServiceHandlerImpl::DoDetachMenu(TInt aMenuResourceId) |
1028 { |
881 { |
1029 _AKNTRACE_FUNC_ENTER; |
|
1030 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
1031 |
|
1032 // First, delete the relevant menu bindings. |
882 // First, delete the relevant menu bindings. |
1033 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
883 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1034 { |
884 { |
1035 if (iMenuBindings[i]->MenuId() == aMenuResourceId) |
885 if (iMenuBindings[i]->MenuId() == aMenuResourceId) |
1036 { |
886 { |
1043 // Then check if there were left obselete criteria items and remove them. |
893 // Then check if there were left obselete criteria items and remove them. |
1044 RemoveObsoleteCriteriaItems(); |
894 RemoveObsoleteCriteriaItems(); |
1045 |
895 |
1046 // Finally check if there were left obselete providers and remove them. |
896 // Finally check if there were left obselete providers and remove them. |
1047 RemoveObsoleteProviders(); |
897 RemoveObsoleteProviders(); |
1048 |
|
1049 _AKNTRACE_FUNC_EXIT; |
|
1050 } |
898 } |
1051 |
899 |
1052 |
900 |
1053 void CAiwServiceHandlerImpl::DoDetachMenu(TInt aMenuResourceId, RCriteriaArray& aInterest) |
901 void CAiwServiceHandlerImpl::DoDetachMenu(TInt aMenuResourceId, RCriteriaArray& aInterest) |
1054 { |
902 { |
1055 _AKNTRACE_FUNC_ENTER; |
|
1056 _AKNTRACE("aMenuResourceId:%x",aMenuResourceId); |
|
1057 |
|
1058 // First, remove relevant criteria items from relevant menu bindings. |
903 // First, remove relevant criteria items from relevant menu bindings. |
1059 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
904 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1060 { |
905 { |
1061 if (iMenuBindings[i]->MenuId() == aMenuResourceId) |
906 if (iMenuBindings[i]->MenuId() == aMenuResourceId) |
1062 { |
907 { |
1084 |
929 |
1085 // Then check if there were left obselete criteria items and remove them. |
930 // Then check if there were left obselete criteria items and remove them. |
1086 RemoveObsoleteCriteriaItems(); |
931 RemoveObsoleteCriteriaItems(); |
1087 |
932 |
1088 // Finally check if there were left obselete providers and remove them. |
933 // Finally check if there were left obselete providers and remove them. |
1089 RemoveObsoleteProviders(); |
934 RemoveObsoleteProviders(); |
1090 |
|
1091 _AKNTRACE_FUNC_EXIT; |
|
1092 } |
935 } |
1093 |
936 |
1094 |
937 |
1095 void CAiwServiceHandlerImpl::RemoveObsoleteCriteriaItems() |
938 void CAiwServiceHandlerImpl::RemoveObsoleteCriteriaItems() |
1096 { |
939 { |
1097 _AKNTRACE_FUNC_ENTER; |
|
1098 |
|
1099 for (TInt i = 0; i < iInterestList.Count(); i++) |
940 for (TInt i = 0; i < iInterestList.Count(); i++) |
1100 { |
941 { |
1101 CAiwCriteriaItem* criteria = iInterestList[i]; |
942 CAiwCriteriaItem* criteria = iInterestList[i]; |
1102 TBool found = EFalse; |
943 TBool found = EFalse; |
1103 |
944 |
1130 delete iInterestList[i]; |
971 delete iInterestList[i]; |
1131 iInterestList.Remove(i); |
972 iInterestList.Remove(i); |
1132 i--; |
973 i--; |
1133 } |
974 } |
1134 } |
975 } |
1135 |
|
1136 _AKNTRACE_FUNC_EXIT; |
|
1137 } |
976 } |
1138 |
977 |
1139 |
978 |
1140 void CAiwServiceHandlerImpl::RemoveObsoleteProviders() |
979 void CAiwServiceHandlerImpl::RemoveObsoleteProviders() |
1141 { |
980 { |
1142 _AKNTRACE_FUNC_ENTER; |
|
1143 |
|
1144 for (TInt i = 0; i < iProviders.Count(); i++) |
981 for (TInt i = 0; i < iProviders.Count(); i++) |
1145 { |
982 { |
1146 CAiwServiceIfBase* provider = iProviders[i]; |
983 CAiwServiceIfBase* provider = iProviders[i]; |
1147 TBool found = EFalse; |
984 TBool found = EFalse; |
1148 |
985 |
1175 delete iProviders[i]; |
1012 delete iProviders[i]; |
1176 iProviders.Remove(i); |
1013 iProviders.Remove(i); |
1177 i--; |
1014 i--; |
1178 } |
1015 } |
1179 } |
1016 } |
1180 _AKNTRACE_FUNC_EXIT; |
|
1181 } |
1017 } |
1182 |
1018 |
1183 |
1019 |
1184 TBool CAiwServiceHandlerImpl::IsSubMenuEmpty(TInt aSubMenuId) |
1020 TBool CAiwServiceHandlerImpl::IsSubMenuEmpty(TInt aSubMenuId) |
1185 { |
1021 { |
1186 _AKNTRACE_FUNC_ENTER; |
|
1187 _AKNTRACE("aSubMenuId:%d",aSubMenuId); |
|
1188 |
|
1189 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1022 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1190 { |
1023 { |
1191 if (iMenuBindings[i]->MenuId() == aSubMenuId) |
1024 if (iMenuBindings[i]->MenuId() == aSubMenuId) |
1192 { |
1025 { |
1193 if (iMenuBindings[i]->NumberOfProviders() > 0) |
1026 if (iMenuBindings[i]->NumberOfProviders() > 0) |
1194 { |
1027 { |
1195 _AKNTRACE("return false"); |
|
1196 _AKNTRACE_FUNC_EXIT; |
|
1197 return EFalse; |
1028 return EFalse; |
1198 } |
1029 } |
1199 |
1030 |
1200 _AKNTRACE("return true"); |
|
1201 _AKNTRACE_FUNC_EXIT; |
|
1202 return ETrue; |
1031 return ETrue; |
1203 } |
1032 } |
1204 } |
1033 } |
1205 |
1034 |
1206 _AKNTRACE_FUNC_EXIT; |
|
1207 return EFalse; |
1035 return EFalse; |
1208 } |
1036 } |
1209 |
1037 |
1210 |
1038 |
1211 |
1039 |
1212 |
1040 |
1213 CAiwMenuBinding* CAiwServiceHandlerImpl::AlreadyBound(TInt aMenuId, TInt aMenuCmd, |
1041 CAiwMenuBinding* CAiwServiceHandlerImpl::AlreadyBound(TInt aMenuId, TInt aMenuCmd, |
1214 TInt aMenuItemIndex) const |
1042 TInt aMenuItemIndex) const |
1215 { |
1043 { |
1216 _AKNTRACE_FUNC_ENTER; |
|
1217 |
|
1218 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1044 for (TInt i = 0; i < iMenuBindings.Count(); i++) |
1219 { |
1045 { |
1220 if ((iMenuBindings[i]->MenuId() == aMenuId) && |
1046 if ((iMenuBindings[i]->MenuId() == aMenuId) && |
1221 (iMenuBindings[i]->MenuCmd() == aMenuCmd) && |
1047 (iMenuBindings[i]->MenuCmd() == aMenuCmd) && |
1222 (iMenuBindings[i]->MenuItemIndex() == aMenuItemIndex)) |
1048 (iMenuBindings[i]->MenuItemIndex() == aMenuItemIndex)) |
1223 { |
1049 { |
1224 _AKNTRACE("iMenuBindings[i]:%x",iMenuBindings[i]); |
|
1225 _AKNTRACE_FUNC_EXIT; |
|
1226 return iMenuBindings[i]; |
1050 return iMenuBindings[i]; |
1227 } |
1051 } |
1228 } |
1052 } |
1229 |
1053 |
1230 _AKNTRACE_FUNC_EXIT; |
|
1231 return NULL; |
1054 return NULL; |
1232 } |
1055 } |
1233 |
1056 |
1234 |
1057 |
1235 void CAiwServiceHandlerImpl::ExecuteServiceCmdL( |
1058 void CAiwServiceHandlerImpl::ExecuteServiceCmdL( |
1237 const CAiwGenericParamList& aInParamList, |
1060 const CAiwGenericParamList& aInParamList, |
1238 CAiwGenericParamList& aOutParamList, |
1061 CAiwGenericParamList& aOutParamList, |
1239 TUint aCmdOptions, |
1062 TUint aCmdOptions, |
1240 MAiwNotifyCallback* aCallback) |
1063 MAiwNotifyCallback* aCallback) |
1241 { |
1064 { |
1242 _AKNTRACE_FUNC_ENTER; |
|
1243 _AKNTRACE("aCmdId:%x",aCmdId); |
|
1244 _AKNTRACE("aCmdOptions:%x",aCmdOptions); |
|
1245 |
|
1246 RProcess pro; |
|
1247 AknTracePrint(_L("process name:%S"),&(pro.FileName())); |
|
1248 |
|
1249 TInt count = aInParamList.Count(); |
|
1250 for (TInt i = 0; i < count; i++) |
|
1251 { |
|
1252 _AKNTRACE("i:%d, InParamList[i].SemanticId():%x",i,aInParamList[i].SemanticId()); |
|
1253 AknTracePrint(_L("i:%d, InParamList[i].Value():%S"),i,&(aInParamList[i].Value().AsDes())); |
|
1254 |
|
1255 } |
|
1256 |
|
1257 for (TInt i = 0; i < iBaseBindings.Count(); i++) |
1065 for (TInt i = 0; i < iBaseBindings.Count(); i++) |
1258 { |
1066 { |
1259 if(iBaseBindings[i]->HasServiceCmd(aCmdId)) |
1067 if(iBaseBindings[i]->HasServiceCmd(aCmdId)) |
1260 { |
1068 { |
1261 for (TInt j = 0; j < iBaseBindings[i]->NumberOfProviders(); j++) |
1069 for (TInt j = 0; j < iBaseBindings[i]->NumberOfProviders(); j++) |
1267 aCmdOptions, |
1075 aCmdOptions, |
1268 aCallback); |
1076 aCallback); |
1269 } |
1077 } |
1270 } |
1078 } |
1271 } |
1079 } |
1272 |
|
1273 _AKNTRACE_FUNC_EXIT; |
|
1274 } |
1080 } |
1275 |
1081 |
1276 |
1082 |
1277 |
1083 |
1278 void CAiwServiceHandlerImpl::ReadInterestListL(TResourceReader& aReader, |
1084 void CAiwServiceHandlerImpl::ReadInterestListL(TResourceReader& aReader, |
1279 RPointerArray<CAiwCriteriaItem>& aResult) |
1085 RPointerArray<CAiwCriteriaItem>& aResult) |
1280 { |
1086 { |
1281 _AKNTRACE_FUNC_ENTER; |
|
1282 |
|
1283 const TInt count = aReader.ReadInt16(); |
1087 const TInt count = aReader.ReadInt16(); |
1284 for (TInt ii = 0; ii < count; ++ii) |
1088 for (TInt ii = 0; ii < count; ++ii) |
1285 { |
1089 { |
1286 CAiwCriteriaItem* item = CAiwCriteriaItem::NewLC(); |
1090 CAiwCriteriaItem* item = CAiwCriteriaItem::NewLC(); |
1287 item->ReadFromResoureL( aReader ); |
1091 item->ReadFromResoureL( aReader ); |
1288 User::LeaveIfError(aResult.Append(item)); |
1092 User::LeaveIfError(aResult.Append(item)); |
1289 CleanupStack::Pop(); // item |
1093 CleanupStack::Pop(); // item |
1290 } |
1094 } |
1291 |
|
1292 _AKNTRACE_FUNC_EXIT; |
|
1293 } |
1095 } |
1294 |
1096 |
1295 |
1097 |
1296 TInt CAiwServiceHandlerImpl::ResolveProvidersL(CAiwBinding* aBinding, CAiwCriteriaItem* aItem) |
1098 TInt CAiwServiceHandlerImpl::ResolveProvidersL(CAiwBinding* aBinding, CAiwCriteriaItem* aItem) |
1297 { |
1099 { |
1298 _AKNTRACE_FUNC_ENTER; |
|
1299 |
|
1300 RImplInfoPtrArray infoArray; |
1100 RImplInfoPtrArray infoArray; |
1301 TInt result = 0; |
1101 TInt result = 0; |
1302 |
1102 |
1303 CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) ); |
1103 CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) ); |
1304 |
1104 |
1355 } |
1155 } |
1356 } |
1156 } |
1357 |
1157 |
1358 CleanupStack::PopAndDestroy(); // infoArray |
1158 CleanupStack::PopAndDestroy(); // infoArray |
1359 |
1159 |
1360 _AKNTRACE_FUNC_EXIT; |
|
1361 |
|
1362 return result; |
1160 return result; |
1363 } |
1161 } |
1364 |
1162 |
1365 |
1163 |
1366 |
1164 |
1367 void CAiwServiceHandlerImpl::FilterInfoArray(RImplInfoPtrArray& aArray, CAiwCriteriaItem* aItem) |
1165 void CAiwServiceHandlerImpl::FilterInfoArray(RImplInfoPtrArray& aArray, CAiwCriteriaItem* aItem) |
1368 { |
1166 { |
1369 _AKNTRACE_FUNC_ENTER; |
|
1370 |
|
1371 if (aItem->MaxProviders() <= 0) |
1167 if (aItem->MaxProviders() <= 0) |
1372 { |
1168 { |
1373 aArray.ResetAndDestroy(); |
1169 aArray.ResetAndDestroy(); |
1374 } |
1170 } |
1375 else |
1171 else |
1509 CleanupStack::Pop(pane); |
1299 CleanupStack::Pop(pane); |
1510 CleanupStack::PopAndDestroy(); // reader |
1300 CleanupStack::PopAndDestroy(); // reader |
1511 |
1301 |
1512 result->SetResourceSlotId( id ); |
1302 result->SetResourceSlotId( id ); |
1513 |
1303 |
1514 _AKNTRACE_FUNC_EXIT; |
|
1515 |
|
1516 return result; |
1304 return result; |
1517 } |
1305 } |
1518 |
1306 |
1519 |
1307 |
1520 void CAiwServiceHandlerImpl::DeleteAiwMenuPane(CAiwMenuPane* aAiwPane) |
1308 void CAiwServiceHandlerImpl::DeleteAiwMenuPane(CAiwMenuPane* aAiwPane) |
1521 { |
1309 { |
1522 _AKNTRACE_FUNC_ENTER; |
|
1523 |
|
1524 delete aAiwPane->iMenuPane; |
1310 delete aAiwPane->iMenuPane; |
1525 aAiwPane->iMenuPane = NULL; |
1311 aAiwPane->iMenuPane = NULL; |
1526 |
1312 |
1527 // Reset iIdMap and extraText. |
1313 // Reset iIdMap and extraText. |
1528 for(TInt i = 0; i < aAiwPane->iIdMap.Count(); i++) |
1314 for(TInt i = 0; i < aAiwPane->iIdMap.Count(); i++) |
1578 }; |
1362 }; |
1579 |
1363 |
1580 |
1364 |
1581 TInt CAiwServiceHandlerImpl::ResourceIdForNextFreeSlot() |
1365 TInt CAiwServiceHandlerImpl::ResourceIdForNextFreeSlot() |
1582 { |
1366 { |
1583 _AKNTRACE_FUNC_ENTER; |
|
1584 |
|
1585 if (iNextFreeSlot < KMaxMenuResources) |
1367 if (iNextFreeSlot < KMaxMenuResources) |
1586 { |
1368 { |
1587 return resourceSlotIds[iNextFreeSlot++]; |
1369 return resourceSlotIds[iNextFreeSlot++]; |
1588 } |
1370 } |
1589 |
1371 |
1590 _AKNTRACE_FUNC_EXIT; |
|
1591 return -1; |
1372 return -1; |
1592 } |
1373 } |
1593 |
1374 |
1594 |
1375 |
1595 void CAiwServiceHandlerImpl::SetEmphasis(CCoeControl* /*aMenuControl*/,TBool /*aEmphasis*/) |
1376 void CAiwServiceHandlerImpl::SetEmphasis(CCoeControl* /*aMenuControl*/,TBool /*aEmphasis*/) |
1602 } |
1383 } |
1603 |
1384 |
1604 |
1385 |
1605 void Cleanup( TAny* aAny ) |
1386 void Cleanup( TAny* aAny ) |
1606 { |
1387 { |
1607 _AKNTRACE_FUNC_ENTER; |
|
1608 |
|
1609 RImplInfoPtrArray* implArray = |
1388 RImplInfoPtrArray* implArray = |
1610 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
1389 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
1611 implArray->ResetAndDestroy(); |
1390 implArray->ResetAndDestroy(); |
1612 implArray->Close(); |
1391 implArray->Close(); |
1613 |
|
1614 _AKNTRACE_FUNC_EXIT; |
|
1615 } |
1392 } |
1616 |
1393 |
1617 |
1394 |
1618 void InterestCleanup( TAny* aAny ) |
1395 void InterestCleanup( TAny* aAny ) |
1619 { |
1396 { |
1620 _AKNTRACE_FUNC_ENTER; |
|
1621 |
|
1622 RPointerArray<CAiwCriteriaItem>* interestArray = |
1397 RPointerArray<CAiwCriteriaItem>* interestArray = |
1623 reinterpret_cast<RPointerArray<CAiwCriteriaItem>*> ( aAny ); |
1398 reinterpret_cast<RPointerArray<CAiwCriteriaItem>*> ( aAny ); |
1624 |
1399 |
1625 interestArray->ResetAndDestroy(); |
1400 interestArray->ResetAndDestroy(); |
1626 |
|
1627 _AKNTRACE_FUNC_EXIT; |
|
1628 } |
1401 } |
1629 |
1402 |
1630 void FilteredCleanup( TAny* aAny ) |
1403 void FilteredCleanup( TAny* aAny ) |
1631 { |
1404 { |
1632 _AKNTRACE_FUNC_ENTER; |
|
1633 |
|
1634 RPointerArray<CAiwCriteriaItem>* filteredArray = |
1405 RPointerArray<CAiwCriteriaItem>* filteredArray = |
1635 reinterpret_cast<RPointerArray<CAiwCriteriaItem>*> ( aAny ); |
1406 reinterpret_cast<RPointerArray<CAiwCriteriaItem>*> ( aAny ); |
1636 |
1407 |
1637 filteredArray->Reset(); |
1408 filteredArray->Reset(); |
1638 |
|
1639 _AKNTRACE_FUNC_EXIT; |
|
1640 } |
1409 } |
1641 |
1410 |
1642 |
1411 |
1643 void IntArrayCleanup(TAny* aAny) |
1412 void IntArrayCleanup(TAny* aAny) |
1644 { |
1413 { |
1645 _AKNTRACE_FUNC_ENTER; |
|
1646 |
|
1647 RArray<TInt>* intArray = |
1414 RArray<TInt>* intArray = |
1648 reinterpret_cast<RArray<TInt>*> ( aAny ); |
1415 reinterpret_cast<RArray<TInt>*> ( aAny ); |
1649 |
1416 |
1650 intArray->Close(); |
1417 intArray->Close(); |
1651 |
|
1652 _AKNTRACE_FUNC_EXIT; |
|
1653 } |
1418 } |
1654 |
1419 |
1655 |
1420 |
1656 void CAiwServiceHandlerImpl::CopyMenuItemsL(CAiwMenuPane* aSource, CEikMenuPane& aDest, |
1421 void CAiwServiceHandlerImpl::CopyMenuItemsL(CAiwMenuPane* aSource, CEikMenuPane& aDest, |
1657 TInt aStartIndex, TBool aIsSubmenu, TBool aSetAsItemSpecific) |
1422 TInt aStartIndex, TBool aIsSubmenu, TBool aSetAsItemSpecific) |
1658 { |
1423 { |
1659 _AKNTRACE_FUNC_ENTER; |
|
1660 |
|
1661 TInt cmdId; |
1424 TInt cmdId; |
1662 TInt inPos = aStartIndex; |
1425 TInt inPos = aStartIndex; |
1663 |
1426 |
1664 for (TInt i = 0; i < aSource->MenuPane().NumberOfItemsInPane(); i++) |
1427 for (TInt i = 0; i < aSource->MenuPane().NumberOfItemsInPane(); i++) |
1665 { |
1428 { |
1686 } |
1449 } |
1687 |
1450 |
1688 aDest.InsertMenuItemL(itemData, inPos++); |
1451 aDest.InsertMenuItemL(itemData, inPos++); |
1689 } |
1452 } |
1690 } |
1453 } |
1691 |
|
1692 _AKNTRACE_FUNC_EXIT; |
|
1693 } |
1454 } |
1694 |
1455 |
1695 |
1456 |
1696 |
1457 |
1697 TInt CAiwServiceHandlerImpl::SlotItemCmd(CEikMenuPane& aPane) |
1458 TInt CAiwServiceHandlerImpl::SlotItemCmd(CEikMenuPane& aPane) |
1698 { |
1459 { |
1699 _AKNTRACE_FUNC_ENTER; |
|
1700 |
|
1701 TInt index; |
1460 TInt index; |
1702 |
1461 |
1703 for (TInt i = 0; i < KMaxMenuResources; i++) |
1462 for (TInt i = 0; i < KMaxMenuResources; i++) |
1704 { |
1463 { |
1705 if (aPane.MenuItemExists(EAiwMenuSlotBase + i, index)) |
1464 if (aPane.MenuItemExists(EAiwMenuSlotBase + i, index)) |
1706 { |
1465 { |
1707 return EAiwMenuSlotBase + i; |
1466 return EAiwMenuSlotBase + i; |
1708 } |
1467 } |
1709 } |
1468 } |
1710 |
1469 |
1711 _AKNTRACE_FUNC_EXIT; |
|
1712 return -1; |
1470 return -1; |
1713 } |
1471 } |
1714 |
1472 |
1715 |
1473 |
1716 |
1474 |
1717 CAiwMenuPane* CAiwServiceHandlerImpl::MenuPaneForSlotCmd(TInt aCmdId) |
1475 CAiwMenuPane* CAiwServiceHandlerImpl::MenuPaneForSlotCmd(TInt aCmdId) |
1718 { |
1476 { |
1719 _AKNTRACE_FUNC_ENTER; |
|
1720 |
|
1721 TInt index = aCmdId - EAiwMenuSlotBase; |
1477 TInt index = aCmdId - EAiwMenuSlotBase; |
1722 |
1478 |
1723 if (index < KMaxMenuResources) |
1479 if (index < KMaxMenuResources) |
1724 { |
1480 { |
1725 TInt resId = resourceSlotIds[index]; |
1481 TInt resId = resourceSlotIds[index]; |
1730 return iMenuPanes[i]; |
1486 return iMenuPanes[i]; |
1731 } |
1487 } |
1732 } |
1488 } |
1733 } |
1489 } |
1734 |
1490 |
1735 _AKNTRACE_FUNC_EXIT; |
|
1736 |
|
1737 return NULL; |
1491 return NULL; |
1738 } |
1492 } |
1739 |
1493 |
1740 |
1494 |
1741 |
1495 |
1742 CAiwServiceHandlerImpl::TAiwPlaceholderType CAiwServiceHandlerImpl::PlaceholderType( |
1496 CAiwServiceHandlerImpl::TAiwPlaceholderType CAiwServiceHandlerImpl::PlaceholderType( |
1743 CEikMenuPane& aPane, TInt aCmd, TBool& aTitleLocked) |
1497 CEikMenuPane& aPane, TInt aCmd, TBool& aTitleLocked) |
1744 { |
1498 { |
1745 _AKNTRACE_FUNC_ENTER; |
|
1746 |
|
1747 CEikMenuPaneItem::SData& itemData = aPane.ItemData(aCmd); |
1499 CEikMenuPaneItem::SData& itemData = aPane.ItemData(aCmd); |
1748 _AKNTRACE("itemData.iCascadeId:%x",itemData.iCascadeId); |
1500 |
1749 |
|
1750 aTitleLocked = EFalse; |
1501 aTitleLocked = EFalse; |
1751 |
1502 |
1752 if ((itemData.iCascadeId & AIW_CASCADE_ID) == AIW_CASCADE_ID) |
1503 if ((itemData.iCascadeId & AIW_CASCADE_ID) == AIW_CASCADE_ID) |
1753 { |
1504 { |
1754 if (itemData.iCascadeId & AIW_LOCK_SUBMENU_TITLE) |
1505 if (itemData.iCascadeId & AIW_LOCK_SUBMENU_TITLE) |
1764 aTitleLocked = ETrue; |
1515 aTitleLocked = ETrue; |
1765 } |
1516 } |
1766 return EAiwPlaceholderIntelligentCascade; |
1517 return EAiwPlaceholderIntelligentCascade; |
1767 } |
1518 } |
1768 |
1519 |
1769 _AKNTRACE_FUNC_EXIT; |
|
1770 return EAiwPlaceholderNormal; |
1520 return EAiwPlaceholderNormal; |
1771 } |
1521 } |
1772 |
1522 |
1773 |
1523 |
1774 void CAiwServiceHandlerImpl::ConvertPlaceholderL(CEikMenuPane& aPane, TInt aCmd, |
1524 void CAiwServiceHandlerImpl::ConvertPlaceholderL(CEikMenuPane& aPane, TInt aCmd, |
1775 CAiwMenuPane& aAiwPane, const TDesC& aTitle, TBool aSetAsItemSpecific) |
1525 CAiwMenuPane& aAiwPane, const TDesC& aTitle, TBool aSetAsItemSpecific) |
1776 { |
1526 { |
1777 _AKNTRACE_FUNC_ENTER; |
|
1778 |
|
1779 CEikMenuPaneItem::SData itemData = aPane.ItemData(aCmd); |
1527 CEikMenuPaneItem::SData itemData = aPane.ItemData(aCmd); |
1780 TInt index; |
1528 TInt index; |
1781 |
1529 |
1782 // Remenber index. |
1530 // Remenber index. |
1783 aPane.MenuItemExists(aCmd, index); |
1531 aPane.MenuItemExists(aCmd, index); |
1801 itemData.iFlags |= EEikMenuItemSpecific; |
1549 itemData.iFlags |= EEikMenuItemSpecific; |
1802 } |
1550 } |
1803 |
1551 |
1804 // Insert cascade item. |
1552 // Insert cascade item. |
1805 aPane.InsertMenuItemL(itemData, index); |
1553 aPane.InsertMenuItemL(itemData, index); |
1806 |
|
1807 _AKNTRACE_FUNC_EXIT; |
|
1808 } |
1554 } |
1809 |
1555 |
1810 |
1556 |
1811 void CAiwServiceHandlerImpl::UnCascadeL(CEikMenuPane& aPane, TInt aCmd, |
1557 void CAiwServiceHandlerImpl::UnCascadeL(CEikMenuPane& aPane, TInt aCmd, |
1812 CAiwMenuPane& aAiwPane, TBool aSetAsItemSpecific) |
1558 CAiwMenuPane& aAiwPane, TBool aSetAsItemSpecific) |
1813 { |
1559 { |
1814 _AKNTRACE_FUNC_ENTER; |
|
1815 |
|
1816 CEikMenuPaneItem::SData itemData = aAiwPane.MenuPane().ItemData(aAiwPane.FindCmdId(0)); |
1560 CEikMenuPaneItem::SData itemData = aAiwPane.MenuPane().ItemData(aAiwPane.FindCmdId(0)); |
1817 TInt index; |
1561 TInt index; |
1818 |
1562 |
1819 // Remenber index. |
1563 // Remenber index. |
1820 aPane.MenuItemExists(aCmd, index); |
1564 aPane.MenuItemExists(aCmd, index); |
1830 itemData.iFlags |= EEikMenuItemSpecific; |
1574 itemData.iFlags |= EEikMenuItemSpecific; |
1831 } |
1575 } |
1832 |
1576 |
1833 // Insert cascade item. |
1577 // Insert cascade item. |
1834 aPane.InsertMenuItemL(itemData, index); |
1578 aPane.InsertMenuItemL(itemData, index); |
1835 |
|
1836 _AKNTRACE_FUNC_EXIT; |
|
1837 } |
1579 } |
1838 |
1580 |
1839 |
1581 |
1840 |
1582 |
1841 void CAiwServiceHandlerImpl::SkipMenuFields(TResourceReader& aReader) |
1583 void CAiwServiceHandlerImpl::SkipMenuFields(TResourceReader& aReader) |
1842 { |
1584 { |
1843 _AKNTRACE_FUNC_ENTER; |
|
1844 |
|
1845 aReader.ReadInt32(); // Skip cascade id |
1585 aReader.ReadInt32(); // Skip cascade id |
1846 aReader.ReadInt32(); // Skip flags |
1586 aReader.ReadInt32(); // Skip flags |
1847 aReader.ReadTPtrC(); // Skip text |
1587 aReader.ReadTPtrC(); // Skip text |
1848 aReader.ReadTPtrC(); // Skip extra text |
1588 aReader.ReadTPtrC(); // Skip extra text |
1849 aReader.ReadTPtrC(); // Skip bmpfile. |
1589 aReader.ReadTPtrC(); // Skip bmpfile. |
1850 aReader.ReadInt16(); // Skip bmpid. |
1590 aReader.ReadInt16(); // Skip bmpid. |
1851 aReader.ReadInt16(); // Skip bmpmask. |
1591 aReader.ReadInt16(); // Skip bmpmask. |
1852 aReader.ReadInt32(); // Skip extension. |
1592 aReader.ReadInt32(); // Skip extension. |
1853 |
|
1854 _AKNTRACE_FUNC_EXIT; |
|
1855 } |
1593 } |
1856 |
1594 |
1857 |
1595 |
1858 TBool CAiwServiceHandlerImpl::IsAiwMenu(TInt aMenuResourceId) |
1596 TBool CAiwServiceHandlerImpl::IsAiwMenu(TInt aMenuResourceId) |
1859 { |
1597 { |
1860 _AKNTRACE_FUNC_ENTER; |
|
1861 |
|
1862 TInt i; |
1598 TInt i; |
1863 |
1599 |
1864 // First check if this is aiw submenu id |
1600 // First check if this is aiw submenu id |
1865 for (i = 0; i < KMaxMenuResources; i++) |
1601 for (i = 0; i < KMaxMenuResources; i++) |
1866 { |
1602 { |
1956 |
1685 |
1957 |
1686 |
1958 void CAiwServiceHandlerImpl::FilterInterestListL(RPointerArray<CAiwCriteriaItem>& aOriginal, |
1687 void CAiwServiceHandlerImpl::FilterInterestListL(RPointerArray<CAiwCriteriaItem>& aOriginal, |
1959 RPointerArray<CAiwCriteriaItem>& aFiltered) |
1688 RPointerArray<CAiwCriteriaItem>& aFiltered) |
1960 { |
1689 { |
1961 _AKNTRACE_FUNC_ENTER; |
|
1962 |
|
1963 CAiwCriteriaItem* item; |
1690 CAiwCriteriaItem* item; |
1964 |
1691 |
1965 while (aOriginal.Count() > 0) |
1692 while (aOriginal.Count() > 0) |
1966 { |
1693 { |
1967 item = aOriginal[0]; |
1694 item = aOriginal[0]; |
1968 aOriginal.Remove(0); |
1695 aOriginal.Remove(0); |
1969 item = ConvertCriteriaItemPointerL(item); |
1696 item = ConvertCriteriaItemPointerL(item); |
1970 User::LeaveIfError(aFiltered.Append(item)); |
1697 User::LeaveIfError(aFiltered.Append(item)); |
1971 } |
1698 } |
1972 aOriginal.Reset(); |
1699 aOriginal.Reset(); |
1973 |
|
1974 _AKNTRACE_FUNC_EXIT; |
|
1975 } |
1700 } |
1976 |
1701 |
1977 |
1702 |
1978 |
1703 |
1979 void CAiwServiceHandlerImpl::RemoveProvider(TInt aImplUid) |
1704 void CAiwServiceHandlerImpl::RemoveProvider(TInt aImplUid) |
1980 { |
1705 { |
1981 _AKNTRACE_FUNC_ENTER; |
|
1982 |
|
1983 TInt i; |
1706 TInt i; |
1984 |
1707 |
1985 // First go through bindings and remove all the |
1708 // First go through bindings and remove all the |
1986 // references to given provider. |
1709 // references to given provider. |
1987 for (i = 0; i < iBaseBindings.Count(); i++) |
1710 for (i = 0; i < iBaseBindings.Count(); i++) |
2002 delete iProviders[i]; |
1725 delete iProviders[i]; |
2003 iProviders.Remove(i); |
1726 iProviders.Remove(i); |
2004 i--; |
1727 i--; |
2005 } |
1728 } |
2006 } |
1729 } |
2007 |
|
2008 _AKNTRACE_FUNC_EXIT; |
|
2009 } |
1730 } |
2010 |
1731 |
2011 |
1732 |
2012 void CAiwServiceHandlerImpl::AddProviderL(TUid aImplUid, CAiwCriteriaItem* aItem) |
1733 void CAiwServiceHandlerImpl::AddProviderL(TUid aImplUid, CAiwCriteriaItem* aItem) |
2013 { |
1734 { |
2014 _AKNTRACE_FUNC_ENTER; |
|
2015 _AKNTRACE("aImplUid:%x",aImplUid.iUid); |
|
2016 |
|
2017 TInt i; |
1735 TInt i; |
2018 CAiwServiceIfBase* iface = iEcomMonitor->CreateImplementationL(aImplUid); |
1736 CAiwServiceIfBase* iface = iEcomMonitor->CreateImplementationL(aImplUid); |
2019 |
1737 |
2020 if (iface) |
1738 if (iface) |
2021 { |
1739 { |
2040 iMenuBindings[i]->AddProviderL(iface, aImplUid == aItem->DefaultProvider()); |
1758 iMenuBindings[i]->AddProviderL(iface, aImplUid == aItem->DefaultProvider()); |
2041 iface->InitialiseL(*this, iMenuBindings[i]->Interest()); |
1759 iface->InitialiseL(*this, iMenuBindings[i]->Interest()); |
2042 } |
1760 } |
2043 } |
1761 } |
2044 } |
1762 } |
2045 |
|
2046 _AKNTRACE_FUNC_EXIT; |
|
2047 } |
1763 } |
2048 |
1764 |
2049 |
1765 |
2050 |
1766 |
2051 TInt CAiwServiceHandlerImpl::SynchronizeCallBack(TAny* aImpl) |
1767 TInt CAiwServiceHandlerImpl::SynchronizeCallBack(TAny* aImpl) |
2052 { |
1768 { |
2053 _AKNTRACE_FUNC_ENTER; |
|
2054 _AKNTRACE("aImpl:%x",aImpl); |
|
2055 |
|
2056 CAiwServiceHandlerImpl* impl = reinterpret_cast<CAiwServiceHandlerImpl*>(aImpl); |
1769 CAiwServiceHandlerImpl* impl = reinterpret_cast<CAiwServiceHandlerImpl*>(aImpl); |
2057 TRAPD(err, impl->SynchronizeDbL()); |
1770 TRAPD(err, impl->SynchronizeDbL()); |
2058 |
|
2059 _AKNTRACE_FUNC_EXIT; |
|
2060 |
|
2061 return err; |
1771 return err; |
2062 } |
1772 } |
2063 |
1773 |
2064 |
1774 |
2065 |
1775 |
2066 void CAiwServiceHandlerImpl::SynchronizeDbL() |
1776 void CAiwServiceHandlerImpl::SynchronizeDbL() |
2067 { |
1777 { |
2068 _AKNTRACE_FUNC_ENTER; |
|
2069 |
|
2070 TInt i; |
1778 TInt i; |
2071 RArray<TInt> providers; |
1779 RArray<TInt> providers; |
2072 RImplInfoPtrArray infoArray; |
1780 RImplInfoPtrArray infoArray; |
2073 |
1781 |
2074 CleanupStack::PushL( TCleanupItem( IntArrayCleanup, &providers ) ); |
1782 CleanupStack::PushL( TCleanupItem( IntArrayCleanup, &providers ) ); |
2088 HandleRemovedProviders(providers, infoArray); |
1796 HandleRemovedProviders(providers, infoArray); |
2089 HandleNewProvidersL(providers, infoArray, iInterestList[i]); |
1797 HandleNewProvidersL(providers, infoArray, iInterestList[i]); |
2090 } |
1798 } |
2091 |
1799 |
2092 CleanupStack::PopAndDestroy(2); // providers, infoArray |
1800 CleanupStack::PopAndDestroy(2); // providers, infoArray |
2093 |
|
2094 _AKNTRACE_FUNC_EXIT; |
|
2095 } |
1801 } |
2096 |
1802 |
2097 |
1803 |
2098 void CAiwServiceHandlerImpl::HandleRemovedProviders(RArray<TInt>& aInMemory, |
1804 void CAiwServiceHandlerImpl::HandleRemovedProviders(RArray<TInt>& aInMemory, |
2099 RImplInfoPtrArray& aInSystem) |
1805 RImplInfoPtrArray& aInSystem) |
2100 { |
1806 { |
2101 _AKNTRACE_FUNC_ENTER; |
|
2102 |
|
2103 TInt i, j; |
1807 TInt i, j; |
2104 |
1808 |
2105 for (i = 0; i < aInMemory.Count(); i++) |
1809 for (i = 0; i < aInMemory.Count(); i++) |
2106 { |
1810 { |
2107 for (j = 0; j < aInSystem.Count(); j++) |
1811 for (j = 0; j < aInSystem.Count(); j++) |
2114 if (j >= aInSystem.Count()) // Was removed from system. |
1818 if (j >= aInSystem.Count()) // Was removed from system. |
2115 { |
1819 { |
2116 RemoveProvider(aInMemory[i]); |
1820 RemoveProvider(aInMemory[i]); |
2117 } |
1821 } |
2118 } |
1822 } |
2119 |
|
2120 _AKNTRACE_FUNC_EXIT; |
|
2121 } |
1823 } |
2122 |
1824 |
2123 |
1825 |
2124 void CAiwServiceHandlerImpl::HandleNewProvidersL(RArray<TInt>& aInMemory, |
1826 void CAiwServiceHandlerImpl::HandleNewProvidersL(RArray<TInt>& aInMemory, |
2125 RImplInfoPtrArray& aInSystem, CAiwCriteriaItem* aItem) |
1827 RImplInfoPtrArray& aInSystem, CAiwCriteriaItem* aItem) |
2126 { |
1828 { |
2127 _AKNTRACE_FUNC_ENTER; |
|
2128 |
|
2129 TInt i; |
1829 TInt i; |
2130 |
1830 |
2131 for (i = 0; i < aInSystem.Count(); i++) |
1831 for (i = 0; i < aInSystem.Count(); i++) |
2132 { |
1832 { |
2133 if (aInMemory.Find(aInSystem[i]->ImplementationUid().iUid) == KErrNotFound) |
1833 if (aInMemory.Find(aInSystem[i]->ImplementationUid().iUid) == KErrNotFound) |
2134 { |
1834 { |
2135 AddProviderL(aInSystem[i]->ImplementationUid(), aItem); |
1835 AddProviderL(aInSystem[i]->ImplementationUid(), aItem); |
2136 } |
1836 } |
2137 } |
1837 } |
2138 |
|
2139 _AKNTRACE_FUNC_EXIT; |
|
2140 } |
1838 } |
2141 |
1839 |
2142 void CAiwServiceHandlerImpl::MenuLaunched() |
1840 void CAiwServiceHandlerImpl::MenuLaunched() |
2143 { |
1841 { |
2144 _AKNTRACE_FUNC_ENTER; |
|
2145 |
|
2146 ClearMenuPaneArray(); |
1842 ClearMenuPaneArray(); |
2147 iNextFreeSlot = 0; |
1843 iNextFreeSlot = 0; |
2148 iLastInitialized.Reset(); |
1844 iLastInitialized.Reset(); |
2149 |
1845 |
2150 // Reset the iMenuPane pointers from iMenuBindings. |
1846 // Reset the iMenuPane pointers from iMenuBindings. |
2151 for(TInt i = 0; i < iMenuBindings.Count(); i++) |
1847 for(TInt i = 0; i < iMenuBindings.Count(); i++) |
2152 { |
1848 { |
2153 iMenuBindings[i]->SetMenuPane(NULL); |
1849 iMenuBindings[i]->SetMenuPane(NULL); |
2154 } |
1850 } |
2155 |
|
2156 _AKNTRACE_FUNC_EXIT; |
|
2157 } |
1851 } |
2158 |
1852 |
2159 // End of file |
1853 // End of file |