74 void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl, |
106 void DownloadAndHandleRoapTriggerL( const HBufC8* aUrl, |
75 CCoeEnv& aCoeEnv ); |
107 CCoeEnv& aCoeEnv ); |
76 |
108 |
77 HBufC8* GetErrorUrlL(); |
109 HBufC8* GetErrorUrlL(); |
78 |
110 |
79 |
111 // From Roap::MRoapObserver |
80 // from base class MHttpDownloadMgrObserver |
112 /** |
81 |
113 * ConnectionConfL |
82 /** |
114 * @return ETrue: the network can be establish |
83 * From MHttpDownloadMgrObserver. |
115 * EFalse: the ROAP transaction is canceled |
84 * Handle download manager events |
116 * |
85 * |
117 * @leave System wide error code */ |
86 * @param aDownload the download |
118 TBool ConnectionConfL(); |
87 * @param aEvent the event |
119 |
88 */ |
120 /** |
89 void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent ); |
121 * ContactRiConfL |
|
122 * @return ETrue: the user consent is achieved |
|
123 * EFalse: the user consent is not achieved |
|
124 * |
|
125 * @leave System wide error code */ |
|
126 TBool ContactRiConfL(); |
|
127 |
|
128 /** |
|
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 ); |
90 |
236 |
91 public: // Call back methods of MAknProgressDialogCallback |
237 public: // Call back methods of MAknProgressDialogCallback |
92 |
238 |
93 /** |
239 /** |
94 * ProgressDialog call back method. |
240 * ProgressDialog call back method. |
95 * Get's called when a dialog is dismissed. |
241 * Get's called when a dialog is dismissed. |
96 * |
242 * |
97 * @param aButtonId ID of the button pressed |
243 * @param aButtonId ID of the button pressed |
98 */ |
244 */ |
99 void DialogDismissedL( TInt aButtonId ); |
245 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 ); |
100 |
254 |
101 protected: |
255 protected: |
102 |
256 //from Cactive |
|
257 virtual void DoCancel(); |
|
258 |
|
259 virtual void RunL(); |
|
260 |
|
261 virtual TInt RunError( TInt aError ); |
103 private: |
262 private: |
104 |
263 |
105 /** |
264 /** |
106 * C++ default constructor. |
265 * C++ default constructor. |
107 */ |
266 */ |
110 void ConstructL(); |
269 void ConstructL(); |
111 |
270 |
112 /** |
271 /** |
113 * Set the browser default access point to be used |
272 * Set the browser default access point to be used |
114 */ |
273 */ |
115 void SetDefaultAccessPointL(); |
274 |
116 |
|
117 void DoDownloadAndHandleRoapTriggerL( const HBufC8* aUrl ); |
|
118 |
275 |
119 void ShowProgressNoteL( ); |
276 void ShowProgressNoteL( ); |
120 |
277 |
121 void RemoveProgressNoteL( ); |
278 void RemoveProgressNoteL( ); |
122 |
279 |
123 void HandlePostResponseUrlL(); |
280 void DoConnectL( TDownloadState aNextState ); |
124 |
281 |
|
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 ); |
125 |
291 |
126 private: // data |
292 private: // data |
127 |
293 |
128 /** |
294 /** |
129 * Download manager session |
295 * Download manager session |
130 */ |
296 */ |
131 RHttpDownloadMgr iDlMgr; |
297 WRT::DownloadManager* iDlMgr; |
132 |
298 |
|
299 /** |
|
300 * Download instance needs to be stored for handling signal slot mechanism |
|
301 */ |
|
302 WRT::Download* iDownload; |
|
303 |
133 /** |
304 /** |
134 * Used to make downloads synchronous |
305 * Used to make downloads synchronous |
135 */ |
306 */ |
136 CActiveSchedulerWait iWait; |
307 CActiveSchedulerWait iWait; |
137 |
308 |
138 /** |
309 /** |
139 * to store information on download |
310 * to store information on download |
140 */ |
311 */ |
141 TBool iDownloadSuccess; |
312 TBool iDownloadSuccess; |
142 TBool iConnectionError; |
313 TBool iConnectionError; |
|
314 |
|
315 /** |
|
316 * trigger URL |
|
317 */ |
|
318 HBufC8* iTriggerUrl; |
|
319 |
|
320 /** |
|
321 * trigger buffer |
|
322 */ |
|
323 HBufC8* iTriggerBuf; |
143 |
324 |
144 TBool iDialogDismissed; |
325 TBool iDialogDismissed; |
145 |
326 |
146 /** |
327 /** |
147 * Progess note dialog and progress info |
328 * Progess note dialog and progress info |