|
1 /* |
|
2 * Copyright (c) 2005 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: Command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMRCMDHANDLER_H |
|
22 #define CMRCMDHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <MAgnEntryUi.h> |
|
27 #include "CMRUtilsInternal.h" |
|
28 |
|
29 // FORWARD INCLUDES |
|
30 class CCalEntry; |
|
31 class CMRMailboxUtils; |
|
32 class MMRModelInterface; |
|
33 |
|
34 /** |
|
35 * Base class for meeting request models |
|
36 * ?other_description_lines |
|
37 * |
|
38 * @since Series S60 3.0 |
|
39 */ |
|
40 class CMRCmdHandler : public CBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CMRCmdHandler* NewL( |
|
48 MMRModelInterface& aModel, |
|
49 const MAgnEntryUi::TAgnEntryUiInParams& aInParams, |
|
50 CMRMailboxUtils& aMRMailboxUtils, |
|
51 CMRUtilsInternal& aMRUtils ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CMRCmdHandler(); |
|
57 |
|
58 protected: // protected construction |
|
59 /** |
|
60 * C++ default constructor. |
|
61 */ |
|
62 CMRCmdHandler( MMRModelInterface& aModel, |
|
63 const MAgnEntryUi::TAgnEntryUiInParams& aInParams, |
|
64 CMRMailboxUtils& aMRMailboxUtils, |
|
65 CMRUtilsInternal& aMRUtils ); |
|
66 |
|
67 /** |
|
68 * By default Symbian 2nd phase constructor is private. |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 public: // New functions |
|
73 |
|
74 TInt SaveL(); |
|
75 |
|
76 TInt SaveFromFileL( const RPointerArray<CCalEntry>& aEntries ); |
|
77 |
|
78 TInt SendL( TInt aSendCmd ); |
|
79 |
|
80 TInt CancelMRL(); |
|
81 |
|
82 TInt DeleteMRL(); |
|
83 |
|
84 TInt CreateResponseL( const RPointerArray<CCalEntry>& aEntries, |
|
85 TInt aResponseCmd ); |
|
86 |
|
87 void CreateReplyL( TInt aReplyType ); |
|
88 |
|
89 void RemoveFromCalendarL( const RPointerArray<CCalEntry>& aEntries ); |
|
90 |
|
91 void DisableAlarmL( const RPointerArray<CCalEntry>& aEntries ); |
|
92 |
|
93 protected: |
|
94 |
|
95 CCalEntry* CreateCancelForRemovedAttendeesL( |
|
96 const CCalEntry& aEntry ) const; |
|
97 |
|
98 /** |
|
99 * Updates iCal/iTip protocol-related fields. |
|
100 * @param aEntry will be modified and then saved |
|
101 * @param aWillBeSentNow ETrue if saved in context of sending entry |
|
102 */ |
|
103 void SetProtocolFieldsL( CCalEntry& aEntry, |
|
104 TBool aWillBeSentNow ) const; |
|
105 |
|
106 protected: // Data |
|
107 |
|
108 // attendee items owned |
|
109 RPointerArray<CCalAttendee> iOriginalAttendees; |
|
110 |
|
111 MMRModelInterface& iModel; |
|
112 |
|
113 CMRUtilsInternal& iMRUtils; |
|
114 |
|
115 MAgnEntryUi::TAgnEntryUiInParams iInParams; |
|
116 |
|
117 CMRMailboxUtils& iMRMailboxUtils; |
|
118 }; |
|
119 |
|
120 #endif // CMRCMDHANDLER_H |
|
121 |
|
122 // End of File |
|
123 |