utilities/mpmediacontroller/tsrc/unittest_mpmediakeyhandler/stub/inc/mpenginefactory.h
changeset 47 4cc1412daed0
equal deleted inserted replaced
45:612c4815aebe 47:4cc1412daed0
       
     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: MpEngineFactory stub for testing mpmediakeyhandler
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPENGINEFACTORY_H
       
    19 #define MPENGINEFACTORY_H
       
    20 
       
    21 enum MediaCommandReceived{
       
    22     CmdNone,
       
    23     CmdPlay,
       
    24     CmdPause,
       
    25     CmdPlayPause,
       
    26     CmdStop,
       
    27     CmdSkipForward,
       
    28     CmdStartSeekForward,
       
    29     CmdStopSeeking,
       
    30     CmdSkipBackward,
       
    31     CmdStartSeekBackward,
       
    32     CmdIncreaseVolume,
       
    33     CmdDecreaseVolume,
       
    34     CmdSetVolumeLevel,
       
    35     CmdMuteVolume,
       
    36     CmdUnmuteVolume
       
    37     };
       
    38 
       
    39 enum MediaPropertyRequested{
       
    40     PropNone,
       
    41     PropVolumeLevelMax,
       
    42     PropVolumeLevel,
       
    43     PropVolumeMuteState
       
    44     };
       
    45 
       
    46 class MpEngine
       
    47 {
       
    48 public:
       
    49     // Stub functions
       
    50     MpEngine();
       
    51 
       
    52 public:
       
    53     // Playback related
       
    54     void play();
       
    55     void pause();
       
    56     void playPause();
       
    57     void stop();
       
    58     void skipForward();
       
    59     void startSeekForward();
       
    60     void stopSeeking();
       
    61     void skipBackward();
       
    62     void startSeekBackward();
       
    63     void getVolumeLevelMax();
       
    64     void getVolumeLevel();
       
    65     void increaseVolume();
       
    66     void decreaseVolume();
       
    67     void setVolumeLevel( int value );
       
    68     void getVolumeMuteState();
       
    69     void muteVolume();
       
    70     void unmuteVolume();
       
    71     
       
    72 public:
       
    73     MediaCommandReceived      iMediaCommandReceived;
       
    74     MediaPropertyRequested    iMediaPropertyRequested;
       
    75     
       
    76 };
       
    77 
       
    78 class MpEngineFactory
       
    79 {
       
    80     
       
    81 public:
       
    82     // Stub functions
       
    83 private:
       
    84     explicit MpEngineFactory();
       
    85 
       
    86 public:
       
    87     virtual ~MpEngineFactory();
       
    88     static MpEngineFactory * instance();
       
    89     static MpEngine *sharedEngine();
       
    90     static void close();
       
    91     
       
    92 private:
       
    93     MpEngine             *mSharedEngine;
       
    94 
       
    95 };
       
    96 
       
    97 
       
    98 #endif // MPENGINEFACTORY_H