# HG changeset patch # User hgs # Date 1282588693 -3600 # Node ID 98aa3ecc14d275b505a2d8c25079c09ea8ee17d0 # Parent 11bd6e33415a25f6ed20ae574e1f8ecc55448b84 2010wk29_01 diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/BWINS/GlobalAudioSettings.def --- a/devsoundextensions/globalaudiosettings/BWINS/GlobalAudioSettings.def Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/BWINS/GlobalAudioSettings.def Mon Aug 23 19:38:13 2010 +0100 @@ -1,19 +1,24 @@ EXPORTS - ??1CGlobalAudioSettings@@UAE@XZ @ 1 NONAME ; CGlobalAudioSettings::~CGlobalAudioSettings(void) - ??1CGlobalAudioSettingsImpl@@UAE@XZ @ 2 NONAME ; CGlobalAudioSettingsImpl::~CGlobalAudioSettingsImpl(void) - ?IsMessageTonesEnabled@CGlobalAudioSettings@@QAEHXZ @ 3 NONAME ; int CGlobalAudioSettings::IsMessageTonesEnabled(void) - ?IsMessageTonesEnabled@CGlobalAudioSettingsImpl@@QAEHXZ @ 4 NONAME ; int CGlobalAudioSettingsImpl::IsMessageTonesEnabled(void) - ?IsSilentProfileEnabled@CGlobalAudioSettings@@QAEHXZ @ 5 NONAME ; int CGlobalAudioSettings::IsSilentProfileEnabled(void) - ?IsSilentProfileEnabled@CGlobalAudioSettingsImpl@@QAEHXZ @ 6 NONAME ; int CGlobalAudioSettingsImpl::IsSilentProfileEnabled(void) - ?IsWarningTonesEnabled@CGlobalAudioSettings@@QAEHXZ @ 7 NONAME ; int CGlobalAudioSettings::IsWarningTonesEnabled(void) - ?IsWarningTonesEnabled@CGlobalAudioSettingsImpl@@QAEHXZ @ 8 NONAME ; int CGlobalAudioSettingsImpl::IsWarningTonesEnabled(void) - ?NewL@CGlobalAudioSettings@@SAPAV1@AAVMAudioSettingsObserver@@@Z @ 9 NONAME ; class CGlobalAudioSettings * CGlobalAudioSettings::NewL(class MAudioSettingsObserver &) - ?NewL@CGlobalAudioSettingsImpl@@SAPAV1@AAVCGlobalAudioSettings@@AAVMAudioSettingsObserver@@@Z @ 10 NONAME ; class CGlobalAudioSettingsImpl * CGlobalAudioSettingsImpl::NewL(class CGlobalAudioSettings &, class MAudioSettingsObserver &) - ?IsPublicSilenceEnabled@CGlobalAudioSettings@@QAEHXZ @ 11 NONAME ; int CGlobalAudioSettings::IsPublicSilenceEnabled(void) - ?IsPublicSilenceEnabled@CGlobalAudioSettingsImpl@@QAEHXZ @ 12 NONAME ; int CGlobalAudioSettingsImpl::IsPublicSilenceEnabled(void) - ?IsVibraEnabled@CGlobalAudioSettings@@QAEHXZ @ 13 NONAME ; int CGlobalAudioSettings::IsVibraEnabled(void) - ?IsVibraEnabled@CGlobalAudioSettingsImpl@@QAEHXZ @ 14 NONAME ; int CGlobalAudioSettingsImpl::IsVibraEnabled(void) - ?GetAudioClientsList@CGlobalAudioSettings@@QAEHW4TAudioClientListType@1@AAV?$RArray@VTProcessId@@@@@Z @ 15 NONAME ; int CGlobalAudioSettings::GetAudioClientsList(enum CGlobalAudioSettings::TAudioClientListType, class RArray &) - ?RegisterAudioClientsListObserver@CGlobalAudioSettings@@QAEHAAVMAudioClientsListObserver@@@Z @ 16 NONAME ; int CGlobalAudioSettings::RegisterAudioClientsListObserver(class MAudioClientsListObserver &) - ?UnregisterAudioClientsListObserver@CGlobalAudioSettings@@QAEHAAVMAudioClientsListObserver@@@Z @ 17 NONAME ; int CGlobalAudioSettings::UnregisterAudioClientsListObserver(class MAudioClientsListObserver &) + ?IsRingingAlertTone1Enabled@CGlobalAudioSettings@@QAEHXZ @ 1 NONAME ; int CGlobalAudioSettings::IsRingingAlertTone1Enabled(void) + ?RingingAlertTone1@CGlobalAudioSettings@@QAEAAVTDesC16@@XZ @ 2 NONAME ; class TDesC16 & CGlobalAudioSettings::RingingAlertTone1(void) + ?IsVideoCallAlertToneEnabled@CGlobalAudioSettings@@QAEHXZ @ 3 NONAME ; int CGlobalAudioSettings::IsVideoCallAlertToneEnabled(void) + ?IsEmailAlertToneEnabled@CGlobalAudioSettings@@QAEHXZ @ 4 NONAME ; int CGlobalAudioSettings::IsEmailAlertToneEnabled(void) + ?UnregisterAudioClientsListObserver@CGlobalAudioSettings@@QAEHAAVMAudioClientsListObserver@@@Z @ 5 NONAME ; int CGlobalAudioSettings::UnregisterAudioClientsListObserver(class MAudioClientsListObserver &) + ?IsMessageAlertToneEnabled@CGlobalAudioSettings@@QAEHXZ @ 6 NONAME ; int CGlobalAudioSettings::IsMessageAlertToneEnabled(void) + ?IsRingingAlertTone2Enabled@CGlobalAudioSettings@@QAEHXZ @ 7 NONAME ; int CGlobalAudioSettings::IsRingingAlertTone2Enabled(void) + ?IsWarningTonesEnabled@CGlobalAudioSettings@@QAEHXZ @ 8 NONAME ; int CGlobalAudioSettings::IsWarningTonesEnabled(void) + ??1CGlobalAudioSettings@@UAE@XZ @ 9 NONAME ; CGlobalAudioSettings::~CGlobalAudioSettings(void) + ?IsPublicSilenceEnabled@CGlobalAudioSettings@@QAEHXZ @ 10 NONAME ; int CGlobalAudioSettings::IsPublicSilenceEnabled(void) + ?RingingAlertTone2@CGlobalAudioSettings@@QAEAAVTDesC16@@XZ @ 11 NONAME ; class TDesC16 & CGlobalAudioSettings::RingingAlertTone2(void) + ?NewL@CGlobalAudioSettings@@SAPAV1@AAVMAudioSettingsObserver@@@Z @ 12 NONAME ; class CGlobalAudioSettings * CGlobalAudioSettings::NewL(class MAudioSettingsObserver &) + ?IsSilentProfileEnabled@CGlobalAudioSettings@@QAEHXZ @ 13 NONAME ; int CGlobalAudioSettings::IsSilentProfileEnabled(void) + ?GetAudioClientsList@CGlobalAudioSettings@@QAEHW4TAudioClientListType@1@AAV?$RArray@VTProcessId@@@@@Z @ 14 NONAME ; int CGlobalAudioSettings::GetAudioClientsList(enum CGlobalAudioSettings::TAudioClientListType, class RArray &) + ?IsMessageTonesEnabled@CGlobalAudioSettings@@QAEHXZ @ 15 NONAME ; int CGlobalAudioSettings::IsMessageTonesEnabled(void) + ?RingingType@CGlobalAudioSettings@@QAE?AW4TGASRingingType@1@XZ @ 16 NONAME ; enum CGlobalAudioSettings::TGASRingingType CGlobalAudioSettings::RingingType(void) + ?VideoCallAlertTone@CGlobalAudioSettings@@QAEAAVTDesC16@@XZ @ 17 NONAME ; class TDesC16 & CGlobalAudioSettings::VideoCallAlertTone(void) + ?RegisterAudioClientsListObserver@CGlobalAudioSettings@@QAEHAAVMAudioClientsListObserver@@@Z @ 18 NONAME ; int CGlobalAudioSettings::RegisterAudioClientsListObserver(class MAudioClientsListObserver &) + ?IsVibraEnabled@CGlobalAudioSettings@@QAEHXZ @ 19 NONAME ; int CGlobalAudioSettings::IsVibraEnabled(void) + ?KeyPadToneVolume@CGlobalAudioSettings@@QAE?AW4TGASKeypadVolume@1@XZ @ 20 NONAME ; enum CGlobalAudioSettings::TGASKeypadVolume CGlobalAudioSettings::KeyPadToneVolume(void) + ?MessageAlertTone@CGlobalAudioSettings@@QAEAAVTDesC16@@XZ @ 21 NONAME ; class TDesC16 & CGlobalAudioSettings::MessageAlertTone(void) + ?EmailAlertTone@CGlobalAudioSettings@@QAEAAVTDesC16@@XZ @ 22 NONAME ; class TDesC16 & CGlobalAudioSettings::EmailAlertTone(void) diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/EABI/GlobalAudioSettings.def --- a/devsoundextensions/globalaudiosettings/EABI/GlobalAudioSettings.def Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/EABI/GlobalAudioSettings.def Mon Aug 23 19:38:13 2010 +0100 @@ -1,37 +1,30 @@ EXPORTS - _ZN20CGlobalAudioSettings14IsVibraEnabledEv @ 1 NONAME - _ZN20CGlobalAudioSettings21IsMessageTonesEnabledEv @ 2 NONAME - _ZN20CGlobalAudioSettings21IsWarningTonesEnabledEv @ 3 NONAME - _ZN20CGlobalAudioSettings22IsPublicSilenceEnabledEv @ 4 NONAME - _ZN20CGlobalAudioSettings22IsSilentProfileEnabledEv @ 5 NONAME - _ZN20CGlobalAudioSettings4NewLER22MAudioSettingsObserver @ 6 NONAME - _ZN20CGlobalAudioSettingsD0Ev @ 7 NONAME - _ZN20CGlobalAudioSettingsD1Ev @ 8 NONAME - _ZN20CGlobalAudioSettingsD2Ev @ 9 NONAME - _ZN24CGlobalAudioSettingsImpl14IsVibraEnabledEv @ 10 NONAME - _ZN24CGlobalAudioSettingsImpl21IsMessageTonesEnabledEv @ 11 NONAME - _ZN24CGlobalAudioSettingsImpl21IsWarningTonesEnabledEv @ 12 NONAME - _ZN24CGlobalAudioSettingsImpl22IsPublicSilenceEnabledEv @ 13 NONAME - _ZN24CGlobalAudioSettingsImpl22IsSilentProfileEnabledEv @ 14 NONAME - _ZN24CGlobalAudioSettingsImpl4NewLER20CGlobalAudioSettingsR22MAudioSettingsObserver @ 15 NONAME - _ZN24CGlobalAudioSettingsImplD0Ev @ 16 NONAME - _ZN24CGlobalAudioSettingsImplD1Ev @ 17 NONAME - _ZN24CGlobalAudioSettingsImplD2Ev @ 18 NONAME - _ZTI16CVibraObserverAO @ 19 NONAME ; ## - _ZTI20CGlobalAudioSettings @ 20 NONAME ; ## - _ZTI23CWarningTonesObserverAO @ 21 NONAME ; ## - _ZTI24CGlobalAudioSettingsImpl @ 22 NONAME ; ## - _ZTI24CSilentProfileObserverAO @ 23 NONAME ; ## - _ZTI25CMessagingTonesObserverAO @ 24 NONAME ; ## - _ZTV16CVibraObserverAO @ 25 NONAME ; ## - _ZTV20CGlobalAudioSettings @ 26 NONAME ; ## - _ZTV23CWarningTonesObserverAO @ 27 NONAME ; ## - _ZTV24CGlobalAudioSettingsImpl @ 28 NONAME ; ## - _ZTV24CSilentProfileObserverAO @ 29 NONAME ; ## - _ZTV25CMessagingTonesObserverAO @ 30 NONAME ; ## - _ZN20CGlobalAudioSettings19GetAudioClientsListENS_20TAudioClientListTypeER6RArrayI10TProcessIdE @ 31 NONAME - _ZN20CGlobalAudioSettings32RegisterAudioClientsListObserverER25MAudioClientsListObserver @ 32 NONAME - _ZN20CGlobalAudioSettings34UnregisterAudioClientsListObserverER25MAudioClientsListObserver @ 33 NONAME - _ZTI26CAudioClientsListManagerAO @ 34 NONAME ; ## - _ZTV26CAudioClientsListManagerAO @ 35 NONAME ; ## + _ZN20CGlobalAudioSettings11RingingTypeEv @ 1 NONAME + _ZN20CGlobalAudioSettings14EmailAlertToneEv @ 2 NONAME + _ZN20CGlobalAudioSettings14IsVibraEnabledEv @ 3 NONAME + _ZN20CGlobalAudioSettings16KeyPadToneVolumeEv @ 4 NONAME + _ZN20CGlobalAudioSettings16MessageAlertToneEv @ 5 NONAME + _ZN20CGlobalAudioSettings17RingingAlertTone1Ev @ 6 NONAME + _ZN20CGlobalAudioSettings17RingingAlertTone2Ev @ 7 NONAME + _ZN20CGlobalAudioSettings18VideoCallAlertToneEv @ 8 NONAME + _ZN20CGlobalAudioSettings19GetAudioClientsListENS_20TAudioClientListTypeER6RArrayI10TProcessIdE @ 9 NONAME + _ZN20CGlobalAudioSettings21IsMessageTonesEnabledEv @ 10 NONAME + _ZN20CGlobalAudioSettings21IsWarningTonesEnabledEv @ 11 NONAME + _ZN20CGlobalAudioSettings22IsPublicSilenceEnabledEv @ 12 NONAME + _ZN20CGlobalAudioSettings22IsSilentProfileEnabledEv @ 13 NONAME + _ZN20CGlobalAudioSettings23IsEmailAlertToneEnabledEv @ 14 NONAME + _ZN20CGlobalAudioSettings25IsMessageAlertToneEnabledEv @ 15 NONAME + _ZN20CGlobalAudioSettings26IsRingingAlertTone1EnabledEv @ 16 NONAME + _ZN20CGlobalAudioSettings26IsRingingAlertTone2EnabledEv @ 17 NONAME + _ZN20CGlobalAudioSettings27IsVideoCallAlertToneEnabledEv @ 18 NONAME + _ZN20CGlobalAudioSettings32RegisterAudioClientsListObserverER25MAudioClientsListObserver @ 19 NONAME + _ZN20CGlobalAudioSettings34UnregisterAudioClientsListObserverER25MAudioClientsListObserver @ 20 NONAME + _ZN20CGlobalAudioSettings4NewLER22MAudioSettingsObserver @ 21 NONAME + _ZN20CGlobalAudioSettingsD0Ev @ 22 NONAME + _ZN20CGlobalAudioSettingsD1Ev @ 23 NONAME + _ZN20CGlobalAudioSettingsD2Ev @ 24 NONAME + _ZTI20CGlobalAudioSettings @ 25 NONAME + _ZTI26CAudioClientsListManagerAO @ 26 NONAME + _ZTV20CGlobalAudioSettings @ 27 NONAME + _ZTV26CAudioClientsListManagerAO @ 28 NONAME diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsData.h --- a/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsData.h Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsData.h Mon Aug 23 19:38:13 2010 +0100 @@ -23,6 +23,7 @@ // INCLUDES #include +#include // CLASS DECLARATION @@ -40,7 +41,8 @@ * Constructor. */ TGlobalAudioSettings() : iWarningTones(EFalse),iMessageTones(EFalse),iSilentProfile(EFalse), - iVibra(EFalse),iPublicSilence(EFalse) + iVibra(EFalse),iPublicSilence(EFalse),iMessageToneName(NULL),iEmailToneName(NULL),iRingingType(CGlobalAudioSettings::EGASRingingTypeRinging),iVideoCallToneName(NULL), + iRingingTone1Name(NULL),iRingingTone2Name(NULL),iKeyPadVolume(CGlobalAudioSettings::EGASKeypadVolumeOff) {} TBool iWarningTones; @@ -48,6 +50,13 @@ TBool iSilentProfile; TBool iVibra; TBool iPublicSilence; + HBufC *iMessageToneName; + HBufC *iEmailToneName; + CGlobalAudioSettings::TGASRingingType iRingingType; + HBufC *iVideoCallToneName; + HBufC *iRingingTone1Name; + HBufC *iRingingTone2Name; + CGlobalAudioSettings::TGASKeypadVolume iKeyPadVolume; }; #endif // GlobalAudioSETTINGSDATA_H diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h --- a/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h Mon Aug 23 19:38:13 2010 +0100 @@ -29,13 +29,19 @@ #include class MAudioSettingsObserver; -//class CGlobalAudioSettings; +class CGlobalAudioSettings; class CWarningTonesObserverAO; class CMessagingTonesObserverAO; class CSilentProfileObserverAO; class CVibraObserverAO; class CAudioClientsListManagerAO; - +class CMessageToneObserverAO; +class CEmailToneObserverAO; +class CRingingTypeObserverAO; +class CVideoCallToneObserverAO; +class CRingingTone1ObserverAO; +class CRingingTone2ObserverAO; +class CKeypadToneObserverAO; /** * Defines functions that client uses to set phone profile settings. @@ -43,14 +49,14 @@ * @lib GlobalAudioSettings.lib * @since Series 60 3.2 */ -class CGlobalAudioSettingsImpl: public CBase +NONSHARABLE_CLASS(CGlobalAudioSettingsImpl): public CBase { public: /** * function for creating the GlobalAudioSettingsImpl * */ - IMPORT_C static CGlobalAudioSettingsImpl* NewL( + static CGlobalAudioSettingsImpl* NewL( CGlobalAudioSettings& aGlobalAudioSettings, MAudioSettingsObserver& aAudioSettingsObserver); /** @@ -64,35 +70,187 @@ * @since Series 60 3.2 * @return TBool aEnable. ETrue if warning tones are enabled else EFalse. */ - IMPORT_C TBool IsWarningTonesEnabled(); + TBool IsWarningTonesEnabled(); /** * Returns message tones status. * * @since Series 60 3.2 * @return TBool aEnable. ETrue if message tones are enabled else EFalse. */ - IMPORT_C TBool IsMessageTonesEnabled(); + TBool IsMessageTonesEnabled(); /** * Returns silent profile status. * * @since Series 60 3.2 * @return TBool aEnable. ETrue if current profile is silent profile else EFalse. */ - IMPORT_C TBool IsSilentProfileEnabled(); + TBool IsSilentProfileEnabled(); /** * Returns vibra is enabled or not in the current profile status. * * @since Series 60 3.2 * @return TBool aEnable. ETrue if current profile vibra active else EFalse. */ - IMPORT_C TBool IsVibraEnabled(); + TBool IsVibraEnabled(); /** * Returns PublicSilence is enabled or not status. * * @since Series 60 3.2 * @return TBool aEnable. ETrue if PublicSilence active else EFalse. */ - IMPORT_C TBool IsPublicSilenceEnabled(); + TBool IsPublicSilenceEnabled(); + /** + * Returns Message Alert Tone + * + * + * The filename selected as the message alert tone in the + * current profile. + * + * + * + * @return TDesC& aMessageAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + + + TDesC& MessageAlertTone(); + /** + * Returns Email Alert Tone status + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile message tone is on else EFalse. + */ + TBool IsMessageAlertToneEnabled(); + /** + * Returns Email Alert Tone + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TDesC& aEmailAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + TDesC& EmailAlertTone(); + /** + * Returns Email Alert Tone status + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile email alert tone is on else EFalse. + */ + TBool IsEmailAlertToneEnabled(); + /** + * Returns the RingingType + * + * + * Ringing type set in the current profile + * + * + * + * + * @return TGASRingingType aRingingType. + */ + CGlobalAudioSettings::TGASRingingType RingingType(); + /** + * Returns Videocall Alert Tone + * + * + * The filename selected as the video call alert tone in the + * current profile + * + * + * + * @return TDesC& aVideoCallAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + TDesC& VideoCallAlertTone(); + /** + * Returns Videocall Alert Tone status + * + * + * The filename selected as the video call alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile videocall alert tone is on else EFalse. + */ + TBool IsVideoCallAlertToneEnabled(); + /** + * Returns Ringing Alert Tone + * + * + * The filename selected as the ringing alert tone in the + * current profile + * + * + * @return TDesC& aRingingAlertTone1Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + * + */ + TDesC& RingingAlertTone1(); + /** + * Returns Ringing Alert Tone1 status + * + * + * The filename selected as the ringing alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile ringing alert tone is on else EFalse. + */ + TBool IsRingingAlertTone1Enabled(); + /** + * Returns Ringing Alert Tone 2 + * + * + * The filename selected as the ringing alert tone in the + * current profile for the alternate line + * + * + * + * @return TDesC& aRingingAlertTone2Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + TDesC& RingingAlertTone2(); + /** + * Returns Ringing Alert Tone 2 + * + * + * The filename selected as the ringing alert tone in the + * current profile for the alternate line + * + * + * + * @return TBool aEnable. ETrue if current profile ringing alert tone of alternate line is on else EFalse. + */ + TBool IsRingingAlertTone2Enabled(); + /** + * Returns Ringing Keypad Volume + * + * + * The key tone volume selected in the + * current profile + * + * + * + * @return TGASKeypadVolume aKeypadToneVolume.returns EGASKeypadVolumeOff sound is off,else selected volume level + * is returned + */ + CGlobalAudioSettings::TGASKeypadVolume KeyPadToneVolume(); /** * Registers audio clients list observer. @@ -170,10 +328,19 @@ CAudioClientsListManagerAO* iPausedClientsListManagerAO; // List of Audio Clients List Observer objects RPointerArray iAudioClientsListObserverArray; + + + CMessageToneObserverAO* iMessageToneObserverAO; + CEmailToneObserverAO* iEmailToneObserverAO; + CRingingTypeObserverAO* iRingingTypeObserverAO; + CVideoCallToneObserverAO* iVideoCallObserverAO; + CRingingTone1ObserverAO* iRingingTone1ObserverAO; + CRingingTone2ObserverAO* iRingingTone2ObserverAO; + CKeypadToneObserverAO* iKeypadToneObserverAO; }; -class CWarningTonesObserverAO : public CActive +NONSHARABLE_CLASS(CWarningTonesObserverAO) : public CActive { public: // Ist Phase constr and Destr @@ -201,7 +368,7 @@ TGlobalAudioSettings& iGlobalAudioSettingsData; }; -class CMessagingTonesObserverAO : public CActive +NONSHARABLE_CLASS(CMessagingTonesObserverAO) : public CActive { public: // Ist Phase constr and Destr @@ -229,7 +396,7 @@ TGlobalAudioSettings& iGlobalAudioSettingsData; }; -class CSilentProfileObserverAO : public CActive +NONSHARABLE_CLASS( CSilentProfileObserverAO) : public CActive { public: // Ist Phase constr and Destr @@ -257,7 +424,7 @@ TGlobalAudioSettings& iGlobalAudioSettingsData; }; -class CVibraObserverAO : public CActive +NONSHARABLE_CLASS(CVibraObserverAO) : public CActive { public: // Ist Phase constr and Destr @@ -285,6 +452,202 @@ TGlobalAudioSettings& iGlobalAudioSettingsData; }; + +NONSHARABLE_CLASS(CRingingTypeObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CRingingTypeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CRingingTypeObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CRingingTypeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iRingingTypeProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CMessageToneObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CMessageToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CMessageToneObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CMessageToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iMessageToneNameProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CEmailToneObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CEmailToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CEmailToneObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CEmailToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iEmailToneNameProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CVideoCallToneObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CVideoCallToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CVideoCallToneObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CVideoCallToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iVideoCallToneNameProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CRingingTone1ObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CRingingTone1ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CRingingTone1ObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CRingingTone1ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iRingingTone1NameProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CRingingTone2ObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CRingingTone2ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CRingingTone2ObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CRingingTone2ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iRingingTone2NameProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; + +NONSHARABLE_CLASS(CKeypadToneObserverAO) : public CActive + { +public: + // Ist Phase constr and Destr + static CKeypadToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + ~CKeypadToneObserverAO(); + void Subscribe(); + +protected: + // From CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + // Constr and IInd phase constr + CKeypadToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData); + void ConstructL(); + CGlobalAudioSettings& iGlobalAudioSettings; + MAudioSettingsObserver& iAudioSettingsObserver; + RProperty iKeypadToneVolumeProperty; + TGlobalAudioSettings& iGlobalAudioSettingsData; + }; #endif // GLOBALAUDIOSETTINGSIMPL_H // End of file diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/src/GlobalAudioSettings.cpp --- a/devsoundextensions/globalaudiosettings/src/GlobalAudioSettings.cpp Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/src/GlobalAudioSettings.cpp Mon Aug 23 19:38:13 2010 +0100 @@ -116,6 +116,55 @@ return (iBody->IsPublicSilenceEnabled()); } +EXPORT_C TDesC& CGlobalAudioSettings::MessageAlertTone() + { + return (iBody->MessageAlertTone()); + } + +EXPORT_C TBool CGlobalAudioSettings::IsMessageAlertToneEnabled() + { + return (iBody->IsMessageAlertToneEnabled()); + } +EXPORT_C TDesC& CGlobalAudioSettings::EmailAlertTone() + { + return (iBody->EmailAlertTone()); + } +EXPORT_C TBool CGlobalAudioSettings::IsEmailAlertToneEnabled() + { + return (iBody->IsEmailAlertToneEnabled()); + } +EXPORT_C CGlobalAudioSettings::TGASRingingType CGlobalAudioSettings::RingingType() + { + return (iBody->RingingType()); + } +EXPORT_C TDesC& CGlobalAudioSettings::VideoCallAlertTone() + { + return (iBody->VideoCallAlertTone()); + } +EXPORT_C TBool CGlobalAudioSettings::IsVideoCallAlertToneEnabled() + { + return (iBody->IsVideoCallAlertToneEnabled()); + } +EXPORT_C TDesC& CGlobalAudioSettings::RingingAlertTone1() + { + return (iBody->RingingAlertTone1()); + } +EXPORT_C TBool CGlobalAudioSettings::IsRingingAlertTone1Enabled() + { + return (iBody->IsRingingAlertTone1Enabled()); + } +EXPORT_C TDesC& CGlobalAudioSettings::RingingAlertTone2() + { + return (iBody->RingingAlertTone2()); + } +EXPORT_C TBool CGlobalAudioSettings::IsRingingAlertTone2Enabled() + { + return (iBody->IsRingingAlertTone2Enabled()); + } +EXPORT_C CGlobalAudioSettings::TGASKeypadVolume CGlobalAudioSettings::KeyPadToneVolume() + { + return (iBody->KeyPadToneVolume()); + } // ----------------------------------------------------------------------------- // CGlobalAudioSettings::RegisterAudioClientsListObserver // diff -r 11bd6e33415a -r 98aa3ecc14d2 devsoundextensions/globalaudiosettings/src/GlobalAudioSettingsImpl.cpp --- a/devsoundextensions/globalaudiosettings/src/GlobalAudioSettingsImpl.cpp Mon Aug 23 19:17:14 2010 +0100 +++ b/devsoundextensions/globalaudiosettings/src/GlobalAudioSettingsImpl.cpp Mon Aug 23 19:38:13 2010 +0100 @@ -31,6 +31,8 @@ #define PRINT_MESSAGE #endif // _DEBUG +const TInt KMaxLength=256; +_LIT( KNoSound, "z:\\resource\\No_Sound.wav" ); // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -51,7 +53,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C CGlobalAudioSettingsImpl* CGlobalAudioSettingsImpl::NewL( +CGlobalAudioSettingsImpl* CGlobalAudioSettingsImpl::NewL( CGlobalAudioSettings &aGlobalAudioSettings, MAudioSettingsObserver& aAudioSettingsObserver) { @@ -93,7 +95,50 @@ iAudioSettingsObserver, iGlobalAudioSettingsData); iVibraObserverAO->Subscribe(); - + iRingingTypeObserverAO = CRingingTypeObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iRingingTypeObserverAO->Subscribe(); + + iMessageToneObserverAO = CMessageToneObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iMessageToneObserverAO->Subscribe(); + iEmailToneObserverAO = CEmailToneObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iEmailToneObserverAO->Subscribe(); + + + iVideoCallObserverAO = CVideoCallToneObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iVideoCallObserverAO->Subscribe(); + + iRingingTone1ObserverAO = CRingingTone1ObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iRingingTone1ObserverAO->Subscribe(); + + iRingingTone2ObserverAO = CRingingTone2ObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iRingingTone2ObserverAO->Subscribe(); + + iKeypadToneObserverAO = CKeypadToneObserverAO::NewL( + iGlobalAudioSettings, + iAudioSettingsObserver, + iGlobalAudioSettingsData); + iKeypadToneObserverAO->Subscribe(); + + + RProperty publicSilenceProperty; User::LeaveIfError(publicSilenceProperty.Attach(KGASPSUidGlobalAudioSettings, KGASPublicSilence)); User::LeaveIfError(publicSilenceProperty.Get(iGlobalAudioSettingsData.iPublicSilence)); @@ -105,12 +150,19 @@ } // Destructor -EXPORT_C CGlobalAudioSettingsImpl::~CGlobalAudioSettingsImpl() +CGlobalAudioSettingsImpl::~CGlobalAudioSettingsImpl() { delete iWarningTonesObserverAO; delete iMessagingTonesObserverAO; delete iSilentProfileObserverAO; delete iVibraObserverAO; + delete iRingingTypeObserverAO; + delete iMessageToneObserverAO; + delete iEmailToneObserverAO; + delete iVideoCallObserverAO; + delete iRingingTone1ObserverAO; + delete iRingingTone2ObserverAO; + delete iKeypadToneObserverAO; delete iCAudioClientsListManagerAO; delete iPausedClientsListManagerAO; iAudioClientsListObserverArray.Close(); @@ -121,7 +173,7 @@ // Static function for creating an instance of the EnvironmentalReverb object. // ----------------------------------------------------------------------------- // -EXPORT_C TBool CGlobalAudioSettingsImpl::IsWarningTonesEnabled() + TBool CGlobalAudioSettingsImpl::IsWarningTonesEnabled() { if(iGlobalAudioSettingsData.iWarningTones) return(ETrue); @@ -134,7 +186,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CGlobalAudioSettingsImpl::IsMessageTonesEnabled() +TBool CGlobalAudioSettingsImpl::IsMessageTonesEnabled() { if(iGlobalAudioSettingsData.iMessageTones) return(ETrue); @@ -147,7 +199,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CGlobalAudioSettingsImpl::IsSilentProfileEnabled() +TBool CGlobalAudioSettingsImpl::IsSilentProfileEnabled() { if(iGlobalAudioSettingsData.iSilentProfile) return(ETrue); @@ -160,7 +212,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CGlobalAudioSettingsImpl::IsVibraEnabled() + TBool CGlobalAudioSettingsImpl::IsVibraEnabled() { if(iGlobalAudioSettingsData.iVibra) return(ETrue); @@ -173,7 +225,7 @@ // // ----------------------------------------------------------------------------- // -EXPORT_C TBool CGlobalAudioSettingsImpl::IsPublicSilenceEnabled() +TBool CGlobalAudioSettingsImpl::IsPublicSilenceEnabled() { if(iGlobalAudioSettingsData.iPublicSilence) return(ETrue); @@ -181,6 +233,85 @@ return(EFalse); } + + + +TDesC& CGlobalAudioSettingsImpl::MessageAlertTone() + { + return *iGlobalAudioSettingsData.iMessageToneName; + + } + +TBool CGlobalAudioSettingsImpl::IsMessageAlertToneEnabled() + { + if(iGlobalAudioSettingsData.iMessageToneName->CompareF(KNoSound)==0) + return EFalse; + else + return ETrue; + + } + TDesC& CGlobalAudioSettingsImpl::EmailAlertTone() + { + return *iGlobalAudioSettingsData.iEmailToneName; + + } + TBool CGlobalAudioSettingsImpl::IsEmailAlertToneEnabled() + { + if(iGlobalAudioSettingsData.iEmailToneName->CompareF(KNoSound)==0) + return EFalse; + else + return ETrue; + + } + CGlobalAudioSettings::TGASRingingType CGlobalAudioSettingsImpl::RingingType() + { + CGlobalAudioSettings::TGASRingingType type; + type= ( CGlobalAudioSettings::TGASRingingType)iGlobalAudioSettingsData.iRingingType; + + return type; + } + + TDesC& CGlobalAudioSettingsImpl::VideoCallAlertTone() + { + return *iGlobalAudioSettingsData.iVideoCallToneName; + } + TBool CGlobalAudioSettingsImpl::IsVideoCallAlertToneEnabled() + { + if(iGlobalAudioSettingsData.iVideoCallToneName->CompareF(KNoSound)==0) + return EFalse; + else + return ETrue; + + } + TDesC& CGlobalAudioSettingsImpl::RingingAlertTone1() + { + return *iGlobalAudioSettingsData.iRingingTone1Name; + } + TBool CGlobalAudioSettingsImpl::IsRingingAlertTone1Enabled() + { + if(iGlobalAudioSettingsData.iRingingTone1Name->CompareF(KNoSound)==0) + return EFalse; + else + return ETrue; + + } + TDesC& CGlobalAudioSettingsImpl::RingingAlertTone2() + { + return *iGlobalAudioSettingsData.iRingingTone2Name; + } + + TBool CGlobalAudioSettingsImpl::IsRingingAlertTone2Enabled() + { + if(iGlobalAudioSettingsData.iRingingTone2Name->CompareF(KNoSound)==0) + return EFalse; + else + return ETrue; + + } + CGlobalAudioSettings::TGASKeypadVolume CGlobalAudioSettingsImpl::KeyPadToneVolume() + { + return (CGlobalAudioSettings::TGASKeypadVolume)iGlobalAudioSettingsData.iKeyPadVolume; + } // ----------------------------------------------------------------------------- // CGlobalAudioSettingsImpl::RegisterAudioClientsListObserver // @@ -319,7 +450,8 @@ status = iWarningTonesProperty.Get(iGlobalAudioSettingsData.iWarningTones); if(status == KErrNone) { - iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, MAudioSettingsObserver::KWarningTones ); + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASWarningTones; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); } #ifdef PRINT_MESSAGE else @@ -402,7 +534,8 @@ status = iMessagingTonesProperty.Get(iGlobalAudioSettingsData.iMessageTones); if(status == KErrNone) { - iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, MAudioSettingsObserver::KMessageTones); + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASMessageTones; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); } #ifdef PRINT_MESSAGE else @@ -485,7 +618,8 @@ status = iSilentProfileProperty.Get(iGlobalAudioSettingsData.iSilentProfile); if(status == KErrNone) { - iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, MAudioSettingsObserver::KSilentProfile); + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASSilentProfile; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); } #ifdef PRINT_MESSAGE else @@ -569,7 +703,8 @@ status = iVibraProperty.Get(iGlobalAudioSettingsData.iVibra); if( status == KErrNone) { - iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, MAudioSettingsObserver::KVibra); + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASVibra; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings,id); } #ifdef PRINT_MESSAGE else @@ -590,4 +725,691 @@ return KErrNone; } +////////////////////////////////////////////////////////////////////// +// CRingingTypeObserverAO // +////////////////////////////////////////////////////////////////////// +CRingingTypeObserverAO::CRingingTypeObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CRingingTypeObserverAO::~CRingingTypeObserverAO() + { + Cancel(); + iRingingTypeProperty.Close(); + } + +CRingingTypeObserverAO* CRingingTypeObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CRingingTypeObserverAO* self = new (ELeave) CRingingTypeObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CRingingTypeObserverAO::ConstructL() + { + User::LeaveIfError(iRingingTypeProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingType)); + TInt value=KErrNone; + User::LeaveIfError(iRingingTypeProperty.Get(value)); + iGlobalAudioSettingsData.iRingingType=(CGlobalAudioSettings::TGASRingingType)value; + + } + +void CRingingTypeObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iRingingTypeProperty.Subscribe(iStatus); + } + } + +void CRingingTypeObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CRingingTypeObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + TInt value=KErrNone; + status=(iRingingTypeProperty.Get(value)); + iGlobalAudioSettingsData.iRingingType=(CGlobalAudioSettings::TGASRingingType)value; + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingType; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CRingingTypeObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CRingingTypeObserverAO::DoCancel() + { + iRingingTypeProperty.Cancel(); + } + +TInt CRingingTypeObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + +////////////////////////////////////////////////////////////////////// +// CMessageToneObserverAO // +////////////////////////////////////////////////////////////////////// +CMessageToneObserverAO::CMessageToneObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CMessageToneObserverAO::~CMessageToneObserverAO() + { + Cancel(); + iMessageToneNameProperty.Close(); + if( iGlobalAudioSettingsData.iMessageToneName) + { + delete iGlobalAudioSettingsData.iMessageToneName; + iGlobalAudioSettingsData.iMessageToneName=NULL; + } + } + +CMessageToneObserverAO* CMessageToneObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CMessageToneObserverAO* self = new (ELeave) CMessageToneObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CMessageToneObserverAO::ConstructL() + { + iGlobalAudioSettingsData.iMessageToneName=HBufC::NewL(KMaxLength); + User::LeaveIfError(iMessageToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASMessageToneName)); + TPtr16 ptr=iGlobalAudioSettingsData.iMessageToneName->Des(); + User::LeaveIfError(iMessageToneNameProperty.Get(ptr)); + + } + +void CMessageToneObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iMessageToneNameProperty.Subscribe(iStatus); + } + } + +void CMessageToneObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CMessageToneObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + delete iGlobalAudioSettingsData.iMessageToneName; + iGlobalAudioSettingsData.iMessageToneName=NULL; + iGlobalAudioSettingsData.iMessageToneName=HBufC::NewL(KMaxLength); + TPtr16 ptr=iGlobalAudioSettingsData.iMessageToneName->Des(); + status = iMessageToneNameProperty.Get(ptr); + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASMessageToneName; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CMessageToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CMessageToneObserverAO::DoCancel() + { + iMessageToneNameProperty.Cancel(); + } + +TInt CMessageToneObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + + +///////////////////////////////////////////////////////////////////// +// CEmailToneObserverAO // +////////////////////////////////////////////////////////////////////// +CEmailToneObserverAO::CEmailToneObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CEmailToneObserverAO::~CEmailToneObserverAO() + { + Cancel(); + iEmailToneNameProperty.Close(); + + if(iGlobalAudioSettingsData.iEmailToneName) + { + delete iGlobalAudioSettingsData.iEmailToneName; + iGlobalAudioSettingsData.iEmailToneName=NULL; + } + + } + +CEmailToneObserverAO* CEmailToneObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CEmailToneObserverAO* self = new (ELeave) CEmailToneObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CEmailToneObserverAO::ConstructL() + { + + iGlobalAudioSettingsData.iEmailToneName=HBufC::NewL(KMaxLength); + User::LeaveIfError(iEmailToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASEmailToneName)); + TPtr16 ptr=iGlobalAudioSettingsData.iEmailToneName->Des(); + User::LeaveIfError(iEmailToneNameProperty.Get(ptr)); + + } + +void CEmailToneObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iEmailToneNameProperty.Subscribe(iStatus); + } + } + +void CEmailToneObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CEmailToneObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + delete iGlobalAudioSettingsData.iEmailToneName; + iGlobalAudioSettingsData.iEmailToneName=NULL; + iGlobalAudioSettingsData.iEmailToneName=HBufC::NewL(KMaxLength); + TPtr16 ptr=iGlobalAudioSettingsData.iEmailToneName->Des(); + status = iEmailToneNameProperty.Get(ptr); + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASEmailToneName; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CEmailToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CEmailToneObserverAO::DoCancel() + { + iEmailToneNameProperty.Cancel(); + } + +TInt CEmailToneObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + + +///////////////////////////////////////////////////////////////////// +// CVideoCallToneObserverAO // +////////////////////////////////////////////////////////////////////// +CVideoCallToneObserverAO::CVideoCallToneObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CVideoCallToneObserverAO::~CVideoCallToneObserverAO() + { + Cancel(); + iVideoCallToneNameProperty.Close(); + if( iGlobalAudioSettingsData.iVideoCallToneName) + { + delete iGlobalAudioSettingsData.iVideoCallToneName; + iGlobalAudioSettingsData.iVideoCallToneName=NULL; + } + + + } + +CVideoCallToneObserverAO* CVideoCallToneObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CVideoCallToneObserverAO* self = new (ELeave) CVideoCallToneObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CVideoCallToneObserverAO::ConstructL() + { + + iGlobalAudioSettingsData.iVideoCallToneName=HBufC::NewL(KMaxLength); + User::LeaveIfError(iVideoCallToneNameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASVideoCallToneName)); + TPtr16 ptr=iGlobalAudioSettingsData.iVideoCallToneName->Des(); + User::LeaveIfError(iVideoCallToneNameProperty.Get(ptr)); + + } + +void CVideoCallToneObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iVideoCallToneNameProperty.Subscribe(iStatus); + } + } + +void CVideoCallToneObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CVideocallToneObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + delete iGlobalAudioSettingsData.iVideoCallToneName; + iGlobalAudioSettingsData.iVideoCallToneName=NULL; + iGlobalAudioSettingsData.iVideoCallToneName=HBufC::NewL(KMaxLength); + TPtr16 ptr=iGlobalAudioSettingsData.iVideoCallToneName->Des(); + status = iVideoCallToneNameProperty.Get(ptr); + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASVideoCallToneName; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CVideoCallToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CVideoCallToneObserverAO::DoCancel() + { + iVideoCallToneNameProperty.Cancel(); + } + +TInt CVideoCallToneObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + +///////////////////////////////////////////////////////////////////// +// CRingingToneObserverAO // +////////////////////////////////////////////////////////////////////// +CRingingTone1ObserverAO::CRingingTone1ObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CRingingTone1ObserverAO::~CRingingTone1ObserverAO() + { + Cancel(); + iRingingTone1NameProperty.Close(); + if( iGlobalAudioSettingsData.iRingingTone1Name) + { + delete iGlobalAudioSettingsData.iRingingTone1Name; + iGlobalAudioSettingsData.iRingingTone1Name=NULL; + } + } + +CRingingTone1ObserverAO* CRingingTone1ObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CRingingTone1ObserverAO* self = new (ELeave) CRingingTone1ObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CRingingTone1ObserverAO::ConstructL() + { + + iGlobalAudioSettingsData.iRingingTone1Name=HBufC::NewL(KMaxLength); + User::LeaveIfError(iRingingTone1NameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingTone1Name)); + TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone1Name->Des(); + User::LeaveIfError(iRingingTone1NameProperty.Get(ptr)); + + } + +void CRingingTone1ObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iRingingTone1NameProperty.Subscribe(iStatus); + } + } + +void CRingingTone1ObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CRingingTone1ObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + delete iGlobalAudioSettingsData.iRingingTone1Name; + iGlobalAudioSettingsData.iRingingTone1Name=NULL; + iGlobalAudioSettingsData.iRingingTone1Name=HBufC::NewL(KMaxLength); + TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone1Name->Des(); + status = iRingingTone1NameProperty.Get(ptr); + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingTone1Name; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CRingingToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CRingingTone1ObserverAO::DoCancel() + { + iRingingTone1NameProperty.Cancel(); + } + +TInt CRingingTone1ObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + +//////////////////////////////////////////////////////////////////// +// CRingingToneObserverAO // +////////////////////////////////////////////////////////////////////// +CRingingTone2ObserverAO::CRingingTone2ObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CRingingTone2ObserverAO::~CRingingTone2ObserverAO() + { + Cancel(); + iRingingTone2NameProperty.Close(); + if(iGlobalAudioSettingsData.iRingingTone2Name) + { + delete iGlobalAudioSettingsData.iRingingTone2Name; + iGlobalAudioSettingsData.iRingingTone2Name=NULL; + } + + + } + +CRingingTone2ObserverAO* CRingingTone2ObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CRingingTone2ObserverAO* self = new (ELeave) CRingingTone2ObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CRingingTone2ObserverAO::ConstructL() + { + + iGlobalAudioSettingsData.iRingingTone2Name=HBufC::NewL(KMaxLength); + User::LeaveIfError(iRingingTone2NameProperty.Attach(KGASPSUidGlobalAudioSettings, KGASRingingTone2Name)); + TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone2Name->Des(); + User::LeaveIfError(iRingingTone2NameProperty.Get(ptr)); + + } + +void CRingingTone2ObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iRingingTone2NameProperty.Subscribe(iStatus); + } + } + +void CRingingTone2ObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CRingingTone2ObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + delete iGlobalAudioSettingsData.iRingingTone2Name; + iGlobalAudioSettingsData.iRingingTone2Name=NULL; + iGlobalAudioSettingsData.iRingingTone2Name=HBufC::NewL(KMaxLength); + TPtr16 ptr=iGlobalAudioSettingsData.iRingingTone2Name->Des(); + status = iRingingTone2NameProperty.Get(ptr); + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASRingingTone2Name; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CRingingToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CRingingTone2ObserverAO::DoCancel() + { + iRingingTone2NameProperty.Cancel(); + } + +TInt CRingingTone2ObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + +///////////////////////////////////////////////////////////////////// +// CKeypadToneObserverAO // +////////////////////////////////////////////////////////////////////// +CKeypadToneObserverAO::CKeypadToneObserverAO( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) +:CActive(EPriorityStandard), + iGlobalAudioSettings(aGlobalAudioSettings), + iAudioSettingsObserver(aAudioSettingsObserver), + iGlobalAudioSettingsData(aGlobalAudioSettingsData) + { + CActiveScheduler::Add(this); + } + +CKeypadToneObserverAO::~CKeypadToneObserverAO() + { + Cancel(); + iKeypadToneVolumeProperty.Close(); + } + +CKeypadToneObserverAO* CKeypadToneObserverAO::NewL( + CGlobalAudioSettings &aGlobalAudioSettings, + MAudioSettingsObserver& aAudioSettingsObserver, + TGlobalAudioSettings& aGlobalAudioSettingsData) + { + CKeypadToneObserverAO* self = new (ELeave) CKeypadToneObserverAO( + aGlobalAudioSettings, + aAudioSettingsObserver, + aGlobalAudioSettingsData); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +void CKeypadToneObserverAO::ConstructL() + { + + + User::LeaveIfError(iKeypadToneVolumeProperty.Attach(KGASPSUidGlobalAudioSettings, KGASKeypadToneVolume)); + TInt value=KErrNone; + User::LeaveIfError(iKeypadToneVolumeProperty.Get(value)); + iGlobalAudioSettingsData.iKeyPadVolume=(CGlobalAudioSettings::TGASKeypadVolume)value; + } + +void CKeypadToneObserverAO::Subscribe() + { + if (!IsActive()) + { + SetActive(); + + iKeypadToneVolumeProperty.Subscribe(iStatus); + } + } + +void CKeypadToneObserverAO::RunL() + { + TInt status(iStatus.Int()); +#ifdef PRINT_MESSAGE + RDebug::Print(_L(" CKeypadToneObserverAO::RunL:iStatus[%d]"), status); +#endif // PRINT_MESSAGE + if ( status == KErrNone ) + { + Subscribe(); + TInt value=KErrNone; + status=iKeypadToneVolumeProperty.Get(value); + iGlobalAudioSettingsData.iKeyPadVolume=(CGlobalAudioSettings::TGASKeypadVolume)value; + + + if( status == KErrNone) + { + MAudioSettingsObserver::TGASEventId id=MAudioSettingsObserver::EGASKeyPadVolume; + iAudioSettingsObserver.SettingsChanged(iGlobalAudioSettings, id); + } +#ifdef PRINT_MESSAGE + else + { + RDebug::Print(_L(" CKeypadToneObserverAO::RunL:Property.Get Error[%d]"), status); + } +#endif // PRINT_MESSAGE + } + } + +void CKeypadToneObserverAO::DoCancel() + { + iKeypadToneVolumeProperty.Cancel(); + } + +TInt CKeypadToneObserverAO::RunError(TInt /*aError*/) + { + return KErrNone; + } + //End of file diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_api/inc/GlobalAudioSettings.h --- a/mm_plat/global_audio_settings_api/inc/GlobalAudioSettings.h Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_api/inc/GlobalAudioSettings.h Mon Aug 23 19:38:13 2010 +0100 @@ -44,6 +44,36 @@ EActiveAudioClients, EPausedAudioClients }; + + enum TGASRingingType + { + /** The tone is played in a loop. + */ + EGASRingingTypeRinging = 0, + /** + * The tone is played in a loop. On the 1st round, the volume is gradually + * increment from the lowest level to the set level. + */ + EGASRingingTypeAscending = 1, + /** The tone is played only once. + */ + EGASRingingTypeRingingOnce = 2, + /** + * The phone only beeps once instead of playing the tone if one has been set. + */ + EGASRingingTypeBeepOnce = 3, + /** The phone is silent. + */ + EGASRingingTypeSilent = 4 + }; + + enum TGASKeypadVolume + { + EGASKeypadVolumeOff = 0, + EGASKeypadVolumeLevel1 = 1, + EGASKeypadVolumeLevel2 = 2, + EGASKeypadVolumeLevel3 = 3 + }; public: /** * function for creating the GlobalAudioSettings @@ -114,6 +144,167 @@ IMPORT_C TBool IsPublicSilenceEnabled(); /** + * Returns Message Alert Tone + * + * + * The filename selected as the message alert tone in the + * current profile. + * + * + * + * @return TDesC& aMessageAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + IMPORT_C TDesC& MessageAlertTone(); + + /** + * Returns Email Alert Tone status + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile message tone is on else EFalse. + */ + IMPORT_C TBool IsMessageAlertToneEnabled(); + /** + * Returns Email Alert Tone + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TDesC& aEmailAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + IMPORT_C TDesC& EmailAlertTone(); + + /** + * Returns Email Alert Tone status + * + * + * The filename selected as the email alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile email alert tone is on else EFalse. + */ + IMPORT_C TBool IsEmailAlertToneEnabled(); + /** + * Returns the RingingType + * + * + * Ringing type set in the current profile + * + * + * + * + * @return TGASRingingType aRingingType. + */ + + IMPORT_C TGASRingingType RingingType(); + + /** + * Returns Videocall Alert Tone + * + * + * The filename selected as the video call alert tone in the + * current profile + * + * + * + * @return TDesC& aVideoCallAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + + IMPORT_C TDesC& VideoCallAlertTone(); + /** + * Returns Videocall Alert Tone status + * + * + * The filename selected as the video call alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile videocall alert tone is on else EFalse. + */ + IMPORT_C TBool IsVideoCallAlertToneEnabled(); + /** + * Returns Ringing Alert Tone + * + * + * The filename selected as the ringing alert tone in the + * current profile + * + * + * @return TDesC& aRingingAlertTone1Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + * + */ + + IMPORT_C TDesC& RingingAlertTone1(); + /** + * Returns Ringing Alert Tone1 status + * + * + * The filename selected as the ringing alert tone in the + * current profile + * + * + * + * @return TBool aEnable. ETrue if current profile ringing alert tone is on else EFalse. + */ + IMPORT_C TBool IsRingingAlertTone1Enabled(); + + /** + * Returns Ringing Alert Tone 2 + * + * + * The filename selected as the ringing alert tone in the + * current profile for the alternate line + * + * + * + * @return TDesC& aRingingAlertTone2Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename + * is returned + */ + + IMPORT_C TDesC& RingingAlertTone2(); + /** + * Returns Ringing Alert Tone 2 + * + * + * The filename selected as the ringing alert tone in the + * current profile for the alternate line + * + * + * + * @return TBool aEnable. ETrue if current profile ringing alert tone of alternate line is on else EFalse. + */ + IMPORT_C TBool IsRingingAlertTone2Enabled(); + + /** + * Returns Ringing Keypad Volume + * + * + * The key tone volume selected in the + * current profile + * + * + * + * @return TGASKeypadVolume aKeypadToneVolume.returns EGASKeypadVolumeOff sound is off,else selected volume level + * is returned + */ + + IMPORT_C TGASKeypadVolume KeyPadToneVolume(); + + /** * Registers audio clients list observer. * * When registered successfully, the observer will start receiveing diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_api/inc/MGlobalAudioSettingsObserver.h --- a/mm_plat/global_audio_settings_api/inc/MGlobalAudioSettingsObserver.h Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_api/inc/MGlobalAudioSettingsObserver.h Mon Aug 23 19:38:13 2010 +0100 @@ -41,10 +41,20 @@ class MAudioSettingsObserver { public: - static const TUint KWarningTones = 1; - static const TUint KMessageTones = 2; - static const TUint KSilentProfile = 3; - static const TUint KVibra = 4; + enum TGASEventId + { + EGASWarningTones, + EGASMessageTones, + EGASSilentProfile, + EGASVibra, + EGASMessageToneName, + EGASEmailToneName, + EGASRingingType, + EGASVideoCallToneName, + EGASRingingTone1Name, + EGASRingingTone2Name, + EGASKeyPadVolume + }; public: /** @@ -55,7 +65,7 @@ * which invoked the callback. * @param aSetting Specific id of the audio setting that changed. */ - virtual void SettingsChanged(CGlobalAudioSettings& aGlobalAudioSettings, TUint aSetting) = 0; + virtual void SettingsChanged(CGlobalAudioSettings& aGlobalAudioSettings, TGASEventId aSetting) = 0; }; #endif // MGLOBALAUDIOSETTINGSOBSERVER_H diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_api/tsrc/Conf/GlobalASTestClass.cfg --- a/mm_plat/global_audio_settings_api/tsrc/Conf/GlobalASTestClass.cfg Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_api/tsrc/Conf/GlobalASTestClass.cfg Mon Aug 23 19:38:13 2010 +0100 @@ -8,6 +8,18 @@ GAS IsSilentProfileEnabled GAS IsVibraEnabled GAS IsPublicSilenceEnabled +GAS RingingType +GAS GetMessageToneName +GAS IsMessageAlertToneEnabled +GAS GetEmailToneName +GAS IsEmailAlertToneEnabled +GAS GetVideoCallToneName +GAS IsVideoCallAlertToneEnabled +GAS GetRingingTone1Name +GAS IsRingingAlertTone1Enabled +GAS GetRingingTone2Name +GAS IsRingingAlertTone2Enabled +GAS GetKeypadToneVolume GAS GetAudioClientsList GAS GetPausedClientsList GAS UnregisterAudioClientsListObserver diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/inc/GlobalASTestClass.h --- a/mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/inc/GlobalASTestClass.h Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/inc/GlobalASTestClass.h Mon Aug 23 19:38:13 2010 +0100 @@ -82,7 +82,7 @@ // From MAudioSettingsObserver - void SettingsChanged(CGlobalAudioSettings& aGlobalAudioSettings, TUint aSetting); + void SettingsChanged(CGlobalAudioSettings& aGlobalAudioSettings, MAudioSettingsObserver::TGASEventId aSetting); // From MAudioClientsListObserver void Event( const CGlobalAudioSettings& aGlobalAudioSettings, TUint aEvent ); @@ -120,6 +120,18 @@ TInt UnregisterAudioClientsListObserver( CStifItemParser& aItem ); TInt GetAudioClientsList( CStifItemParser& aItem ); TInt GetPausedClientsList( CStifItemParser& aItem ); + TInt GetRingingType( CStifItemParser& aItem ); + TInt MessageAlertTone( CStifItemParser& aItem ); + TInt IsMessageAlertToneEnabled( CStifItemParser& aItem ); + TInt EmailAlertTone( CStifItemParser& aItem ); + TInt IsEmailAlertToneEnabled( CStifItemParser& aItem ); + TInt VideoCallAlertTone( CStifItemParser& aItem ); + TInt IsVideoCallAlertToneEnabled( CStifItemParser& aItem ); + TInt RingingAlertTone1( CStifItemParser& aItem ); + TInt IsRingingAlertTone1Enabled( CStifItemParser& aItem ); + TInt RingingAlertTone2( CStifItemParser& aItem ); + TInt IsRingingAlertTone2Enabled( CStifItemParser& aItem ); + TInt KeypadAlertTone( CStifItemParser& aItem ); private: // Data diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/src/GlobalASTestClassBlocks.cpp --- a/mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/src/GlobalASTestClassBlocks.cpp Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_api/tsrc/GlobalASTestClass/src/GlobalASTestClassBlocks.cpp Mon Aug 23 19:38:13 2010 +0100 @@ -66,7 +66,20 @@ ENTRY( "RegisterAudioClientsListObserver", CGlobalASTestClass::RegisterAudioClientsListObserver ), ENTRY( "UnregisterAudioClientsListObserver", CGlobalASTestClass::UnregisterAudioClientsListObserver ), ENTRY( "GetAudioClientsList", CGlobalASTestClass::GetAudioClientsList ), - ENTRY( "GetPausedClientsList", CGlobalASTestClass::GetPausedClientsList ) + ENTRY( "GetPausedClientsList", CGlobalASTestClass::GetPausedClientsList ), + ENTRY( "RingingType", CGlobalASTestClass::GetRingingType ), + ENTRY( "GetMessageToneName", CGlobalASTestClass::MessageAlertTone ), + ENTRY( "IsMessageAlertToneEnabled", CGlobalASTestClass::IsMessageAlertToneEnabled ), + ENTRY( "GetEmailToneName", CGlobalASTestClass::EmailAlertTone ), + ENTRY( "IsEmailAlertToneEnabled", CGlobalASTestClass::IsEmailAlertToneEnabled ), + ENTRY( "GetVideoCallToneName", CGlobalASTestClass::VideoCallAlertTone ), + ENTRY( "IsVideoCallAlertToneEnabled", CGlobalASTestClass::IsVideoCallAlertToneEnabled ), + ENTRY( "GetRingingTone1Name", CGlobalASTestClass::RingingAlertTone1 ), + ENTRY( "IsRingingAlertTone1Enabled", CGlobalASTestClass::IsRingingAlertTone1Enabled ), + ENTRY( "GetRingingTone2Name", CGlobalASTestClass::RingingAlertTone2 ), + ENTRY( "IsRingingAlertTone2Enabled", CGlobalASTestClass::IsRingingAlertTone2Enabled ), + ENTRY( "GetKeypadToneVolume", CGlobalASTestClass::KeypadAlertTone ) + }; const TInt count = sizeof( KFunctions ) / @@ -336,14 +349,202 @@ -void CGlobalASTestClass::SettingsChanged(CGlobalAudioSettings& /*aGlobalAudioSettings*/, TUint /*aSetting*/) +void CGlobalASTestClass::SettingsChanged(CGlobalAudioSettings& /*aGlobalAudioSettings*/, MAudioSettingsObserver::TGASEventId aSetting) { - iLog->Log(_L("CGlobalASTestClass:SettingsChanged")); + RDebug::Printf("settings changed %d",aSetting); + // CActiveScheduler::Stop(); } void CGlobalASTestClass::Event( const CGlobalAudioSettings& /*aGlobalAudioSettings*/, TUint aEvent ) { iLog->Log(_L("CGlobalASTestClass From MAudioClientsListObserver[%d]"), aEvent); } +TInt CGlobalASTestClass::GetRingingType(CStifItemParser& /*aItem*/ ) + { + RDebug::Printf("CGlobalASTestClass::GetRingingType"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TInt type= iPhoneProfileSettings->RingingType(); + RDebug::Printf("ringing type is %d",type); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::MessageAlertTone(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + RDebug::Print(_L("enable:%S"),&filename); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::IsMessageAlertToneEnabled(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TBool enable=iPhoneProfileSettings->IsMessageAlertToneEnabled(); + RDebug::Print(_L("enable:%d"),enable); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::EmailAlertTone(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TFileName filename=iPhoneProfileSettings->EmailAlertTone(); + RDebug::Print(_L("enable:%S"),&filename); + + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::IsEmailAlertToneEnabled(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TBool enable=iPhoneProfileSettings->IsEmailAlertToneEnabled(); + RDebug::Print(_L("enable:%d"),enable); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::VideoCallAlertTone(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TFileName filename=iPhoneProfileSettings->VideoCallAlertTone(); + RDebug::Print(_L("enable:%S"),&filename); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::IsVideoCallAlertToneEnabled(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TBool enable=iPhoneProfileSettings->IsVideoCallAlertToneEnabled(); + RDebug::Print(_L("enable:%d"),enable); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::RingingAlertTone1(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TFileName filename=iPhoneProfileSettings->RingingAlertTone1(); + RDebug::Print(_L("enable:%S"),&filename); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::IsRingingAlertTone1Enabled(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TBool enable=iPhoneProfileSettings->IsRingingAlertTone1Enabled(); + RDebug::Print(_L("enable:%d"),enable); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::RingingAlertTone2(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TFileName filename=iPhoneProfileSettings->RingingAlertTone2(); + RDebug::Print(_L("enable:%S"),&filename); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::IsRingingAlertTone2Enabled(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + // TFileName filename=iPhoneProfileSettings->MessageAlertTone(); + + // RDebug::Print(_L("filename %S"),&filename); + TBool enable=iPhoneProfileSettings->IsRingingAlertTone2Enabled(); + RDebug::Print(_L("enable:%d"),enable); + } + else + status=KErrNotFound; + + return status; + } +TInt CGlobalASTestClass::KeypadAlertTone(CStifItemParser& /*aItem*/) + { + RDebug::Printf("CGlobalASTestClass::MessageAlertTone"); + TInt status(KErrNone); + if(iPhoneProfileSettings) + { + TInt volume=iPhoneProfileSettings->KeyPadToneVolume(); + RDebug::Print(_L("enable:%d"),volume); + } + else + status=KErrNotFound; + + return status; + } // End of File diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_plat/global_audio_settings_definition_api/inc/GlobalAudioSettingsPSKeys.h --- a/mm_plat/global_audio_settings_definition_api/inc/GlobalAudioSettingsPSKeys.h Mon Aug 23 19:17:14 2010 +0100 +++ b/mm_plat/global_audio_settings_definition_api/inc/GlobalAudioSettingsPSKeys.h Mon Aug 23 19:38:13 2010 +0100 @@ -80,6 +80,78 @@ */ const TUint32 KGASPublicSilence = 0x00000005; +/** +* This key is required for the Global Audio Settings to determine the ringing type +* selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Message tone is disabled". +* filename of the tone selected= "Message tone is enabled". +*/ +const TUint32 KGASRingingType=0x00000006; + +/** +* This key is required for the Global Audio Settings to determine the message alert tone +* selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Message tone is disabled". +* filename of the tone selected= "Message tone is enabled". +*/ +const TUint32 KGASMessageToneName=0x00000007; + +/** +* This key is required for the Global Audio Settings to determine the email alert tone +* selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Email alert tone is disabled". +* filename of the tone selected= "Email alert tone is enabled". +*/ +const TUint32 KGASEmailToneName=0x00000008; + +/** +* This key is required for the Global Audio Settings to determine the video call tone +* selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Video call tone is disabled". +* filename of the tone selected= "Video call tone is enabled". +*/ +const TUint32 KGASVideoCallToneName=0x00000009; +/** +* This key is required for the Global Audio Settings to determine the ringing tone +* selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Ringing tone1 is disabled". +* filename of the tone selected= "Ringing tone1 is enabled". +*/ +const TUint32 KGASRingingTone1Name=0x0000000a; + +/** +* This key is required for the Global Audio Settings to determine the ringing tone +* for alternate line selected +* +* Possible text values: +* z:\\resource\\No_Sound.wav = "Ringing tone2 is disabled". +* filename of the tone selected= "Ringing tone2 tone is enabled". +*/ +const TUint32 KGASRingingTone2Name=0x0000000b; + +/** +* This key is required for the Global Audio Settings to determine the keypad volume +* selected +* +* Possible text values: +* EGASKeypadVolumeOff="No volume" +* EGASKeypadVolumeLevel1 = "Volume level 1" +* EGASKeypadVolumeLevel2 = "volume level 2" +* EGASKeypadVolumeLevel3 = "volume level 3" +*/ +const TUint32 KGASKeypadToneVolume=0x0000000c; + + #endif // GLOBALAUDIOSETTINGSPSKEYS_H // End of file diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/test3gp.dcf diff -r 11bd6e33415a -r 98aa3ecc14d2 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/testmp3.dcf