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: Abstract base class for FramePositioningControl |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMAFRAMEPOSITIONINGCONTROL_H |
|
20 #define CMMAFRAMEPOSITIONINGCONTROL_H |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include "mmfcontroller.h" |
|
24 #include "mmfstandardcustomcommands.h" |
|
25 |
|
26 // INTERNAL INCLUDES |
|
27 #include "cmmacontrol.h" // base class |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CMMAPlayer; |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 |
|
35 // Constant for control name. Name is used in Java side to instantiate |
|
36 // Java Class which uses CMMAFramePositioningControl. |
|
37 _LIT(KMMAFramePositioningControlName, "FramePositioningControl"); |
|
38 |
|
39 // CLASS DECLARATION |
|
40 /** |
|
41 * Abstract base class for FramePositioningControls |
|
42 */ |
|
43 NONSHARABLE_CLASS(CMMAFramePositioningControl): public CMMAControl |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CMMAFramePositioningControl(); |
|
50 |
|
51 protected: |
|
52 /** |
|
53 * Constructor. |
|
54 */ |
|
55 CMMAFramePositioningControl(CMMAPlayer* aPlayer); |
|
56 |
|
57 public: // From CMMAControl |
|
58 const TDesC& ClassName() const; |
|
59 |
|
60 public: // New methods |
|
61 virtual TInt SeekL(TInt aFrameNumber) = 0; |
|
62 virtual TInt SkipL(TInt aFramesToSkip) = 0; |
|
63 virtual void MapFrameToTimeL(TInt aValue, TInt64* aMediaTime) = 0; |
|
64 virtual TInt MapTimeToFrameL(TInt64* aMediaTime) = 0; |
|
65 |
|
66 protected: // New methods |
|
67 |
|
68 /** |
|
69 * Clamp media time between 0 and duration of media |
|
70 * @param aMediaTime media time value to clamp |
|
71 * @return KErrNotFound if duration of media is not known, |
|
72 * otherwise KErrNone. |
|
73 */ |
|
74 virtual TInt ClampMediaTime(TInt64& aMediaTime); |
|
75 |
|
76 private: // Data |
|
77 |
|
78 // To be used by this class and not by children. |
|
79 CMMAPlayer* iPlayer; |
|
80 |
|
81 }; |
|
82 |
|
83 #endif // CMMAFRAMEPOSITIONINGCONTROL_H |
|