devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h
changeset 43 98aa3ecc14d2
parent 0 40261b775718
child 46 ed4308a6c628
--- 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 <MAudioClientsListObserver.h>
 
 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<MAudioClientsListObserver> 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