|
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 the License "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: Handles the viewing of a single frame. If the page is not frame |
|
15 * enabled, this class is used as the single view. If frame |
|
16 * enabled, there is one instance of this class for each frame. |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef __WEBDATALOADCONSUMER_H__ |
|
21 #define __WEBDATALOADCONSUMER_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "BrCtl.h" |
|
25 |
|
26 //forward declarations |
|
27 |
|
28 class WebDataLoadConsumer : public MBrCtlDataLoadConsumer |
|
29 { |
|
30 public: |
|
31 static WebDataLoadConsumer* initWithMetaData(CBrCtl* brctl, const TDesC& url, const TDataType& dataType, |
|
32 TUid charsetUid, TUint contentLength, MBrCtlDataLoadSupplier* brCtlDataLoadSupplier); |
|
33 ~WebDataLoadConsumer(); |
|
34 void stopDataLoad(); |
|
35 |
|
36 public: // from MBrCtlDataLoadConsumer |
|
37 /** |
|
38 * Pass the next data chunk |
|
39 * @since 2.8 |
|
40 * @param aData The data chunk to process |
|
41 * @return void |
|
42 */ |
|
43 void HandleNextDataChunk(const TDesC8& aData); |
|
44 |
|
45 /** |
|
46 * Inform the Browser Control about completion of data load |
|
47 * @since 2.8 |
|
48 * @return void |
|
49 */ |
|
50 void HandleLoadComplete(); |
|
51 |
|
52 /** |
|
53 * Inform the Browser Control that an error occured |
|
54 * if HandleError() is called, then LoadComplete() is infered. |
|
55 * @since 2.8 |
|
56 * @param aError The error code |
|
57 * @return void |
|
58 */ |
|
59 void HandleError(TInt aError); |
|
60 private: |
|
61 WebDataLoadConsumer(CBrCtl* brctl, const TDataType& dataType, TUid charsetUid, |
|
62 TUint contentLength, MBrCtlDataLoadSupplier* brCtlDataLoadSupplier); |
|
63 |
|
64 private: |
|
65 CBrCtl* m_brctl; |
|
66 HBufC* m_url; |
|
67 TDataType m_dataType; |
|
68 TUid m_charsetUid; |
|
69 int m_contentLength; |
|
70 MBrCtlDataLoadSupplier* m_brCtlDataLoadSupplier; |
|
71 HBufC8* m_data; |
|
72 }; |
|
73 |
|
74 #endif //__WEBDATALOADCONSUMER_H__ |