ncdengine/provider/client/inc/ncdnodedependencyinfoimpl.h
changeset 4 32704c33136d
equal deleted inserted replaced
-1:000000000000 4:32704c33136d
       
     1 /*
       
     2 * Copyright (c) 2006-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:   CNcdNodeDependencyInfo
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_NODE_DEPENDENCY_INFO_IMPL
       
    20 #define NCD_NODE_DEPENDENCY_INFO_IMPL
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32cmn.h>
       
    25 
       
    26 #include "ncdnodedependencyinfo.h"
       
    27 
       
    28 class CNcdNodeIdentifier;
       
    29 class CNcdDependencyInfo;
       
    30 class CNcdNodeManagerProxy;
       
    31 
       
    32 
       
    33 /**
       
    34  *  This class provides functions to get information about dependency
       
    35  *  nodes or dependency content.
       
    36  */
       
    37 class CNcdNodeDependencyInfo: public CBase,
       
    38                               public MNcdNodeDependencyInfo
       
    39 {
       
    40 public:
       
    41 
       
    42     /** 
       
    43      * @see CNcdNodeDependencyInfo::CNcdNodeDependencyInfo   
       
    44      * @see CNcdNodeDependencyInfo::ConstructL
       
    45      */
       
    46     static CNcdNodeDependencyInfo* NewL( const CNcdDependencyInfo& aInfo,
       
    47                                          CNcdNodeManagerProxy& aNodeManager ); 
       
    48     
       
    49     /**
       
    50      * @see CNcdDependencyInfo::NewL
       
    51      */
       
    52     static CNcdNodeDependencyInfo* NewLC( const CNcdDependencyInfo& aInfo,
       
    53                                           CNcdNodeManagerProxy& aNodeManager );
       
    54 
       
    55 
       
    56     /**
       
    57      * Destructor
       
    58      */
       
    59     ~CNcdNodeDependencyInfo();
       
    60 
       
    61 
       
    62 public: // MNcdNodeDependencyInfo
       
    63     /** 
       
    64      * @see MNcdNodeDependencyInfo::Name
       
    65      */
       
    66     virtual const TDesC& Name() const;
       
    67 
       
    68     /** 
       
    69      * @see MNcdNodeDependencyInfo::Version
       
    70      */
       
    71     virtual const TDesC& Version() const;
       
    72     
       
    73     /** 
       
    74      * @see MNcdNodeDependencyInfo::Uid
       
    75      */
       
    76     virtual TUid Uid() const;
       
    77 
       
    78     /** 
       
    79      * @see MNcdNodeDependencyInfo::DependencyNodeL
       
    80      */
       
    81     virtual MNcdNode* DependencyNodeL() const;
       
    82     
       
    83 
       
    84     /** 
       
    85      * @see MNcdNodeDependencyInfo::State
       
    86      */
       
    87     virtual TNcdDependencyState State() const;
       
    88 
       
    89 public: // new methods
       
    90 
       
    91     /** 
       
    92      * return const CNcdNodeIdentifier* Identifier of the metadata that
       
    93      * will provide the dependency content. If an identifier has not
       
    94      * been set, then NULL is returned. Ownership is NOT transferred.
       
    95      */
       
    96     const CNcdNodeIdentifier* Identifier() const;
       
    97     
       
    98     
       
    99 protected:
       
   100     /** 
       
   101      * Constructor
       
   102      *
       
   103      * @param aNodeManager Node manager is used to create the node.
       
   104      */
       
   105     CNcdNodeDependencyInfo( CNcdNodeManagerProxy& aNodeManager );
       
   106     
       
   107     /** 
       
   108      * ConstructL
       
   109      *
       
   110      * @note If this function leaves, then the node identifier will be
       
   111      * deleted.
       
   112      * 
       
   113      * @param aInfo Dependency information that is used to internalize
       
   114      * this class object.
       
   115      */
       
   116     void ConstructL( const CNcdDependencyInfo& aInfo );
       
   117 
       
   118 
       
   119     /**
       
   120      * @return CNcdNodeManageraProxy& Can be used to create nodes.
       
   121      */
       
   122     CNcdNodeManagerProxy& NodeManager() const;
       
   123     
       
   124 
       
   125 private:
       
   126     CNcdNodeDependencyInfo( const CNcdNodeDependencyInfo& aObject );
       
   127     CNcdNodeDependencyInfo& operator =( const CNcdNodeDependencyInfo& aObject );
       
   128 
       
   129 private: // data
       
   130 
       
   131     // Name of the dependency content
       
   132     HBufC* iName;
       
   133     // Version of the dependency content
       
   134     HBufC* iVersion;
       
   135     // Uid of the dependency content
       
   136     TUid iUid;
       
   137     // Identifier of the metadata that will provide the
       
   138     // dependency content.
       
   139     CNcdNodeIdentifier* iIdentifier;
       
   140 
       
   141     CNcdNodeManagerProxy& iNodeManager;
       
   142 
       
   143     // State of the dependency
       
   144     TNcdDependencyState iDependencyState;
       
   145 };
       
   146 
       
   147 #endif // NCD_NODE_DEPENDENCY_INFO_IMPL