27 #include "GlobalAudioSettingsData.h" |
27 #include "GlobalAudioSettingsData.h" |
28 #include <GlobalAudioSettings.h> |
28 #include <GlobalAudioSettings.h> |
29 #include <MAudioClientsListObserver.h> |
29 #include <MAudioClientsListObserver.h> |
30 |
30 |
31 class MAudioSettingsObserver; |
31 class MAudioSettingsObserver; |
32 //class CGlobalAudioSettings; |
32 class CGlobalAudioSettings; |
33 class CWarningTonesObserverAO; |
33 class CWarningTonesObserverAO; |
34 class CMessagingTonesObserverAO; |
34 class CMessagingTonesObserverAO; |
35 class CSilentProfileObserverAO; |
35 class CSilentProfileObserverAO; |
36 class CVibraObserverAO; |
36 class CVibraObserverAO; |
37 class CAudioClientsListManagerAO; |
37 class CAudioClientsListManagerAO; |
38 |
38 class CMessageToneObserverAO; |
39 |
39 class CEmailToneObserverAO; |
|
40 class CRingingTypeObserverAO; |
|
41 class CVideoCallToneObserverAO; |
|
42 class CRingingTone1ObserverAO; |
|
43 class CRingingTone2ObserverAO; |
|
44 class CKeypadToneObserverAO; |
|
45 class CSilenceModeObserverAO; |
40 /** |
46 /** |
41 * Defines functions that client uses to set phone profile settings. |
47 * Defines functions that client uses to set phone profile settings. |
42 * |
48 * |
43 * @lib GlobalAudioSettings.lib |
49 * @lib GlobalAudioSettings.lib |
44 * @since Series 60 3.2 |
50 * @since Series 60 3.2 |
45 */ |
51 */ |
46 class CGlobalAudioSettingsImpl: public CBase |
52 NONSHARABLE_CLASS(CGlobalAudioSettingsImpl): public CBase |
47 { |
53 { |
48 public: |
54 public: |
49 /** |
55 /** |
50 * function for creating the GlobalAudioSettingsImpl |
56 * function for creating the GlobalAudioSettingsImpl |
51 * |
57 * |
52 */ |
58 */ |
53 IMPORT_C static CGlobalAudioSettingsImpl* NewL( |
59 static CGlobalAudioSettingsImpl* NewL( |
54 CGlobalAudioSettings& aGlobalAudioSettings, |
60 CGlobalAudioSettings& aGlobalAudioSettings, |
55 MAudioSettingsObserver& aAudioSettingsObserver); |
61 MAudioSettingsObserver& aAudioSettingsObserver); |
56 /** |
62 /** |
57 * Destructor. |
63 * Destructor. |
58 * |
64 * |
62 * Returns warning tones status. |
68 * Returns warning tones status. |
63 * |
69 * |
64 * @since Series 60 3.2 |
70 * @since Series 60 3.2 |
65 * @return TBool aEnable. ETrue if warning tones are enabled else EFalse. |
71 * @return TBool aEnable. ETrue if warning tones are enabled else EFalse. |
66 */ |
72 */ |
67 IMPORT_C TBool IsWarningTonesEnabled(); |
73 TBool IsWarningTonesEnabled(); |
68 /** |
74 /** |
69 * Returns message tones status. |
75 * Returns message tones status. |
70 * |
76 * |
71 * @since Series 60 3.2 |
77 * @since Series 60 3.2 |
72 * @return TBool aEnable. ETrue if message tones are enabled else EFalse. |
78 * @return TBool aEnable. ETrue if message tones are enabled else EFalse. |
73 */ |
79 */ |
74 IMPORT_C TBool IsMessageTonesEnabled(); |
80 TBool IsMessageTonesEnabled(); |
75 /** |
81 /** |
76 * Returns silent profile status. |
82 * Returns silent profile status. |
77 * |
83 * |
78 * @since Series 60 3.2 |
84 * @since Series 60 3.2 |
79 * @return TBool aEnable. ETrue if current profile is silent profile else EFalse. |
85 * @return TBool aEnable. ETrue if current profile is silent profile else EFalse. |
80 */ |
86 */ |
81 IMPORT_C TBool IsSilentProfileEnabled(); |
87 TBool IsSilentProfileEnabled(); |
82 /** |
88 /** |
83 * Returns vibra is enabled or not in the current profile status. |
89 * Returns vibra is enabled or not in the current profile status. |
84 * |
90 * |
85 * @since Series 60 3.2 |
91 * @since Series 60 3.2 |
86 * @return TBool aEnable. ETrue if current profile vibra active else EFalse. |
92 * @return TBool aEnable. ETrue if current profile vibra active else EFalse. |
87 */ |
93 */ |
88 IMPORT_C TBool IsVibraEnabled(); |
94 TBool IsVibraEnabled(); |
89 /** |
95 /** |
90 * Returns PublicSilence is enabled or not status. |
96 * Returns PublicSilence is enabled or not status. |
91 * |
97 * |
92 * @since Series 60 3.2 |
98 * @since Series 60 3.2 |
93 * @return TBool aEnable. ETrue if PublicSilence active else EFalse. |
99 * @return TBool aEnable. ETrue if PublicSilence active else EFalse. |
94 */ |
100 */ |
95 IMPORT_C TBool IsPublicSilenceEnabled(); |
101 TBool IsPublicSilenceEnabled(); |
96 |
102 /** |
|
103 * Returns Message Alert Tone |
|
104 * |
|
105 * |
|
106 * The filename selected as the message alert tone in the |
|
107 * current profile. |
|
108 * |
|
109 * |
|
110 * |
|
111 * @return TDesC& aMessageAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename |
|
112 * is returned |
|
113 */ |
|
114 |
|
115 |
|
116 TDesC& MessageAlertTone(); |
|
117 /** |
|
118 * Returns Email Alert Tone status |
|
119 * |
|
120 * |
|
121 * The filename selected as the email alert tone in the |
|
122 * current profile |
|
123 * |
|
124 * |
|
125 * |
|
126 * @return TBool aEnable. ETrue if current profile message tone is on else EFalse. |
|
127 */ |
|
128 TBool IsMessageAlertToneEnabled(); |
|
129 /** |
|
130 * Returns Email Alert Tone |
|
131 * |
|
132 * |
|
133 * The filename selected as the email alert tone in the |
|
134 * current profile |
|
135 * |
|
136 * |
|
137 * |
|
138 * @return TDesC& aEmailAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename |
|
139 * is returned |
|
140 */ |
|
141 TDesC& EmailAlertTone(); |
|
142 /** |
|
143 * Returns Email Alert Tone status |
|
144 * |
|
145 * |
|
146 * The filename selected as the email alert tone in the |
|
147 * current profile |
|
148 * |
|
149 * |
|
150 * |
|
151 * @return TBool aEnable. ETrue if current profile email alert tone is on else EFalse. |
|
152 */ |
|
153 TBool IsEmailAlertToneEnabled(); |
|
154 /** |
|
155 * Returns the RingingType |
|
156 * |
|
157 * |
|
158 * Ringing type set in the current profile |
|
159 * |
|
160 * |
|
161 * |
|
162 * |
|
163 * @return TGASRingingType aRingingType. |
|
164 */ |
|
165 CGlobalAudioSettings::TGASRingingType RingingType(); |
|
166 /** |
|
167 * Returns Videocall Alert Tone |
|
168 * |
|
169 * |
|
170 * The filename selected as the video call alert tone in the |
|
171 * current profile |
|
172 * |
|
173 * |
|
174 * |
|
175 * @return TDesC& aVideoCallAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename |
|
176 * is returned |
|
177 */ |
|
178 TDesC& VideoCallAlertTone(); |
|
179 /** |
|
180 * Returns Videocall Alert Tone status |
|
181 * |
|
182 * |
|
183 * The filename selected as the video call alert tone in the |
|
184 * current profile |
|
185 * |
|
186 * |
|
187 * |
|
188 * @return TBool aEnable. ETrue if current profile videocall alert tone is on else EFalse. |
|
189 */ |
|
190 TBool IsVideoCallAlertToneEnabled(); |
|
191 /** |
|
192 * Returns Ringing Alert Tone |
|
193 * |
|
194 * |
|
195 * The filename selected as the ringing alert tone in the |
|
196 * current profile |
|
197 * |
|
198 * |
|
199 * @return TDesC& aRingingAlertTone1Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename |
|
200 * is returned |
|
201 * |
|
202 */ |
|
203 TDesC& RingingAlertTone1(); |
|
204 /** |
|
205 * Returns Ringing Alert Tone1 status |
|
206 * |
|
207 * |
|
208 * The filename selected as the ringing alert tone in the |
|
209 * current profile |
|
210 * |
|
211 * |
|
212 * |
|
213 * @return TBool aEnable. ETrue if current profile ringing alert tone is on else EFalse. |
|
214 */ |
|
215 TBool IsRingingAlertTone1Enabled(); |
|
216 /** |
|
217 * Returns Ringing Alert Tone 2 |
|
218 * |
|
219 * |
|
220 * The filename selected as the ringing alert tone in the |
|
221 * current profile for the alternate line |
|
222 * |
|
223 * |
|
224 * |
|
225 * @return TDesC& aRingingAlertTone2Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename |
|
226 * is returned |
|
227 */ |
|
228 TDesC& RingingAlertTone2(); |
|
229 /** |
|
230 * Returns Ringing Alert Tone 2 |
|
231 * |
|
232 * |
|
233 * The filename selected as the ringing alert tone in the |
|
234 * current profile for the alternate line |
|
235 * |
|
236 * |
|
237 * |
|
238 * @return TBool aEnable. ETrue if current profile ringing alert tone of alternate line is on else EFalse. |
|
239 */ |
|
240 TBool IsRingingAlertTone2Enabled(); |
|
241 /** |
|
242 * Returns Ringing Keypad Volume |
|
243 * |
|
244 * |
|
245 * The key tone volume selected in the |
|
246 * current profile |
|
247 * |
|
248 * |
|
249 * |
|
250 * @return TGASKeypadVolume aKeypadToneVolume.returns EGASKeypadVolumeOff sound is off,else selected volume level |
|
251 * is returned |
|
252 */ |
|
253 CGlobalAudioSettings::TGASKeypadVolume KeyPadToneVolume(); |
|
254 /** |
|
255 * Returns silent mode status. |
|
256 * |
|
257 * |
|
258 * @return TBool aEnable. ETrue if the silent mode is enabled else EFalse. |
|
259 */ |
|
260 TBool IsSilenceModeEnabled(); |
97 /** |
261 /** |
98 * Registers audio clients list observer. |
262 * Registers audio clients list observer. |
99 * |
263 * |
100 * When registered successfully, the observer will start receiveing |
264 * When registered successfully, the observer will start receiveing |
101 * callback defined in MAudioClientsListObserver when audio clients list |
265 * callback defined in MAudioClientsListObserver when audio clients list |
168 CAudioClientsListManagerAO* iCAudioClientsListManagerAO; |
332 CAudioClientsListManagerAO* iCAudioClientsListManagerAO; |
169 // Object managing Paused Clients List implementation |
333 // Object managing Paused Clients List implementation |
170 CAudioClientsListManagerAO* iPausedClientsListManagerAO; |
334 CAudioClientsListManagerAO* iPausedClientsListManagerAO; |
171 // List of Audio Clients List Observer objects |
335 // List of Audio Clients List Observer objects |
172 RPointerArray<MAudioClientsListObserver> iAudioClientsListObserverArray; |
336 RPointerArray<MAudioClientsListObserver> iAudioClientsListObserverArray; |
173 }; |
337 |
174 |
338 |
175 |
339 CMessageToneObserverAO* iMessageToneObserverAO; |
176 class CWarningTonesObserverAO : public CActive |
340 CEmailToneObserverAO* iEmailToneObserverAO; |
|
341 CRingingTypeObserverAO* iRingingTypeObserverAO; |
|
342 CVideoCallToneObserverAO* iVideoCallObserverAO; |
|
343 CRingingTone1ObserverAO* iRingingTone1ObserverAO; |
|
344 CRingingTone2ObserverAO* iRingingTone2ObserverAO; |
|
345 CKeypadToneObserverAO* iKeypadToneObserverAO; |
|
346 CSilenceModeObserverAO* iSilenceModeObserverAO; |
|
347 }; |
|
348 |
|
349 |
|
350 NONSHARABLE_CLASS(CWarningTonesObserverAO) : public CActive |
177 { |
351 { |
178 public: |
352 public: |
179 // Ist Phase constr and Destr |
353 // Ist Phase constr and Destr |
180 static CWarningTonesObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
354 static CWarningTonesObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
181 MAudioSettingsObserver& aAudioSettingsObserver, |
355 MAudioSettingsObserver& aAudioSettingsObserver, |
283 MAudioSettingsObserver& iAudioSettingsObserver; |
457 MAudioSettingsObserver& iAudioSettingsObserver; |
284 RProperty iVibraProperty; |
458 RProperty iVibraProperty; |
285 TGlobalAudioSettings& iGlobalAudioSettingsData; |
459 TGlobalAudioSettings& iGlobalAudioSettingsData; |
286 }; |
460 }; |
287 |
461 |
|
462 |
|
463 NONSHARABLE_CLASS(CRingingTypeObserverAO) : public CActive |
|
464 { |
|
465 public: |
|
466 // Ist Phase constr and Destr |
|
467 static CRingingTypeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
468 MAudioSettingsObserver& aAudioSettingsObserver, |
|
469 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
470 ~CRingingTypeObserverAO(); |
|
471 void Subscribe(); |
|
472 |
|
473 protected: |
|
474 // From CActive |
|
475 void RunL(); |
|
476 void DoCancel(); |
|
477 TInt RunError(TInt aError); |
|
478 |
|
479 private: |
|
480 // Constr and IInd phase constr |
|
481 CRingingTypeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
482 MAudioSettingsObserver& aAudioSettingsObserver, |
|
483 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
484 void ConstructL(); |
|
485 CGlobalAudioSettings& iGlobalAudioSettings; |
|
486 MAudioSettingsObserver& iAudioSettingsObserver; |
|
487 RProperty iRingingTypeProperty; |
|
488 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
489 }; |
|
490 |
|
491 NONSHARABLE_CLASS(CMessageToneObserverAO) : public CActive |
|
492 { |
|
493 public: |
|
494 // Ist Phase constr and Destr |
|
495 static CMessageToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
496 MAudioSettingsObserver& aAudioSettingsObserver, |
|
497 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
498 ~CMessageToneObserverAO(); |
|
499 void Subscribe(); |
|
500 |
|
501 protected: |
|
502 // From CActive |
|
503 void RunL(); |
|
504 void DoCancel(); |
|
505 TInt RunError(TInt aError); |
|
506 |
|
507 private: |
|
508 // Constr and IInd phase constr |
|
509 CMessageToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
510 MAudioSettingsObserver& aAudioSettingsObserver, |
|
511 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
512 void ConstructL(); |
|
513 CGlobalAudioSettings& iGlobalAudioSettings; |
|
514 MAudioSettingsObserver& iAudioSettingsObserver; |
|
515 RProperty iMessageToneNameProperty; |
|
516 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
517 }; |
|
518 |
|
519 NONSHARABLE_CLASS(CEmailToneObserverAO) : public CActive |
|
520 { |
|
521 public: |
|
522 // Ist Phase constr and Destr |
|
523 static CEmailToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
524 MAudioSettingsObserver& aAudioSettingsObserver, |
|
525 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
526 ~CEmailToneObserverAO(); |
|
527 void Subscribe(); |
|
528 |
|
529 protected: |
|
530 // From CActive |
|
531 void RunL(); |
|
532 void DoCancel(); |
|
533 TInt RunError(TInt aError); |
|
534 |
|
535 private: |
|
536 // Constr and IInd phase constr |
|
537 CEmailToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
538 MAudioSettingsObserver& aAudioSettingsObserver, |
|
539 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
540 void ConstructL(); |
|
541 CGlobalAudioSettings& iGlobalAudioSettings; |
|
542 MAudioSettingsObserver& iAudioSettingsObserver; |
|
543 RProperty iEmailToneNameProperty; |
|
544 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
545 }; |
|
546 |
|
547 NONSHARABLE_CLASS(CVideoCallToneObserverAO) : public CActive |
|
548 { |
|
549 public: |
|
550 // Ist Phase constr and Destr |
|
551 static CVideoCallToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
552 MAudioSettingsObserver& aAudioSettingsObserver, |
|
553 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
554 ~CVideoCallToneObserverAO(); |
|
555 void Subscribe(); |
|
556 |
|
557 protected: |
|
558 // From CActive |
|
559 void RunL(); |
|
560 void DoCancel(); |
|
561 TInt RunError(TInt aError); |
|
562 |
|
563 private: |
|
564 // Constr and IInd phase constr |
|
565 CVideoCallToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
566 MAudioSettingsObserver& aAudioSettingsObserver, |
|
567 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
568 void ConstructL(); |
|
569 CGlobalAudioSettings& iGlobalAudioSettings; |
|
570 MAudioSettingsObserver& iAudioSettingsObserver; |
|
571 RProperty iVideoCallToneNameProperty; |
|
572 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
573 }; |
|
574 |
|
575 NONSHARABLE_CLASS(CRingingTone1ObserverAO) : public CActive |
|
576 { |
|
577 public: |
|
578 // Ist Phase constr and Destr |
|
579 static CRingingTone1ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
580 MAudioSettingsObserver& aAudioSettingsObserver, |
|
581 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
582 ~CRingingTone1ObserverAO(); |
|
583 void Subscribe(); |
|
584 |
|
585 protected: |
|
586 // From CActive |
|
587 void RunL(); |
|
588 void DoCancel(); |
|
589 TInt RunError(TInt aError); |
|
590 |
|
591 private: |
|
592 // Constr and IInd phase constr |
|
593 CRingingTone1ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
594 MAudioSettingsObserver& aAudioSettingsObserver, |
|
595 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
596 void ConstructL(); |
|
597 CGlobalAudioSettings& iGlobalAudioSettings; |
|
598 MAudioSettingsObserver& iAudioSettingsObserver; |
|
599 RProperty iRingingTone1NameProperty; |
|
600 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
601 }; |
|
602 |
|
603 NONSHARABLE_CLASS(CRingingTone2ObserverAO) : public CActive |
|
604 { |
|
605 public: |
|
606 // Ist Phase constr and Destr |
|
607 static CRingingTone2ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
608 MAudioSettingsObserver& aAudioSettingsObserver, |
|
609 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
610 ~CRingingTone2ObserverAO(); |
|
611 void Subscribe(); |
|
612 |
|
613 protected: |
|
614 // From CActive |
|
615 void RunL(); |
|
616 void DoCancel(); |
|
617 TInt RunError(TInt aError); |
|
618 |
|
619 private: |
|
620 // Constr and IInd phase constr |
|
621 CRingingTone2ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
622 MAudioSettingsObserver& aAudioSettingsObserver, |
|
623 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
624 void ConstructL(); |
|
625 CGlobalAudioSettings& iGlobalAudioSettings; |
|
626 MAudioSettingsObserver& iAudioSettingsObserver; |
|
627 RProperty iRingingTone2NameProperty; |
|
628 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
629 }; |
|
630 |
|
631 NONSHARABLE_CLASS(CKeypadToneObserverAO) : public CActive |
|
632 { |
|
633 public: |
|
634 // Ist Phase constr and Destr |
|
635 static CKeypadToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
636 MAudioSettingsObserver& aAudioSettingsObserver, |
|
637 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
638 ~CKeypadToneObserverAO(); |
|
639 void Subscribe(); |
|
640 |
|
641 protected: |
|
642 // From CActive |
|
643 void RunL(); |
|
644 void DoCancel(); |
|
645 TInt RunError(TInt aError); |
|
646 |
|
647 private: |
|
648 // Constr and IInd phase constr |
|
649 CKeypadToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
650 MAudioSettingsObserver& aAudioSettingsObserver, |
|
651 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
652 void ConstructL(); |
|
653 CGlobalAudioSettings& iGlobalAudioSettings; |
|
654 MAudioSettingsObserver& iAudioSettingsObserver; |
|
655 RProperty iKeypadToneVolumeProperty; |
|
656 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
657 }; |
|
658 |
|
659 NONSHARABLE_CLASS(CSilenceModeObserverAO) : public CActive |
|
660 { |
|
661 public: |
|
662 // Ist Phase constr and Destr |
|
663 static CSilenceModeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings, |
|
664 MAudioSettingsObserver& aAudioSettingsObserver, |
|
665 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
666 ~CSilenceModeObserverAO(); |
|
667 void Subscribe(); |
|
668 |
|
669 protected: |
|
670 // From CActive |
|
671 void RunL(); |
|
672 void DoCancel(); |
|
673 TInt RunError(TInt aError); |
|
674 |
|
675 private: |
|
676 // Constr and IInd phase constr |
|
677 CSilenceModeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings, |
|
678 MAudioSettingsObserver& aAudioSettingsObserver, |
|
679 TGlobalAudioSettings& aGlobalAudioSettingsData); |
|
680 void ConstructL(); |
|
681 CGlobalAudioSettings& iGlobalAudioSettings; |
|
682 MAudioSettingsObserver& iAudioSettingsObserver; |
|
683 RProperty iSilenceModeProperty; |
|
684 TGlobalAudioSettings& iGlobalAudioSettingsData; |
|
685 }; |
288 #endif // GLOBALAUDIOSETTINGSIMPL_H |
686 #endif // GLOBALAUDIOSETTINGSIMPL_H |
289 |
687 |
290 // End of file |
688 // End of file |