homescreensrv_plat/ai_content_model_api/inc/aieventhandlerextension.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Event handling extension for the CAiContentPublisher interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_AIEVENTHANDLEREXTENSION_H
       
    20 #define M_AIEVENTHANDLEREXTENSION_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 /**
       
    25  *  Extension of the CAiContentPublisher interface, which allows Active Idle
       
    26  *  Framework to notify their plug-ins that they must to handle event.
       
    27  *  Plug-ins must provide implementation of interface only if they are
       
    28  *  supporting event model (e.g. provides possibility to manipulate engine 
       
    29  *  properties via UI).
       
    30  *
       
    31  *  @since S60 3.2
       
    32  */
       
    33 class MAiEventHandlerExtension
       
    34     {
       
    35 public:
       
    36     /**
       
    37      * Invoked by the framework when plug-in must handle an event.
       
    38      *
       
    39      * @param aEvent - unique identifier of event from plug-in content model.
       
    40      * @param aParam - parameters associated with event. Each UI Definition
       
    41      *        declares events in the format: <event name>(<event params>),
       
    42      *        where <event name> is mapped by the framework to unique
       
    43      *        identifier supplied in aEvent, <event params> are provided to
       
    44      *        plug-in as-is in the descriptor.
       
    45      */
       
    46     virtual void HandleEvent(TInt aEvent, const TDesC& aParam) = 0;
       
    47 
       
    48     /**
       
    49     * Invoked by the framework when plug-in must handle an event.
       
    50     *
       
    51     * @param aEventName - name of the event from plug-in content model.
       
    52     * @param aParam - parameters associated with event. Each UI Definition
       
    53     *        declares events in the format: <event name>(<event params>),
       
    54     *        where  <event name> mapping to unique identifier supplied by event 
       
    55     *        is failed by the frame work then the  <event name> and  
       
    56     *        <event params>  are provied to plug-in as-is in the descriptor.
       
    57     */
       
    58     virtual void HandleEvent(const TDesC& /*aEventName*/, const TDesC& /*aParam*/) { };
       
    59     
       
    60     /**
       
    61     * Invoked by the framework for querying if plugin has menu item
       
    62     *
       
    63     * @param aMenuItem menu item name
       
    64     * @return ETrue if plugin has specific menu item, EFalse otherwise
       
    65     */    
       
    66     virtual TBool HasMenuItem(const TDesC& /*aMenuItem*/) { return EFalse; }
       
    67     
       
    68 protected:
       
    69     /**
       
    70      * Protected destructor prevents deletion through this interface.
       
    71      */
       
    72     ~MAiEventHandlerExtension() { }
       
    73     };
       
    74 
       
    75 #endif // M_AIEVENTHANDLEREXTENSION_H