|
1 /* |
|
2 * Copyright (c) 2002-2009 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: Mrviewer controller definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRVIEWERCTRL_H |
|
20 #define CESMRVIEWERCTRL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <MAgnEntryUi.h> |
|
24 #include <CMRUtils.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCalEntry; |
|
29 class TCoeHelpContext; |
|
30 class CMRDialogBase; |
|
31 class CESMRUtils; |
|
32 class CMRMailboxUtils; |
|
33 class CActiveSchedulerWait; |
|
34 class CESMRUiFactory; |
|
35 class CESMREntryProcessor; |
|
36 class MESMRTaskExtension; |
|
37 class CESMRPolicyManager; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * ESMRVIEWER controller is responsible for control logic and UI view |
|
43 * creation and execution. |
|
44 */ |
|
45 NONSHARABLE_CLASS(CESMRViewerController) : |
|
46 public CBase, |
|
47 public MAgnEntryUiCallback, |
|
48 public MMRUtilsObserver |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 IMPORT_C static CESMRViewerController * NewL( |
|
55 const TDesC8& aMtmuid, |
|
56 RPointerArray<CCalEntry>& aEntries, |
|
57 const MAgnEntryUi::TAgnEntryUiInParams& aParams, |
|
58 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
59 MAgnEntryUiCallback& aCallback ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 IMPORT_C ~CESMRViewerController (); |
|
65 |
|
66 public: // Implementation |
|
67 IMPORT_C void ExecuteL(); |
|
68 |
|
69 protected: // From MAgnEntryUICallback |
|
70 TBool IsCommandAvailable( TInt aCommandId ); |
|
71 TInt ProcessCommandWithResultL( TInt aCommandId ); |
|
72 void ProcessCommandL( TInt aCommandId); |
|
73 |
|
74 protected: // From MMRUtilsObserver |
|
75 void HandleCalEngStatus( TMRUtilsCalEngStatus aStatus ); |
|
76 void HandleOperation( |
|
77 TInt aType, |
|
78 TInt aPercentageCompleted, |
|
79 TInt aStatus ); |
|
80 |
|
81 private: // Constructors |
|
82 CESMRViewerController( |
|
83 RPointerArray<CCalEntry>& aEntries, |
|
84 const MAgnEntryUi::TAgnEntryUiInParams& aParams, |
|
85 MAgnEntryUi::TAgnEntryUiOutParams& aOutParams, |
|
86 MAgnEntryUiCallback& aCallback ); |
|
87 void ConstructL(const TDesC8& aMtmuid); |
|
88 TInt ProcessCommandWithResultInternalL( |
|
89 TInt aCommandId ); |
|
90 void LaunchUIL(); |
|
91 void LaunchCorrectOperationModeL(); |
|
92 |
|
93 private: // Data |
|
94 /// Own: Operation error value |
|
95 TInt iExecutionError; |
|
96 /// Own: Pointer to ESMRUTILS handler |
|
97 CESMRUtils* iESMRUtils; |
|
98 // Ref: Oarameters from the launching application |
|
99 const MAgnEntryUi::TAgnEntryUiInParams iInParams; |
|
100 // Ref: Parameters for the launching application |
|
101 MAgnEntryUi::TAgnEntryUiOutParams& iOutParams; |
|
102 // Ref: callback for command handling |
|
103 MAgnEntryUiCallback& iCallback; |
|
104 // Ref: Calendar entries to be handled |
|
105 RPointerArray<CCalEntry>& iEntries; |
|
106 /// Own: MR UTILS syncher |
|
107 CActiveSchedulerWait* iCtrlSyncher; |
|
108 /// Own: UI factory |
|
109 CESMRUiFactory* iGuiFactory; |
|
110 /// Ref: Reference to entry processor |
|
111 CESMREntryProcessor* iEntryProcessor; |
|
112 /// Ref: Reference to task extension |
|
113 MESMRTaskExtension* iTaskExt; |
|
114 /// Ref: Reference to policy manager |
|
115 CESMRPolicyManager* iPolicyMgr; |
|
116 }; |
|
117 |
|
118 #endif // CMRHANDLER_H |
|
119 |
|
120 // End of File |