diff -r 000000000000 -r f72a12da539e idlehomescreen/xmluicontroller/inc/aieventhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/xmluicontroller/inc/aieventhandler.h Thu Dec 17 08:40:49 2009 +0200 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Used for handling system events (events with EventHandler-prefix). +* +*/ + + +#ifndef C_AIEVENTHANDLER_H +#define C_AIEVENTHANDLER_H + +#include + +class CXnDomNode; +class CLiwServiceHandler; +class MLiwInterface; +class CLiwDefaultMap; + +namespace AiXmlUiController +{ +class CXmlUiController; + +/** + * + * This class is used for handling and passing events. + * + * Class handles some of the events itself and uses Action Handler Service for the rest. + * + * @lib AiXmlUiMain + */ +class CAIEventHandler : public CBase + { +public: + // Constructor + static CAIEventHandler* NewL( CXmlUiController& aUiController ); + + // Destructor + ~CAIEventHandler(); + + /** + * Handles the restricted ( can be triggered only from view) events and forwards the rest + * into appropriate functions. + * + * @param aEventText Full event name (prefix/event) + * @param aEvent Includes rest of the parameters. + */ + void HandleEventL( const TDesC8& aEventText, CXnDomNode& aEvent ); + +private: + + CAIEventHandler( CXmlUiController& aUiController ); + + void ConstructL(); + + void LaunchAppL( CXnDomNode& aEventNode ); + + void ActivateViewL( CXnDomNode& aEventNode ); + + void ExecuteAppLauncherL( CLiwDefaultMap& map ); + + MLiwInterface* ActionHandlerInterfaceL( ); + +private: // data + /** + * Reference to XML ui controller. + */ + CXmlUiController& iUiController; + + /** + * Action Handler service handler. + * Own. + */ + CLiwServiceHandler* iServiceHandler; + }; +} + +#endif // C_AIEVENTHANDLER_H