|
1 /* |
|
2 * Copyright (c) 2010 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 CPHONEUICOMMANDMANAGER_H |
|
20 #define CPHONEUICOMMANDMANAGER_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 ui commands, soft buttons and tool bar. |
|
32 * |
|
33 * @lib phoneuicontrol |
|
34 * @since S60 v10.1 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPhoneUiCommandManager ) : public CBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Creates new instance of CPhoneUiCommandManager |
|
42 * @param aStateMachine: a state machine |
|
43 * @param aViewCommandHandle: handle to the PhoneUIView |
|
44 * @return CPhoneUiCommandManager* object |
|
45 */ |
|
46 static CPhoneUiCommandManager* NewL( |
|
47 CPhoneState* aState, |
|
48 MPhoneViewCommandHandle& aViewCommandHandle, |
|
49 MPhoneStateMachine& aStateMachine ); |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CPhoneUiCommandManager(); |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Updates UI commands, push buttons and toolbar buttons. |
|
59 */ |
|
60 void UpdateUiCommands(); |
|
61 |
|
62 public: |
|
63 |
|
64 /** |
|
65 * Sets the soft reject status |
|
66 * @param aSoftRejectStatus, new status |
|
67 */ |
|
68 void SetSoftRejectStatus( TBool aSoftRejectStatus ); |
|
69 |
|
70 /** |
|
71 * Returns the soft reject status |
|
72 * @return Soft reject status |
|
73 */ |
|
74 TBool SoftRejectStatus(); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * Sets soft reject flag |
|
80 */ |
|
81 void SetSoftRejectDimmedFlag(); |
|
82 |
|
83 /** |
|
84 * Sets button flags |
|
85 */ |
|
86 void SetButtonFlags(); |
|
87 |
|
88 /** |
|
89 * Sets touch buttons. |
|
90 */ |
|
91 void SetTouchButtons(); |
|
92 |
|
93 /** |
|
94 * Sets toolbar buttons. |
|
95 */ |
|
96 void SetToolBarButtons(); |
|
97 |
|
98 /** |
|
99 * Returns toolbar resource id. |
|
100 */ |
|
101 TInt ToolBarResource(); |
|
102 |
|
103 /** |
|
104 * Returns ringing call resource id. |
|
105 */ |
|
106 TInt RingingCallResource(); |
|
107 |
|
108 /** |
|
109 * Returns single ringing call resource id. |
|
110 */ |
|
111 TInt SingleRingingCallResource(); |
|
112 |
|
113 /** |
|
114 * Check is a emergency call ongoing |
|
115 */ |
|
116 TBool IsEmergency(); |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * C++ default constructor. |
|
122 */ |
|
123 CPhoneUiCommandManager( |
|
124 CPhoneState* aState, |
|
125 MPhoneViewCommandHandle& aViewCommandHandle, |
|
126 MPhoneStateMachine& aStateMachine ); |
|
127 |
|
128 private: |
|
129 |
|
130 // Not owned: |
|
131 CPhoneState* iState; |
|
132 MPhoneViewCommandHandle& iViewCommandHandle; |
|
133 MPhoneStateMachine& iStateMachine; |
|
134 |
|
135 // Soft reject status flag |
|
136 TBool iSoftRejectStatus; |
|
137 }; |
|
138 |
|
139 |
|
140 #endif // CPHONEUICOMMANDMANAGER_H |