menufw/hierarchynavigator/hnmetadatamodel/inc/hnmdeventmappingelement.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_HNMDEVENTMAPPINGELEMENT_H
       
    21 #define C_HNMDEVENTMAPPINGELEMENT_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <xmlengdom.h>
       
    25 
       
    26 #include "hnglobals.h"
       
    27 
       
    28 class CHnMdItem; 
       
    29 class CHnMdAction;
       
    30 class CHnMdEvent;
       
    31 struct THnMdCommonPointers;
       
    32 
       
    33 /**
       
    34  * Event Mapping Element.
       
    35  * 
       
    36  * This class is used to bind key events (or different events)
       
    37  * with specific actions.
       
    38  
       
    39  *
       
    40  * @lib hierarchynavigatorengine
       
    41  * @since S60 v5.0
       
    42  * @ingroup group_hnmetadatamodel
       
    43  */
       
    44 NONSHARABLE_CLASS(CHnMdEventMappingElement) : public CBase
       
    45     {
       
    46 public:
       
    47     /**
       
    48      * Standard factory method.
       
    49      *
       
    50      * since S60 v5.0
       
    51      * @param aElement Xml element.
       
    52      * @return Fully constructed object.
       
    53      */
       
    54     static CHnMdEventMappingElement* NewL( TXmlEngElement aElement );
       
    55 
       
    56     /**
       
    57      * Standard factory method.
       
    58      *
       
    59      * since S60 v5.0
       
    60      * @param aElement Xml element.
       
    61      * @return Fully constructed object.
       
    62      */
       
    63     static CHnMdEventMappingElement* NewLC( TXmlEngElement aElement );
       
    64 
       
    65     /**
       
    66      * Default destructor.
       
    67      */
       
    68     virtual ~CHnMdEventMappingElement();
       
    69     
       
    70     /**
       
    71      * Returns actions.
       
    72      * 
       
    73      * @return A list of actions stored in an object of this class.
       
    74      */
       
    75     RPointerArray<CHnMdAction>& Actions();
       
    76     
       
    77     /**
       
    78      * Returns events.
       
    79      * 
       
    80      * @return A list of events stored in the object of this class.
       
    81      */
       
    82     const RPointerArray<CHnMdEvent>& Events() const;
       
    83 
       
    84 
       
    85 private:
       
    86 
       
    87     /**
       
    88      * Standard constructor.
       
    89      */
       
    90     CHnMdEventMappingElement();
       
    91 
       
    92     /**
       
    93      * EPOC default constructor for performing 2nd stage construction.
       
    94      * 
       
    95      * @param aElement Xml element.
       
    96      */
       
    97     void ConstructL( TXmlEngElement aElement );
       
    98     
       
    99     /**
       
   100      * Adds an event to the list of events.
       
   101      * 
       
   102      * @param aEvent A pointer to the event object.
       
   103      */
       
   104     void AddEventL( CHnMdEvent* aEvent );
       
   105 
       
   106     /**
       
   107      * Sets events on the base of the xml element.
       
   108      * 
       
   109      * @param aElement Xml element.
       
   110      */
       
   111     void SetEventsL( TXmlEngElement aElement );
       
   112     
       
   113     /**
       
   114      * Sets actions on the base of the xml element.
       
   115      * 
       
   116      * @param aElement Xml element.
       
   117      */
       
   118     void SetActionsL( TXmlEngElement aElement );
       
   119 
       
   120 private: // data
       
   121 
       
   122     /**
       
   123      * Own - Events.
       
   124      */
       
   125     RPointerArray<CHnMdEvent> iEvents;
       
   126     
       
   127     /**
       
   128      * Own - Actions.
       
   129      */
       
   130     RPointerArray<CHnMdAction> iActions;
       
   131     
       
   132     };
       
   133 
       
   134 #endif // C_HNMEVENTMAPPINGELEMENT_H