javauis/mmapi_qt/baseline/inc/cmmastoptimecontrol.h
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     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 is used for stoptime controlling
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMASTOPTIMECONTROL_H
       
    20 #define CMMASTOPTIMECONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cmmacontrol.h"
       
    24 #include "mmmaplayerstatelistener.h"
       
    25 
       
    26 class CMMAPlayer;
       
    27 
       
    28 //  CLASS DECLARATION
       
    29 /**
       
    30 *   This class is used for stoptime controlling
       
    31 *
       
    32 *
       
    33 */
       
    34 
       
    35 NONSHARABLE_CLASS(CMMAStopTimeControl): public CMMAControl, MMMAPlayerStateListener
       
    36 {
       
    37 protected:
       
    38     /**
       
    39      * Protected class for timing.
       
    40      */
       
    41     class CStopTimer : public CTimer
       
    42     {
       
    43     public:
       
    44         static CStopTimer* NewL(CMMAStopTimeControl* aControl);
       
    45 
       
    46     private:
       
    47         CStopTimer(CMMAStopTimeControl* aControl);
       
    48         void ConstructL();
       
    49 
       
    50     public: // From CTimer
       
    51         void RunL();
       
    52 
       
    53     protected:
       
    54         CMMAStopTimeControl* iControl;
       
    55     };
       
    56 
       
    57 public:
       
    58     static CMMAStopTimeControl* NewL(CMMAPlayer* aPlayer);
       
    59     ~CMMAStopTimeControl();
       
    60 
       
    61 protected:
       
    62     CMMAStopTimeControl(CMMAPlayer* aPlayer);
       
    63     void ConstructL();
       
    64 
       
    65 public: // new methods
       
    66     static void StaticGetStopTime(CMMAStopTimeControl* aControl,
       
    67                                   TInt64* aTime);
       
    68     static void StaticSetStopTimeL(CMMAStopTimeControl* aControl,
       
    69                                    TInt64* aTime);
       
    70     virtual void StopAtTimeL();
       
    71 
       
    72 protected:
       
    73     virtual void GetStopTime(TInt64& aTime);
       
    74     virtual void SetStopTimeL(const TInt64& aTime);
       
    75     virtual void StartTimer(const TInt64& aTime);
       
    76 
       
    77 public: // From CMMAControl
       
    78     const TDesC& ClassName() const;
       
    79 
       
    80 public: // From MMMAPlayerStateListener
       
    81     void StateChanged(TInt aState);
       
    82 
       
    83 protected:
       
    84     CMMAPlayer* iPlayer;
       
    85     TInt64 iStopTime;   // Stop time in microseconds
       
    86     const TInt64 iNoTimer;
       
    87 
       
    88 private:
       
    89     CStopTimer* iTimer;
       
    90 
       
    91 };
       
    92 
       
    93 #endif // CMMASTOPTIMECONTROL_H