|
1 /* |
|
2 * Copyright (c) 2002-2006 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: |
|
15 * This interface acts as a high level wrapper around the media server |
|
16 * playback and recording functionalities. It is inherited by both |
|
17 * CVRMdaRecorder |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __MVRMDARECORDER_H__ |
|
23 #define __MVRMDARECORDER_H__ |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVRMemo; |
|
28 class MVRObserver; |
|
29 |
|
30 // CLASS DEFINITION |
|
31 /** |
|
32 * This class acts as a high level wrapper around the media server |
|
33 * playback and recording functionalities. |
|
34 */ |
|
35 class MVRMdaRecorder |
|
36 { |
|
37 |
|
38 public: // new methods |
|
39 |
|
40 /** |
|
41 * Registers an observer for receiving update notifications. |
|
42 * @param aObserver The observer object. |
|
43 */ |
|
44 virtual void RegisterObserver( MVRObserver* aObserver ) = 0; |
|
45 |
|
46 /** |
|
47 * Unregisters a previously registered observer |
|
48 * @param aObserver The observer object. |
|
49 */ |
|
50 virtual void UnregisterObserver( MVRObserver* aObserver ) = 0; |
|
51 |
|
52 /** |
|
53 * Registers an observer for receiving auto stop notifications. |
|
54 * @param aObserver The observer object. |
|
55 */ |
|
56 virtual void SetAutoStopObserver( MVRObserver* aObserver ) = 0; |
|
57 |
|
58 /** |
|
59 * Attachs this recorder to a memo file, i.e. opens it |
|
60 * and initialises media server. |
|
61 * @param aMemo Specifies the file to be attached to. |
|
62 */ |
|
63 virtual void AttachToMemoL( CVRMemo* aMemo ) = 0; |
|
64 |
|
65 /** |
|
66 * Creates a new memo file and attachs to it. |
|
67 * @param aMemo Specifies the file to be created. |
|
68 */ |
|
69 virtual void CreateNewMemoL( CVRMemo* aMemo ) = 0; |
|
70 |
|
71 /** |
|
72 * Detachs from the current memo, i.e. closes the file. |
|
73 */ |
|
74 virtual void DetachMemo() = 0; |
|
75 |
|
76 /** |
|
77 * Sets playback volume. |
|
78 * @param aStep Volume level in steps |
|
79 * @param aMaxSteps How many steps there are (10 usually). |
|
80 */ |
|
81 virtual void SetVolume( TInt aStep, TInt aMaxSteps )= 0; |
|
82 |
|
83 /** |
|
84 * Starts playback. |
|
85 * @return System wide error code |
|
86 */ |
|
87 virtual TInt PlayL() = 0; |
|
88 |
|
89 /** |
|
90 * Starts recording. |
|
91 * @return System wide error code |
|
92 */ |
|
93 virtual TInt RecordL() = 0; |
|
94 |
|
95 /** |
|
96 * Stops playback or recording. |
|
97 */ |
|
98 virtual void Stop() = 0; |
|
99 |
|
100 /** |
|
101 * Pauses playback or recording. |
|
102 */ |
|
103 virtual void Pause() = 0; |
|
104 |
|
105 /** |
|
106 * Moves the playing position forward 5 seconds. |
|
107 * @return System wide error code. KErrOverflow if the |
|
108 * position was forwarded past the end. |
|
109 */ |
|
110 virtual TInt ForwardL() = 0; |
|
111 |
|
112 /** |
|
113 * Moves the playing position backward 5 seconds. |
|
114 * @return System wide error code |
|
115 */ |
|
116 virtual TInt RewindL() = 0; |
|
117 |
|
118 /** |
|
119 * Indicates if we are in a state that can accept |
|
120 * more commands (i.e. all async calls have completed). |
|
121 * @return ETrue if it's ok to proceed calling methods. |
|
122 */ |
|
123 virtual TBool CanAcceptCommands() const = 0; |
|
124 |
|
125 /** |
|
126 * Set active speaker if feature is supported |
|
127 * @param aEnabled ETrue if playback should be routed to IHF |
|
128 * @return Error code returned by routing operation |
|
129 */ |
|
130 virtual TInt SetIhf( TBool aEnabled ) = 0; |
|
131 |
|
132 /** |
|
133 * Set the audio recorder position to a new value |
|
134 * @param aSeconds The position to set |
|
135 */ |
|
136 virtual void SetPositionL( TInt aSeconds ) = 0; |
|
137 |
|
138 virtual ~MVRMdaRecorder() {}; |
|
139 }; |
|
140 |
|
141 #endif // __MVRMDARECORDER_H__ |