epoc32/include/uri16.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/uri16.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/uri16.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,216 @@
     1.4 -uri16.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 +// This file contains the API definition for the classes TUriC16 and 
    1.19 +// CUri16. These classes provide non-modifying (TUriC16) and modifying
    1.20 +// (CUri16) functionality for the components of a Uri as described in 
    1.21 +// RFC2396.
    1.22 +// 
    1.23 +//
    1.24 +
    1.25 +
    1.26 +
    1.27 +/**
    1.28 + @file Uri16.h
    1.29 + @publishedAll
    1.30 + @deprecated Deprecated in 9.1
    1.31 +*/
    1.32 +
    1.33 +#ifndef __URI16_H__
    1.34 +#define __URI16_H__
    1.35 +
    1.36 +// System includes
    1.37 +//
    1.38 +#include <e32base.h>
    1.39 +#include <f32file.h> 
    1.40 +#include <uricommon.h>
    1.41 +
    1.42 +
    1.43 +class TUriC16
    1.44 +/**
    1.45 +	Dependencies : TUriComponent.
    1.46 +	Comments : Provides non-modifying functionality on the components of a uri object as
    1.47 +	defined in RFC2396. There are 5 components; scheme, authority, path, query and fragment.
    1.48 +
    1.49 +The	object holds descriptor pointers to the parsed uri components and a descriptor pointer 
    1.50 +to the uri. It is non-owning. It uses 16-bit descriptors.
    1.51 +
    1.52 +	The functionality provided by this API allows the uri components to be extracted from the 
    1.53 +	parsed uri, checked for their presence in the uri and be compared with those in another 
    1.54 +	TUriC16 object.
    1.55 +	@publishedAll
    1.56 +	@deprecated Deprecated in 9.1
    1.57 +	@since 6.0
    1.58 +*/
    1.59 +	{
    1.60 +public:	// Methods
    1.61 +
    1.62 +	IMPORT_C HBufC* GetFileNameL() const;
    1.63 +	IMPORT_C HBufC* GetFileNameL(TUriFileName aType) const;
    1.64 +	IMPORT_C const TDesC16& Extract(TUriComponent aComponent) const;
    1.65 +	IMPORT_C void UriWithoutFragment(TPtrC16& aUriNoFrag) const;
    1.66 +
    1.67 +	IMPORT_C TBool IsPresent(TUriComponent aComponent) const;
    1.68 +	IMPORT_C TBool IsSchemeValid() const;
    1.69 +
    1.70 +	IMPORT_C TInt Compare(const TUriC16& aUri, TUriComponent aComponent) const;
    1.71 +
    1.72 +	IMPORT_C const TDesC16& UriDes() const;
    1.73 +
    1.74 +	IMPORT_C TInt Validate() const;
    1.75 +	IMPORT_C TInt Equivalent(const TUriC16& aUri) const;
    1.76 +	IMPORT_C HBufC* DisplayFormL(TUriComponent aComponent = EUriComplete) const;
    1.77 +
    1.78 +protected:	// Methods
    1.79 +
    1.80 +	IMPORT_C TUriC16();
    1.81 +
    1.82 +	void Reset();
    1.83 +	
    1.84 +private:	// Methods
    1.85 +	
    1.86 +	TInt ValidateL() const;
    1.87 +	TInt EquivalentL(const TDesC16& aUri) const;
    1.88 +
    1.89 +protected:	// Attributes
    1.90 +
    1.91 +	/** The array of descriptor pointers to the uri components.
    1.92 +	 */
    1.93 +	TPtrC16		iComponent[EUriMaxComponents];
    1.94 +
    1.95 +	/** The descriptor pointer to the uri.
    1.96 +	 */
    1.97 +	TPtrC16		iUriDes;
    1.98 +
    1.99 +/**
   1.100 +	A friend class.
   1.101 +	@see		CUri16 
   1.102 +	@since		6.0
   1.103 + */
   1.104 +	friend class CUri16;
   1.105 +
   1.106 +/**
   1.107 +	A friend class used for testing.
   1.108 +	@see		TUriC16StateAccessor
   1.109 +	@since		6.0
   1.110 +	@internalComponent
   1.111 + */
   1.112 +	friend class TUriC16StateAccessor;
   1.113 +
   1.114 +	};
   1.115 +
   1.116 +/**
   1.117 +Dependencies : TUriC16
   1.118 +Comments : Provides functionality to parse a descriptor into the components of a uri as 
   1.119 +defined in RFC2396. There are 5 components; scheme, authority, path, query and fragment.
   1.120 +
   1.121 +It uses 16-bit descriptors.
   1.122 +
   1.123 +Format of a uri is; scheme://authority path?query\#fragment
   1.124 +
   1.125 +@warning The descriptor that is parsed by an object of this class will be referenced 
   1.126 +by that object. If the original descriptor is no longer in scope there will be undefined 
   1.127 +behaviour.
   1.128 +@publishedAll
   1.129 +@deprecated Deprecated in 9.1. Use UriUtils::CreateUriL() instead
   1.130 +@since 6.0
   1.131 +*/
   1.132 +class TUriParser16 : public TUriC16
   1.133 +	{
   1.134 +public:	// Methods
   1.135 +
   1.136 +	IMPORT_C TUriParser16();
   1.137 +	IMPORT_C TInt Parse(const TDesC16& aUri);
   1.138 +	};
   1.139 +
   1.140 +/**
   1.141 +	Dependencies : CBase, TUriC16.
   1.142 +	Comments : Provides modifying functionality on the components of a uri object, as
   1.143 +	defined in RFC2396. There are 5 components; scheme. authority, path, query and fragment.
   1.144 +
   1.145 +	The	object holds parsed uri information. It is owning. It uses 16-bit descriptors.
   1.146 +
   1.147 +	The functionality provided by this API allows the uri components to be set or removed 
   1.148 +	from this parsed uri. Also, it provides a reference to TUriC16 object so that the non-modifying 
   1.149 +	functionality can be used.
   1.150 +	@publishedAll
   1.151 +	@deprecated Deprecated in 9.1
   1.152 +	@since 6.0
   1.153 +*/
   1.154 +class CUri16 : public CBase
   1.155 +	{
   1.156 +public: // Methods
   1.157 +	IMPORT_C static CUri16* CreateFileUriL(const TDesC& aFullFileName, TUint aFlags = 0);
   1.158 +	IMPORT_C static CUri16* CreatePrivateFileUriL(const TDesC& aRelativeFileName, TDriveNumber aDrive, TInt aFlags = 0);
   1.159 +
   1.160 +	IMPORT_C static CUri16* NewL(const TUriC16& aUri);
   1.161 +	IMPORT_C static CUri16* NewLC(const TUriC16& aUri);
   1.162 +	IMPORT_C static CUri16* NewL();
   1.163 +	IMPORT_C static CUri16* NewLC();
   1.164 +
   1.165 +	IMPORT_C static CUri16* ResolveL(const TUriC16& aBaseUri, const TUriC16& aRefUri);
   1.166 +
   1.167 +	IMPORT_C ~CUri16();
   1.168 +	IMPORT_C const TUriC16& Uri() const;
   1.169 +	IMPORT_C void SetComponentL(const TDesC16& aData, TUriComponent aComponent);
   1.170 +	IMPORT_C void RemoveComponentL(TUriComponent aComponent);
   1.171 +
   1.172 +private:	// Methods
   1.173 +
   1.174 +	CUri16(const TUriC16& aNewUri);
   1.175 +	void ConstructL();
   1.176 +	void FormUriL();
   1.177 +	void InitializeFileUriComponentsL(const TDesC& aFileName, TDriveNumber aDrive, TUint aFlags);
   1.178 +
   1.179 +private:	// Attributes
   1.180 +
   1.181 +	/** The descriptor buffer that contains the uri.
   1.182 +	 */
   1.183 +	HBufC16*	iUriBuf;
   1.184 +
   1.185 +	/** The parsed uri object.
   1.186 +	 */
   1.187 +	TUriC16	iUri;
   1.188 +
   1.189 +/**
   1.190 +	A friend class used for testing.
   1.191 +	@see		TUri16StateAccessor
   1.192 +	@since		6.0
   1.193 +	@internalComponent
   1.194 + */
   1.195 +	friend class TUri16StateAccessor;
   1.196 +
   1.197 +	};
   1.198 +
   1.199 +/** 	
   1.200 +Do not use. Use TUriC8 instead
   1.201 +@publishedAll
   1.202 +@deprecated Deprecated in 9.1 
   1.203 + */
   1.204 +typedef TUriC16			TUriC;
   1.205 +
   1.206 +/** 
   1.207 +Do not use. Use TUriParser8 instead
   1.208 +@publishedAll
   1.209 +@deprecated Deprecated in 9.1 
   1.210 + */
   1.211 +typedef TUriParser16	TUriParser;
   1.212 +
   1.213 +/** 
   1.214 +Do not use. Use CUri8 instead
   1.215 +@publishedAll
   1.216 +@deprecated Deprecated in 9.1 
   1.217 + */
   1.218 +typedef CUri16			CUri;
   1.219 +
   1.220 +#endif	// __URI16_H__