Update contrib.
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: Implementation of the Phone Profile Settings API
22 #include "GlobalAudioSettingsImpl.h"
24 #include <GlobalAudioSettingsPSKeys.h>
25 #include <MGlobalAudioSettingsObserver.h>
26 #include <centralrepository.h>
27 #include "AudioClientsListManagerAO.h"
28 #include <AudioClientsListPSKeys.h>
34 const TInt KMaxLength=256;
35 _LIT( KNoSound, "z:\\resource\\No_Sound.wav" );
36 // ============================ MEMBER FUNCTIONS ===============================
38 // -----------------------------------------------------------------------------
39 // CGlobalAudioSettingsImpl::NewL();
41 // -----------------------------------------------------------------------------
43 CGlobalAudioSettingsImpl::CGlobalAudioSettingsImpl(
44 CGlobalAudioSettings &aGlobalAudioSettings,
45 MAudioSettingsObserver& aAudioSettingsObserver)
46 :iGlobalAudioSettings(aGlobalAudioSettings),
47 iAudioSettingsObserver(aAudioSettingsObserver)
51 // -----------------------------------------------------------------------------
52 // CGlobalAudioSettingsImpl::NewL();
54 // -----------------------------------------------------------------------------
56 CGlobalAudioSettingsImpl* CGlobalAudioSettingsImpl::NewL(
57 CGlobalAudioSettings &aGlobalAudioSettings,
58 MAudioSettingsObserver& aAudioSettingsObserver)
60 CGlobalAudioSettingsImpl* self = new (ELeave) CGlobalAudioSettingsImpl(
61 aGlobalAudioSettings,aAudioSettingsObserver);
62 CleanupStack::PushL( self );
64 CleanupStack::Pop( self );
68 // -----------------------------------------------------------------------------
69 // CGlobalAudioSettingsImpl::ConstructL();
71 // -----------------------------------------------------------------------------
73 void CGlobalAudioSettingsImpl::ConstructL()
75 iWarningTonesObserverAO = CWarningTonesObserverAO::NewL(
77 iAudioSettingsObserver,
78 iGlobalAudioSettingsData);
79 iWarningTonesObserverAO->Subscribe();
81 iMessagingTonesObserverAO = CMessagingTonesObserverAO::NewL(
83 iAudioSettingsObserver,
84 iGlobalAudioSettingsData);
85 iMessagingTonesObserverAO->Subscribe();
87 iSilentProfileObserverAO = CSilentProfileObserverAO::NewL(
89 iAudioSettingsObserver,
90 iGlobalAudioSettingsData);
91 iSilentProfileObserverAO->Subscribe();
93 iVibraObserverAO = CVibraObserverAO::NewL(
95 iAudioSettingsObserver,
96 iGlobalAudioSettingsData);
97 iVibraObserverAO->Subscribe();
98 iRingingTypeObserverAO = CRingingTypeObserverAO::NewL(
100 iAudioSettingsObserver,
101 iGlobalAudioSettingsData);
102 iRingingTypeObserverAO->Subscribe();
104 iMessageToneObserverAO = CMessageToneObserverAO::NewL(
105 iGlobalAudioSettings,
106 iAudioSettingsObserver,
107 iGlobalAudioSettingsData);
108 iMessageToneObserverAO->Subscribe();
109 iEmailToneObserverAO = CEmailToneObserverAO::NewL(
110 iGlobalAudioSettings,
111 iAudioSettingsObserver,
112 iGlobalAudioSettingsData);
113 iEmailToneObserverAO->Subscribe();
116 iVideoCallObserverAO = CVideoCallToneObserverAO::NewL(
117 iGlobalAudioSettings,
118 iAudioSettingsObserver,
119 iGlobalAudioSettingsData);
120 iVideoCallObserverAO->Subscribe();
122 iRingingTone1ObserverAO = CRingingTone1ObserverAO::NewL(
123 iGlobalAudioSettings,
124 iAudioSettingsObserver,
125 iGlobalAudioSettingsData);
126 iRingingTone1ObserverAO->Subscribe();
128 iRingingTone2ObserverAO = CRingingTone2ObserverAO::NewL(
129 iGlobalAudioSettings,
130 iAudioSettingsObserver,
131 iGlobalAudioSettingsData);
132 iRingingTone2ObserverAO->Subscribe();
134 iKeypadToneObserverAO = CKeypadToneObserverAO::NewL(
135 iGlobalAudioSettings,
136 iAudioSettingsObserver,
137 iGlobalAudioSettingsData);
138 iKeypadToneObserverAO->Subscribe();
140 iSilenceModeObserverAO = CSilenceModeObserverAO::NewL(
141 iGlobalAudioSettings,
142 iAudioSettingsObserver,
143 iGlobalAudioSettingsData);
144 iSilenceModeObserverAO->Subscribe();
146 RProperty publicSilenceProperty;
147 User::LeaveIfError(publicSilenceProperty.Attach(KGASPSUidGlobalAudioSettings, KGASPublicSilence));
148 User::LeaveIfError(publicSilenceProperty.Get(iGlobalAudioSettingsData.iPublicSilence));
149 publicSilenceProperty.Close();
151 iCAudioClientsListManagerAO = CAudioClientsListManagerAO::NewL( iGlobalAudioSettings,iAudioClientsListObserverArray,KAudioPolicyAudioClients);
153 iPausedClientsListManagerAO = CAudioClientsListManagerAO::NewL( iGlobalAudioSettings,iAudioClientsListObserverArray,KAudioPolicyApplicationAudioStatePaused );
157 CGlobalAudioSettingsImpl::~CGlobalAudioSettingsImpl()
159 delete iWarningTonesObserverAO;
160 delete iMessagingTonesObserverAO;
161 delete iSilentProfileObserverAO;
162 delete iVibraObserverAO;
163 delete iRingingTypeObserverAO;
164 delete iMessageToneObserverAO;
165 delete iEmailToneObserverAO;
166 delete iVideoCallObserverAO;
167 delete iRingingTone1ObserverAO;
168 delete iRingingTone2ObserverAO;
169 delete iKeypadToneObserverAO;
170 delete iSilenceModeObserverAO;
171 delete iCAudioClientsListManagerAO;
172 delete iPausedClientsListManagerAO;
173 iAudioClientsListObserverArray.Close();
176 // -----------------------------------------------------------------------------
177 // CGlobalAudioSettingsImpl::NewL
178 // Static function for creating an instance of the EnvironmentalReverb object.
179 // -----------------------------------------------------------------------------
181 TBool CGlobalAudioSettingsImpl::IsWarningTonesEnabled()
183 if(iGlobalAudioSettingsData.iWarningTones)
189 // -----------------------------------------------------------------------------
190 // CGlobalAudioSettingsImpl::IsMessageTonesEnabled
192 // -----------------------------------------------------------------------------
194 TBool CGlobalAudioSettingsImpl::IsMessageTonesEnabled()
196 if(iGlobalAudioSettingsData.iMessageTones)
202 // -----------------------------------------------------------------------------
203 // CGlobalAudioSettingsImpl::IsSilentProfileEnabled
205 // -----------------------------------------------------------------------------
207 TBool CGlobalAudioSettingsImpl::IsSilentProfileEnabled()
209 if(iGlobalAudioSettingsData.iSilentProfile)
215 // -----------------------------------------------------------------------------
216 // CGlobalAudioSettingsImpl::IsVibraEnabled
218 // -----------------------------------------------------------------------------
220 TBool CGlobalAudioSettingsImpl::IsVibraEnabled()
222 if(iGlobalAudioSettingsData.iVibra)
228 // -----------------------------------------------------------------------------
229 // CGlobalAudioSettingsImpl::IsPublicSilenceEnabled
231 // -----------------------------------------------------------------------------
233 TBool CGlobalAudioSettingsImpl::IsPublicSilenceEnabled()
235 if(iGlobalAudioSettingsData.iPublicSilence)
244 TDesC& CGlobalAudioSettingsImpl::MessageAlertTone()
246 return *iGlobalAudioSettingsData.iMessageToneName;
250 TBool CGlobalAudioSettingsImpl::IsMessageAlertToneEnabled()
252 if(iGlobalAudioSettingsData.iMessageToneName->CompareF(KNoSound)==0)
258 TDesC& CGlobalAudioSettingsImpl::EmailAlertTone()
260 return *iGlobalAudioSettingsData.iEmailToneName;
263 TBool CGlobalAudioSettingsImpl::IsEmailAlertToneEnabled()
265 if(iGlobalAudioSettingsData.iEmailToneName->CompareF(KNoSound)==0)
271 CGlobalAudioSettings::TGASRingingType CGlobalAudioSettingsImpl::RingingType()
273 CGlobalAudioSettings::TGASRingingType type;
274 type= ( CGlobalAudioSettings::TGASRingingType)iGlobalAudioSettingsData.iRingingType;
279 TDesC& CGlobalAudioSettingsImpl::VideoCallAlertTone()
281 return *iGlobalAudioSettingsData.iVideoCallToneName;
283 TBool CGlobalAudioSettingsImpl::IsVideoCallAlertToneEnabled()
285 if(iGlobalAudioSettingsData.iVideoCallToneName->CompareF(KNoSound)==0)
291 TDesC& CGlobalAudioSettingsImpl::RingingAlertTone1()
293 return *iGlobalAudioSettingsData.iRingingTone1Name;
295 TBool CGlobalAudioSettingsImpl::IsRingingAlertTone1Enabled()
297 if(iGlobalAudioSettingsData.iRingingTone1Name->CompareF(KNoSound)==0)
303 TDesC& CGlobalAudioSettingsImpl::RingingAlertTone2()
305 return *iGlobalAudioSettingsData.iRingingTone2Name;
308 TBool CGlobalAudioSettingsImpl::IsRingingAlertTone2Enabled()
310 if(iGlobalAudioSettingsData.iRingingTone2Name->CompareF(KNoSound)==0)
316 CGlobalAudioSettings::TGASKeypadVolume CGlobalAudioSettingsImpl::KeyPadToneVolume()
318 return (CGlobalAudioSettings::TGASKeypadVolume)iGlobalAudioSettingsData.iKeyPadVolume;
321 TBool CGlobalAudioSettingsImpl::IsSilenceModeEnabled()
323 return iGlobalAudioSettingsData.iSilenceMode;
325 // -----------------------------------------------------------------------------
326 // CGlobalAudioSettingsImpl::RegisterAudioClientsListObserver
328 // -----------------------------------------------------------------------------
330 TInt CGlobalAudioSettingsImpl::RegisterAudioClientsListObserver(
331 MAudioClientsListObserver& aObserver )
333 TInt status(KErrAlreadyExists);
334 if ( iAudioClientsListObserverArray.Find( &aObserver ) == KErrNotFound )
336 status = iAudioClientsListObserverArray.Append( &aObserver);
337 if ( ( status == KErrNone ) && (iAudioClientsListObserverArray.Count() == 1 ) )
339 iCAudioClientsListManagerAO->MonitorStart();
340 iPausedClientsListManagerAO->MonitorStart();
346 // -----------------------------------------------------------------------------
347 // CGlobalAudioSettingsImpl::UnregisterAudioClientsListObserver
349 // -----------------------------------------------------------------------------
351 TInt CGlobalAudioSettingsImpl::UnregisterAudioClientsListObserver(
352 MAudioClientsListObserver& aObserver)
354 TInt status(KErrNone);
355 status = iAudioClientsListObserverArray.Find( &aObserver );
356 if ( status != KErrNotFound )
358 iAudioClientsListObserverArray.Remove( status );
359 if ( iAudioClientsListObserverArray.Count() == 0 )
361 iCAudioClientsListManagerAO->MonitorStop();
362 iPausedClientsListManagerAO->MonitorStop();
368 // -----------------------------------------------------------------------------
369 // CGlobalAudioSettingsImpl::GetAudioClientsList
371 // -----------------------------------------------------------------------------
373 TInt CGlobalAudioSettingsImpl::GetAudioClientsList(
374 CGlobalAudioSettings::TAudioClientListType aType,
375 RArray<TProcessId>& aList )
377 TInt status(KErrNone);
381 case CGlobalAudioSettings::EActiveAudioClients:
383 status = iCAudioClientsListManagerAO->GetAudioClientsList( aType, aList );
386 case CGlobalAudioSettings::EPausedAudioClients:
388 status = iPausedClientsListManagerAO->GetAudioClientsList( aType, aList );
400 //////////////////////////////////////////////////////////////////////
401 // CWarningTonesObserverAO //
402 //////////////////////////////////////////////////////////////////////
403 CWarningTonesObserverAO::CWarningTonesObserverAO(
404 CGlobalAudioSettings &aGlobalAudioSettings,
405 MAudioSettingsObserver& aAudioSettingsObserver,
406 TGlobalAudioSettings& aGlobalAudioSettingsData)
407 :CActive(EPriorityStandard),
408 iGlobalAudioSettings(aGlobalAudioSettings),
409 iAudioSettingsObserver(aAudioSettingsObserver),
410 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
412 CActiveScheduler::Add(this);
415 CWarningTonesObserverAO::~CWarningTonesObserverAO()
418 iWarningTonesProperty.Close();
421 CWarningTonesObserverAO* CWarningTonesObserverAO::NewL(
422 CGlobalAudioSettings &aGlobalAudioSettings,
423 MAudioSettingsObserver& aAudioSettingsObserver,
424 TGlobalAudioSettings& aGlobalAudioSettingsData)
426 CWarningTonesObserverAO* self = new (ELeave) CWarningTonesObserverAO(
427 aGlobalAudioSettings,
428 aAudioSettingsObserver,
429 aGlobalAudioSettingsData);
430 CleanupStack::PushL(self);
436 void CWarningTonesObserverAO::ConstructL()
438 User::LeaveIfError(iWarningTonesProperty.Attach(KGASPSUidGlobalAudioSettings, KGASWarningTones));
439 User::LeaveIfError(iWarningTonesProperty.Get(iGlobalAudioSettingsData.iWarningTones));
442 void CWarningTonesObserverAO::Subscribe()
447 iWarningTonesProperty.Subscribe(iStatus);
451 void CWarningTonesObserverAO::RunL()
453 TInt status(iStatus.Int());
455 RDebug::Print(_L(" CWarningTonesObserverAO::RunL:iStatus[%d]"), status);
456 #endif // PRINT_MESSAGE
457 if ( status == KErrNone )
460 status = iWarningTonesProperty.Get(iGlobalAudioSettingsData.iWarningTones);
461 if(status == KErrNone)
463 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASWarningTones;
464 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
469 RDebug::Print(_L(" CWarningTonesObserverAO::RunL:Property.Get Error[%d]"), status);
471 #endif // PRINT_MESSAGE
475 void CWarningTonesObserverAO::DoCancel()
477 iWarningTonesProperty.Cancel();
480 TInt CWarningTonesObserverAO::RunError(TInt /*aError*/)
485 //////////////////////////////////////////////////////////////////////
486 // CMessagingTonesObserverAO //
487 //////////////////////////////////////////////////////////////////////
488 CMessagingTonesObserverAO::CMessagingTonesObserverAO(
489 CGlobalAudioSettings &aGlobalAudioSettings,
490 MAudioSettingsObserver& aAudioSettingsObserver,
491 TGlobalAudioSettings& aGlobalAudioSettingsData)
492 :CActive(EPriorityStandard),
493 iGlobalAudioSettings(aGlobalAudioSettings),
494 iAudioSettingsObserver(aAudioSettingsObserver),
495 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
497 CActiveScheduler::Add(this);
500 CMessagingTonesObserverAO::~CMessagingTonesObserverAO()
503 iMessagingTonesProperty.Close();
506 CMessagingTonesObserverAO* CMessagingTonesObserverAO::NewL(
507 CGlobalAudioSettings &aGlobalAudioSettings,
508 MAudioSettingsObserver& aAudioSettingsObserver,
509 TGlobalAudioSettings& aGlobalAudioSettingsData)
511 CMessagingTonesObserverAO* self = new (ELeave) CMessagingTonesObserverAO(
512 aGlobalAudioSettings, aAudioSettingsObserver,
513 aGlobalAudioSettingsData);
514 CleanupStack::PushL(self);
520 void CMessagingTonesObserverAO::ConstructL()
522 User::LeaveIfError(iMessagingTonesProperty.Attach(KGASPSUidGlobalAudioSettings, KGASMessageTones));
523 User::LeaveIfError(iMessagingTonesProperty.Get(iGlobalAudioSettingsData.iMessageTones));
526 void CMessagingTonesObserverAO::Subscribe()
531 iMessagingTonesProperty.Subscribe(iStatus);
535 void CMessagingTonesObserverAO::RunL()
537 TInt status(iStatus.Int());
539 RDebug::Print(_L(" CMessagingTonesObserverAO::RunL:iStatus[%d]"), status);
540 #endif // PRINT_MESSAGE
541 if ( status == KErrNone )
544 status = iMessagingTonesProperty.Get(iGlobalAudioSettingsData.iMessageTones);
545 if(status == KErrNone)
547 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASMessageTones;
548 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
553 RDebug::Print(_L(" CMessagingTonesObserverAO::RunL:Property.Get Error[%d]"), status);
555 #endif // PRINT_MESSAGE
559 void CMessagingTonesObserverAO::DoCancel()
561 iMessagingTonesProperty.Cancel();
564 TInt CMessagingTonesObserverAO::RunError(TInt /*aError*/)
569 //////////////////////////////////////////////////////////////////////
570 // CSilentProfileObserverAO //
571 //////////////////////////////////////////////////////////////////////
572 CSilentProfileObserverAO::CSilentProfileObserverAO(
573 CGlobalAudioSettings &aGlobalAudioSettings,
574 MAudioSettingsObserver& aAudioSettingsObserver,
575 TGlobalAudioSettings& aGlobalAudioSettingsData)
576 :CActive(EPriorityStandard),
577 iGlobalAudioSettings(aGlobalAudioSettings),
578 iAudioSettingsObserver(aAudioSettingsObserver),
579 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
581 CActiveScheduler::Add(this);
584 CSilentProfileObserverAO::~CSilentProfileObserverAO()
587 iSilentProfileProperty.Close();
590 CSilentProfileObserverAO* CSilentProfileObserverAO::NewL(
591 CGlobalAudioSettings &aGlobalAudioSettings,
592 MAudioSettingsObserver& aAudioSettingsObserver,
593 TGlobalAudioSettings& aGlobalAudioSettingsData)
595 CSilentProfileObserverAO* self = new (ELeave) CSilentProfileObserverAO(
596 aGlobalAudioSettings, aAudioSettingsObserver,
597 aGlobalAudioSettingsData);
598 CleanupStack::PushL(self);
604 void CSilentProfileObserverAO::ConstructL()
606 User::LeaveIfError(iSilentProfileProperty.Attach(KGASPSUidGlobalAudioSettings, KGASSilentProfile));
607 User::LeaveIfError(iSilentProfileProperty.Get(iGlobalAudioSettingsData.iSilentProfile));
610 void CSilentProfileObserverAO::Subscribe()
615 iSilentProfileProperty.Subscribe(iStatus);
619 void CSilentProfileObserverAO::RunL()
621 TInt status(iStatus.Int());
623 RDebug::Print(_L(" CSilentProfileObserverAO::RunL:iStatus[%d]"), status);
624 #endif // PRINT_MESSAGE
625 if ( status == KErrNone )
628 status = iSilentProfileProperty.Get(iGlobalAudioSettingsData.iSilentProfile);
629 if(status == KErrNone)
631 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASSilentProfile;
632 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
637 RDebug::Print(_L(" CSilentProfileObserverAO::RunL:Property.Get Error[%d]"), status);
639 #endif // PRINT_MESSAGE
643 void CSilentProfileObserverAO::DoCancel()
645 iSilentProfileProperty.Cancel();
648 TInt CSilentProfileObserverAO::RunError(TInt /*aError*/)
653 //////////////////////////////////////////////////////////////////////
654 // CVibraObserverAO //
655 //////////////////////////////////////////////////////////////////////
656 CVibraObserverAO::CVibraObserverAO(
657 CGlobalAudioSettings &aGlobalAudioSettings,
658 MAudioSettingsObserver& aAudioSettingsObserver,
659 TGlobalAudioSettings& aGlobalAudioSettingsData)
660 :CActive(EPriorityStandard),
661 iGlobalAudioSettings(aGlobalAudioSettings),
662 iAudioSettingsObserver(aAudioSettingsObserver),
663 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
665 CActiveScheduler::Add(this);
668 CVibraObserverAO::~CVibraObserverAO()
671 iVibraProperty.Close();
674 CVibraObserverAO* CVibraObserverAO::NewL(
675 CGlobalAudioSettings &aGlobalAudioSettings,
676 MAudioSettingsObserver& aAudioSettingsObserver,
677 TGlobalAudioSettings& aGlobalAudioSettingsData)
679 CVibraObserverAO* self = new (ELeave) CVibraObserverAO(
680 aGlobalAudioSettings,
681 aAudioSettingsObserver,
682 aGlobalAudioSettingsData);
683 CleanupStack::PushL(self);
689 void CVibraObserverAO::ConstructL()
691 User::LeaveIfError(iVibraProperty.Attach(KGASPSUidGlobalAudioSettings, KGASVibra));
692 User::LeaveIfError(iVibraProperty.Get(iGlobalAudioSettingsData.iVibra));
695 void CVibraObserverAO::Subscribe()
700 iVibraProperty.Subscribe(iStatus);
704 void CVibraObserverAO::RunL()
706 TInt status(iStatus.Int());
708 RDebug::Print(_L(" CVibraObserverAO::RunL:iStatus[%d]"), status);
709 #endif // PRINT_MESSAGE
710 if ( status == KErrNone )
713 status = iVibraProperty.Get(iGlobalAudioSettingsData.iVibra);
714 if( status == KErrNone)
716 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASVibra;
717 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings,id);
722 RDebug::Print(_L(" CVibraObserverAO::RunL:Property.Get Error[%d]"), status);
724 #endif // PRINT_MESSAGE
728 void CVibraObserverAO::DoCancel()
730 iVibraProperty.Cancel();
733 TInt CVibraObserverAO::RunError(TInt /*aError*/)
738 //////////////////////////////////////////////////////////////////////
739 // CRingingTypeObserverAO //
740 //////////////////////////////////////////////////////////////////////
741 CRingingTypeObserverAO::CRingingTypeObserverAO(
742 CGlobalAudioSettings &aGlobalAudioSettings,
743 MAudioSettingsObserver& aAudioSettingsObserver,
744 TGlobalAudioSettings& aGlobalAudioSettingsData)
745 :CActive(EPriorityStandard),
746 iGlobalAudioSettings(aGlobalAudioSettings),
747 iAudioSettingsObserver(aAudioSettingsObserver),
748 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
750 CActiveScheduler::Add(this);
753 CRingingTypeObserverAO::~CRingingTypeObserverAO()
756 iRingingTypeProperty.Close();
759 CRingingTypeObserverAO* CRingingTypeObserverAO::NewL(
760 CGlobalAudioSettings &aGlobalAudioSettings,
761 MAudioSettingsObserver& aAudioSettingsObserver,
762 TGlobalAudioSettings& aGlobalAudioSettingsData)
764 CRingingTypeObserverAO* self = new (ELeave) CRingingTypeObserverAO(
765 aGlobalAudioSettings,
766 aAudioSettingsObserver,
767 aGlobalAudioSettingsData);
768 CleanupStack::PushL(self);
774 void CRingingTypeObserverAO::ConstructL()
776 User::LeaveIfError(iRingingTypeProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingType));
778 User::LeaveIfError(iRingingTypeProperty.Get(value));
779 iGlobalAudioSettingsData.iRingingType=(CGlobalAudioSettings::TGASRingingType)value;
783 void CRingingTypeObserverAO::Subscribe()
789 iRingingTypeProperty.Subscribe(iStatus);
793 void CRingingTypeObserverAO::RunL()
795 TInt status(iStatus.Int());
797 RDebug::Print(_L(" CRingingTypeObserverAO::RunL:iStatus[%d]"), status);
798 #endif // PRINT_MESSAGE
799 if ( status == KErrNone )
803 status=(iRingingTypeProperty.Get(value));
804 iGlobalAudioSettingsData.iRingingType=(CGlobalAudioSettings::TGASRingingType)value;
805 if( status == KErrNone)
807 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingType;
808 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
813 RDebug::Print(_L(" CRingingTypeObserverAO::RunL:Property.Get Error[%d]"), status);
815 #endif // PRINT_MESSAGE
819 void CRingingTypeObserverAO::DoCancel()
821 iRingingTypeProperty.Cancel();
824 TInt CRingingTypeObserverAO::RunError(TInt /*aError*/)
829 //////////////////////////////////////////////////////////////////////
830 // CMessageToneObserverAO //
831 //////////////////////////////////////////////////////////////////////
832 CMessageToneObserverAO::CMessageToneObserverAO(
833 CGlobalAudioSettings &aGlobalAudioSettings,
834 MAudioSettingsObserver& aAudioSettingsObserver,
835 TGlobalAudioSettings& aGlobalAudioSettingsData)
836 :CActive(EPriorityStandard),
837 iGlobalAudioSettings(aGlobalAudioSettings),
838 iAudioSettingsObserver(aAudioSettingsObserver),
839 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
841 CActiveScheduler::Add(this);
844 CMessageToneObserverAO::~CMessageToneObserverAO()
847 iMessageToneNameProperty.Close();
848 if( iGlobalAudioSettingsData.iMessageToneName)
850 delete iGlobalAudioSettingsData.iMessageToneName;
851 iGlobalAudioSettingsData.iMessageToneName=NULL;
855 CMessageToneObserverAO* CMessageToneObserverAO::NewL(
856 CGlobalAudioSettings &aGlobalAudioSettings,
857 MAudioSettingsObserver& aAudioSettingsObserver,
858 TGlobalAudioSettings& aGlobalAudioSettingsData)
860 CMessageToneObserverAO* self = new (ELeave) CMessageToneObserverAO(
861 aGlobalAudioSettings,
862 aAudioSettingsObserver,
863 aGlobalAudioSettingsData);
864 CleanupStack::PushL(self);
870 void CMessageToneObserverAO::ConstructL()
872 iGlobalAudioSettingsData.iMessageToneName=HBufC::NewL(KMaxLength);
873 User::LeaveIfError(iMessageToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASMessageToneName));
874 TPtr16 ptr=iGlobalAudioSettingsData.iMessageToneName->Des();
875 User::LeaveIfError(iMessageToneNameProperty.Get(ptr));
879 void CMessageToneObserverAO::Subscribe()
885 iMessageToneNameProperty.Subscribe(iStatus);
889 void CMessageToneObserverAO::RunL()
891 TInt status(iStatus.Int());
893 RDebug::Print(_L(" CMessageToneObserverAO::RunL:iStatus[%d]"), status);
894 #endif // PRINT_MESSAGE
895 if ( status == KErrNone )
898 delete iGlobalAudioSettingsData.iMessageToneName;
899 iGlobalAudioSettingsData.iMessageToneName=NULL;
900 iGlobalAudioSettingsData.iMessageToneName=HBufC::NewL(KMaxLength);
901 TPtr16 ptr=iGlobalAudioSettingsData.iMessageToneName->Des();
902 status = iMessageToneNameProperty.Get(ptr);
903 if( status == KErrNone)
905 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASMessageToneName;
906 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
911 RDebug::Print(_L(" CMessageToneObserverAO::RunL:Property.Get Error[%d]"), status);
913 #endif // PRINT_MESSAGE
917 void CMessageToneObserverAO::DoCancel()
919 iMessageToneNameProperty.Cancel();
922 TInt CMessageToneObserverAO::RunError(TInt /*aError*/)
928 /////////////////////////////////////////////////////////////////////
929 // CEmailToneObserverAO //
930 //////////////////////////////////////////////////////////////////////
931 CEmailToneObserverAO::CEmailToneObserverAO(
932 CGlobalAudioSettings &aGlobalAudioSettings,
933 MAudioSettingsObserver& aAudioSettingsObserver,
934 TGlobalAudioSettings& aGlobalAudioSettingsData)
935 :CActive(EPriorityStandard),
936 iGlobalAudioSettings(aGlobalAudioSettings),
937 iAudioSettingsObserver(aAudioSettingsObserver),
938 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
940 CActiveScheduler::Add(this);
943 CEmailToneObserverAO::~CEmailToneObserverAO()
946 iEmailToneNameProperty.Close();
948 if(iGlobalAudioSettingsData.iEmailToneName)
950 delete iGlobalAudioSettingsData.iEmailToneName;
951 iGlobalAudioSettingsData.iEmailToneName=NULL;
956 CEmailToneObserverAO* CEmailToneObserverAO::NewL(
957 CGlobalAudioSettings &aGlobalAudioSettings,
958 MAudioSettingsObserver& aAudioSettingsObserver,
959 TGlobalAudioSettings& aGlobalAudioSettingsData)
961 CEmailToneObserverAO* self = new (ELeave) CEmailToneObserverAO(
962 aGlobalAudioSettings,
963 aAudioSettingsObserver,
964 aGlobalAudioSettingsData);
965 CleanupStack::PushL(self);
971 void CEmailToneObserverAO::ConstructL()
974 iGlobalAudioSettingsData.iEmailToneName=HBufC::NewL(KMaxLength);
975 User::LeaveIfError(iEmailToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASEmailToneName));
976 TPtr16 ptr=iGlobalAudioSettingsData.iEmailToneName->Des();
977 User::LeaveIfError(iEmailToneNameProperty.Get(ptr));
981 void CEmailToneObserverAO::Subscribe()
987 iEmailToneNameProperty.Subscribe(iStatus);
991 void CEmailToneObserverAO::RunL()
993 TInt status(iStatus.Int());
995 RDebug::Print(_L(" CEmailToneObserverAO::RunL:iStatus[%d]"), status);
996 #endif // PRINT_MESSAGE
997 if ( status == KErrNone )
1000 delete iGlobalAudioSettingsData.iEmailToneName;
1001 iGlobalAudioSettingsData.iEmailToneName=NULL;
1002 iGlobalAudioSettingsData.iEmailToneName=HBufC::NewL(KMaxLength);
1003 TPtr16 ptr=iGlobalAudioSettingsData.iEmailToneName->Des();
1004 status = iEmailToneNameProperty.Get(ptr);
1005 if( status == KErrNone)
1007 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASEmailToneName;
1008 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1010 #ifdef PRINT_MESSAGE
1013 RDebug::Print(_L(" CEmailToneObserverAO::RunL:Property.Get Error[%d]"), status);
1015 #endif // PRINT_MESSAGE
1019 void CEmailToneObserverAO::DoCancel()
1021 iEmailToneNameProperty.Cancel();
1024 TInt CEmailToneObserverAO::RunError(TInt /*aError*/)
1030 /////////////////////////////////////////////////////////////////////
1031 // CVideoCallToneObserverAO //
1032 //////////////////////////////////////////////////////////////////////
1033 CVideoCallToneObserverAO::CVideoCallToneObserverAO(
1034 CGlobalAudioSettings &aGlobalAudioSettings,
1035 MAudioSettingsObserver& aAudioSettingsObserver,
1036 TGlobalAudioSettings& aGlobalAudioSettingsData)
1037 :CActive(EPriorityStandard),
1038 iGlobalAudioSettings(aGlobalAudioSettings),
1039 iAudioSettingsObserver(aAudioSettingsObserver),
1040 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
1042 CActiveScheduler::Add(this);
1045 CVideoCallToneObserverAO::~CVideoCallToneObserverAO()
1048 iVideoCallToneNameProperty.Close();
1049 if( iGlobalAudioSettingsData.iVideoCallToneName)
1051 delete iGlobalAudioSettingsData.iVideoCallToneName;
1052 iGlobalAudioSettingsData.iVideoCallToneName=NULL;
1058 CVideoCallToneObserverAO* CVideoCallToneObserverAO::NewL(
1059 CGlobalAudioSettings &aGlobalAudioSettings,
1060 MAudioSettingsObserver& aAudioSettingsObserver,
1061 TGlobalAudioSettings& aGlobalAudioSettingsData)
1063 CVideoCallToneObserverAO* self = new (ELeave) CVideoCallToneObserverAO(
1064 aGlobalAudioSettings,
1065 aAudioSettingsObserver,
1066 aGlobalAudioSettingsData);
1067 CleanupStack::PushL(self);
1069 CleanupStack::Pop();
1073 void CVideoCallToneObserverAO::ConstructL()
1076 iGlobalAudioSettingsData.iVideoCallToneName=HBufC::NewL(KMaxLength);
1077 User::LeaveIfError(iVideoCallToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASVideoCallToneName));
1078 TPtr16 ptr=iGlobalAudioSettingsData.iVideoCallToneName->Des();
1079 User::LeaveIfError(iVideoCallToneNameProperty.Get(ptr));
1083 void CVideoCallToneObserverAO::Subscribe()
1089 iVideoCallToneNameProperty.Subscribe(iStatus);
1093 void CVideoCallToneObserverAO::RunL()
1095 TInt status(iStatus.Int());
1096 #ifdef PRINT_MESSAGE
1097 RDebug::Print(_L(" CVideocallToneObserverAO::RunL:iStatus[%d]"), status);
1098 #endif // PRINT_MESSAGE
1099 if ( status == KErrNone )
1102 delete iGlobalAudioSettingsData.iVideoCallToneName;
1103 iGlobalAudioSettingsData.iVideoCallToneName=NULL;
1104 iGlobalAudioSettingsData.iVideoCallToneName=HBufC::NewL(KMaxLength);
1105 TPtr16 ptr=iGlobalAudioSettingsData.iVideoCallToneName->Des();
1106 status = iVideoCallToneNameProperty.Get(ptr);
1107 if( status == KErrNone)
1109 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASVideoCallToneName;
1110 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1112 #ifdef PRINT_MESSAGE
1115 RDebug::Print(_L(" CVideoCallToneObserverAO::RunL:Property.Get Error[%d]"), status);
1117 #endif // PRINT_MESSAGE
1121 void CVideoCallToneObserverAO::DoCancel()
1123 iVideoCallToneNameProperty.Cancel();
1126 TInt CVideoCallToneObserverAO::RunError(TInt /*aError*/)
1131 /////////////////////////////////////////////////////////////////////
1132 // CRingingToneObserverAO //
1133 //////////////////////////////////////////////////////////////////////
1134 CRingingTone1ObserverAO::CRingingTone1ObserverAO(
1135 CGlobalAudioSettings &aGlobalAudioSettings,
1136 MAudioSettingsObserver& aAudioSettingsObserver,
1137 TGlobalAudioSettings& aGlobalAudioSettingsData)
1138 :CActive(EPriorityStandard),
1139 iGlobalAudioSettings(aGlobalAudioSettings),
1140 iAudioSettingsObserver(aAudioSettingsObserver),
1141 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
1143 CActiveScheduler::Add(this);
1146 CRingingTone1ObserverAO::~CRingingTone1ObserverAO()
1149 iRingingTone1NameProperty.Close();
1150 if( iGlobalAudioSettingsData.iRingingTone1Name)
1152 delete iGlobalAudioSettingsData.iRingingTone1Name;
1153 iGlobalAudioSettingsData.iRingingTone1Name=NULL;
1157 CRingingTone1ObserverAO* CRingingTone1ObserverAO::NewL(
1158 CGlobalAudioSettings &aGlobalAudioSettings,
1159 MAudioSettingsObserver& aAudioSettingsObserver,
1160 TGlobalAudioSettings& aGlobalAudioSettingsData)
1162 CRingingTone1ObserverAO* self = new (ELeave) CRingingTone1ObserverAO(
1163 aGlobalAudioSettings,
1164 aAudioSettingsObserver,
1165 aGlobalAudioSettingsData);
1166 CleanupStack::PushL(self);
1168 CleanupStack::Pop();
1172 void CRingingTone1ObserverAO::ConstructL()
1175 iGlobalAudioSettingsData.iRingingTone1Name=HBufC::NewL(KMaxLength);
1176 User::LeaveIfError(iRingingTone1NameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingTone1Name));
1177 TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone1Name->Des();
1178 User::LeaveIfError(iRingingTone1NameProperty.Get(ptr));
1182 void CRingingTone1ObserverAO::Subscribe()
1188 iRingingTone1NameProperty.Subscribe(iStatus);
1192 void CRingingTone1ObserverAO::RunL()
1194 TInt status(iStatus.Int());
1195 #ifdef PRINT_MESSAGE
1196 RDebug::Print(_L(" CRingingTone1ObserverAO::RunL:iStatus[%d]"), status);
1197 #endif // PRINT_MESSAGE
1198 if ( status == KErrNone )
1201 delete iGlobalAudioSettingsData.iRingingTone1Name;
1202 iGlobalAudioSettingsData.iRingingTone1Name=NULL;
1203 iGlobalAudioSettingsData.iRingingTone1Name=HBufC::NewL(KMaxLength);
1204 TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone1Name->Des();
1205 status = iRingingTone1NameProperty.Get(ptr);
1206 if( status == KErrNone)
1208 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingTone1Name;
1209 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1211 #ifdef PRINT_MESSAGE
1214 RDebug::Print(_L(" CRingingToneObserverAO::RunL:Property.Get Error[%d]"), status);
1216 #endif // PRINT_MESSAGE
1220 void CRingingTone1ObserverAO::DoCancel()
1222 iRingingTone1NameProperty.Cancel();
1225 TInt CRingingTone1ObserverAO::RunError(TInt /*aError*/)
1230 ////////////////////////////////////////////////////////////////////
1231 // CRingingToneObserverAO //
1232 //////////////////////////////////////////////////////////////////////
1233 CRingingTone2ObserverAO::CRingingTone2ObserverAO(
1234 CGlobalAudioSettings &aGlobalAudioSettings,
1235 MAudioSettingsObserver& aAudioSettingsObserver,
1236 TGlobalAudioSettings& aGlobalAudioSettingsData)
1237 :CActive(EPriorityStandard),
1238 iGlobalAudioSettings(aGlobalAudioSettings),
1239 iAudioSettingsObserver(aAudioSettingsObserver),
1240 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
1242 CActiveScheduler::Add(this);
1245 CRingingTone2ObserverAO::~CRingingTone2ObserverAO()
1248 iRingingTone2NameProperty.Close();
1249 if(iGlobalAudioSettingsData.iRingingTone2Name)
1251 delete iGlobalAudioSettingsData.iRingingTone2Name;
1252 iGlobalAudioSettingsData.iRingingTone2Name=NULL;
1258 CRingingTone2ObserverAO* CRingingTone2ObserverAO::NewL(
1259 CGlobalAudioSettings &aGlobalAudioSettings,
1260 MAudioSettingsObserver& aAudioSettingsObserver,
1261 TGlobalAudioSettings& aGlobalAudioSettingsData)
1263 CRingingTone2ObserverAO* self = new (ELeave) CRingingTone2ObserverAO(
1264 aGlobalAudioSettings,
1265 aAudioSettingsObserver,
1266 aGlobalAudioSettingsData);
1267 CleanupStack::PushL(self);
1269 CleanupStack::Pop();
1273 void CRingingTone2ObserverAO::ConstructL()
1276 iGlobalAudioSettingsData.iRingingTone2Name=HBufC::NewL(KMaxLength);
1277 User::LeaveIfError(iRingingTone2NameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingTone2Name));
1278 TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone2Name->Des();
1279 User::LeaveIfError(iRingingTone2NameProperty.Get(ptr));
1283 void CRingingTone2ObserverAO::Subscribe()
1289 iRingingTone2NameProperty.Subscribe(iStatus);
1293 void CRingingTone2ObserverAO::RunL()
1295 TInt status(iStatus.Int());
1296 #ifdef PRINT_MESSAGE
1297 RDebug::Print(_L(" CRingingTone2ObserverAO::RunL:iStatus[%d]"), status);
1298 #endif // PRINT_MESSAGE
1299 if ( status == KErrNone )
1302 delete iGlobalAudioSettingsData.iRingingTone2Name;
1303 iGlobalAudioSettingsData.iRingingTone2Name=NULL;
1304 iGlobalAudioSettingsData.iRingingTone2Name=HBufC::NewL(KMaxLength);
1305 TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone2Name->Des();
1306 status = iRingingTone2NameProperty.Get(ptr);
1307 if( status == KErrNone)
1309 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingTone2Name;
1310 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1312 #ifdef PRINT_MESSAGE
1315 RDebug::Print(_L(" CRingingToneObserverAO::RunL:Property.Get Error[%d]"), status);
1317 #endif // PRINT_MESSAGE
1321 void CRingingTone2ObserverAO::DoCancel()
1323 iRingingTone2NameProperty.Cancel();
1326 TInt CRingingTone2ObserverAO::RunError(TInt /*aError*/)
1331 /////////////////////////////////////////////////////////////////////
1332 // CKeypadToneObserverAO //
1333 //////////////////////////////////////////////////////////////////////
1334 CKeypadToneObserverAO::CKeypadToneObserverAO(
1335 CGlobalAudioSettings &aGlobalAudioSettings,
1336 MAudioSettingsObserver& aAudioSettingsObserver,
1337 TGlobalAudioSettings& aGlobalAudioSettingsData)
1338 :CActive(EPriorityStandard),
1339 iGlobalAudioSettings(aGlobalAudioSettings),
1340 iAudioSettingsObserver(aAudioSettingsObserver),
1341 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
1343 CActiveScheduler::Add(this);
1346 CKeypadToneObserverAO::~CKeypadToneObserverAO()
1349 iKeypadToneVolumeProperty.Close();
1352 CKeypadToneObserverAO* CKeypadToneObserverAO::NewL(
1353 CGlobalAudioSettings &aGlobalAudioSettings,
1354 MAudioSettingsObserver& aAudioSettingsObserver,
1355 TGlobalAudioSettings& aGlobalAudioSettingsData)
1357 CKeypadToneObserverAO* self = new (ELeave) CKeypadToneObserverAO(
1358 aGlobalAudioSettings,
1359 aAudioSettingsObserver,
1360 aGlobalAudioSettingsData);
1361 CleanupStack::PushL(self);
1363 CleanupStack::Pop();
1367 void CKeypadToneObserverAO::ConstructL()
1371 User::LeaveIfError(iKeypadToneVolumeProperty.Attach(KGASPSUidGlobalAudioSettings, KGASKeypadToneVolume));
1372 TInt value=KErrNone;
1373 User::LeaveIfError(iKeypadToneVolumeProperty.Get(value));
1374 iGlobalAudioSettingsData.iKeyPadVolume=(CGlobalAudioSettings::TGASKeypadVolume)value;
1377 void CKeypadToneObserverAO::Subscribe()
1383 iKeypadToneVolumeProperty.Subscribe(iStatus);
1387 void CKeypadToneObserverAO::RunL()
1389 TInt status(iStatus.Int());
1390 #ifdef PRINT_MESSAGE
1391 RDebug::Print(_L(" CKeypadToneObserverAO::RunL:iStatus[%d]"), status);
1392 #endif // PRINT_MESSAGE
1393 if ( status == KErrNone )
1396 TInt value=KErrNone;
1397 status=iKeypadToneVolumeProperty.Get(value);
1398 iGlobalAudioSettingsData.iKeyPadVolume=(CGlobalAudioSettings::TGASKeypadVolume)value;
1401 if( status == KErrNone)
1403 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASKeyPadVolume;
1404 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1406 #ifdef PRINT_MESSAGE
1409 RDebug::Print(_L(" CKeypadToneObserverAO::RunL:Property.Get Error[%d]"), status);
1411 #endif // PRINT_MESSAGE
1415 void CKeypadToneObserverAO::DoCancel()
1417 iKeypadToneVolumeProperty.Cancel();
1420 TInt CKeypadToneObserverAO::RunError(TInt /*aError*/)
1426 /////////////////////////////////////////////////////////////////////
1427 // CSilenceModeObserverAO //
1428 //////////////////////////////////////////////////////////////////////
1429 CSilenceModeObserverAO::CSilenceModeObserverAO(
1430 CGlobalAudioSettings &aGlobalAudioSettings,
1431 MAudioSettingsObserver& aAudioSettingsObserver,
1432 TGlobalAudioSettings& aGlobalAudioSettingsData)
1433 :CActive(EPriorityStandard),
1434 iGlobalAudioSettings(aGlobalAudioSettings),
1435 iAudioSettingsObserver(aAudioSettingsObserver),
1436 iGlobalAudioSettingsData(aGlobalAudioSettingsData)
1438 CActiveScheduler::Add(this);
1441 CSilenceModeObserverAO::~CSilenceModeObserverAO()
1444 iSilenceModeProperty.Close();
1447 CSilenceModeObserverAO* CSilenceModeObserverAO::NewL(
1448 CGlobalAudioSettings &aGlobalAudioSettings,
1449 MAudioSettingsObserver& aAudioSettingsObserver,
1450 TGlobalAudioSettings& aGlobalAudioSettingsData)
1452 CSilenceModeObserverAO* self = new (ELeave) CSilenceModeObserverAO(
1453 aGlobalAudioSettings,
1454 aAudioSettingsObserver,
1455 aGlobalAudioSettingsData);
1456 CleanupStack::PushL(self);
1458 CleanupStack::Pop();
1462 void CSilenceModeObserverAO::ConstructL()
1466 User::LeaveIfError(iSilenceModeProperty.Attach(KGASPSUidGlobalAudioSettings, KGASSilenceMode));
1468 User::LeaveIfError(iSilenceModeProperty.Get(iGlobalAudioSettingsData.iSilenceMode));
1469 RDebug::Printf("in constructL,silence mode %d",iGlobalAudioSettingsData.iSilenceMode);
1473 void CSilenceModeObserverAO::Subscribe()
1479 iSilenceModeProperty.Subscribe(iStatus);
1483 void CSilenceModeObserverAO::RunL()
1485 TInt status(iStatus.Int());
1486 #ifdef PRINT_MESSAGE
1487 RDebug::Print(_L(" CSilenceModeObserverAO::RunL:iStatus[%d]"), status);
1488 #endif // PRINT_MESSAGE
1489 if ( status == KErrNone )
1493 status=iSilenceModeProperty.Get( iGlobalAudioSettingsData.iSilenceMode);
1494 RDebug::Printf("value of silent mode :%d",iGlobalAudioSettingsData.iSilenceMode);
1497 if( status == KErrNone)
1499 MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASSilenceMode;
1500 iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id);
1502 #ifdef PRINT_MESSAGE
1505 RDebug::Print(_L(" CKeypadToneObserverAO::RunL:Property.Get Error[%d]"), status);
1507 #endif // PRINT_MESSAGE
1511 void CSilenceModeObserverAO::DoCancel()
1513 iSilenceModeProperty.Cancel();
1516 TInt CSilenceModeObserverAO::RunError(TInt /*aError*/)