2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This is the definition of the Listener Doppler effect class.
19 #ifndef CLISTENERDOPPLER_H
20 #define CLISTENERDOPPLER_H
25 #include <DopplerBase.h>
26 #include <MCustomInterface.h>
28 const TUid KUidListenerDopplerEffect = {0x10207B16};
30 // FORWARD DELCARATION
31 class CMdaAudioConvertUtility;
32 class CMdaAudioPlayerUtility;
33 class CMdaAudioRecorderUtility;
34 class CMdaAudioInputStream;
35 class CMdaAudioOutputStream;
36 class CMdaAudioToneUtility;
37 class CCustomCommandUtility;
38 class CCustomInterfaceUtility;
40 class CMidiClientUtility;
41 class CDrmPlayerUtility;
42 class CVideoPlayerUtility;
47 * This is the Listener Doppler effect class for managing Listener Doppler settings.
49 * @lib ListenerDopplerEffect.lib
53 class CListenerDoppler : public CDoppler
56 public: // Constructors and Destructor
59 * Factory function for creating the listener Doppler object.
61 * @param aUtility A reference to a convert utility
62 * @return pointer to CListenerDoppler object
64 IMPORT_C static CListenerDoppler* NewL( CMdaAudioConvertUtility& aUtility );
67 * Factory function for creating the listener Doppler object.
69 * @param aUtility A reference to an audio input stream utility
70 * @return pointer to CListenerDoppler object
72 IMPORT_C static CListenerDoppler* NewL( CMdaAudioInputStream& aUtility );
75 * Factory function for creating the listener Doppler object.
77 * @param aUtility A reference to an audio output stream utility
78 * @return pointer to CListenerDoppler object
80 IMPORT_C static CListenerDoppler* NewL( CMdaAudioOutputStream& aUtility );
83 * Factory function for creating the listener Doppler object.
85 * @param aUtility A reference to an audio player utility
86 * @return pointer to CListenerDoppler object
88 IMPORT_C static CListenerDoppler* NewL( CMdaAudioPlayerUtility& aUtility );
91 * Factory function for creating the listener Doppler object.
93 * @param aUtility A reference to an audio record utility
94 * @param aRecordStream ETrue if the effect is to be applied to the recording,
95 * EFalse if the effect is to be applied only to the playback
96 * @return pointer to CListenerDoppler object
98 IMPORT_C static CListenerDoppler* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream );
101 * Factory function for creating the listener Doppler object.
103 * @param aUtility A reference to an audio tone utility
104 * @return pointer to CListenerDoppler object
106 IMPORT_C static CListenerDoppler* NewL( CMdaAudioToneUtility& aUtility );
109 * Factory function for creating the listener Doppler object.
111 * @param aDevSound A reference to a DevSound instance
112 * @return pointer to CListenerDoppler object
114 IMPORT_C static CListenerDoppler* NewL( CMMFDevSound& aDevSound );
117 * Factory function for creating the listener Doppler object.
119 * @param aUtility A reference to a custom command utility
120 * @return pointer to CListenerDoppler object
122 IMPORT_C static CListenerDoppler* NewL( CCustomCommandUtility* aUtility );
125 * Factory function for creating the listener Doppler object.
127 * @param aCustomInterface A reference to a custom interface
128 * @return pointer to CListenerDoppler object
130 IMPORT_C static CListenerDoppler* NewL( MCustomInterface& aCustomInterface );
133 * Factory function for creating the listener Doppler object.
135 * @param aUtility A reference to a CMidiClientUtility Object
136 * @return pointer to CListenerDoppler object
138 IMPORT_C static CListenerDoppler* NewL( CMidiClientUtility& aUtility );
141 * Factory function for creating the listener Doppler object.
143 * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
144 * @return pointer to CListenerDoppler object
146 IMPORT_C static CListenerDoppler* NewL( CDrmPlayerUtility& aUtility );
149 * Factory function for creating the listener Doppler object.
151 * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
152 * @return pointer to CListenerDoppler object
154 IMPORT_C static CListenerDoppler* NewL( CVideoPlayerUtility& aUtility );
160 IMPORT_C virtual ~CListenerDoppler();
162 public: // functions from base class
166 * Get the unique identifier of the audio effect
168 * @return Unique identifier
170 IMPORT_C TUid Uid() const;
175 * Private C++ constructor for this class.
177 * @param aEffectObserver reference to event observer object
180 IMPORT_C CListenerDoppler();
182 protected: // Friend classes
184 friend class CListenerDopplerMessageHandler;
188 #endif // of CLISTENERDOPPLER_H