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_parse.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 |
const TInt KLexComponents=4; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
21 |
const TInt KLexNames=3; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
22 |
|
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 |
|
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 |
EXPORT_C TParseBase::TParseBase() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
27 |
: iWild(0) |
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 |
Default constructor. |
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 |
Mem::FillZ(&iField[0],sizeof(iField)); |
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 |
|
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 |
|
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 |
TInt TParseBase::ParseDrive(TLex& aName,TBool& aDone) |
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 |
// Parse the drive name. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
42 |
// |
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 |
TPtrC d=aName.RemainderFromMark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
46 |
if (d.Length()<2 || d[1]!=KDriveDelimiter) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
47 |
return(KErrNone); //must be Drive delimeter and longer that tow to be valid drive |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
48 |
TCharF c=d[0]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
49 |
if (!c.IsAlpha()) //must be alphaber letter |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
50 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
51 |
if (!aDone) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
52 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
53 |
if(iMod) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
54 |
NameBuf()+=d.Left(2); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
55 |
aDone=ETrue; |
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 |
aName.SkipAndMark(2); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
58 |
return(KErrNone); |
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 |
TInt TParseBase::ParsePath(TLex& aName,TBool& aDone) |
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 |
// Parse the path. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
64 |
// |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
67 |
TPtrC d=aName.RemainderFromMark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
68 |
if (d.Length() && d[0]!=KPathDelimiter) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
69 |
return(KErrNone); // Require first char of path to be a '\' |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
70 |
TInt n=d.LocateReverse(KPathDelimiter)+1; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
71 |
if (n && !aDone) |
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 |
if(iMod) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
74 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
75 |
if (NameBuf().Length()+n>KMaxFileName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
76 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
77 |
NameBuf()+=d.Left(n); |
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 |
aDone=ETrue; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
80 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
81 |
aName.SkipAndMark(n); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
82 |
return(KErrNone); |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
85 |
LOCAL_C TBool IsSpace(const TDesC& aDes) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
86 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
87 |
// Returns ETrue if aDes only contains spaces or is zero length |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
91 |
TInt len=aDes.Length(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
92 |
for (TInt i=0;i<len;i++) |
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 |
TChar txt=aDes[i]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
95 |
if (!txt.IsSpace()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
96 |
return(EFalse); |
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 |
return(ETrue); |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
101 |
TInt TParseBase::ParseName(TLex& aName,TBool& aDone) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
102 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
103 |
// Parse the name. |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
107 |
TPtrC d=aName.RemainderFromMark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
108 |
if (d.Locate(KPathDelimiter)!=KErrNotFound) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
109 |
return(KErrBadName); // Illegal name - filenames cannot contain a '\' |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
110 |
TInt n=d.LocateReverse(KExtDelimiter); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
111 |
if (n==KErrNotFound) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
112 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
113 |
n=d.Length(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
114 |
if (IsSpace(d.Left(n))) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
115 |
return(KErrNone); |
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 |
TPtrC v=d.Left(n); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
118 |
if (n && !aDone) |
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 |
if (v.Locate(KMatchOne)!=KErrNotFound) // Found ? in the name |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
121 |
iWild|=(EWildName|EWildEither|EWildIsKMatchOne); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
122 |
if (v.Locate(KMatchAny)!=KErrNotFound) // Found * in the name |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
123 |
iWild|=(EWildName|EWildEither|EWildIsKMatchAny); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
124 |
if(iMod) |
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 |
if (NameBuf().Length()+n>KMaxFileName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
127 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
128 |
NameBuf()+=v; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
129 |
if (n==d.Length()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
130 |
NameBuf().TrimRight(); |
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 |
aDone=ETrue; |
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 |
aName.SkipAndMark(n); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
135 |
return(KErrNone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
136 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
137 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
138 |
TInt TParseBase::ParseExt(TLex& aName,TBool& aDone) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
139 |
// |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
140 |
// Parse the extension. |
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 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
143 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
144 |
TPtrC d=aName.RemainderFromMark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
145 |
if (d.Length() && !IsSpace(d) && !aDone) |
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 |
if (d.Locate(KMatchOne)!=KErrNotFound || d.Locate(KMatchAny)!=KErrNotFound) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
148 |
iWild|=(EWildExt|EWildEither); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
149 |
if(iMod) |
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 |
if (NameBuf().Length()+d.Length()>KMaxFileName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
152 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
153 |
NameBuf()+=d; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
154 |
NameBuf().TrimRight(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
155 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
156 |
else |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
157 |
aName.SkipAndMark(d.Length()); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
158 |
aDone=ETrue; |
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(KErrNone); |
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 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
163 |
TInt TParseBase::Set(const TDesC* aName,const TDesC* aRelated,const TDesC* aDefault,TBool allowWild) |
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 |
// Parse a name. Optionally allow wild cards. |
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 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
168 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
169 |
TInt (TParseBase::*parse[KLexComponents])(TLex& aName,TBool& aDone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
170 |
parse[0]=&TParseBase::ParseDrive; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
171 |
parse[1]=&TParseBase::ParsePath; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
172 |
parse[2]=&TParseBase::ParseName; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
173 |
parse[3]=&TParseBase::ParseExt; |
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 |
iWild=0; |
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 |
Mem::FillZ(&iField[0],sizeof(iField)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
178 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
179 |
TLex name(*aName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
180 |
TLex def; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
181 |
TLex rel; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
182 |
TInt lexnames; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
183 |
if(iMod) |
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 |
if (aRelated) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
186 |
rel=(*aRelated); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
187 |
if (aDefault) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
188 |
def=(*aDefault); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
189 |
NameBuf().Zero(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
190 |
lexnames = KLexNames; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
191 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
192 |
else |
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 |
lexnames = 1; |
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 |
TLex* lex[KLexNames]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
198 |
lex[0]=(&name); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
199 |
lex[1]=(&rel); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
200 |
lex[2]=(&def); |
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 |
name.Mark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
203 |
rel.Mark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
204 |
def.Mark(); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
205 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
206 |
TInt r; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
207 |
TInt pos=0; |
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 |
for (TInt i=0;i<KLexComponents;i++) |
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 |
TBool done=EFalse; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
212 |
for (TInt j=0;j<lexnames;j++) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
213 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
214 |
if ((r=(this->*parse[i])(*lex[j],done))<KErrNone) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
215 |
return(r); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
216 |
if (j==0 && done) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
217 |
iField[i].present=ETrue; |
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 |
TInt len; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
220 |
if(iMod) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
221 |
len=NameBuf().Length()-pos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
222 |
else |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
223 |
len=name.MarkedOffset()-pos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
224 |
iField[i].len=(TUint8)len; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
225 |
iField[i].pos=(TUint8)pos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
226 |
pos+=len; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
227 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
228 |
if (!allowWild && iWild) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
229 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
230 |
if (iField[EPath].len==1) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
231 |
iWild|=EIsRoot; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
232 |
return(KErrNone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
233 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
234 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
235 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
236 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
237 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
238 |
EXPORT_C TInt TParseBase::PopDir() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
239 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
240 |
Removes the last directory from the path in the fully parsed specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
241 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
242 |
This function may be used to navigate up one level in a directory hierarchy. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
243 |
An error is returned if the specified directory is the root. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
244 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
245 |
@return KErrNone if successful, otherwise one of the other system-wide error |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
246 |
codes. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
247 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
248 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
249 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
250 |
if (IsRoot()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
251 |
return(KErrGeneral); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
252 |
TInt len; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
253 |
if (iField[EName].pos==0 && NameBuf().Length()==256) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
254 |
len=256; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
255 |
else |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
256 |
len=iField[EName].pos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
257 |
TPtrC p(NameBuf().Ptr(),len-1); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
258 |
TInt pos=p.LocateReverse(KPathDelimiter)+1; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
259 |
len-=pos; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
260 |
NameBuf().Delete(pos,len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
261 |
iField[EName].pos=(TUint8)(iField[EName].pos-len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
262 |
iField[EExt].pos=(TUint8)(iField[EExt].pos-len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
263 |
iField[EPath].len=(TUint8)(iField[EPath].len-len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
264 |
if (iField[EPath].len==1) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
265 |
iWild|=EIsRoot; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
266 |
return(KErrNone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
267 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
268 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
269 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
270 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
271 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
272 |
EXPORT_C TInt TParseBase::AddDir(const TDesC& aName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
273 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
274 |
Adds a single directory onto the end of the path in |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
275 |
the fully parsed specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
276 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
277 |
The directory is inserted between the final directory, and the filename, if |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
278 |
there is one. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
279 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
280 |
@param aName The directory to be added. It must not start with a \\ otherwise |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
281 |
the function does not recognise it as a valid directory name |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
282 |
and an error is returned. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
283 |
The directory name must not end with a \\ since the function |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
284 |
adds this automatically. It must not exceed the maximum |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
285 |
filename length, KMaxFileName characters, otherwise an error |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
286 |
is returned. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
287 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
288 |
@return KErrNone if successful, otherwise another of the system-wide error |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
289 |
codes. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
290 |
@see KMaxFileName |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
291 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
292 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
293 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
294 |
if (aName.Length()==0) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
295 |
return(KErrNone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
296 |
TInt len=aName.Length()+1; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
297 |
if ((len+NameBuf().Length())>NameBuf().MaxLength()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
298 |
return(KErrGeneral); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
299 |
TInt pos=aName.Locate(KPathDelimiter); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
300 |
if (pos!=KErrNotFound) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
301 |
return(KErrBadName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
302 |
TFileName n=aName; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
303 |
n.Append(KPathDelimiter); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
304 |
NameBuf().Insert(iField[EName].pos,n); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
305 |
iField[EPath].len=(TUint8)(iField[EPath].len+len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
306 |
iField[EName].pos=(TUint8)(iField[EName].pos+len); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
307 |
iField[EExt].pos=(TUint8)(len+iField[EExt].pos); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
308 |
if (IsRoot()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
309 |
iWild&=~EIsRoot; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
310 |
return(KErrNone); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
311 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
312 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
313 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
314 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
315 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
316 |
EXPORT_C const TDesC& TParseBase::FullName() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
317 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
318 |
Gets the complete file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
319 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
320 |
This is in the form: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
321 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
322 |
drive-letter: \\path\\filename.extension |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
323 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
324 |
@return The fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
325 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
326 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
327 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
328 |
return(NameBufC()); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
329 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
330 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
331 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
332 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
333 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
334 |
EXPORT_C TPtrC TParseBase::Drive() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
335 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
336 |
Gets the drive letter. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
337 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
338 |
The drive letter is in the form: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
339 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
340 |
drive-letter: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
341 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
342 |
Note that the drive letter is folded. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
343 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
344 |
@return The drive letter and colon. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
345 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
346 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
347 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
348 |
const SField& f=iField[EDrive]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
349 |
return(NameBufC().Mid(f.pos,f.len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
350 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
351 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
352 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
353 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
354 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
355 |
EXPORT_C TPtrC TParseBase::Path() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
356 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
357 |
Gets the path. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
358 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
359 |
The path is in the form: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
360 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
361 |
\\path\\ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
362 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
363 |
@return The path. It always begins and ends in a backslash. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
364 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
365 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
366 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
367 |
const SField& f=iField[EPath]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
368 |
return(NameBufC().Mid(f.pos,f.len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
369 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
370 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
371 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
372 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
373 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
374 |
EXPORT_C TPtrC TParseBase::DriveAndPath() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
375 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
376 |
Gets the drive letter and path. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
377 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
378 |
This is in the form |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
379 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
380 |
drive-letter:\\path\\ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
381 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
382 |
Note that the drive letter is folded |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
383 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
384 |
@return The drive and path. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
385 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
386 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
387 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
388 |
const SField& f=iField[EDrive]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
389 |
return(NameBufC().Mid(f.pos,f.len+iField[EPath].len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
390 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
391 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
392 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
393 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
394 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
395 |
EXPORT_C TPtrC TParseBase::Name() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
396 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
397 |
Gets the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
398 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
399 |
This is in the form |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
400 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
401 |
filename |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
402 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
403 |
@return The filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
404 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
405 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
406 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
407 |
const SField& f=iField[EName]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
408 |
return(NameBufC().Mid(f.pos,f.len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
409 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
410 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
411 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
412 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
413 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
414 |
EXPORT_C TPtrC TParseBase::Ext() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
415 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
416 |
Gets the extension. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
417 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
418 |
This is in the form: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
419 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
420 |
.extension |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
421 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
422 |
@return The extension and preceding dot. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
423 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
424 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
425 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
426 |
const SField& f=iField[EExt]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
427 |
return(NameBufC().Mid(f.pos,f.len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
428 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
429 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
430 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
431 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
432 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
433 |
EXPORT_C TPtrC TParseBase::NameAndExt() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
434 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
435 |
Gets the filename and extension. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
436 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
437 |
This is in the form: |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
438 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
439 |
filename.ext |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
440 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
441 |
@return The filename and extension. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
442 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
443 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
444 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
445 |
const SField& f=iField[EName]; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
446 |
return(NameBufC().Mid(f.pos,f.len+iField[EExt].len)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
447 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
448 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
449 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
450 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
451 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
452 |
EXPORT_C TBool TParseBase::DrivePresent() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
453 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
454 |
Tests whether a drive is present. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
455 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
456 |
Note that this function refers to a component |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
457 |
in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
458 |
or RFs::Parse(), not to the resulting fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
459 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
460 |
@return True if a drive present, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
461 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
462 |
@see TParse |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
463 |
@see RFs |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
464 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
465 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
466 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
467 |
return(iField[EDrive].present); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
468 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
469 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
470 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
471 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
472 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
473 |
EXPORT_C TBool TParseBase::PathPresent() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
474 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
475 |
Tests whether a path is present. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
476 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
477 |
Note that this function refers to a component |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
478 |
in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
479 |
or RFs::Parse(), not to the resulting fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
480 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
481 |
@return True if a path present, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
482 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
483 |
@see TParse |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
484 |
@see RFs |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
485 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
486 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
487 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
488 |
return(iField[EPath].present); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
489 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
490 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
491 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
492 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
493 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
494 |
EXPORT_C TBool TParseBase::NamePresent() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
495 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
496 |
Tests whether a file name is present. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
497 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
498 |
Note that this function refers to a component |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
499 |
in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
500 |
or RFs::Parse(), not to the resulting fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
501 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
502 |
This function returns true even if the filename specified in aName contains |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
503 |
only wildcards. It only returns false if nothing is specified. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
504 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
505 |
@return True if a name present, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
506 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
507 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
508 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
509 |
return(iField[EName].present); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
510 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
511 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
512 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
513 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
514 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
515 |
EXPORT_C TBool TParseBase::ExtPresent() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
516 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
517 |
Tests whether an extension is present. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
518 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
519 |
Note that this function refers to a component |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
520 |
in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
521 |
or RFs::Parse(), not to the resulting fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
522 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
523 |
This function returns true even if the extension contains only wildcards. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
524 |
It only returns false if nothing is specified. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
525 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
526 |
@return True if an extension present, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
527 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
528 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
529 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
530 |
return(iField[EExt].present); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
531 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
532 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
533 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
534 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
535 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
536 |
EXPORT_C TBool TParseBase::NameOrExtPresent() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
537 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
538 |
Tests whether a filename or an extension are present. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
539 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
540 |
Note that this function refers to a component in the aName argument |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
541 |
specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
542 |
to the resulting fully parsed file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
543 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
544 |
This function returns true even if the filename or extension specified in |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
545 |
aName contain only wildcards. It only returns false if nothing is specified. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
546 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
547 |
@return True if either a name or an extension or both are present, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
548 |
otherwise false. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
549 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
550 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
551 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
552 |
return(iField[EName].present || iField[EExt].present); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
553 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
554 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
555 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
556 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
557 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
558 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
559 |
EXPORT_C TBool TParseBase::IsRoot() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
560 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
561 |
Tests whether the path in the fully parsed specification is the root directory. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
562 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
563 |
@return True if path is root, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
564 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
565 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
566 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
567 |
return(iWild&EIsRoot); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
568 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
569 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
570 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
571 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
572 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
573 |
EXPORT_C TBool TParseBase::IsWild() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
574 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
575 |
Tests whether the filename or the extension in the fully parsed specification |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
576 |
contains one or more wildcard characters. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
577 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
578 |
@return True if wildcards are present, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
579 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
580 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
581 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
582 |
return(iWild&EWildEither); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
583 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
584 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
585 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
586 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
587 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
588 |
EXPORT_C TBool TParseBase::IsKMatchOne() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
589 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
590 |
Tests whether the name or the extension contains a question mark wildcard. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
591 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
592 |
@return True if either the name or extension has a ? wild card, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
593 |
false otherwise. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
594 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
595 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
596 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
597 |
return(iWild&EWildIsKMatchOne); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
598 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
599 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
600 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
601 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
602 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
603 |
EXPORT_C TBool TParseBase::IsKMatchAny() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
604 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
605 |
Tests whether the name or the extension contains asterisk wildcards. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
606 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
607 |
@return True if either the name or extension has a * wild card, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
608 |
false otherwise. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
609 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
610 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
611 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
612 |
return(iWild&EWildIsKMatchAny); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
613 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
614 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
615 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
616 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
617 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
618 |
EXPORT_C TBool TParseBase::IsNameWild() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
619 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
620 |
Tests whether the filename in the fully parsed specification contains one or |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
621 |
more wildcard characters. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
622 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
623 |
@return True if the filename contains wildcard characters, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
624 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
625 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
626 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
627 |
return(iWild&EWildName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
628 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
629 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
630 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
631 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
632 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
633 |
EXPORT_C TBool TParseBase::IsExtWild() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
634 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
635 |
Tests whether the extension in the fully parsed specification contains one |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
636 |
or more wildcard characters. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
637 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
638 |
@return True if the extension contains wildcard characters, false if not. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
639 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
640 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
641 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
642 |
return(iWild&EWildExt); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
643 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
644 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
645 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
646 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
647 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
648 |
EXPORT_C TParse::TParse() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
649 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
650 |
Default constructor. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
651 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
652 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
653 |
iMod=1; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
654 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
655 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
656 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
657 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
658 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
659 |
EXPORT_C TInt TParse::Set(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
660 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
661 |
Parses a file specification, allowing wildcards in the filename and extension. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
662 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
663 |
This function sets up the TParse object so that it can be used to provide |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
664 |
useful information. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
665 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
666 |
@param aName The file specification to be parsed. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
667 |
@param aRelated The related file specification. This is optional, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
668 |
set to NULL to omit. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
669 |
@param aDefault The default file specification. This is optional, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
670 |
set to NULL to omit. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
671 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
672 |
@return KErrNone, if successful, otherwise one of the other system-wide error |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
673 |
codes. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
674 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
675 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
676 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
677 |
return(TParseBase::Set(&aName,aRelated,aDefault,ETrue)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
678 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
679 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
680 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
681 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
682 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
683 |
EXPORT_C TInt TParse::SetNoWild(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
684 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
685 |
Parses a file specification; disallows wildcards in any part of the file name |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
686 |
or extension. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
687 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
688 |
If you need to specify wildcards use Set(). Otherwise, this |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
689 |
function behaves in the same way as Set(). |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
690 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
691 |
@param aName The file specification to be parsed. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
692 |
@param aRelated The related file specification. This is optional, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
693 |
set to NULL to omit. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
694 |
@param aDefault The default file specification. This is optional, |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
695 |
set to NULL to omit. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
696 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
697 |
@return KErrNone, if successful, otherwise one of the other system-wide error |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
698 |
codes. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
699 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
700 |
@see TParse::Set |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
701 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
702 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
703 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
704 |
return(TParseBase::Set(&aName,aRelated,aDefault,EFalse)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
705 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
706 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
707 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
708 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
709 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
710 |
EXPORT_C TDes& TParse::NameBuf() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
711 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
712 |
Gets a reference to the descriptor containing the file specification passed to |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
713 |
the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
714 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
715 |
@return A reference to the descriptor containing the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
716 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
717 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
718 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
719 |
return(iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
720 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
721 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
722 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
723 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
724 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
725 |
EXPORT_C const TDesC& TParse::NameBufC() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
726 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
727 |
Gets a const reference to the descriptor containing the file specification |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
728 |
passed to the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
729 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
730 |
@return A const reference to the descriptor containing the file specification. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
731 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
732 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
733 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
734 |
return(iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
735 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
736 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
737 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
738 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
739 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
740 |
EXPORT_C TParsePtr::TParsePtr(TDes& aName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
741 |
: iNameBuf((TText*)aName.Ptr(),aName.Length(),aName.MaxLength()) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
742 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
743 |
Constructor taking a reference to a filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
744 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
745 |
The specified filename is parsed and if this fails, a panic is raised. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
746 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
747 |
@param aName Reference to the filename to be parsed. On return contains |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
748 |
the fully parsed path specification. If a filename and extension |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
749 |
are specified, they may both contain wildcards. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
750 |
The maximum length is KMaxFileName characters. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
751 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
752 |
@panic FSCLIENT 24 if the the specified name fails to parse. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
753 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
754 |
@see KMaxFileName |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
755 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
756 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
757 |
iMod=1; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
758 |
TInt r=TParseBase::Set(&aName,NULL,NULL,ETrue); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
759 |
__ASSERT_ALWAYS(r==KErrNone,Panic(EParsePtrBadDescriptor0)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
760 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
761 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
762 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
763 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
764 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
765 |
EXPORT_C TDes& TParsePtr::NameBuf() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
766 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
767 |
Gets a reference to the descriptor containing the filename passed to |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
768 |
the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
769 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
770 |
@return A reference to the descriptor containing the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
771 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
772 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
773 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
774 |
return(iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
775 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
776 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
777 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
778 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
779 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
780 |
EXPORT_C const TDesC& TParsePtr::NameBufC() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
781 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
782 |
Gets a const reference to the descriptor containing the filename passed to |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
783 |
the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
784 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
785 |
@return A const reference to the descriptor containing the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
786 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
787 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
788 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
789 |
return(iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
790 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
791 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
792 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
793 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
794 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
795 |
EXPORT_C TParsePtrC::TParsePtrC(const TDesC& aName) |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
796 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
797 |
Constructor taking a constant reference to a filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
798 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
799 |
The filename is parsed and if this fails, a panic is raised. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
800 |
Note that the filename cannot be modified using this class. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
801 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
802 |
@param aName Constant reference to the filename to be parsed. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
803 |
On return contains the fully parsed filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
804 |
If a file and extension are specified, they may both |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
805 |
contain wildcards. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
806 |
The maximum length is KMaxFileName characters. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
807 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
808 |
@panic FSCLIENT 24 if the the specified name fails to parse. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
809 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
810 |
@see KMaxFileName |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
811 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
812 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
813 |
iMod=0; |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
814 |
iNameBuf.Set(aName); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
815 |
TInt r = TParseBase::Set(&aName,NULL,NULL,ETrue); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
816 |
__ASSERT_ALWAYS(r==KErrNone,Panic(EParsePtrBadDescriptor0)); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
817 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
818 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
819 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
820 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
821 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
822 |
EXPORT_C TDes& TParsePtrC::NameBuf() |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
823 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
824 |
Gets a reference to the descriptor containing the filename passed to |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
825 |
the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
826 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
827 |
@return A reference to the descriptor containing the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
828 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
829 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
830 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
831 |
Panic(EParsePtrCAccessError); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
832 |
return(*(TDes*)&iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
833 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
834 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
835 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
836 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
837 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
838 |
EXPORT_C const TDesC& TParsePtrC::NameBufC() const |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
839 |
/** |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
840 |
Gets a const reference to the descriptor containing the filename passed to |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
841 |
the constructor of this object. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
842 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
843 |
@return A const reference to the descriptor containing the filename. |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
844 |
*/ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
845 |
{ |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
846 |
|
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
847 |
return(iNameBuf); |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
848 |
} |
0a7b44b10206
Catch up of Symbian tools for @1627812
Pat Downey <patrick.downey@nokia.com>
parents:
diff
changeset
|
849 |