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 CUri classes defined in sl@0: // Uri8.h and Uri16.h. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file CUriInternal.h sl@0: @see Uri8.h, Uri16.h sl@0: */ sl@0: sl@0: #ifndef __CURIINTERNAL_H__ sl@0: #define __CURIINTERNAL_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: sl@0: /** sl@0: enum TInternalFileUriFlags sl@0: Enum defining a flag used to indicate file type (public or private) sl@0: @internalComponent sl@0: @released sl@0: @since 9.1 sl@0: */ sl@0: enum TInternalFileUriFlags sl@0: { sl@0: /* Specifier for application private file on fix drive */ sl@0: EPrivate = 0x80000000 sl@0: }; sl@0: sl@0: // Forward class declarations sl@0: // sl@0: class CDelimitedDataBase16; sl@0: class CDelimitedDataBase8; sl@0: sl@0: template sl@0: TInt CalculateUriLength(const TPtrCType aComponent[], TBool& aIsIPv6Host); sl@0: sl@0: template sl@0: void DoFormUri(TPtrType& aUri, TPtrCType aComponent[], TBool& aIsIPv6Host); sl@0: sl@0: template sl@0: void SetScheme(TPtrType& aUri, TPtrCType& aScheme); sl@0: sl@0: template sl@0: void SetAuthority(TPtrType& aUri, TPtrCType& aUserinfo, TPtrCType& aHost, TPtrCType& aPort, TBool& aIsIPv6Host, TBool aUseNetworkDelimiter); sl@0: sl@0: template sl@0: void SetPath(TPtrType& aUri, TPtrCType& aPath); sl@0: sl@0: template sl@0: void SetQuery(TPtrType& aUri, TPtrCType& aQuery); sl@0: sl@0: template sl@0: void SetFragment(TPtrType& aUri, TPtrCType& aFragment); sl@0: sl@0: template sl@0: void CleanResolvedPathL(CDelimitedDataBaseType* aResolvedPath); sl@0: sl@0: template sl@0: HBufCType* FormResolvedPathLC(const TUriCType& aBaseUri, const TUriCType& aRefUri, TBool& aUseBaseQuery); sl@0: sl@0: template sl@0: void FormResolvedUri(TPtrCType aComponent[], const TUriCType& aBaseUri, const TUriCType& aRefUri, const HBufCType* aResolvedPath, TBool aUseBaseQuery); sl@0: sl@0: HBufC* GenerateFileUriPathL(const TDesC& aFileName, TDriveNumber aDrive, TUint aFlags); sl@0: sl@0: HBufC8* ResolvePathsL(const TDesC8& aBasePath, const TDesC8& aRefPath); sl@0: sl@0: HBufC16* ResolvePathsL(const TDesC16& aBasePath, const TDesC16& aRefPath); sl@0: sl@0: TBool IsSameDir(const TDesC8& aSegment); sl@0: sl@0: TBool IsSameDir(const TDesC16& aSegment); sl@0: sl@0: TBool IsParentDir(const TDesC8& aSegment); sl@0: sl@0: TBool IsParentDir(const TDesC16& aSegment); sl@0: sl@0: void InsertParentDirL(CDelimitedDataBase8* aResolvedPath); sl@0: sl@0: void InsertParentDirL(CDelimitedDataBase16* aResolvedPath); sl@0: sl@0: #endif // __CURIINTERNAL_H__