|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Centralised handling of various meeting request views |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMRHANDLER_H |
|
22 #define CMRHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <MAgnEntryUi.h> |
|
26 #include <e32base.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CCalEntry; |
|
30 class TCoeHelpContext; |
|
31 class MMRModelInterface; |
|
32 class CMRDialogBase; |
|
33 class CCalenEditorsPlugin; |
|
34 class CMRCmdHandler; |
|
35 class CMRUtilsInternal; |
|
36 class CMRMailboxUtils; |
|
37 |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Meeting request handler for dialog showing and command handling |
|
43 |
|
44 * @since Series S60 3.0 |
|
45 */ |
|
46 class CMRHandler : public CBase, |
|
47 public MAgnEntryUiCallback |
|
48 { |
|
49 public: |
|
50 |
|
51 enum TMRViewStatus |
|
52 { |
|
53 EInitialView, |
|
54 ELaunchMeetingRequestView, |
|
55 ELaunchMeetingDescriptionView, |
|
56 ELaunchAttendeeView, |
|
57 ELaunchMeetingEditorView, |
|
58 ECloseMeetingRequestViews |
|
59 }; |
|
60 |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 static CMRHandler* NewL(RPointerArray<CCalEntry>& aEntries, |
|
67 const MAgnEntryUi::TAgnEntryUiInParams& aParams, |
|
68 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
69 MAgnEntryUiCallback& aCallback ); |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~CMRHandler(); |
|
74 |
|
75 public: // new methods |
|
76 |
|
77 /** |
|
78 * Set help text for all views |
|
79 * @param aContext Help context |
|
80 */ |
|
81 void SetHelpContext( const TCoeHelpContext& aContext ); |
|
82 |
|
83 /** |
|
84 * Execute the meeting request views |
|
85 * Has a state machine for different views |
|
86 */ |
|
87 TInt ExecuteViewL(); |
|
88 |
|
89 /** |
|
90 * Indicate engine ready for reading data |
|
91 */ |
|
92 void HandleEngReadyL( const TDesC8& aMtmUid, |
|
93 CMRUtilsInternal& aMRUtils, |
|
94 CMRMailboxUtils& aMRMailboxUtils ); |
|
95 |
|
96 protected: // Functions from MAgnEntryUICallback |
|
97 |
|
98 TBool IsCommandAvailable( TInt aCommandId ); |
|
99 |
|
100 TInt ProcessCommandWithResultL( TInt aCommandId ); |
|
101 |
|
102 void ProcessCommandL( TInt aCommandId); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * C++ default constructor. |
|
108 */ |
|
109 CMRHandler( RPointerArray<CCalEntry>& aEntries, |
|
110 const MAgnEntryUi::TAgnEntryUiInParams& aParams, |
|
111 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
112 MAgnEntryUiCallback& aCallback ); |
|
113 |
|
114 /** |
|
115 * By default Symbian 2nd phase constructor is private. |
|
116 */ |
|
117 void ConstructL(); |
|
118 |
|
119 private: // private methods |
|
120 |
|
121 TInt ProcessTrappedModifCmdL( TInt aCommandId ); |
|
122 |
|
123 TInt ExecuteEditorViewL(); |
|
124 |
|
125 TInt ExecuteAttendeeViewL(); |
|
126 |
|
127 void ShowOpeningNoteL(); |
|
128 |
|
129 void RefreshViewL(); |
|
130 |
|
131 void QueryAndSetEditingModeL(); |
|
132 |
|
133 // for testing purposes only |
|
134 void LogAvailableFunctionsL() const; |
|
135 |
|
136 private: // Data |
|
137 |
|
138 // parameters from the launching application |
|
139 const MAgnEntryUi::TAgnEntryUiInParams iInParams; |
|
140 |
|
141 // parameters for the launching application |
|
142 MAgnEntryUi::TAgnEntryUiOutParams& iOutParams; |
|
143 |
|
144 // callback for command handling |
|
145 MAgnEntryUiCallback& iCallback; |
|
146 |
|
147 // next view status |
|
148 TMRViewStatus iStatus; |
|
149 |
|
150 // helpcontext id |
|
151 TCoeHelpContext* iContext; |
|
152 |
|
153 // entries not own |
|
154 RPointerArray<CCalEntry>& iEntries; |
|
155 |
|
156 //calendar editors plugin, owned |
|
157 MAgnEntryUi* iCalendarEditorsPlugin; |
|
158 |
|
159 // Dialog that is currently displayed, owned |
|
160 CMRDialogBase* iCurrentDialog; |
|
161 |
|
162 // Meeting request model, owned |
|
163 MMRModelInterface* iModel; |
|
164 |
|
165 // own |
|
166 CMRCmdHandler* iCmdHandler; |
|
167 }; |
|
168 |
|
169 #endif // CMRHANDLER_H |
|
170 |
|
171 // End of File |