userlibandfileserver/fileserver/sfat/sl_leafdir_cache.inl
changeset 9 96e5fb8b040d
equal deleted inserted replaced
-1:000000000000 9:96e5fb8b040d
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // f32\sfat32\inc\sl_leafdir_cache.inl
       
    15 // 
       
    16 //
       
    17 
       
    18 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       
    19 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       
    20 //!!
       
    21 //!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
       
    22 //!!
       
    23 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       
    24 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       
    25 
       
    26 
       
    27 /**
       
    28  @file
       
    29  @internalTechnology
       
    30  
       
    31  Overloaded == operator 
       
    32  
       
    33  @param aDirPos the position to compare
       
    34  @return    EFalse  if aDirPos matches self, else
       
    35  ETrue
       
    36 */
       
    37 TBool TLeafDirData::operator==(const TLeafDirData &aDirPos) const
       
    38     {
       
    39     return (aDirPos.iClusterNum == iClusterNum);
       
    40     }
       
    41 
       
    42 /**
       
    43 Overloaded != operator 
       
    44 
       
    45 @param  aDirPos the position to compare
       
    46 @return EFlase  if aDirPos matches self, else
       
    47         ETrue
       
    48 */
       
    49 TBool TLeafDirData::operator!=(const TLeafDirData &aDirPos) const 
       
    50     {
       
    51     return (aDirPos.iClusterNum != iClusterNum);
       
    52     }
       
    53 
       
    54 /**
       
    55 'Get' function to retrieve the 'parent' node
       
    56 
       
    57 @return the parent node   
       
    58 */
       
    59 CLeafDirTreeNode* CLeafDirTreeNode::Parent()
       
    60     {
       
    61     return iParent;
       
    62     }
       
    63 
       
    64 /**
       
    65 Set Parent node
       
    66 
       
    67 @param  the parent node to be set   
       
    68 */
       
    69 void CLeafDirTreeNode::SetParent(CLeafDirTreeNode* aNode)
       
    70     {
       
    71     iParent = aNode;
       
    72     }
       
    73 
       
    74 /**
       
    75 'Get' function to retrieve children nodes
       
    76 
       
    77 @return the children nodes   
       
    78 */
       
    79 RPointerArray<CLeafDirTreeNode>& CLeafDirTreeNode::Children()
       
    80     {
       
    81     return iChildren;
       
    82     }
       
    83 
       
    84 /**
       
    85 'Get' function to retrieve dir location store by this node 
       
    86 
       
    87 @return the location of the directory
       
    88 */
       
    89 TUint32 CLeafDirTreeNode::StartClusterNum() const
       
    90     {
       
    91     return iLeafDirData.iClusterNum;
       
    92     }
       
    93 
       
    94 const TLeafDirData& CLeafDirTreeNode::LeafDirData() const
       
    95     {
       
    96     return iLeafDirData;
       
    97     }
       
    98 
       
    99 /**
       
   100 Set position of the direcotry this node represents.
       
   101 
       
   102 @param  aDirPos the position to be set
       
   103 */
       
   104 void CLeafDirTreeNode::SetLeafDirData(const TLeafDirData& aLeafDirData)
       
   105     {
       
   106     iLeafDirData = aLeafDirData;
       
   107     }
       
   108 
       
   109 /**
       
   110 'Get' function to retrieve dir path store by this node 
       
   111 
       
   112 @return the path of the directory
       
   113 */
       
   114 const TDesC& CLeafDirTreeNode::Path() const
       
   115     {
       
   116     return iPath;
       
   117     }
       
   118 
       
   119 /**
       
   120 Test if self is ERoot type
       
   121 
       
   122 @return ETrue if self is ERoot
       
   123         EFalse  if self is of other types
       
   124 */
       
   125 TBool CLeafDirTreeNode::IsRoot() const 
       
   126     {
       
   127     return (iNodeType == ERoot);
       
   128     }
       
   129 
       
   130 /**
       
   131 Test if self is ELeaf type
       
   132 
       
   133 @return ETrue if self is ELeaf
       
   134         EFalse  if self is of other types
       
   135 */
       
   136 TBool CLeafDirTreeNode::IsLeaf() 
       
   137     {
       
   138     return (iNodeType == ELeaf);
       
   139     }
       
   140 
       
   141 /**
       
   142 Test if self is ELeafIntermediary type
       
   143 
       
   144 @return ETrue if self is ELeafIntermediary
       
   145         EFalse  if self is of other types
       
   146 */
       
   147 TBool CLeafDirTreeNode::IsLeafIntermediary() 
       
   148     {
       
   149     return (iNodeType == ELeafIntermediary);
       
   150     }
       
   151 
       
   152 /**
       
   153 Test if self is EPureIntermediary type
       
   154 
       
   155 @return ETrue if self is EPureIntermediary
       
   156         EFalse  if self is of other types
       
   157 */
       
   158 TBool CLeafDirTreeNode::IsPureIntermediary() 
       
   159     {
       
   160     return (iNodeType == EPureIntermediary);
       
   161     }
       
   162