mpengine/tsrc/unittest_mpengine/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 MpMtpInfoLink.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "stub/inc/mpsettingsmanager.h"
       
    19 
       
    20 
       
    21 /*!
       
    22  Constructs the MP Settings Manager.
       
    23  */
       
    24 MpSettingsManager::MpSettingsManager()
       
    25 {
       
    26     mMtpInfoUrl = QString( "http://nokia.com/" );
       
    27 }
       
    28 
       
    29 /*!
       
    30  Destructs the settings manager.
       
    31  */
       
    32 MpSettingsManager::~MpSettingsManager()
       
    33 {
       
    34 }
       
    35 
       
    36 /*!
       
    37  Returns the singleton instance to the settings manager.
       
    38  */
       
    39 MpSettingsManager * MpSettingsManager::instance()
       
    40 {
       
    41     static MpSettingsManager instance;
       
    42     return &instance;
       
    43 }
       
    44 
       
    45 void MpSettingsManager::SetUrl( QString url )
       
    46 {
       
    47     instance()->mMtpInfoUrl = url;
       
    48 }
       
    49 
       
    50 /*!
       
    51  Returns mtp info url.
       
    52  */
       
    53 QString MpSettingsManager::mtpInfoUrl()
       
    54 {
       
    55     return instance()->mMtpInfoUrl;
       
    56 }
       
    57 
       
    58 /*!
       
    59  Returns the preset setting.
       
    60  */
       
    61 int MpSettingsManager::preset()
       
    62 {
       
    63     return 0;
       
    64 }
       
    65 
       
    66 /*!
       
    67  Slot to be called to request an update on the \a preset setting.
       
    68  */
       
    69 void MpSettingsManager::setPreset(int preset)
       
    70 {
       
    71     Q_UNUSED( preset );
       
    72 }