1 f32file.inl |
1 // Copyright (c) 1996-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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // f32\inc\f32file.inl |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // Class TEntry |
|
22 inline const TUid& TEntry::operator[](TInt anIndex) const |
|
23 /** |
|
24 Gets any one of the file's three UIDs. |
|
25 |
|
26 @param anIndex Identifies the UID required. This can be zero, one or |
|
27 two. Specifiying any other value raises a panic. |
|
28 |
|
29 @return On return, contains the requested UID. |
|
30 |
|
31 @see TUidType |
|
32 */ |
|
33 {return(iType[anIndex]);} |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 inline TBool TEntry::IsUidPresent(TUid aUid) const |
|
39 /** |
|
40 Tests whether the specified UID matches any of the UIDs in the UID type. |
|
41 |
|
42 @param aUid The UID to be checked. |
|
43 |
|
44 @return True if the specified UID is present, false otherwise. |
|
45 |
|
46 @see TUidType::IsPresent |
|
47 @see TUidType |
|
48 */ |
|
49 {return(iType.IsPresent(aUid));} |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 inline TBool TEntry::IsTypeValid() const |
|
55 /** |
|
56 Test whether the file has a valid UID. |
|
57 |
|
58 @return True if the entry has a valid UID, false otherwise. |
|
59 |
|
60 @see TUidType::IsValid |
|
61 @see TUidType |
|
62 */ |
|
63 {return(iType.IsValid());} |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 inline TUid TEntry::MostDerivedUid() const |
|
69 /** |
|
70 Gets the most derived (i.e. the most specific) UID. |
|
71 |
|
72 @return The entry's most derived UID. |
|
73 |
|
74 @see TUidType::MostDerived |
|
75 @see TUidType |
|
76 */ |
|
77 {return(iType.MostDerived());} |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 // Returns the entire size of the TEntry... |
|
83 inline TInt EntrySize(const TEntry& anEntry) |
|
84 {return(sizeof(TUint)+sizeof(TInt)+sizeof(TTime)+sizeof(TInt)+sizeof(TUidType)+anEntry.iName.Size());} |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 // Class TFindFile |
|
90 inline const TDesC& TFindFile::File() const |
|
91 /** |
|
92 Gets the full file specification of a file which was found by a successful |
|
93 call to any of the search variants that do not accept wildcards. |
|
94 |
|
95 The file specification includes drive, path and filename. |
|
96 |
|
97 Notes: |
|
98 |
|
99 1. When called after a successful search using wildcards the only valid |
|
100 components of the retrieved file specification are drive letter and |
|
101 directory. |
|
102 |
|
103 @return The full path and filename. |
|
104 */ |
|
105 {return iFile.FullName();} |
|
106 |
|
107 |
|
108 |
|
109 // Class CDirScan |
|
110 inline RFs& CDirScan::Fs() |
|
111 {return(*iFs);} |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 // Class TDriveUnit |
|
117 inline TDriveUnit::operator TInt() const |
|
118 /** |
|
119 Converts the drive unit to an integer value. |
|
120 */ |
|
121 {return(iDrive);} |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 inline TInt ValidateMatchMask( TUint aMask) |
|
127 /** |
|
128 Validates the mask used to match drive attributes. |
|
129 */ |
|
130 { |
|
131 const TUint matchedFlags= aMask & KDriveAttMatchedFlags; //KDriveAttMatchedFlags = 0xFFF |
|
132 const TUint matchedAtt = aMask & KDriveAttMatchedAtt; //KDriveAttMatchedAtt = 0x0FFF0000 |
|
133 |
|
134 |
|
135 switch(matchedAtt) |
|
136 { |
|
137 |
|
138 case KDriveAttExclude: |
|
139 return matchedFlags==0?KErrArgument:KErrNone; |
|
140 |
|
141 |
|
142 case KDriveAttExclusive : |
|
143 return matchedFlags==0?KErrArgument:KErrNone; |
|
144 |
|
145 |
|
146 case KDriveAttExclude | KDriveAttExclusive: |
|
147 return matchedFlags==0?KErrArgument:KErrNone; |
|
148 |
|
149 |
|
150 case KDriveAttAll: |
|
151 return matchedFlags==0?KErrNone:KErrArgument; |
|
152 |
|
153 case 0: |
|
154 return KErrNone; |
|
155 |
|
156 default: |
|
157 return KErrArgument; |
|
158 |
|
159 } |
|
160 |
|
161 |
|
162 } |