mpviewplugins/mpmediawallviewplugin/tsrc/unittest_mpmediawallview/stub/src/mpplaybackdata.cpp
changeset 48 af3740e3753f
child 55 f3930dda3342
equal deleted inserted replaced
42:79c49924ae23 48:af3740e3753f
       
     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: MpPlaybackData stub for testing mpnowplayingwidget
       
    15 *
       
    16 */
       
    17 
       
    18 #include "stub/inc/mpplaybackdata.h"
       
    19 
       
    20 
       
    21 int gUpdateCounter = 0;
       
    22 
       
    23 
       
    24 /*!
       
    25  Stub function.
       
    26  */
       
    27 MpPlaybackData::MpPlaybackData()
       
    28     : mPlaybackState(NotPlaying)
       
    29 {
       
    30     gUpdateCounter++;
       
    31 }
       
    32 
       
    33 /*!
       
    34  Stub function.
       
    35  */
       
    36 MpPlaybackData::~MpPlaybackData()
       
    37 {
       
    38 }
       
    39 
       
    40 /*!
       
    41  Stub function.
       
    42  */
       
    43 const QString& MpPlaybackData::title() const
       
    44 {
       
    45     return mTitle;
       
    46 }
       
    47 
       
    48 /*!
       
    49  Stub function.
       
    50  */
       
    51 const QString& MpPlaybackData::artist() const
       
    52 {
       
    53     return mArtist;
       
    54 }
       
    55 
       
    56 /*!
       
    57  Stub function.
       
    58  */
       
    59 MpPlaybackData::SimplifiedState MpPlaybackData::playbackState() const
       
    60 {
       
    61     return mPlaybackState;
       
    62 }
       
    63 
       
    64 /*!
       
    65  Stub function.
       
    66  */
       
    67 int MpPlaybackData::albumId()
       
    68 {
       
    69     return 0;
       
    70 }
       
    71 
       
    72 /*!
       
    73  Stub function.
       
    74  */
       
    75 void MpPlaybackData::emitPlaybackStateChanged()
       
    76 {
       
    77    emit playbackStateChanged();
       
    78 }
       
    79 
       
    80  void MpPlaybackData::setPlaybackState(MpPlaybackData::SimplifiedState state)
       
    81  {
       
    82      mPlaybackState=state;
       
    83  }