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 source orientation effect class.
19 #ifndef CSOURCEORIENTATION_H
20 #define CSOURCEORIENTATION_H
25 #include <OrientationBase.h>
26 #include <MCustomInterface.h>
28 const TUid KUidSourceOrientationEffect = {0x10203834};
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 source orientation effect class for managing source orientation settings.
49 * @lib SourceOrientationEffect.lib
53 class CSourceOrientation : public COrientation
56 public: // Constructors and Destructor
59 * Factory function for creating the source orientation object.
61 * @param aDevSound A reference to a DevSound instance
62 * @return pointer to CSourceOrientation object
64 IMPORT_C static CSourceOrientation* NewL( CMMFDevSound& aDevSound );
67 * Factory function for creating the source orientation object.
69 * @param aUtility A reference to a convert utility
70 * @return pointer to CSourceOrientation object
72 IMPORT_C static CSourceOrientation* NewL( CMdaAudioConvertUtility& aUtility );
75 * Factory function for creating the source orientation object.
77 * @param aUtility A reference to an audio input stream utility
78 * @return pointer to CSourceOrientation object
80 IMPORT_C static CSourceOrientation* NewL( CMdaAudioInputStream& aUtility );
83 * Factory function for creating the source orientation object.
85 * @param aUtility A reference to an audio output stream utility
86 * @return pointer to CSourceOrientation object
88 IMPORT_C static CSourceOrientation* NewL( CMdaAudioOutputStream& aUtility );
91 * Factory function for creating the source orientation object.
93 * @param aUtility A reference to an audio player utility
94 * @return pointer to CSourceOrientation object
96 IMPORT_C static CSourceOrientation* NewL( CMdaAudioPlayerUtility& aUtility );
99 * Factory function for creating the source orientation object.
101 * @param aUtility A reference to an audio record utility
102 * @param aRecordStream ETrue if the effect is to be applied to the recording,
103 * EFalse if the effect is to be applied only to the playback
104 * @return pointer to CSourceOrientation object
106 IMPORT_C static CSourceOrientation* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream );
109 * Factory function for creating the source orientation object.
111 * @param aUtility A reference to an audio tone utility
112 * @return pointer to CSourceOrientation object
114 IMPORT_C static CSourceOrientation* NewL( CMdaAudioToneUtility& aUtility );
117 * Factory function for creating the source orientation object.
119 * @param aUtility A reference to a custom command utility
120 * @return pointer to CSourceOrientation object
122 IMPORT_C static CSourceOrientation* NewL( CCustomCommandUtility* aUtility );
125 * Factory function for creating the source orientation object.
127 * @param aCustomInterface A reference to a custom interface
128 * @return pointer to CSourceOrientation object
130 IMPORT_C static CSourceOrientation* NewL( MCustomInterface& aCustomInterface );
133 * Factory function for creating the source orientation object.
135 * @param aUtility A reference to a CMidiClientUtility
136 * @return pointer to CSourceOrientation object
138 IMPORT_C static CSourceOrientation* NewL( CMidiClientUtility& aUtility );
141 * Factory function for creating the source orientation object.
143 * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
144 * @return pointer to CSourceOrientation object
146 IMPORT_C static CSourceOrientation* NewL( CDrmPlayerUtility& aUtility );
149 * Factory function for creating the source orientation object.
151 * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
152 * @return pointer to CSourceOrientation object
154 IMPORT_C static CSourceOrientation* NewL( CVideoPlayerUtility& aUtility );
160 IMPORT_C virtual ~CSourceOrientation();
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 CSourceOrientation();
183 protected: // Friend classes
185 friend class CSourceOrientationMessageHandler;
189 #endif // of CSOURCEORIENTATION_H