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 |
//
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file UriUtilsInternal.h
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __URIUTILSINTERNAL_H__
|
sl@0
|
23 |
#define __URIUTILSINTERNAL_H__
|
sl@0
|
24 |
|
sl@0
|
25 |
// System includes
|
sl@0
|
26 |
//
|
sl@0
|
27 |
#include <e32base.h>
|
sl@0
|
28 |
#include <uriutils.h>
|
sl@0
|
29 |
|
sl@0
|
30 |
// Constants
|
sl@0
|
31 |
//
|
sl@0
|
32 |
_LIT(KSipScheme, "sip");
|
sl@0
|
33 |
_LIT(KSipsScheme, "sips");
|
sl@0
|
34 |
_LIT8(KSipScheme8, "sip");
|
sl@0
|
35 |
_LIT8(KSipsScheme8, "sips");
|
sl@0
|
36 |
_LIT8(KTelScheme8, "tel");
|
sl@0
|
37 |
|
sl@0
|
38 |
const TInt KUriNetworkAuthorityDelimiterLength = 2;
|
sl@0
|
39 |
|
sl@0
|
40 |
/**
|
sl@0
|
41 |
enum specifies scheme type whether it is Sip or Tel
|
sl@0
|
42 |
@internalComponent
|
sl@0
|
43 |
@released
|
sl@0
|
44 |
*/
|
sl@0
|
45 |
enum TUriSchemeType
|
sl@0
|
46 |
{
|
sl@0
|
47 |
ESchemeTypeUnknown,
|
sl@0
|
48 |
ESchemeTypeSip,
|
sl@0
|
49 |
ESchemeTypeTel
|
sl@0
|
50 |
};
|
sl@0
|
51 |
|
sl@0
|
52 |
template<class TDesCType>
|
sl@0
|
53 |
LOCAL_C TBool CheckForExcludedChars(const TDesCType& aData);
|
sl@0
|
54 |
|
sl@0
|
55 |
|
sl@0
|
56 |
template<class TDesCType>
|
sl@0
|
57 |
LOCAL_C UriUtils::TUriHostType CheckHostType(const TDesCType& aHost);
|
sl@0
|
58 |
|
sl@0
|
59 |
template<class TDesCType>
|
sl@0
|
60 |
LOCAL_C TBool CheckValidTextHost(const TDesCType& aHost);
|
sl@0
|
61 |
|
sl@0
|
62 |
LOCAL_C void PercentEncodeL(CUri8* aNormalisedUri);
|
sl@0
|
63 |
LOCAL_C void CaseNormaliseL(CUri8* aNormalisedUri);
|
sl@0
|
64 |
LOCAL_C void RemoveDotSegmentsL(CUri8* aNormalisedUri);
|
sl@0
|
65 |
|
sl@0
|
66 |
//supporting methods for case normalisation
|
sl@0
|
67 |
LOCAL_C void DoPercentEncodeL(CUri8* aNormalisedUri, TUriComponent aComponent);
|
sl@0
|
68 |
LOCAL_C void DoCaseNormaliseL(CUri8* aNormalisedUri, TUriComponent aComponent);
|
sl@0
|
69 |
LOCAL_C void updateStrings(TPtr8& inputBuf, TPtr8& outPutBuf, TInt length);
|
sl@0
|
70 |
LOCAL_C TBool ValidateAndConvertPercentEncodedTriple(TDesC8& aData, TDes8& aCaseNormalizedData);
|
sl@0
|
71 |
void RemoveExtraneousDotSegmentsL(HBufC8* aUriInputPath);
|
sl@0
|
72 |
|
sl@0
|
73 |
TBool IsNetworkScheme(const TDesC8& aScheme);
|
sl@0
|
74 |
TBool IsNetworkScheme(const TDesC16& aScheme);
|
sl@0
|
75 |
|
sl@0
|
76 |
TUriSchemeType SchemeType(const TDesC8& aScheme);
|
sl@0
|
77 |
TUriSchemeType SchemeType(const TDesC16& aScheme);
|
sl@0
|
78 |
|
sl@0
|
79 |
TBool IsTextHostValid(const TDesC8& aHost);
|
sl@0
|
80 |
TBool IsTextHostValid(const TDesC16& aHost);
|
sl@0
|
81 |
void GetNameValuePair(const TDesC8& aSegment, TPtrC8& aName, TPtrC8& aValue);
|
sl@0
|
82 |
|
sl@0
|
83 |
#endif // __URIUTILSINTERNAL_H__
|