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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file contains the API definition for the classes TAuthorityC16 and
15 // CAuthority16. These classes provide non-modifying (TAuthorityC16) and
16 // modifying (CAuthority16) functionality for the components of an
17 // Authority as described in RFC2396.
26 @deprecated Deprecated in 9.1
29 #ifndef __AUTHORITY16_H__
30 #define __AUTHORITY16_H__
35 #include <authoritycommon.h>
39 Dependencies : TAuthorityComponent.
40 Comments : Provides non-modifying functionality on the components of an authority
41 object as defined in RFC2396. There are 3 components; userinfo, host and port.
43 The object holds descriptor pointers to the parsed authority components and a descriptor
44 pointer to the authority. It is non-owning. It uses 16-bit descriptors.
46 The functionality provided by this API allows the authority components to be extracted
47 from the parsed authority, checked for their presence in the authority and be compared
48 with those in another TAuthorityC16 object.
50 @deprecated Deprecated in 9.1
57 IMPORT_C const TDesC16& Extract(TAuthorityComponent aComponent) const;
58 IMPORT_C TBool IsPresent(TAuthorityComponent aComponent) const;
59 IMPORT_C TInt Compare(const TAuthorityC16& aAuthority, TAuthorityComponent aComponent) const;
60 IMPORT_C const TDesC16& AuthorityDes() const;
61 IMPORT_C HBufC* DisplayFormL(TAuthorityComponent aComponent = EAuthorityComplete ) const;
66 IMPORT_C TAuthorityC16();
70 protected: // Attributes
73 The array of descriptor pointers to the authority components.
75 TPtrC16 iComponent[EAuthorityMaxComponents];
78 The descriptor pointer to the authority.
80 TPtrC16 iAuthorityDes;
87 friend class CAuthority16;
90 A friend class used for testing.
91 @see TAuthorityC16StateAccessor
94 friend class TAuthorityC16StateAccessor;
99 Dependencies : TAuthorityC16
100 Comments : Provides functionality to parse a descriptor into the components of an
101 authority as defined in RFC2396. There are 3 components; userinfo, host and port.
103 This uses 16-bit descriptors.
105 Format of an authority is; [userinfo@]host[:port]
107 @warning The descriptor that is parsed by an object of this class will be referenced
108 by that object. If the original descriptor is no longer in scope there will be undefined
111 @deprecated Deprecated in 9.1. Use UriUtils::CreateAuthorityL() instead
114 class TAuthorityParser16 : public TAuthorityC16
118 IMPORT_C TAuthorityParser16();
119 IMPORT_C TInt Parse(const TDesC16& aAuthority);
124 Dependencies : CBase, TAuthorityC16.
125 Comments : Provides modifying functionality on the components of an authority object, as
126 defined in RFC2396. There are 3 components; userinfo, host and port.
128 The object holds parsed authority information. It is owning. It uses 16-bit descriptors.
130 The functionality provided by this API allows the authority components to be set or removed
131 from this parsed authority. Also, it provides a reference to TAuthorityC16 object so that
132 the non-modifying functionality can be used.
134 @deprecated Deprecated in 9.1
137 class CAuthority16 : public CBase
141 IMPORT_C static CAuthority16* NewL(const TAuthorityC16& aAuthority);
142 IMPORT_C static CAuthority16* NewLC(const TAuthorityC16& aAuthority);
143 IMPORT_C static CAuthority16* NewL();
144 IMPORT_C static CAuthority16* NewLC();
145 IMPORT_C ~CAuthority16();
147 IMPORT_C const TAuthorityC16& Authority() const;
148 IMPORT_C void SetComponentL(const TDesC16& aData, TAuthorityComponent aComponent);
149 IMPORT_C void SetAndEscapeComponentL(const TDesC16& aData, TAuthorityComponent aComponent);
150 IMPORT_C void RemoveComponentL(TAuthorityComponent aComponent);
154 CAuthority16(const TAuthorityC16& aAuthority);
158 void FormAuthorityL();
160 private: // Attributes
163 The descriptor buffer that contains the authority.
165 HBufC16* iAuthorityBuf;
168 The parsed authority object.
170 TAuthorityC16 iAuthority;
173 A friend class used for testing.
174 @see TAuthority16StateAccessor
177 friend class TAuthority16StateAccessor;
181 Do not use. Use TAuthorityC8 instead
183 @deprecated Deprecated in 9.1
185 typedef TAuthorityC16 TAuthorityC;
188 Do not use. Use TAuthorityParser8 instead
190 @deprecated Deprecated in 9.1
192 typedef TAuthorityParser16 TAuthorityParser;
195 Do not use. Use CAuthority8 instead
197 @deprecated Deprecated in 9.1
199 typedef CAuthority16 CAuthority;
201 #endif // __AUTHORITY16_H__