1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericservices/httputils/UriParser/SipUriParser.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,74 @@
1.4 +// Copyright (c) 2007-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 +#ifndef __SIPURIPARSER_H__
1.20 +#define __SIPURIPARSER_H__
1.21 +
1.22 +#include "GenericUriParser.h"
1.23 +
1.24 +/**
1.25 + enum TSipDelimiterSearchFlag
1.26 + Enum defining a set of flags used for search delimiter searching.
1.27 + */
1.28 +enum TSipDelimiterSearchFlag
1.29 + {
1.30 + // Specifier for colon delimiter
1.31 + ESipColonDelimiterFlag = 0x001,
1.32 + // Specifier for semicolon delimiter
1.33 + ESipSemiColonDelimiterFlag = 0x002,
1.34 + // Specifier for query/header delimiter
1.35 + ESipQueryDelimiterFlag = 0x004,
1.36 + // Specifier for path delimiter seacrh
1.37 + ESipPathDelimiterSearch = ESipQueryDelimiterFlag,
1.38 + // Specifier for authority delimiter search
1.39 + ESipAuthDelimiterSearch = ESipPathDelimiterSearch | ESipSemiColonDelimiterFlag,
1.40 + // Specifier for scheme delimiter seacrh
1.41 + ESipSchemeDelimiterSearch = ESipAuthDelimiterSearch | ESipColonDelimiterFlag
1.42 + };
1.43 +
1.44 +/**
1.45 +Dependencies : CUriParserBase.
1.46 +Comments : Provides Parsing functionality for the Sip Uri objects.
1.47 +This is implemented as per RFC3261 for Parsing of Uris.
1.48 +It uses 8-bit descriptors.
1.49 +
1.50 +@internalComponent
1.51 +@released
1.52 +*/
1.53 +class CSIPUriParser: public CGenericUriParser
1.54 + {
1.55 +public:
1.56 +
1.57 + static CSIPUriParser* NewL();
1.58 + virtual ~CSIPUriParser();
1.59 +
1.60 +private:
1.61 +
1.62 + CSIPUriParser();
1.63 + void ConstructL();
1.64 +
1.65 + TInt ParseScheme(const TPtrC8& aUri, TPtrC8& aScheme);
1.66 + TInt ParseAuthority(const TPtrC8& aUri, TPtrC8& aUserinfo, TPtrC8& aHost, TPtrC8& aPort, TBool aUseNetworkDelimiter);
1.67 + TInt ParsePath(const TPtrC8& aUri, TPtrC8& aPath);
1.68 + TInt ParseQuery(const TPtrC8& aUri, TPtrC8& aQuery);
1.69 + TInt ParseFragment(const TPtrC8& aUri, TPtrC8& aFragment);
1.70 +
1.71 + //Internal Supporting method for Parsing
1.72 + TInt FindFirstUriDelimiter(const TPtrC8& aString, TSipDelimiterSearchFlag aSearchFlag);
1.73 + };
1.74 +
1.75 +#endif // __SIPURIPARSER_H__
1.76 +
1.77 +