1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class takes care of CBA's. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHONECBAMANAGER_H |
|
20 #define CPHONECBAMANAGER_H |
|
21 |
|
22 //INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 //FORWARD |
|
26 class MPhoneViewCommandHandle; |
|
27 class MPhoneStateMachine; |
|
28 class CPhoneState; |
|
29 |
|
30 /** |
|
31 * Class takes care of CBA's. |
|
32 * |
|
33 * @lib phoneuicontrol |
|
34 * @since S60 v9.1 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPhoneCbaManager ) : public CBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Creates new instance of CPhoneCbaManager |
|
42 * @param aStateMachine: a state machine |
|
43 * @param aViewCommandHandle: handle to the PhoneUIView |
|
44 * @return CPhoneCbaManager* object |
|
45 */ |
|
46 static CPhoneCbaManager* NewL( |
|
47 CPhoneState* aState, |
|
48 MPhoneViewCommandHandle& aViewCommandHandle, |
|
49 MPhoneStateMachine& aStateMachine ); |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CPhoneCbaManager(); |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Update CBA |
|
59 */ |
|
60 IMPORT_C void UpdateCbaL( TInt aResource ); |
|
61 |
|
62 /** |
|
63 * Set CBA |
|
64 */ |
|
65 IMPORT_C void SetCbaL( TInt aResource ); |
|
66 |
|
67 /** |
|
68 * Update incoming CBAs |
|
69 */ |
|
70 IMPORT_C void UpdateIncomingCbaL( TInt aCallId ); |
|
71 |
|
72 public: |
|
73 |
|
74 /** |
|
75 * Update In Call CBA |
|
76 */ |
|
77 void UpdateInCallCbaL(); |
|
78 |
|
79 /** |
|
80 * Sets the ringtone silenced status |
|
81 * @param aSilenceStatus, new status |
|
82 */ |
|
83 void SetRingtoneSilencedStatus( const TBool aSilenceStatus ); |
|
84 |
|
85 private: |
|
86 |
|
87 /* |
|
88 * Updated Cba when Swivel state changes. |
|
89 */ |
|
90 void UpdateCbaSwivelStateChangedL(); |
|
91 |
|
92 /** |
|
93 * Check is alerting or active voice call |
|
94 */ |
|
95 TBool IsVoiceCallAlertingOrActiveL(); |
|
96 |
|
97 /** |
|
98 * Get silence cba resource when incomng call |
|
99 * @param aSoftRejectActivated Is soft reject activated or not |
|
100 * @return Resource id of CBA |
|
101 */ |
|
102 TInt GetIncomingCallSilenceCBA( const TBool aSoftRejectActivated ); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * C++ default constructor. |
|
108 */ |
|
109 CPhoneCbaManager( |
|
110 CPhoneState* aState, |
|
111 MPhoneViewCommandHandle& aViewCommandHandle, |
|
112 MPhoneStateMachine& aStateMachine ); |
|
113 |
|
114 private: |
|
115 |
|
116 // Not owned: |
|
117 CPhoneState* iState; |
|
118 MPhoneViewCommandHandle& iViewCommandHandle; |
|
119 MPhoneStateMachine& iStateMachine; |
|
120 |
|
121 // RingtoneSilenced flag. |
|
122 // This is used to determine if the ringtone |
|
123 // for incoming call is silenced. The information |
|
124 // is used while updating softkeys in method |
|
125 // UpdateIncomingCbaL only |
|
126 TBool iRingtoneSilenced; |
|
127 |
|
128 }; |
|
129 |
|
130 |
|
131 #endif // CPHONECBAMANAGER_H |
|