17 |
17 |
18 |
18 |
19 #include <RadioPlayerUtility.h> |
19 #include <RadioPlayerUtility.h> |
20 #include "RadioPlayerUtilityBody.h" |
20 #include "RadioPlayerUtilityBody.h" |
21 #include "RadioSession.h" |
21 #include "RadioSession.h" |
|
22 #include "trace.h" |
22 |
23 |
23 // ======== MEMBER FUNCTIONS ======== |
24 // ======== MEMBER FUNCTIONS ======== |
24 |
25 |
25 // ----------------------------------------------------------------------------- |
26 // ----------------------------------------------------------------------------- |
26 // CRadioPlayerUtility::NewL |
27 // CRadioPlayerUtility::NewL |
29 // |
30 // |
30 CRadioPlayerUtility* CRadioPlayerUtility::NewL( |
31 CRadioPlayerUtility* CRadioPlayerUtility::NewL( |
31 RRadioSession& aRadioSession, |
32 RRadioSession& aRadioSession, |
32 MRadioPlayerObserver& aObserver) |
33 MRadioPlayerObserver& aObserver) |
33 { |
34 { |
|
35 FUNC_LOG; |
34 CRadioPlayerUtility* self = new(ELeave) CRadioPlayerUtility; |
36 CRadioPlayerUtility* self = new(ELeave) CRadioPlayerUtility; |
35 CleanupStack::PushL(self); |
37 CleanupStack::PushL(self); |
36 self->iBody = CRadioPlayerUtility::CBody::NewL(aRadioSession, aObserver); |
38 self->iBody = CRadioPlayerUtility::CBody::NewL(aRadioSession, aObserver); |
37 CleanupStack::Pop(); |
39 CleanupStack::Pop(); |
38 return self; |
40 return self; |
43 // Destructor |
45 // Destructor |
44 // ----------------------------------------------------------------------------- |
46 // ----------------------------------------------------------------------------- |
45 // |
47 // |
46 EXPORT_C CRadioPlayerUtility::~CRadioPlayerUtility() |
48 EXPORT_C CRadioPlayerUtility::~CRadioPlayerUtility() |
47 { |
49 { |
|
50 FUNC_LOG; |
48 delete iBody; |
51 delete iBody; |
49 } |
52 } |
50 |
53 |
51 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
52 // CRadioPlayerUtility::CRadioPlayerUtility |
55 // CRadioPlayerUtility::CRadioPlayerUtility |
53 // (other items were commented in a header). |
56 // (other items were commented in a header). |
54 // ----------------------------------------------------------------------------- |
57 // ----------------------------------------------------------------------------- |
55 // |
58 // |
56 CRadioPlayerUtility::CRadioPlayerUtility() |
59 CRadioPlayerUtility::CRadioPlayerUtility() |
57 { |
60 { |
|
61 FUNC_LOG; |
58 } |
62 } |
59 |
63 |
60 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
61 // CRadioPlayerUtility::PlayerState |
65 // CRadioPlayerUtility::PlayerState |
62 // (other items were commented in a header). |
66 // (other items were commented in a header). |
63 // ----------------------------------------------------------------------------- |
67 // ----------------------------------------------------------------------------- |
64 // |
68 // |
65 EXPORT_C TPlayerState CRadioPlayerUtility::PlayerState() const |
69 EXPORT_C TPlayerState CRadioPlayerUtility::PlayerState() const |
66 { |
70 { |
|
71 FUNC_LOG; |
67 TPlayerState playerState; |
72 TPlayerState playerState; |
68 ASSERT(iBody); |
73 ASSERT(iBody); |
69 iBody->PlayerState(playerState); |
74 iBody->PlayerState(playerState); |
70 |
75 |
71 return playerState; |
76 return playerState; |
113 // (other items were commented in a header). |
121 // (other items were commented in a header). |
114 // ----------------------------------------------------------------------------- |
122 // ----------------------------------------------------------------------------- |
115 // |
123 // |
116 EXPORT_C TInt CRadioPlayerUtility::Mute(TBool aMute) |
124 EXPORT_C TInt CRadioPlayerUtility::Mute(TBool aMute) |
117 { |
125 { |
|
126 FUNC_LOG; |
118 ASSERT(iBody); |
127 ASSERT(iBody); |
119 return iBody->Mute(aMute); |
128 return iBody->Mute(aMute); |
120 } |
129 } |
121 |
130 |
122 // ----------------------------------------------------------------------------- |
131 // ----------------------------------------------------------------------------- |
138 // (other items were commented in a header). |
148 // (other items were commented in a header). |
139 // ----------------------------------------------------------------------------- |
149 // ----------------------------------------------------------------------------- |
140 // |
150 // |
141 EXPORT_C TInt CRadioPlayerUtility::SetVolume(TInt aVolume) |
151 EXPORT_C TInt CRadioPlayerUtility::SetVolume(TInt aVolume) |
142 { |
152 { |
|
153 FUNC_LOG; |
143 ASSERT(iBody); |
154 ASSERT(iBody); |
144 return iBody->SetVolume(aVolume); |
155 return iBody->SetVolume(aVolume); |
145 } |
156 } |
146 |
157 |
147 // ----------------------------------------------------------------------------- |
158 // ----------------------------------------------------------------------------- |
150 // (other items were commented in a header). |
161 // (other items were commented in a header). |
151 // ----------------------------------------------------------------------------- |
162 // ----------------------------------------------------------------------------- |
152 // |
163 // |
153 EXPORT_C TInt CRadioPlayerUtility::GetVolume(TInt& aVolume) const |
164 EXPORT_C TInt CRadioPlayerUtility::GetVolume(TInt& aVolume) const |
154 { |
165 { |
|
166 FUNC_LOG; |
155 ASSERT(iBody); |
167 ASSERT(iBody); |
156 return iBody->GetVolume(aVolume); |
168 return iBody->GetVolume(aVolume); |
157 } |
169 } |
158 |
170 |
159 // ----------------------------------------------------------------------------- |
171 // ----------------------------------------------------------------------------- |
163 // ----------------------------------------------------------------------------- |
175 // ----------------------------------------------------------------------------- |
164 // |
176 // |
165 EXPORT_C TInt CRadioPlayerUtility::SetVolumeRamp( |
177 EXPORT_C TInt CRadioPlayerUtility::SetVolumeRamp( |
166 const TTimeIntervalMicroSeconds& aRampInterval) |
178 const TTimeIntervalMicroSeconds& aRampInterval) |
167 { |
179 { |
|
180 FUNC_LOG; |
168 ASSERT(iBody); |
181 ASSERT(iBody); |
169 return iBody->SetVolumeRamp(aRampInterval); |
182 return iBody->SetVolumeRamp(aRampInterval); |
170 } |
183 } |
171 |
184 |
172 // ----------------------------------------------------------------------------- |
185 // ----------------------------------------------------------------------------- |
176 // ----------------------------------------------------------------------------- |
189 // ----------------------------------------------------------------------------- |
177 // |
190 // |
178 EXPORT_C TInt CRadioPlayerUtility::GetMaxVolume( |
191 EXPORT_C TInt CRadioPlayerUtility::GetMaxVolume( |
179 TInt& aMaxVolume ) const |
192 TInt& aMaxVolume ) const |
180 { |
193 { |
|
194 FUNC_LOG; |
181 ASSERT(iBody); |
195 ASSERT(iBody); |
182 return iBody->GetMaxVolume(aMaxVolume); |
196 return iBody->GetMaxVolume(aMaxVolume); |
183 } |
197 } |
184 |
198 |
185 // ----------------------------------------------------------------------------- |
199 // ----------------------------------------------------------------------------- |
190 // |
204 // |
191 EXPORT_C TInt CRadioPlayerUtility::SetBalance( |
205 EXPORT_C TInt CRadioPlayerUtility::SetBalance( |
192 TInt aLeftPercentage, |
206 TInt aLeftPercentage, |
193 TInt aRightPercentage ) |
207 TInt aRightPercentage ) |
194 { |
208 { |
|
209 FUNC_LOG; |
195 ASSERT(iBody); |
210 ASSERT(iBody); |
196 return iBody->SetBalance(aLeftPercentage, aRightPercentage); |
211 return iBody->SetBalance(aLeftPercentage, aRightPercentage); |
197 } |
212 } |
198 |
213 |
199 // ----------------------------------------------------------------------------- |
214 // ----------------------------------------------------------------------------- |
204 // |
219 // |
205 EXPORT_C TInt CRadioPlayerUtility::GetBalance( |
220 EXPORT_C TInt CRadioPlayerUtility::GetBalance( |
206 TInt& aLeftPercentage, |
221 TInt& aLeftPercentage, |
207 TInt& aRightPercentage ) const |
222 TInt& aRightPercentage ) const |
208 { |
223 { |
|
224 FUNC_LOG; |
209 ASSERT(iBody); |
225 ASSERT(iBody); |
210 return iBody->GetBalance(aLeftPercentage, aRightPercentage); |
226 return iBody->GetBalance(aLeftPercentage, aRightPercentage); |
211 } |
227 } |
212 |
228 |
213 // ----------------------------------------------------------------------------- |
229 // ----------------------------------------------------------------------------- |