1.1 --- a/epoc32/include/uriutils.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/uriutils.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,81 @@
1.4 -uriutils.h
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +//
1.20 +//
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file UriUtils.h
1.26 + @publishedAll
1.27 + @released
1.28 +*/
1.29 +
1.30 +#ifndef __URIUTILS_H__
1.31 +#define __URIUTILS_H__
1.32 +
1.33 +// System includes
1.34 +//
1.35 +#include <e32base.h>
1.36 +#include <authority8.h>
1.37 +#include <uri8.h>
1.38 +#include <uri16.h>
1.39 +
1.40 +
1.41 +/**
1.42 + Comments :
1.43 + @publishedAll
1.44 + @released
1.45 +*/
1.46 +class UriUtils
1.47 + {
1.48 +public:
1.49 +/**
1.50 + Enum defining a flag used to indicate host type.
1.51 + @publishedAll
1.52 + @released
1.53 + @since 9.1
1.54 + */
1.55 + enum TUriHostType
1.56 + {
1.57 + /**
1.58 + Indicates host is of type IPv6. Example: 1080:0:0:0:8:800:200C:417A
1.59 + */
1.60 + EIPv6Host,
1.61 + /**
1.62 + Indicates host is of type IPv4. Example: 192.168.202.18
1.63 + */
1.64 + EIPv4Host,
1.65 + /**
1.66 + Indicates host is in text form. Example: www.mypage.com
1.67 + */
1.68 + ETextHost,
1.69 + };
1.70 +
1.71 + IMPORT_C static CUri8* ConvertToInternetFormL(const TUriC16& aUri);
1.72 + IMPORT_C static CUri16* ConvertToDisplayFormL(const TUriC8& aUri);
1.73 +
1.74 + IMPORT_C static CUri8* CreateUriL(const TDesC& aUri);
1.75 + IMPORT_C static CAuthority8* CreateAuthorityL(const TDesC& aAuthority) ;
1.76 +
1.77 + IMPORT_C static TBool HasInvalidChars(const TDesC8& aData);
1.78 + IMPORT_C static TBool HasInvalidChars(const TDesC16& aData);
1.79 +
1.80 + IMPORT_C static TUriHostType HostType(const TDesC8& aHost);
1.81 + IMPORT_C static TUriHostType HostType(const TDesC16& aHost);
1.82 + IMPORT_C static CUri8* NormaliseUriL(const TUriC8& aUri);
1.83 + };
1.84 +
1.85 +#endif // __URIUTILS_H__