15 * |
15 * |
16 */ |
16 */ |
17 #ifndef CESMRVIEWERDIALOG_H |
17 #ifndef CESMRVIEWERDIALOG_H |
18 #define CESMRVIEWERDIALOG_H |
18 #define CESMRVIEWERDIALOG_H |
19 |
19 |
20 #include <AknDialog.h> |
20 #include <akndialog.h> |
21 #include <akntoolbarobserver.h> |
21 #include <akntoolbarobserver.h> |
22 #include <AknNaviDecoratorObserver.h> |
22 #include <aknserverapp.h> |
23 #include <msvapi.h> |
|
24 |
|
25 #include "mesmruibase.h" |
23 #include "mesmruibase.h" |
26 #include "mesmrresponseobserver.h" |
24 #include "mesmrresponseobserver.h" |
27 #include "resmrstatic.h" |
25 #include "resmrstatic.h" |
28 #include "mesmrfieldeventobserver.h" |
26 #include "mesmrfieldeventobserver.h" |
|
27 #include "mesmrnaviarroweventobserver.h" |
|
28 #include "cesmrfieldbuilderinterface.h" |
29 |
29 |
30 class MESMRFieldStorage; |
30 class MESMRFieldStorage; |
31 class MESMRCalEntry; |
31 class MESMRCalEntry; |
32 class CESMRView; |
32 class CESMRView; |
33 class MAgnEntryUiCallback; |
33 class MAgnEntryUiCallback; |
34 class CESMRPolicy; |
34 class CESMRPolicy; |
35 class CESMRSendUI; |
35 class CESMRSendUI; |
36 class CAiwServiceHandler; |
|
37 class CCEUIPolicyResolver; |
36 class CCEUIPolicyResolver; |
38 class CESMRPolicyManager; |
37 class CESMRPolicyManager; |
39 class CESMRLocationPluginHandler; |
38 class CESMRLocationPluginHandler; |
40 class CESMRFeatureSettings; |
39 class CESMRFeatureSettings; |
41 class CAknNavigationDecorator; |
40 class CMRToolbar; |
42 class MESMRMeetingRequestEntry; |
41 class TDataType; |
43 class TFSMailMsgId; |
42 class MMRInfoProvider; |
|
43 class MMRFocusStrategy; |
|
44 class CESMRTitlePaneHandler; |
44 |
45 |
45 /** |
46 /** |
46 * CESMRViewerDialog implements the viewer dialog for meeting requests. |
47 * CESMRViewerDialog implements the viewer dialog for meeting requests. |
47 * |
48 * |
48 * @see mesmruibase.h, mesmruifactory.h |
49 * @see mesmruibase.h, mesmruifactory.h |
84 void DynInitMenuPaneL( |
82 void DynInitMenuPaneL( |
85 TInt aResourceId, |
83 TInt aResourceId, |
86 CEikMenuPane* aMenuPane ); |
84 CEikMenuPane* aMenuPane ); |
87 void ActivateL(); |
85 void ActivateL(); |
88 void PreLayoutDynInitL(); |
86 void PreLayoutDynInitL(); |
89 |
87 |
90 public: // From MESUIBase |
88 public: // From MESUIBase |
91 TInt ExecuteViewLD(); |
89 TInt ExecuteViewLD(); |
92 |
90 |
93 public: // From MESMRResponseObserver |
91 public: // From MESMRResponseObserver |
94 TBool Response( TInt aCommand ); |
92 TBool Response( TInt aCommand ); |
95 void ExitDialog(); |
93 void ExitDialog(); |
96 void ChangeReadyResponseL(); |
94 void ChangeReadyResponseL(); |
97 |
95 |
98 public: // From MAknToolbarObserver |
96 public: // From MAknToolbarObserver |
99 virtual void OfferToolbarEventL( TInt aCommand ); |
97 void DynInitToolbarL ( TInt aResourceId, CAknToolbar* aToolbar ); |
|
98 void OfferToolbarEventL ( TInt aCommand ); |
100 |
99 |
101 public: // from MAknNaviDecoratorObserver |
|
102 void HandleNaviDecoratorEventL( TInt aEventID ); |
|
103 |
|
104 public: // from MMsvSessionObserver |
|
105 void HandleSessionEventL( |
|
106 TMsvSessionEvent aEvent, TAny* aArg1, |
|
107 TAny* aArg2, TAny* aArg3 ); |
|
108 |
|
109 public: |
|
110 /** |
|
111 * Static method that is given as callback to CIdle object |
|
112 * handling the navigation decorator right arrow event. |
|
113 * |
|
114 * @param aObjPtr TAny-casted pointer to an instance of this class. |
|
115 * @return Always KErrNone. |
|
116 */ |
|
117 static TInt RunCmdMailNextMessageIdle( TAny* aObjPtr ); |
|
118 |
|
119 /** |
|
120 * Static method that is given as callback to CIdle object |
|
121 * handling the navigation decorator left arrow event. |
|
122 * |
|
123 * @param aObjPtr TAny-casted pointer to an instance of this class. |
|
124 * @return Always KErrNone. |
|
125 */ |
|
126 static TInt RunCmdMailPreviousMessageIdle( TAny* aObjPtr ); |
|
127 |
|
128 protected: // MESMRFieldEventObserver |
100 protected: // MESMRFieldEventObserver |
129 void HandleFieldEventL( const MESMRFieldEvent& aEvent ); |
101 void HandleFieldEventL( const MESMRFieldEvent& aEvent ); |
|
102 |
|
103 public: // From MESMRNaviArrowEventObserver |
|
104 void HandleNaviArrowEventL( const TInt aCommand ); |
130 |
105 |
131 private: // Implementation |
106 private: // Implementation |
132 void DoProcessCommandL( TInt aCommand ); |
107 void DoProcessCommandL( TInt aCommand ); |
133 CESMRViewerDialog( MESMRCalEntry& aEntry, MAgnEntryUiCallback& aCallback ); |
108 CESMRViewerDialog( |
134 void ConstructL( CESMRPolicy* aPolicy ); |
109 MMRInfoProvider& aInfoProvider, |
|
110 MAgnEntryUiCallback& aCallback ); |
|
111 void ConstructL(); |
135 void OpenInDayModeL(); |
112 void OpenInDayModeL(); |
136 void CommandTailL(HBufC16*& aTailBuffer); |
113 void CommandTailL(HBufC16*& aTailBuffer); |
137 TBool HandleCommandForRecurrentEventL( TInt aCommand ); |
114 TBool HandleCommandForEventL( TInt aCommand ); |
138 void SendCalendarEntryL(TInt aCommandId); |
115 void SendCalendarEntryL(TInt aCommandId); |
139 void TryInsertSendMenuL(CEikMenuPane* aMenuPane); |
116 void TryInsertSendMenuL(CEikMenuPane* aMenuPane); |
140 void HandlePrintCommandL(TInt aCommand); |
|
141 void HandleEmailSubmenuL( |
117 void HandleEmailSubmenuL( |
142 TInt aResourceId, |
118 TInt aResourceId, |
143 CEikMenuPane* aMenuPane ); |
119 CEikMenuPane* aMenuPane ); |
144 void HandlePolicyMenuL( |
120 void HandlePolicyMenuL( |
145 TInt aResourceId, |
121 TInt aResourceId, |
146 CEikMenuPane* aMenuPane ); |
122 CEikMenuPane* aMenuPane ); |
147 void HandleDynamicMenuItemsL( |
123 void HandleDynamicMenuItemsL( |
148 TInt aResourceId, |
124 TInt aResourceId, |
149 CEikMenuPane* aMenuPane ); |
125 CEikMenuPane* aMenuPane ); |
150 TBool SupportsAttendeeStatusL(); |
126 TBool SupportsMailBoxCapabilityL( |
|
127 MESMRBuilderExtension::TMRCFSMailBoxCapability aCapa ); |
151 TBool HandleMRExitL( |
128 TBool HandleMRExitL( |
152 TInt aCommand ); |
129 TInt aCommand ); |
153 TBool SupportsForwardingAsMeetingL( |
130 void HandleForwardMenuL( |
154 MESMRMeetingRequestEntry* aEntry, |
131 TInt aResourceId, |
155 TBool aForceResetDefaultMRMailbox ); |
132 CEikMenuPane* aMenuPane ); |
156 CESMRLocationPluginHandler& LocationPluginHandlerL(); |
133 CESMRLocationPluginHandler& LocationPluginHandlerL(); |
157 void SetDefaultMiddleSoftKeyL(); |
134 void SetDefaultMiddleSoftKeyL(); |
158 TPtrC DigMailboxAndRemovePrefixL(); |
135 TInt TryToSaveAttachmentL(); |
159 void MakeMrGuiToolbarButtonsL(); |
136 void SetContextMenu(); |
160 void ClearToolbarL(); |
137 void ShowContextMenuL(); |
161 TInt AccountIdL( const TFSMailMsgId& aMailboxId ); |
138 TBool UserWantToHandleAttachmentsL(); |
|
139 void InitLocationMenuL( |
|
140 CEikMenuPane* aMenuPane ); |
|
141 void ConstructToolbarL(); |
|
142 void ProcessCommandEventL( const MESMRFieldEvent& aEvent ); |
|
143 void ProcessFieldEventL( const MESMRFieldEvent& aEvent ); |
162 |
144 |
163 private: // Data |
145 private: // Data |
164 |
146 |
165 /// Own: Feature manager initialization flag |
147 /// Ref: The only control in this dialog. Fwk deletes. |
166 TBool iFeatureManagerInitialized; |
|
167 /// Ref: The only control in this dialog. Fwk deletes. |
|
168 CESMRView* iView; |
148 CESMRView* iView; |
169 /// Ref: Reference to MESRCalEntry (CCalEntry wrapper) |
|
170 MESMRCalEntry& iEntry; |
|
171 /// Ref: Agn Entry UI callback interface |
149 /// Ref: Agn Entry UI callback interface |
172 MAgnEntryUiCallback& iCallback; |
150 MAgnEntryUiCallback& iCallback; |
173 /// Ref: Pointer to policy |
|
174 CESMRPolicy* iPolicy; |
|
175 /// Own: Calendar Global data |
151 /// Own: Calendar Global data |
176 CESMRSendUI* iESMRSendUI; |
152 CESMRSendUI* iESMRSendUI; |
177 /// Own: AIW Service handler |
|
178 CAiwServiceHandler* iServiceHandler; |
|
179 /// Own: Flag for marking exit |
153 /// Own: Flag for marking exit |
180 TBool iExitTriggered; |
154 TBool iExitTriggered; |
181 /// Own: Static TLS data handler |
155 /// Own: Static TLS data handler |
182 RESMRStatic iESMRStatic; |
156 RESMRStatic iESMRStatic; |
183 // Own: Location plugin handler. |
157 // Own: Location plugin handler. |
184 CESMRLocationPluginHandler* iLocationPluginHandler; |
158 CESMRLocationPluginHandler* iLocationPluginHandler; |
185 // Own: Feature settings. |
159 // Own: Feature settings. |
186 CESMRFeatureSettings* iFeatures; |
160 CESMRFeatureSettings* iFeatures; |
187 // Not own: Pointer to previous toolbar observer. |
161 /// Own: Toolbar |
188 MAknToolbarObserver* iOldObserver; |
162 CMRToolbar* iToolbar; |
189 // flag to indicate toolbar can be cleared |
163 /// Ref: Reference to mrinfo provider |
190 TBool iClearToolbar; |
164 MMRInfoProvider& iInfoProvider; |
191 // Own: CIdle object through which navi button events are handled. |
165 /// Own: Context menu resource ID. |
192 // CIdle with callback is used because the navi buttons events |
166 TInt iContextMenuResourceId; |
193 // cause deletion of this dialog, but the actual button event |
167 /// Own: Focus strategy of the viewer |
194 // handling needs to be completed before closing the dialog. |
168 MMRFocusStrategy* iFocusStrategy; |
195 CIdle* iIdleNaviEventRunner; |
169 /// Own: Titlepane handler |
196 // Not own: Pointer to navigation decorator |
170 CESMRTitlePaneHandler* iTitlePane; |
197 CAknNavigationDecorator* iESMRNaviDecorator; |
|
198 }; |
171 }; |
199 |
172 |
200 #endif // CESMRVIEWERDIALOG_H |
173 #endif // CESMRVIEWERDIALOG_H |