Update contrib.
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.
19 @file UriUtilsInternal.h
22 #ifndef __URIUTILSINTERNAL_H__
23 #define __URIUTILSINTERNAL_H__
32 _LIT(KSipScheme, "sip");
33 _LIT(KSipsScheme, "sips");
34 _LIT8(KSipScheme8, "sip");
35 _LIT8(KSipsScheme8, "sips");
36 _LIT8(KTelScheme8, "tel");
38 const TInt KUriNetworkAuthorityDelimiterLength = 2;
41 enum specifies scheme type whether it is Sip or Tel
52 template<class TDesCType>
53 LOCAL_C TBool CheckForExcludedChars(const TDesCType& aData);
56 template<class TDesCType>
57 LOCAL_C UriUtils::TUriHostType CheckHostType(const TDesCType& aHost);
59 template<class TDesCType>
60 LOCAL_C TBool CheckValidTextHost(const TDesCType& aHost);
62 LOCAL_C void PercentEncodeL(CUri8* aNormalisedUri);
63 LOCAL_C void CaseNormaliseL(CUri8* aNormalisedUri);
64 LOCAL_C void RemoveDotSegmentsL(CUri8* aNormalisedUri);
66 //supporting methods for case normalisation
67 LOCAL_C void DoPercentEncodeL(CUri8* aNormalisedUri, TUriComponent aComponent);
68 LOCAL_C void DoCaseNormaliseL(CUri8* aNormalisedUri, TUriComponent aComponent);
69 LOCAL_C void updateStrings(TPtr8& inputBuf, TPtr8& outPutBuf, TInt length);
70 LOCAL_C TBool ValidateAndConvertPercentEncodedTriple(TDesC8& aData, TDes8& aCaseNormalizedData);
71 void RemoveExtraneousDotSegmentsL(HBufC8* aUriInputPath);
73 TBool IsNetworkScheme(const TDesC8& aScheme);
74 TBool IsNetworkScheme(const TDesC16& aScheme);
76 TUriSchemeType SchemeType(const TDesC8& aScheme);
77 TUriSchemeType SchemeType(const TDesC16& aScheme);
79 TBool IsTextHostValid(const TDesC8& aHost);
80 TBool IsTextHostValid(const TDesC16& aHost);
81 void GetNameValuePair(const TDesC8& aSegment, TPtrC8& aName, TPtrC8& aValue);
83 #endif // __URIUTILSINTERNAL_H__