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 CUri classes defined in
15 // Uri8.h and Uri16.h.
24 #ifndef __CURIINTERNAL_H__
25 #define __CURIINTERNAL_H__
32 enum TInternalFileUriFlags
33 Enum defining a flag used to indicate file type (public or private)
38 enum TInternalFileUriFlags
40 /* Specifier for application private file on fix drive */
44 // Forward class declarations
46 class CDelimitedDataBase16;
47 class CDelimitedDataBase8;
49 template<class TPtrCType>
50 TInt CalculateUriLength(const TPtrCType aComponent[], TBool& aIsIPv6Host);
52 template<class TPtrType, class TPtrCType>
53 void DoFormUri(TPtrType& aUri, TPtrCType aComponent[], TBool& aIsIPv6Host);
55 template<class TPtrType, class TPtrCType>
56 void SetScheme(TPtrType& aUri, TPtrCType& aScheme);
58 template<class TPtrType, class TPtrCType>
59 void SetAuthority(TPtrType& aUri, TPtrCType& aUserinfo, TPtrCType& aHost, TPtrCType& aPort, TBool& aIsIPv6Host, TBool aUseNetworkDelimiter);
61 template<class TPtrType, class TPtrCType>
62 void SetPath(TPtrType& aUri, TPtrCType& aPath);
64 template<class TPtrType, class TPtrCType>
65 void SetQuery(TPtrType& aUri, TPtrCType& aQuery);
67 template<class TPtrType, class TPtrCType>
68 void SetFragment(TPtrType& aUri, TPtrCType& aFragment);
70 template<class TPtrCType, class CDelimitedDataBaseType>
71 void CleanResolvedPathL(CDelimitedDataBaseType* aResolvedPath);
73 template<class HBufCType, class TUriCType>
74 HBufCType* FormResolvedPathLC(const TUriCType& aBaseUri, const TUriCType& aRefUri, TBool& aUseBaseQuery);
76 template<class TPtrCType, class TUriCType, class HBufCType>
77 void FormResolvedUri(TPtrCType aComponent[], const TUriCType& aBaseUri, const TUriCType& aRefUri, const HBufCType* aResolvedPath, TBool aUseBaseQuery);
79 HBufC* GenerateFileUriPathL(const TDesC& aFileName, TDriveNumber aDrive, TUint aFlags);
81 HBufC8* ResolvePathsL(const TDesC8& aBasePath, const TDesC8& aRefPath);
83 HBufC16* ResolvePathsL(const TDesC16& aBasePath, const TDesC16& aRefPath);
85 TBool IsSameDir(const TDesC8& aSegment);
87 TBool IsSameDir(const TDesC16& aSegment);
89 TBool IsParentDir(const TDesC8& aSegment);
91 TBool IsParentDir(const TDesC16& aSegment);
93 void InsertParentDirL(CDelimitedDataBase8* aResolvedPath);
95 void InsertParentDirL(CDelimitedDataBase16* aResolvedPath);
97 #endif // __CURIINTERNAL_H__