idlehomescreen/xmluicontroller/inc/aieventhandler.h
changeset 0 f72a12da539e
child 16 9674c1a575e9
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Used for handling system events (events with EventHandler-prefix).
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AIEVENTHANDLER_H
       
    20 #define C_AIEVENTHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CXnDomNode;
       
    25 class CLiwServiceHandler;
       
    26 class MLiwInterface;
       
    27 class CLiwDefaultMap;
       
    28 
       
    29 namespace AiXmlUiController
       
    30 {
       
    31 class CXmlUiController;
       
    32 
       
    33 /**
       
    34  * 
       
    35  *  This class is used for handling and passing events.
       
    36  *
       
    37  *  Class handles some of the events itself and uses Action Handler Service for the rest.
       
    38  *
       
    39  *  @lib AiXmlUiMain
       
    40  */
       
    41 class CAIEventHandler : public CBase
       
    42     {
       
    43 public:
       
    44     // Constructor
       
    45     static CAIEventHandler* NewL( CXmlUiController& aUiController );
       
    46     
       
    47     // Destructor
       
    48     ~CAIEventHandler();
       
    49 
       
    50     /**
       
    51      * Handles the restricted ( can be triggered only from view) events and forwards the rest
       
    52      * into appropriate functions.
       
    53      * 
       
    54      * @param aEventText Full event name (prefix/event)
       
    55      * @param aEvent Includes rest of the parameters. 
       
    56      */
       
    57     void HandleEventL( const TDesC8& aEventText, CXnDomNode& aEvent );
       
    58 
       
    59 private:
       
    60     
       
    61     CAIEventHandler( CXmlUiController& aUiController );
       
    62                           
       
    63     void ConstructL();
       
    64     
       
    65     void LaunchAppL( CXnDomNode& aEventNode );
       
    66     
       
    67     void ActivateViewL( CXnDomNode& aEventNode );
       
    68     
       
    69     void ExecuteAppLauncherL( CLiwDefaultMap& map );
       
    70     
       
    71     MLiwInterface* ActionHandlerInterfaceL( );
       
    72     
       
    73 private: // data
       
    74     /**
       
    75      * Reference to XML ui controller.
       
    76      */
       
    77     CXmlUiController& iUiController;
       
    78     
       
    79     /**
       
    80      * Action Handler service handler.
       
    81      * Own.
       
    82      */
       
    83     CLiwServiceHandler* iServiceHandler;
       
    84     };
       
    85 }
       
    86 
       
    87 #endif // C_AIEVENTHANDLER_H