|
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: Implementation of VideoServiceUri |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 #include "videoservices.h" |
|
21 #include "videoserviceuri.h" |
|
22 #include "videoplayerengine.h" |
|
23 #include "mpxvideo_debug.h" |
|
24 |
|
25 // ------------------------------------------------------------------------------------------------- |
|
26 // VideoServiceUri() |
|
27 // ------------------------------------------------------------------------------------------------- |
|
28 // |
|
29 VideoServiceUri::VideoServiceUri( VideoServices* parent, |
|
30 VideoPlayerEngine* engine, |
|
31 QLatin1String service ) |
|
32 : XQServiceProvider( service, parent ) |
|
33 , mEngine( engine ) |
|
34 , mServiceApp( parent ) |
|
35 { |
|
36 MPX_ENTER_EXIT(_L("VideoServiceUri::VideoServiceUri()")); |
|
37 publishAll(); |
|
38 } |
|
39 |
|
40 // ------------------------------------------------------------------------------------------------- |
|
41 // ~VideoServiceUri() |
|
42 // ------------------------------------------------------------------------------------------------- |
|
43 // |
|
44 VideoServiceUri::~VideoServiceUri() |
|
45 { |
|
46 MPX_ENTER_EXIT(_L("VideoServiceUri::~VideoServiceUri()")); |
|
47 } |
|
48 |
|
49 // ------------------------------------------------------------------------------------------------- |
|
50 // setEngine() |
|
51 // ------------------------------------------------------------------------------------------------- |
|
52 // |
|
53 void VideoServiceUri::setEngine( VideoPlayerEngine* engine ) |
|
54 { |
|
55 MPX_ENTER_EXIT(_L("VideoServiceUri::setEngine()")); |
|
56 mEngine = engine; |
|
57 } |
|
58 |
|
59 // ------------------------------------------------------------------------------------------------- |
|
60 // view( QString ) |
|
61 // ------------------------------------------------------------------------------------------------- |
|
62 // |
|
63 bool VideoServiceUri::view( QString uri ) |
|
64 { |
|
65 MPX_ENTER_EXIT(_L("VideoServiceUri::view( QString ) "), |
|
66 _L("uri = %s"), uri.data() ); |
|
67 |
|
68 if(mEngine) |
|
69 { |
|
70 mServiceApp->setCurrentService(VideoServices::EUriView); |
|
71 mEngine->playURI( uri ); |
|
72 } |
|
73 |
|
74 return true; |
|
75 } |