52 void ConstructL(); |
52 void ConstructL(); |
53 |
53 |
54 public: // API |
54 public: // API |
55 |
55 |
56 /** |
56 /** |
57 * portal button methods |
57 * portal button methods. This - along with the parameter - |
|
58 * represents the action that the portal button is configured |
|
59 * to do when pressed. The portal button itself should contain |
|
60 * the execution code itself. |
58 */ |
61 */ |
59 enum TMethod |
62 enum TMethod |
60 { |
63 { |
61 ENone = 0, // no method |
64 ENone = 0, // no method |
62 EHttp, // open browser to a certain page |
65 EHttp, // open browser to a certain page |
63 EWidget // open given widget with params |
66 EWidget, // open given widget with params |
|
67 EApplication // launch an application |
64 }; |
68 }; |
65 |
69 |
66 /** |
70 /** |
67 * Number of portal buttons (1 or more) |
71 * Number of portal buttons (1 or more) |
68 */ |
72 */ |
74 */ |
78 */ |
75 const TDesC& PortalButtonText( TInt aIndex ); |
79 const TDesC& PortalButtonText( TInt aIndex ); |
76 |
80 |
77 /** |
81 /** |
78 * Icon to be displayed on a portal button |
82 * Icon to be displayed on a portal button |
79 * Logo syntax follows the widget icon syntax in MHsContentInfo |
83 * Logo syntax follows the widget icon syntax in CWmImageConverter |
80 * @param aIndex index of the button, starting at 0 |
84 * @param aIndex index of the button, starting at 0 |
81 */ |
85 */ |
82 const TDesC& PortalButtonIcon( TInt aIndex ); |
86 const TDesC& PortalButtonIcon( TInt aIndex ); |
83 |
|
84 /** |
|
85 * Bundle ID related to this button |
|
86 * parameter is valid if this button launches an application |
|
87 * @param aIndex index of the button, starting at 0 |
|
88 */ |
|
89 const TDesC& PortalButtonBundleId( TInt aIndex ); |
|
90 |
87 |
91 /** |
88 /** |
92 * Portal button action method. |
89 * Portal button action method. |
93 * Defines what happens when the portal button is pressed. |
90 * Defines what happens when the portal button is pressed. |
94 * @param aIndex index of the button, starting at 0 |
91 * @param aIndex index of the button, starting at 0 |
95 */ |
92 */ |
96 TMethod PortalButtonPrimaryMethod( TInt aIndex ); |
93 TMethod PortalButtonPrimaryMethod( TInt aIndex ); |
97 |
94 |
98 /** |
95 /** |
|
96 * Service name for the primary method. |
|
97 * For EHttp this is unused. |
|
98 * For EWidget, this is the widget Bundle ID. |
|
99 * For EApplication, this is the application name. |
|
100 * @param aIndex index of the button, starting at 0 |
|
101 */ |
|
102 const TDesC& PortalButtonPrimaryService( TInt aIndex ); |
|
103 |
|
104 /** |
99 * parameters related to the method. |
105 * parameters related to the method. |
100 * For EHttp this is the HTTP address |
106 * For EHttp this is the HTTP address |
101 * for EWidget the parameters passed to the widget |
107 * For EWidget the parameters passed to the widget |
|
108 * For EApplication the params passed to the app. |
102 * @param aIndex index of the button, starting at 0 |
109 * @param aIndex index of the button, starting at 0 |
103 */ |
110 */ |
104 const TDesC& PortalButtonPrimaryParams( TInt aIndex ); |
111 const TDesC& PortalButtonPrimaryParams( TInt aIndex ); |
105 |
112 |
106 /** |
113 /** |
110 * @param aIndex index of the button, starting at 0 |
117 * @param aIndex index of the button, starting at 0 |
111 */ |
118 */ |
112 TMethod PortalButtonSecondaryMethod( TInt aIndex ); |
119 TMethod PortalButtonSecondaryMethod( TInt aIndex ); |
113 |
120 |
114 /** |
121 /** |
|
122 * Service name for the primary method. |
|
123 * For EHttp this is unused. |
|
124 * For EWidget, this is the widget Bundle ID. |
|
125 * For EApplication, this is the application name. |
|
126 * @param aIndex index of the button, starting at 0 |
|
127 */ |
|
128 const TDesC& PortalButtonSecondaryService( TInt aIndex ); |
|
129 |
|
130 /** |
115 * Parameters for Secondary method. Like Primary method |
131 * Parameters for Secondary method. Like Primary method |
116 * Works like Primary params. |
132 * Works like Primary params. |
117 * @param aIndex index of the button, starting at 0 |
133 * @param aIndex index of the button, starting at 0 |
118 */ |
134 */ |
119 const TDesC& PortalButtonSecondaryParams( TInt aIndex ); |
135 const TDesC& PortalButtonSecondaryParams( TInt aIndex ); |
120 |
136 |
121 |
|
122 private: // New functions |
137 private: // New functions |
123 |
138 |
|
139 void LoadConfigurationL(); |
124 TInt FindCorrectLanguageId(); |
140 TInt FindCorrectLanguageId(); |
125 HBufC* ReadParameterL( TInt aKey ); |
141 HBufC* ReadParameterL( TInt aKey ); |
126 HBufC* ReadLocalisedParameterL( TInt aOffset ); |
142 HBufC* ReadLocalisedParameterL( TInt aOffset ); |
|
143 void IndexConversion( TInt& aIndex ); |
127 |
144 |
128 private: |
145 private: |
129 |
146 |
130 /** |
147 /** |
131 * the central repository |
148 * the central repository |
142 * system language |
159 * system language |
143 */ |
160 */ |
144 TInt iLanguageIndex; |
161 TInt iLanguageIndex; |
145 |
162 |
146 /** |
163 /** |
147 * OviStore widget bundle ID |
164 * OVI store button text |
|
165 */ |
|
166 HBufC* iOviButtonTitle; |
|
167 |
|
168 /** |
|
169 * OVI store button icon |
|
170 */ |
|
171 HBufC* iOviButtonIcon; |
|
172 |
|
173 /** |
|
174 * OVI store button browser Url |
|
175 * (browser is used if OVI client is not working) |
|
176 */ |
|
177 HBufC* iOviButtonUrl; |
|
178 |
|
179 /** |
|
180 * OVI store button widget client param |
|
181 */ |
|
182 HBufC* iOviStoreClientParam; |
|
183 |
|
184 /** |
|
185 * OVI store button widget bundle ID |
148 */ |
186 */ |
149 HBufC* iOviStoreBundleId; |
187 HBufC* iOviStoreBundleId; |
150 |
188 |
151 /** |
189 /** |
152 * OviStore widget client param |
190 * OPERATOR button text |
153 */ |
191 */ |
154 HBufC* iOviStoreClientParam; |
192 HBufC* iOperatorButtonTitle; |
155 |
193 |
156 /** |
194 /** |
157 * Localized Url to start browser |
195 * OPERATOR store icon |
158 */ |
196 */ |
159 HBufC* iOviStoreUrl; |
197 HBufC* iOperatorButtonIcon; |
160 |
198 |
161 /** |
199 /** |
162 * Localised OVI store text |
200 * OPERATOR store button browser Url |
163 */ |
201 */ |
164 HBufC* iOviStoreText; |
202 HBufC* iOperatorButtonUrl; |
165 |
|
166 /** |
|
167 * OVI store icon |
|
168 */ |
|
169 HBufC* iOviStoreIcon; |
|
170 |
203 |
171 }; |
204 }; |
172 |
205 |
173 #endif // WMCONFIGURATION_H |
206 #endif // WMCONFIGURATION_H |
174 |
207 |