videoplayerapp/videoplayerengine/src/videoserviceplay.cpp
branchRCL_3
changeset 56 839377eedc2b
equal deleted inserted replaced
54:315810614048 56:839377eedc2b
       
     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 VideoServicePlay
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: da1mmcf#6 %
       
    19 
       
    20 #include "videoservices.h"
       
    21 #include "videoserviceplay.h"
       
    22 #include "videoplayerengine.h"
       
    23 #include "mpxvideo_debug.h"
       
    24 
       
    25 
       
    26 // -------------------------------------------------------------------------------------------------
       
    27 // VideoServicePlay()
       
    28 // -------------------------------------------------------------------------------------------------
       
    29 // 
       
    30 VideoServicePlay::VideoServicePlay( VideoServices* parent, 
       
    31                                     VideoPlayerEngine* engine, 
       
    32                                     QLatin1String service )
       
    33     : XQServiceProvider( service, parent )
       
    34     , mEngine( engine )
       
    35     , mServiceApp( parent )
       
    36 {
       
    37     MPX_ENTER_EXIT(_L("VideoServicePlay::VideoServicePlay()"));
       
    38     publishAll();
       
    39 }
       
    40 
       
    41 // -------------------------------------------------------------------------------------------------
       
    42 // ~VideoServicePlay()
       
    43 // -------------------------------------------------------------------------------------------------
       
    44 // 
       
    45 VideoServicePlay::~VideoServicePlay()
       
    46 {
       
    47     MPX_DEBUG(_L("VideoServicePlay::~VideoServicePlay()"));
       
    48 }
       
    49 
       
    50 // -------------------------------------------------------------------------------------------------
       
    51 // setEngine()
       
    52 // -------------------------------------------------------------------------------------------------
       
    53 // 
       
    54 void VideoServicePlay::setEngine( VideoPlayerEngine* engine )
       
    55 {
       
    56     MPX_DEBUG(_L("VideoServicePlay::setEngine()"));
       
    57     mEngine = engine;
       
    58 }
       
    59 
       
    60 // -------------------------------------------------------------------------------------------------
       
    61 // playMedia()
       
    62 // -------------------------------------------------------------------------------------------------
       
    63 // 
       
    64 void VideoServicePlay::playMedia( QString filePath )
       
    65 {
       
    66     MPX_ENTER_EXIT(_L("VideoServicePlay::playMedia()"),
       
    67                    _L("filePath = %s"), filePath.data() );  
       
    68                      
       
    69     if ( mEngine )
       
    70     {
       
    71     	mServiceApp->setCurrentService( VideoServices::EPlayback );
       
    72     	mEngine->playMedia( filePath );
       
    73     }
       
    74 }
       
    75 
       
    76 // -------------------------------------------------------------------------------------------------
       
    77 // playPDLMedia()
       
    78 // -------------------------------------------------------------------------------------------------
       
    79 // 
       
    80 void VideoServicePlay::playPDLMedia( QString filePath, int downloadID  )
       
    81 {
       
    82     MPX_DEBUG(_L("VideoServicePlay::playPDLMedia()"));
       
    83     Q_UNUSED( filePath );
       
    84     Q_UNUSED( downloadID );
       
    85 }
       
    86 
       
    87 // -------------------------------------------------------------------------------------------------
       
    88 // closePlayer()
       
    89 // -------------------------------------------------------------------------------------------------
       
    90 // 
       
    91 void VideoServicePlay::closePlayer()
       
    92 {
       
    93     MPX_DEBUG(_L("VideoServicePlay::closePlayer()"));
       
    94 }
       
    95