idlehomescreen/inc/xncomponentnodeimpl.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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 * Xuikon component node implementation
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef XNCOMPONENTNODEIMPL_H
       
    20 #define XNCOMPONENTNODEIMPL_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 
       
    25 // User includes
       
    26 #include "xnnodeimpl.h"
       
    27 
       
    28 // Forward declarations
       
    29 class CXnComponent;
       
    30 namespace XnComponentInterface
       
    31     {
       
    32     class MXnComponentInterface;
       
    33     }
       
    34 
       
    35 // Class declaration
       
    36 /**
       
    37  * Xuikon component node implementation
       
    38  *
       
    39  * @ingroup group_xnlayoutengine
       
    40  * @lib ?library
       
    41  * @since Series 60 3.1
       
    42  */
       
    43 class CXnComponentNodeImpl : public CXnNodeImpl
       
    44     {
       
    45 public:
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      *
       
    49      * @param aType Type.
       
    50      */
       
    51     IMPORT_C static CXnComponentNodeImpl* NewL( CXnType* aType );
       
    52 
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     IMPORT_C virtual ~CXnComponentNodeImpl();
       
    57 
       
    58 public:
       
    59     // New functions
       
    60 
       
    61     /**
       
    62      * Get the component
       
    63      *
       
    64      * @since Series 60 3.1
       
    65      * @return Component
       
    66      */
       
    67     IMPORT_C CXnComponent* Component();
       
    68 
       
    69     /**
       
    70      * Set the component
       
    71      *
       
    72      * @since Series 60 3.1
       
    73      * @param aComponent Component
       
    74      */
       
    75     IMPORT_C void SetComponent( CXnComponent* aComponent );
       
    76 
       
    77     /**
       
    78      * Returns whether a component should be created for the node
       
    79      *
       
    80      * @since Series 60 3.1
       
    81      * @return Flag indicating whether a component should be created for the node
       
    82      */
       
    83     IMPORT_C TBool DoesComponentNeedCreation() const;
       
    84 
       
    85     /**
       
    86      * Set the flag indicating whether a component should be created for the node
       
    87      *
       
    88      * @since Series 60 3.1
       
    89      * @param aFlag Flag indicating whether a component should be created for the
       
    90      *        node
       
    91      */
       
    92     IMPORT_C void SetComponentNeedsCreation( TBool aFlag );
       
    93 
       
    94 public:
       
    95     /**
       
    96      * From CXnNodeImpl.
       
    97      * Create a component interface according to the given type.
       
    98      *
       
    99      * @param aType Type of the interface to create
       
   100      * @return Created interface or NULL if the provided type is not supported.
       
   101      */
       
   102     IMPORT_C virtual XnComponentInterface::MXnComponentInterface* MakeInterfaceL(
       
   103         const TDesC8& aType );
       
   104 
       
   105 protected:
       
   106     /**
       
   107      * C++ default constructor.
       
   108      */
       
   109     IMPORT_C CXnComponentNodeImpl();
       
   110 
       
   111     /**
       
   112      * Two-phased constructor.
       
   113      *
       
   114      * @param aType Type
       
   115      */
       
   116     IMPORT_C void ConstructL( CXnType* aType );
       
   117 
       
   118 private:
       
   119     // Data
       
   120 
       
   121     /**
       
   122      * Component.
       
   123      * Own.
       
   124      */
       
   125     CXnComponent* iComponent;
       
   126 
       
   127     /**
       
   128      * Flag indicating whether a component should be created for the node
       
   129      */
       
   130     TBool iComponentNeedsCreation;
       
   131     };
       
   132 
       
   133 #endif