13 * |
13 * |
14 * Description: Used for handling XUIKON events |
14 * Description: Used for handling XUIKON events |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
|
18 // System includes |
|
19 #include <e32std.h> |
|
20 #include <csxhelp/hmsc.hlp.hrh> |
|
21 #include <layoutmetadata.cdl.h> |
|
22 #include <e32property.h> |
|
23 #include <centralrepository.h> |
|
24 #include <AknUtils.h> |
|
25 #include <akntoolbar.h> |
|
26 #include <aknappui.h> |
|
27 #include <hlplch.h> |
|
28 #include <aknlistquerydialog.h> |
|
29 #include <aknnotewrappers.h> |
|
30 #include <StringLoader.h> |
|
31 |
|
32 // User includes |
|
33 #include <hspublisherinfo.h> |
|
34 #include <aiutility.h> |
|
35 #include <aistrparser.h> |
|
36 #include <ai3xmlui.rsg> |
|
37 #include <activeidle2domainpskeys.h> |
|
38 #include <activeidle2domaincrkeys.h> |
|
39 #include <aisystemuids.hrh> |
18 |
40 |
19 #include "aixuikoneventhandler.h" |
41 #include "aixuikoneventhandler.h" |
20 #include "aifweventhandler.h" |
42 #include "aifweventhandler.h" |
21 #include "aiuieventhandler.h" |
43 #include "aiuieventhandler.h" |
22 #include "aiapplicationeventhandler.h" |
44 #include "aiapplicationeventhandler.h" |
23 #include "aiconsts.h" |
45 #include "aiconsts.h" |
24 #include "xmluicontroller.h" |
46 #include "xmluicontroller.h" |
25 #include "aixmluiconstants.h" |
47 #include "aixmluiconstants.h" |
26 #include "aixmluiutils.h" |
48 #include "aixmluiutils.h" |
27 #include "contentrenderer.h" |
49 #include "contentrenderer.h" |
28 #include <activeidle2domainpskeys.h> |
|
29 #include <activeidle2domaincrkeys.h> |
|
30 #include <csxhelp/hmsc.hlp.hrh> |
|
31 #include <aisystemuids.hrh> |
|
32 |
|
33 #include "xnnodeappif.h" |
50 #include "xnnodeappif.h" |
34 #include "xnuiengineappif.h" |
51 #include "xnuiengineappif.h" |
35 #include "xnproperty.h" |
52 #include "xnproperty.h" |
36 #include "xndomnode.h" |
53 #include "xndomnode.h" |
37 #include "xntype.h" |
54 #include "xntype.h" |
38 #include "xndomlist.h" // for cxndomlist |
55 #include "xndomlist.h" // for cxndomlist |
39 #include "xndomattribute.h" // for cxndomattribute |
56 #include "xndomattribute.h" // for cxndomattribute |
40 #include <e32svr.h> |
|
41 #include <aiutility.h> |
|
42 #include <aistrparser.h> |
|
43 #include <layoutmetadata.cdl.h> |
|
44 #include <e32property.h> |
|
45 #include <centralrepository.h> |
|
46 #include <AknUtils.h> |
|
47 #include <akntoolbar.h> |
|
48 #include <aknappui.h> |
|
49 #include <hlplch.h> |
|
50 #include <aknlistquerydialog.h> |
|
51 #include <ai3xmlui.rsg> |
|
52 #include <aknnotewrappers.h> |
|
53 #include <StringLoader.h> |
|
54 #include "xndompropertyvalue.h" |
57 #include "xndompropertyvalue.h" |
55 #include "xnnodeappif.h" |
58 #include "xnnodeappif.h" |
56 #include "appui.h" |
59 #include "appui.h" |
57 #include "xndomproperty.h" |
60 #include "xndomproperty.h" |
58 #include "xnplugindefs.h" |
61 #include "xnplugindefs.h" |
71 |
74 |
72 private: // from MAiFwEventHandler |
75 private: // from MAiFwEventHandler |
73 void AppEnvReadyL(); |
76 void AppEnvReadyL(); |
74 void HandleUiReadyEventL( CAiUiController& aUiController ); |
77 void HandleUiReadyEventL( CAiUiController& aUiController ); |
75 void HandleActivateUI(); |
78 void HandleActivateUI(); |
76 void HandleUiShutdown( CAiUiController& aUiController ); |
79 void HandleUiShutdown( CAiUiController& aUiController ); |
77 void CriticalStartupPhaseOver( TInt aStageInteger ); |
|
78 void HandleLoadPluginL( const TAiPublisherInfo& aPublisherInfo ); |
|
79 void HandleDestroyPluginL( const TAiPublisherInfo& aPublisherInfo ); |
|
80 void HandlePluginEvent( const TDesC& aParam ); |
80 void HandlePluginEvent( const TDesC& aParam ); |
81 void HandlePluginEventL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aParam ); |
81 void HandlePluginEventL( const THsPublisherInfo& aPublisherInfo, const TDesC& aParam ); |
82 TBool HasMenuItemL( const TAiPublisherInfo& aPublisherInfo, const TDesC& aMenuItem ); |
82 TBool HasMenuItemL( const THsPublisherInfo& aPublisherInfo, const TDesC& aMenuItem ); |
83 TBool RefreshContent( const TDesC& aContentCid ); |
83 TBool RefreshContent( const TDesC& aContentCid ); |
84 TBool QueryIsMenuOpen(); |
84 TBool RefreshContent( const THsPublisherInfo& aPublisherInfo, const TDesC& aContentId ); |
85 void ProcessStateChange( TAifwStates aSate ); |
85 TBool SuspendContent( const THsPublisherInfo& aPublisherInfo, const TDesC& aContentId ); |
|
86 TBool QueryIsMenuOpen(); |
86 |
87 |
87 private: // from MAiUiEventHandler |
88 private: // from MAiUiEventHandler |
88 TBool HandleUiEvent( TAny* aEvent, const TDesC8& aParam ); |
89 TBool HandleUiEvent( TAny* aEvent, const TDesC8& aParam ); |
89 |
90 |
90 private: // from MAiApplicationEventHandler |
91 private: // from MAiApplicationEventHandler |
356 CleanupClosePushL( list ); |
357 CleanupClosePushL( list ); |
357 |
358 |
358 // Broadcast event to all plugins |
359 // Broadcast event to all plugins |
359 for ( TInt i = 0; i < list.Count(); i++ ) |
360 for ( TInt i = 0; i < list.Count(); i++ ) |
360 { |
361 { |
361 TAiPublisherInfo info; |
362 THsPublisherInfo info; |
362 |
363 |
363 iUiController.PublisherInfoL( *list[i], info ); |
364 iUiController.PublisherInfoL( *list[i], info ); |
364 |
365 |
365 // Forward event to AiFw |
366 // Forward event to AiFw |
366 iFwEventHandler->HandlePluginEventL( info, *event ); |
367 iFwEventHandler->HandlePluginEventL( info, *event ); |
381 |
382 |
382 if ( list.Count() == 1 ) |
383 if ( list.Count() == 1 ) |
383 { |
384 { |
384 // Only one data plugin in this namespace, |
385 // Only one data plugin in this namespace, |
385 // it must handle this event. |
386 // it must handle this event. |
386 TAiPublisherInfo info; |
387 THsPublisherInfo info; |
387 |
388 |
388 iUiController.PublisherInfoL( *list[0], info ); |
389 iUiController.PublisherInfoL( *list[0], info ); |
389 |
390 |
390 // Forward event to AiFw |
391 // Forward event to AiFw |
391 iFwEventHandler->HandlePluginEventL( info, *event ); |
392 iFwEventHandler->HandlePluginEventL( info, *event ); |
401 CXnNodeAppIf* eventHandler( |
402 CXnNodeAppIf* eventHandler( |
402 engine->FindNodeByIdL( destination, ns ) ); |
403 engine->FindNodeByIdL( destination, ns ) ); |
403 |
404 |
404 if ( eventHandler ) |
405 if ( eventHandler ) |
405 { |
406 { |
406 TAiPublisherInfo info; |
407 THsPublisherInfo info; |
407 |
408 |
408 iUiController.PublisherInfoL( *eventHandler, info ); |
409 iUiController.PublisherInfoL( *eventHandler, info ); |
409 |
410 |
410 // Forward event to AiFw |
411 // Forward event to AiFw |
411 iFwEventHandler->HandlePluginEventL( info, *event ); |
412 iFwEventHandler->HandlePluginEventL( info, *event ); |
421 // Extract plugin name |
422 // Extract plugin name |
422 TPtrC pluginName( event->Left( pos ) ); |
423 TPtrC pluginName( event->Left( pos ) ); |
423 |
424 |
424 for ( TInt i = 0; i < list.Count(); i++ ) |
425 for ( TInt i = 0; i < list.Count(); i++ ) |
425 { |
426 { |
426 TAiPublisherInfo info; |
427 THsPublisherInfo info; |
427 |
428 |
428 iUiController.PublisherInfoL( *list[i], info ); |
429 iUiController.PublisherInfoL( *list[i], info ); |
429 |
430 |
430 if( info.iName == pluginName ) |
431 if( info.Name() == pluginName ) |
431 { |
432 { |
432 // Forward Plug-in events to AI FW for further |
433 // Forward Plug-in events to AI FW for further |
433 // dispatching to the target Plug-in |
434 // dispatching to the target Plug-in |
434 iFwEventHandler->HandlePluginEventL( info,*event ); |
435 iFwEventHandler->HandlePluginEventL( info,*event ); |
435 break; |
436 break; |
474 // CAIXuikonEventHandler::CNullEventHandler |
475 // CAIXuikonEventHandler::CNullEventHandler |
475 void CAIXuikonEventHandler::CNullEventHandler::AppEnvReadyL() |
476 void CAIXuikonEventHandler::CNullEventHandler::AppEnvReadyL() |
476 { |
477 { |
477 } |
478 } |
478 |
479 |
479 void CAIXuikonEventHandler::CNullEventHandler::HandleUiReadyEventL |
480 void CAIXuikonEventHandler::CNullEventHandler::HandleUiReadyEventL( |
480 ( CAiUiController& /*aUiController*/ ) |
481 CAiUiController& /*aUiController*/ ) |
481 { |
482 { |
482 } |
483 } |
483 |
484 |
484 void CAIXuikonEventHandler::CNullEventHandler::HandleActivateUI() |
485 void CAIXuikonEventHandler::CNullEventHandler::HandleActivateUI() |
485 { |
486 { |
486 } |
487 } |
487 |
488 |
488 void CAIXuikonEventHandler::CNullEventHandler::HandlePluginEvent |
489 void CAIXuikonEventHandler::CNullEventHandler::HandlePluginEvent( |
489 ( const TDesC& /*aParam*/ ) |
490 const TDesC& /*aParam*/ ) |
490 { |
491 { |
491 } |
492 } |
492 |
493 |
493 void CAIXuikonEventHandler::CNullEventHandler::HandlePluginEventL |
494 void CAIXuikonEventHandler::CNullEventHandler::HandlePluginEventL( |
494 (const TAiPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aParam*/ ) |
495 const THsPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aParam*/ ) |
495 { |
496 { |
496 } |
497 } |
497 |
498 |
498 TBool CAIXuikonEventHandler::CNullEventHandler::HasMenuItemL( |
499 TBool CAIXuikonEventHandler::CNullEventHandler::HasMenuItemL( |
499 const TAiPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aMenuItem*/ ) |
500 const THsPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aMenuItem*/ ) |
500 { |
501 { |
501 return EFalse; |
502 return EFalse; |
502 } |
503 } |
503 |
504 |
504 void CAIXuikonEventHandler::CNullEventHandler::HandleUiShutdown |
505 void CAIXuikonEventHandler::CNullEventHandler::HandleUiShutdown( |
505 ( CAiUiController& /*aUiController*/ ) |
506 CAiUiController& /*aUiController*/ ) |
506 { |
507 { |
507 } |
508 } |
508 |
509 |
509 TBool CAIXuikonEventHandler::CNullEventHandler::RefreshContent( |
510 TBool CAIXuikonEventHandler::CNullEventHandler::RefreshContent( |
510 const TDesC& /*aContentCid*/ ) |
511 const TDesC& /*aContentCid*/ ) |
511 { |
512 { |
512 return EFalse; |
513 return EFalse; |
513 } |
514 } |
514 |
515 |
515 void CAIXuikonEventHandler::CNullEventHandler::CriticalStartupPhaseOver( |
516 TBool CAIXuikonEventHandler::CNullEventHandler::RefreshContent( |
516 TInt /*aStageInteger*/ ) |
517 const THsPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aContentId*/ ) |
517 { |
518 { |
|
519 return EFalse; |
|
520 } |
|
521 |
|
522 TBool CAIXuikonEventHandler::CNullEventHandler::SuspendContent( |
|
523 const THsPublisherInfo& /*aPublisherInfo*/, const TDesC& /*aContentId*/ ) |
|
524 { |
|
525 return EFalse; |
518 } |
526 } |
519 |
527 |
520 TBool CAIXuikonEventHandler::CNullEventHandler::QueryIsMenuOpen() |
528 TBool CAIXuikonEventHandler::CNullEventHandler::QueryIsMenuOpen() |
521 { |
529 { |
522 return EFalse; |
530 return EFalse; |
523 } |
531 } |
524 |
532 |
525 void CAIXuikonEventHandler::CNullEventHandler::ProcessStateChange( |
533 TBool CAIXuikonEventHandler::CNullEventHandler::HandleUiEvent( |
526 TAifwStates /*aSate*/) |
534 TAny* /*aEvent*/, const TDesC8& /*aParam*/ ) |
527 { |
535 { |
528 } |
536 return EFalse; |
529 |
537 } |
530 void CAIXuikonEventHandler::CNullEventHandler::HandleLoadPluginL( |
538 |
531 const TAiPublisherInfo& /*aPluginToLoad*/ ) |
539 TBool CAIXuikonEventHandler::CNullEventHandler::HandleApplicationEvent( |
532 { |
540 TInt /*aEvent*/, const TDesC8& /*aParam*/ ) |
533 } |
|
534 |
|
535 void CAIXuikonEventHandler::CNullEventHandler::HandleDestroyPluginL( |
|
536 const TAiPublisherInfo& /*aPluginToDestroy*/ ) |
|
537 { |
|
538 } |
|
539 |
|
540 TBool CAIXuikonEventHandler::CNullEventHandler::HandleUiEvent |
|
541 (TAny* /*aEvent*/, const TDesC8& /*aParam*/) |
|
542 { |
|
543 return EFalse; |
|
544 } |
|
545 |
|
546 TBool CAIXuikonEventHandler::CNullEventHandler::HandleApplicationEvent |
|
547 (TInt /*aEvent*/, const TDesC8& /*aParam*/) |
|
548 { |
541 { |
549 return EFalse; |
542 return EFalse; |
550 } |
543 } |
551 |
544 |
552 // End of file |
545 // End of file |