os/ossrv/genericservices/httputils/UriUtils/UriUtilsInternal.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/UriUtils/UriUtilsInternal.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// 
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file UriUtilsInternal.h
    1.23 +*/
    1.24 +
    1.25 +#ifndef __URIUTILSINTERNAL_H__
    1.26 +#define __URIUTILSINTERNAL_H__
    1.27 +
    1.28 +// System includes
    1.29 +//
    1.30 +#include <e32base.h>
    1.31 +#include <uriutils.h>
    1.32 +
    1.33 +// Constants
    1.34 +//
    1.35 +_LIT(KSipScheme, "sip");
    1.36 +_LIT(KSipsScheme, "sips");
    1.37 +_LIT8(KSipScheme8, "sip");
    1.38 +_LIT8(KSipsScheme8, "sips");
    1.39 +_LIT8(KTelScheme8, "tel");	
    1.40 +
    1.41 +const TInt KUriNetworkAuthorityDelimiterLength	= 2;
    1.42 +
    1.43 +/**
    1.44 +	enum specifies scheme type whether it is Sip or Tel
    1.45 +	@internalComponent
    1.46 +	@released
    1.47 +*/
    1.48 +enum TUriSchemeType
    1.49 +	{
    1.50 +	ESchemeTypeUnknown,
    1.51 +	ESchemeTypeSip,
    1.52 +	ESchemeTypeTel 
    1.53 +	};
    1.54 +
    1.55 +template<class TDesCType>
    1.56 +LOCAL_C TBool CheckForExcludedChars(const TDesCType& aData);
    1.57 +
    1.58 +
    1.59 +template<class TDesCType>
    1.60 +LOCAL_C UriUtils::TUriHostType CheckHostType(const TDesCType& aHost);
    1.61 +
    1.62 +template<class TDesCType>
    1.63 +LOCAL_C TBool CheckValidTextHost(const TDesCType& aHost);
    1.64 +
    1.65 +LOCAL_C void PercentEncodeL(CUri8* aNormalisedUri);
    1.66 +LOCAL_C void CaseNormaliseL(CUri8* aNormalisedUri);
    1.67 +LOCAL_C void RemoveDotSegmentsL(CUri8* aNormalisedUri);
    1.68 +
    1.69 +//supporting methods for case normalisation
    1.70 +LOCAL_C void DoPercentEncodeL(CUri8* aNormalisedUri, TUriComponent aComponent);
    1.71 +LOCAL_C void DoCaseNormaliseL(CUri8* aNormalisedUri, TUriComponent aComponent);
    1.72 +LOCAL_C void updateStrings(TPtr8& inputBuf, TPtr8& outPutBuf, TInt length);
    1.73 +LOCAL_C TBool ValidateAndConvertPercentEncodedTriple(TDesC8& aData, TDes8& aCaseNormalizedData);
    1.74 +void RemoveExtraneousDotSegmentsL(HBufC8* aUriInputPath);
    1.75 +
    1.76 +TBool IsNetworkScheme(const TDesC8& aScheme);
    1.77 +TBool IsNetworkScheme(const TDesC16& aScheme);
    1.78 +
    1.79 +TUriSchemeType SchemeType(const TDesC8& aScheme);
    1.80 +TUriSchemeType SchemeType(const TDesC16& aScheme);
    1.81 +
    1.82 +TBool IsTextHostValid(const TDesC8& aHost);
    1.83 +TBool IsTextHostValid(const TDesC16& aHost);
    1.84 +void GetNameValuePair(const TDesC8& aSegment, TPtrC8& aName, TPtrC8& aValue);
    1.85 +
    1.86 +#endif	// __URIUTILSINTERNAL_H__