mpviewplugins/mpplaybackviewplugin/tsrc/unittest_mpplaybackview/stub/src/mpsettingsmanager.cpp
changeset 48 af3740e3753f
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: MpSettingsManager stub for testing mpplaybackview.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "../inc/mpsettingsmanager.h"
       
    19 
       
    20 
       
    21 /*!
       
    22  Constructs the MP Settings Manager.
       
    23  */
       
    24 MpSettingsManager::MpSettingsManager() :
       
    25     mShuffle(true),
       
    26     mRepeat(true)
       
    27 {
       
    28 }
       
    29 
       
    30 /*!
       
    31  Destructs the settings manager.
       
    32  */
       
    33 MpSettingsManager::~MpSettingsManager()
       
    34 {
       
    35 }
       
    36 
       
    37 /*!
       
    38  Returns the singleton instance to the settings manager.
       
    39  */
       
    40 MpSettingsManager * MpSettingsManager::instance()
       
    41 {
       
    42     static MpSettingsManager instance;
       
    43     return &instance;
       
    44 }
       
    45 
       
    46 /*!
       
    47  Stub function.
       
    48  */
       
    49 void MpSettingsManager::setShuffle( bool shuffle )
       
    50 {
       
    51     instance()->mShuffle = shuffle;        
       
    52 }
       
    53 /*!
       
    54  Stub function.
       
    55  */
       
    56 void MpSettingsManager::setRepeat( bool repeat )
       
    57 {
       
    58     instance()->mRepeat = repeat;
       
    59 }
       
    60 
       
    61 /*!
       
    62  Stub function.
       
    63  */
       
    64 bool MpSettingsManager::shuffle()
       
    65 {
       
    66     return instance()->mShuffle;
       
    67 }
       
    68 
       
    69 /*!
       
    70  Stub function.
       
    71  */
       
    72 bool MpSettingsManager::repeat()
       
    73 {
       
    74    return instance()->mRepeat;
       
    75 }
       
    76