|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef SEN_LAYERED_HTTP_TRANSPORT_PROPERTIES_H |
|
26 #define SEN_LAYERED_HTTP_TRANSPORT_PROPERTIES_H |
|
27 |
|
28 #include "senlayeredtransportproperties.h" |
|
29 |
|
30 class CSenLayeredHttpTransportProperties : public CSenLayeredTransportProperties |
|
31 { |
|
32 public: |
|
33 enum TSenHttpMethod |
|
34 { |
|
35 ESenHttpPut, |
|
36 ESenHttpDelete, |
|
37 ESenHttpGet, |
|
38 ESenHttpPost |
|
39 }; |
|
40 |
|
41 enum TSenHttpVersion |
|
42 { |
|
43 ESenHttp10, |
|
44 ESenHttp11 |
|
45 }; |
|
46 |
|
47 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(); |
|
48 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(); |
|
49 |
|
50 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(const TDesC8& aXmlUtf8, CSenXmlReader& aParser); |
|
51 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(const TDesC8& aXmlUtf8, CSenXmlReader& aParser); |
|
52 |
|
53 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(const CSenElement& aElement); |
|
54 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(const CSenElement& aElement); |
|
55 |
|
56 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(RStringPool& aStringPool); |
|
57 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(RStringPool& aStringPool); |
|
58 |
|
59 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(const TDesC8& aXmlUtf8, CSenXmlReader& aParser, RStringPool& aStringPool); |
|
60 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(const TDesC8& aXmlUtf8, CSenXmlReader& aParser, RStringPool& aStringPool); |
|
61 |
|
62 IMPORT_C static CSenLayeredHttpTransportProperties* NewL(const CSenElement& aElement, RStringPool& aStringPool); |
|
63 IMPORT_C static CSenLayeredHttpTransportProperties* NewLC(const CSenElement& aElement, RStringPool& aStringPool); |
|
64 |
|
65 // From MSenProperties |
|
66 virtual void SetReader(CSenXmlReader& aReader); |
|
67 virtual TSenPropertiesClassType PropertiesClassType(); |
|
68 virtual void WriteToL(RWriteStream& aWriteStream); |
|
69 virtual void ReadFromL(const TDesC8& aBuffer); |
|
70 virtual HBufC8* AsUtf8L(); |
|
71 virtual HBufC8* AsUtf8LC(); |
|
72 virtual TInt SetPropertyL(const TDesC8& aName, const TDesC8& aValue); |
|
73 virtual TInt PropertyL(const TDesC8& aName, TPtrC8& aValue); |
|
74 virtual TInt SetIntPropertyL(const TDesC8& aName, const TInt aValue); |
|
75 virtual TInt IntPropertyL(const TDesC8& aName, TInt& aValue); |
|
76 virtual TInt SetBoolPropertyL(const TDesC8& aName, const TBool aValue); |
|
77 virtual TInt BoolPropertyL(const TDesC8& aName, TBool& aValue); |
|
78 virtual TBool IsSafeToCast(TSenPropertiesClassType aClass); |
|
79 |
|
80 // From MSenLayeredProperties |
|
81 virtual void WriteToL(RWriteStream& aWriteStream, TSenPropertiesLayer aLayer); |
|
82 virtual void ReadFromL(const TDesC8& aBuffer, TSenPropertiesLayer aLayer); |
|
83 virtual HBufC8* AsUtf8L(TSenPropertiesLayer aLayer); |
|
84 virtual HBufC8* AsUtf8LC(TSenPropertiesLayer aLayer); |
|
85 virtual TInt ShrinkTo(TSenPropertiesLayer aLayer); |
|
86 virtual void ExpandToL(TSenPropertiesLayer aLayer); |
|
87 virtual TSenPropertiesLayer TopLayer(); |
|
88 virtual TInt SetPropertyL(const TDesC8& aName, const TDesC8& aValue, TSenPropertiesLayer aLayer); |
|
89 virtual TInt PropertyL(const TDesC8& aName, TPtrC8& aValue, TSenPropertiesLayer aLayer); |
|
90 virtual TInt PropertyL(const TDesC8& aName, MSenProperty*& aValue, TSenPropertiesLayer aLayer); |
|
91 virtual TInt PropertyL(const TDesC8& aName, MSenProperty*& aValue); |
|
92 virtual TInt PropertiesByTypeL(const TDesC8& aTypeName, RPointerArray<MSenProperty>& aArray); |
|
93 virtual TInt SetIntPropertyL(const TDesC8& aName, const TInt aValue, TSenPropertiesLayer aLayer); |
|
94 virtual TInt IntPropertyL(const TDesC8& aName, TInt& aValue, TSenPropertiesLayer aLayer); |
|
95 virtual MSenProperties* CloneL() const; |
|
96 virtual TInt SetBoolPropertyL(const TDesC8& aName, const TBool aValue, TSenPropertiesLayer aLayer); |
|
97 virtual TInt BoolPropertyL(const TDesC8& aName, TBool& aValue, TSenPropertiesLayer aLayer); |
|
98 virtual TInt SetPropertyL(const TDesC8& aName, const TDesC8& aValue, const TDesC8& aType); |
|
99 virtual TInt PropertyL(const TDesC8& aName, TPtrC8& aValue, TPtrC8& aType); |
|
100 |
|
101 |
|
102 |
|
103 // New Functions |
|
104 /** |
|
105 * Gets the IAP ID. |
|
106 * @param aCurrentIapId A TUint32 reference to be filled in with the |
|
107 * value of the IAP ID. |
|
108 * @return KErrNone if no error, or some of the system |
|
109 * wide error codes. |
|
110 */ |
|
111 virtual TInt IapIdL(TUint32& aCurrentIapId); |
|
112 |
|
113 /** |
|
114 * Gets the Proxy Port. |
|
115 * @param aProxyPort A TInt reference to be filled in with the |
|
116 * value of the Proxy Port. |
|
117 * @return KErrNone if no error, or some of the system |
|
118 * wide error codes. |
|
119 */ |
|
120 virtual TInt ProxyPortL(TInt& aProxyPort); |
|
121 |
|
122 /** |
|
123 * Gets the Proxy Host. |
|
124 * @param aProxyHost A TPtrC8 reference to be filled in with the |
|
125 * value of the Proxy Host. |
|
126 * @return KErrNone if no error, or some of the system |
|
127 * wide error codes. |
|
128 */ |
|
129 virtual TInt ProxyHostL(TPtrC8& aProxyHost); |
|
130 |
|
131 /** |
|
132 * Gets the Proxy Usage. |
|
133 * @param aProxyUsage A TBool reference to be filled in with the |
|
134 * value of the Proxy Usage. |
|
135 * @return KErrNone if no error, or some of the system |
|
136 * wide error codes. |
|
137 */ |
|
138 virtual TInt ProxyUsageL(TBool& aProxyUsage); |
|
139 |
|
140 /** |
|
141 * Gets the IAP Dialog. |
|
142 * @param aIAPDialog A TBool reference to be filled in with the |
|
143 * value of the IAPDialog. |
|
144 * @return KErrNone if no error, or some of the system |
|
145 * wide error codes. |
|
146 */ |
|
147 virtual TInt IAPDialogL(TBool& aIAPDialog); |
|
148 |
|
149 /** |
|
150 * Gets the Content Type. |
|
151 * @param aContentType A TPtrC8 reference to be filled in with the |
|
152 * value of the Content Type. |
|
153 * @return KErrNone if no error, or some of the system |
|
154 * wide error codes. |
|
155 */ |
|
156 virtual TInt ContentTypeL(TPtrC8& aContentType); |
|
157 |
|
158 /** |
|
159 * Gets the SoapAction. |
|
160 * @param aSoapAction A TPtrC8 reference to be filled in with the |
|
161 * value of the SoapAction. |
|
162 * @return KErrNone if no error, or some of the system |
|
163 * wide error codes. |
|
164 */ |
|
165 virtual TInt SoapActionL(TPtrC8& aSoapAction); |
|
166 |
|
167 /** |
|
168 * Gets the UserAgent. |
|
169 * @param aUserAgent A TPtrC8 reference to be filled in with the |
|
170 * value of the UserAgent. |
|
171 * @return KErrNone if no error, or some of the system |
|
172 * wide error codes. |
|
173 */ |
|
174 virtual TInt UserAgentL(TPtrC8& aUserAgent); |
|
175 |
|
176 /** |
|
177 * Gets the Accept. |
|
178 * @param aAccept A MSenProperty reference to be filled in with the |
|
179 * value of the Accept. |
|
180 * @return KErrNone if no error, or some of the system |
|
181 * wide error codes. |
|
182 */ |
|
183 virtual TInt AcceptL(MSenProperty*& aAccept); |
|
184 |
|
185 /** |
|
186 * Gets the Http method. |
|
187 * @param aHttpMethod A TSenHttpMethod reference to be filled in with |
|
188 * the value of the Http method. |
|
189 * @return KErrNone if no error, or some of the system |
|
190 * wide error codes. |
|
191 */ |
|
192 virtual TInt HttpMethodL(TSenHttpMethod& aHttpMethod); |
|
193 |
|
194 /** |
|
195 * Gets the Http version. |
|
196 * @param aHttpVersion A TSenHttpVersion reference to be filled in with |
|
197 * the value of the Http version. |
|
198 * @return KErrNone if no error, or some of the system |
|
199 * wide error codes. |
|
200 */ |
|
201 virtual TInt HttpVersionL(TSenHttpVersion& aHttpVersion); |
|
202 |
|
203 /** |
|
204 * Gets the Http version. |
|
205 * @param aHttpVersion A TSenHttpVersion reference to be filled in with |
|
206 * the value of the Http version. |
|
207 * @return KErrNone if no error, or some of the system |
|
208 * wide error codes. |
|
209 */ |
|
210 virtual TInt HttpHeadersL(RPointerArray<MSenProperty>& aArray); |
|
211 /** |
|
212 * Gets the Device ID. |
|
213 * @param aDeviceID A TPtrC8 reference to be filled in with the |
|
214 * value of the DeviceId. |
|
215 * @return KErrNone if no error, or some of the system |
|
216 * wide error codes. |
|
217 */ |
|
218 virtual TInt DeviceIDL(TPtrC8& aDeviceID); |
|
219 |
|
220 /** |
|
221 * Gets download folder for incoming BLOB (binary large objects) |
|
222 * @param aDownloadFolder - A TPtrC8 reference to be filled in with the |
|
223 * value of the shared, public folder for downloaded |
|
224 * content |
|
225 * @return KErrNone if no error, or some of the system |
|
226 * wide error codes. |
|
227 */ |
|
228 |
|
229 virtual TInt DownloadFolderL(TPtrC8& aDownloadFolder); |
|
230 |
|
231 /** |
|
232 * Gets filename of file attachment |
|
233 * @param aCid - cid for filename |
|
234 * @param aFileName - filename of file attachment with current cid |
|
235 * @return KErrNone if no error, or some of the system |
|
236 * wide error codes. |
|
237 */ |
|
238 virtual TInt FileAttachmentL(const TDesC8& aCid, HBufC8*& aFileName); |
|
239 |
|
240 /** |
|
241 * Gets namespace of Microsoft schema |
|
242 * @param aMwsNamespace - namespace |
|
243 * @return KErrNone if no error, or some of the system |
|
244 * wide error codes. |
|
245 */ |
|
246 virtual TInt MwsNamespaceL(TPtrC8& aMwsNamespace); |
|
247 |
|
248 /** |
|
249 * Destructor. |
|
250 */ |
|
251 virtual ~CSenLayeredHttpTransportProperties(); |
|
252 |
|
253 protected: // base class functions |
|
254 |
|
255 |
|
256 virtual void BaseConstructL(const TDesC8& aLocalname, |
|
257 const TDesC8& aXml, |
|
258 CSenXmlReader* aParser = NULL, |
|
259 RStringPool* aStringPool = NULL); |
|
260 |
|
261 |
|
262 virtual void BaseConstructL(const TDesC8& aNamespace, |
|
263 const TDesC8& aLocalname, |
|
264 const TDesC8& aXml, |
|
265 CSenXmlReader* aParser = NULL, |
|
266 RStringPool* aStringPool = NULL); |
|
267 |
|
268 |
|
269 virtual void BaseConstructL(const TDesC8& aNamespace, |
|
270 const TDesC8& aLocalname, |
|
271 const TDesC8& aQualifiedName, |
|
272 const TDesC8& aXml, |
|
273 CSenXmlReader* aParser = NULL, |
|
274 RStringPool* aStringPool = NULL); |
|
275 |
|
276 virtual void BaseConstructL(const CSenElement& aElement, |
|
277 RStringPool* aStringPool = NULL); |
|
278 |
|
279 public: |
|
280 /** |
|
281 * Gets the SNAP ID. |
|
282 * @param aCurrentSnapId A TUint32 reference to be filled in with the |
|
283 * value of the SNAP ID. |
|
284 * @return KErrNone if no error, or some of the system |
|
285 * wide error codes. |
|
286 */ |
|
287 virtual TInt SnapIdL(TUint32& aCurrentSnapId) ; |
|
288 |
|
289 /** |
|
290 * Gets the SNAP Dialog. |
|
291 * @param aSNAPDialog A TBool reference to be filled in with the |
|
292 * value of the IAPDialog. |
|
293 * @return KErrNone if no error, or some of the system |
|
294 * wide error codes. |
|
295 */ |
|
296 virtual TInt SnapDialogL(TBool& aSnapDialog); |
|
297 protected: |
|
298 /** |
|
299 * Constructor. |
|
300 */ |
|
301 CSenLayeredHttpTransportProperties(); |
|
302 }; |
|
303 |
|
304 #endif // SEN_LAYERED_HTTP_TRANSPORT_PROPERTIES_H |
|
305 |
|
306 // End of File |
|
307 |