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: // sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file UriUtilsInternal.h sl@0: */ sl@0: sl@0: #ifndef __URIUTILSINTERNAL_H__ sl@0: #define __URIUTILSINTERNAL_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: #include sl@0: sl@0: // Constants sl@0: // sl@0: _LIT(KSipScheme, "sip"); sl@0: _LIT(KSipsScheme, "sips"); sl@0: _LIT8(KSipScheme8, "sip"); sl@0: _LIT8(KSipsScheme8, "sips"); sl@0: _LIT8(KTelScheme8, "tel"); sl@0: sl@0: const TInt KUriNetworkAuthorityDelimiterLength = 2; sl@0: sl@0: /** sl@0: enum specifies scheme type whether it is Sip or Tel sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: enum TUriSchemeType sl@0: { sl@0: ESchemeTypeUnknown, sl@0: ESchemeTypeSip, sl@0: ESchemeTypeTel sl@0: }; sl@0: sl@0: template sl@0: LOCAL_C TBool CheckForExcludedChars(const TDesCType& aData); sl@0: sl@0: sl@0: template sl@0: LOCAL_C UriUtils::TUriHostType CheckHostType(const TDesCType& aHost); sl@0: sl@0: template sl@0: LOCAL_C TBool CheckValidTextHost(const TDesCType& aHost); sl@0: sl@0: LOCAL_C void PercentEncodeL(CUri8* aNormalisedUri); sl@0: LOCAL_C void CaseNormaliseL(CUri8* aNormalisedUri); sl@0: LOCAL_C void RemoveDotSegmentsL(CUri8* aNormalisedUri); sl@0: sl@0: //supporting methods for case normalisation sl@0: LOCAL_C void DoPercentEncodeL(CUri8* aNormalisedUri, TUriComponent aComponent); sl@0: LOCAL_C void DoCaseNormaliseL(CUri8* aNormalisedUri, TUriComponent aComponent); sl@0: LOCAL_C void updateStrings(TPtr8& inputBuf, TPtr8& outPutBuf, TInt length); sl@0: LOCAL_C TBool ValidateAndConvertPercentEncodedTriple(TDesC8& aData, TDes8& aCaseNormalizedData); sl@0: void RemoveExtraneousDotSegmentsL(HBufC8* aUriInputPath); sl@0: sl@0: TBool IsNetworkScheme(const TDesC8& aScheme); sl@0: TBool IsNetworkScheme(const TDesC16& aScheme); sl@0: sl@0: TUriSchemeType SchemeType(const TDesC8& aScheme); sl@0: TUriSchemeType SchemeType(const TDesC16& aScheme); sl@0: sl@0: TBool IsTextHostValid(const TDesC8& aHost); sl@0: TBool IsTextHostValid(const TDesC16& aHost); sl@0: void GetNameValuePair(const TDesC8& aSegment, TPtrC8& aName, TPtrC8& aValue); sl@0: sl@0: #endif // __URIUTILSINTERNAL_H__