|
1 /* |
|
2 * Copyright (c) 2009-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: Class implementing new entry commands |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMRBCPLUGINNEWCALEVENTCOMMAND_H |
|
19 #define CMRBCPLUGINNEWCALEVENTCOMMAND_H |
|
20 |
|
21 #include "mmrbcplugincommand.h" |
|
22 #include "esmrdef.h" |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <calentry.h> |
|
26 #include <coneresloader.h> |
|
27 #include <magnentryui.h> |
|
28 |
|
29 class MCalenServices; |
|
30 class CESMRViewerController; |
|
31 |
|
32 |
|
33 /** |
|
34 * CBCCalNewEventCommand is responsible for handling |
|
35 * create new event commands. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CMRPluginNewCalEntryCommand ) : |
|
38 public CBase, |
|
39 public MMRBCPluginCommand, |
|
40 public MAgnEntryUiCallback |
|
41 { |
|
42 public: // Construction and destruction |
|
43 |
|
44 static CMRPluginNewCalEntryCommand* NewL( |
|
45 MCalenServices& aServices, |
|
46 CCalEntry::TType aType ); |
|
47 |
|
48 static CMRPluginNewCalEntryCommand* NewLC( |
|
49 MCalenServices& aServices, |
|
50 CCalEntry::TType aType ); |
|
51 |
|
52 /** |
|
53 * C++ destructor |
|
54 */ |
|
55 ~CMRPluginNewCalEntryCommand(); |
|
56 |
|
57 protected: // from base class MBCCalEventCommand |
|
58 void ExecuteCommandL( |
|
59 const TCalenCommand& aContext ); |
|
60 |
|
61 private: // From base class MAgnEntryUiCallback |
|
62 void ProcessCommandL(TInt aCommandId); |
|
63 TInt ProcessCommandWithResultL( TInt aCommandId ); |
|
64 |
|
65 private: // Implementation |
|
66 CMRPluginNewCalEntryCommand( |
|
67 MCalenServices& aServices, |
|
68 CCalEntry::TType aEntryType); |
|
69 void ConstructL(); |
|
70 void CreateEntryL( |
|
71 const TCalenCommand& aCommand ); |
|
72 void CreateAndExecuteViewL( |
|
73 const TCalenCommand& aCommand ); |
|
74 void IssueCommandL( |
|
75 MAgnEntryUi::TAgnEntryUiOutParams aOutParams ); |
|
76 |
|
77 private: // data |
|
78 /// Ref: Reference to calendar services |
|
79 MCalenServices& iServices; |
|
80 /// Own: Calendar Entry |
|
81 CCalEntry* iCalEntry; |
|
82 /// Own: Entry type |
|
83 CCalEntry::TType iEntryType; |
|
84 /// Own: Viewer component |
|
85 CESMRViewerController* iViewer; |
|
86 }; |
|
87 |
|
88 #endif // CBCCALEVENTCOMMAND_H |
|
89 |
|
90 // EOF |