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 orientation effect class.
19 #ifndef CLISTENERORIENTATION_H
20 #define CLISTENERORIENTATION_H
25 #include <OrientationBase.h>
26 #include <MCustomInterface.h>
28 const TUid KUidListenerOrientationEffect = {0x1020382E};
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 orientation effect class for managing audio orientation settings.
49 * @lib ListenerOrientationEffect.lib
53 class CListenerOrientation : public COrientation
56 public: // Constructors and Destructor
59 * Factory function for creating the listener orientation object.
61 * @param aUtility A reference to a convert utility
62 * @return pointer to CListenerOrientation object
64 IMPORT_C static CListenerOrientation* NewL( CMdaAudioConvertUtility& aUtility );
67 * Factory function for creating the listener orientation object.
69 * @param aUtility A reference to an audio input stream utility
70 * @return pointer to CListenerOrientation object
72 IMPORT_C static CListenerOrientation* NewL( CMdaAudioInputStream& aUtility );
75 * Factory function for creating the listener orientation object.
77 * @param aUtility A reference to an audio output stream utility
78 * @return pointer to CListenerOrientation object
80 IMPORT_C static CListenerOrientation* NewL( CMdaAudioOutputStream& aUtility );
83 * Factory function for creating the listener orientation object.
85 * @param aUtility A reference to an audio player utility
86 * @return pointer to CListenerOrientation object
88 IMPORT_C static CListenerOrientation* NewL( CMdaAudioPlayerUtility& aUtility );
91 * Factory function for creating the listener orientation 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 CListenerOrientation object
98 IMPORT_C static CListenerOrientation* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream );
101 * Factory function for creating the listener orientation object.
103 * @param aUtility A reference to an audio tone utility
104 * @return pointer to CListenerOrientation object
106 IMPORT_C static CListenerOrientation* NewL( CMdaAudioToneUtility& aUtility );
109 * Factory function for creating the listener orientation object.
111 * @param aDevSound A reference to a DevSound instance
112 * @return pointer to CListenerOrientation object
114 IMPORT_C static CListenerOrientation* NewL( CMMFDevSound& aDevSound );
117 * Factory function for creating the listener orientation object.
119 * @param aUtility A reference to a custom command utility
120 * @return pointer to CListenerOrientation object
122 IMPORT_C static CListenerOrientation* NewL( CCustomCommandUtility* aUtility );
125 * Factory function for creating the listener orientation object.
127 * @param aCustomInterface A reference to a custom interface
128 * @return pointer to CListenerOrientation object
130 IMPORT_C static CListenerOrientation* NewL( MCustomInterface& aCustomInterface );
133 * Factory function for creating the listener orientation object.
135 * @param aUtility A reference to a CMidiClientUtility
136 * @return pointer to CListenerOrientation object
138 IMPORT_C static CListenerOrientation* NewL( CMidiClientUtility& aUtility );
142 * Factory function for creating the listener orientation object.
144 * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
145 * @return pointer to CListenerOrientation object
147 IMPORT_C static CListenerOrientation* NewL( CDrmPlayerUtility& aUtility );
150 * Factory function for creating the listener orientation object.
152 * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
153 * @return pointer to CListenerOrientation object
155 IMPORT_C static CListenerOrientation* NewL( CVideoPlayerUtility& aUtility );
161 IMPORT_C virtual ~CListenerOrientation();
163 public: // functions from base class
167 * Get the unique identifier of the audio effect
169 * @return Unique identifier
171 IMPORT_C TUid Uid() const;
176 * Private C++ constructor for this class.
178 * @param aEffectObserver reference to event observer object
181 IMPORT_C CListenerOrientation();
183 protected: // Friend classes
185 friend class CListenerOrientationMessageHandler;
189 #endif // of CLISTENERORIENTATION_H