author | jjkang |
Fri, 11 Jun 2010 15:22:09 +0800 | |
changeset 2 | 806186ab5e14 |
parent 1 | 0a7b44b10206 |
permissions | -rw-r--r-- |
1
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
2 | 4 |
// under the terms of the License "Eclipse Public License v1.0" |
1
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
2 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
1
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
7 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
10 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
12 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
14 |
// f32\sfsrv\cl_entry.cpp |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
15 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
16 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
17 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
18 |
#include "cl_std.h" |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
19 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
20 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
21 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
22 |
Default constructor. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
23 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
24 |
EXPORT_C TVolumeInfo::TVolumeInfo() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
25 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
26 |
Mem::FillZ(this, sizeof(TVolumeInfo)); //-- zero-fill itself |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
27 |
new(&iName)TBufC<KMaxFileName>; //-- initialise broken descriptor |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
28 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
29 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
30 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
31 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
32 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
33 |
EXPORT_C TBool TEntry::IsReadOnly() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
34 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
35 |
Tests whether the file or directory is read-only. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
36 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
37 |
@return ETrue if entry is read-only, EFalse if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
38 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
39 |
@see KEntryAttReadOnly |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
40 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
41 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
42 |
return(iAtt&KEntryAttReadOnly); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
43 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
44 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
45 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
46 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
47 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
48 |
EXPORT_C TBool TEntry::IsHidden() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
49 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
50 |
Tests whether the file or directory is hidden. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
51 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
52 |
@return ETrue if entry is hidden, EFalse if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
53 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
54 |
@see KEntryAttHidden |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
55 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
56 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
57 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
58 |
return(iAtt&KEntryAttHidden); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
59 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
60 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
61 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
62 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
63 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
64 |
EXPORT_C TBool TEntry::IsSystem() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
65 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
66 |
Tests whether the file or directory has the system attribute set. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
67 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
68 |
@return ETrue if entry is a system entry, EFalse if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
69 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
70 |
@see KEntryAttSystem |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
71 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
72 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
73 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
74 |
return(iAtt&KEntryAttSystem); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
75 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
76 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
77 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
78 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
79 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
80 |
EXPORT_C TBool TEntry::IsDir() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
81 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
82 |
Tests whether the entry is a directory. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
83 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
84 |
@return ETrue if entry indicates a directory, EFalse if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
85 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
86 |
@see KEntryAttDir |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
87 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
88 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
89 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
90 |
return(iAtt&KEntryAttDir); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
91 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
92 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
93 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
94 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
95 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
96 |
EXPORT_C TBool TEntry::IsArchive() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
97 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
98 |
Tests whether the file is an archive file. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
99 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
100 |
@return ETrue if file is archive, EFalse if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
101 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
102 |
@see KEntryAttArchive |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
103 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
104 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
105 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
106 |
return(iAtt&KEntryAttArchive); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
107 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
108 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
109 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
110 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
111 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
112 |
EXPORT_C TEntryArray::TEntryArray() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
113 |
: iCount(0) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
114 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
115 |
Default constructor. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
116 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
117 |
Initialises its count of contained TEntry objects to zero. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
118 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
119 |
{} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
120 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
121 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
122 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
123 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
124 |
EXPORT_C TInt TEntryArray::Count() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
125 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
126 |
Gets the number of entries in the array. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
127 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
128 |
@return The number of entries in the array. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
129 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
130 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
131 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
132 |
if (iCount==KCountNeeded) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
133 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
134 |
const TEntry* pE=(const TEntry*)iBuf.Ptr(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
135 |
const TEntry* pEnd=PtrAdd(pE,iBuf.Length()); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
136 |
TInt c=0; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
137 |
while (pE<pEnd) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
138 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
139 |
c++; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
140 |
pE=PtrAdd(pE,Align4(EntrySize(*pE))); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
141 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
142 |
TEntryArray& me=(TEntryArray& )(*this); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
143 |
me.iCount=c; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
144 |
me.iIndex=0; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
145 |
me.iPos=(const TEntry*)iBuf.Ptr(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
146 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
147 |
return(iCount); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
148 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
149 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
150 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
151 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
152 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
153 |
EXPORT_C const TEntry& TEntryArray::operator[](TInt anIndex) const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
154 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
155 |
Gets the directory entry at the specified index. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
156 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
157 |
@param anIndex Index of the entry within the array. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
158 |
This value is relative to zero. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
159 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
160 |
@return On return contains the entry at the specified index. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
161 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
162 |
@panic FSCLIENT 22 if anIndex is greater than or equal to the number |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
163 |
of elements in the array. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
164 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
165 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
166 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
167 |
__ASSERT_ALWAYS(anIndex<Count(),Panic(EEntryArrayBadIndex)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
168 |
const TEntry* pE=iPos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
169 |
TInt ix=iIndex; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
170 |
if (anIndex<ix) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
171 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
172 |
ix=0; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
173 |
pE=(const TEntry*)iBuf.Ptr(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
174 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
175 |
while (ix<anIndex) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
176 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
177 |
pE=PtrAdd(pE,Align4(EntrySize(*pE))); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
178 |
ix++; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
179 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
180 |
TEntryArray& me=(TEntryArray& )(*this); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
181 |
me.iIndex=ix; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
182 |
me.iPos=pE; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
183 |
return(*pE); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
184 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
185 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
186 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
187 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
188 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
189 |
EXPORT_C TEntry::TEntry() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
190 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
191 |
Default constructor. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
192 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
193 |
{} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
194 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
195 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
196 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
197 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
198 |
EXPORT_C TEntry::TEntry(const TEntry& aEntry) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
199 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
200 |
Copy constructor. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
201 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
202 |
@param aEntry The TEntry object to be copied. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
203 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
204 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
205 |
Mem::Copy(this,&aEntry,EntrySize(aEntry)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
206 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
207 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
208 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
209 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
210 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
211 |
EXPORT_C TEntry& TEntry::operator=(const TEntry& aEntry) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
212 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
213 |
Assignment operator. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
214 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
215 |
@param aEntry The TEntry object to be copied to this TEntry object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
216 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
217 |
@return A reference to this TEntry object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
218 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
219 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
220 |
if(this!=&aEntry) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
221 |
Mem::Copy(this,&aEntry,EntrySize(aEntry)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
222 |
return(*this); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
223 |
} |