iaupdate/IAD/engine/inc/iaupdateanynode.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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:   This file contains the header file of MIAUpdateAnyNode class 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_ANY_NODE_H
       
    21 #define IA_UPDATE_ANY_NODE_H
       
    22 
       
    23 
       
    24 class MIAUpdateBaseNode;
       
    25 
       
    26 
       
    27 /**
       
    28  * MIAUpdateAnyNode
       
    29  * This interface provides enumerations for the node types.
       
    30  * Classes that implement this interface provide information
       
    31  * about their type. By using the type information, 
       
    32  * a MIAUpdateAnyNode object can be static casted to a more
       
    33  * specific object if necessary. This can be usefull, for example,
       
    34  * when arrays for MIAUpdateAnyNode objects are used. Also,
       
    35  * a function to get the base node is provided. So, common
       
    36  * information for all the nodes can be gotten through this
       
    37  * interface without casting the object.
       
    38  *
       
    39  * @see MIAUpdateBaseNode
       
    40  * @see MIAUpdateNormalNode
       
    41  * @see MIAUpdateFwNode
       
    42  */
       
    43 class MIAUpdateAnyNode
       
    44     {
       
    45 
       
    46 public:
       
    47 
       
    48     /**
       
    49      * These enumerations provide known node types that
       
    50      * can be interpreted as known more specific interfaces.
       
    51      */
       
    52     enum TNodeType
       
    53         {
       
    54         /**
       
    55          * Node type is not defined.
       
    56          * Static casting of the node should be avoided.
       
    57          */
       
    58         ENodeTypeNotDefined,
       
    59         
       
    60         /**
       
    61          * Node is normal node.
       
    62          * @see MIAUpdateNode
       
    63          */
       
    64         ENodeTypeNormal,
       
    65 
       
    66         /**
       
    67          * Node is firmware node.
       
    68          * @see MIAUpdateFwNode
       
    69          */        
       
    70         ENodeTypeFw
       
    71         };
       
    72 
       
    73     /**
       
    74      * @return TNodeType Describes the type of the node. 
       
    75      */
       
    76     virtual TNodeType NodeType() const = 0;
       
    77     
       
    78     /**
       
    79      * @return MIAUpdateBaseNode& Base interface for nodes.
       
    80      * This interface provides common details for all the different nodes.
       
    81      */
       
    82     virtual MIAUpdateBaseNode& Base() = 0;
       
    83 
       
    84 
       
    85 protected:
       
    86 
       
    87     /**
       
    88      * Protected destructor to prevent deletion.
       
    89      */    
       
    90     virtual ~MIAUpdateAnyNode() { }
       
    91 
       
    92     };
       
    93 
       
    94 
       
    95 #endif // IA_UPDATE_ANY_NODE_H