|
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: Class definition for sending meeting request via FS EMail |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_ESMRSENDMRFFSEMAILTASK_H |
|
20 #define C_ESMRSENDMRFFSEMAILTASK_H |
|
21 |
|
22 #include "cesmrtaskbase.h" |
|
23 //<cmail> |
|
24 #include "esmrcommands.h" |
|
25 //</cmail> |
|
26 |
|
27 class CCalEntry; |
|
28 class MESMRCalDbMgr; |
|
29 class MESMRMeetingRequestEntry; |
|
30 class CMRMailboxUtils; |
|
31 class CESMRFSEMailManager; |
|
32 class CESMRCalUserUtil; |
|
33 class CCalAttendee; |
|
34 |
|
35 /** |
|
36 * Class definition for sending meeting request via FS EMail. |
|
37 * |
|
38 * @lib esmrtasks.lib |
|
39 */ |
|
40 NONSHARABLE_CLASS( CESMRSendMRFSMailTask ) : |
|
41 public CESMRTaskBase |
|
42 { |
|
43 public: // Construction and destruction |
|
44 |
|
45 /** |
|
46 * Creates and initializes new CESMRCancelMRFSEmailTask object. |
|
47 * Ownership is transferred to caller. |
|
48 * @param aCalDbMgr Reference to cal db manager. |
|
49 * @param aEntry Reference to ES MR calendar entry. |
|
50 * @param aMRMailboxUtils Reference mr mailbox utilities. |
|
51 * @param aCommand Command to be executed |
|
52 */ |
|
53 static CESMRSendMRFSMailTask* NewL( |
|
54 MESMRCalDbMgr& aCalDbMgr, |
|
55 MESMRMeetingRequestEntry& aEntry, |
|
56 CMRMailboxUtils& aMRMailboxUtils, |
|
57 TESMRCommand aCommand ); |
|
58 |
|
59 /** |
|
60 * C++ destructor. |
|
61 */ |
|
62 ~CESMRSendMRFSMailTask(); |
|
63 |
|
64 public: // From MESMRTask |
|
65 void ExecuteTaskL(); |
|
66 |
|
67 private: // Definitios |
|
68 /** Enumeration for update sending type */ |
|
69 enum TESMRSendType |
|
70 { |
|
71 // MR is sent to all |
|
72 ESendToAll, |
|
73 // MR is sent to added and removed |
|
74 ESentToAddedAndRemoved |
|
75 }; |
|
76 |
|
77 private: // Implementation |
|
78 CESMRSendMRFSMailTask( |
|
79 MESMRCalDbMgr& aCalDbMgr, |
|
80 MESMRMeetingRequestEntry& aEntry, |
|
81 CMRMailboxUtils& aMRMailboxUtils, |
|
82 TESMRCommand aCommand ); |
|
83 void ConstructL(); |
|
84 |
|
85 void ConstructMailL(); |
|
86 void AddAttendeesL(); |
|
87 TInt SaveICalToFileL( |
|
88 const TDesC& aICal, |
|
89 const TDesC& aFilename ); |
|
90 HBufC* ResolveUsedMailboxUserAddressLC(); |
|
91 void ResolveSendTypeL(); |
|
92 TBool NeedToSendInvitationL(); |
|
93 TBool NeedToSendCancellationL(); |
|
94 void SetCorrectAttendeesToEntryL(); |
|
95 void GetAttendeesToBeSentL( |
|
96 RArray<CCalAttendee*>& aRequiredAttendees, |
|
97 RArray<CCalAttendee*>& aOptionalAttendees ); |
|
98 void GetEntriesToBeSentL(); |
|
99 |
|
100 private: // Data |
|
101 /// Own: FS email manager |
|
102 CESMRFSEMailManager* iEmailMgr; |
|
103 /// Ref: Pointer to calendar entry to be sent |
|
104 CCalEntry* iEntryToSend; |
|
105 /// Own: Pointer to calendar entries to be sent |
|
106 RPointerArray<CCalEntry> iEntriesToSend; |
|
107 /// Own: Caluser utility object |
|
108 CESMRCalUserUtil* iCaluserUtil; |
|
109 /// Own: Send type definition |
|
110 TESMRSendType iSendType; |
|
111 /// Own: Command to be executed |
|
112 TESMRCommand iCommand; |
|
113 }; |
|
114 |
|
115 #endif // C_ESMRSENDMRFFSEMAILTASK_H |
|
116 |
|
117 // EOF |