os/ossrv/genericservices/httputils/inc/UriUtils.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/inc/UriUtils.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,79 @@
     1.4 +// Copyright (c) 2001-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 +//
    1.20 +
    1.21 +/**
    1.22 + @file UriUtils.h
    1.23 + @publishedAll
    1.24 + @released
    1.25 +*/
    1.26 +
    1.27 +#ifndef __URIUTILS_H__
    1.28 +#define __URIUTILS_H__
    1.29 +
    1.30 +// System includes
    1.31 +//
    1.32 +#include <e32base.h>
    1.33 +#include <authority8.h>
    1.34 +#include <uri8.h>
    1.35 +#include <uri16.h>
    1.36 +
    1.37 +
    1.38 +/**
    1.39 +  Comments :
    1.40 +  @publishedAll
    1.41 +  @released
    1.42 +*/
    1.43 +class UriUtils
    1.44 +	{
    1.45 +public:
    1.46 +/** 
    1.47 +	Enum defining a flag used to indicate host type.
    1.48 +	@publishedAll
    1.49 +	@released
    1.50 +	@since 9.1	
    1.51 + */
    1.52 +	enum TUriHostType
    1.53 +		{
    1.54 +		/** 
    1.55 +			Indicates host is of type IPv6. Example: 1080:0:0:0:8:800:200C:417A 
    1.56 +		 */
    1.57 +		EIPv6Host,
    1.58 +		/**
    1.59 +			Indicates host is of type IPv4. Example: 192.168.202.18 
    1.60 +		 */
    1.61 +		EIPv4Host,
    1.62 +		/** 
    1.63 +			Indicates host is in text form. Example: www.mypage.com 
    1.64 +		 */
    1.65 +		ETextHost,
    1.66 +		};
    1.67 +
    1.68 +	IMPORT_C static CUri8* ConvertToInternetFormL(const TUriC16& aUri);
    1.69 +	IMPORT_C static CUri16* ConvertToDisplayFormL(const TUriC8& aUri);
    1.70 +
    1.71 +	IMPORT_C static CUri8* CreateUriL(const TDesC& aUri);
    1.72 +	IMPORT_C static CAuthority8* CreateAuthorityL(const TDesC& aAuthority) ;
    1.73 +
    1.74 +	IMPORT_C static TBool HasInvalidChars(const TDesC8& aData);
    1.75 +	IMPORT_C static TBool HasInvalidChars(const TDesC16& aData);
    1.76 +
    1.77 +	IMPORT_C static TUriHostType HostType(const TDesC8& aHost);
    1.78 +	IMPORT_C static TUriHostType HostType(const TDesC16& aHost);
    1.79 +	IMPORT_C static CUri8* NormaliseUriL(const TUriC8& aUri);
    1.80 +	};
    1.81 +
    1.82 +#endif	// __URIUTILS_H__