sl@0: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // File contains local functions for use by the TUriC classes defined in sl@0: // Uri8.h and Uri16.h. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file TUriCInternal.h sl@0: @see Uri8.h, Uri16.h sl@0: */ sl@0: sl@0: #ifndef __TURICINTERNAL_H__ sl@0: #define __TURICINTERNAL_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: sl@0: // Constants sl@0: // sl@0: const TInt KPlusChar = '+'; sl@0: const TInt KMinusChar = '-'; sl@0: const TInt KPeriodChar = '.'; sl@0: sl@0: //File URI Constants sl@0: // sl@0: _LIT(KPrivate, "private/"); sl@0: _LIT(KExtMedia, "ext-media/"); sl@0: _LIT8(KFileUriScheme8, "file"); sl@0: _LIT(KFileUriScheme16, "file"); sl@0: _LIT(KDefaultPath,"C:\\"); sl@0: sl@0: const TInt KDriveSeparator = ':'; sl@0: const TInt KUriPathSeparator = '/'; sl@0: const TInt KFilePathSeparator = '\\'; sl@0: sl@0: sl@0: sl@0: template sl@0: LOCAL_C TBool HasValidSchemeChars(const TPtrCType& aScheme); sl@0: sl@0: HBufC8* CreateUri8LC(const TDesC16& aBuf16); sl@0: sl@0: TInt DoValidate(const TUriC8& aUri); sl@0: sl@0: TInt DoEquivalenceL(const TUriC8& aLhs, const TUriC8& aRhs); sl@0: sl@0: void ChangePathSeparator(TDes& aDesPtr, TUint aPathSeperatorFrom, TUint aPathSeperatorTo); sl@0: sl@0: HBufC* GetFullFileNameFromFileUriPathL(const TDesC& aFileUriPath); sl@0: HBufC* ResolveFileNameL(const TDesC8& aPath, TUriFileName aType, TBool aIsFileUri); sl@0: void GetFileComponent(TPtrC& aNewName, const TDesC& aOldName, TUriFileName aType ); sl@0: sl@0: sl@0: #endif // __TURICINTERNAL_H__