os/ossrv/genericservices/httputils/UriParser/CUriInternal.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// File contains local functions for use by the CUri classes defined in
sl@0
    15
// Uri8.h and Uri16.h.
sl@0
    16
// 
sl@0
    17
//
sl@0
    18
sl@0
    19
/**
sl@0
    20
 @file CUriInternal.h
sl@0
    21
 @see Uri8.h, Uri16.h
sl@0
    22
*/
sl@0
    23
sl@0
    24
#ifndef __CURIINTERNAL_H__
sl@0
    25
#define __CURIINTERNAL_H__
sl@0
    26
sl@0
    27
// System includes
sl@0
    28
//
sl@0
    29
#include <e32base.h>
sl@0
    30
sl@0
    31
/** 
sl@0
    32
	enum TInternalFileUriFlags
sl@0
    33
	Enum defining a flag used to indicate file type (public or private) 
sl@0
    34
	@internalComponent
sl@0
    35
	@released
sl@0
    36
	@since 9.1	
sl@0
    37
 */
sl@0
    38
enum TInternalFileUriFlags
sl@0
    39
	 {
sl@0
    40
	 /* Specifier for application private file on fix drive */
sl@0
    41
	 EPrivate   = 0x80000000
sl@0
    42
	 };
sl@0
    43
sl@0
    44
// Forward class declarations
sl@0
    45
//
sl@0
    46
class CDelimitedDataBase16;
sl@0
    47
class CDelimitedDataBase8;
sl@0
    48
sl@0
    49
template<class TPtrCType>
sl@0
    50
TInt CalculateUriLength(const TPtrCType aComponent[], TBool& aIsIPv6Host);
sl@0
    51
sl@0
    52
template<class TPtrType, class TPtrCType>
sl@0
    53
void DoFormUri(TPtrType& aUri, TPtrCType aComponent[], TBool& aIsIPv6Host);
sl@0
    54
sl@0
    55
template<class TPtrType, class TPtrCType> 
sl@0
    56
void SetScheme(TPtrType& aUri, TPtrCType& aScheme);
sl@0
    57
sl@0
    58
template<class TPtrType, class TPtrCType> 
sl@0
    59
void SetAuthority(TPtrType& aUri, TPtrCType& aUserinfo, TPtrCType& aHost, TPtrCType& aPort, TBool& aIsIPv6Host, TBool aUseNetworkDelimiter);
sl@0
    60
sl@0
    61
template<class TPtrType, class TPtrCType> 
sl@0
    62
void SetPath(TPtrType& aUri, TPtrCType& aPath);
sl@0
    63
sl@0
    64
template<class TPtrType, class TPtrCType> 
sl@0
    65
void SetQuery(TPtrType& aUri, TPtrCType& aQuery);
sl@0
    66
sl@0
    67
template<class TPtrType, class TPtrCType> 
sl@0
    68
void SetFragment(TPtrType& aUri, TPtrCType& aFragment);
sl@0
    69
sl@0
    70
template<class TPtrCType, class CDelimitedDataBaseType>
sl@0
    71
void CleanResolvedPathL(CDelimitedDataBaseType* aResolvedPath);
sl@0
    72
sl@0
    73
template<class HBufCType, class TUriCType>
sl@0
    74
HBufCType* FormResolvedPathLC(const TUriCType& aBaseUri, const TUriCType& aRefUri, TBool& aUseBaseQuery);
sl@0
    75
sl@0
    76
template<class TPtrCType, class TUriCType, class HBufCType>
sl@0
    77
void FormResolvedUri(TPtrCType aComponent[], const TUriCType& aBaseUri, const TUriCType& aRefUri, const HBufCType* aResolvedPath, TBool aUseBaseQuery);
sl@0
    78
sl@0
    79
HBufC* GenerateFileUriPathL(const TDesC& aFileName, TDriveNumber aDrive,  TUint aFlags);
sl@0
    80
sl@0
    81
HBufC8* ResolvePathsL(const TDesC8& aBasePath, const TDesC8& aRefPath);
sl@0
    82
sl@0
    83
HBufC16* ResolvePathsL(const TDesC16& aBasePath, const TDesC16& aRefPath);
sl@0
    84
sl@0
    85
TBool IsSameDir(const TDesC8& aSegment);
sl@0
    86
sl@0
    87
TBool IsSameDir(const TDesC16& aSegment);
sl@0
    88
sl@0
    89
TBool IsParentDir(const TDesC8& aSegment);
sl@0
    90
sl@0
    91
TBool IsParentDir(const TDesC16& aSegment);
sl@0
    92
sl@0
    93
void InsertParentDirL(CDelimitedDataBase8* aResolvedPath);
sl@0
    94
sl@0
    95
void InsertParentDirL(CDelimitedDataBase16* aResolvedPath);
sl@0
    96
sl@0
    97
#endif	// __CURIINTERNAL_H__