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 // This file contains the API definition for the classes TUriC16 and
15 // CUri16. These classes provide non-modifying (TUriC16) and modifying
16 // (CUri16) functionality for the components of a Uri as described in
24 @deprecated Deprecated in 9.1
34 #include <uricommon.h>
39 Dependencies : TUriComponent.
40 Comments : Provides non-modifying functionality on the components of a uri object as
41 defined in RFC2396. There are 5 components; scheme, authority, path, query and fragment.
43 The object holds descriptor pointers to the parsed uri components and a descriptor pointer
44 to the uri. It is non-owning. It uses 16-bit descriptors.
46 The functionality provided by this API allows the uri components to be extracted from the
47 parsed uri, checked for their presence in the uri and be compared with those in another
50 @deprecated Deprecated in 9.1
56 IMPORT_C HBufC* GetFileNameL() const;
57 IMPORT_C HBufC* GetFileNameL(TUriFileName aType) const;
58 IMPORT_C const TDesC16& Extract(TUriComponent aComponent) const;
59 IMPORT_C void UriWithoutFragment(TPtrC16& aUriNoFrag) const;
61 IMPORT_C TBool IsPresent(TUriComponent aComponent) const;
62 IMPORT_C TBool IsSchemeValid() const;
64 IMPORT_C TInt Compare(const TUriC16& aUri, TUriComponent aComponent) const;
66 IMPORT_C const TDesC16& UriDes() const;
68 IMPORT_C TInt Validate() const;
69 IMPORT_C TInt Equivalent(const TUriC16& aUri) const;
70 IMPORT_C HBufC* DisplayFormL(TUriComponent aComponent = EUriComplete) const;
80 TInt ValidateL() const;
81 TInt EquivalentL(const TDesC16& aUri) const;
83 protected: // Attributes
85 /** The array of descriptor pointers to the uri components.
87 TPtrC16 iComponent[EUriMaxComponents];
89 /** The descriptor pointer to the uri.
99 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
101 A friend class used for testing.
102 @see TUriC16StateAccessor
107 A friend class used for testing.
108 @see TUriC16StateAccessor
112 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
113 friend class TUriC16StateAccessor;
118 Dependencies : TUriC16
119 Comments : Provides functionality to parse a descriptor into the components of a uri as
120 defined in RFC2396. There are 5 components; scheme, authority, path, query and fragment.
122 It uses 16-bit descriptors.
124 Format of a uri is; scheme://authority path?query\#fragment
126 @warning The descriptor that is parsed by an object of this class will be referenced
127 by that object. If the original descriptor is no longer in scope there will be undefined
130 @deprecated Deprecated in 9.1. Use UriUtils::CreateUriL() instead
133 class TUriParser16 : public TUriC16
137 IMPORT_C TUriParser16();
138 IMPORT_C TInt Parse(const TDesC16& aUri);
142 Dependencies : CBase, TUriC16.
143 Comments : Provides modifying functionality on the components of a uri object, as
144 defined in RFC2396. There are 5 components; scheme. authority, path, query and fragment.
146 The object holds parsed uri information. It is owning. It uses 16-bit descriptors.
148 The functionality provided by this API allows the uri components to be set or removed
149 from this parsed uri. Also, it provides a reference to TUriC16 object so that the non-modifying
150 functionality can be used.
152 @deprecated Deprecated in 9.1
155 class CUri16 : public CBase
158 IMPORT_C static CUri16* CreateFileUriL(const TDesC& aFullFileName, TUint aFlags = 0);
159 IMPORT_C static CUri16* CreatePrivateFileUriL(const TDesC& aRelativeFileName, TDriveNumber aDrive, TInt aFlags = 0);
161 IMPORT_C static CUri16* NewL(const TUriC16& aUri);
162 IMPORT_C static CUri16* NewLC(const TUriC16& aUri);
163 IMPORT_C static CUri16* NewL();
164 IMPORT_C static CUri16* NewLC();
166 IMPORT_C static CUri16* ResolveL(const TUriC16& aBaseUri, const TUriC16& aRefUri);
169 IMPORT_C const TUriC16& Uri() const;
170 IMPORT_C void SetComponentL(const TDesC16& aData, TUriComponent aComponent);
171 IMPORT_C void RemoveComponentL(TUriComponent aComponent);
175 CUri16(const TUriC16& aNewUri);
178 void InitializeFileUriComponentsL(const TDesC& aFileName, TDriveNumber aDrive, TUint aFlags);
180 private: // Attributes
182 /** The descriptor buffer that contains the uri.
186 /** The parsed uri object.
189 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
191 A friend class used for testing.
192 @see TUri16StateAccessor
197 A friend class used for testing.
198 @see TUri16StateAccessor
202 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
203 friend class TUri16StateAccessor;
208 Do not use. Use TUriC8 instead
210 @deprecated Deprecated in 9.1
212 typedef TUriC16 TUriC;
215 Do not use. Use TUriParser8 instead
217 @deprecated Deprecated in 9.1
219 typedef TUriParser16 TUriParser;
222 Do not use. Use CUri8 instead
224 @deprecated Deprecated in 9.1
228 #endif // __URI16_H__