|
1 /* |
|
2 * Copyright (c) 2005 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: PhoneUI Menu Controller |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHONEMENUCONTROLLER_H |
|
20 #define CPHONEMENUCONTROLLER_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <e32std.h> |
|
27 #include <eikmenub.h> |
|
28 #include <e32property.h> |
|
29 #include "mphonepubsubobserver.h" |
|
30 |
|
31 // FORWARD DECLARATION |
|
32 class TPhoneCommandParam; |
|
33 class CEikonEnv; |
|
34 class MPhonePubSubObserver; |
|
35 class CAiwServiceHandler; |
|
36 |
|
37 class CPhoneMenuController : public CBase, public MPhonePubSubObserver |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CPhoneMenuController* NewL( CEikonEnv& aEikEnv ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CPhoneMenuController(); |
|
50 |
|
51 void OpenMenuBarL(); |
|
52 |
|
53 void CloseMenuBar(); |
|
54 |
|
55 void OpenMenuBarL( TPhoneCommandParam* aCommandParam ); |
|
56 |
|
57 void DynInitMenuBar( TPhoneCommandParam* aCommandParam ); |
|
58 |
|
59 void DynInitMenuPaneL( TPhoneCommandParam* aCommandParam ); |
|
60 |
|
61 void SetMuteFlag( TPhoneCommandParam* aCommandParam ); |
|
62 |
|
63 void SetIhfFlag( TPhoneCommandParam* aCommandParam ); |
|
64 |
|
65 void SetHoldFlag( TPhoneCommandParam* aCommandParam ); |
|
66 |
|
67 void GetHoldFlag( TPhoneCommandParam* aCommandParam ); |
|
68 |
|
69 void SetConferenceAndSingleFlag( TPhoneCommandParam* aCommandParam ); |
|
70 |
|
71 void GetConferenceAndSingleFlag( TPhoneCommandParam* aCommandParam ); |
|
72 |
|
73 void SetSoftRejectFlag( TPhoneCommandParam* aCommandParam ); |
|
74 |
|
75 void GetSoftRejectFlag( TPhoneCommandParam* aCommandParam ); |
|
76 |
|
77 void SetServiceCodeFlag( TPhoneCommandParam* aCommandParam ); |
|
78 |
|
79 void SetWiredAccFlag( TPhoneCommandParam* aCommandParam ); |
|
80 |
|
81 void SetMaxConfMembersFlag( TBool aIsMaxConfMember ); |
|
82 |
|
83 void SetBTAccFlag( TPhoneCommandParam* aCommandParam ); |
|
84 |
|
85 void SetBTAccAvailableFlag( TPhoneCommandParam* aCommandParam ); |
|
86 |
|
87 void SetPhoneNumberAvailableInPhoneEngine( TPhoneCommandParam* aCommandParam ); |
|
88 |
|
89 void SetWiredAccAvailableFlag( TPhoneCommandParam* aCommandParam ); |
|
90 |
|
91 void SetNEVisibleFlag( TBool aVisible ); |
|
92 |
|
93 void SetReplaceFlag( TBool aReplace ); |
|
94 |
|
95 void SetRemoveConfrenceOptionsFlag( TBool aRemoveConfrenceOptions ); |
|
96 |
|
97 void SetNumberEntryEmptyFlag( TBool aNumberEntryEmpty ); |
|
98 |
|
99 void SetCallInProgressFlag( TPhoneCommandParam* aCommandParam ); |
|
100 |
|
101 TBool IsMenuBarVisible(); |
|
102 |
|
103 void SetConferenceParticipantsListVisibleFlag( TPhoneCommandParam* aCommandParam ); |
|
104 |
|
105 void GetConferenceParticipantsListVisibleFlag( |
|
106 TPhoneCommandParam* aCommandParam ); |
|
107 |
|
108 void SetAlphaModeFlag( TBool aMode ); |
|
109 |
|
110 void SetAllowDtmfOptionsFlag( TBool aAllowDtmfOptions ); |
|
111 |
|
112 void SetVoipEnabledFlag( TPhoneCommandParam* aCommandParam ); |
|
113 |
|
114 void SetHideVideoCallDTMFVisibilityFlag ( TBool aHideVideoCallDTMFVisibility ); |
|
115 |
|
116 void SendAiwCommandL( TPhoneCommandParam* aCommandParam ); |
|
117 |
|
118 void SetContextMenu( TPhoneCommandParam* aCommandParam ); |
|
119 |
|
120 public: //from base class |
|
121 |
|
122 void HandlePropertyChangedL( |
|
123 const TUid& aCategory, |
|
124 const TUint aKey, |
|
125 const TInt aValue ); |
|
126 |
|
127 protected: // Constructors |
|
128 |
|
129 /** |
|
130 * C++ default constructor. |
|
131 */ |
|
132 CPhoneMenuController( CEikonEnv& aEikEnv ); |
|
133 |
|
134 |
|
135 private: |
|
136 |
|
137 /** |
|
138 * By default EPOC constructor is private. |
|
139 */ |
|
140 void ConstructL(); |
|
141 |
|
142 void AddMenuPaneL( |
|
143 TInt aPaneResourceId, |
|
144 CEikMenuPane* aMenuPane, |
|
145 TBool aAddSeparator ); |
|
146 |
|
147 /** |
|
148 * Checks if task swapper is to be shown in menu. |
|
149 * @param aResourceId It is the context menu resource. |
|
150 */ |
|
151 void ShowTaskSwapper( TInt aResourceId ) const; |
|
152 |
|
153 TBool IsSwivelClosed() const; |
|
154 |
|
155 private: |
|
156 CEikMenuBar* iMenu; |
|
157 TInt iGSMMenuResourceOffset; |
|
158 |
|
159 TInt iMenuResourceId; |
|
160 TInt iOkMenuResourceId; |
|
161 TBool iIhfFlag; |
|
162 TBool iMuteFlag; |
|
163 TBool iHoldFlag; |
|
164 TBool iConferenceAndSingleFlag; |
|
165 TBool iSoftRejectFlag; |
|
166 TBool iServiceCodeFlag; |
|
167 TBool iWiredAccFlag; |
|
168 TBool iMaxConfMembersFlag; |
|
169 TBool iBTAccFlag; |
|
170 TBool iBTAccTmpUnFlag; |
|
171 TBool iBTAccAvailableFlag; |
|
172 TBool iPhoneNumberAvailableInPhoneEngine; |
|
173 TBool iWiredAccAvailableFlag; |
|
174 TBool iNEVisible; |
|
175 TBool iReplace; |
|
176 TBool iRemoveConfrenceOptionsFlag; |
|
177 TBool iNumberEntryEmpty; |
|
178 TBool iCallInProgress; |
|
179 TBool iConferenceParticipantsListOpenFlag; |
|
180 TBool iAlphaMode; |
|
181 TBool iAllowDtmfOptionsFlag; |
|
182 TBool iVoipEnabledFlag; |
|
183 TBool iHideVideoCallDTMFVisibility; |
|
184 // Eikon environment delivered from CPhoneViewController |
|
185 CEikonEnv& iEikEnv; |
|
186 // Pointer to AIW service handler. OWNED. |
|
187 CAiwServiceHandler* iServiceHandler; |
|
188 }; |
|
189 |
|
190 #endif // MPAMENUBARCONTROLLER_H |
|
191 |
|
192 // End of File |