genericservices/httputils/UriParser/CUriInternal.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 CUri classes defined in
       
    15 // Uri8.h and Uri16.h.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file CUriInternal.h
       
    21  @see Uri8.h, Uri16.h
       
    22 */
       
    23 
       
    24 #ifndef __CURIINTERNAL_H__
       
    25 #define __CURIINTERNAL_H__
       
    26 
       
    27 // System includes
       
    28 //
       
    29 #include <e32base.h>
       
    30 
       
    31 /** 
       
    32 	enum TInternalFileUriFlags
       
    33 	Enum defining a flag used to indicate file type (public or private) 
       
    34 	@internalComponent
       
    35 	@released
       
    36 	@since 9.1	
       
    37  */
       
    38 enum TInternalFileUriFlags
       
    39 	 {
       
    40 	 /* Specifier for application private file on fix drive */
       
    41 	 EPrivate   = 0x80000000
       
    42 	 };
       
    43 
       
    44 // Forward class declarations
       
    45 //
       
    46 class CDelimitedDataBase16;
       
    47 class CDelimitedDataBase8;
       
    48 
       
    49 template<class TPtrCType>
       
    50 TInt CalculateUriLength(const TPtrCType aComponent[], TBool& aIsIPv6Host);
       
    51 
       
    52 template<class TPtrType, class TPtrCType>
       
    53 void DoFormUri(TPtrType& aUri, TPtrCType aComponent[], TBool& aIsIPv6Host);
       
    54 
       
    55 template<class TPtrType, class TPtrCType> 
       
    56 void SetScheme(TPtrType& aUri, TPtrCType& aScheme);
       
    57 
       
    58 template<class TPtrType, class TPtrCType> 
       
    59 void SetAuthority(TPtrType& aUri, TPtrCType& aUserinfo, TPtrCType& aHost, TPtrCType& aPort, TBool& aIsIPv6Host, TBool aUseNetworkDelimiter);
       
    60 
       
    61 template<class TPtrType, class TPtrCType> 
       
    62 void SetPath(TPtrType& aUri, TPtrCType& aPath);
       
    63 
       
    64 template<class TPtrType, class TPtrCType> 
       
    65 void SetQuery(TPtrType& aUri, TPtrCType& aQuery);
       
    66 
       
    67 template<class TPtrType, class TPtrCType> 
       
    68 void SetFragment(TPtrType& aUri, TPtrCType& aFragment);
       
    69 
       
    70 template<class TPtrCType, class CDelimitedDataBaseType>
       
    71 void CleanResolvedPathL(CDelimitedDataBaseType* aResolvedPath);
       
    72 
       
    73 template<class HBufCType, class TUriCType>
       
    74 HBufCType* FormResolvedPathLC(const TUriCType& aBaseUri, const TUriCType& aRefUri, TBool& aUseBaseQuery);
       
    75 
       
    76 template<class TPtrCType, class TUriCType, class HBufCType>
       
    77 void FormResolvedUri(TPtrCType aComponent[], const TUriCType& aBaseUri, const TUriCType& aRefUri, const HBufCType* aResolvedPath, TBool aUseBaseQuery);
       
    78 
       
    79 HBufC* GenerateFileUriPathL(const TDesC& aFileName, TDriveNumber aDrive,  TUint aFlags);
       
    80 
       
    81 HBufC8* ResolvePathsL(const TDesC8& aBasePath, const TDesC8& aRefPath);
       
    82 
       
    83 HBufC16* ResolvePathsL(const TDesC16& aBasePath, const TDesC16& aRefPath);
       
    84 
       
    85 TBool IsSameDir(const TDesC8& aSegment);
       
    86 
       
    87 TBool IsSameDir(const TDesC16& aSegment);
       
    88 
       
    89 TBool IsParentDir(const TDesC8& aSegment);
       
    90 
       
    91 TBool IsParentDir(const TDesC16& aSegment);
       
    92 
       
    93 void InsertParentDirL(CDelimitedDataBase8* aResolvedPath);
       
    94 
       
    95 void InsertParentDirL(CDelimitedDataBase16* aResolvedPath);
       
    96 
       
    97 #endif	// __CURIINTERNAL_H__