devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h
branchRCL_3
changeset 49 735348f59235
parent 0 40261b775718
child 50 948c7f65f6d4
--- a/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h	Thu Aug 19 11:23:35 2010 +0300
+++ b/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h	Tue Aug 31 16:43:06 2010 +0300
@@ -29,28 +29,34 @@
 #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;
+class CSilenceModeObserverAO;
 /**
 *  Defines functions that client uses to set phone profile settings.
 *
 *  @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,36 +70,194 @@
         * @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();
+         /**
+         * Returns silent mode status.
+         *
+         * 
+         * @return TBool aEnable. ETrue if the silent mode is enabled else EFalse.
+         */
+         TBool IsSilenceModeEnabled();
         /**
         * Registers audio clients list observer.
         *
@@ -170,10 +334,20 @@
         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;
+        CSilenceModeObserverAO* iSilenceModeObserverAO;
     };
 
 
-class CWarningTonesObserverAO : public CActive
+NONSHARABLE_CLASS(CWarningTonesObserverAO) : public CActive
 	{
 public:
     // Ist Phase constr and Destr
@@ -201,7 +375,7 @@
     TGlobalAudioSettings& iGlobalAudioSettingsData;
 	};
 
-class CMessagingTonesObserverAO : public CActive
+NONSHARABLE_CLASS(CMessagingTonesObserverAO) : public CActive
 	{
 public:
     // Ist Phase constr and Destr
@@ -229,7 +403,7 @@
     TGlobalAudioSettings& iGlobalAudioSettingsData;
 	};
 	
-class CSilentProfileObserverAO : public CActive
+NONSHARABLE_CLASS( CSilentProfileObserverAO) : public CActive
 	{
 public:
     // Ist Phase constr and Destr
@@ -257,7 +431,7 @@
     TGlobalAudioSettings& iGlobalAudioSettingsData;
 	};
 
-class CVibraObserverAO : public CActive
+NONSHARABLE_CLASS(CVibraObserverAO) : public CActive
 	{
 public:
     // Ist Phase constr and Destr
@@ -285,6 +459,230 @@
     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;
+    };
+
+NONSHARABLE_CLASS(CSilenceModeObserverAO) : public CActive
+    {
+public:
+    // Ist Phase constr and Destr
+    static CSilenceModeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
+                                         MAudioSettingsObserver& aAudioSettingsObserver,
+                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
+    ~CSilenceModeObserverAO();
+    void Subscribe();
+
+protected:
+    // From CActive
+    void RunL();
+    void DoCancel();
+    TInt RunError(TInt aError);
+
+private:
+    // Constr and IInd phase constr
+    CSilenceModeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
+                                                 MAudioSettingsObserver& aAudioSettingsObserver,
+                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
+    void ConstructL();
+    CGlobalAudioSettings& iGlobalAudioSettings;
+    MAudioSettingsObserver&   iAudioSettingsObserver;
+    RProperty iSilenceModeProperty;
+    TGlobalAudioSettings& iGlobalAudioSettingsData;
+    };
 #endif // GLOBALAUDIOSETTINGSIMPL_H
 
 // End of file