145 MMusEngAudioRoutingObserver* aObserver ) |
145 MMusEngAudioRoutingObserver* aObserver ) |
146 { |
146 { |
147 iTelephoneUtils->SetAudioRoutingObserver( aObserver ); |
147 iTelephoneUtils->SetAudioRoutingObserver( aObserver ); |
148 } |
148 } |
149 |
149 |
|
150 // ----------------------------------------------------------------------------- |
|
151 // |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 EXPORT_C void CMusEngSession::SetVolumeChangeObserver( |
|
155 MMusEngVolumeChangeObserver* aObserver ) |
|
156 { |
|
157 iVolumeObserver = aObserver; |
|
158 } |
|
159 |
150 |
160 |
151 // ----------------------------------------------------------------------------- |
161 // ----------------------------------------------------------------------------- |
152 // Increases CS call volume level by one. |
162 // Increases CS call volume level by one. |
153 // Leaves if error occurs when accessing central repository. |
163 // Leaves if error occurs when accessing central repository. |
154 // ----------------------------------------------------------------------------- |
164 // ----------------------------------------------------------------------------- |
155 // |
165 // |
156 EXPORT_C void CMusEngSession::VolumeUpL( ) |
166 EXPORT_C void CMusEngSession::VolumeUpL( ) |
157 { |
167 { |
158 TInt currentVolume = iTelephoneUtils->GetVolumeL(); |
168 TInt currentVolume = iTelephoneUtils->GetVolume(); |
159 iTelephoneUtils->SetVolumeL( currentVolume + 1 ); |
169 iTelephoneUtils->SetVolumeL( currentVolume + 1 ); |
160 } |
170 } |
161 |
171 |
162 |
172 |
163 // ----------------------------------------------------------------------------- |
173 // ----------------------------------------------------------------------------- |
165 // Leaves if error occurs when accessing central repository. |
175 // Leaves if error occurs when accessing central repository. |
166 // ----------------------------------------------------------------------------- |
176 // ----------------------------------------------------------------------------- |
167 // |
177 // |
168 EXPORT_C void CMusEngSession::VolumeDownL( ) |
178 EXPORT_C void CMusEngSession::VolumeDownL( ) |
169 { |
179 { |
170 TInt currentVolume = iTelephoneUtils->GetVolumeL(); |
180 TInt currentVolume = iTelephoneUtils->GetVolume(); |
171 iTelephoneUtils->SetVolumeL( currentVolume - 1 ); |
181 iTelephoneUtils->SetVolumeL( currentVolume - 1 ); |
172 } |
182 } |
173 |
183 |
174 // ----------------------------------------------------------------------------- |
184 // ----------------------------------------------------------------------------- |
175 // Set CS call volume value |
185 // Set CS call volume value |
198 // |
208 // |
199 void CMusEngSession::ConstructL() // second-phase constructor |
209 void CMusEngSession::ConstructL() // second-phase constructor |
200 { |
210 { |
201 MUS_LOG( "mus: [ENGINE] -> CMusEngSession::ConstructL()" ) |
211 MUS_LOG( "mus: [ENGINE] -> CMusEngSession::ConstructL()" ) |
202 iTelephoneUtils = CMusEngTelephoneUtils::NewL(); |
212 iTelephoneUtils = CMusEngTelephoneUtils::NewL(); |
|
213 iTelephoneUtils->SetVolumeChangeObserver( this ); |
203 MUS_LOG( "mus: [ENGINE] <- CMusEngSession::ConstructL()" ) |
214 MUS_LOG( "mus: [ENGINE] <- CMusEngSession::ConstructL()" ) |
204 } |
215 } |
205 |
216 |
206 |
217 // ----------------------------------------------------------------------------- |
|
218 // |
|
219 // ----------------------------------------------------------------------------- |
|
220 // |
|
221 void CMusEngSession::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged ) |
|
222 { |
|
223 if ( iVolumeObserver ) |
|
224 { |
|
225 iVolumeObserver->VolumeChanged( aVolume, aAudioRouteChanged ); |
|
226 } |
|
227 } |