First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // File contains local functions for use by the TUriC classes defined in
15 // Uri8.h and Uri16.h.
24 #ifndef __TURICINTERNAL_H__
25 #define __TURICINTERNAL_H__
33 const TInt KPlusChar = '+';
34 const TInt KMinusChar = '-';
35 const TInt KPeriodChar = '.';
39 _LIT(KPrivate, "private/");
40 _LIT(KExtMedia, "ext-media/");
41 _LIT8(KFileUriScheme8, "file");
42 _LIT(KFileUriScheme16, "file");
43 _LIT(KDefaultPath,"C:\\");
45 const TInt KDriveSeparator = ':';
46 const TInt KUriPathSeparator = '/';
47 const TInt KFilePathSeparator = '\\';
51 template<class TPtrCType>
52 LOCAL_C TBool HasValidSchemeChars(const TPtrCType& aScheme);
54 HBufC8* CreateUri8LC(const TDesC16& aBuf16);
56 TInt DoValidate(const TUriC8& aUri);
58 TInt DoEquivalenceL(const TUriC8& aLhs, const TUriC8& aRhs);
60 void ChangePathSeparator(TDes& aDesPtr, TUint aPathSeperatorFrom, TUint aPathSeperatorTo);
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 );
67 #endif // __TURICINTERNAL_H__