1 /* |
|
2 * Copyright (c) 2007-2008 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: Class header for TWsfMainViewController |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef T_WSFMAINVIEWCONTROLLER_H |
|
19 #define T_WSFMAINVIEWCONTROLLER_H |
|
20 |
|
21 // EXTERNAL INCLUDES |
|
22 #include <e32def.h> |
|
23 |
|
24 |
|
25 // INTERNAL INCLUDES |
|
26 #include "wsfsession.h" |
|
27 #include "wsfwlaninfo.h" |
|
28 #include "wsfmainviewcontrollerif.h" |
|
29 #include "wsfmainviewpartner.h" |
|
30 #include "wsfmainviewcontrollerpartner.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CWsfMainViewModel; |
|
35 class CWsfMainViewContainer; |
|
36 class CWsfWlanInfoArray; |
|
37 class MWsfMainViewPartner; |
|
38 |
|
39 // CLASS DEFINITION |
|
40 /** |
|
41 * TWsfMainViewController acts as a view level controller |
|
42 * @since S60 5.0 |
|
43 */ |
|
44 class TWsfMainViewController : public MWsfMainViewControllerIf, |
|
45 public MWsfMainViewControllerPartner |
|
46 { |
|
47 |
|
48 public: // New methods |
|
49 |
|
50 |
|
51 /** |
|
52 * Set view level model |
|
53 * @since S60 5.0 |
|
54 * @param aModel - model pointer |
|
55 */ |
|
56 void SetModel( CWsfMainViewModel* aModel ); |
|
57 |
|
58 /** |
|
59 * Set view level view |
|
60 * @param aContainer - container pointer |
|
61 */ |
|
62 void SetContainer( CWsfMainViewContainer* aContainer ); |
|
63 |
|
64 /** |
|
65 * Updates available WLAN list to the display |
|
66 * @param aWlanList - Current Wlan Array |
|
67 */ |
|
68 void UpdateHotSpotsL( CWsfWlanInfoArray* aWlanList ); |
|
69 |
|
70 /** |
|
71 * Updates the local copy of the selected wlaninfo |
|
72 * @since S60 5.0 |
|
73 */ |
|
74 void UpdateSelectedItemL(); |
|
75 |
|
76 |
|
77 public: //From MWsfMainViewControllerIf |
|
78 |
|
79 /** |
|
80 * Updates WLAN list with values passed as parameter |
|
81 * @param aWlanArray list of WLAN |
|
82 * @since S60 5.0 |
|
83 */ |
|
84 void UpdateWlanListL( CWsfWlanInfoArray* aWlanArray ); |
|
85 |
|
86 /** |
|
87 * Request to refresh the mainview |
|
88 * @since S60 5.0 |
|
89 */ |
|
90 void RefreshL(); |
|
91 |
|
92 /** |
|
93 * Request to refresh the mainview |
|
94 * @return Details of selected WLAN |
|
95 * @since S60 5.0 |
|
96 */ |
|
97 TWsfWlanInfo* SelectedItem(); |
|
98 |
|
99 /** |
|
100 * Sets partner object |
|
101 * @aPartner The partner |
|
102 * @since S60 5.0 |
|
103 */ |
|
104 void SetPartner( MWsfMainViewPartner& aPartner ); |
|
105 |
|
106 |
|
107 public: //MWsfMainViewControllerPartner |
|
108 |
|
109 /** |
|
110 * Handles up key presses |
|
111 * @since S60 5.0 |
|
112 */ |
|
113 void HandleUpKeyPressedL(); |
|
114 |
|
115 /** |
|
116 * Handles down key presses |
|
117 * @since S60 5.0 |
|
118 */ |
|
119 void HandleDownKeyPressedL(); |
|
120 |
|
121 /** |
|
122 * Handles selection key presses |
|
123 * @since S60 5.0 |
|
124 */ |
|
125 void HandleSelectionKeyPressedL(); |
|
126 |
|
127 private: |
|
128 |
|
129 /** |
|
130 * Updated navipane |
|
131 */ |
|
132 void UpdateNaviPaneL(); |
|
133 |
|
134 |
|
135 private: // Data |
|
136 |
|
137 //Ref: View level model |
|
138 CWsfMainViewModel* iModel; |
|
139 |
|
140 //Ref: View level view |
|
141 CWsfMainViewContainer* iContainer; |
|
142 |
|
143 //Ref: Partner |
|
144 MWsfMainViewPartner* iPartner; |
|
145 |
|
146 // Temporary storage for the current wlaninfo |
|
147 TWsfWlanInfo iSelectedItem; |
|
148 |
|
149 // Indicates whether a real wlaninfo is selected |
|
150 TBool iValidItem; |
|
151 }; |
|
152 |
|
153 // INLINE FUNCTIONS |
|
154 |
|
155 #endif // T_WSFMAINVIEWCONTROLLER_H |
|
156 |
|
157 // End of file |
|
158 |
|