ncdengine/provider/server/inc/ncdnodefolderlink.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 CNcdNodeFolderLink class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_NODE_FOLDER_LINK_H
       
    20 #define NCD_NODE_FOLDER_LINK_H
       
    21 
       
    22 
       
    23 #include "ncdnodelink.h"
       
    24 #include "ncdnodeclassids.h"
       
    25 
       
    26 
       
    27 /**
       
    28  *  CNcdNodeFolderLink ...
       
    29  *  @lib ?library
       
    30  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    31  */
       
    32 class CNcdNodeFolderLink : public CNcdNodeLink
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * NewL
       
    39      *
       
    40      * @param aNode The node that owns this link.
       
    41      * @return CNcdNodeFolderLink* Pointer to the created object 
       
    42      * of this class.
       
    43      */
       
    44     static CNcdNodeFolderLink* NewL( CNcdNode& aNode );
       
    45 
       
    46     /**
       
    47      * NewLC
       
    48      *
       
    49      * @param aNode The node that owns this link.
       
    50      * @return CNcdNodeFolderLink* Pointer to the created object 
       
    51      * of this class.
       
    52      */
       
    53     static CNcdNodeFolderLink* NewLC( CNcdNode& aNode );
       
    54 
       
    55 
       
    56     /**
       
    57      * Destructor
       
    58      */
       
    59     virtual ~CNcdNodeFolderLink();
       
    60 
       
    61 
       
    62     /** 
       
    63      *
       
    64      */
       
    65     TInt ExpectedChildrenCount() const;
       
    66 
       
    67 
       
    68 
       
    69 public: // CNcdNodeLink
       
    70 
       
    71     /**
       
    72      * @see CNcdNodeLink::InternalizeL
       
    73      */
       
    74     virtual void InternalizeL( const MNcdPreminetProtocolEntityRef& aData,
       
    75                                const CNcdNodeIdentifier& aParentIdentifier,
       
    76                                const CNcdNodeIdentifier& aRequestParentIdentifier,
       
    77                                const TUid& aClientUid );
       
    78 
       
    79 
       
    80     /**
       
    81      * @see CNcdNodeLink::ExternalizeL
       
    82      */
       
    83     virtual void ExternalizeL( RWriteStream& aStream );
       
    84 
       
    85 
       
    86     /**
       
    87      * @see CNcdNodeLink::InternalizeL
       
    88      */
       
    89     virtual void InternalizeL( RReadStream& aStream );
       
    90 
       
    91 
       
    92 protected:
       
    93 
       
    94     /**
       
    95      * Constructor
       
    96      */
       
    97     CNcdNodeFolderLink( CNcdNode& aNode,
       
    98                         NcdNodeClassIds::TNcdNodeClassId aClassId = NcdNodeClassIds::ENcdFolderNodeLinkClassId );
       
    99 
       
   100     /**
       
   101      * ConstructL
       
   102      */
       
   103     virtual void ConstructL();
       
   104     
       
   105     /**
       
   106      * This function overrides or adds functionality to the parent class
       
   107      */
       
   108     virtual void ExternalizeDataForRequestL( RWriteStream& aStream ) const;
       
   109 
       
   110 
       
   111 private:
       
   112 
       
   113     // Prevent these two if they are not implemented
       
   114     CNcdNodeFolderLink( const CNcdNodeFolderLink& aObject );
       
   115     CNcdNodeFolderLink& operator =( const CNcdNodeFolderLink& aObject );
       
   116 
       
   117 
       
   118 private: // data
       
   119 
       
   120     // This number informs the total number of children that exists in
       
   121     // the server side.
       
   122     // Not all of them are necessarily inserted to the folder.
       
   123     // For example if amount of children is restricted when data is
       
   124     // downloaded (this may be the case for example when paging has been
       
   125     // done). iChildrenLinks count and iExpectedChildrenCount can be
       
   126     // compared when checking if all the links have been downloaded.
       
   127     TInt iExpectedChildrenCount;
       
   128     };
       
   129 
       
   130 
       
   131 #endif // NCD_NODE_LINK_H