javauis/mmapi_qt/baseline/inc/cmmaratecontrol.h
branchRCL_3
changeset 24 0fd27995241b
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     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:  Base class for RateControl implementations.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMARATECONTROL_H
       
    20 #define CMMARATECONTROL_H
       
    21 
       
    22 // EXTERNAL INCLUDES
       
    23 
       
    24 //  INTERNAL INCLUDES
       
    25 #include "cmmacontrol.h" // base class
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 static const TInt KMMADefaultRate = 100000;
       
    30 static const TInt KMMAMinRate = 0;
       
    31 
       
    32 // Constant for control name. Name is used in Java side to instantiate
       
    33 // Java Class which uses CMMARateControl.
       
    34 _LIT(KMMARateControlName, "RateControl");
       
    35 
       
    36 
       
    37 //  CLASS DECLARATION
       
    38 /**
       
    39 *   This class is the base class for RateControl implementations.
       
    40 *
       
    41 *
       
    42 */
       
    43 NONSHARABLE_CLASS(CMMARateControl): public CMMAControl
       
    44 {
       
    45 public:
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~CMMARateControl();
       
    50 
       
    51 protected:
       
    52     /**
       
    53      * Constructor.
       
    54      */
       
    55     CMMARateControl();
       
    56 
       
    57 public: // From CMMAControl
       
    58     virtual const TDesC& ClassName() const;
       
    59 
       
    60 public: // New methods
       
    61     /**
       
    62      * @param aRate Rate to set in "milli-percentage"..
       
    63      * @return Actual rate set.
       
    64      */
       
    65     virtual TInt SetRateL(TInt aRate) = 0;
       
    66 
       
    67     /**
       
    68      * @return The current playback rate in "milli-percentage".
       
    69      */
       
    70     virtual TInt RateL() = 0;
       
    71 
       
    72     /**
       
    73      * @return The maximum rate supported.
       
    74      */
       
    75     virtual TInt MaxRateL();
       
    76 
       
    77     /**
       
    78      * @return The minimum rate supported.
       
    79      */
       
    80     virtual TInt MinRateL();
       
    81 
       
    82 };
       
    83 
       
    84 
       
    85 #endif // CMMARATECONTROL_H