|
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: ESMR MRUtils implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //INCLUDE FILES |
|
20 #include "emailtrace.h" |
|
21 #include "cesmrutilsimpl.h" |
|
22 #include "cesmrutils.h" |
|
23 #include "cesmrcaldbmgr.h" |
|
24 |
|
25 // From ESMRSERVICES |
|
26 //<cmail> |
|
27 #include "cesmrpolicymanager.h" |
|
28 #include "cesmrentryprocessor.h" |
|
29 #include "mesmrmeetingrequestentry.h" |
|
30 #include "cesmrtaskfactory.h" |
|
31 #include "mesmrtask.h" |
|
32 #include "cesmrtaskextensionimpl.h" |
|
33 #include "esmrinternaluid.h" |
|
34 #include "tesmrscenariodata.h" |
|
35 //</cmail> |
|
36 |
|
37 // From System |
|
38 #include <calentry.h> |
|
39 #include <calinstance.h> |
|
40 #include <calsession.h> |
|
41 #include <calcommon.h> |
|
42 #include <caluser.h> |
|
43 #include <cmrmailboxutils.h> |
|
44 #include <msvapi.h> |
|
45 #include <msvstd.h> |
|
46 |
|
47 // CONSTANTS |
|
48 /// Unnamed namespace for local definitions |
|
49 namespace { // codescanner::namespace |
|
50 |
|
51 #ifdef _DEBUG |
|
52 |
|
53 // Definition for MR UTILS panic text |
|
54 _LIT(KESMRUtilsPanicTxt, "ESMRUtilsImpl" ); |
|
55 |
|
56 // MR VIEWER ctrl panic codes |
|
57 enum TESMRUtilsImplPanicCode |
|
58 { |
|
59 EESMRUtilsObserverMissing = 0, // Observer is missing |
|
60 }; |
|
61 |
|
62 void Panic( TESMRUtilsImplPanicCode aPanicCode) |
|
63 { |
|
64 User::Panic( KESMRUtilsPanicTxt, aPanicCode ); |
|
65 } |
|
66 |
|
67 #endif |
|
68 |
|
69 } // namespace |
|
70 |
|
71 // ======== MEMBER FUNCTIONS ======== |
|
72 |
|
73 // ---------------------------------------------------------------------------- |
|
74 // CESMRUtilsImpl::NewL |
|
75 // ---------------------------------------------------------------------------- |
|
76 // |
|
77 CESMRUtilsImpl* CESMRUtilsImpl::NewL() |
|
78 { |
|
79 FUNC_LOG; |
|
80 CESMRUtilsImpl* self = new ( ELeave ) CESMRUtilsImpl(); |
|
81 CleanupStack::PushL( self ); |
|
82 self->ConstructL(); |
|
83 CleanupStack::Pop( self ); |
|
84 return self; |
|
85 } |
|
86 |
|
87 // ---------------------------------------------------------------------------- |
|
88 // CESMRUtilsImpl::CESMRUtilsImpl |
|
89 // ---------------------------------------------------------------------------- |
|
90 // |
|
91 CESMRUtilsImpl::CESMRUtilsImpl() |
|
92 { |
|
93 FUNC_LOG; |
|
94 } |
|
95 |
|
96 // ---------------------------------------------------------------------------- |
|
97 // CESMRUtilsImpl::~CESMRUtilsImpl |
|
98 // ---------------------------------------------------------------------------- |
|
99 // |
|
100 CESMRUtilsImpl::~CESMRUtilsImpl() |
|
101 { |
|
102 FUNC_LOG; |
|
103 delete iEsmrUtils; |
|
104 } |
|
105 |
|
106 // ---------------------------------------------------------------------------- |
|
107 // CESMRUtilsImpl::ConstructL |
|
108 // ---------------------------------------------------------------------------- |
|
109 // |
|
110 void CESMRUtilsImpl::ConstructL() |
|
111 { |
|
112 FUNC_LOG; |
|
113 iEsmrUtils = CESMRUtils::NewL( *this ); |
|
114 } |
|
115 |
|
116 // ---------------------------------------------------------------------------- |
|
117 // CESMRUtilsImpl::DeleteWithUiL |
|
118 // ---------------------------------------------------------------------------- |
|
119 // |
|
120 TInt CESMRUtilsImpl::DeleteWithUiL( // codescanner::intleaves |
|
121 const CCalEntry& aEntry, |
|
122 TMsvId aMailbox ) |
|
123 { |
|
124 FUNC_LOG; |
|
125 return iEsmrUtils->DeleteWithUiL( aEntry, aMailbox ); |
|
126 } |
|
127 |
|
128 // ---------------------------------------------------------------------------- |
|
129 // CESMRUtilsImpl::DeleteWithUiL |
|
130 // ---------------------------------------------------------------------------- |
|
131 // |
|
132 TInt CESMRUtilsImpl::DeleteWithUiL( // codescanner::intleaves |
|
133 CCalInstance* aInstance, |
|
134 TMsvId aMailbox ) |
|
135 { |
|
136 FUNC_LOG; |
|
137 return iEsmrUtils->DeleteWithUiL( aInstance, aMailbox ); |
|
138 } |
|
139 |
|
140 // ---------------------------------------------------------------------------- |
|
141 // CESMRUtilsImpl::SendWithUiL |
|
142 // ---------------------------------------------------------------------------- |
|
143 // |
|
144 void CESMRUtilsImpl::SendWithUiL( |
|
145 const CCalEntry& aEntry, |
|
146 TMsvId aMailbox ) |
|
147 { |
|
148 FUNC_LOG; |
|
149 iEsmrUtils->SendWithUiL( aEntry, aMailbox ); |
|
150 } |
|
151 |
|
152 // ---------------------------------------------------------------------------- |
|
153 // CESMRUtilsImpl::ExtensionL |
|
154 // ---------------------------------------------------------------------------- |
|
155 // |
|
156 TAny* CESMRUtilsImpl::ExtensionL( TUid aExtensionUid ) |
|
157 { |
|
158 FUNC_LOG; |
|
159 TAny* extension = iEsmrUtils->ExtensionL( aExtensionUid ); |
|
160 return extension; |
|
161 } |
|
162 |
|
163 // ---------------------------------------------------------------------------- |
|
164 // CESMRUtilsImpl::SessionSetupL |
|
165 // This template method is called as a part of the ECom plugin construction. |
|
166 // This replaces much of the ordinary ConstructL() functionality, a template |
|
167 // method is easier for transmitting parameters. |
|
168 // ---------------------------------------------------------------------------- |
|
169 // |
|
170 void CESMRUtilsImpl::SessionSetupL( |
|
171 CCalSession& aCalSession, |
|
172 CMsvSession* aMsvSession ) |
|
173 { |
|
174 FUNC_LOG; |
|
175 iEsmrUtils->SessionSetupL( aCalSession, aMsvSession ); |
|
176 } |
|
177 |
|
178 // ---------------------------------------------------------------------------- |
|
179 // CESMRUtilsImpl::HandleCalEngStatus |
|
180 // ---------------------------------------------------------------------------- |
|
181 // |
|
182 void CESMRUtilsImpl::HandleCalEngStatus( TMRUtilsCalEngStatus aStatus ) |
|
183 { |
|
184 FUNC_LOG; |
|
185 __ASSERT_DEBUG( iObserver, Panic(EESMRUtilsObserverMissing ) ); |
|
186 |
|
187 iObserver->HandleCalEngStatus( aStatus ); |
|
188 } |
|
189 |
|
190 // ---------------------------------------------------------------------------- |
|
191 // CESMRUtilsImpl::HandleOperation |
|
192 // ---------------------------------------------------------------------------- |
|
193 // |
|
194 void CESMRUtilsImpl::HandleOperation( |
|
195 TInt /*aType*/, |
|
196 TInt /*aPercentageCompleted*/, |
|
197 TInt /*aStatus*/ ) |
|
198 { |
|
199 FUNC_LOG; |
|
200 |
|
201 } |
|
202 |
|
203 // End of file |
|
204 |