1 /* |
|
2 * Copyright (c) 2006-2007 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IRHTTPREQUESTDATA_H |
|
20 #define IRHTTPREQUESTDATA_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 // Constants |
|
25 /** |
|
26 * Used to specify the maximum header-field value length |
|
27 */ |
|
28 const TInt KMAXHEADERLENGTH = 255; |
|
29 |
|
30 /** |
|
31 * Used to specify the maximum URI length |
|
32 */ |
|
33 const TInt KMAXURILENGTH = 256; |
|
34 |
|
35 // Enumerations |
|
36 /** |
|
37 * Enum specifying the type of HTTP request |
|
38 */ |
|
39 enum TIRHttpDataProvider |
|
40 { |
|
41 EIRHttpGET = 1, EIRHttpPOST |
|
42 }; |
|
43 |
|
44 /** |
|
45 * Class to hold the request data |
|
46 */ |
|
47 class CIRHttpRequestData : public CBase |
|
48 { |
|
49 public: |
|
50 |
|
51 /** |
|
52 * void CIRHttpRequestData::CIRHttpRequestData() |
|
53 * Default C++ Constructor |
|
54 */ |
|
55 inline CIRHttpRequestData() |
|
56 { |
|
57 // Implementation not required |
|
58 } |
|
59 |
|
60 /** |
|
61 * void CIRHttpRequestData::~CIRHttpRequestData() |
|
62 * Default C++ Destructor |
|
63 * |
|
64 */ |
|
65 virtual inline ~CIRHttpRequestData() |
|
66 { |
|
67 // Implementation not required |
|
68 } |
|
69 public: |
|
70 |
|
71 /** |
|
72 * This value indicates type of request method ( GET / POST ) |
|
73 */ |
|
74 TInt iMethod; |
|
75 |
|
76 /** |
|
77 * IfModifiedSince header info |
|
78 */ |
|
79 TDateTime iIfModifiedSince; |
|
80 |
|
81 /** |
|
82 * Set as ETrue if the IfModifiedSince header is set |
|
83 */ |
|
84 TBool isIfModifiedSet; |
|
85 |
|
86 /** |
|
87 * Used to set the Accept-Language Header |
|
88 */ |
|
89 TBuf8 < KMAXHEADERLENGTH > iAcceptLanguage; |
|
90 |
|
91 /** |
|
92 * Used to set the Content-Type Header |
|
93 */ |
|
94 TBuf8 < KMAXHEADERLENGTH > iContentType; |
|
95 |
|
96 /** |
|
97 * Used to specify the URI |
|
98 */ |
|
99 TBuf8 < KMAXURILENGTH > iUri; |
|
100 |
|
101 }; |
|
102 |
|
103 |
|
104 class CIRHttpResponseData: public CBase |
|
105 { |
|
106 public: |
|
107 |
|
108 /** |
|
109 * void CIRHttpResponseData::CIRHttpResponseData() |
|
110 * Default C++ Constructor |
|
111 * |
|
112 */ |
|
113 inline CIRHttpResponseData() |
|
114 { |
|
115 // Implementation not required |
|
116 } |
|
117 |
|
118 /** |
|
119 * void CIRHttpResponseData::~CIRHttpResponseData() |
|
120 * Default C++ Destructor |
|
121 */ |
|
122 inline ~CIRHttpResponseData() |
|
123 { |
|
124 // Implementation not required |
|
125 } |
|
126 public: |
|
127 |
|
128 /** |
|
129 * Content type of the data |
|
130 */ |
|
131 TBuf8 < KMAXHEADERLENGTH > iContentType; |
|
132 |
|
133 /** |
|
134 * Date header value of the response |
|
135 */ |
|
136 TTime iDate; |
|
137 |
|
138 /** |
|
139 * Max age header value |
|
140 */ |
|
141 TBuf8 < KMAXHEADERLENGTH > iMaxAge; |
|
142 |
|
143 /** |
|
144 * Content-Length header value |
|
145 */ |
|
146 TBuf8 < KMAXHEADERLENGTH > iContentLength; |
|
147 |
|
148 /** |
|
149 * LastModified header value |
|
150 */ |
|
151 TTime iLastModified; |
|
152 |
|
153 /** |
|
154 * Expires header value |
|
155 */ |
|
156 TBuf8 < KMAXHEADERLENGTH > iExpires; |
|
157 |
|
158 /** |
|
159 * ETag header value, Used in logo downloads |
|
160 */ |
|
161 TBuf8 < KMAXHEADERLENGTH > iETag; |
|
162 |
|
163 }; |
|
164 |
|
165 #endif // IRHTTPREQUESTDATA_H |
|
166 |
|
167 |
|
168 |
|
169 |
|