javauis/mmapi_qt/baseline/inc/cmmammfratecontrol.h
branchRCL_3
changeset 65 ae942d28ec0e
equal deleted inserted replaced
60:6c158198356e 65:ae942d28ec0e
       
     1 /*
       
     2 * Copyright (c) 2002 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:  This class implements RateControl for MMF players.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMAMMFRATECONTROL_H
       
    20 #define CMMAMMFRATECONTROL_H
       
    21 
       
    22 //  INTERNAL INCLUDES
       
    23 #include "cmmaratecontrol.h" // base class
       
    24 #include "cmmammfplayerbase.h"
       
    25 
       
    26 //  CLASS DECLARATION
       
    27 /**
       
    28 *   This class implements RateControl for MMF players.
       
    29 *
       
    30 */
       
    31 NONSHARABLE_CLASS(CMMAMMFRateControl): public CMMARateControl,
       
    32         public MMMAPlayerStateListener
       
    33 {
       
    34 public:
       
    35 
       
    36     static CMMAMMFRateControl* NewL(CMMAMMFPlayerBase* aPlayer);
       
    37 
       
    38     /**
       
    39      * Destructor.
       
    40      */
       
    41     ~CMMAMMFRateControl();
       
    42 
       
    43 protected:
       
    44 
       
    45     /**
       
    46      * Constructor.
       
    47      */
       
    48     CMMAMMFRateControl(CMMAMMFPlayerBase* aPlayer);
       
    49 
       
    50     void ConstructL();
       
    51 
       
    52 public: // from MMMAPlayerStateListener
       
    53     virtual void StateChanged(TInt aState);
       
    54 
       
    55 public: // New methods
       
    56     /**
       
    57      * @param aRate Rate to set in "milli-percentage"..
       
    58      * @return Actual rate set.
       
    59      */
       
    60     virtual TInt SetRateL(TInt aRate);
       
    61 
       
    62     /**
       
    63      * @return The current playback rate in "milli-percentage".
       
    64      */
       
    65     virtual TInt RateL();
       
    66 
       
    67 
       
    68 private: // Member data
       
    69 
       
    70     /**
       
    71      * Used to obtain RMMFController reference to stop/start
       
    72      * playback.
       
    73      */
       
    74     CMMAMMFPlayerBase* iPlayer;
       
    75 
       
    76     /**
       
    77      * Hold current rate value.
       
    78      */
       
    79     TInt iCurrentRate;
       
    80 
       
    81 };
       
    82 
       
    83 #endif // CMMAMMFRATECONTROL_H