96 |
100 |
97 delete mConnectionMonitor; |
101 delete mConnectionMonitor; |
98 } |
102 } |
99 |
103 |
100 /*! |
104 /*! |
101 description |
105 Checks for connected IAP. |
102 |
|
103 /a |
|
104 /return |
|
105 */ |
106 */ |
106 void ExampleAppEnginePrivate::construct() |
107 void ExampleAppEnginePrivate::construct() |
107 { |
108 { |
108 FUNC_LOG |
109 FUNC_LOG |
109 |
110 |
110 resolveIapL(); |
111 resolveIapL(); |
111 resolveIapNameL(); |
112 resolveIapNameL(); |
112 } |
113 } |
113 |
114 |
114 /*! |
115 /*! |
115 description |
116 Returns currently connected IAP. |
116 |
|
117 /a |
|
118 /return |
|
119 */ |
117 */ |
120 int ExampleAppEnginePrivate::getConnectedIap() const |
118 int ExampleAppEnginePrivate::getConnectedIap() const |
121 { |
119 { |
122 FUNC_LOG |
120 FUNC_LOG |
123 |
121 |
124 return mIap; |
122 return mIap; |
125 } |
123 } |
126 |
124 |
127 /*! |
125 /*! |
128 description |
126 Returns the name of the currently connected IAP. |
129 |
|
130 /a |
|
131 /return |
|
132 */ |
127 */ |
133 QString ExampleAppEnginePrivate::getConnectedIapName() const |
128 QString ExampleAppEnginePrivate::getConnectedIapName() const |
134 { |
129 { |
135 FUNC_LOG |
130 FUNC_LOG |
136 |
131 |
137 return mIapName; |
132 return mIapName; |
138 } |
133 } |
139 |
134 |
140 /*! |
135 /*! |
141 description |
136 Returns the current playback state. |
142 |
|
143 /a |
|
144 /return |
|
145 */ |
137 */ |
146 int ExampleAppEnginePrivate::getPlaybackState() const |
138 int ExampleAppEnginePrivate::getPlaybackState() const |
147 { |
139 { |
148 FUNC_LOG |
140 FUNC_LOG |
149 |
141 |
150 return mPlaybackState; |
142 return mPlaybackState; |
151 } |
143 } |
152 |
144 |
153 /*! |
145 /*! |
154 description |
146 Returns whether the currently selected renderer supports seek functionality. |
155 |
|
156 /a |
|
157 /return |
|
158 */ |
147 */ |
159 bool ExampleAppEnginePrivate::isSeekSupported() const |
148 bool ExampleAppEnginePrivate::isSeekSupported() const |
160 { |
149 { |
161 FUNC_LOG |
150 FUNC_LOG |
162 |
151 |
212 TRAP_IGNORE(searchRenderingDevicesL()); |
199 TRAP_IGNORE(searchRenderingDevicesL()); |
213 } |
200 } |
214 } |
201 } |
215 |
202 |
216 /*! |
203 /*! |
217 description |
204 Start a rendering session with the renderer provided in /a uuid. |
218 |
|
219 /a |
|
220 /return |
|
221 */ |
205 */ |
222 void ExampleAppEnginePrivate::prepareRenderingDevice(const QString &uuid) |
206 void ExampleAppEnginePrivate::prepareRenderingDevice(const QString &uuid) |
223 { |
207 { |
224 FUNC_LOG |
208 FUNC_LOG |
225 |
209 |
226 TRAP_IGNORE(prepareRenderingDeviceL(uuid)); |
210 TRAP_IGNORE(prepareRenderingDeviceL(uuid)); |
227 } |
211 } |
228 |
212 |
229 /*! |
213 /*! |
230 description |
214 Start file initialization for sharing. |
231 |
|
232 /a |
|
233 /return |
|
234 */ |
215 */ |
235 int ExampleAppEnginePrivate::initFile(const QString& file) |
216 int ExampleAppEnginePrivate::initFile(const QString& file) |
236 { |
217 { |
237 FUNC_LOG |
218 FUNC_LOG |
238 |
219 |
240 |
221 |
241 return err; |
222 return err; |
242 } |
223 } |
243 |
224 |
244 /*! |
225 /*! |
245 description |
226 Issues the play() command to the renderer. |
246 |
|
247 /a |
|
248 /return |
|
249 */ |
227 */ |
250 void ExampleAppEnginePrivate::play() |
228 void ExampleAppEnginePrivate::play() |
251 { |
229 { |
252 FUNC_LOG |
230 FUNC_LOG |
253 |
231 |
254 TRAP_IGNORE(playL()); |
232 TRAP_IGNORE(playL()); |
255 } |
233 } |
256 |
234 |
257 /*! |
235 /*! |
258 description |
236 Issues the pause() command to the renderer. |
259 |
|
260 /a |
|
261 /return |
|
262 */ |
237 */ |
263 void ExampleAppEnginePrivate::pause() |
238 void ExampleAppEnginePrivate::pause() |
264 { |
239 { |
265 FUNC_LOG |
240 FUNC_LOG |
266 |
241 |
267 TRAP_IGNORE(pauseL()); |
242 TRAP_IGNORE(pauseL()); |
268 } |
243 } |
269 |
244 |
270 /*! |
245 /*! |
271 description |
246 Issues the stop() command to the renderer. |
272 |
|
273 /a |
|
274 /return |
|
275 */ |
247 */ |
276 void ExampleAppEnginePrivate::stop() |
248 void ExampleAppEnginePrivate::stop() |
277 { |
249 { |
278 FUNC_LOG |
250 FUNC_LOG |
279 |
251 |
280 TRAP_IGNORE(stopL()); |
252 TRAP_IGNORE(stopL()); |
281 } |
253 } |
282 |
254 |
283 /*! |
255 /*! |
284 description |
256 Issues the volumeUp() command to the renderer. |
285 |
|
286 /a |
|
287 /return |
|
288 */ |
257 */ |
289 void ExampleAppEnginePrivate::volumeUp() |
258 void ExampleAppEnginePrivate::volumeUp() |
290 { |
259 { |
291 FUNC_LOG |
260 FUNC_LOG |
292 |
261 |
293 // TODO: implement |
262 // TODO: implement |
294 } |
263 } |
295 |
264 |
296 /*! |
265 /*! |
297 description |
266 Issues the volumeDown() command to the renderer. |
298 |
|
299 /a |
|
300 /return |
|
301 */ |
267 */ |
302 void ExampleAppEnginePrivate::volumeDown() |
268 void ExampleAppEnginePrivate::volumeDown() |
303 { |
269 { |
304 FUNC_LOG |
270 FUNC_LOG |
305 |
271 |
306 // TODO: implement |
272 // TODO: implement |
307 } |
273 } |
308 |
274 |
309 /*! |
275 /*! |
310 description |
276 Issues the rew() command to the renderer. |
311 |
|
312 /a |
|
313 /return |
|
314 */ |
277 */ |
315 void ExampleAppEnginePrivate::rew() |
278 void ExampleAppEnginePrivate::rew() |
316 { |
279 { |
317 FUNC_LOG |
280 FUNC_LOG |
318 |
281 |
319 // TODO: implement |
282 // TODO: implement |
320 } |
283 } |
321 |
284 |
322 /*! |
285 /*! |
323 description |
286 Issues the ff() command to the renderer. |
324 |
|
325 /a |
|
326 /return |
|
327 */ |
287 */ |
328 void ExampleAppEnginePrivate::ff() |
288 void ExampleAppEnginePrivate::ff() |
329 { |
289 { |
330 FUNC_LOG |
290 FUNC_LOG |
331 |
291 |
332 // TODO: implement |
292 // TODO: implement |
333 } |
293 } |
334 |
294 |
335 /*! |
295 /*! |
336 description |
296 Callback function that UPnP AV Controller calls when a new UPnP AV Device is |
337 |
297 found from the network. |
338 /a |
298 From MUPnPAVDeviceObserver |
339 /return |
|
340 */ |
299 */ |
341 void ExampleAppEnginePrivate::UPnPDeviceDiscovered(const CUpnpAVDevice& aDevice) |
300 void ExampleAppEnginePrivate::UPnPDeviceDiscovered(const CUpnpAVDevice& aDevice) |
342 { |
301 { |
343 FUNC_LOG |
302 FUNC_LOG |
344 |
303 |
345 TRAP_IGNORE(upnpDeviceDiscoveredL(aDevice)); |
304 TRAP_IGNORE(upnpDeviceDiscoveredL(aDevice)); |
346 } |
305 } |
347 |
306 |
348 /*! |
307 /*! |
349 description |
308 Callback function that UPnP AV Controller calls when a UPnP AV Device has |
350 |
309 disappeared from the network. |
351 /a |
310 From MUPnPAVDeviceObserver |
352 /return |
|
353 */ |
311 */ |
354 void ExampleAppEnginePrivate::UPnPDeviceDisappeared(const CUpnpAVDevice& aDevice) |
312 void ExampleAppEnginePrivate::UPnPDeviceDisappeared(const CUpnpAVDevice& aDevice) |
355 { |
313 { |
356 FUNC_LOG |
314 FUNC_LOG |
357 |
315 |
387 delete device; |
345 delete device; |
388 } |
346 } |
389 } |
347 } |
390 |
348 |
391 /*! |
349 /*! |
392 description |
350 Callback function that UPnP AV Controller calls when the WLAN |
393 |
351 connection has been lost. All existing sessions should be considered |
394 /a |
352 invalid. |
395 /return |
353 From MUPnPAVDeviceObserver |
396 */ |
354 */ |
397 void ExampleAppEnginePrivate::WLANConnectionLost() |
355 void ExampleAppEnginePrivate::WLANConnectionLost() |
398 { |
356 { |
399 FUNC_LOG |
357 FUNC_LOG |
400 |
358 |
401 // no implementation required |
359 // no implementation required |
402 } |
360 } |
403 |
361 |
404 /*! |
362 /*! |
405 description |
363 Just pass to volume state machine |
406 |
364 From MUPnPAVRenderingSessionObserver |
407 /a |
|
408 /return |
|
409 */ |
365 */ |
410 void ExampleAppEnginePrivate::VolumeResult(TInt aError, |
366 void ExampleAppEnginePrivate::VolumeResult(TInt aError, |
411 TInt aVolumeLevel, |
367 TInt aVolumeLevel, |
412 TBool aActionResponse) |
368 TBool aActionResponse) |
413 { |
369 { |
418 mVolumeStateMachine->VolumeResult(aError, aVolumeLevel, aActionResponse); |
374 mVolumeStateMachine->VolumeResult(aError, aVolumeLevel, aActionResponse); |
419 } |
375 } |
420 } |
376 } |
421 |
377 |
422 /*! |
378 /*! |
423 description |
379 Just pass to volume state machine |
424 |
380 From MUPnPAVRenderingSessionObserver |
425 /a |
|
426 /return |
|
427 */ |
381 */ |
428 void ExampleAppEnginePrivate::MuteResult(TInt aError, |
382 void ExampleAppEnginePrivate::MuteResult(TInt aError, |
429 TBool aMute, |
383 TBool aMute, |
430 TBool aActionResponse) |
384 TBool aActionResponse) |
431 { |
385 { |
436 mVolumeStateMachine->MuteResult(aError, aMute, aActionResponse); |
390 mVolumeStateMachine->MuteResult(aError, aMute, aActionResponse); |
437 } |
391 } |
438 } |
392 } |
439 |
393 |
440 /*! |
394 /*! |
441 description |
395 Just pass to rendering state machine |
442 |
396 From MUPnPAVRenderingSessionObserver |
443 /a |
|
444 /return |
|
445 */ |
397 */ |
446 void ExampleAppEnginePrivate::InteractOperationComplete(TInt aError, |
398 void ExampleAppEnginePrivate::InteractOperationComplete(TInt aError, |
447 TUPnPAVInteractOperation aOperation) |
399 TUPnPAVInteractOperation aOperation) |
448 { |
400 { |
449 FUNC_LOG |
401 FUNC_LOG |
453 mRenderingStateMachine->InteractOperationComplete(aError, aOperation); |
405 mRenderingStateMachine->InteractOperationComplete(aError, aOperation); |
454 } |
406 } |
455 } |
407 } |
456 |
408 |
457 /*! |
409 /*! |
458 description |
410 Just pass to rendering state machine |
459 |
411 From MUPnPAVRenderingSessionObserver |
460 /a |
|
461 /return |
|
462 */ |
412 */ |
463 void ExampleAppEnginePrivate::PositionInfoResult(TInt aError, |
413 void ExampleAppEnginePrivate::PositionInfoResult(TInt aError, |
464 const TDesC8& aTrackPosition, |
414 const TDesC8& aTrackPosition, |
465 const TDesC8& aTrackLength) |
415 const TDesC8& aTrackLength) |
466 { |
416 { |
503 mRenderingStateMachine->SetNextURIResult(aError); |
449 mRenderingStateMachine->SetNextURIResult(aError); |
504 } |
450 } |
505 } |
451 } |
506 |
452 |
507 /*! |
453 /*! |
508 description |
454 Renderer to which there was an active session has disappeared. The session should be |
509 |
455 considered invalid. |
510 /a |
456 From MUPnPAVRenderingSessionObserver |
511 /return |
|
512 */ |
457 */ |
513 void ExampleAppEnginePrivate::MediaRendererDisappeared(TUPnPDeviceDisconnectedReason /*aReason*/) |
458 void ExampleAppEnginePrivate::MediaRendererDisappeared(TUPnPDeviceDisconnectedReason /*aReason*/) |
514 { |
459 { |
515 FUNC_LOG |
460 FUNC_LOG |
516 |
461 |
517 // TODO: implement |
462 // TODO: implement |
518 } |
463 } |
519 |
464 |
520 /*! |
465 /*! |
521 description |
466 Callback for telling that the rendering state machine is in synch with |
522 |
467 the rendering device. |
523 /a |
468 From MUpnpRenderingStateMachineObserver |
524 /return |
|
525 */ |
469 */ |
526 void ExampleAppEnginePrivate::RendererSyncReady(TInt /*aError*/, Upnp::TState /*aState*/) |
470 void ExampleAppEnginePrivate::RendererSyncReady(TInt /*aError*/, Upnp::TState /*aState*/) |
527 { |
471 { |
528 FUNC_LOG |
472 FUNC_LOG |
529 |
473 |
530 // TODO: implement |
474 // TODO: implement |
531 } |
475 } |
532 |
476 |
533 /*! |
477 /*! |
534 description |
478 Rendering device's state has been changed. |
535 |
479 From MUpnpRenderingStateMachineObserver |
536 /a |
|
537 /return |
|
538 */ |
480 */ |
539 void ExampleAppEnginePrivate::RenderingStateChanged(TInt aError, |
481 void ExampleAppEnginePrivate::RenderingStateChanged(TInt aError, |
540 Upnp::TState aState, |
482 Upnp::TState aState, |
541 TBool /*aUserOriented*/, |
483 TBool /*aUserOriented*/, |
542 TInt /*aStateParam*/) |
484 TInt /*aStateParam*/) |
576 |
518 |
577 emit q_ptr->stateChanged(mPlaybackState); |
519 emit q_ptr->stateChanged(mPlaybackState); |
578 } |
520 } |
579 |
521 |
580 /*! |
522 /*! |
581 description |
523 For synchronizing UI with the progress of the playback on the |
582 |
524 rendering device. |
583 /a |
525 From MUpnpRenderingStateMachineObserver |
584 /return |
|
585 */ |
526 */ |
586 void ExampleAppEnginePrivate::PositionSync(TInt /*aError*/, |
527 void ExampleAppEnginePrivate::PositionSync(TInt /*aError*/, |
587 Upnp::TPositionMode /*aMode*/, |
528 Upnp::TPositionMode /*aMode*/, |
588 TInt /*aDuration*/, |
529 TInt /*aDuration*/, |
589 TInt /*aPosition*/) |
530 TInt /*aPosition*/) |
592 |
533 |
593 // TODO: implement |
534 // TODO: implement |
594 } |
535 } |
595 |
536 |
596 /*! |
537 /*! |
597 description |
538 Callback for telling that the volume state machine is in synch with |
598 |
539 the rendering device. |
599 /a |
540 From MUpnpVolumeStateMachineObserver |
600 /return |
|
601 */ |
541 */ |
602 void ExampleAppEnginePrivate::VolumeSyncReady(TInt /*aError*/) |
542 void ExampleAppEnginePrivate::VolumeSyncReady(TInt /*aError*/) |
603 { |
543 { |
604 FUNC_LOG |
544 FUNC_LOG |
605 |
545 |
606 // TODO: implement |
546 // TODO: implement |
607 } |
547 } |
608 |
548 |
609 /*! |
549 /*! |
610 description |
550 Rendering device's volume has changed. |
611 |
551 From MUpnpVolumeStateMachineObserver |
612 /a |
|
613 /return |
|
614 */ |
552 */ |
615 void ExampleAppEnginePrivate::VolumeChanged(TInt /*aError*/, |
553 void ExampleAppEnginePrivate::VolumeChanged(TInt /*aError*/, |
616 TInt /*aVolume*/, |
554 TInt /*aVolume*/, |
617 TBool /*aUserOriented*/) |
555 TBool /*aUserOriented*/) |
618 { |
556 { |
1039 delete iapName; |
946 delete iapName; |
1040 } |
947 } |
1041 } |
948 } |
1042 |
949 |
1043 /*! |
950 /*! |
1044 description |
951 Helper function for Symbian descriptor to Qt string conversion. |
1045 |
|
1046 /a |
|
1047 /return |
|
1048 */ |
952 */ |
1049 QString ExampleAppEnginePrivate::asString(const TDesC &desc) const |
953 QString ExampleAppEnginePrivate::asString(const TDesC &desc) const |
1050 { |
954 { |
1051 return QString::fromUtf16(desc.Ptr(), desc.Length()); |
955 return QString::fromUtf16(desc.Ptr(), desc.Length()); |
1052 } |
956 } |
1053 |
957 |
1054 /*! |
958 /*! |
1055 description |
959 Helper function for Symbian descriptor to Qt string conversion. |
1056 |
|
1057 /a |
|
1058 /return |
|
1059 */ |
960 */ |
1060 QString ExampleAppEnginePrivate::asString8(const TDesC8 &desc) const |
961 QString ExampleAppEnginePrivate::asString8(const TDesC8 &desc) const |
1061 { |
962 { |
1062 return QString::fromUtf8((char*)desc.Ptr(), desc.Length()); |
963 return QString::fromUtf8((char*)desc.Ptr(), desc.Length()); |
1063 } |
964 } |