|
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: Implementation of CMRUtils ECom API. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRUTILS_H |
|
20 #define CESMRUTILS_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32base.h> |
|
24 #include <CMRUtils.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CCalEntry; |
|
28 class CMRMailboxUtils; |
|
29 class CESMRCalDbMgr; |
|
30 class CESMRPolicyManager; |
|
31 class CESMREntryProcessor; |
|
32 class MESMRTaskFactory; |
|
33 class MESMRTaskExtension; |
|
34 |
|
35 /** |
|
36 * ECom implementation for es meeting request utilities. |
|
37 */ |
|
38 NONSHARABLE_CLASS( CESMRUtils ) : |
|
39 public CBase, |
|
40 public MMRUtilsObserver |
|
41 { |
|
42 public: // Constructors and destructors |
|
43 |
|
44 /** |
|
45 * ECom plug-in instantiation method. |
|
46 * @return instantiated ECom plug-in |
|
47 */ |
|
48 IMPORT_C static CESMRUtils* NewL( |
|
49 MMRUtilsObserver& aObserver ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 IMPORT_C ~CESMRUtils(); |
|
55 |
|
56 public: // Interface is copied from CMRUtils.h |
|
57 /** |
|
58 * Deletes given aEntries from the database and possibly allows |
|
59 * user to cancel meeting or decline participation, depending on |
|
60 * participation type. |
|
61 * @param aEntry entry to be deleted |
|
62 * @param aMailbox mailbox to use for possible cancel/response |
|
63 * @return KErrNone or a system wide error code |
|
64 */ |
|
65 IMPORT_C TInt DeleteWithUiL( |
|
66 const CCalEntry& aEntry, |
|
67 TMsvId aMailbox ); |
|
68 |
|
69 /** |
|
70 * Deletes given instance from the database and possibly allows |
|
71 * user to cancel meeting or decline participation, depending on |
|
72 * participation type. |
|
73 * @param aInstance instance to be deleted, ownership transferred |
|
74 * @param aMailbox mailbox to use for possible cancel/response |
|
75 * @return KErrNone or a system wide error code |
|
76 */ |
|
77 IMPORT_C TInt DeleteWithUiL( |
|
78 CCalInstance* aInstance, |
|
79 TMsvId aMailbox ); |
|
80 |
|
81 /** |
|
82 * Deprecated. Do not use. |
|
83 */ |
|
84 IMPORT_C void SendWithUiL( |
|
85 const CCalEntry& aEntry, |
|
86 TMsvId aMailbox ); |
|
87 |
|
88 /** |
|
89 * Allows extending this API without breaking BC. |
|
90 * @param aExtensionUid Extension uid |
|
91 * @param return extension |
|
92 */ |
|
93 IMPORT_C TAny* ExtensionL( |
|
94 TUid aExtensionUid ); |
|
95 |
|
96 /** |
|
97 * Internal template method called immediatelly after |
|
98 * instantiation of the ECom plug-in. |
|
99 * @param aCalSession calendar session reference |
|
100 * @param aMsvSession, may be NULL |
|
101 */ |
|
102 IMPORT_C void SessionSetupL( |
|
103 CCalSession& aCalSession, |
|
104 CMsvSession* aMsvSession ); |
|
105 |
|
106 public: // From MMRUtilsObserver |
|
107 void HandleCalEngStatus( |
|
108 TMRUtilsCalEngStatus aStatus ); |
|
109 void HandleOperation( |
|
110 TInt aType, |
|
111 TInt aPercentageCompleted, |
|
112 TInt aStatus ); |
|
113 |
|
114 private: // Implementation |
|
115 CESMRUtils( MMRUtilsObserver& aObserver ); |
|
116 void ConstructL(); |
|
117 |
|
118 private: // data |
|
119 /// Own: Cal engine status |
|
120 TMRUtilsCalEngStatus iCalEngStatus; |
|
121 /// Own: Pointer to ES MR UTILS cal db object |
|
122 CESMRCalDbMgr* iCalDBMgr; |
|
123 // Own: Meeting request mailbox utils |
|
124 CMRMailboxUtils* iMRMailboxUtils; |
|
125 /// Own: ESMR policy manager |
|
126 CESMRPolicyManager* iPolicyManager; |
|
127 /// Own: MR Entry processor |
|
128 CESMREntryProcessor* iEntryProcessor; |
|
129 /// Own: ES MR Task factory |
|
130 MESMRTaskFactory* iTaskFactory; |
|
131 /// Own: ES MR Task extension |
|
132 MESMRTaskExtension* iTaskExtension; |
|
133 /// Ref: |
|
134 MMRUtilsObserver& iObserver; |
|
135 }; |
|
136 |
|
137 #endif // CESMRUTILSIMPL_H |
|
138 |
|
139 // End of File |