|
1 /* |
|
2 * Copyright (c) 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: Project file for EnhancedMediaClient Utility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SOURCEORIENTATIONEFFECTIMPL_H |
|
20 #define SOURCEORIENTATIONEFFECTIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <SourceOrientationControl.h> |
|
24 #include "EffectControlBase.h" |
|
25 #include <SourceOrientationProxy.h> |
|
26 #include <MAudioEffectObserver.h> |
|
27 |
|
28 namespace multimedia |
|
29 { |
|
30 class MControlObserver; |
|
31 class CSourceOrientationEffect : public CBase, |
|
32 public MSourceOrientationControl, |
|
33 public MAudioEffectObserver, |
|
34 public CEffectControlBase |
|
35 { |
|
36 public: |
|
37 CSourceOrientationEffect(); |
|
38 ~CSourceOrientationEffect(); |
|
39 TInt PostConstructor(); |
|
40 |
|
41 // From MControl begins |
|
42 TInt AddObserver( MControlObserver& aObserver ); |
|
43 TInt RemoveObserver( MControlObserver& aObserver ); |
|
44 TUid Type(); |
|
45 TControlType ControlType(); |
|
46 // From MControl ends |
|
47 |
|
48 // From MEffectControl begins |
|
49 TInt Apply(); |
|
50 // From MEffectControl ends |
|
51 |
|
52 // From MSourceOrientationEffect begins |
|
53 /** |
|
54 * Get the orientation vectors for the position |
|
55 * @since 5.0 |
|
56 * @param aHeading The heading (thousandths of radians) |
|
57 * @param aPitch The Pitch (thousandths of radians) |
|
58 * @param aRoll The Roll (thousandths of radians) |
|
59 * @return - |
|
60 */ |
|
61 TInt Orientation( TInt& aHeading, TInt& aPitch, TInt& aRoll ); |
|
62 |
|
63 /** |
|
64 * Gets the orientation of the position. |
|
65 * @since 5.0 |
|
66 * @param aFrontX X value of Front vector |
|
67 * @param aFrontY Y value of Front vector |
|
68 * @param aFrontZ Z value of Front vector |
|
69 * @param aAboveX X value of Above vector |
|
70 * @param aAboveY Y value of Above vector |
|
71 * @param aAboveZ Z value of Above vector |
|
72 * @return - |
|
73 */ |
|
74 TInt OrientationVectors( TInt& aFrontX, TInt& aFrontY, TInt& aFrontZ, |
|
75 TInt& aAboveX, TInt& aAboveY, TInt& aAboveZ ); |
|
76 |
|
77 /** |
|
78 * Sets the Heading, Pitch, Roll values for the orientation of the source |
|
79 * @since 5.0 |
|
80 * @param aHeading The heading (thousandths of radians) |
|
81 * @param aPitch The Pitch (thousandths of radians) |
|
82 * @param aRoll The Roll (thousandths of radians) |
|
83 * @return - |
|
84 */ |
|
85 TInt SetOrientation( TInt aHeading, TInt aPitch, TInt aRoll ); |
|
86 |
|
87 /** |
|
88 * Sets the Front and Above vectors for the orientation of the position. |
|
89 * @since 5.0 |
|
90 * @param aFrontX X value of Front vector |
|
91 * @param aFrontY Y value of Front vector |
|
92 * @param aFrontZ Z value of Front vector |
|
93 * @param aAboveX X value of Above vector |
|
94 * @param aAboveY Y value of Above vector |
|
95 * @param aAboveZ Z value of Above vector |
|
96 * @return - |
|
97 */ |
|
98 TInt SetOrientationVectors( TInt aFrontX, TInt aFrontY, TInt aFrontZ, |
|
99 TInt aAboveX, TInt aAboveY, TInt aAboveZ ); |
|
100 // From MSourceOrientationEffect ends |
|
101 |
|
102 // From MAudioEffectControl |
|
103 /** |
|
104 * Disable the effect |
|
105 * @since 5.0 |
|
106 */ |
|
107 TInt Disable(); |
|
108 |
|
109 /** |
|
110 * Enable the effect |
|
111 * @since 5.0 |
|
112 */ |
|
113 TInt Enable(); |
|
114 |
|
115 /** |
|
116 * Enforce the effect. |
|
117 * @since 5.0 |
|
118 * @param aEnforced Indicate the effect is to be enforced or not. ETrue = Enforced. |
|
119 */ |
|
120 TInt Enforce( TBool &aEnforced ); |
|
121 |
|
122 /** |
|
123 * Check if this effect object currently has update rights. |
|
124 * A client can lose update rights in some hardware platforms where there are a limited |
|
125 * number of instances of an effect that can exist at the same time. When an effect instance |
|
126 * has lost update rights the user can still change settings, but any calls to Apply the |
|
127 * settings will be deferred until update rights are regained. |
|
128 * @since 5.0 |
|
129 * @return ETrue if this object currently has rights to update the settings of this effect, |
|
130 * EFalse otherwise. |
|
131 */ |
|
132 TInt HaveUpdateRights(TBool &aHaveUpdateRights); |
|
133 |
|
134 /** |
|
135 * Check if the effect is enabled |
|
136 * @since 5.0 |
|
137 * @return ETrue if the effect is enabled, EFalse if the effect is disabled. |
|
138 */ |
|
139 TInt IsEnabled(TBool &aEnabled); |
|
140 |
|
141 /** |
|
142 * Check if the effect is enforced. |
|
143 * @since 5.0 |
|
144 * @return ETrue if the effect is enforced, EFalse if the effect isn ot enforced. |
|
145 */ |
|
146 TInt IsEnforced(TBool &aEnforced); |
|
147 |
|
148 /* |
|
149 * Get the unique identifier of the audio effect |
|
150 * @since 5.0 |
|
151 * @return Unique identifier of the audio effect object. |
|
152 */ |
|
153 TInt Uid(TUid &aUid); |
|
154 // From MAudioEffectControl Ends |
|
155 |
|
156 // MAudioEffectObserver begins |
|
157 void EffectChanged( const CAudioEffect* aObservedEffect, TUint8 aEvent ); |
|
158 // MAudioEffectObserver ends |
|
159 |
|
160 // From CEffectControlBase begins |
|
161 void Event( TEffectControlEvent aEvent ); |
|
162 // From CEffectControlBase ends |
|
163 |
|
164 private: |
|
165 TInt DoApply(); |
|
166 TInt CreateEffectProxy(); |
|
167 TInt DeleteEffectProxy(); |
|
168 TInt SavePreviousSettings(); |
|
169 |
|
170 private: |
|
171 CSourceOrientationProxy* iSourceOrientationProxy; |
|
172 CSourceOrientationProxy* iPrevSourceOrientationProxy; |
|
173 TMMFMessageDestinationPckg iMsgHndlrHandlePckg; |
|
174 MCustomCommand* iCustomCommand; |
|
175 RPointerArray<MControlObserver> iObservers; |
|
176 }; |
|
177 } // namespace multimedia |
|
178 |
|
179 #endif // SOURCEORIENTATIONEFFECTIMPL_H |
|
180 |
|
181 // End of file |