ncdengine/provider/server/inc/ncdchildentity.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 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:   Contains MStorable interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCD_CHILD_ENTITY_H
       
    20 #define C_NCD_CHILD_ENTITY_H
       
    21 
       
    22 #include <e32cmn.h>
       
    23 // RWriteStream, RReadStream
       
    24 #include <s32strm.h> 
       
    25 
       
    26 // CNcdNodeFactory::TNcdNodeType
       
    27 #include "ncdnodefactory.h"
       
    28 
       
    29 class CNcdNodeIdentifier;
       
    30 
       
    31 
       
    32 class CNcdChildEntity : public CBase
       
    33     {
       
    34 public:
       
    35     static CNcdChildEntity* NewL( 
       
    36         TInt aIndex,
       
    37         const CNcdNodeIdentifier& aIdentifier,
       
    38         TBool aTransparent,
       
    39         CNcdNodeFactory::TNcdNodeType aNodeType );
       
    40         
       
    41     static CNcdChildEntity* NewLC( 
       
    42         TInt aIndex,
       
    43         const CNcdNodeIdentifier& aIdentifier,
       
    44         TBool aTransparent,
       
    45         CNcdNodeFactory::TNcdNodeType aNodeType );
       
    46         
       
    47     static CNcdChildEntity* NewL( RReadStream& aStream );
       
    48     
       
    49     static CNcdChildEntity* NewLC( RReadStream& aStream );
       
    50     
       
    51     static CNcdChildEntity* NewL( const CNcdChildEntity& aChildEntity );
       
    52     
       
    53     static CNcdChildEntity* NewLC( const CNcdChildEntity& aChildEntity );
       
    54     
       
    55     ~CNcdChildEntity();
       
    56     
       
    57     const CNcdNodeIdentifier& Identifier() const;
       
    58     
       
    59     void SetIdentifierL( const CNcdNodeIdentifier& aIdentifier );
       
    60     
       
    61     TInt Index() const;
       
    62     
       
    63     void ExternalizeL( RWriteStream& aStream ) const;
       
    64     
       
    65     void InternalizeL( RReadStream& aStream );
       
    66     
       
    67     TBool Equals( const CNcdChildEntity& aObject ) const;
       
    68     
       
    69     TBool IsTransparent() const;
       
    70     
       
    71     void SetTransparent( TBool aTransparent );
       
    72     
       
    73     CNcdNodeFactory::TNcdNodeType NodeType() const;
       
    74     
       
    75     void SetNodeType( CNcdNodeFactory::TNcdNodeType aNodeType );
       
    76     
       
    77 private:
       
    78     CNcdChildEntity( TInt aIndex, TBool aTransparent,
       
    79         CNcdNodeFactory::TNcdNodeType aNodeType );
       
    80     
       
    81     CNcdChildEntity();
       
    82     
       
    83     void ConstructL( const CNcdNodeIdentifier& aIdentifier );
       
    84     
       
    85 private:
       
    86     TInt iIndex;
       
    87     CNcdNodeIdentifier* iIdentifier;
       
    88     TBool iTransparent;
       
    89     CNcdNodeFactory::TNcdNodeType iNodeType;
       
    90     };
       
    91 
       
    92 #endif // C_NCD_CHILD_ENTITY_H