|
1 /* |
|
2 * Copyright (c) 2007-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: Responsing to meeting request asynchronously |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRICALVIEWERRESPONSETOMRCMD_H |
|
20 #define CESMRICALVIEWERRESPONSETOMRCMD_H |
|
21 |
|
22 #include "cesmricalviewerasynccommand.h" |
|
23 #include "tesmrinputparams.h" |
|
24 //<cmail> |
|
25 #include "mesmricalviewerobserver.h" |
|
26 #include "mesmricalviewercallback.h" |
|
27 #include "esmricalviewerdefs.hrh" |
|
28 //</cmail> |
|
29 #include <MAgnEntryUi.h> |
|
30 |
|
31 class CFSMailClient; |
|
32 class CESMRUiLauncher; |
|
33 |
|
34 /** |
|
35 * Command for responding to meeting request asynchronously |
|
36 * Command completion is reported to caller via MESMRIcalViewerObserver |
|
37 * interface. |
|
38 */ |
|
39 NONSHARABLE_CLASS( CESMRIcalViewerResponseToMRCmd ) : |
|
40 public CESMRIcalViewerAsyncCommand, |
|
41 public MESMRIcalViewerObserver, |
|
42 public MAgnEntryUiCallback |
|
43 { |
|
44 public: // Construction and destruction |
|
45 |
|
46 /** |
|
47 * Creates and initializes new CESMRIcalViewerResponseToMRCmd command. |
|
48 * @param aCallback callback interface to MESMRIcalViewerCallback |
|
49 * @param aCalSession Reference to calendar session. |
|
50 * @param aMailClient Reference to FS Email mail client object |
|
51 * @param aAttendeeStatus status of meeting request participant |
|
52 */ |
|
53 static CESMRIcalViewerResponseToMRCmd* NewL( |
|
54 MESMRIcalViewerCallback& aCallback, |
|
55 CCalSession& aCalSession, |
|
56 CFSMailClient& aMailClient, |
|
57 TESMRAttendeeStatus aAttendeeStatus ); |
|
58 |
|
59 /** |
|
60 * C++ Destructor |
|
61 */ |
|
62 ~CESMRIcalViewerResponseToMRCmd(); |
|
63 |
|
64 public: // From MESMRIcalViewerObserver |
|
65 void OperationCompleted( |
|
66 MESMRIcalViewerObserver::TIcalViewerOperationResult aResult ); |
|
67 void OperationError( |
|
68 MESMRIcalViewerObserver::TIcalViewerOperationResult aResult ); |
|
69 |
|
70 public: // From MAgnEntryUiCallback |
|
71 void ProcessCommandL(TInt aCommandId); |
|
72 TInt ProcessCommandWithResultL( TInt aCommandId ); |
|
73 TBool IsCommandAvailable( TInt aCommandId ); |
|
74 |
|
75 private: // From MESMRIcalViewerAsyncCommand |
|
76 void ExecuteAsyncCommandL(); |
|
77 void CancelAsyncCommand(); |
|
78 |
|
79 private: // Implementation |
|
80 CESMRIcalViewerResponseToMRCmd( |
|
81 MESMRIcalViewerCallback& aCallback, |
|
82 CCalSession& aCalSession, |
|
83 CFSMailClient& aMailClient, |
|
84 TESMRAttendeeStatus aAttendeeStatus ); |
|
85 void ConstructL(); |
|
86 void LaunchUiL(); |
|
87 void HandleOperationCompletedL( |
|
88 MESMRIcalViewerObserver::TIcalViewerOperationResult aResult ); |
|
89 |
|
90 private: // Data |
|
91 /// Ref: Reference to ESMRIcalviewer callback |
|
92 MESMRIcalViewerCallback& iCallback; |
|
93 /// Ref: Reference to input parameters |
|
94 TESMRInputParams iESMRInputParams; |
|
95 /// Ref: Reference to mail client |
|
96 CFSMailClient& iMailClient; |
|
97 /// Own: MR retriever command |
|
98 RPointerArray< MESMRIcalViewerCommand > iMRRetrieverCommands; |
|
99 /// Own: Current command index |
|
100 TInt iCurrentCommand; |
|
101 /// Own: Attendee status |
|
102 TESMRAttendeeStatus iAttendeeStatus; |
|
103 /// Own: Current callback command |
|
104 TESMRIcalViewerOperationType iCurrentCbCommand; |
|
105 /// Own: Asynchronous email command |
|
106 MESMRIcalViewerCommand* iEmailCommand; |
|
107 /// Own: Command received via callback |
|
108 TInt iMRViewerCommand; |
|
109 /// Own: UI launcher |
|
110 CESMRUiLauncher* iUILauncher; |
|
111 }; |
|
112 |
|
113 #endif |
|
114 |
|
115 // EOF |