|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // File contains local functions for use by the TUriC classes defined in |
|
15 // Uri8.h and Uri16.h. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file TUriCInternal.h |
|
21 @see Uri8.h, Uri16.h |
|
22 */ |
|
23 |
|
24 #ifndef __TURICINTERNAL_H__ |
|
25 #define __TURICINTERNAL_H__ |
|
26 |
|
27 // System includes |
|
28 // |
|
29 #include <e32base.h> |
|
30 |
|
31 // Constants |
|
32 // |
|
33 const TInt KPlusChar = '+'; |
|
34 const TInt KMinusChar = '-'; |
|
35 const TInt KPeriodChar = '.'; |
|
36 |
|
37 //File URI Constants |
|
38 // |
|
39 _LIT(KPrivate, "private/"); |
|
40 _LIT(KExtMedia, "ext-media/"); |
|
41 _LIT8(KFileUriScheme8, "file"); |
|
42 _LIT(KFileUriScheme16, "file"); |
|
43 _LIT(KDefaultPath,"C:\\"); |
|
44 |
|
45 const TInt KDriveSeparator = ':'; |
|
46 const TInt KUriPathSeparator = '/'; |
|
47 const TInt KFilePathSeparator = '\\'; |
|
48 |
|
49 |
|
50 |
|
51 template<class TPtrCType> |
|
52 LOCAL_C TBool HasValidSchemeChars(const TPtrCType& aScheme); |
|
53 |
|
54 HBufC8* CreateUri8LC(const TDesC16& aBuf16); |
|
55 |
|
56 TInt DoValidate(const TUriC8& aUri); |
|
57 |
|
58 TInt DoEquivalenceL(const TUriC8& aLhs, const TUriC8& aRhs); |
|
59 |
|
60 void ChangePathSeparator(TDes& aDesPtr, TUint aPathSeperatorFrom, TUint aPathSeperatorTo); |
|
61 |
|
62 HBufC* GetFullFileNameFromFileUriPathL(const TDesC& aFileUriPath); |
|
63 HBufC* ResolveFileNameL(const TDesC8& aPath, TUriFileName aType, TBool aIsFileUri); |
|
64 void GetFileComponent(TPtrC& aNewName, const TDesC& aOldName, TUriFileName aType ); |
|
65 |
|
66 |
|
67 #endif // __TURICINTERNAL_H__ |