2 // MmfDevSoundCustomInterfaceSupport.h |
2 // MmfDevSoundCustomInterfaceSupport.h |
3 |
3 |
4 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
4 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
5 // All rights reserved. |
5 // All rights reserved. |
6 // This component and the accompanying materials are made available |
6 // This component and the accompanying materials are made available |
7 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
7 // under the terms of "Eclipse Public License v1.0" |
8 // which accompanies this distribution, and is available |
8 // which accompanies this distribution, and is available |
9 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
9 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
10 // |
10 // |
11 // Initial Contributors: |
11 // Initial Contributors: |
12 // Nokia Corporation - initial contribution. |
12 // Nokia Corporation - initial contribution. |
13 // |
13 // |
14 // Contributors: |
14 // Contributors: |
15 // |
15 // |
16 // Description: |
16 // Description: |
17 // |
17 // |
18 |
18 |
|
19 /** |
|
20 @publishedAll |
|
21 @released |
|
22 @file |
|
23 */ |
|
24 |
19 #ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
25 #ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
20 #define MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
26 #define MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
21 |
27 |
22 const TUid KMmfUidDevSoundAudioResourceCustomInterface = {0x101FD9F3}; |
28 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
23 const TUid KMmfUidDevSoundEmptyBuffersCustomInterface = {0x1027379c}; |
29 #include <mmf/server/mmfdevsoundcustominterfaceobserver.h> |
24 const TUid KMmfUidDevSoundCancelInitializeCustomInterface = {0x102834D3}; |
30 #include <mmf/server/mmfdevsoundcustominterfacesupportclasses.h> |
25 const TUid KMmfUidDevSoundAudioClientThreadInfoCustomInterface = {0x102834A7}; |
31 #endif |
26 |
32 |
27 /** |
33 /** |
28 @publishedAll |
34 @publishedAll |
29 @released |
35 @released |
30 |
36 |
81 another of the system-wide error codes. |
87 another of the system-wide error codes. |
82 */ |
88 */ |
83 virtual TInt WillResumePlay()=0; |
89 virtual TInt WillResumePlay()=0; |
84 }; |
90 }; |
85 |
91 |
86 /** |
|
87 @publishedPartner |
|
88 @prototype |
|
89 |
|
90 Custom Interface class providing support for emptying the play buffers. |
|
91 */ |
|
92 class MMMFDevSoundEmptyBuffers |
|
93 { |
|
94 public: |
|
95 |
|
96 /** |
|
97 Empties the play buffers below DevSound without causing the codec to be deleted. |
|
98 |
|
99 @return An error code indicating if the function call was successful. KErrNone on success, KErrNotSupported |
|
100 if called in record mode, otherwise another of the system-wide error codes. |
|
101 */ |
|
102 virtual TInt EmptyBuffers() = 0; |
|
103 }; |
|
104 |
|
105 /** |
|
106 @publishedPartner |
|
107 @prototype |
|
108 |
|
109 Custom Interface class providing support for canceling initialization. |
|
110 */ |
|
111 class MMMFDevSoundCancelInitialize |
|
112 { |
|
113 public: |
|
114 |
|
115 /** Cancels the initialization process of a CMMFDevSound object |
|
116 |
|
117 @return An error code indicating if the function call was successful. |
|
118 KErrNone on success, |
|
119 KerrNotReady if this is called before InitializeL() call or after |
|
120 the object has been initialized, |
|
121 */ |
|
122 virtual TInt CancelInitialize() = 0; |
|
123 }; |
|
124 |
|
125 /** |
|
126 @internalComponent |
|
127 |
|
128 The class is a mixin and is intended to support for closing the Mux and Demux pair in a |
|
129 DevSound Custom Interface. The function encapsulated by this class is called whenever the |
|
130 MMMFDevSoundCustomInterfaceDeMuxPlugin::RefreshL method leaves. |
|
131 */ |
|
132 class MMMFDevSoundCustomInterfaceObserver |
|
133 { |
|
134 public: |
|
135 |
|
136 /** |
|
137 Closes the Mux and Demux pair of a DevSound Custom Interface. |
|
138 */ |
|
139 virtual void CloseCustomInterface(TInt aIndex) = 0; |
|
140 }; |
|
141 |
|
142 /** |
|
143 @publishedPartner |
|
144 @released |
|
145 |
|
146 Custom Interface class providing support for setting the client thread info for devsound. |
|
147 */ |
|
148 class MAudioClientThreadInfo |
|
149 { |
|
150 public: |
|
151 /** |
|
152 Set client thread info for devsound if plugin implementation requires this info |
|
153 |
|
154 @param aTid the required thread Id |
|
155 @return An error code indicating if the function call was successful. |
|
156 |
|
157 @capability MultimediaDD |
|
158 A process requires MultimediaDD capability to make this call. |
|
159 */ |
|
160 virtual TInt SetClientThreadInfo(TThreadId aTid) = 0; |
|
161 }; |
|
162 |
|
163 /*****************************************************************************/ |
|
164 /** |
|
165 UID associated with the Custom interface MMMFDevSoundGetTimePlayed |
|
166 |
|
167 @publishedPartner |
|
168 @released |
|
169 */ |
|
170 const TUid KMmfUidDevSoundTimePlayedCustomInterface = {0x10285CE4}; |
|
171 |
|
172 /** |
|
173 This class provides an interface to querying current play time from DevSound. |
|
174 |
|
175 @publishedPartner |
|
176 @released |
|
177 */ |
|
178 class MMMFDevSoundTimePlayed |
|
179 { |
|
180 public: |
|
181 /** Retrieves the current play time from the audio renderer. |
|
182 @param aTime |
|
183 A reference to TTimeIntervalMicroSeconds object which will be filled with the current play time by this function. |
|
184 @return An error code indicating if the function call was successful. |
|
185 KErrNone on success, |
|
186 KErrNotSupported if the underlying HwDevice does not support this custominterface |
|
187 */ |
|
188 virtual TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime) = 0; |
|
189 }; |
|
190 |
|
191 /*****************************************************************************/ |
|
192 /** |
|
193 UID associated with the Custom interface MMMFDevSoundQueryIgnoresUnderflow |
|
194 |
|
195 @publishedPartner |
|
196 @released |
|
197 */ |
|
198 const TUid KMmfUidDevSoundQueryIgnoresUnderflowCustomInterface = {0x10285E7B}; |
|
199 |
|
200 /** |
|
201 This class provides an interface for querying DevSound whether it ignores the underflow errors from the sound driver. |
|
202 @publishedPartner |
|
203 @released |
|
204 */ |
|
205 class MMMFDevSoundQueryIgnoresUnderflow |
|
206 { |
|
207 public: |
|
208 /** Queries the devsound whether it ignores the underflow errors from the sound driver |
|
209 @return ETrue if the devsound ignores all the underflow errors from the sound driver except for the last buffer. That means DevSound |
|
210 propagates the underflow error from sound driver to its clients only when client sets the last buffer flag on the CMMFBuffer type buffer. |
|
211 EFalse if devsound propagates the underflow errors from the sound driver in all the cases |
|
212 */ |
|
213 virtual TBool QueryIgnoresUnderflow() = 0; |
|
214 }; |
|
215 |
|
216 |
|
217 const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E}; |
|
218 |
|
219 /** |
|
220 This class provides an interface to be able to Resume from DevSound. |
|
221 @publishedPartner |
|
222 @release |
|
223 */ |
|
224 class MMMFDevSoundTruePause |
|
225 { |
|
226 public: |
|
227 /** Queries the devsound whether it supports True Pause or not |
|
228 This call is only valid when DevSound is initialized |
|
229 @return ETrue if the current DevSound configuration does support this feature |
|
230 EFalse otherwise |
|
231 */ |
|
232 virtual TBool IsResumeSupported() = 0; |
|
233 |
|
234 /** Resume the playback, recording or tone playing that was paused |
|
235 @return An error code indicating if the function call was successful. |
|
236 KErrNone on success, |
|
237 KErrNotReady when is DevSound is not in pause |
|
238 KErrNotSupported if the DevSound configuration does support this feature |
|
239 */ |
|
240 virtual TInt Resume() = 0; |
|
241 }; |
|
242 |
|
243 |
|
244 #endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
92 #endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |