|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "lcuiengine_p.h" |
|
20 #include "ut_lcuidefs.h" |
|
21 #include "lcuidefs.h" |
|
22 #include <hbview.h> |
|
23 |
|
24 HbView* lcutStub_LcUiEngine_currentView = 0; |
|
25 QChar lcStub_LcUiEngine_dialtone('0'); |
|
26 |
|
27 LcUiEnginePrivate::LcUiEnginePrivate( LcUiEngine& uiEngine, |
|
28 const QString &engineName, |
|
29 const QString &applicationDisplayName ) |
|
30 : mUiEngine ( uiEngine ), |
|
31 mEngineName( engineName.toUtf8() ), |
|
32 mSessionTitle( applicationDisplayName ) |
|
33 |
|
34 { |
|
35 mViewLayout = Lc_NoViewLayout; |
|
36 mLiveCommsEngine = 0; |
|
37 mCloseTimer = 0; |
|
38 mInvitingNote = 0; |
|
39 mWaitingNote = 0; |
|
40 mAcceptQuery = 0; |
|
41 mRecipientQuery = 0; |
|
42 mFullScreen = false; |
|
43 } |
|
44 |
|
45 LcUiEnginePrivate::~LcUiEnginePrivate() |
|
46 { |
|
47 } |
|
48 |
|
49 void LcUiEnginePrivate::start() |
|
50 { |
|
51 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_start ); |
|
52 } |
|
53 |
|
54 void LcUiEnginePrivate::setContentAreas( const QRectF& /*sharedContent*/, |
|
55 const QRectF& /*receivedContent*/ ) |
|
56 { |
|
57 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setContentAreas ); |
|
58 |
|
59 } |
|
60 |
|
61 bool LcUiEnginePrivate::setOrientation( Qt::Orientation /*orientation*/ ) |
|
62 { |
|
63 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_setOrientation ); |
|
64 return true; |
|
65 } |
|
66 |
|
67 void LcUiEnginePrivate::zoom( int /*value*/ ) |
|
68 { |
|
69 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_zoom ); |
|
70 |
|
71 } |
|
72 |
|
73 void LcUiEnginePrivate::stop() |
|
74 { |
|
75 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_stop ); |
|
76 |
|
77 } |
|
78 |
|
79 void LcUiEnginePrivate::updateSession() |
|
80 { |
|
81 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_updateSession ); |
|
82 |
|
83 } |
|
84 |
|
85 bool LcUiEnginePrivate::isLocalPlayerPlaying() const |
|
86 { |
|
87 return lcutStub_LcUiEngine_localplaying; |
|
88 } |
|
89 |
|
90 bool LcUiEnginePrivate::isRemotePlayerPlaying() const |
|
91 { |
|
92 return lcutStub_LcUiEngine_remoteplaying; |
|
93 } |
|
94 |
|
95 const QString& LcUiEnginePrivate::sessionTitle() const |
|
96 { |
|
97 return mSessionTitle; |
|
98 } |
|
99 const QString& LcUiEnginePrivate::recipient() const |
|
100 { |
|
101 return mRecipient; |
|
102 } |
|
103 |
|
104 const QString& LcUiEnginePrivate::phoneNumber() const |
|
105 { |
|
106 return mPhoneNumber; |
|
107 } |
|
108 |
|
109 LcViewLayoutHint LcUiEnginePrivate::viewLayout() const |
|
110 { |
|
111 return (LcViewLayoutHint)lcutStub_LcUiEngine_layout; |
|
112 } |
|
113 |
|
114 void LcUiEnginePrivate::setUiComponents(HbProgressDialog* invitingNote, |
|
115 HbProgressDialog* waitingNote, |
|
116 HbDialog* acceptQuery, |
|
117 HbDialog* recipientQuery, |
|
118 HbDialog* sharedVideoQuery) |
|
119 { |
|
120 mInvitingNote = invitingNote; |
|
121 mWaitingNote = waitingNote; |
|
122 mAcceptQuery = acceptQuery; |
|
123 mRecipientQuery = recipientQuery; |
|
124 mShareOwnVideoQuery = sharedVideoQuery; |
|
125 |
|
126 } |
|
127 |
|
128 void LcUiEnginePrivate::startReceiving() |
|
129 { |
|
130 |
|
131 } |
|
132 |
|
133 void LcUiEnginePrivate::stopForcefully() |
|
134 { |
|
135 |
|
136 } |
|
137 |
|
138 void LcUiEnginePrivate::emitViewLayoutChanged() |
|
139 { |
|
140 |
|
141 } |
|
142 |
|
143 bool LcUiEnginePrivate::usingVideoTelephoneEngine() |
|
144 { |
|
145 return mEngineName == "Videotelephony"; |
|
146 } |
|
147 |
|
148 void LcUiEnginePrivate::setMainCamera(const bool aMainCamera) |
|
149 { |
|
150 mMainCamera = aMainCamera; |
|
151 } |
|
152 |
|
153 bool LcUiEnginePrivate::mainCamera() const |
|
154 { |
|
155 return mMainCamera; |
|
156 } |
|
157 |
|
158 bool LcUiEnginePrivate::isMuted() const |
|
159 { |
|
160 return lcutStub_LcUiEngine_muted; |
|
161 } |
|
162 |
|
163 bool LcUiEnginePrivate::isSpeakerOn() const |
|
164 { |
|
165 return lcutStub_LcUiEngine_speakerOn; |
|
166 } |
|
167 |
|
168 void LcUiEnginePrivate::toggleMute() |
|
169 { |
|
170 lcutStub_LcUiEngine_muted = !lcutStub_LcUiEngine_muted; |
|
171 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_mute ); |
|
172 } |
|
173 |
|
174 void LcUiEnginePrivate::toggleCamera() |
|
175 { |
|
176 lcutStub_LcUiEngine_cameraMain = !lcutStub_LcUiEngine_cameraMain; |
|
177 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_toggleCamera ); |
|
178 } |
|
179 |
|
180 void LcUiEnginePrivate::toggleDisableCamera() |
|
181 { |
|
182 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_disableCamera ); |
|
183 } |
|
184 |
|
185 void LcUiEnginePrivate::toggleSpeaker() |
|
186 { |
|
187 lcutStub_LcUiEngine_speakerOn = !lcutStub_LcUiEngine_speakerOn; |
|
188 lcutStub_LcUiEngine_calledMethodsInstance().insert(0,lcutStub_LcUiEngine_speaker ); |
|
189 } |
|
190 |
|
191 int LcUiEnginePrivate::zoomValues( LcControlValues& values ) const |
|
192 { |
|
193 values.mMaxValue = 3; |
|
194 values.mMinValue = 1; |
|
195 values.mValue = 2; |
|
196 return 0; |
|
197 } |
|
198 |
|
199 void LcUiEnginePrivate::timerEvent(QTimerEvent */*event*/) |
|
200 { |
|
201 } |
|
202 |
|
203 void LcUiEnginePrivate::StateChanged( MLcSession& /*aSession*/ ) |
|
204 { |
|
205 |
|
206 } |
|
207 |
|
208 void LcUiEnginePrivate::StateChanged( MLcVideoPlayer& /*aPlayer*/ ) |
|
209 { |
|
210 |
|
211 } |
|
212 |
|
213 void LcUiEnginePrivate::Updated( MLcSession& /*aSession*/ ) |
|
214 { |
|
215 |
|
216 } |
|
217 |
|
218 void LcUiEnginePrivate::Updated( MLcVideoPlayer& /*aPlayer*/ ) |
|
219 { |
|
220 |
|
221 } |
|
222 |
|
223 |
|
224 void LcUiEnginePrivate::Failed( MLcSession& /*aSession*/, TInt /*aError*/ ) |
|
225 { |
|
226 |
|
227 } |
|
228 |
|
229 void LcUiEnginePrivate::Failed( MLcVideoPlayer& /*aPlayer*/, TInt /*aError*/ ) |
|
230 { |
|
231 |
|
232 } |
|
233 |
|
234 void LcUiEnginePrivate::SessionTimeChanged( MLcSession& /*aSession*/, |
|
235 const TTimeIntervalSeconds& /*aSeconds*/ ) |
|
236 { |
|
237 |
|
238 } |
|
239 |
|
240 TBool LcUiEnginePrivate::SelectRecipient( MDesCArray& /*aRecipientAddresses*/, |
|
241 TDes& /*aSelectedRecipientAddress*/ ) |
|
242 { |
|
243 return true; |
|
244 } |
|
245 |
|
246 TBool LcUiEnginePrivate::InputRecipient( TDes& /*aRecipientAddress*/ ) |
|
247 { |
|
248 return true; |
|
249 |
|
250 } |
|
251 |
|
252 void LcUiEnginePrivate::HandleForegroundStatus( TBool /*aForeground*/ ) |
|
253 { |
|
254 |
|
255 } |
|
256 |
|
257 void LcUiEnginePrivate::BlockUi( TBool /*aBlocked*/ ) |
|
258 { |
|
259 |
|
260 } |
|
261 |
|
262 |
|
263 bool LcUiEnginePrivate::fullScreenMode() |
|
264 { |
|
265 return mFullScreen; |
|
266 } |
|
267 |
|
268 |
|
269 void LcUiEnginePrivate::setFullScreenMode(bool aMode) |
|
270 { |
|
271 mFullScreen = aMode; |
|
272 } |
|
273 |
|
274 bool LcUiEnginePrivate::isMinimized()const |
|
275 { |
|
276 return lcutStub_LcUiEngine_windowState_minimized; |
|
277 } |
|
278 |
|
279 void LcUiEnginePrivate::minimize() |
|
280 { |
|
281 lcutStub_LcUiEngine_windowState_minimized = true; |
|
282 } |
|
283 |
|
284 void LcUiEnginePrivate::maximize() |
|
285 { |
|
286 lcutStub_LcUiEngine_windowState_minimized = false; |
|
287 } |
|
288 |
|
289 void LcUiEnginePrivate::setCurrentView(HbView* view) |
|
290 { |
|
291 lcutStub_LcUiEngine_currentView = view; |
|
292 } |
|
293 |
|
294 void LcUiEnginePrivate::handleEngineForegroundStatus() |
|
295 { |
|
296 } |
|
297 |
|
298 bool LcUiEnginePrivate::SendDialTone(const QChar aKey ) |
|
299 { |
|
300 lcStub_LcUiEngine_dialtone = aKey; |
|
301 return true; |
|
302 } |
|
303 |
|
304 //stub control |
|
305 |
|
306 bool lcutStub_LcUiEngine_expectCall( const QString& call, int callNdx ) |
|
307 { |
|
308 if ( callNdx >= lcutStub_LcUiEngine_calledMethodsInstance().count() ) { |
|
309 return call == lcutNoCall; |
|
310 } |
|
311 return lcutStub_LcUiEngine_calledMethodsInstance().count() > 0 ? |
|
312 lcutStub_LcUiEngine_calledMethodsInstance()[callNdx] == call : |
|
313 call == lcutNoCall; |
|
314 } |
|
315 |
|
316 |
|
317 void lcutStub_LcUiEngine_reset() |
|
318 { |
|
319 delete lcutStub_LcUiEngine_calledMethods; |
|
320 lcutStub_LcUiEngine_calledMethods = 0; |
|
321 lcutStub_LcUiEngine_failure = 0; |
|
322 lcutStub_LcUiEngine_layout = -1; |
|
323 lcutStub_LcUiEngine_cameraMain = false; |
|
324 lcutStub_LcUiEngine_muted = false; |
|
325 lcutStub_LcUiEngine_speakerOn = false; |
|
326 lcutStub_LcUiEngine_localplaying = true; |
|
327 lcutStub_LcUiEngine_remoteplaying = true; |
|
328 lcutStub_LcUiEngine_currentView = 0; |
|
329 lcStub_LcUiEngine_dialtone = '0'; |
|
330 } |
|
331 |
|
332 void lcutStub_LcUiEngine_setFailure( int failure ) |
|
333 { |
|
334 lcutStub_LcUiEngine_failure = failure; |
|
335 } |
|
336 |
|
337 void lcutStub_LcUiEngine_setLayout( int layout ) |
|
338 { |
|
339 lcutStub_LcUiEngine_layout = layout; |
|
340 } |
|
341 |
|
342 QStringList& lcutStub_LcUiEngine_calledMethodsInstance() |
|
343 { |
|
344 if ( !lcutStub_LcUiEngine_calledMethods ) { |
|
345 lcutStub_LcUiEngine_calledMethods = new QStringList(); |
|
346 } |
|
347 return *lcutStub_LcUiEngine_calledMethods; |
|
348 } |
|
349 |
|
350 void lcutStub_LcUiEngine_setCameraMain( bool val ) |
|
351 { |
|
352 lcutStub_LcUiEngine_cameraMain = val; |
|
353 } |
|
354 |
|
355 void lcutStub_LcUiEngine_setMuted( bool val ) |
|
356 { |
|
357 lcutStub_LcUiEngine_muted = val; |
|
358 } |
|
359 |
|
360 void lcutStub_LcUiEngine_setSpeaker( bool val ) |
|
361 { |
|
362 lcutStub_LcUiEngine_speakerOn = val; |
|
363 } |
|
364 |
|
365 void lcutStub_LcUiEngine_setLocalPlaying( bool val ) |
|
366 { |
|
367 lcutStub_LcUiEngine_localplaying = val; |
|
368 } |
|
369 |
|
370 void lcutStub_LcUiEngine_setRemotePlaying( bool val ) |
|
371 { |
|
372 lcutStub_LcUiEngine_remoteplaying = val; |
|
373 } |
|
374 |
|
375 HbView* lcutStub_LcUiEngine_getCurrentView() |
|
376 { |
|
377 return lcutStub_LcUiEngine_currentView; |
|
378 } |
|
379 |
|
380 |
|
381 QChar lcutStub_LcUiEngine_getDialToneChar() |
|
382 { |
|
383 return lcStub_LcUiEngine_dialtone; |
|
384 } |
|
385 |
|
386 |
|
387 void LcUiEnginePrivate::stopLocalVideo() |
|
388 { |
|
389 lcutStub_LcUiEngine_localplaying = false; |
|
390 } |
|
391 |
|
392 void LcUiEnginePrivate::startLocalVideo() |
|
393 { |
|
394 lcutStub_LcUiEngine_localplaying = true; |
|
395 } |
|
396 |
|
397 void LcUiEnginePrivate::volumeLevelChanged(const XQSettingsKey& /*aKey*/, const QVariant& /*aValue*/) |
|
398 { |
|
399 } |
|
400 |
|
401 // End of file |
|
402 |
|
403 |
|
404 |