|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 USIM UI Extension FDN names list view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPSU2FIXEDDIALINGVIEW_H |
|
20 #define CPSU2FIXEDDIALINGVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CPsu2NameListViewBase.h" |
|
24 #include <MPbk2EditedContactObserver.h> |
|
25 #include <MVPbkSingleContactOperationObserver.h> |
|
26 #include <MVPbkContactObserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CAknNavigationControlContainer; |
|
30 class CAknNavigationDecorator; |
|
31 class MVPbkStoreContact; |
|
32 class MVPbkContactStore; |
|
33 class MVPbkFieldType; |
|
34 class CPsu2FixedDialingCall; |
|
35 class MVPbkContactLink; |
|
36 class MVPbkContactOperationBase; |
|
37 class MVPbkStoreContact; |
|
38 class MPbk2DialogEliminator; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * Phonebook 2 USIM UI Extension FDN names list view. |
|
44 */ |
|
45 class CPsu2FixedDialingView : public CPsu2NameListViewBase, |
|
46 public MPbk2EditedContactObserver, |
|
47 public MVPbkSingleContactOperationObserver, |
|
48 public MVPbkContactObserver |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Creates a new instance of this class. |
|
54 * |
|
55 * @param aExtensionView The view from the extension framework. |
|
56 * @param aViewManager The view manager of the USIM extension. |
|
57 * @return A new instance of this class. |
|
58 */ |
|
59 static CPsu2FixedDialingView* NewL( |
|
60 CPbk2UIExtensionView& aExtensionView, |
|
61 CPsu2ViewManager& aViewManager ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CPsu2FixedDialingView(); |
|
67 |
|
68 public: // From MPbk2UIExtensionView |
|
69 TBool HandleCommandKeyL( |
|
70 const TKeyEvent& aKeyEvent, |
|
71 TEventCode aType ); |
|
72 void HandlePointerEventL( |
|
73 const TPointerEvent& aPointerEvent ); |
|
74 void DoActivateL( |
|
75 const TVwsViewId& aPrevViewId, |
|
76 TUid aCustomMessageId, |
|
77 const TDesC8& aCustomMessage ); |
|
78 void DoDeactivate(); |
|
79 void HandleCommandL( |
|
80 TInt aCommand ); |
|
81 void DynInitMenuPaneL( |
|
82 TInt aResourceId, |
|
83 CEikMenuPane* aMenuPane ); |
|
84 public: // From MPbk2ControlObserver |
|
85 void HandleControlEventL( |
|
86 MPbk2ContactUiControl& aControl, |
|
87 const TPbk2ControlEvent& aEvent ); |
|
88 |
|
89 private: // From CPsu2NameListViewBase |
|
90 void UpdateCbasL(); |
|
91 TInt NameListControlResourceId() const; |
|
92 |
|
93 private: // From MPbk2EditedContactObserver |
|
94 void ContactEditingComplete( |
|
95 MVPbkStoreContact* aEditedContact ); |
|
96 void ContactEditingDeletedContact( |
|
97 MVPbkStoreContact* aEditedContact ); |
|
98 void ContactEditingAborted(); |
|
99 |
|
100 private: // From MVPbkSingleContactOperationObserver |
|
101 void VPbkSingleContactOperationComplete( |
|
102 MVPbkContactOperationBase& aOperation, |
|
103 MVPbkStoreContact* aContact ); |
|
104 void VPbkSingleContactOperationFailed( |
|
105 MVPbkContactOperationBase& aOperation, |
|
106 TInt aError ); |
|
107 |
|
108 private: // From MVPbkContactObserver |
|
109 void ContactOperationCompleted(TContactOpResult aResult); |
|
110 void ContactOperationFailed( |
|
111 TContactOp aOpCode, |
|
112 TInt aErrorCode, |
|
113 TBool aErrorNotified ); |
|
114 public: // Implementation |
|
115 static TInt WaitOtherCompleteL( TAny* object ); |
|
116 |
|
117 private: |
|
118 void CheckFDNActivityL(); |
|
119 |
|
120 private: // Implementation |
|
121 CPsu2FixedDialingView( |
|
122 CPbk2UIExtensionView& aExtensionView, |
|
123 CPsu2ViewManager& aViewManager ); |
|
124 void ConstructL(); |
|
125 void UpdateNaviPaneTextL(); |
|
126 void DestroyNaviPaneText(); |
|
127 void OpenInfoViewCmdL( |
|
128 MPbk2ContactUiControl& aUiControl ) const; |
|
129 void ActivateFDNCmdL(); |
|
130 void DeactivateFDNCmdL(); |
|
131 void CreateNewFdnContactL(); |
|
132 void AddFindTextL( |
|
133 MVPbkStoreContact& aContact ); |
|
134 TBool FdnStoreFullL(); |
|
135 void CreateCallL( |
|
136 TInt aCommand ); |
|
137 void EditFdnContactL(); |
|
138 |
|
139 private: // Data |
|
140 /// Ref: Navipane for setting activity text to |
|
141 CAknNavigationControlContainer* iNaviPane; |
|
142 /// Ref: Decorator for navipane |
|
143 CAknNavigationDecorator* iNaviDecorator; |
|
144 /// Ref: FDN Store |
|
145 MVPbkContactStore* iFdnStore; |
|
146 /// Own: FDN calling support |
|
147 CPsu2FixedDialingCall* iFdnCall; |
|
148 /// Own: FDN not active note is shown |
|
149 TBool iShowFdnNotActiveNote; |
|
150 /// Own: Link to contact to edit |
|
151 MVPbkContactLink* iContactLink; |
|
152 /// Own: The store contact to edit |
|
153 MVPbkStoreContact* iContact; |
|
154 /// Own: An operation to get a contact from the link |
|
155 MVPbkContactOperationBase* iContactRetriever; |
|
156 /// Own: ETrue, while CommandHandleL() is being executed |
|
157 TBool iCommandIsBeingHandled; |
|
158 // Own: Wait for other things complete then pop up the note. |
|
159 CIdle* iWaitOtherComplete; |
|
160 |
|
161 /// Ref: Eliminator of current contact editing dialog |
|
162 MPbk2DialogEliminator* iDlgEliminator; |
|
163 }; |
|
164 |
|
165 #endif // CPSU2FIXEDDIALINGVIEW_H |
|
166 |
|
167 // End of File |