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