106 void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl, |
74 void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl, |
107 CCoeEnv& aCoeEnv ); |
75 CCoeEnv& aCoeEnv ); |
108 |
76 |
109 HBufC8* GetErrorUrlL(); |
77 HBufC8* GetErrorUrlL(); |
110 |
78 |
111 // From Roap::MRoapObserver |
79 |
112 /** |
80 // from base class MHttpDownloadMgrObserver |
113 * ConnectionConfL |
|
114 * @return ETrue: the network can be establish |
|
115 * EFalse: the ROAP transaction is canceled |
|
116 * |
|
117 * @leave System wide error code */ |
|
118 TBool ConnectionConfL(); |
|
119 |
81 |
120 /** |
82 /** |
121 * ContactRiConfL |
83 * From MHttpDownloadMgrObserver. |
122 * @return ETrue: the user consent is achieved |
84 * Handle download manager events |
123 * EFalse: the user consent is not achieved |
|
124 * |
85 * |
125 * @leave System wide error code */ |
86 * @param aDownload the download |
126 TBool ContactRiConfL(); |
87 * @param aEvent the event |
127 |
88 */ |
128 /** |
89 void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent ); |
129 * TransIdConfL |
|
130 * @return ETrue: the user consent is achieved |
|
131 * EFalse: the user consent is not achieved |
|
132 * |
|
133 * @leave System wide error code */ |
|
134 |
|
135 TBool TransIdConfL(); |
|
136 |
|
137 /** |
|
138 * RightsObjectDetailsL |
|
139 * |
|
140 * The function is called after successful completion of RO acquisition |
|
141 * protocol. The passes information about stored rights objects to the |
|
142 * observer. |
|
143 * |
|
144 * @since 3.0 |
|
145 * @param aRightsList: A list of pointers to rights objects. |
|
146 * Contents of aRightsList are owend by ROAP engine |
|
147 * |
|
148 * @leave System wide error code */ |
|
149 void RightsObjectDetailsL( const RPointerArray<CDRMRights>& aRightsList ); |
|
150 |
|
151 /** |
|
152 * ContentDownloadInfoL |
|
153 * |
|
154 * The function is called when the ROAP engine notices that it is about to |
|
155 * receive a multipart content as a ROAP response. The method must return via |
|
156 * out-parameter the path to a temp folder where the content is saved during |
|
157 * download. The name that is used as filename when saving the content to |
|
158 * the appropriate palce and the maximum size of the content (a safety upper limit) |
|
159 * must also be provided via out-parameters. |
|
160 * |
|
161 * @since 3.0 |
|
162 * @param aTempFolder: (out-param) The path of the temp folder, or KNullDesC |
|
163 * @param aContentName: (out-param) The name of the content, or KNullDesC (defaut name is used) |
|
164 * @param aMaxSize: (out-param) The maximum size of the content, or -1 if not known |
|
165 * |
|
166 * @leave System wide error code */ |
|
167 |
|
168 void ContentDownloadInfoL( TPath& aTempFolder, |
|
169 TFileName& aContentName, |
|
170 TInt& aMaxSize ); |
|
171 |
|
172 /** |
|
173 * ContentDetailsL |
|
174 * |
|
175 * The function is called when the ROAP engine has received a DCF content (together |
|
176 * with a ROAP response) The ROAP engine saves the DCF to the appropriate location |
|
177 * and gives out the information about the saved DCF file by calling this method |
|
178 * |
|
179 * @since 3.0 |
|
180 * @param aPath: The path andf the filename of the saved DCF file |
|
181 * @param aType: The plain MIME type of the saved DCF file |
|
182 * @param aAppUid: The handler app UID of the saved DCF file |
|
183 * |
|
184 * @leave System wide error code */ |
|
185 |
|
186 void ContentDetailsL( const TDesC& aPath, |
|
187 const TDesC8& aType, |
|
188 const TUid& aAppUid ); |
|
189 |
|
190 /** |
|
191 * RoapProgressInfoL |
|
192 * |
|
193 * The function provides progress information about ROAP processing to the |
|
194 * observer |
|
195 * |
|
196 * @since 3.0 |
|
197 * @param aProgressInfo: An integer value representing the state of |
|
198 * ROAP processing, counting in bytes |
|
199 * |
|
200 * @leave System wide error code */ |
|
201 |
|
202 void RoapProgressInfoL( const TInt aProgressInfo ); |
|
203 |
|
204 /** |
|
205 * ErrorUrlL |
|
206 * |
|
207 * The function is called in ROAP error case and it provides an error URL |
|
208 * for the caller. The calling entity should send an HTTP GET request to |
|
209 * the URL which should then return an HTML page. |
|
210 * |
|
211 * @since 3.0 |
|
212 * @param aErrorUrl: The error URL |
|
213 * |
|
214 * |
|
215 * @leave System wide error code */ |
|
216 |
|
217 void ErrorUrlL( const TDesC8& aErrorUrl ); |
|
218 |
|
219 /** |
|
220 * PostResponseUrlL |
|
221 * |
|
222 * The function is called if handled ROAP metering report response |
|
223 * contains PostResponseURL extension. The calling entity should send |
|
224 * an HTTP GET request to the URL, which should return ROAP trigger, |
|
225 * download descriptor or multipart message containing both |
|
226 * download descriptor and ROAP trigger. |
|
227 * |
|
228 * @since 3.2 |
|
229 * @param aPostResponseUrl: The URL to be fetched |
|
230 * after handling ROAP metering response |
|
231 * with PostResponseURL extension. |
|
232 * |
|
233 * |
|
234 * @leave System wide error code */ |
|
235 void PostResponseUrlL( const TDesC8& aPostResponseUrl ); |
|
236 |
90 |
237 public: // Call back methods of MAknProgressDialogCallback |
91 public: // Call back methods of MAknProgressDialogCallback |
238 |
92 |
239 /** |
93 /** |
240 * ProgressDialog call back method. |
94 * ProgressDialog call back method. |
241 * Get's called when a dialog is dismissed. |
95 * Get's called when a dialog is dismissed. |
242 * |
96 * |
243 * @param aButtonId ID of the button pressed |
97 * @param aButtonId ID of the button pressed |
244 */ |
98 */ |
245 void DialogDismissedL( TInt aButtonId ); |
99 void DialogDismissedL( TInt aButtonId ); |
246 |
|
247 /** |
|
248 * Handle download manager events |
|
249 * |
|
250 * @param aEvent the event |
|
251 */ |
|
252 |
|
253 void HandleDownloadEventL( WRT::DownloadEvent* aEvent ); |
|
254 |
100 |
255 protected: |
101 protected: |
256 //from Cactive |
|
257 virtual void DoCancel(); |
|
258 |
102 |
259 virtual void RunL(); |
|
260 |
|
261 virtual TInt RunError( TInt aError ); |
|
262 private: |
103 private: |
263 |
104 |
264 /** |
105 /** |
265 * C++ default constructor. |
106 * C++ default constructor. |
266 */ |
107 */ |
269 void ConstructL(); |
110 void ConstructL(); |
270 |
111 |
271 /** |
112 /** |
272 * Set the browser default access point to be used |
113 * Set the browser default access point to be used |
273 */ |
114 */ |
|
115 void SetDefaultAccessPointL(); |
274 |
116 |
|
117 void DoDownloadAndHandleRoapTriggerL( const HBufC8* aUrl ); |
275 |
118 |
276 void ShowProgressNoteL( ); |
119 void ShowProgressNoteL( ); |
277 |
120 |
278 void RemoveProgressNoteL( ); |
121 void RemoveProgressNoteL( ); |
279 |
122 |
280 void DoConnectL( TDownloadState aNextState ); |
123 void HandlePostResponseUrlL(); |
281 |
124 |
282 void DoDownloadRoapTriggerL( TDownloadState aNextState ); |
|
283 |
|
284 void DoSaveRoapTriggerL( TDownloadState aNextState ); |
|
285 |
|
286 void DoHandleRoapTriggerL( TDownloadState aNextState ); |
|
287 |
|
288 void CompleteToState( TDownloadState aNextState, TInt aError ); |
|
289 |
|
290 void ProcessDownloadEventL( WRT::Download& aDownload, WRT::DownloadEvent& aEvent ); |
|
291 |
125 |
292 private: // data |
126 private: // data |
293 |
127 |
294 /** |
128 /** |
295 * Download manager session |
129 * Download manager session |
296 */ |
130 */ |
297 WRT::DownloadManager* iDlMgr; |
131 RHttpDownloadMgr iDlMgr; |
298 |
132 |
299 /** |
|
300 * Download instance needs to be stored for handling signal slot mechanism |
|
301 */ |
|
302 WRT::Download* iDownload; |
|
303 |
|
304 /** |
133 /** |
305 * Used to make downloads synchronous |
134 * Used to make downloads synchronous |
306 */ |
135 */ |
307 CActiveSchedulerWait iWait; |
136 CActiveSchedulerWait iWait; |
308 |
137 |
309 /** |
138 /** |
310 * to store information on download |
139 * to store information on download |
311 */ |
140 */ |
312 TBool iDownloadSuccess; |
141 TBool iDownloadSuccess; |
313 TBool iConnectionError; |
142 TBool iConnectionError; |
314 |
|
315 /** |
|
316 * trigger URL |
|
317 */ |
|
318 HBufC8* iTriggerUrl; |
|
319 |
|
320 /** |
|
321 * trigger buffer |
|
322 */ |
|
323 HBufC8* iTriggerBuf; |
|
324 |
143 |
325 TBool iDialogDismissed; |
144 TBool iDialogDismissed; |
326 |
145 |
327 /** |
146 /** |
328 * Progess note dialog and progress info |
147 * Progess note dialog and progress info |