|
1 /* |
|
2 * Copyright (c) 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: Handle load progress events |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HSBROWSERLOADEVENTOBSERVER_H |
|
21 #define HSBROWSERLOADEVENTOBSERVER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <brctlinterface.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CHsBrowserContainer; |
|
28 |
|
29 // CONSTANTS |
|
30 _LIT8( KHttp, "http" ); |
|
31 const TInt KTotalPollingTime = 300000000; |
|
32 const TInt KExecutionTimeInterval = 10000000; |
|
33 const TInt KBufSize = 4; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * This class is used to receive load progress events. |
|
38 */ |
|
39 class CHsBrowserLoadEventObserver : public CBase, public MBrCtlLoadEventObserver |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CHsBrowserLoadEventObserver* NewL( CHsBrowserContainer* aContainer ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CHsBrowserLoadEventObserver(); |
|
52 |
|
53 public: // from MBrCtlLoadEventObserver |
|
54 |
|
55 /** |
|
56 * From MBrCtlLoadEventObserver, load events notification. |
|
57 */ |
|
58 void HandleBrowserLoadEventL( TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, |
|
59 TUint aSize, |
|
60 TUint16 aTransactionId) ; |
|
61 private: |
|
62 |
|
63 /** |
|
64 * Constructor. |
|
65 */ |
|
66 CHsBrowserLoadEventObserver( CHsBrowserContainer* aContainer ); |
|
67 |
|
68 /** |
|
69 * By default Symbian 2nd phase constructor is private. |
|
70 */ |
|
71 void ConstructL(); |
|
72 |
|
73 private: // new |
|
74 |
|
75 /** |
|
76 * Update label in the navigation pane. |
|
77 * |
|
78 * @param aName Label for navi pane. |
|
79 */ |
|
80 void UpdateNaviLabel( const TDesC& aName ); |
|
81 |
|
82 /** |
|
83 * Update name in fast swapper. |
|
84 * |
|
85 * @param aName Name in fast swapper. |
|
86 */ |
|
87 void UpdateFastSwapNameL( const TDesC& aName ); |
|
88 |
|
89 /** |
|
90 * Get page title, udpate navi label and name in fast swapper. |
|
91 */ |
|
92 void UpdateNameL(); |
|
93 |
|
94 /** |
|
95 * Start polling internet connection. |
|
96 */ |
|
97 void TestInternetConnectivityL(); |
|
98 |
|
99 /** |
|
100 * Update boolean flag for internet connectivity test. |
|
101 */ |
|
102 void UpdateDoIctFlagL(); |
|
103 |
|
104 private: // data |
|
105 |
|
106 /** |
|
107 * Pointer to the container class associated with this observer. |
|
108 */ |
|
109 CHsBrowserContainer* iContainer; // not owner |
|
110 |
|
111 /** |
|
112 * Pointer to internet connectivity test object. |
|
113 */ |
|
114 CIctsClientInterface* iIcts; // owner |
|
115 |
|
116 /** |
|
117 * Boolean flag for Internet Connectivity Test. |
|
118 */ |
|
119 TBool iDoIct; |
|
120 |
|
121 /** |
|
122 * Used to differentiate the navibar content: no title shown yet when |
|
123 * we are just loading the logon page |
|
124 */ |
|
125 TBool iIsFirstLoad; |
|
126 }; |
|
127 |
|
128 #endif // HSBROWSERLOADEVENTOBSERVER_H |
|
129 |
|
130 // End of File |