First public contribution.
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.
14 // File contains local functions for use by the Uri parser classes defined in
20 @file TUriParserInternal.h
24 #ifndef __TURIPARSERINTERNAL_H__
25 #define __TURIPARSERINTERNAL_H__
32 enum TDelimiterSearchFlag
33 Enum defining a set of flags used for search delimiter searching.
39 enum TDelimiterSearchFlag
41 /* Specifier for colon delimiter */
42 EColonDelimiterFlag = 0x001,
43 /* Specifier for slash delimiter */
44 ESlashDelimiterFlag = 0x002,
45 /* Specifier for query delimiter */
46 EQueryDelimiterFlag = 0x004,
47 /* Specifier for hash delimiter */
48 EHashDelimiterFlag = 0x008,
49 /* Specifier for semi-colon delimiter */
50 ESemiColonDelimiterFlag = 0x010,
51 /* Specifier for query delimiter search */
52 EQueryDelimiterSearch = EHashDelimiterFlag,
53 /* Specifier for path delimiter seacrh */
54 EPathDelimiterSearch = EQueryDelimiterSearch | EQueryDelimiterFlag,
55 /* Specifier for authority delimiter search */
56 EAuthDelimiterSearch = EPathDelimiterSearch | ESlashDelimiterFlag,
57 /* Specifier for scheme delimiter seacrh */
58 ESchemeDelimiterSearch = EAuthDelimiterSearch | EColonDelimiterFlag
61 template<class TPtrCType>
62 void DoParseUri(const TPtrCType& aUri, TPtrCType aComponent[]);
64 template<class TPtrCType>
65 TInt ParseScheme(const TPtrCType& aUri, TPtrCType& aScheme);
67 template<class TPtrCType>
68 TInt ParseAuthority(const TPtrCType& aUri, TPtrCType& aUserinfo, TPtrCType& aHost, TPtrCType& aPort, TBool aUseNetworkDelimiter);
71 template<class TPtrCType>
72 TInt ParsePath(const TPtrCType& aUri, TPtrCType& aPath);
74 template<class TPtrCType>
75 TInt ParseQuery(const TPtrCType& aUri, TPtrCType& aQuery);
78 template<class TPtrCType>
79 TInt ParseFragment(const TPtrCType& aUri, TPtrCType& aFragment);
81 template<class TPtrCType>
82 TInt FindFirstUriDelimiter(const TPtrCType& aString, TDelimiterSearchFlag aSearchFlag);
84 #endif // __TURIPARSERINTERNAL_H__